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

2015-12-28 Thread Scott Wood
On Thu, 2015-12-17 at 12:25 +0100, Ulf Hansson wrote: > On 16 December 2015 at 23:48, Scott Wood <scottw...@freescale.com> wrote: > > On Tue, 2015-12-15 at 10:46 +0100, Ulf Hansson wrote: > > > [...] > > > > > > --- a/drivers/mmc/host/Kconfig

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

2015-12-28 Thread Scott Wood
On Thu, 2015-12-17 at 12:30 +0100, Ulf Hansson wrote: > [...] > > > > > > > And I think stubs for reading SVR is quite a bad idea. It'll make the > > > driver > > > build but it will silently not be able to apply SVR-based workarounds. > > > > It doesn't have to be "silent", the driver can

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

2015-12-28 Thread Scott Wood
On Mon, 2015-12-28 at 13:10 +0100, Ulf Hansson wrote: > On 28 December 2015 at 11:26, Yangbo Lu <yangbo...@nxp.com> wrote: > > > -Original Message- > > > From: Ulf Hansson [mailto:ulf.hans...@linaro.org] > > > Sent: Thursday, December 17, 2015 7:31

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

2015-12-16 Thread Scott Wood
On Tue, 2015-12-15 at 10:46 +0100, Ulf Hansson wrote: > [...] > > > > --- a/drivers/mmc/host/Kconfig > > > > +++ b/drivers/mmc/host/Kconfig > > > > @@ -142,6 +142,8 @@ config MMC_SDHCI_OF_ESDHC > > > > depends on MMC_SDHCI_PLTFM > > > > depends on PPC || ARCH_MXC || ARCH_LAYERSCAPE

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

2015-12-14 Thread Scott Wood
On Mon, 2015-12-14 at 14:08 +0100, Ulf Hansson wrote: > On 14 December 2015 at 05:24, Yangbo Lu wrote: > > 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

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

2015-12-14 Thread Scott Wood
On Mon, 2015-12-14 at 12:24 +0800, Yangbo Lu wrote: > 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

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

2015-12-14 Thread Scott Wood
On Mon, 2015-12-14 at 12:24 +0800, Yangbo Lu wrote: > 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

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

2015-12-14 Thread Scott Wood
On Mon, 2015-12-14 at 12:24 +0800, Yangbo Lu wrote: > 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

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

2015-12-14 Thread Scott Wood
On Mon, 2015-12-14 at 12:24 +0800, Yangbo Lu wrote: > 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: >

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

2015-12-11 Thread Scott Wood
On Fri, 2015-12-11 at 09:26 +0100, Ulf Hansson wrote: > [...] > > > > > > The fsl_get_svr() you suggested is also an idea for this. > > > > > Then, may I know is there a guts driver in kernel? > > > > > Thanks a lot. > > > > > > > > There isn't, but there should be. > > > > > > > > -Scott > > >

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

2015-12-09 Thread Scott Wood
On Wed, 2015-12-09 at 03:29 -0600, Lu Yangbo-B47093 wrote: > > -Original Message- > > From: Lu Yangbo-B47093 > > Sent: Wednesday, December 09, 2015 5:05 PM > > To: Wood Scott-B07421; linux-mmc@vger.kernel.org; ulf.hans...@linaro.org > > Cc: Xie Xiaobo-R63061; Li Yang-Leo-R58472 > >

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

2015-12-09 Thread Scott Wood
On Wed, 2015-12-09 at 03:05 -0600, Lu Yangbo-B47093 wrote: > > -Original Message- > > From: Wood Scott-B07421 > > Sent: Wednesday, December 09, 2015 12:33 PM > > To: Lu Yangbo-B47093; linux-mmc@vger.kernel.org; ulf.hans...@linaro.org > > Cc: Xie Xiaobo-R63061; Li Yang-Leo-R58472 > >

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

2015-12-08 Thread Scott Wood
On Fri, 2015-11-27 at 11:20 +0800, Yangbo Lu wrote: > 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

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

2015-12-08 Thread Scott Wood
On Fri, 2015-11-27 at 11:20 +0800, Yangbo Lu wrote: > 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:

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

2015-12-08 Thread Scott Wood
On Fri, 2015-11-27 at 11:20 +0800, Yangbo Lu wrote: > 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

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

2015-12-08 Thread Scott Wood
On Tue, 2015-12-08 at 14:49 +0100, Ulf Hansson wrote: > On 27 November 2015 at 04:20, Yangbo Lu wrote: > > 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

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

2015-12-08 Thread Scott Wood
On Tue, 2015-12-08 at 14:49 +0100, Ulf Hansson wrote: > +Lee Jones > > On 27 November 2015 at 04:20, Yangbo Lu wrote: > > 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

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

2015-12-08 Thread Scott Wood
On Tue, 2015-12-08 at 22:30 -0600, Lu Yangbo-B47093 wrote: > > -Original Message- > > From: Wood Scott-B07421 > > Sent: Wednesday, December 09, 2015 1:46 AM > > To: Lu Yangbo-B47093; linux-mmc@vger.kernel.org; ulf.hans...@linaro.org > > Cc: Xie Xiaobo-R63061; Li Yang-Leo-R58472 > >

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

2015-09-22 Thread Scott Wood
On Tue, 2015-09-22 at 03:56 -0500, Lu Yangbo-B47093 wrote: > > -Original Message- > > From: Wood Scott-B07421 > > Sent: Wednesday, September 02, 2015 8:24 AM > > To: Lu Yangbo-B47093 > > Cc: linux-mmc@vger.kernel.org; ulf.hans...@linaro.org > > Subject: Re: [v2, 2/3] mmc: sdhci-of-esdhc:

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

2015-09-01 Thread Scott Wood
On Thu, 2015-08-27 at 17:29 +0800, Yangbo Lu wrote: > @@ -24,6 +25,16 @@ > > #define VENDOR_V_22 0x12 > #define VENDOR_V_23 0x13 > + > +/* Global Utility Registers */ > +#define GUTS_SVR 0xa4/* System Version Register */ > +/* SOC version definition */ > +#define SVR_T4240

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

2015-08-26 Thread Scott Wood
On Wed, 2015-08-26 at 02:49 -0500, Lu Yangbo-B47093 wrote: 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.

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

2015-07-27 Thread Scott Wood
On Mon, 2015-07-27 at 09:58 +0200, Ulf Hansson wrote: On 25 July 2015 at 04:27, Scott Wood scottw...@freescale.com wrote: On Tue, 2015-07-21 at 15:02 +0200, Ulf Hansson wrote: On 21 July 2015 at 11:45, Yangbo Lu yangbo...@freescale.com wrote: For T4240-R1.0-R2.0, the HOSTVER register has

Re: powerpc/corenet: enable eSDHC

2015-07-24 Thread Scott Wood
On Mon, 2015-07-20 at 01:43 -0500, Lu Yangbo-B47093 wrote: OK, thanks. Assuming no similar issues when testing, I'll apply this patch the next time I do a batch of patch application. Any thoughts regarding better error handling? -Scott Do you mean SD test? I just mean that I

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

2015-07-24 Thread Scott Wood
On Tue, 2015-07-21 at 15:02 +0200, Ulf Hansson wrote: On 21 July 2015 at 11:45, Yangbo Lu yangbo...@freescale.com wrote: 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

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

2015-07-24 Thread Scott Wood
On Tue, 2015-07-21 at 17:45 +0800, Yangbo Lu wrote: 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. No. Don't modify the device tree within Linux without a

Re: powerpc/corenet: enable eSDHC

2015-07-16 Thread Scott Wood
OK, thanks. Assuming no similar issues when testing, I'll apply this patch the next time I do a batch of patch application. Any thoughts regarding better error handling? -Scott On Wed, 2015-07-15 at 21:37 -0500, Lu Yangbo-B47093 wrote: Hi Scott, Now the patch below has been merged on

Re: powerpc/corenet: enable eSDHC

2015-06-08 Thread Scott Wood
On Mon, 2015-06-08 at 05:12 -0500, Lu Yangbo-B47093 wrote: Thanks a lot, Scott. And now a patch was merged on git://git.linaro.org/people/ulf.hansson/mmc.git next branch to fix this issue. It should be no problem. Assuming that patch fixes it and gets pulled for 4.2, this config patch can

Re: powerpc/corenet: enable eSDHC

2015-05-29 Thread Scott Wood
On Wed, May 06, 2015 at 02:29:08PM +0800, Yangbo Lu wrote: Signed-off-by: Yangbo Lu yangbo...@freescale.com --- arch/powerpc/configs/corenet32_smp_defconfig | 2 ++ arch/powerpc/configs/corenet64_smp_defconfig | 2 ++ 2 files changed, 4 insertions(+) diff --git

Re: [PATCH v2, 2/2] mmc: sdhci-pltfm: enable interrupt mode to detect card

2015-05-20 Thread Scott Wood
On Tue, 2015-05-19 at 09:46 +0200, Ulf Hansson wrote: [...] Those platforms could still update their DT files and add broken-cd, since that would be the proper description of the HW. Once that's done, it would enable you to remove the SDHCI_QUIRK_BROKEN_CARD_DETECTION as default,

Re: [PATCH v2, 2/2] mmc: sdhci-pltfm: enable interrupt mode to detect card

2015-05-18 Thread Scott Wood
On Mon, 2015-05-18 at 21:49 -0500, Lu Yangbo-B47093 wrote: -Original Message- From: Wood Scott-B07421 Sent: Tuesday, May 19, 2015 10:28 AM To: Lu Yangbo-B47093 Cc: Ulf Hansson; linux-mmc; Chris Ball Subject: Re: [PATCH v2, 2/2] mmc: sdhci-pltfm: enable interrupt mode to

Re: [PATCH 2/4 V2] mmc: esdhc: workaround for dma err in the last system transaction

2013-08-26 Thread Scott Wood
On Mon, 2013-08-26 at 09:03 +0800, Zhang Haijun wrote: On 08/23/2013 11:40 PM, Scott Wood wrote: On Fri, 2013-08-23 at 14:39 +0800, Zhang Haijun wrote: Hi, Anton and all Is there any advice on these two patches ? [PATCH 2/4 V2] mmc: esdhc: workaround for dma err in the last

Re: [PATCH 2/4 V2] mmc: esdhc: workaround for dma err in the last system transaction

2013-08-23 Thread Scott Wood
On Fri, 2013-08-23 at 14:39 +0800, Zhang Haijun wrote: Hi, Anton and all Is there any advice on these two patches ? [PATCH 2/4 V2] mmc: esdhc: workaround for dma err in the last system transaction [PATCH 3/4 V3] mmc: esdhc: Correct host version of T4240-R1.0-R2.0. [PATCH 1/4 V4]

Re: [PATCH 1/3 V2] mmc:core: parse voltage from device-tree

2013-08-12 Thread Scott Wood
On Mon, 2013-08-12 at 10:46 +0800, Zhang Haijun wrote: On 08/09/2013 10:48 PM, Kumar Gala wrote: On Jul 31, 2013, at 1:25 AM, Haijun Zhang wrote: Add function to support get voltage from device-tree. If there are voltage-range specified in device-tree node, this function will

Re: [PATCH 1/3] mmc:core: parse voltage from device-tree

2013-07-29 Thread Scott Wood
On 07/28/2013 09:56:33 PM, Haijun Zhang wrote: Add function to support get voltage from device-tree. If there are voltage-range specified in device-tree node, this function will parse it and return the avail voltage mask. Signed-off-by: Haijun Zhang haijun.zh...@freescale.com ---

Re: [PATCH 2/2] mmc: esdhc: get voltage from dts file

2013-07-22 Thread Scott Wood
On 07/22/2013 02:53:56 AM, Haijun Zhang wrote: Add voltage-range support in esdhc of T4, So we can choose to read voltages from dts file as one optional. If we can get a valid voltage-range from device node, we use this voltage as the final voltage support. Else we still read from capacity or

Re: [PATCH 2/2] mmc: esdhc: get voltage from dts file

2013-07-22 Thread Scott Wood
On 07/22/2013 09:38:33 PM, Zhang Haijun-B42677 wrote: -Original Message- From: Wood Scott-B07421 Sent: Tuesday, July 23, 2013 1:41 AM To: Zhang Haijun-B42677 Cc: linux-mmc@vger.kernel.org; linuxppc-...@lists.ozlabs.org; cbouatmai...@gmail.com; c...@laptop.org; Fleming

Re: [PATCH V3] powerpc/85xx: Add support for 85xx cpu type detection

2013-07-16 Thread Scott Wood
On 07/16/2013 03:46:44 AM, Zhang Haijun-B42677 wrote: Hi, scott Need I change something? I have some patches depend on this. Expect your advice. Thanks. Regards Haijun. It looks OK; go ahead and send the patches that depend on it. -Scott -- To unsubscribe from this list: send the line

Re: [PATCH V3] powerpc/85xx: Add support for 85xx cpu type detection

2013-07-16 Thread Scott Wood
On 07/16/2013 12:02:09 PM, Scott Wood wrote: On 07/16/2013 03:46:44 AM, Zhang Haijun-B42677 wrote: Hi, scott Need I change something? I have some patches depend on this. Expect your advice. Thanks. Regards Haijun. It looks OK; go ahead and send the patches that depend on it. Actually

Re: [PATCH 1/4 V2] powerpc/85xx: Add support for 85xx cpu type detection

2013-07-11 Thread Scott Wood
On 07/11/2013 03:43:35 AM, David Laight wrote: +#define IS_SVR_REV(svr, maj, min) \ + ((SVR_MAJ(svr) == (maj)) (SVR_MIN(svr) == (min))) I don't think IS_SVR_REV is needed. Callers can just do if (SVR_REV(svr) == 0x30) or whatever, especially since we're relying on them to do

Re: 答复: [PATCH] Powerpc/t4240: change the compatible flags for t4240qds board

2013-07-10 Thread Scott Wood
On 07/09/2013 10:41:22 PM, Zhang Haijun-B42677 wrote: No. It's still supposed to be describing the sdhc block itself, not the board -- and any workarounds that key off of this will still fail to work with existing device trees. [Haijun Wrote:] So, leave dts unchanged and to check

Re: [PATCH 1/4 V2] powerpc/85xx: Add support for 85xx cpu type detection

2013-07-10 Thread Scott Wood
On 07/10/2013 02:39:01 AM, Haijun Zhang wrote: +/* Get current SOC Version */ +#define GET_SVR() (mfspr(SPRN_SVR)) Unnecessary parens. Why do we need GET_SVR(), versus opencoding it? Note that U-Boot (which this is patterned after) doesn't have GET_SVR(), so code that wants to work

Re: 答复: [PATCH] Powerpc/t4240: change the compatible flags for t4240qds board

2013-07-09 Thread Scott Wood
On 07/09/2013 01:04:01 AM, Zhang Haijun-B42677 wrote: Regards Thanks Haijun. 发件人: Wood Scott-B07421 发送时间: 2013年7月8日 17:14 收件人: Zhang Haijun-B42677 抄送: linux-mmc@vger.kernel.org; linuxppc-...@lists.ozlabs.org; cbouatmai...@gmail.com;

Re: [PATCH 3/4 V2] mmc: esdhc: Add quirks to support T4240QDS board

2013-07-08 Thread Scott Wood
On 07/08/2013 02:16:04 AM, Haijun Zhang wrote: On T4240QDS board controllers has an unusable ADMA engine, so use SDMA instead. Also 3.0v is support on T4240QDS board even if the capacity detailed only 1.8v support. Without this quirk SD card will declare voltage not support and

Re: [PATCH 1/4] powerpc/85xx: Add support for 85xx cpu type detection

2013-07-08 Thread Scott Wood
On 07/07/2013 09:12:22 PM, Haijun Zhang wrote: Add this file to help detect cpu type in runtime. These macros and inline routines will be more favorable for driver to apply errata and workaround to specified cpu type. Signed-off-by: Haijun Zhang haijun.zh...@freescale.com Signed-off-by: Zhao

Re: lockdep dump on devtree_lock (involving esdhc)

2013-06-12 Thread Scott Wood
On 06/12/2013 10:43:31 AM, Stephen Warren wrote: On 06/11/2013 05:33 PM, Scott Wood wrote: I get the following lockdump output on p2020rdb using v3.10-rc5-43-g34376a5. While it's not particularly polite for the esdhc driver to be calling OF functions while holding another lock which can

lockdep dump on devtree_lock (involving esdhc)

2013-06-11 Thread Scott Wood
I get the following lockdump output on p2020rdb using v3.10-rc5-43-g34376a5. While it's not particularly polite for the esdhc driver to be calling OF functions while holding another lock which can be acquired from interrupt context, why is devtree_lock usually acquired in an irqsafe manner but

Re: [PATCH 2/3] powerpc/esdhc: add property to disable the CMD23

2012-09-11 Thread Scott Wood
On 09/11/2012 03:04 AM, Anton Vorontsov wrote: On Tue, Sep 11, 2012 at 12:54:29AM -0700, Anton Vorontsov wrote: On Tue, Sep 11, 2012 at 03:12:44PM +0800, chang-ming.hu...@freescale.com wrote: From: Jerry Huang chang-ming.hu...@freescale.com Below SOCs don't support the cmd23 command for MMC

Re: [PATCH v3 4/4] mmc: sdhci-esdhc-imx: add device tree probe support

2011-07-13 Thread Scott Wood
On Wed, 13 Jul 2011 19:52:12 +0400 Anton Vorontsov cbouatmai...@gmail.com wrote: On Wed, Jul 06, 2011 at 03:05:18PM -0600, Grant Likely wrote: On Thu, Jul 07, 2011 at 12:47:50AM +0800, Shawn Guo wrote: +- cd-gpios : Specify GPIOs for card detection +- wp-gpios : Specify GPIOs for write