[PATCH V1] mmc: mediatek: correct the setting of recheck_sdio_irq

2020-11-18 Thread Yong Mao
From: yong mao correct the setting of recheck_sdio_irq for each mediatek SoC. Signed-off-by: Yong Mao --- drivers/mmc/host/mtk-sd.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c index fc5ee5df91ad

[PATCH v2] mmc: mediatek: enable SDIO IRQ low level trigger function

2019-08-28 Thread Yong Mao
In-Reply-To:

[PATCH v2] mmc: mediatek: enable SDIO IRQ low level trigger function

2019-08-28 Thread Yong Mao
From: yong mao SDIO IRQ is not defaultly triggered by low level, but by falling edge. It needs to set related register to enable SDIO IRQ low level trigger function. Otherwise the SDIO IRQ may be lost in some specail condition. Signed-off-by: Yong Mao Signed-off-by: Chaotian Jing --- drivers

[PATCH] mmc: mediatek: enable SDIO IRQ low level trigger function

2019-08-28 Thread Yong Mao
From: yong mao SDIO IRQ is not defaultly triggered by low level, but by falling edge. It needs to set related register to enable SDIO IRQ low level trigger function. Otherwise the SDIO IRQ may be lost in some specail condition. Signed-off-by: Yong Mao Signed-off-by: Chaotian Jing --- drivers

[PATCH v2 2/3] ARM64: dts: mediatek: Enable mmc3 for supporting sdio feature

2017-04-18 Thread Yong Mao
From: yong mao <yong@mediatek.com> Add description of mmc3 for supporting sdio feature Signed-off-by: Yong Mao <yong@mediatek.com> Signed-off-by: Chaotian Jing <chaotian.j...@mediatek.com> --- arch/arm64/boot/dts/mediatek/mt8173-evb.dts | 77 +

[PATCH v2 2/3] ARM64: dts: mediatek: Enable mmc3 for supporting sdio feature

2017-04-18 Thread Yong Mao
From: yong mao Add description of mmc3 for supporting sdio feature Signed-off-by: Yong Mao Signed-off-by: Chaotian Jing --- arch/arm64/boot/dts/mediatek/mt8173-evb.dts | 77 +++ 1 file changed, 77 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8173

[PATCH v2 3/3] mmc: sdio: mediatek: Support SDIO feature

2017-04-18 Thread Yong Mao
From: yong mao <yong@mediatek.com> 1. Add irqlock to protect accessing the shared register 2. Implement enable_sdio_irq interface 3. Add msdc_recheck_sdio_irq mechanism to make sure all interrupts can be processed immediately Signed-off-by: Yong Mao <yong@mediatek.com>

[PATCH v2 3/3] mmc: sdio: mediatek: Support SDIO feature

2017-04-18 Thread Yong Mao
From: yong mao 1. Add irqlock to protect accessing the shared register 2. Implement enable_sdio_irq interface 3. Add msdc_recheck_sdio_irq mechanism to make sure all interrupts can be processed immediately Signed-off-by: Yong Mao Signed-off-by: Chaotian Jing --- drivers/mmc/host/mtk-sd.c

[RESEND v2] mmc: mediatek: Support SDIO feature

2017-04-18 Thread Yong Mao
Documentation/devicetree/bindings/mmc/mtk-sd.txt | 2 + arch/arm64/boot/dts/mediatek/mt8173-evb.dts | 77 ++ drivers/mmc/host/mtk-sd.c| 182 ++- 3 files changed, 222 insertions(+), 39 deletions(-) -- 1.8.1.1.dirty

[RESEND v2] mmc: mediatek: Support SDIO feature

2017-04-18 Thread Yong Mao
Documentation/devicetree/bindings/mmc/mtk-sd.txt | 2 + arch/arm64/boot/dts/mediatek/mt8173-evb.dts | 77 ++ drivers/mmc/host/mtk-sd.c| 182 ++- 3 files changed, 222 insertions(+), 39 deletions(-) -- 1.8.1.1.dirty

[PATCH v2 1/3] mmc: dt-bindings: update Mediatek MMC bindings

2017-04-18 Thread Yong Mao
From: yong mao <yong@mediatek.com> Add description for mediatek,clk-pad-delay Signed-off-by: Yong Mao <yong@mediatek.com> Signed-off-by: Chaotian Jing <chaotian.j...@mediatek.com> --- Documentation/devicetree/bindings/mmc/mtk-sd.txt |2 ++ 1 file changed, 2 inserti

[PATCH v2 1/3] mmc: dt-bindings: update Mediatek MMC bindings

2017-04-18 Thread Yong Mao
From: yong mao Add description for mediatek,clk-pad-delay Signed-off-by: Yong Mao Signed-off-by: Chaotian Jing --- Documentation/devicetree/bindings/mmc/mtk-sd.txt |2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/mmc/mtk-sd.txt b/Documentation

[PATCH v5 2/3] ARM64: dts: mediatek: configure some fixed mmc parameters

2017-03-15 Thread Yong Mao
From: yong mao <yong@mediatek.com> configure some fixed mmc parameters Signed-off-by: Yong Mao <yong@mediatek.com> Signed-off-by: Chaotian Jing <chaotian.j...@mediatek.com> --- arch/arm64/boot/dts/mediatek/mt8173-evb.dts |3 +++ 1 file changed, 3 insertions(+)

[PATCH v5 2/3] ARM64: dts: mediatek: configure some fixed mmc parameters

2017-03-15 Thread Yong Mao
From: yong mao configure some fixed mmc parameters Signed-off-by: Yong Mao Signed-off-by: Chaotian Jing --- arch/arm64/boot/dts/mediatek/mt8173-evb.dts |3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8173-evb.dts b/arch/arm64/boot/dts/mediatek/mt8173

[PATCH v5 1/3] mmc: dt-bindings: update Mediatek MMC bindings

2017-03-15 Thread Yong Mao
From: yong mao <yong@mediatek.com> Add description for mediatek,hs200-cmd-int-delay Add description for mediatek,hs400-cmd-int-delay Add description for mediatek,hs400-cmd-resp-sel-rising Signed-off-by: Yong Mao <yong@mediatek.com> --- Documentation/devicetree/bindings/mm

[PATCH v5 1/3] mmc: dt-bindings: update Mediatek MMC bindings

2017-03-15 Thread Yong Mao
From: yong mao Add description for mediatek,hs200-cmd-int-delay Add description for mediatek,hs400-cmd-int-delay Add description for mediatek,hs400-cmd-resp-sel-rising Signed-off-by: Yong Mao --- Documentation/devicetree/bindings/mmc/mtk-sd.txt | 12 1 file changed, 12

[PATCH v5 0/3] Use data tune for CMD line tune

2017-03-15 Thread Yong Mao
yong mao (3): mmc: dt-bindings: update Mediatek MMC bindings ARM64: dts: mediatek: configure some fixed mmc parameters mmc: mediatek: Use data tune for CMD line tune Documentation/devicetree/bindings/mmc/mtk-sd.txt | 12 ++ arch/arm64/boot/dts/mediatek/mt8173-evb.dts | 3 + drivers

[PATCH v5 3/3] mmc: mediatek: Use data tune for CMD line tune

2017-03-15 Thread Yong Mao
From: yong mao <yong@mediatek.com> If we don't select a set of better parameters for our emmc host, It may easily occur CMD response CRC error. And also it may cause cannot boot up issue. Fot getting a set of better parameters, our emmc host supports data tune mechanism.Therefore, ou

[PATCH v5 0/3] Use data tune for CMD line tune

2017-03-15 Thread Yong Mao
yong mao (3): mmc: dt-bindings: update Mediatek MMC bindings ARM64: dts: mediatek: configure some fixed mmc parameters mmc: mediatek: Use data tune for CMD line tune Documentation/devicetree/bindings/mmc/mtk-sd.txt | 12 ++ arch/arm64/boot/dts/mediatek/mt8173-evb.dts | 3 + drivers

[PATCH v5 3/3] mmc: mediatek: Use data tune for CMD line tune

2017-03-15 Thread Yong Mao
From: yong mao If we don't select a set of better parameters for our emmc host, It may easily occur CMD response CRC error. And also it may cause cannot boot up issue. Fot getting a set of better parameters, our emmc host supports data tune mechanism.Therefore, our emmc driver also should

Re: [PATCH v4 1/3] mmc: dt-bindings: update Mediatek MMC bindings

2017-03-07 Thread Yong Mao
On Fri, 2017-03-03 at 11:49 +0800, Yong Mao wrote: > On Fri, 2017-02-24 at 16:47 -0600, Rob Herring wrote: > > On Fri, Feb 24, 2017 at 3:59 AM, Yong Mao <yong@mediatek.com> wrote: > > > Dear Rob, > > > > > > Could you please help to make comment

Re: [PATCH v4 1/3] mmc: dt-bindings: update Mediatek MMC bindings

2017-03-07 Thread Yong Mao
On Fri, 2017-03-03 at 11:49 +0800, Yong Mao wrote: > On Fri, 2017-02-24 at 16:47 -0600, Rob Herring wrote: > > On Fri, Feb 24, 2017 at 3:59 AM, Yong Mao wrote: > > > Dear Rob, > > > > > > Could you please help to make comments for this patch? > > >

[PATCH v2] mmc: mediatek: Fixed bug where clock frequency could be set wrong

2017-03-03 Thread Yong Mao
yong mao (1): mmc: mediatek: Fixed bug where clock frequency could be set wrong drivers/mmc/host/mtk-sd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 1.8.1.1.dirty

[PATCH v2] mmc: mediatek: Fixed bug where clock frequency could be set wrong

2017-03-03 Thread Yong Mao
yong mao (1): mmc: mediatek: Fixed bug where clock frequency could be set wrong drivers/mmc/host/mtk-sd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 1.8.1.1.dirty

[PATCH] mmc: mediatek: Fixed bug where clock frequency could be set wrong

2017-03-03 Thread Yong Mao
From: yong mao <yong@mediatek.com> This patch can fix two issues: Issue 1: In previous code, div may be overflow when setting clock frequency as f_min. We can use DIV_ROUND_UP to fix this boundary related issue. Issue 2: In previous code, we can not set the correct clock frequency wh

[PATCH] mmc: mediatek: Fixed bug where clock frequency could be set wrong

2017-03-03 Thread Yong Mao
From: yong mao This patch can fix two issues: Issue 1: In previous code, div may be overflow when setting clock frequency as f_min. We can use DIV_ROUND_UP to fix this boundary related issue. Issue 2: In previous code, we can not set the correct clock frequency when div equals 0xff. Signed

Re: [PATCH v1] mmc: mediatek: Fixed bug where clock frequency could be set wrong

2017-03-03 Thread Yong Mao
On Thu, 2017-03-02 at 20:20 +0800, Daniel Kurtz wrote: > On Wed, Mar 1, 2017 at 5:56 PM, Yong Mao <yong@mediatek.com> wrote: > > On Tue, 2017-02-28 at 14:56 +0800, Daniel Kurtz wrote: > >> On Fri, Feb 24, 2017 at 5:38 PM, Yong Mao <yong@mediatek.com> wrote:

Re: [PATCH v1] mmc: mediatek: Fixed bug where clock frequency could be set wrong

2017-03-03 Thread Yong Mao
On Thu, 2017-03-02 at 20:20 +0800, Daniel Kurtz wrote: > On Wed, Mar 1, 2017 at 5:56 PM, Yong Mao wrote: > > On Tue, 2017-02-28 at 14:56 +0800, Daniel Kurtz wrote: > >> On Fri, Feb 24, 2017 at 5:38 PM, Yong Mao wrote: > >> > From: Yong Mao > >>

Re: [PATCH v4 1/3] mmc: dt-bindings: update Mediatek MMC bindings

2017-03-02 Thread Yong Mao
On Fri, 2017-02-24 at 16:47 -0600, Rob Herring wrote: > On Fri, Feb 24, 2017 at 3:59 AM, Yong Mao <yong@mediatek.com> wrote: > > Dear Rob, > > > > Could you please help to make comments for this patch? > > Thanks. > > I already did comment. It's still wr

Re: [PATCH v4 1/3] mmc: dt-bindings: update Mediatek MMC bindings

2017-03-02 Thread Yong Mao
On Fri, 2017-02-24 at 16:47 -0600, Rob Herring wrote: > On Fri, Feb 24, 2017 at 3:59 AM, Yong Mao wrote: > > Dear Rob, > > > > Could you please help to make comments for this patch? > > Thanks. > > I already did comment. It's still wrong as Ulf commented. So fix

Re: [PATCH v1] mmc: mediatek: Fixed bug where clock frequency could be set wrong

2017-03-01 Thread Yong Mao
On Tue, 2017-02-28 at 14:56 +0800, Daniel Kurtz wrote: > On Fri, Feb 24, 2017 at 5:38 PM, Yong Mao <yong@mediatek.com> wrote: > > From: Yong Mao <yong@mediatek.com> > > To: Daniel Kurtz <djku...@chromium.org> > > Subject:Re: [PATCH v

Re: [PATCH v1] mmc: mediatek: Fixed bug where clock frequency could be set wrong

2017-03-01 Thread Yong Mao
On Tue, 2017-02-28 at 14:56 +0800, Daniel Kurtz wrote: > On Fri, Feb 24, 2017 at 5:38 PM, Yong Mao wrote: > > From: Yong Mao > > To: Daniel Kurtz > > Subject:Re: [PATCH v1] mmc: mediatek: Fixed bug where clock > > frequency > > could be set wron

Re: [PATCH v4 1/3] mmc: dt-bindings: update Mediatek MMC bindings

2017-02-24 Thread Yong Mao
Dear Rob, Could you please help to make comments for this patch? Thanks. On Tue, 2017-01-24 at 09:02 +0100, Ulf Hansson wrote: > +Rob, devicetree > > On 21 January 2017 at 09:55, Yong Mao <yong@mediatek.com> wrote: > > From: yong mao <yong@mediatek.com&

Re: [PATCH v4 1/3] mmc: dt-bindings: update Mediatek MMC bindings

2017-02-24 Thread Yong Mao
Dear Rob, Could you please help to make comments for this patch? Thanks. On Tue, 2017-01-24 at 09:02 +0100, Ulf Hansson wrote: > +Rob, devicetree > > On 21 January 2017 at 09:55, Yong Mao wrote: > > From: yong mao > > > > Add description for mediatek,hs200-cmd-in

Re: [PATCH v1] mmc: mediatek: Fixed bug where clock frequency could be set wrong

2017-02-24 Thread Yong Mao
From: Yong Mao <yong@mediatek.com> To: Daniel Kurtz <djku...@chromium.org> Subject:Re: [PATCH v1] mmc: mediatek: Fixed bug where clock frequency could be set wrong Date: Fri, 24 Feb 2017 17:33:37 +0800 On Fri, 2017-02-24 at 17:52 +0900, Daniel Kurtz wrote: >

Re: [PATCH v1] mmc: mediatek: Fixed bug where clock frequency could be set wrong

2017-02-24 Thread Yong Mao
From: Yong Mao To: Daniel Kurtz Subject:Re: [PATCH v1] mmc: mediatek: Fixed bug where clock frequency could be set wrong Date: Fri, 24 Feb 2017 17:33:37 +0800 On Fri, 2017-02-24 at 17:52 +0900, Daniel Kurtz wrote: > On Fri, Feb 24, 2017 at 5:22 PM, Yong Mao wrote: > >

[PATCH v1] Fixed bug where clock frequency could be set wrong

2017-02-24 Thread Yong Mao
yong mao (1): mmc: mediatek: Fixed bug where clock frequency could be set wrong drivers/mmc/host/mtk-sd.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) -- 1.8.1.1.dirty

[PATCH v1] mmc: mediatek: Fixed bug where clock frequency could be set wrong

2017-02-24 Thread Yong Mao
From: yong mao <yong@mediatek.com> This patch can fix two issues: Issue 1: The maximum value of clock divider is 0xff. Because the type of div is u32, div may be larger than max_div. In this case, we should use max_div to set the clock frequency. Issue 2: In previous code, we can n

[PATCH v1] Fixed bug where clock frequency could be set wrong

2017-02-24 Thread Yong Mao
yong mao (1): mmc: mediatek: Fixed bug where clock frequency could be set wrong drivers/mmc/host/mtk-sd.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) -- 1.8.1.1.dirty

[PATCH v1] mmc: mediatek: Fixed bug where clock frequency could be set wrong

2017-02-24 Thread Yong Mao
From: yong mao This patch can fix two issues: Issue 1: The maximum value of clock divider is 0xff. Because the type of div is u32, div may be larger than max_div. In this case, we should use max_div to set the clock frequency. Issue 2: In previous code, we can not set the correct clock

[PATCH v4 1/3] mmc: dt-bindings: update Mediatek MMC bindings

2017-01-21 Thread Yong Mao
From: yong mao <yong@mediatek.com> Add description for mediatek,hs200-cmd-int-delay Add description for mediatek,hs400-cmd-int-delay Add description for mediatek,hs400-cmd-resp-sel-rising Signed-off-by: Yong Mao <yong@mediatek.com> --- Documentation/devicetree/bindings/mm

[PATCH v4 3/3] mmc: mediatek: Use data tune for CMD line tune

2017-01-21 Thread Yong Mao
From: yong mao <yong@mediatek.com> If we don't select a set of better parameters for our emmc host, It may easily occur CMD response CRC error. And also it may cause cannot boot up issue. Fot getting a set of better parameters, our emmc host supports data tune mechanism.Therefore, ou

[PATCH v4 1/3] mmc: dt-bindings: update Mediatek MMC bindings

2017-01-21 Thread Yong Mao
From: yong mao Add description for mediatek,hs200-cmd-int-delay Add description for mediatek,hs400-cmd-int-delay Add description for mediatek,hs400-cmd-resp-sel-rising Signed-off-by: Yong Mao --- Documentation/devicetree/bindings/mmc/mtk-sd.txt | 12 1 file changed, 12

[PATCH v4 3/3] mmc: mediatek: Use data tune for CMD line tune

2017-01-21 Thread Yong Mao
From: yong mao If we don't select a set of better parameters for our emmc host, It may easily occur CMD response CRC error. And also it may cause cannot boot up issue. Fot getting a set of better parameters, our emmc host supports data tune mechanism.Therefore, our emmc driver also should

[PATCH v4 0/3] mmc: mediatek: Use data tune for CMD line tune

2017-01-21 Thread Yong Mao
yong mao (3): mmc: dt-bindings: update Mediatek MMC bindings ARM64: dts: mediatek: configure some fixed mmc parameters mmc: mediatek: Use data tune for CMD line tune Documentation/devicetree/bindings/mmc/mtk-sd.txt | 12 ++ arch/arm64/boot/dts/mediatek/mt8173-evb.dts | 3 + drivers

[PATCH v4 2/3] ARM64: dts: mediatek: configure some fixed mmc parameters

2017-01-21 Thread Yong Mao
From: yong mao <yong@mediatek.com> configure some fixed mmc parameters Signed-off-by: Yong Mao <yong@mediatek.com> Signed-off-by: Chaotian Jing <chaotian.j...@mediatek.com> --- arch/arm64/boot/dts/mediatek/mt8173-evb.dts |3 +++ 1 file changed, 3 insertions(+)

[PATCH v4 0/3] mmc: mediatek: Use data tune for CMD line tune

2017-01-21 Thread Yong Mao
yong mao (3): mmc: dt-bindings: update Mediatek MMC bindings ARM64: dts: mediatek: configure some fixed mmc parameters mmc: mediatek: Use data tune for CMD line tune Documentation/devicetree/bindings/mmc/mtk-sd.txt | 12 ++ arch/arm64/boot/dts/mediatek/mt8173-evb.dts | 3 + drivers

[PATCH v4 2/3] ARM64: dts: mediatek: configure some fixed mmc parameters

2017-01-21 Thread Yong Mao
From: yong mao configure some fixed mmc parameters Signed-off-by: Yong Mao Signed-off-by: Chaotian Jing --- arch/arm64/boot/dts/mediatek/mt8173-evb.dts |3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8173-evb.dts b/arch/arm64/boot/dts/mediatek/mt8173

[PATCH v3 3/3] mmc: mediatek: Use data tune for CMD line tune

2017-01-19 Thread Yong Mao
From: yong mao <yong@mediatek.com> If we don't select a set of better parameters for our emmc host, It may easily occur CMD response CRC error. And also it may cause cannot boot up issue. Fot getting a set of better parameters, our emmc host supports data tune mechanism.Therefore, ou

[PATCH v3 3/3] mmc: mediatek: Use data tune for CMD line tune

2017-01-19 Thread Yong Mao
From: yong mao If we don't select a set of better parameters for our emmc host, It may easily occur CMD response CRC error. And also it may cause cannot boot up issue. Fot getting a set of better parameters, our emmc host supports data tune mechanism.Therefore, our emmc driver also should

[PATCH v3 1/3] mmc: dt-bindings: update Mediatek MMC bindings

2017-01-19 Thread Yong Mao
From: yong mao <yong@mediatek.com> Add description for mtk-hs200-cmd-int-delay Add description for mtk-hs400-cmd-int-delay Add description for mtk-hs400-cmd-resp-sel Signed-off-by: Yong Mao <yong@mediatek.com> --- Documentation/devicetree/bindings/mmc/mtk-sd.txt |9 +

[PATCH v3 1/3] mmc: dt-bindings: update Mediatek MMC bindings

2017-01-19 Thread Yong Mao
From: yong mao Add description for mtk-hs200-cmd-int-delay Add description for mtk-hs400-cmd-int-delay Add description for mtk-hs400-cmd-resp-sel Signed-off-by: Yong Mao --- Documentation/devicetree/bindings/mmc/mtk-sd.txt |9 + 1 file changed, 9 insertions(+) diff --git

[PATCH v3 0/3] mmc: mediatek: Use data tune for CMD line tune

2017-01-19 Thread Yong Mao
yong mao (3): mmc: dt-bindings: update Mediatek MMC bindings dts: mediatek: configure some fixed mmc parameters mmc: mediatek: Use data tune for CMD line tune Documentation/devicetree/bindings/mmc/mtk-sd.txt | 9 ++ arch/arm64/boot/dts/mediatek/mt8173-evb.dts | 3 + drivers/mmc

[PATCH v3 0/3] mmc: mediatek: Use data tune for CMD line tune

2017-01-19 Thread Yong Mao
yong mao (3): mmc: dt-bindings: update Mediatek MMC bindings dts: mediatek: configure some fixed mmc parameters mmc: mediatek: Use data tune for CMD line tune Documentation/devicetree/bindings/mmc/mtk-sd.txt | 9 ++ arch/arm64/boot/dts/mediatek/mt8173-evb.dts | 3 + drivers/mmc

[PATCH v3 2/3] dts: mediatek: configure some fixed mmc parameters

2017-01-19 Thread Yong Mao
From: yong mao <yong@mediatek.com> configure some fixed mmc parameters Signed-off-by: Yong Mao <yong@mediatek.com> Signed-off-by: Chaotian Jing <chaotian.j...@mediatek.com> --- arch/arm64/boot/dts/mediatek/mt8173-evb.dts |3 +++ 1 file changed, 3 insertions(+)

[PATCH v3 2/3] dts: mediatek: configure some fixed mmc parameters

2017-01-19 Thread Yong Mao
From: yong mao configure some fixed mmc parameters Signed-off-by: Yong Mao Signed-off-by: Chaotian Jing --- arch/arm64/boot/dts/mediatek/mt8173-evb.dts |3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8173-evb.dts b/arch/arm64/boot/dts/mediatek/mt8173

[PATCH v2 0/3] mmc: mediatek: Use data tune for CMD line tune

2017-01-17 Thread Yong Mao
yong mao (3): mmc: dt-bindings: update Mediatek MMC bindings dts: mediatek: configure some fixed mmc parameters mmc: mediatek: Use data tune for CMD line tune Documentation/devicetree/bindings/mmc/mtk-sd.txt | 6 + arch/arm64/boot/dts/mediatek/mt8173-evb.dts | 3 + drivers/mmc

[PATCH v2 2/3] dts: mediatek: configure some fixed mmc parameters

2017-01-17 Thread Yong Mao
From: yong mao <yong@mediatek.com> configure some fixed mmc parameters Signed-off-by: Yong Mao <yong@mediatek.com> Signed-off-by: Chaotian Jing <chaotian.j...@mediatek.com> --- arch/arm64/boot/dts/mediatek/mt8173-evb.dts |3 +++ 1 file changed, 3 insertions(+)

[PATCH v2 2/3] dts: mediatek: configure some fixed mmc parameters

2017-01-17 Thread Yong Mao
From: yong mao configure some fixed mmc parameters Signed-off-by: Yong Mao Signed-off-by: Chaotian Jing --- arch/arm64/boot/dts/mediatek/mt8173-evb.dts |3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8173-evb.dts b/arch/arm64/boot/dts/mediatek/mt8173

[PATCH v2 0/3] mmc: mediatek: Use data tune for CMD line tune

2017-01-17 Thread Yong Mao
yong mao (3): mmc: dt-bindings: update Mediatek MMC bindings dts: mediatek: configure some fixed mmc parameters mmc: mediatek: Use data tune for CMD line tune Documentation/devicetree/bindings/mmc/mtk-sd.txt | 6 + arch/arm64/boot/dts/mediatek/mt8173-evb.dts | 3 + drivers/mmc

[PATCH v2 3/3] mmc: mediatek: Use data tune for CMD line tune

2017-01-17 Thread Yong Mao
From: yong mao <yong@mediatek.com> If we don't select a set of better parameters for our emmc host, It may easily occur CMD response CRC error. And also it may cause cannot boot up issue. Fot getting a set of better parameters, our emmc host supports data tune mechanism. Therefore, ou

[PATCH v2 1/3] mmc: dt-bindings: update Mediatek MMC bindings

2017-01-17 Thread Yong Mao
From: yong mao <yong@mediatek.com> Add description for hs200-cmd-int-delay Add description for hs400-cmd-int-delay Add description for cmd-resp-sel Signed-off-by: Yong Mao <yong@mediatek.com> --- Documentation/devicetree/bindings/mmc/mtk-sd.txt |6 ++ 1 fil

[PATCH v2 3/3] mmc: mediatek: Use data tune for CMD line tune

2017-01-17 Thread Yong Mao
From: yong mao If we don't select a set of better parameters for our emmc host, It may easily occur CMD response CRC error. And also it may cause cannot boot up issue. Fot getting a set of better parameters, our emmc host supports data tune mechanism. Therefore, our emmc driver also should

[PATCH v2 1/3] mmc: dt-bindings: update Mediatek MMC bindings

2017-01-17 Thread Yong Mao
From: yong mao Add description for hs200-cmd-int-delay Add description for hs400-cmd-int-delay Add description for cmd-resp-sel Signed-off-by: Yong Mao --- Documentation/devicetree/bindings/mmc/mtk-sd.txt |6 ++ 1 file changed, 6 insertions(+) diff --git a/Documentation/devicetree

Re: [PATCH 1/2] mmc: mediatek: Use data tune for CMD line tune

2017-01-13 Thread Yong Mao
On Thu, 2017-01-12 at 11:39 +0100, Ulf Hansson wrote: > On 12 January 2017 at 11:04, Yong Mao <yong@mediatek.com> wrote: > > From: yong mao <yong@mediatek.com> > > > > CMD response CRC error may cause cannot boot up > > Change to use data tune for C

Re: [PATCH 1/2] mmc: mediatek: Use data tune for CMD line tune

2017-01-13 Thread Yong Mao
On Thu, 2017-01-12 at 11:39 +0100, Ulf Hansson wrote: > On 12 January 2017 at 11:04, Yong Mao wrote: > > From: yong mao > > > > CMD response CRC error may cause cannot boot up > > Change to use data tune for CMD line > > Separate cmd internal delay for HS200/H

[PATCH 1/2] mmc: mediatek: Use data tune for CMD line tune

2017-01-12 Thread Yong Mao
From: yong mao <yong@mediatek.com> CMD response CRC error may cause cannot boot up Change to use data tune for CMD line Separate cmd internal delay for HS200/HS400 mode Signed-off-by: Yong Mao <yong@mediatek.com> Signed-off-by: Chaotian Jing <chaotian.j...@mediatek.com&g

[PATCH 1/2] mmc: mediatek: Use data tune for CMD line tune

2017-01-12 Thread Yong Mao
From: yong mao CMD response CRC error may cause cannot boot up Change to use data tune for CMD line Separate cmd internal delay for HS200/HS400 mode Signed-off-by: Yong Mao Signed-off-by: Chaotian Jing --- arch/arm64/boot/dts/mediatek/mt8173-evb.dts |3 + drivers/mmc/host/mtk-sd.c

[PATCH 2/2] mmc: dt-bindings: update Mediatek MMC bindings

2017-01-12 Thread Yong Mao
From: yong mao <yong@mediatek.com> Add description for hs200-cmd-int-delay Add description for hs400-cmd-int-delay Add description for cmd-resp-sel Signed-off-by: Yong Mao <yong@mediatek.com> --- Documentation/devicetree/bindings/mmc/mtk-sd.txt |6 ++ 1 fil

[PATCH 0/2] Use data tune for CMD line tune

2017-01-12 Thread Yong Mao
CMD response CRC error may cause cannot boot up Change to use data tune for CMD line Separate cmd internal delay for HS200/HS400 mode yong mao (2): mmc: mediatek: Use data tune for CMD line tune mmc: dt-bindings: update Mediatek MMC bindings Documentation/devicetree/bindings/mmc/mtk-sd.txt

[PATCH 2/2] mmc: dt-bindings: update Mediatek MMC bindings

2017-01-12 Thread Yong Mao
From: yong mao Add description for hs200-cmd-int-delay Add description for hs400-cmd-int-delay Add description for cmd-resp-sel Signed-off-by: Yong Mao --- Documentation/devicetree/bindings/mmc/mtk-sd.txt |6 ++ 1 file changed, 6 insertions(+) diff --git a/Documentation/devicetree

[PATCH 0/2] Use data tune for CMD line tune

2017-01-12 Thread Yong Mao
CMD response CRC error may cause cannot boot up Change to use data tune for CMD line Separate cmd internal delay for HS200/HS400 mode yong mao (2): mmc: mediatek: Use data tune for CMD line tune mmc: dt-bindings: update Mediatek MMC bindings Documentation/devicetree/bindings/mmc/mtk-sd.txt

Re: [PATCH 1/4] mmc: mediatek: Fix CMD6 timeout issue

2017-01-03 Thread Yong Mao
On Thu, 2016-12-01 at 10:51 +0100, Ulf Hansson wrote: > On 8 November 2016 at 07:08, Yong Mao <yong@mediatek.com> wrote: > > From: yong mao <yong@mediatek.com> > > > > When initializing EMMC, after switch to HS400, > > it will issue CMD6 to change e

Re: [PATCH 1/4] mmc: mediatek: Fix CMD6 timeout issue

2017-01-03 Thread Yong Mao
On Thu, 2016-12-01 at 10:51 +0100, Ulf Hansson wrote: > On 8 November 2016 at 07:08, Yong Mao wrote: > > From: yong mao > > > > When initializing EMMC, after switch to HS400, > > it will issue CMD6 to change ext_csd, if first CMD6 got CRC > > error, the re

[PATCH v2 2/2] mmc: mediatek: correct the implementation of msdc_card_busy

2017-01-03 Thread Yong Mao
From: yong mao <yong@mediatek.com> msdc_card_busy only need check if the data0 is low. In sdio data1 irq mode, data1 may be low because of interruption. Signed-off-by: Yong Mao <yong@mediatek.com> Signed-off-by: Chaotian Jing <chaotian.j...@mediatek.com> --- drivers

[PATCH v2 2/2] mmc: mediatek: correct the implementation of msdc_card_busy

2017-01-03 Thread Yong Mao
From: yong mao msdc_card_busy only need check if the data0 is low. In sdio data1 irq mode, data1 may be low because of interruption. Signed-off-by: Yong Mao Signed-off-by: Chaotian Jing --- drivers/mmc/host/mtk-sd.c |7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git

[PATCH v2 1/2] mmc: core: Fix CMD6 timeout issue

2017-01-03 Thread Yong Mao
From: yong mao <yong@mediatek.com> When initializing EMMC, after switch to HS400, it will issue CMD6 to change ext_csd, if first CMD6 got CRC error, the repeat CMD6 may get timeout, that's because card is not back to transfer state immediately. For resolving this issue, it need check i

[PATCH v2 1/2] mmc: core: Fix CMD6 timeout issue

2017-01-03 Thread Yong Mao
From: yong mao When initializing EMMC, after switch to HS400, it will issue CMD6 to change ext_csd, if first CMD6 got CRC error, the repeat CMD6 may get timeout, that's because card is not back to transfer state immediately. For resolving this issue, it need check if card is busy before sending

[PATCH v2] Fix CMD6 timeout issue

2017-01-03 Thread Yong Mao
yong mao (2): mmc: core: Fix CMD6 timeout issue mmc: mediatek: correct the implementation of msdc_card_busy drivers/mmc/core/core.c | 19 +++ drivers/mmc/host/mtk-sd.c | 7 ++- 2 files changed, 21 insertions(+), 5 deletions(-) -- 1.8.1.1.dirty

[PATCH v2] Fix CMD6 timeout issue

2017-01-03 Thread Yong Mao
yong mao (2): mmc: core: Fix CMD6 timeout issue mmc: mediatek: correct the implementation of msdc_card_busy drivers/mmc/core/core.c | 19 +++ drivers/mmc/host/mtk-sd.c | 7 ++- 2 files changed, 21 insertions(+), 5 deletions(-) -- 1.8.1.1.dirty

[PATCH 3/4] sdio: mediatek: support sdr104_clk_delay in sdio

2016-11-07 Thread Yong Mao
From: yong mao <yong@mediatek.com> In order to let sdio run stable with 200M clock, we should setup the value of clock delay. Signed-off-by: Yong Mao <yong@mediatek.com> Signed-off-by: Chaotian Jing <chaotian.j...@mediatek.com> --- drivers/mmc/host/mtk-sd.c | 10

[PATCH 2/4] sdio: mediatek: Support sdio feature

2016-11-07 Thread Yong Mao
From: yong mao <yong@mediatek.com> 1. Add irqlock to protect accessing the shared register 2. Modify the implementation of msdc_card_busy due to SDIO 3. Implement enable_sdio_irq 4. Add msdc_recheck_sdio_irq mechanism to make sure all interrupts can be processed immediately Sign

[PATCH 2/4] sdio: mediatek: Support sdio feature

2016-11-07 Thread Yong Mao
From: yong mao 1. Add irqlock to protect accessing the shared register 2. Modify the implementation of msdc_card_busy due to SDIO 3. Implement enable_sdio_irq 4. Add msdc_recheck_sdio_irq mechanism to make sure all interrupts can be processed immediately Signed-off-by: Yong Mao Signed-off

[PATCH 3/4] sdio: mediatek: support sdr104_clk_delay in sdio

2016-11-07 Thread Yong Mao
From: yong mao In order to let sdio run stable with 200M clock, we should setup the value of clock delay. Signed-off-by: Yong Mao Signed-off-by: Chaotian Jing --- drivers/mmc/host/mtk-sd.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/mtk

[PATCH 4/4] dts: arm64: enable mmc3 for supporting sdio feature

2016-11-07 Thread Yong Mao
From: yong mao <yong@mediatek.com> Add description of mmc3 for supporting sdio feature Signed-off-by: Yong Mao <yong@mediatek.com> Signed-off-by: Chaotian Jing <chaotian.j...@mediatek.com> --- arch/arm64/boot/dts/mediatek/mt8173-evb.dts | 82 +

[PATCH 4/4] dts: arm64: enable mmc3 for supporting sdio feature

2016-11-07 Thread Yong Mao
From: yong mao Add description of mmc3 for supporting sdio feature Signed-off-by: Yong Mao Signed-off-by: Chaotian Jing --- arch/arm64/boot/dts/mediatek/mt8173-evb.dts | 82 +++ 1 file changed, 82 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8173

[PATCH 0/4] Support sdio feature

2016-11-07 Thread Yong Mao
Fix CMD6 timeout issue Add irqlock to protect accessing the shared register Modify the implementation of msdc_card_busy Add msdc_recheck_sdio_irq mechanism Support sdr104_clk_delay in sdio Add description of mmc3 for supporting sdio feature yong mao (4): mmc: mediatek: Fix CMD6 timeout issue

[PATCH 1/4] mmc: mediatek: Fix CMD6 timeout issue

2016-11-07 Thread Yong Mao
From: yong mao <yong@mediatek.com> When initializing EMMC, after switch to HS400, it will issue CMD6 to change ext_csd, if first CMD6 got CRC error, the repeat CMD6 may get timeout, that's because SDCBSY was cleared by msdc_reset_hw() Signed-off-by: Yong Mao <yong@mediatek.co

[PATCH 0/4] Support sdio feature

2016-11-07 Thread Yong Mao
Fix CMD6 timeout issue Add irqlock to protect accessing the shared register Modify the implementation of msdc_card_busy Add msdc_recheck_sdio_irq mechanism Support sdr104_clk_delay in sdio Add description of mmc3 for supporting sdio feature yong mao (4): mmc: mediatek: Fix CMD6 timeout issue

[PATCH 1/4] mmc: mediatek: Fix CMD6 timeout issue

2016-11-07 Thread Yong Mao
From: yong mao When initializing EMMC, after switch to HS400, it will issue CMD6 to change ext_csd, if first CMD6 got CRC error, the repeat CMD6 may get timeout, that's because SDCBSY was cleared by msdc_reset_hw() Signed-off-by: Yong Mao Signed-off-by: Chaotian Jing --- drivers/mmc/host/mtk