RE: [v4, 5/6] mmc: kconfig: select FSL_GUTS for MMC_SDHCI_OF_ESDHC

2016-01-05 Thread Yangbo Lu
> -Original Message- > From: Ulf Hansson [mailto:ulf.hans...@linaro.org] > Sent: Monday, December 28, 2015 8:10 PM > To: Yangbo Lu > Cc: Scott Wood; Lu Yangbo-B47093; linux-mmc; Xie Xiaobo-R63061; Leo li > Subject: Re: [v4, 5/6] mmc: kconfig: select FSL_GUTS for &g

RE: [v4, 5/6] mmc: kconfig: select FSL_GUTS for MMC_SDHCI_OF_ESDHC

2016-01-05 Thread Yangbo Lu
> -Original Message- > From: Yangbo Lu > Sent: Wednesday, January 06, 2016 2:58 PM > To: Scott Wood; Ulf Hansson > Cc: Lu Yangbo-B47093; linux-mmc; Xie Xiaobo-R63061; Leo li > Subject: RE: [v4, 5/6] mmc: kconfig: select FSL_GUTS for > MMC_SDHCI_OF_ESDHC > &

RE: [v4, 5/6] mmc: kconfig: select FSL_GUTS for MMC_SDHCI_OF_ESDHC

2016-01-05 Thread Yangbo Lu
> -Original Message- > From: Scott Wood [mailto:scottw...@freescale.com] > Sent: Tuesday, December 29, 2015 2:48 AM > To: Ulf Hansson > Cc: Yangbo Lu; linux-mmc; x@freescale.com; Leo li > Subject: Re: [v4, 5/6] mmc: kconfig: select FSL_GUTS for > MMC_SDHCI_OF_ESDHC

RE: [v4, 5/6] mmc: kconfig: select FSL_GUTS for MMC_SDHCI_OF_ESDHC

2016-01-05 Thread Yangbo Lu
> -Original Message- > From: Scott Wood [mailto:scottw...@freescale.com] > Sent: Tuesday, December 29, 2015 3:10 AM > To: Ulf Hansson; Yangbo Lu > Cc: Lu Yangbo-B47093; linux-mmc; Xie Xiaobo-R63061; Leo li > Subject: Re: [v4, 5/6] mmc: kconfig: select FSL_GUTS for &g

RE: [v4, 5/6] mmc: kconfig: select FSL_GUTS for MMC_SDHCI_OF_ESDHC

2015-12-28 Thread Yangbo Lu
> -Original Message- > From: Ulf Hansson [mailto:ulf.hans...@linaro.org] > Sent: Thursday, December 17, 2015 7:31 PM > To: Scott Wood > Cc: Lu Yangbo-B47093; linux-mmc; Xie Xiaobo-R63061; Leo li > Subject: Re: [v4, 5/6] mmc: kconfig: select FSL_GUTS for > MMC_SDHCI_OF_ESDHC > > [...] > >

[v4, 3/6] powerpc/fsl: move mpc85xx.h to include/linux

2015-12-13 Thread Yangbo Lu
Move mpc85xx.h to include/linux and rename it to svr.h as a common header file. It has been used for mpc85xx and it will be used for ARM-based SoC as well. Signed-off-by: Yangbo Lu --- Changes for v2: - None Changes for v3: - None Changes for v4: - None --- drivers/clk

[v4, 1/6] soc: fsl: add GUTS driver for QorIQ platforms

2015-12-13 Thread Yangbo Lu
The global utilities block controls power management, I/O device enabling, power-onreset(POR) configuration monitoring, alternate function selection for multiplexed signals,and clock control. This patch adds GUTS driver to manage and access global utilities block. Signed-off-by: Yangbo Lu

[v4, 4/6] mmc: sdhci-of-esdhc: get SVR from global utilities registers

2015-12-13 Thread Yangbo Lu
Most of silicon errata about the eSDHC need to be identified through the SoC version/revision. This patch makes the driver get these information from SVR(system version register) of global utilities registers. Signed-off-by: Yangbo Lu --- Changes for v2: - Got SVR through iomap instead

[v4, 6/6] mmc: sdhci-of-esdhc: fix host version for T4240-R1.0-R2.0

2015-12-13 Thread Yangbo Lu
The eSDHC of T4240-R1.0-R2.0 has incorrect vender version and spec version. Acturally, the right version numbers should be VVN=0x13 and SVN = 0x1. So, fix it in driver to avoid that incorrect version numbers break down the ADMA data transfer. Signed-off-by: Yangbo Lu --- Changes for v2

[v4, 0/6] eSDHC patches introduction

2015-12-13 Thread Yangbo Lu
GUTS driver support to get SVR in eSDHC driver. The last patch is to fix host version for T4240. Yangbo Lu (6): soc: fsl: add GUTS driver for QorIQ platforms dt: move guts devicetree doc out of powerpc directory powerpc/fsl: move mpc85xx.h to include/linux mmc: sdhci-of-esdhc: get SVR from g

[v4, 5/6] mmc: kconfig: select FSL_GUTS for MMC_SDHCI_OF_ESDHC

2015-12-13 Thread Yangbo Lu
The sdhci-of-esdhc driver needs the GUTS driver support to access the global utilities registers for SVR value. So we select FSL_GUTS for MMC_SDHCI_OF_ESDHC here. Signed-off-by: Yangbo Lu --- Changes for v2: - None Changes for v3: - None Changes for v4: - Added this patch

[v4, 2/6] dt: move guts devicetree doc out of powerpc directory

2015-12-13 Thread Yangbo Lu
Move guts devicetree doc to Documentation/devicetree/bindings/soc/ since it's used by not only PowerPC but also ARM. Add a specification for 'little-endian' property. Signed-off-by: Yangbo Lu --- Changes for v2: - None Changes for v3: - None Changes for v4:

[v3, 2/5] mmc: sdhci-of-esdhc: get SVR from global utilities registers

2015-11-26 Thread Yangbo Lu
Most of silicon errata about the eSDHC need to be identified through the SoC version/revision. This patch makes the driver get these information from SVR(system version register) of global utilities registers. Signed-off-by: Yangbo Lu --- Changes for v2: - Got SVR through iomap instead

[v3, 4/5] powerpc: dts: t4240: add syscon support for DCFG node

2015-11-26 Thread Yangbo Lu
Add syscon support for DCFG node, so that the driver could use syscon regmap interface to access the device config module registers. And the CONFIG_MFD_SYSCON should be enabled for this. Signed-off-by: Yangbo Lu --- Changes for v2: - None Changes for v3: - Added this patch

[v3, 0/5] eSDHC patches introduction

2015-11-26 Thread Yangbo Lu
rt to access SVR. The following two patches are to fix host version for T4240. Yangbo Lu (5): powerpc/fsl: move mpc85xx.h to include/linux mmc: sdhci-of-esdhc: get SVR from global utilities registers mmc: kconfig: select MFD_SYSCON for MMC_SDHCI_OF_ESDHC powerpc: dts: t4240: add syscon su

[v3, 3/5] mmc: kconfig: select MFD_SYSCON for MMC_SDHCI_OF_ESDHC

2015-11-26 Thread Yangbo Lu
The sdhci-of-esdhc driver needs the syscon support to do regmap and access the global utilities registers. So we select MFD_SYSCON for MMC_SDHCI_OF_ESDHC here. Signed-off-by: Yangbo Lu --- Changes for v2: - None Changes for v3: - Added this patch --- drivers/mmc/host/Kconfig | 1

[v3, 5/5] mmc: sdhci-of-esdhc: fix host version for T4240-R1.0-R2.0

2015-11-26 Thread Yangbo Lu
The eSDHC of T4240-R1.0-R2.0 has incorrect vender version and spec version. Acturally, the right version numbers should be VVN=0x13 and SVN = 0x1. So, fix it in driver to avoid that incorrect version numbers break down the ADMA data transfer. Signed-off-by: Yangbo Lu --- Changes for v2

[v3, 1/5] powerpc/fsl: move mpc85xx.h to include/linux

2015-11-26 Thread Yangbo Lu
Move mpc85xx.h to include/linux and rename it to fsl-svr.h as a common header file. It has been used for mpc85xx and it will be used for ARM-based SoC as well. Signed-off-by: Yangbo Lu --- Changes for v2: - None Changes for v3: - Added this patch --- arch/powerpc/include/asm

[PATCH] mmc: sdhci-of-esdhc: add/remove some quirks according to vendor version

2015-11-24 Thread Yangbo Lu
if (vvn == VENDOR_V_22) host->quirks2 |= SDHCI_QUIRK2_HOST_NO_CMD23; if (vvn > VENDOR_V_22) host->quirks &= ~SDHCI_QUIRK_NO_BUSY_IRQ; } This patch is used to fix it by add/remove some quirks according to verdor version in probe. Signe

[PATCH] mmc: sdhci-of-esdhc: avoid writing power control register

2015-10-16 Thread Yangbo Lu
The eSDHC doesn't have a standard power control register, so when writing this register in stack we should do nothing to avoid incorrect operation. Signed-off-by: Yangbo Lu --- drivers/mmc/host/sdhci-of-esdhc.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/mmc/host/sdh

[v6, 4/4] mmc: sdhci-of-esdhc: add quirk SDHCI_QUIRK_BROKEN_TIMEOUT_VAL for ls1021a

2015-10-08 Thread Yangbo Lu
Signed-off-by: Yangbo Lu --- Changes for v5: - Added this quirk patch Changes for v6: None --- drivers/mmc/host/sdhci-of-esdhc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/mmc/host/sdhci-of-esdhc.c b/drivers/mmc/host/sdhci-of-esdhc.c index 910838f..7b9282b 100644

[v6, 2/4] mmc: sdhci-of-esdhc: support both BE and LE host controller

2015-10-08 Thread Yangbo Lu
To support little endian eSDHC controller, we redefine both BE and LE IO accessors. In the new accessors, use ioread*/iowrite* instead of in_be32/out_be32 and will select accessors according to endian mode in probe function. Signed-off-by: Yangbo Lu --- Changes for v2: - Split v1 patches

[v6, 1/4] mmc: dt: add DT binding for little-endian eSDHC host controller

2015-10-08 Thread Yangbo Lu
Signed-off-by: Yangbo Lu --- Changes for v4: - Added this mmc DT documentation patch Changes for v5: - Updated DT documentation fsl-esdhc.txt instead of mmc.txt - Used 'big-endian' as default endian mode Changes for v6: None --- Documentation/devicetree/bindin

[v6, 3/4] mmc: kconfig: reconfigure MMC_SDHCI_OF_ESDHC option

2015-10-08 Thread Yangbo Lu
Freescale eSDHC driver now supports both little-endian and big-endian mode eSDHC IPs for ARM and PPC. So, MMC_SDHCI_OF_ESDHC option needs to be reconfigured. Signed-off-by: Yangbo Lu --- Changes for v5: - Added this Kconfig patch Changes for v6: None --- drivers/mmc/host/Kconfig | 6

[v5, 4/4] mmc: sdhci-of-esdhc: add quirk SDHCI_QUIRK_BROKEN_TIMEOUT_VAL for ls1021a

2015-09-27 Thread Yangbo Lu
Signed-off-by: Yangbo Lu --- drivers/mmc/host/sdhci-of-esdhc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/mmc/host/sdhci-of-esdhc.c b/drivers/mmc/host/sdhci-of-esdhc.c index 5315864..5ddcfc8 100644 --- a/drivers/mmc/host/sdhci-of-esdhc.c +++ b/drivers/mmc/host/sdhci-of

[v5, 3/4] mmc: kconfig: reconfigure MMC_SDHCI_OF_ESDHC option

2015-09-27 Thread Yangbo Lu
Freescale eSDHC driver now supports both little-endian and big-endian mode eSDHC IPs for ARM and PPC. So, MMC_SDHCI_OF_ESDHC option needs to be reconfigured. Signed-off-by: Yangbo Lu --- drivers/mmc/host/Kconfig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers

[v5, 1/4] mmc: dt: add DT binding for little-endian eSDHC host controller

2015-09-27 Thread Yangbo Lu
Signed-off-by: Yangbo Lu --- Changes for v5: - Redefined io accessors for both BE and LE eSDHC Changes for v4: - Moved endian mode checking back to sdhci-pltfm driver Changes for v3: - Moved endian mode checking to generic mmc host driver --- Documentation/devicetree

[v5, 2/4] mmc: sdhci-of-esdhc: support both BE and LE host controller

2015-09-27 Thread Yangbo Lu
To support little endian eSDHC controller, we redefine both BE and LE IO accessors. In the new accessors, use ioread*/iowrite* instead of in_be32/out_be32 and will select accessors according to endian mode in probe function. Signed-off-by: Yangbo Lu --- drivers/mmc/host/sdhci-esdhc.h| 2

[v2, 7/8] mmc: sd: set 4bit bus width after IO signal voltage switching

2015-09-16 Thread Yangbo Lu
IO signal voltage switching is used for UHS speed mode. After the voltage switching, the card is in UHS mode and it's needed to set 4bit bus width before any data transfer command. Signed-off-by: Yangbo Lu --- drivers/mmc/core/sd.c | 9 + 1 file changed, 9 insertions(+) diff --

[v2, 8/8] mmc: sdhci-of-esdhc: add SDR50 mode support for SD/MMC Legacy Adapter Card

2015-09-16 Thread Yangbo Lu
efore executing tuning procedure, eSDHC should set its own tuning block. static const struct sdhci_ops sdhci_esdhc_ops = { ... .set_tuning_block = esdhc_set_tuning_block, .signal_voltage_switch = esdhc_signal_voltage_switch, }; Signed-off-by: Yangbo Lu --- drivers/mmc/host/

[v2, 6/8] mmc: sdhci-of-esdhc: add tuning cycles delay quirk for t2080/t1040

2015-09-16 Thread Yangbo Lu
Signed-off-by: Yangbo Lu --- drivers/mmc/host/sdhci-of-esdhc.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/mmc/host/sdhci-of-esdhc.c b/drivers/mmc/host/sdhci-of-esdhc.c index bffc8c4..5aabadf 100644 --- a/drivers/mmc/host/sdhci-of-esdhc.c +++ b/drivers/mmc/host/sdhci-of

[v2, 4/8] mmc: sdhci-of-esdhc: add eMMC Adapter Card HS200 mode support

2015-09-16 Thread Yangbo Lu
Present*/ Signed-off-by: Yangbo Lu --- drivers/mmc/host/sdhci-esdhc.h| 22 drivers/mmc/host/sdhci-of-esdhc.c | 116 +- 2 files changed, 136 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/sdhci-esdhc.h b/drivers/mmc/host/sdhci

[v2, 1/8] mmc: sdhci: add a callback of signal voltage switching

2015-09-16 Thread Yangbo Lu
Add a signal voltage switching callback to let host use its own switching process. Signed-off-by: Yangbo Lu --- Changes for v2: - Modified commit message - Added SDR50 support patches --- drivers/mmc/host/sdhci.c | 5 + drivers/mmc/host/sdhci.h | 2 ++ 2 files changed, 7

[v2, 2/8] mmc: sdhci: add a callback of tuning block setting

2015-09-16 Thread Yangbo Lu
Add a tuning block setting callback to let host set its tuning block before executing tuning procedure. Signed-off-by: Yangbo Lu --- drivers/mmc/host/sdhci.c | 3 +++ drivers/mmc/host/sdhci.h | 1 + 2 files changed, 4 insertions(+) diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host

[v2, 5/8] mmc: sdhci: add SDHCI_QUIRK2_DELAY_BETWEEN_TUNING_CYCLES quirk

2015-09-16 Thread Yangbo Lu
Although eMMC spec does not require a delay between tuning cycles, some hosts need it to avoid tuning failure. Signed-off-by: Yangbo Lu --- drivers/mmc/host/sdhci.c | 3 ++- drivers/mmc/host/sdhci.h | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci.c b

[v2, 3/8] mmc: dt: add DT bindings for Freescale eSDHC

2015-09-16 Thread Yangbo Lu
Document Freescale eSDHC 'adapter-type' and 'peripheral-frequency' properties. Signed-off-by: Yangbo Lu --- Documentation/devicetree/bindings/mmc/fsl-esdhc.txt | 12 1 file changed, 12 insertions(+) diff --git a/Documentation/devicetree/bindings/mmc/fsl-esdhc.

[v2] mmc: sdhci-pltfm: enable interrupt mode to detect card for ls1021a

2015-09-15 Thread Yangbo Lu
Enable interrupt mode to detect card instead of polling mode for ls1021a by removing the quirk SDHCI_QUIRK_BROKEN_CARD_DETECTION. This could improve data transferring performance and avoid the call trace caused by polling card status sometime. Signed-off-by: Yangbo Lu --- Changes for v2

[PATCH] mmc: sdhci-pltfm: enable interrupt mode to detect card

2015-09-15 Thread Yangbo Lu
Enable interrupt mode to detect card instead of polling mode for ls1021a by removing the quirk SDHCI_QUIRK_BROKEN_CARD_DETECTION. This could improve data transferring performance and avoid the call trace caused by polling card status sometime. Signed-off-by: Yangbo Lu --- drivers/mmc/host/sdhci

[PATCH 3/6] mmc: dt: add DT bindings for Freescale eSDHC

2015-09-14 Thread Yangbo Lu
Document Freescale eSDHC 'adapter-type' and 'peripheral-frequency' properties. Signed-off-by: Yangbo Lu --- Documentation/devicetree/bindings/mmc/fsl-esdhc.txt | 12 1 file changed, 12 insertions(+) diff --git a/Documentation/devicetree/bindings/mmc/fsl-esdhc.

[PATCH 4/6] mmc: sdhci-of-esdhc: add eMMC HS200 mode support

2015-09-14 Thread Yangbo Lu
Present*/ Signed-off-by: Yangbo Lu --- drivers/mmc/host/sdhci-esdhc.h| 22 drivers/mmc/host/sdhci-of-esdhc.c | 116 +- 2 files changed, 136 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/sdhci-esdhc.h b/drivers/mmc/host/sdhci

[PATCH 6/6] mmc: sdhci-of-esdhc: add tuning cycles delay quirk for t2080/t1040

2015-09-14 Thread Yangbo Lu
Signed-off-by: Yangbo Lu --- drivers/mmc/host/sdhci-of-esdhc.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/mmc/host/sdhci-of-esdhc.c b/drivers/mmc/host/sdhci-of-esdhc.c index 57e1e8b..46efa05 100644 --- a/drivers/mmc/host/sdhci-of-esdhc.c +++ b/drivers/mmc/host/sdhci-of

[PATCH 5/6] mmc: sdhci: add SDHCI_QUIRK2_DELAY_BETWEEN_TUNING_CYCLES quirk

2015-09-14 Thread Yangbo Lu
Although eMMC spec does not require a delay between tuning cycles, some hosts need it to avoid tuning failure. Signed-off-by: Yangbo Lu --- drivers/mmc/host/sdhci.c | 3 ++- drivers/mmc/host/sdhci.h | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci.c b

[PATCH 1/6] mmc: sdhci: add a callback of signal voltage switching

2015-09-14 Thread Yangbo Lu
Add a signal voltage switching callback to let host use its own switching process. Signed-off-by: Yangbo Lu --- drivers/mmc/host/sdhci.c | 5 + drivers/mmc/host/sdhci.h | 2 ++ 2 files changed, 7 insertions(+) diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 64b7fdb

[PATCH 2/6] mmc: sdhci: add a callback of tuning block setting

2015-09-14 Thread Yangbo Lu
Add a tuning block setting callback to let host set its tuning block before executing tuning procedure. Signed-off-by: Yangbo Lu --- drivers/mmc/host/sdhci.c | 3 +++ drivers/mmc/host/sdhci.h | 1 + 2 files changed, 4 insertions(+) diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host

[v2, 3/3] mmc: sdhci-of-esdhc: add workaround for T4240 incorrect HOSTVER value

2015-08-27 Thread Yangbo Lu
For T4240-R1.0-R2.0, the HOSTVER register has incorrcet vender version value and sdhc spec version value. This will break down the ADMA data transfer. So add workaround to get right value VVN=0x13, SVN = 0x1. Signed-off-by: Yangbo Lu --- drivers/mmc/host/sdhci-of-esdhc.c | 8 1 file

[v2, 2/3] mmc: sdhci-of-esdhc: get SOC version and revision from GUTS_SVR

2015-08-27 Thread Yangbo Lu
Freescale QorIQ SOCs have the SVR(System version register) containing the system version number for the device. Sometimes the eSDHC driver needs to know this information for some errata workaround. So, we read SVR from the global utilities block of the chip. Signed-off-by: Yangbo Lu --- drivers

[v2, 1/3] mmc: sdhci-of-esdhc: convert to use esdhc_get_property()

2015-08-27 Thread Yangbo Lu
Move getting property code from sdhci_esdhc_probe() into esdhc_get_property(). Signed-off-by: Yangbo Lu --- Changes for v2: - get SVR from GUTS block instead of dts --- drivers/mmc/host/sdhci-of-esdhc.c | 31 +-- 1 file changed, 17 insertions(+), 14 deletions

[PATCH v2] mmc: sdhci-of-esdhc: add workaround for pre divider initial value

2015-08-10 Thread Yangbo Lu
For eSDHC(version < 2.3), the pre divider only could divide base clock by 2 at least. Add workaround for this to avoid unexpected issue. Signed-off-by: Yangbo Lu --- drivers/mmc/host/sdhci-of-esdhc.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/mmc/host/sdhci-of-esdhc.c

[PATCH] mmc: sdhci-of-esdhc: add workaround for pre divider initial value

2015-08-06 Thread Yangbo Lu
For eSDHC(version < 2.3), the pre divider only could divide base clock by 2 at least. Add workaround for this to avoid unexpected issue. Signed-off-by: Yangbo Lu --- drivers/mmc/host/sdhci-of-esdhc.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/mmc/host/sdhci-of-esdhc.c

[v4, 6/6] mmc: esdhc: add eMMC DDR mode support

2015-07-30 Thread Yangbo Lu
Add eMMC DDR mode support for Freescale SDHC adapter card. The u-boot should provide device tree properties 'adapter-type' and 'periperal-frequency' for this feature, if not, the card would not use DDR mode. Signed-off-by: Yangbo Lu --- drivers/mmc/host/sdhci-esdhc.h|

[v4, 5/6] powerpc/85xx: specify 'big-endian' property for eSDHC in dts

2015-07-30 Thread Yangbo Lu
Signed-off-by: Yangbo Lu --- arch/powerpc/boot/dts/fsl/pq3-esdhc-0.dtsi | 1 + arch/powerpc/boot/dts/fsl/qoriq-esdhc-0.dtsi | 1 + 2 files changed, 2 insertions(+) diff --git a/arch/powerpc/boot/dts/fsl/pq3-esdhc-0.dtsi b/arch/powerpc/boot/dts/fsl/pq3-esdhc-0.dtsi index 5743433..57f519e

[v4, 4/6] mmc: sdhci: apply little-endian mode support to sdhci-of-esdhc

2015-07-30 Thread Yangbo Lu
Signed-off-by: Yangbo Lu --- drivers/mmc/host/sdhci-of-esdhc.c | 105 +- 1 file changed, 69 insertions(+), 36 deletions(-) diff --git a/drivers/mmc/host/sdhci-of-esdhc.c b/drivers/mmc/host/sdhci-of-esdhc.c index 797be75..f1021d8 100644 --- a/drivers/mmc/host

[v4, 2/6] mmc: sdhci-pltfm: add little-endian mode support for SDHCI platform

2015-07-30 Thread Yangbo Lu
This patch adds little-endian mode support for little-endian host controller. To indicate the little-endian mode, we could add 'little-endian' property in device tree node. Signed-off-by: Yangbo Lu --- Changes for v4: - Moved endian mode checking back to sdhci-pltfm driver Chan

[v4, 3/6] mmc: sdhci: apply little-endian mode support to sdhci-of-hwld

2015-07-30 Thread Yangbo Lu
Signed-off-by: Yangbo Lu --- drivers/mmc/host/sdhci-of-hlwd.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/mmc/host/sdhci-of-hlwd.c b/drivers/mmc/host/sdhci-of-hlwd.c index 4079a96..83d8149 100644 --- a/drivers/mmc/host/sdhci-of-hlwd.c +++ b/drivers

[v4, 1/6] mmc: dt: add DT binding for big endian controller

2015-07-30 Thread Yangbo Lu
Add specification of 'big-endian' property. if the controller is big endian mode, specify this property in device tree node. The default endian mode is little endian. Signed-off-by: Yangbo Lu --- Documentation/devicetree/bindings/mmc/mmc.txt | 2 ++ 1 file changed, 2 insertions(+) di

[PATCH 1/3] mmc: sdhci-of-esdhc: convert to use esdhc_get_property()

2015-07-21 Thread Yangbo Lu
Move sdhci_get_of_property and other getting property code from sdhci_esdhc_probe into esdhc_get_property. Signed-off-by: Yangbo Lu --- drivers/mmc/host/sdhci-of-esdhc.c | 31 +-- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/drivers/mmc/host/sdhci

[PATCH 2/3] powerpc/85xx: add 'cpu-rev' property for cpus node

2015-07-21 Thread Yangbo Lu
Add 'cpu-rev' property for cpus node to support getting cpu revision from dts, since it's not good to get cpu revision using powerpc specific function(like SVR_REV()) in common drivers. Signed-off-by: Yangbo Lu --- arch/powerpc/platforms/85xx/common.

[PATCH 3/3] mmc: sdhci-of-esdhc: add workaround for T4240 incorrect HOSTVER value

2015-07-21 Thread Yangbo Lu
For T4240-R1.0-R2.0, the HOSTVER register has incorrcet vender version value and sdhc spec version value. This will break down the ADMA data transfer. So add workaround to get right value VVN=0x13, SVN = 0x1. Signed-off-by: Yangbo Lu --- drivers/mmc/host/sdhci-esdhc.h| 5 + drivers/mmc

[PATCH] mmc: bus: check suspend/resume hooks for bus_ops before calling

2015-07-10 Thread Yangbo Lu
It needs to check suspend/resume hooks before calling them to avoid call trace during hibernation. Signed-off-by: Yangbo Lu --- drivers/mmc/core/bus.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/drivers/mmc/core/bus.c b/drivers/mmc/core/bus.c index 972ff84

[PATCH] mmc: sdio: avoid using NULL sdio_irq_thread pointer

2015-07-09 Thread Yangbo Lu
hread pointer. Signed-off-by: Yangbo Lu --- include/linux/mmc/host.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index 1369e54..83b81fd 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h @@ -412,7 +

[PATCH] mmc: block: add fixup of broken CMD23 for Sandisk card

2015-07-09 Thread Yangbo Lu
g SET_BLOCK_COUNT command, card status 0x400900 mmcblk0: timed out sending SET_BLOCK_COUNT command, card status 0x400900 end_request: I/O error, dev mmcblk0, sector 0 Buffer I/O error on device mmcblk0, logical block 0 mmcblk0: timed out sending SET_BLOCK_COUNT command, card status 0x400900

[PATCH] mmc: sdhci-esdhc: add default quirk SDHCI_QUIRK_NO_HISPD_BIT

2015-07-09 Thread Yangbo Lu
eSDHC supports high speed mode, but has no enabling bit for it. Add this quirk to avoid writing to eSDHC_PROCTL[DTW] by mistake. Signed-off-by: Yangbo Lu --- drivers/mmc/host/sdhci-esdhc.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci-esdhc.h b

[PATCH] mmc: sdhci-pltfm: add broken ADMA quirk for T4240 board

2015-07-09 Thread Yangbo Lu
eMMC build-in on T4240 board can't work when using ADMA to transfer data, but SDHC card could work well. No erratum provided, use SDMA instead to get it to work first. Signed-off-by: Yangbo Lu --- drivers/mmc/host/sdhci-pltfm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/driver

[PATCH 2/2] mmc: esdhc: add quirk to support 3.3v for T4240

2015-06-02 Thread Yangbo Lu
Add SDHCI_QUIRK2_CIRCUIT_SUPPORT_VS33 for T4240 Signed-off-by: Yangbo Lu --- drivers/mmc/host/sdhci-of-esdhc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/mmc/host/sdhci-of-esdhc.c b/drivers/mmc/host/sdhci-of-esdhc.c index 22e9111..4f5fe42 100644 --- a/drivers/mmc/host/sdhci

[PATCH 1/2] mmc: sdhci: add SDHCI_QUIRK2_CIRCUIT_SUPPORT_VS33 quirk support

2015-06-02 Thread Yangbo Lu
This quirk is used for controllers that can only support 1.8V voltage but the peripheral hardware circuit has capability to support 3.3V voltage. Signed-off-by: Yangbo Lu --- drivers/mmc/host/sdhci.c | 3 +++ drivers/mmc/host/sdhci.h | 4 2 files changed, 7 insertions(+) diff --git a

[PATCH v3] mmc: sdhci-pltfm: enable interrupt mode to detect card

2015-05-31 Thread Yangbo Lu
Enable interrupt mode to detect card instead of polling mode for P1020/P4080/P5020/P5040/T1040 by removing the quirk SDHCI_QUIRK_BROKEN_CARD_DETECTION. This could improve data transferring performance and avoid the call trace caused by polling card status sometime. Signed-off-by: Yangbo Lu

[v2, 4/4] mmc: esdhc: add eMMC DDR mode support

2015-04-14 Thread Yangbo Lu
Add eMMC DDR mode support for Freescale SDHC adapter card. The u-boot should provide device tree properties 'adapter-type' and 'periperal-frequency' for this feature, if not, the card would not use DDR mode. Signed-off-by: Yangbo Lu --- drivers/mmc/host/sdhci-esdhc.h|

[v2, 3/4] mmc: sdhci: apply little-endian mode support to sdhci-of-esdhc

2015-04-14 Thread Yangbo Lu
Signed-off-by: Yangbo Lu --- drivers/mmc/host/sdhci-of-esdhc.c | 105 +- 1 file changed, 69 insertions(+), 36 deletions(-) diff --git a/drivers/mmc/host/sdhci-of-esdhc.c b/drivers/mmc/host/sdhci-of-esdhc.c index 22e9111..858d65d 100644 --- a/drivers/mmc/host

[v2, 2/4] mmc: sdhci: apply little-endian mode support to sdhci-of-hwld

2015-04-14 Thread Yangbo Lu
Signed-off-by: Yangbo Lu --- drivers/mmc/host/sdhci-of-hlwd.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/mmc/host/sdhci-of-hlwd.c b/drivers/mmc/host/sdhci-of-hlwd.c index 4079a96..83d8149 100644 --- a/drivers/mmc/host/sdhci-of-hlwd.c +++ b/drivers

[v2, 1/4] mmc: sdhci-pltfm: add little-endian mode support for SDHCI platform

2015-04-14 Thread Yangbo Lu
This patch adds little-endian mode support for little-endian host controller. To indicate the little-endian mode, we could add 'little-endian' property in device tree node. Signed-off-by: Yangbo Lu --- drivers/mmc/host/sdhci-pltfm.c | 12 ++- drivers/mmc/host/sdhci-pl

[PATCH 2/2] mmc: esdhc: add eMMC DDR mode support

2015-03-27 Thread Yangbo Lu
Add eMMC DDR mode support for Freescale SDHC adapter card. The u-boot should provide device tree properties 'adapter-type' and 'periperal-frequency' for this feature, if not, the card would choose other mode instead of DDR. Signed-off-by: Yangbo Lu --- drivers/mmc/host/sd

[PATCH 1/2] mmc: esdhc: add eSDHC little-endian mode support

2015-03-27 Thread Yangbo Lu
This patch is to support little-endian mode for ARM eSDHC that has the same IP block with PowerPC but has different endian mode. Signed-off-by: Yangbo Lu --- drivers/mmc/host/sdhci-of-esdhc.c | 105 +- drivers/mmc/host/sdhci-of-hlwd.c | 12 ++--- drivers