Commit Graph

43 Commits

Author SHA1 Message Date
jinbiao 605e7e5f8d mmc: fix coverity error [1/1]
PD#SWPL-141993

Problem:
Coverity cleanup for ignored CID:unused value and out-of-bounds read --mmc

Solution:
fix coverity error

Verify:
local

Change-Id: Ie59e0e8c0ef39cb1a28bbc98012fff144e339f84
Signed-off-by: jinbiao <jinbiao.ou@amlogic.com>
2023-10-11 19:38:12 +08:00
qinglin.li b71c32040c user: android R need build user [1/1]
PD#SWPL-131945

Problem:
android R need build user
fix DEBUG_FS use error

Solution:
disabled DEBUG_FS config when build user

Verify:
local

Test:
zcat /proc/config.gz |grep CONFIG_DEBUG_FS

Change-Id: I274d7e29d3c20a9b6f03bc306f8c9fa185b963c5
Signed-off-by: qinglin.li <qinglin.li@amlogic.com>
2023-08-04 00:38:57 -07:00
ziyi 9a299461e1 emmc: delete the extra disable of xtal [1/1]
PD#SWPL-131720

Problem:
there is extra disable of xtal either at
emmc supend(sd unplug) or resume(sd insert).

Solution:
1、set host->src_clk to null so that there's
no extra disable of xtal at resume(sd insert);
2、delete the extra disable of xtal at emmc
supend(sd unplug);

Verify:
t3x

Change-Id: I3f9bd3947b1ee1906a37a0820137f7e763b46d6c
Signed-off-by: ziyi <ziyi.huang@amlogic.com>
2023-07-17 01:42:05 -07:00
ziyi 305ecfbed3 emmc: c1 add hs400 emmc and sdr104 sd and revise mux_div clk rate [1/1]
PD#SWPL-121168

Problem:
C1 5.15 has no hs400 emmc and sdr104 sd;
rate of mux_div clk has changed since uboot but
clk tree not noted;

Solution:
c1 add hs400 emmc and sdr104 sd and revise mux_div clk rate;

Verify:
C1-C308X-AE400

Change-Id: I460163d3b140fa3c4d77c32f6ccc3dfea527f7c1
Signed-off-by: ziyi <ziyi.huang@amlogic.com>
2023-07-07 14:33:12 +08:00
ziyi 105530b2ec emmc: t3x gp0 not disabled after mmc suspend [1/1]
PD#SWPL-129731

Problem:
t3x gp0 not disabled after mmc suspend,
revise sd and sdio src clock rate .

Solution:
revise code

Verify:
t3x

Change-Id: I206ac6e89793f9997c07aa1fbad0e7c555309cb4
Signed-off-by: ziyi <ziyi.huang@amlogic.com>
2023-06-29 06:56:18 -07:00
ziyi f38b40750a emmc: clock is not disabled after suspend [1/1]
PD#SWPL-123245

Problem:
clock is not disabled after suspend

Solution:
revise code

Verify:
t5w

Change-Id: I60c1005e18ad94f685bd71f6b9b6bca2a65ee0df
Signed-off-by: ziyi <ziyi.huang@amlogic.com>
2023-06-26 04:48:07 -07:00
Long 06b239d5e3 eMMC: Adjust the location of the clean interrupt state. [1/1]
PD#SWPL-124598

Problem:
The interrupt status was cleared causing
the system to be blocked

Solution:
Adjust the location of the clean interrupt state

Verify:
T3x

Change-Id: I0f5883abcc3364e714244e882aadbe22452a88f4
Signed-off-by: Long <long.yu@amlogic.com>
2023-06-01 21:38:40 -07:00
Long d6b97e58a7 eMMC: support CQE. [1/2]
PD#SWPL-119703

Problem:
support CQE

Solution:
support CQE

Verify:
T5m

Change-Id: Iaf97dac88e1cafbd8b897506dd044e3a3518a593
Signed-off-by: Long <long.yu@amlogic.com>
2023-05-15 02:04:25 -07:00
Long 4791f52e8a S5: fixed sdcard timing. [1/1]
PD#SWPL-108753

Problem:
rx window compatibility is poor in sdcard sdr104 mode.

Solution:
fixed sdcard sdr104 core_phase

Verify:
S5 ax201

Change-Id: I9c4eb90001803d5dae17c9659fa261a8204e00f3
Signed-off-by: Long <long.yu@amlogic.com>
2023-04-15 08:59:04 +08:00
Long 5ec6ff86a3 sdio: config autoclock for c3. [1/1]
PD#SWPL-115224

Problem:
don't config auto clock

Solution:
config auto clock

Verify:
c3

Change-Id: I5479d9c58e8365655b89d9b98a6213a74002755b
Signed-off-by: Long <long.yu@amlogic.com>
2023-04-10 06:14:03 -07:00
Wanwei Jiang 36a099d6ed mmc: compatible with common14-5.15 [1/1]
PD#SWPL-109858

Problem:
common14-5.15 remove below vendor hooks:
mmc_sd_update_cmdline_timing
mmc_sd_update_dataline_timing

Solution:
compaitible with common14-5.15

Verify:
sc2

Change-Id: If5e10f9ccf668d5b770d47b27f40701e5fc70dce
Signed-off-by: Wanwei Jiang <wanwei.jiang@amlogic.com>
2023-02-23 05:46:27 -08:00
Long Yu 4cc316797b T5M: support eMMC HS400 busmode. [1/1]
PD#SWPL-104756

Problem:
not support eMMC HS400 busmode

Solution:
enable eMMC HS400 busmode

Verify:
ay309

Change-Id: Id21bc37966293406c470b86f058df53ab6c49d8d
Signed-off-by: Long Yu <long.yu@amlogic.com>
2022-12-30 17:18:40 +08:00
Long ff5bbbfd66 sdio: delete init_card function [1/1]
PD#SWPL-105608

Problem:
kasan reports error when retry sdio wifi
host->card point value has been modified

Solution:
delete init_card function

Verify:
sc2

Change-Id: I43bbce34a9d0f815754521fcba34f6d7bb8dbc27
Signed-off-by: Long <long.yu@amlogic.com>
2022-12-26 03:25:09 -08:00
ruixuan.li 57bd21a5fd emmc: self-adaption on s4 revA&B [1/1]
PD#SWPL-104391

Problem:
s4 revA&B share dts but only revB support hs400

Solution:
self-adaption hs400&hs200 on s4 revA&B

Verify:
s4_ap222

Change-Id: I9aafafba15734fe327f93bb3aafdf36d356537b2
Signed-off-by: ruixuan.li <ruixuan.li@amlogic.com>
2022-12-14 08:17:54 -08:00
shufei.zhao deecc3a6ac coverity: kernel5.15 owner ignore [1/1]
PD#SWPL-101826

Problem:
CIDs ignored by the owner need to be commented.

Solution:
Add comment.

Verify:
./scripts/amlogic/coverity_check.sh

Change-Id: I98ce05e6a1e20f6d17bbb5dbab161cc832b4686d
Signed-off-by: shufei.zhao <shufei.zhao@amlogic.com>
2022-12-07 19:16:48 -07:00
ziyi 166e0749ae sd: some sdcard can't be recognized in c3 [1/1]
PD#SWPL-100283

Problem:
some sdcard exist crc error in read

Solution:
adjust enable

Verify:
c3

Change-Id: I9f1f19678f221635052acf995df7f5a252e2b857
Signed-off-by: ziyi <ziyi.huang@amlogic.com>
2022-12-06 07:13:28 -07:00
Rong Chen 94501a169f mmc: crop boot log [1/1]
PD#SWPL-101050

Problem:
too many boot logs

Solution:
reduce boot log

Verify:
sc2

Change-Id: I3e2cf2ecb70acbf3a78fc8b1da59f7f0ab7137a3
Signed-off-by: Rong Chen <rong.chen@amlogic.com>
2022-11-22 20:43:21 -07:00
Long a897bf43a3 sdcard: fixed response mask. [1/1]
PD#SWPL-99224

Problem:
sd controller's response error mask is incompatible

Solution:
fixed response mask

Verify:
C3

Change-Id: I0b48c5ec5cb250829705f4b7393c68c5c30ae245
Signed-off-by: Long <long.yu@amlogic.com>
2022-11-16 05:34:55 -07:00
yao zhang1 37365df098 config: C3 Kernel size optimize. [1/1]
PD#SWPL-95000

Problem:
Kernel size is too big

Solution:
Remove some CONFIGs

Verify:
c3 pass

Signed-off-by: yao zhang1 <yao.zhang1@amlogic.com>
Change-Id: I13303e5e1e967961c6d1cc32a67465c423816276
Signed-off-by: yongbing.he <yongbing.he@amlogic.com>
2022-09-29 19:58:15 +08:00
pengzhao.liu b946ffb848 typo: clear typo problem [1/1]
PD#SWPL-89627

Problem:
clear typo problem

Solution:
clear typo problem

Verify:
s4d

Signed-off-by: pengzhao.liu <pengzhao.liu@amlogic.com>
Change-Id: I9121c9d4b54df9b9a7c244182693e0fd616f5a9e
2022-09-07 20:06:45 +08:00
ziyi 67ceb77964 emmc: prevent retune happened [1/1]
PD#SWPL-92313

Problem:
5.15 not shield the mmc retune code of common dir cause
tuning operation happened when change to rpmb partition
everytime

Solution:
hold retune at the probe time

Verify:
sc2

Change-Id: I12be3f98684abdddfd9ec0194c99a0de931b82cd
Signed-off-by: ziyi <ziyi.huang@amlogic.com>
2022-09-07 20:06:44 +08:00
Rong Chen b2e08f113f sdio: reset SDIO failed with soft [1/1]
PD#SWPL-91297

Problem:
reset sdio the second failed

Solution:
clear the timing status

Verify:
sc2_ah212

Change-Id: Ib4d1fffb6b22bb75f1d508f211b706963e644e5a
Signed-off-by: Rong Chen <rong.chen@amlogic.com>
2022-09-07 20:06:43 +08:00
Rong Chen 5e3ee02786 sdio: limited to 167M [1/1]
PD#SWPL-89453

Problem:
Some are unstable running 200M

Solution:
limited to 167M

Verify:
sc2_ah212

Change-Id: I99e15c4e42ff177e53993822a078434d5202b995
Signed-off-by: Rong Chen <rong.chen@amlogic.com>
2022-09-07 20:06:42 +08:00
ziyi ed5d050858 SC2: support sdio [1/1]
PD#SWPL-84761

Problem:
host hardware not support 1.8V uhs mode

Solution:
delete uhs mode

Verify:
sc2

Change-Id: Ib5da99e1de662ad3b5ac34766557a7c3125f35be
Signed-off-by: ziyi <ziyi.huang@amlogic.com>
2022-09-07 20:06:42 +08:00
ziyi e51f249cdc emmc: sc2 mmc hs400 clk frequent is not right [1/1]
PD#SWPL-84707

Problem:
sc2 should not use 1G hz clk as hs400 src clk

Solution:
revise code ,revise hs400 src clk

Verify:
sc2

Change-Id: I230f8826b80213b8f9c4e7204a87edd38a3b0a95
Signed-off-by: ziyi <ziyi.huang@amlogic.com>
2022-09-07 20:06:42 +08:00
Long 1f25841d8f sdcard : Implement functions to adjust the timing of cmd/data [1/1]
PD#SWPL-91737

Problem:
Google additionally defines two
functions without specific implementation

Solution:
To define two functions

Verify:
C2/C3 sdcard

Change-Id: Id47c292a5ebdcf615d461efb69b3525f73cdf867
Signed-off-by: Long <long.yu@amlogic.com>
2022-08-25 01:10:07 -07:00
Long 1b0b89a1c6 emmc : vendor hook change to timer func [1/1]
PD#SWPL-89620

Problem:
change way to add dtb key device

Solution:
revise code

Verify:
c2 af400

Change-Id: I186fbc477ce9215b8218f54f8a364dd029ea5822
Signed-off-by: Long <long.yu@amlogic.com>
2022-08-15 04:14:12 -07:00
Ruixuan Li fcc9a4cd63 emmc: change sdio/sd/emmc register sequence [1/1]
PD#SWPL-83849

Problem:
emmc index should be 0

Solution:
change sdio/sd/emmc register

Verify:
c3_aw419

Change-Id: I9275e0fe506c8b196f3ba2355ec9ec27917e55e6
(cherry picked from commit 810501bdb17688e618d14b794692661778cbde26)
2022-06-30 18:20:42 +08:00
Ruixuan Li 1577020ef6 emmc: c3 config emmc&sd&sdio in kernel [1/1]
PD#SWPL-83849

Problem:
c3 need sd, emmc and sdio

Solution:
config sd, emmc and sdio

Verify:
c3-aw419

Signed-off-by: Ruixuan Li <ruixuan.li@amlogic.com>
Change-Id: I58b273aff3fd2ed3ba35ef69d3fc9bbd86067293
2022-06-30 18:20:41 +08:00
ziyi 62468cbb1a sd: sd hotplug problem after add regulator in device tree [1/1]
PD#SWPL-80292

Problem:
sd hotplug problem after add regulator in device tree

Solution:
revise code of mmc host and regulator device tree

Verify:
c2-af400

Change-Id: I4364d4680f684d1ed402384f74404922e3254832
Signed-off-by: ziyi <ziyi.huang@amlogic.com>
2022-05-31 14:35:22 +08:00
ziyi c5063c1708 emmc: hs400 clk revise [1/1]
PD#SWPL-80054

Problem:
hs400 timing clk src setting

Solution:
revise code

Verify:
C2

Change-Id: I7c6b3389d2b2f52bb100469b53f972503bb070b0
Signed-off-by: ziyi <ziyi.huang@amlogic.com>
2022-05-31 11:23:13 +08:00
Long db0910b770 a1: enable sdio function. [1/1]
PD#SWPL-77464

Problem:
not support sdio

Solution:
enable sdio interface

Verify:
A1 409

Change-Id: Ie9a282876e200f605aefc01f17ca4c375ab703fd
Signed-off-by: Long <long.yu@amlogic.com>
2022-05-12 00:35:34 -07:00
ziyi 9ec0142cc3 emmc: mmc printk optimization [1/1]
PD#SWPL-75154

Problem:
mmc print too much information

Solution:
revise the code

Verify:
local

Change-Id: Ibfd910011cef36870094ff4e3a9934eaf35b62d3
Signed-off-by: ziyi <ziyi.huang@amlogic.com>
2022-03-23 22:19:38 -07:00
Rong Chen 48bfc73a33 sdio: support sdio reset. [1/1]
PD#SWPL-74441

Problem:
not support sdio reset

Solution:
support reset

Verify:
s4d

Change-Id: Id9f91e492d7394cec0f715c83077e2b7863e53c8
Signed-off-by: Rong Chen <rong.chen@amlogic.com>
2022-03-23 02:13:34 -07:00
ziyi 8880004a08 sd: mmc_gpio definition not consistent arouse crash [1/1]
PD#SWPL-74346

Problem:
mmc_gpio definition not consistent with core files arouse crash.

Solution:
revise mmc_gpio definition and delete related logic.

Verify:
local

Change-Id: Id7d17f8b94cab1730d58283c403d5142658c2a87
Signed-off-by: ziyi <ziyi.huang@amlogic.com>
2022-03-16 04:38:21 -07:00
ziyi 53dcaa7f6d emmc/sd: SD mess with dtbkey arouse crash [1/1]
PD#SWPL-74346

Problem:
SD card mess with dtbkey arouse crash

Solution:
revise the code, sync arm32 dts.

Verify:
local

Change-Id: Ifd378ce0a9423f47d3ffbfa28481e1479b6b8130
Signed-off-by: ziyi <ziyi.huang@amlogic.com>
2022-03-11 00:24:30 -07:00
ziyi 9d10271fc4 emmc: trace can't call function might sleep [2/2]
PD#SWPL-74346

Problem:
trace can't call function might sleep.

Solution:
revise the code.

Verify:
local.

Change-Id: Id9d51bdfa98801565fcd312069674b254ab0f08b
Signed-off-by: ziyi <ziyi.huang@amlogic.com>
2022-03-08 11:28:30 +08:00
ziyi 80f941e1fa emmc&SD: move dtb and key and revise SD CD err [1/2]
PD#SWPL-71939

Problem:
move dtb and key ,revice SD card CD status err.

Solution:
move dtb key
and delete cd_inverted setting

Verify:
Local

Change-Id: I29bf7826e7d87183d83570c24167cd331e54bd1b
Signed-off-by: ziyi <ziyi.huang@amlogic.com>
2022-03-04 01:23:57 -07:00
ziyi a46d66ea37 emmc: 64bit kernel 5.15 C2 (S4d) eMMC high speed(1\1)
PD#SWPL-73048

Problem:
in kernel 5.15,emmc clock is not OK for C2 platform

Solution:
change the clock setting

Verify:
Local

Change-Id: I55820e08e7ba73e1c57e07fa762c237ae5127edb
Signed-off-by: ziyi <ziyi.huang@amlogic.com>
2022-02-24 15:26:01 +08:00
wanwei.jiang 7ef5fd4983 build: directory customization [1/3]
PD#SWPL-72631

Problem:
common, build and common_drivers directories are not under the same directory

Solution:
common, build and common_drivers directories customization

Verify:
s4d and C2 AF400

Change-Id: I8e29737a0a791d58454691e922dda949098595bb
Signed-off-by: wanwei.jiang <wanwei.jiang@amlogic.com>
2022-02-22 11:00:37 +08:00
qinglin.li 7c6316bebd printk : printk optimization [2/2]
PD#SWPL-70486

Problem:
use common tag in driver when printf

Solution:
set common pr_fmt in driver

Verify:
s4d

Signed-off-by: qinglin.li <qinglin.li@amlogic.com>
Change-Id: Ieee271d289e4d2f81258875d36288046b996a5d2
2022-02-14 19:55:32 -07:00
Rong Chen ff1583381f MMC: optimized information print [1/1]
PD#SWPL-68831

Problem:
more information output

Solution:
reduce unnecessary output

Verify:
s4d

Change-Id: Ibe9234b5ca7a7f29e1bc3e39e3c403c6fd90359a
Signed-off-by: Rong Chen <rong.chen@amlogic.com>
2022-01-25 02:28:15 -07:00
Long Yu 0531d3b475 MMC: porting mmc driver [1/1]
PD#SWPL-68831

Problem:
porting mmc driver

Solution:
porting mmc driver

Verify:
s4d

Change-Id: If21f1e1300b1ee8393e24f8bc1f857497a3f975f
Signed-off-by: Rong Chen <rong.chen@amlogic.com>
2022-01-20 22:50:43 -07:00