Skip to contentSkip to conversation

Fix eSDHC host version register bug

PATCH Superseded Yangbo Lu 4 participants 14 messages Apr 22, 2016 – May 4, 2016

Subsystems (14)

v8 of 16 Superseded Latest is v16 →

lore
Share & tools
lore

Yangbo Lu

author
#0 lore raw

v8 cover Fix eSDHC host version register bug

This patchset is used to fix a host version register bug in the T4240-R1.0-R2.0 eSDHC controller. To get the SoC version and revision, it's needed to add the GUTS driver to access the global utilities registers.

So, the first four patches are to add the GUTS driver.
The following patches except the updating MAINTAINERS patch are to enable GUTS driver support to get SVR in eSDHC driver and fix host version for T4240.

Yangbo Lu (7):
Documentation: DT: update Freescale DCFG compatible
ARM64: dts: ls2080a: add device configuration node
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/fsl
MAINTAINERS: add entry for Freescale SoC specific driver
mmc: sdhci-of-esdhc: fix host version for T4240-R1.0-R2.0

 Documentation/devicetree/bindings/arm/fsl.txt      |   2 +-
 .../bindings/{powerpc => soc}/fsl/guts.txt         |   3 +
 MAINTAINERS                                        |  16 ++-
 arch/arm64/boot/dts/freescale/fsl-ls2080a.dtsi     |   6 +
 arch/powerpc/kernel/cpu_setup_fsl_booke.S          |   2 +-
 drivers/clk/clk-qoriq.c                            |   3 +-
 drivers/i2c/busses/i2c-mpc.c                       |   2 +-
 drivers/iommu/fsl_pamu.c                           |   3 +-
 drivers/mmc/host/Kconfig                           |   1 +
 drivers/mmc/host/sdhci-of-esdhc.c                  |  23 ++++
 drivers/net/ethernet/freescale/gianfar.c           |   2 +-
 drivers/soc/Kconfig                                |   2 +-
 drivers/soc/fsl/Kconfig                            |   8 ++
 drivers/soc/fsl/Makefile                           |   1 +
 drivers/soc/fsl/guts.c                             | 119 +++++++++++++++++++
 include/linux/fsl/guts.h                           | 126 +++++++++++++--------
 .../asm/mpc85xx.h => include/linux/fsl/svr.h       |   4 +-
 17 files changed, 263 insertions(+), 60 deletions(-)
 rename Documentation/devicetree/bindings/{powerpc => soc}/fsl/guts.txt (91%)
 create mode 100644 drivers/soc/fsl/Kconfig
 create mode 100644 drivers/soc/fsl/guts.c
 rename arch/powerpc/include/asm/mpc85xx.h => include/linux/fsl/svr.h (97%)
Signature · 1 line
2.1.0.27.g96db324
author
#1 lore raw

PATCH v8 1/7 Documentation: DT: update Freescale DCFG compatible

Update Freescale DCFG compatible with 'fsl,<chip>-dcfg' instead of 'fsl,ls1021a-dcfg' to include more chips.

---
Changes for v8:
- Added this patch

---
 Documentation/devicetree/bindings/arm/fsl.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/devicetree/bindings/arm/fsl.txt +1 -1
index 752a685..1d5f512 100644
@@ -119,7 +119,7 @@ Freescale DCFG
 configuration and status for the device. Such as setting the secondary
 core start address and release the secondary core from holdoff and startup.
   Required properties:
-  - compatible: should be "fsl,ls1021a-dcfg"
+  - compatible: should be "fsl,<chip>-dcfg"
   - reg : should contain base address and length of DCFG memory-mapped registers
 
 Example:
Signature · 1 line
2.1.0.27.g96db324
#2 lore raw

Re: [v8, 1/7] Documentation: DT: update Freescale DCFG compatible

Quoted 16 lines · Yangbo Lu

Update Freescale DCFG compatible with 'fsl,<chip>-dcfg' instead of 'fsl,ls1021a-dcfg' to include more chips.

---
Changes for v8:
- Added this patch

---
 Documentation/devicetree/bindings/arm/fsl.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/devicetree/bindings/arm/fsl.txt +0 -0
index 752a685..1d5f512 100644

Documentation/devicetree/bindings/arm/fsl.txt Freescale DCFG · line 122

Quoted 5 lines
Documentation/devicetree/bindings/arm/fsl.txt +1 -1
@@ -119,7 +119,7 @@ Freescale DCFG
 configuration and status for the device. Such as setting the secondary
 core start address and release the secondary core from holdoff and startup.
   Required properties:
-  - compatible: should be "fsl,ls1021a-dcfg"
+  - compatible: should be "fsl,<chip>-dcfg"

Please list specific values expected for <chip>, while jusy saying <chip> may be more generic, it makes it practically impossible to search for the correct binding given a compatible string, and it's vague as to exaclty what <chip> should be.

Thanks,
Mark.

Quoted 11 lines
Documentation/devicetree/bindings/arm/fsl.txt +0 -0
   - reg : should contain base address and length of DCFG memory-mapped registers
 
 Example:
Signature · 6 lines
2.1.0.27.g96db324

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
author
#3 lore raw

RE: [v8, 1/7] Documentation: DT: update Freescale DCFG compatible

Hi Mark,

Quoted 36 lines

-----Original Message-----
From: Mark Rutland [mailto:mark.rutland at arm.com]
Sent: Friday, April 22, 2016 9:12 PM
To: Yangbo Lu
Cc: linux-mmc at vger.kernel.org; linuxppc-dev at lists.ozlabs.org; devicetree at vger.kernel.org; linux-arm-kernel at lists.infradead.org; linux- kernel at vger.kernel.org; linux-clk at vger.kernel.org; linux- i2c at vger.kernel.org; iommu at lists.linux-foundation.org; netdev at vger.kernel.org; ulf.hansson at linaro.org; Scott Wood; Rob Herring; Russell King; Jochen Friedrich; Joerg Roedel; Claudiu Manoil; Bhupesh Sharma; Zhao Qiang; Kumar Gala; Santosh Shilimkar; Yang-Leo Li; Xiaobo Xie
Subject: Re: [v8, 1/7] Documentation: DT: update Freescale DCFG compatible

Quoted 18 lines · Yangbo Lu

Update Freescale DCFG compatible with 'fsl,<chip>-dcfg' instead of 'fsl,ls1021a-dcfg' to include more chips.

---
Changes for v8:
- Added this patch

---
 Documentation/devicetree/bindings/arm/fsl.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/devicetree/bindings/arm/fsl.txt +0 -0
index 752a685..1d5f512 100644
@@ -119,7 +119,7 @@ Freescale DCFG
 configuration and status for the device. Such as setting the
Quoted 1 line

secondary core start address and release the secondary core from

holdoff and startup.

Quoted 8 lines

Documentation/devicetree/bindings/arm/fsl.txt Freescale DCFG · line 122

Quoted 3 lines

Required properties:

Documentation/devicetree/bindings/arm/fsl.txt +1 -1
-  - compatible: should be "fsl,ls1021a-dcfg"
+  - compatible: should be "fsl,<chip>-dcfg"

Please list specific values expected for <chip>, while jusy saying <chip> may be more generic, it makes it practically impossible to search for the correct binding given a compatible string, and it's vague as to exaclty what <chip> should be.

[Lu Yangbo-B47093] Thanks for your comment. I will list the possible chips.

Quoted 18 lines

Thanks,
Mark.

Quoted 12 lines

- reg : should contain base address and length of DCFG
memory-mapped registers

Example:
--
2.1.0.27.g96db324

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo at vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

author
#4 lore raw

PATCH v8 2/7 ARM64: dts: ls2080a: add device configuration node

In reply to Yangbo Lu

Add the dts node for device configuration unit that provides general purpose configuration and status for the device.

---
Changes for v5:
- Added this patch
Changes for v6:
- None
Changes for v7:
- None
Changes for v8:
- Added 'Acked-by: Scott Wood'

---
 arch/arm64/boot/dts/freescale/fsl-ls2080a.dtsi | 6 ++++++
 1 file changed, 6 insertions(+)
arch/arm64/boot/dts/freescale/fsl-ls2080a.dtsi +6 -0
index 9d746c6..8724cf1 100644
@@ -191,6 +191,12 @@
 			clocks = <&sysclk>;
 		};
 
+		dcfg: dcfg at 1e00000 {
+			compatible = "fsl,ls2080a-dcfg", "syscon";
+			reg = <0x0 0x1e00000 0x0 0x10000>;
+			little-endian;
+		};
+
 		serial0: serial at 21c0500 {
 			compatible = "fsl,ns16550", "ns16550a";
 			reg = <0x0 0x21c0500 0x0 0x100>;
Signature · 1 line
2.1.0.27.g96db324
author
#5 lore raw

PATCH v8 3/7 soc: fsl: add GUTS driver for QorIQ platforms

In reply to 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.

---
Changes for v4:
- Added this patch
Changes for v5:
- Modified copyright info
- Changed MODULE_LICENSE to GPL
- Changed EXPORT_SYMBOL_GPL to EXPORT_SYMBOL
- Made FSL_GUTS user-invisible
- Added a complete compatible list for GUTS
- Stored guts info in file-scope variable
- Added mfspr() getting SVR
- Redefined GUTS APIs
- Called fsl_guts_init rather than using platform driver
- Removed useless parentheses
- Removed useless 'extern' key words
Changes for v6:
- Made guts thread safe in fsl_guts_init
Changes for v7:
- Removed 'ifdef' for function declaration in guts.h
Changes for v8:
- Fixes lines longer than 80 characters checkpatch issue
- Added 'Acked-by: Scott Wood'

---
 drivers/soc/Kconfig      |   2 +-
 drivers/soc/fsl/Kconfig  |   8 +++
 drivers/soc/fsl/Makefile |   1 +
 drivers/soc/fsl/guts.c   | 119 ++++++++++++++++++++++++++++++++++++++++++++
 include/linux/fsl/guts.h | 126 +++++++++++++++++++++++++++++------------------
 5 files changed, 207 insertions(+), 49 deletions(-)
 create mode 100644 drivers/soc/fsl/Kconfig
 create mode 100644 drivers/soc/fsl/guts.c
drivers/soc/Kconfig +1 -1
index cb58ef0..7106463 100644
@@ -2,7 +2,7 @@ menu "SOC (System On Chip) specific Drivers"
 
 source "drivers/soc/bcm/Kconfig"
 source "drivers/soc/brcmstb/Kconfig"
-source "drivers/soc/fsl/qe/Kconfig"
+source "drivers/soc/fsl/Kconfig"
 source "drivers/soc/mediatek/Kconfig"
 source "drivers/soc/qcom/Kconfig"
 source "drivers/soc/rockchip/Kconfig"
drivers/soc/fsl/Kconfig new file +8 -0
new file mode 100644
index 0000000..b313759
@@ -0,0 +1,8 @@
+#
+# Freescale SOC drivers
+#
+
+source "drivers/soc/fsl/qe/Kconfig"
+
+config FSL_GUTS
+	bool
drivers/soc/fsl/Makefile +1 -0
index 203307f..02afb7f 100644
@@ -4,3 +4,4 @@
 
 obj-$(CONFIG_QUICC_ENGINE)		+= qe/
 obj-$(CONFIG_CPM)			+= qe/
+obj-$(CONFIG_FSL_GUTS)			+= guts.o
drivers/soc/fsl/guts.c new file +119 -0

119 lines not on this page · raw message

include/linux/fsl/guts.h +78 -48

161 lines not on this page · raw message

Signature · 1 line
2.1.0.27.g96db324
author
#6 lore raw

PATCH v8 4/7 dt: move guts devicetree doc out of powerpc directory

In reply to Yangbo Lu

Move guts devicetree doc to Documentation/devicetree/bindings/soc/fsl/ since it's used by not only PowerPC but also ARM. And add a specification for 'little-endian' property.

---
Changes for v4:
- Added this patch
Changes for v5:
- Modified the description for little-endian property
Changes for v6:
- None
Changes for v7:
- None
Changes for v8:
- Added 'Acked-by: Scott Wood'
- Added 'Acked-by: Rob Herring'

---
 Documentation/devicetree/bindings/{powerpc => soc}/fsl/guts.txt | 3 +++
 1 file changed, 3 insertions(+)
 rename Documentation/devicetree/bindings/{powerpc => soc}/fsl/guts.txt (91%)
Documentation/devicetree/bindings/soc/fsl/guts.txt renamed from Documentation/devicetree/bindings/powerpc/fsl/guts.txt +3 -0
similarity index 91%
rename from Documentation/devicetree/bindings/powerpc/fsl/guts.txt
rename to Documentation/devicetree/bindings/soc/fsl/guts.txt
index b71b203..07adca9 100644
@@ -25,6 +25,9 @@ Recommended properties:
  - fsl,liodn-bits : Indicates the number of defined bits in the LIODN
    registers, for those SOCs that have a PAMU device.
 
+ - little-endian : Indicates that the global utilities block is little
+   endian. The default is big endian.
+
 Examples:
 	global-utilities at e0000 {	/* global utilities block */
 		compatible = "fsl,mpc8548-guts";
Signature · 1 line
2.1.0.27.g96db324
author
#7 lore raw

PATCH v8 5/7 powerpc/fsl: move mpc85xx.h to include/linux/fsl

In reply to Yangbo Lu

Move mpc85xx.h to include/linux/fsl 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.

---
Changes for v2:
- None
Changes for v3:
- None
Changes for v4:
- None
Changes for v5:
- Changed to Move mpc85xx.h to include/linux/fsl/
- Adjusted '#include <linux/fsl/svr.h>' position in file
Changes for v6:
- None
Changes for v7:
- Added 'Acked-by: Wolfram Sang' for I2C part
- Also applied to arch/powerpc/kernel/cpu_setup_fsl_booke.S
Changes for v8:
- Added 'Acked-by: Stephen Boyd' for clk part
- Added 'Acked-by: Scott Wood'
- Added 'Acked-by: Joerg Roedel' for iommu part

---
 arch/powerpc/kernel/cpu_setup_fsl_booke.S                     | 2 +-
 drivers/clk/clk-qoriq.c                                       | 3 +--
 drivers/i2c/busses/i2c-mpc.c                                  | 2 +-
 drivers/iommu/fsl_pamu.c                                      | 3 +--
 drivers/net/ethernet/freescale/gianfar.c                      | 2 +-
 arch/powerpc/include/asm/mpc85xx.h => include/linux/fsl/svr.h | 4 ++--
 6 files changed, 7 insertions(+), 9 deletions(-)
 rename arch/powerpc/include/asm/mpc85xx.h => include/linux/fsl/svr.h (97%)
arch/powerpc/kernel/cpu_setup_fsl_booke.S +1 -1
index 462aed9..2b0284e 100644
@@ -13,13 +13,13 @@
  *
  */
 
+#include <linux/fsl/svr.h>
 #include <asm/page.h>
 #include <asm/processor.h>
 #include <asm/cputable.h>
 #include <asm/ppc_asm.h>
 #include <asm/mmu-book3e.h>
 #include <asm/asm-offsets.h>
-#include <asm/mpc85xx.h>
 
 _GLOBAL(__e500_icache_setup)
 	mfspr	r0, SPRN_L1CSR1
drivers/clk/clk-qoriq.c +1 -2
index 7bc1c45..fc7f722 100644
@@ -13,6 +13,7 @@
 #include <linux/clk.h>
 #include <linux/clk-provider.h>
 #include <linux/fsl/guts.h>
+#include <linux/fsl/svr.h>
 #include <linux/io.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
@@ -1148,8 +1149,6 @@ bad_args:
 }
 
 #ifdef CONFIG_PPC
-#include <asm/mpc85xx.h>
-
 static const u32 a4510_svrs[] __initconst = {
 	(SVR_P2040 << 8) | 0x10,	/* P2040 1.0 */
 	(SVR_P2040 << 8) | 0x11,	/* P2040 1.1 */
drivers/i2c/busses/i2c-mpc.c +1 -1
index 48ecffe..600704c 100644
@@ -27,9 +27,9 @@
 #include <linux/i2c.h>
 #include <linux/interrupt.h>
 #include <linux/delay.h>
+#include <linux/fsl/svr.h>
 
 #include <asm/mpc52xx.h>
-#include <asm/mpc85xx.h>
 #include <sysdev/fsl_soc.h>
 
 #define DRV_NAME "mpc-i2c"
drivers/iommu/fsl_pamu.c +1 -2
index a34355f..af8fb27 100644
@@ -21,11 +21,10 @@
 #include "fsl_pamu.h"
 
 #include <linux/fsl/guts.h>
+#include <linux/fsl/svr.h>
 #include <linux/interrupt.h>
 #include <linux/genalloc.h>
 
-#include <asm/mpc85xx.h>
-
 /* define indexes for each operation mapping scenario */
 #define OMI_QMAN        0x00
 #define OMI_FMAN        0x01
drivers/net/ethernet/freescale/gianfar.c +1 -1
index d2f917a..2224b10 100644
@@ -86,11 +86,11 @@
 #include <linux/udp.h>
 #include <linux/in.h>
 #include <linux/net_tstamp.h>
+#include <linux/fsl/svr.h>
 
 #include <asm/io.h>
 #ifdef CONFIG_PPC
 #include <asm/reg.h>
-#include <asm/mpc85xx.h>
 #endif
 #include <asm/irq.h>
 #include <asm/uaccess.h>
include/linux/fsl/svr.h renamed from arch/powerpc/include/asm/mpc85xx.h +2 -2
similarity index 97%
rename from arch/powerpc/include/asm/mpc85xx.h
rename to include/linux/fsl/svr.h
index 213f3a8..8d13836 100644
@@ -9,8 +9,8 @@
  * (at your option) any later version.
  */
 
-#ifndef __ASM_PPC_MPC85XX_H
-#define __ASM_PPC_MPC85XX_H
+#ifndef FSL_SVR_H
+#define FSL_SVR_H
 
 #define SVR_REV(svr)	((svr) & 0xFF)		/* SOC design resision */
 #define SVR_MAJ(svr)	(((svr) >>  4) & 0xF)	/* Major revision field*/
Signature · 1 line
2.1.0.27.g96db324
author
#8 lore raw

PATCH v8 6/7 MAINTAINERS: add entry for Freescale SoC specific driver

In reply to Yangbo Lu

Add maintainer entry for Freescale SoC specific driver including the QE library and the GUTS driver. Also add entry for GUTS driver and add maintainer for QE library.

---
Changes for v8:
- Added this patch

---
 MAINTAINERS | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)
MAINTAINERS +15 -1
index 1d5b4be..d20aeb6 100644
@@ -4622,13 +4622,27 @@ F:	drivers/net/ethernet/freescale/fec_ptp.c
 F:	drivers/net/ethernet/freescale/fec.h
 F:	Documentation/devicetree/bindings/net/fsl-fec.txt
 
+FREESCALE SOC SPECIFIC DRIVER
+M:	Scott Wood <[email protected]>
+L:	linuxppc-dev at lists.ozlabs.org
+S:	Maintained
+F:	drivers/soc/fsl/
+F:	include/linux/fsl/
+
 FREESCALE QUICC ENGINE LIBRARY
+M:	Qiang Zhao <[email protected]>
 L:	linuxppc-dev at lists.ozlabs.org
-S:	Orphan
+S:	Maintained
 F:	drivers/soc/fsl/qe/
 F:	include/soc/fsl/*qe*.h
 F:	include/soc/fsl/*ucc*.h
 
+FREESCALE GUTS DRIVER
+M:	Yangbo Lu <[email protected]>
+L:	linuxppc-dev at lists.ozlabs.org
+S:	Maintained
+F:	drivers/soc/fsl/guts.c
+
 FREESCALE USB PERIPHERAL DRIVERS
 M:	Li Yang <[email protected]>
 L:	linux-usb at vger.kernel.org
Signature · 1 line
2.1.0.27.g96db324
maintainer
#9 lore raw

Re: [v8, 6/7] MAINTAINERS: add entry for Freescale SoC specific driver

Quoted 17 lines · Yangbo Lu

Add maintainer entry for Freescale SoC specific driver including the QE library and the GUTS driver. Also add entry for GUTS driver and add maintainer for QE library.

---
Changes for v8:
- Added this patch

---
 MAINTAINERS | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)
MAINTAINERS +0 -0
index 1d5b4be..d20aeb6 100644

MAINTAINERS F: drivers/net/ethernet/freescale/fec_ptp.c · line 4625

Quoted 4 lines
MAINTAINERS +1 -0
@@ -4622,13 +4622,27 @@ F:	drivers/net/ethernet/freescale/fec_ptp.c
 F:	drivers/net/ethernet/freescale/fec.h
 F:	Documentation/devicetree/bindings/net/fsl-fec.txt
 
+FREESCALE SOC SPECIFIC DRIVER

FREESCALE SOC DRIVERS

MAINTAINERS F: drivers/net/ethernet/freescale/fec_ptp.c · line 4626

Quoted 1 line
MAINTAINERS +1 -0
+M:	Scott Wood <[email protected]>

Please CC me at this address, not the NXP address that you sent this to...

MAINTAINERS F: drivers/net/ethernet/freescale/fec_ptp.c · line 4630

Quoted 4 lines
MAINTAINERS +4 -0
+L:	linuxppc-dev at lists.ozlabs.org
+S:	Maintained
+F:	drivers/soc/fsl/
+F:	include/linux/fsl/

This directory will contain drivers that work on PPC and ARM... I'm not sure what to put here in terms of mailing lists (we could put both, but people probably shouldn't spam both lists if only one arch is relevant to the patch), and whom to make pull requests to.

MAINTAINERS F: drivers/net/ethernet/freescale/fec_ptp.c · line 4644

Quoted 5 lines
MAINTAINERS +5 -0
+FREESCALE GUTS DRIVER
+M:	Yangbo Lu <[email protected]>
+L:	linuxppc-dev at lists.ozlabs.org
+S:	Maintained
+F:	drivers/soc/fsl/guts.c

What about the header?

Does guts really need a separate maintainer from drivers/soc/fsl?

-Scott

author
#10 lore raw

RE: [v8, 6/7] MAINTAINERS: add entry for Freescale SoC specific driver

Hi Scott and Leo,

Quoted 32 lines

-----Original Message-----
From: linux-mmc-owner at vger.kernel.org [mailto:linux-mmc-
owner at vger.kernel.org] On Behalf Of Scott Wood
Sent: Saturday, April 23, 2016 7:23 AM
To: Yangbo Lu; linux-mmc at vger.kernel.org; linuxppc-dev at lists.ozlabs.org; linux-arm-kernel at lists.infradead.org; linux-kernel at vger.kernel.org
Cc: ulf.hansson at linaro.org; Zhao Qiang; Russell King; Bhupesh Sharma; Scott Wood; Claudiu Manoil; Kumar Gala; Yang-Leo Li; Xiaobo Xie; Michael Ellerman
Subject: Re: [v8, 6/7] MAINTAINERS: add entry for Freescale SoC specific driver

Quoted 19 lines · Yangbo Lu

Add maintainer entry for Freescale SoC specific driver including the QE library and the GUTS driver. Also add entry for GUTS driver and add maintainer for QE library.

---
Changes for v8:
- Added this patch

---
 MAINTAINERS | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)
MAINTAINERS +0 -0
@@ -4622,13 +4622,27 @@ F:	drivers/net/ethernet/freescale/fec_ptp.c
 F:	drivers/net/ethernet/freescale/fec.h
 F:	Documentation/devicetree/bindings/net/fsl-fec.txt
 
Quoted 3 lines

MAINTAINERS F: drivers/net/ethernet/freescale/fec_ptp.c · line 4625

Quoted 1 line
MAINTAINERS +1 -0
+FREESCALE SOC SPECIFIC DRIVER

FREESCALE SOC DRIVERS

[Lu Yangbo-B47093] Ok, will change it to 'FREESCALE SOC DRIVERS'.

Quoted 4 lines

MAINTAINERS F: drivers/net/ethernet/freescale/fec_ptp.c · line 4626

Quoted 2 lines
MAINTAINERS +1 -0
+M:	Scott Wood <[email protected]>

Please CC me at this address, not the NXP address that you sent this to...

[Lu Yangbo-B47093] Sorry for mistaking your email. Will send the one you said.

Quoted 10 lines

MAINTAINERS F: drivers/net/ethernet/freescale/fec_ptp.c · line 4630

Quoted 5 lines
MAINTAINERS +4 -0
+L:	linuxppc-dev at lists.ozlabs.org
+S:	Maintained
+F:	drivers/soc/fsl/
+F:	include/linux/fsl/

This directory will contain drivers that work on PPC and ARM... I'm not sure what to put here in terms of mailing lists (we could put both, but people probably shouldn't spam both lists if only one arch is relevant to the patch), and whom to make pull requests to.

[Lu Yangbo-B47093] But sooner or later we need to do this for files in fsl/ ... :)

Hi Leo, do you have any idea?

Quoted 10 lines

MAINTAINERS F: drivers/net/ethernet/freescale/fec_ptp.c · line 4644

Quoted 6 lines
MAINTAINERS +5 -0
+FREESCALE GUTS DRIVER
+M:	Yangbo Lu <[email protected]>
+L:	linuxppc-dev at lists.ozlabs.org
+S:	Maintained
+F:	drivers/soc/fsl/guts.c

What about the header?

Does guts really need a separate maintainer from drivers/soc/fsl?

[Lu Yangbo-B47093] I was hesitating to add the maintainer...
And I was not so familiar with it. Let me leave it to the fsl/ directory and remove this...

Quoted 8 lines

-Scott

--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo at vger.kernel.org More majordomo info at
http://vger.kernel.org/majordomo-info.html

#11 lore raw

Re: [v8, 6/7] MAINTAINERS: add entry for Freescale SoC specific driver

Quoted 59 lines · Yangbo Lu

Hi Scott and Leo,

Quoted 32 lines

-----Original Message-----
From: linux-mmc-owner at vger.kernel.org [mailto:linux-mmc-
owner at vger.kernel.org] On Behalf Of Scott Wood
Sent: Saturday, April 23, 2016 7:23 AM
To: Yangbo Lu; linux-mmc at vger.kernel.org; linuxppc-dev at lists.ozlabs.org; linux-arm-kernel at lists.infradead.org; linux-kernel at vger.kernel.org
Cc: ulf.hansson at linaro.org; Zhao Qiang; Russell King; Bhupesh Sharma; Scott Wood; Claudiu Manoil; Kumar Gala; Yang-Leo Li; Xiaobo Xie; Michael Ellerman
Subject: Re: [v8, 6/7] MAINTAINERS: add entry for Freescale SoC specific driver

Quoted 19 lines · Yangbo Lu

Add maintainer entry for Freescale SoC specific driver including the QE library and the GUTS driver. Also add entry for GUTS driver and add maintainer for QE library.

---
Changes for v8:
- Added this patch

---
 MAINTAINERS | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)
MAINTAINERS +0 -0
@@ -4622,13 +4622,27 @@ F:  drivers/net/ethernet/freescale/fec_ptp.c
 F: drivers/net/ethernet/freescale/fec.h
 F: Documentation/devicetree/bindings/net/fsl-fec.txt
 
Quoted 3 lines

MAINTAINERS F: drivers/net/ethernet/freescale/fec_ptp.c · line 4625

Quoted 1 line
MAINTAINERS +1 -0
+FREESCALE SOC SPECIFIC DRIVER

FREESCALE SOC DRIVERS

[Lu Yangbo-B47093] Ok, will change it to 'FREESCALE SOC DRIVERS'.

Quoted 4 lines

MAINTAINERS F: drivers/net/ethernet/freescale/fec_ptp.c · line 4626

Quoted 2 lines
MAINTAINERS +1 -0
+M: Scott Wood <[email protected]>

Please CC me at this address, not the NXP address that you sent this to...

[Lu Yangbo-B47093] Sorry for mistaking your email. Will send the one you said.

Quoted 10 lines

MAINTAINERS F: drivers/net/ethernet/freescale/fec_ptp.c · line 4630

Quoted 5 lines
MAINTAINERS +4 -0
+L: linuxppc-dev at lists.ozlabs.org
+S: Maintained
+F: drivers/soc/fsl/
+F: include/linux/fsl/

This directory will contain drivers that work on PPC and ARM... I'm not sure what to put here in terms of mailing lists (we could put both, but people probably shouldn't spam both lists if only one arch is relevant to the patch), and whom to make pull requests to.

Quoted 4 lines

[Lu Yangbo-B47093] But sooner or later we need to do this for files in fsl/ ... :)

Hi Leo, do you have any idea?

I think it would be ok to put both linuxppc and linux-arm mailing lists here. Driver doesn't fall into any of the functional based sub-systems would very likely be platform stuff. And if patch author has the knowledge that a patch only impacts one arch, he can remove the other list to reduce the spam.

Quoted 28 lines
Quoted 11 lines

MAINTAINERS F: drivers/net/ethernet/freescale/fec_ptp.c · line 4644

Quoted 8 lines
MAINTAINERS +5 -0
+FREESCALE GUTS DRIVER
+M: Yangbo Lu <[email protected]>
+L: linuxppc-dev at lists.ozlabs.org
+S: Maintained
+F: drivers/soc/fsl/guts.c

What about the header?

Quoted 1 line

Does guts really need a separate maintainer from drivers/soc/fsl?

[Lu Yangbo-B47093] I was hesitating to add the maintainer...
And I was not so familiar with it. Let me leave it to the fsl/ directory and remove this...

Quoted 8 lines

-Scott

--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo at vger.kernel.org More majordomo info at
http://vger.kernel.org/majordomo-info.html

_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev at lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Signature · 1 line
- Leo
author
#12 lore raw

RE: [v8, 6/7] MAINTAINERS: add entry for Freescale SoC specific driver

Hi Leo and Scott,

Quoted 80 lines

-----Original Message-----
From: Leo Li [mailto:pku.leo at gmail.com]
Sent: Wednesday, May 04, 2016 4:06 AM
To: Yangbo Lu
Cc: Scott Wood; Yang-Leo Li; linux-mmc at vger.kernel.org; linuxppc- dev at lists.ozlabs.org; linux-arm-kernel at lists.infradead.org; linux- kernel at vger.kernel.org; ulf.hansson at linaro.org; Zhao Qiang; Russell King; Bhupesh Sharma; Xiaobo Xie; Scott Wood; Claudiu Manoil; Kumar Gala
Subject: Re: [v8, 6/7] MAINTAINERS: add entry for Freescale SoC specific driver

Quoted 38 lines · Yangbo Lu

Hi Scott and Leo,

Quoted 35 lines

-----Original Message-----
From: linux-mmc-owner at vger.kernel.org [mailto:linux-mmc- owner at vger.kernel.org] On Behalf Of Scott Wood
Sent: Saturday, April 23, 2016 7:23 AM
To: Yangbo Lu; linux-mmc at vger.kernel.org;
linuxppc-dev at lists.ozlabs.org; linux-arm-kernel at lists.infradead.org; linux-kernel at vger.kernel.org
Cc: ulf.hansson at linaro.org; Zhao Qiang; Russell King; Bhupesh Sharma; Scott Wood; Claudiu Manoil; Kumar Gala; Yang-Leo Li; Xiaobo Xie; Michael Ellerman
Subject: Re: [v8, 6/7] MAINTAINERS: add entry for Freescale SoC specific driver

Quoted 21 lines · Yangbo Lu

Add maintainer entry for Freescale SoC specific driver including the QE library and the GUTS driver. Also add entry for GUTS driver and add maintainer for QE library.

---
Changes for v8:
- Added this patch

---
 MAINTAINERS | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)
MAINTAINERS index 1d5b4be..d20aeb6 renamed from MAINTAINERS +0 -0

100644

MAINTAINERS +0 -0
@@ -4622,13 +4622,27 @@ F:

drivers/net/ethernet/freescale/fec_ptp.c
F: drivers/net/ethernet/freescale/fec.h
F: Documentation/devicetree/bindings/net/fsl-fec.txt

Quoted 10 lines
Quoted 3 lines
Quoted 1 line

+FREESCALE SOC SPECIFIC DRIVER

FREESCALE SOC DRIVERS

[Lu Yangbo-B47093] Ok, will change it to 'FREESCALE SOC DRIVERS'.

Quoted 4 lines
Quoted 2 lines

+M: Scott Wood <[email protected]>

Please CC me at this address, not the NXP address that you sent this

to...

Quoted 2 lines

[Lu Yangbo-B47093] Sorry for mistaking your email. Will send the one

you said.

Quoted 12 lines
Quoted 11 lines

MAINTAINERS F: drivers/net/ethernet/freescale/fec_ptp.c · line 4630

Quoted 6 lines
MAINTAINERS +4 -0
+L: linuxppc-dev at lists.ozlabs.org
+S: Maintained
+F: drivers/soc/fsl/
+F: include/linux/fsl/

This directory will contain drivers that work on PPC and ARM... I'm not sure what to put here in terms of mailing lists (we could put both, but people probably shouldn't spam both lists if only one arch is relevant to the patch), and whom to make pull requests to.

Quoted 1 line

[Lu Yangbo-B47093] But sooner or later we need to do this for files in

fsl/ ...

Quoted 2 lines

:)

Quoted 8 lines
Quoted 1 line

Hi Leo, do you have any idea?

I think it would be ok to put both linuxppc and linux-arm mailing lists here. Driver doesn't fall into any of the functional based sub-systems would very likely be platform stuff. And if patch author has the knowledge that a patch only impacts one arch, he can remove the other list to reduce the spam.

[Lu Yangbo-B47093] Thanks a lot. I will update the patchset later adding the two mailing lists.

Quoted 34 lines
Quoted 11 lines
Quoted 11 lines

MAINTAINERS F: drivers/net/ethernet/freescale/fec_ptp.c · line 4644

Quoted 8 lines
MAINTAINERS +5 -0
+FREESCALE GUTS DRIVER
+M: Yangbo Lu <[email protected]>
+L: linuxppc-dev at lists.ozlabs.org
+S: Maintained
+F: drivers/soc/fsl/guts.c

What about the header?

Quoted 4 lines
Quoted 1 line

Does guts really need a separate maintainer from drivers/soc/fsl?

[Lu Yangbo-B47093] I was hesitating to add the maintainer... And I was not so familiar with it. Let me leave it to the fsl/

directory and remove this...

Quoted 5 lines
Quoted 5 lines

-Scott

Quoted 8 lines
Quoted 4 lines

--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo at vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev at lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

--
- Leo

author
#13 lore raw

PATCH v8 7/7 mmc: sdhci-of-esdhc: fix host version for T4240-R1.0-R2.0

In reply to 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. This patch adds the GUTS driver support for eSDHC driver to get SVR(System version register). And fix host version to avoid that incorrect version numbers break down the ADMA data transfer.

---
Changes for v2:
- Got SVR through iomap instead of dts
Changes for v3:
- Managed GUTS through syscon instead of iomap in eSDHC driver
Changes for v4:
- Got SVR by GUTS driver instead of SYSCON
Changes for v5:
- Changed to get SVR through API fsl_guts_get_svr()
- Combined patch 4, patch 5 and patch 6 into one
Changes for v6:
- Added 'Acked-by: Ulf Hansson'
Changes for v7:
- None
Changes for v8:
- Added 'Acked-by: Scott Wood'

---
 drivers/mmc/host/Kconfig          |  1 +
 drivers/mmc/host/sdhci-of-esdhc.c | 23 +++++++++++++++++++++++
 2 files changed, 24 insertions(+)
drivers/mmc/host/Kconfig +1 -0
index e657af0..d480742 100644
@@ -143,6 +143,7 @@ config MMC_SDHCI_OF_ESDHC
 	depends on MMC_SDHCI_PLTFM
 	depends on PPC || ARCH_MXC || ARCH_LAYERSCAPE
 	select MMC_SDHCI_IO_ACCESSORS
+	select FSL_GUTS
 	help
 	  This selects the Freescale eSDHC controller support.
 
drivers/mmc/host/sdhci-of-esdhc.c +23 -0
index 3f34d35..68cc020 100644
@@ -18,6 +18,8 @@
 #include <linux/of.h>
 #include <linux/delay.h>
 #include <linux/module.h>
+#include <linux/fsl/svr.h>
+#include <linux/fsl/guts.h>
 #include <linux/mmc/host.h>
 #include "sdhci-pltfm.h"
 #include "sdhci-esdhc.h"
@@ -28,6 +30,8 @@
 struct sdhci_esdhc {
 	u8 vendor_ver;
 	u8 spec_ver;
+	u32 soc_ver;
+	u8 soc_rev;
 };
 
 /**
@@ -73,6 +77,8 @@ static u32 esdhc_readl_fixup(struct sdhci_host *host,
 static u16 esdhc_readw_fixup(struct sdhci_host *host,
 				     int spec_reg, u32 value)
 {
+	struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
+	struct sdhci_esdhc *esdhc = sdhci_pltfm_priv(pltfm_host);
 	u16 ret;
 	int shift = (spec_reg & 0x2) * 8;
 
@@ -80,6 +86,13 @@ static u16 esdhc_readw_fixup(struct sdhci_host *host,
 		ret = value & 0xffff;
 	else
 		ret = (value >> shift) & 0xffff;
+
+	/* Workaround for T4240-R1.0-R2.0 eSDHC which has incorrect
+	 * vendor version and spec version information.
+	 */
+	if ((spec_reg == SDHCI_HOST_VERSION) &&
+	    (esdhc->soc_ver == SVR_T4240) && (esdhc->soc_rev <= 0x20))
+		ret = (VENDOR_V_23 << SDHCI_VENDOR_VER_SHIFT) | SDHCI_SPEC_200;
 	return ret;
 }
 
@@ -567,10 +580,20 @@ static void esdhc_init(struct platform_device *pdev, struct sdhci_host *host)
 	struct sdhci_pltfm_host *pltfm_host;
 	struct sdhci_esdhc *esdhc;
 	u16 host_ver;
+	u32 svr;
 
 	pltfm_host = sdhci_priv(host);
 	esdhc = sdhci_pltfm_priv(pltfm_host);
 
+	fsl_guts_init();
+	svr = fsl_guts_get_svr();
+	if (svr) {
+		esdhc->soc_ver = SVR_SOC_VER(svr);
+		esdhc->soc_rev = SVR_REV(svr);
+	} else {
+		dev_err(&pdev->dev, "Failed to get SVR value!\n");
+	}
+
 	host_ver = sdhci_readw(host, SDHCI_HOST_VERSION);
 	esdhc->vendor_ver = (host_ver & SDHCI_VENDOR_VER_MASK) >>
 			     SDHCI_VENDOR_VER_SHIFT;
Signature · 1 line
2.1.0.27.g96db324