gpio: mpc8xxx_gpio: fix a bug on ls1046ardb
Subsystems (2)
PATCH 1/15 gpio: mpc8xxx_gpio: fix a bug on ls1046ardb
From: Biwen Li <[email protected]>
Fix a bug as belows,
=> gpio status -a
"Synchronous Abort" handler, esr 0x96000061
elr: 0000000082047964 lr : 0000000082047960 (reloc)
elr: 00000000fbd72964 lr : 00000000fbd72960 x0 : 00000000ffffffff x1 : 000000000000000a x2 : 0000000000000020 x3 : 0000000000000001 x4 : 0000000000000000 x5 : 0000000000000030 x6 : 0000000000000020 x7 : 0000000000000002 x8 : 00000000ffffffe0 x9 : 0000000000000008
x10: 0000000000000010 x11: 0000000000000006
x12: 000000000001869f x13: 0000000000000230
x14: 00000000fbc23e9c x15: 00000000ffffffff
...
reseting
--- .../asm/arch-fsl-layerscape/immap_lsch3.h | 10 +++++ drivers/gpio/mpc8xxx_gpio.c | 45 +++---------------- 2 files changed, 17 insertions(+), 38 deletions(-)
arch/arm/include/asm/arch-fsl-layerscape/immap_lsch3.h +10 -0
@@ -589,5 +589,15 @@ struct ccsr_serdes {u8 res5[0x19fc -0xa00 ]; }; +struct ccsr_gpio { +u32 gpdir; +u32 gpodr; +u32 gpdat; +u32 gpier; +u32 gpimr; +u32 gpicr; +u32 gpibe; +}; +#endif /*__ASSEMBLY__ */ #endif /* __ARCH_FSL_LSCH3_IMMAP_H_ */
drivers/gpio/mpc8xxx_gpio.c +7 -38
66 lines not on this page · raw message
Signature · 1 line
2.17.1
PATCH 2/15 arm: dts: ls1021a: add gpio node
From: Biwen Li <[email protected]>
Add gpio node for SoC LS1021A
--- arch/arm/dts/ls1021a.dtsi | 40 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+)
arch/arm/dts/ls1021a.dtsi +40 -0
@@ -98,6 +98,46 @@ bus-width = <4>; }; + gpio0: gpio at 2300000 { + compatible = "fsl,ls1021a-gpio", "fsl,qoriq-gpio"; + reg = <0x0 0x2300000 0x0 0x10000>; + interrupts = <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + }; + + gpio1: gpio at 2310000 { + compatible = "fsl,ls1021a-gpio", "fsl,qoriq-gpio"; + reg = <0x0 0x2310000 0x0 0x10000>; + interrupts = <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + }; + + gpio2: gpio at 2320000 { + compatible = "fsl,ls1021a-gpio", "fsl,qoriq-gpio"; + reg = <0x0 0x2320000 0x0 0x10000>; + interrupts = <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + }; + + gpio3: gpio at 2330000 { + compatible = "fsl,ls1021a-gpio", "fsl,qoriq-gpio"; + reg = <0x0 0x2330000 0x0 0x10000>; + interrupts = <GIC_SPI 166 IRQ_TYPE_LEVEL_HIGH>; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + }; + scfg: scfg at 1570000 { compatible = "fsl,ls1021a-scfg", "syscon"; reg = <0x1570000 0x10000>;
Signature · 1 line
2.17.1
PATCH 3/15 arm64: dts: ls1012a: add gpio node
In reply to Biwen LiFrom: Biwen Li <[email protected]>
Add gpio node for SoC LS1012A
--- arch/arm/dts/fsl-ls1012a.dtsi | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+)
arch/arm/dts/fsl-ls1012a.dtsi +20 -0
@@ -70,6 +70,26 @@ bus-width = <4>; }; + gpio0: gpio at 2300000 { + compatible = "fsl,qoriq-gpio"; + reg = <0x0 0x2300000 0x0 0x10000>; + interrupts = <0 66 0x4>; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + }; + + gpio1: gpio at 2310000 { + compatible = "fsl,qoriq-gpio"; + reg = <0x0 0x2310000 0x0 0x10000>; + interrupts = <0 67 0x4>; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + }; + i2c0: i2c at 2180000 { compatible = "fsl,vf610-i2c"; #address-cells = <1>;
Signature · 1 line
2.17.1
PATCH 4/15 arm64: dts: ls1028a: add gpio node
In reply to Biwen LiFrom: Biwen Li <[email protected]>
Add gpio node for SoC LS1028A
--- arch/arm/dts/fsl-ls1028a.dtsi | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+)
arch/arm/dts/fsl-ls1028a.dtsi +33 -0
@@ -380,6 +380,39 @@ status = "disabled"; }; + gpio0: gpio at 2300000 { + compatible = "fsl,ls1028a-gpio","fsl,qoriq-gpio"; + reg = <0x0 0x2300000 0x0 0x10000>; + interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + little-endian; + }; + + gpio1: gpio at 2310000 { + compatible = "fsl,ls1028a-gpio","fsl,qoriq-gpio"; + reg = <0x0 0x2310000 0x0 0x10000>; + interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + little-endian; + }; + + gpio2: gpio at 2320000 { + compatible = "fsl,ls1028a-gpio","fsl,qoriq-gpio"; + reg = <0x0 0x2320000 0x0 0x10000>; + interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + little-endian; + }; + sata: sata at 3200000 { compatible = "fsl,ls1028a-ahci"; reg = <0x0 0x3200000 0x0 0x10000 /* ccsr sata base */
Signature · 1 line
2.17.1
PATCH 5/15 arm64: dts: ls1043a: add gpio node
In reply to Biwen LiFrom: Biwen Li <[email protected]>
Add gpio node for SoC LS1043A
--- arch/arm/dts/fsl-ls1043a.dtsi | 40 +++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+)
arch/arm/dts/fsl-ls1043a.dtsi +40 -0
@@ -78,6 +78,46 @@ bus-width = <4>; }; + gpio0: gpio at 2300000 { + compatible = "fsl,ls1043a-gpio", "fsl,qoriq-gpio"; + reg = <0x0 0x2300000 0x0 0x10000>; + interrupts = <0 66 0x4>; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + }; + + gpio1: gpio at 2310000 { + compatible = "fsl,ls1043a-gpio", "fsl,qoriq-gpio"; + reg = <0x0 0x2310000 0x0 0x10000>; + interrupts = <0 67 0x4>; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + }; + + gpio2: gpio at 2320000 { + compatible = "fsl,ls1043a-gpio", "fsl,qoriq-gpio"; + reg = <0x0 0x2320000 0x0 0x10000>; + interrupts = <0 68 0x4>; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + }; + + gpio3: gpio at 2330000 { + compatible = "fsl,ls1043a-gpio", "fsl,qoriq-gpio"; + reg = <0x0 0x2330000 0x0 0x10000>; + interrupts = <0 134 0x4>; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + }; + ifc: ifc at 1530000 { compatible = "fsl,ifc", "simple-bus"; reg = <0x0 0x1530000 0x0 0x10000>;
Signature · 1 line
2.17.1
PATCH 6/15 arm64: dts: ls1046a: add gpio node
In reply to Biwen LiFrom: Biwen Li <[email protected]>
Add gpio node for SoC LS1046A
--- arch/arm/dts/fsl-ls1046a.dtsi | 40 +++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+)
arch/arm/dts/fsl-ls1046a.dtsi +40 -0
@@ -78,6 +78,46 @@ bus-width = <4>; }; + gpio0: gpio at 2300000 { + compatible = "fsl,qoriq-gpio"; + reg = <0x0 0x2300000 0x0 0x10000>; + interrupts = <0 66 4>; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + }; + + gpio1: gpio at 2310000 { + compatible = "fsl,qoriq-gpio"; + reg = <0x0 0x2310000 0x0 0x10000>; + interrupts = <0 67 4>; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + }; + + gpio2: gpio at 2320000 { + compatible = "fsl,qoriq-gpio"; + reg = <0x0 0x2320000 0x0 0x10000>; + interrupts = <0 68 4>; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + }; + + gpio3: gpio at 2330000 { + compatible = "fsl,qoriq-gpio"; + reg = <0x0 0x2330000 0x0 0x10000>; + interrupts = <0 134 4>; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + }; + ifc: ifc at 1530000 { compatible = "fsl,ifc", "simple-bus"; reg = <0x0 0x1530000 0x0 0x10000>;
Signature · 1 line
2.17.1
PATCH 7/15 arm64: dts: ls1088a: add gpio node
In reply to Biwen LiFrom: Biwen Li <[email protected]>
Add gpio node for SoC LS1088A
--- arch/arm/dts/fsl-ls1088a.dtsi | 46 +++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+)
arch/arm/dts/fsl-ls1088a.dtsi +46 -0
@@ -3,7 +3,9 @@ * NXP ls1088a SOC common device tree source * * Copyright 2017 NXP + * Copyright 2020 NXP */ +#include <dt-bindings/interrupt-controller/arm-gic.h> / { compatible = "fsl,ls1088a";
@@ -115,6 +117,50 @@ bus-width = <4>; }; + gpio0: gpio at 2300000 { + compatible = "fsl,ls1088a-gpio", "fsl,qoriq-gpio"; + reg = <0x0 0x2300000 0x0 0x10000>; + interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>; + little-endian; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + }; + + gpio1: gpio at 2310000 { + compatible = "fsl,ls1088a-gpio", "fsl,qoriq-gpio"; + reg = <0x0 0x2310000 0x0 0x10000>; + interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>; + little-endian; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + }; + + gpio2: gpio at 2320000 { + compatible = "fsl,ls1088a-gpio", "fsl,qoriq-gpio"; + reg = <0x0 0x2320000 0x0 0x10000>; + interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>; + little-endian; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + }; + + gpio3: gpio at 2330000 { + compatible = "fsl,ls1088a-gpio", "fsl,qoriq-gpio"; + reg = <0x0 0x2330000 0x0 0x10000>; + interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>; + little-endian; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + }; + ifc: ifc at 1530000 { compatible = "fsl,ifc", "simple-bus"; reg = <0x0 0x2240000 0x0 0x20000>;
Signature · 1 line
2.17.1
PATCH 8/15 arm64: dts: ls208xa: add gpio node
In reply to Biwen LiFrom: Biwen Li <[email protected]>
Add gpio node for SoC LS208xA
--- arch/arm/dts/fsl-ls2080a.dtsi | 45 +++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+)
arch/arm/dts/fsl-ls2080a.dtsi +45 -0
@@ -3,6 +3,7 @@ * Freescale ls2080a SOC common device tree source * * Copyright 2013-2015 Freescale Semiconductor, Inc. + * Copyright 2020 NXP */ / {
@@ -119,6 +120,50 @@ bus-width = <4>; }; + gpio0: gpio at 2300000 { + compatible = "fsl,ls2080a-gpio", "fsl,qoriq-gpio"; + reg = <0x0 0x2300000 0x0 0x10000>; + interrupts = <0 36 0x4>; /* Level high type */ + gpio-controller; + little-endian; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + }; + + gpio1: gpio at 2310000 { + compatible = "fsl,ls2080a-gpio", "fsl,qoriq-gpio"; + reg = <0x0 0x2310000 0x0 0x10000>; + interrupts = <0 36 0x4>; /* Level high type */ + gpio-controller; + little-endian; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + }; + + gpio2: gpio at 2320000 { + compatible = "fsl,ls2080a-gpio", "fsl,qoriq-gpio"; + reg = <0x0 0x2320000 0x0 0x10000>; + interrupts = <0 37 0x4>; /* Level high type */ + gpio-controller; + little-endian; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + }; + + gpio3: gpio at 2330000 { + compatible = "fsl,ls2080a-gpio", "fsl,qoriq-gpio"; + reg = <0x0 0x2330000 0x0 0x10000>; + interrupts = <0 37 0x4>; /* Level high type */ + gpio-controller; + little-endian; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + }; + usb0: usb3 at 3100000 { compatible = "fsl,layerscape-dwc3"; reg = <0x0 0x3100000 0x0 0x10000>;
Signature · 1 line
2.17.1
PATCH 9/15 configs: ls1012a: enable CONFIG_MPC8XXX_GPIO
In reply to Biwen LiFrom: Biwen Li <[email protected]>
Enable CONFIG_MPC8XXX_GPIO for SoC LS1012A
--- include/configs/ls1012a_common.h | 10 ++++++++++ 1 file changed, 10 insertions(+)
include/configs/ls1012a_common.h +10 -0
@@ -62,6 +62,16 @@#define CONFIG_I2C_DEFAULT_BUS_NUMBER 0#endif +/* GPIO */ +#ifdef CONFIG_DM_GPIO +#ifndef CONFIG_MPC8XXX_GPIO +#define CONFIG_MPC8XXX_GPIO +#endif +#ifndef CONFIG_CMD_GPIO +#define CONFIG_CMD_GPIO +#endif +#endif +#define CONFIG_SYS_NS16550_SERIAL #define CONFIG_SYS_NS16550_REG_SIZE 1#define CONFIG_SYS_NS16550_CLK (get_serial_clock())
Signature · 1 line
2.17.1
PATCH 10/15 configs: ls1043a: enable CONFIG_MPC8XXX_GPIO
In reply to Biwen LiFrom: Biwen Li <[email protected]>
Enable CONFIG_MPC8XXX_GPIO for SoC LS1043A
--- include/configs/ls1043a_common.h | 10 ++++++++++ 1 file changed, 10 insertions(+)
include/configs/ls1043a_common.h +10 -0
@@ -119,6 +119,16 @@#endif +/* GPIO */ +#ifdef CONFIG_DM_GPIO +#ifndef CONFIG_MPC8XXX_GPIO +#define CONFIG_MPC8XXX_GPIO +#endif +#ifndef CONFIG_CMD_GPIO +#define CONFIG_CMD_GPIO +#endif +#endif +/* IFC */ #ifndef SPL_NO_IFC #if defined(CONFIG_TFABOOT) || \
Signature · 1 line
2.17.1
PATCH 10/15 configs: ls1043a: enable CONFIG_MPC8XXX_GPIO
Quoted 40 lines
-----Original Message-----
From: Biwen Li <[email protected]>
Sent: Friday, October 16, 2020 2:42 PM
To: Priyanka Jain <[email protected]>
Cc: Jiafei Pan <[email protected]>; u-boot at lists.denx.de; Xiaobo Xie <[email protected]>; Biwen Li <[email protected]>
Subject: [PATCH 10/15] configs: ls1043a: enableCONFIG_MPC8XXX_GPIOFrom: Biwen Li <[email protected]>
Enable
CONFIG_MPC8XXX_GPIOfor SoC LS1043ASigned-off-by Biwen Li <[email protected]>---
include/configs/ls1043a_common.h| 10 ++++++++++1 file changed, 10 insertions(+)include/configs/ls1043a_common.h +10
-1@@ -119,6 +119,16 @@#endif +/* GPIO */ +#ifdef CONFIG_DM_GPIO +#ifndef CONFIG_MPC8XXX_GPIO +#define CONFIG_MPC8XXX_GPIO +#endif +#ifndef CONFIG_CMD_GPIO +#define CONFIG_CMD_GPIO +#endif +#endif +/* IFC */ #ifndef SPL_NO_IFC #if defined(CONFIG_TFABOOT) || \ --
Quoted 1 line
2.17.1
Kindly fix below checkpatch error and similar error in other patches of this series:
ERROR: All commands are managed by Kconfig
#27: FILE: include/configs/ls1043a_common.h:128:
+#define CONFIG_CMD_GPIO
total: 1 errors, 0 warnings, 0 checks, 16 lines checked
Regards
Priyanka
PATCH 11/15 configs: ls1028a: enable CONFIG_MPC8XXX_GPIO
In reply to Biwen LiFrom: Biwen Li <[email protected]>
Enable CONFIG_MPC8XXX_GPIO for SoC LS1028A
--- include/configs/ls1028a_common.h | 10 ++++++++++ 1 file changed, 10 insertions(+)
include/configs/ls1028a_common.h +10 -0
@@ -36,6 +36,16 @@/* Size of malloc() pool */ #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 2048 * 1024) +/* GPIO */ +#ifdef CONFIG_DM_GPIO +#ifndef CONFIG_MPC8XXX_GPIO +#define CONFIG_MPC8XXX_GPIO +#endif +#ifndef CONFIG_CMD_GPIO +#define CONFIG_CMD_GPIO +#endif +#endif +/* I2C */ #ifndef CONFIG_DM_I2C #define CONFIG_SYS_I2C
Signature · 1 line
2.17.1
PATCH 11/15 configs: ls1028a: enable CONFIG_MPC8XXX_GPIO
Quoted 39 lines
-----Original Message-----
From: Biwen Li <[email protected]>
Sent: Friday, October 16, 2020 2:42 PM
To: Priyanka Jain <[email protected]>
Cc: Jiafei Pan <[email protected]>; u-boot at lists.denx.de; Xiaobo Xie <[email protected]>; Biwen Li <[email protected]>
Subject: [PATCH 11/15] configs: ls1028a: enableCONFIG_MPC8XXX_GPIOFrom: Biwen Li <[email protected]>
Enable
CONFIG_MPC8XXX_GPIOfor SoC LS1028ASigned-off-by Biwen Li <[email protected]>---
include/configs/ls1028a_common.h| 10 ++++++++++1 file changed, 10 insertions(+)include/configs/ls1028a_common.h +10
-0@@ -36,6 +36,16 @@/* Size of malloc() pool */ #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 2048 * 1024) +/* GPIO */ +#ifdef CONFIG_DM_GPIO +#ifndef CONFIG_MPC8XXX_GPIO +#define CONFIG_MPC8XXX_GPIO +#endif +#ifndef CONFIG_CMD_GPIO +#define CONFIG_CMD_GPIO +#endif +#endif +/* I2C */ #ifndef CONFIG_DM_I2C
Quoted 3 lines
#define
CONFIG_SYS_I2C
--
2.17.1
Kindly fix below checkpatch error:
ERROR: All commands are managed by Kconfig
#27: FILE: include/configs/ls1028a_common.h:45:
+#define CONFIG_CMD_GPIO
total: 1 errors, 0 warnings, 0 checks, 16 lines checked
Regards
Priyanka
PATCH 12/15 configs: ls1088a: enable CONFIG_MPC8XXX_GPIO
In reply to Biwen LiFrom: Biwen Li <[email protected]>
Enable CONFIG_MPC8XXX_GPIO for LS1088A
--- include/configs/ls1088a_common.h | 10 ++++++++++ 1 file changed, 10 insertions(+)
include/configs/ls1088a_common.h +10 -0
@@ -53,6 +53,16 @@/* Size of malloc() pool */ #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 2048 * 1024) +/* GPIO */ +#ifdef CONFIG_DM_GPIO +#ifndef CONFIG_MPC8XXX_GPIO +#define CONFIG_MPC8XXX_GPIO +#endif +#ifndef CONFIG_CMD_GPIO +#define CONFIG_CMD_GPIO +#endif +#endif +/* I2C */ #ifndef CONFIG_DM_I2C #define CONFIG_SYS_I2C
Signature · 1 line
2.17.1
PATCH 12/15 configs: ls1088a: enable CONFIG_MPC8XXX_GPIO
Quoted 39 lines
-----Original Message-----
From: Biwen Li <[email protected]>
Sent: Friday, October 16, 2020 2:42 PM
To: Priyanka Jain <[email protected]>
Cc: Jiafei Pan <[email protected]>; u-boot at lists.denx.de; Xiaobo Xie <[email protected]>; Biwen Li <[email protected]>
Subject: [PATCH 12/15] configs: ls1088a: enableCONFIG_MPC8XXX_GPIOFrom: Biwen Li <[email protected]>
Enable
CONFIG_MPC8XXX_GPIOfor LS1088ASigned-off-by Biwen Li <[email protected]>---
include/configs/ls1088a_common.h| 10 ++++++++++1 file changed, 10 insertions(+)include/configs/ls1088a_common.h +10
-0@@ -53,6 +53,16 @@/* Size of malloc() pool */ #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 2048 * 1024) +/* GPIO */ +#ifdef CONFIG_DM_GPIO +#ifndef CONFIG_MPC8XXX_GPIO +#define CONFIG_MPC8XXX_GPIO +#endif +#ifndef CONFIG_CMD_GPIO +#define CONFIG_CMD_GPIO +#endif +#endif +/* I2C */ #ifndef CONFIG_DM_I2C
Quoted 3 lines
#define
CONFIG_SYS_I2C
--
2.17.1
Kindly fix below checkpatch error:
ERROR: All commands are managed by Kconfig
#29: FILE: include/configs/ls1088a_common.h:62:
+#define CONFIG_CMD_GPIO
total: 1 errors, 0 warnings, 0 checks, 16 lines checked
Regards
Priyanka
PATCH 13/15 configs: ls208xa: enable CONFIG_MPC8XXX_GPIO
In reply to Biwen LiFrom: Biwen Li <[email protected]>
Enable CONFIG_MPC8XXX_GPIO for LS208xA
--- include/configs/ls2080a_common.h | 10 ++++++++++ 1 file changed, 10 insertions(+)
include/configs/ls2080a_common.h +10 -0
@@ -66,6 +66,16 @@/* Size of malloc() pool */ #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 2048 * 1024) +/* GPIO */ +#ifdef CONFIG_DM_GPIO +#ifndef CONFIG_MPC8XXX_GPIO +#define CONFIG_MPC8XXX_GPIO +#endif +#ifndef CONFIG_CMD_GPIO +#define CONFIG_CMD_GPIO +#endif +#endif +/* I2C */ #ifndef CONFIG_DM_I2C #define CONFIG_SYS_I2C
Signature · 1 line
2.17.1
PATCH 13/15 configs: ls208xa: enable CONFIG_MPC8XXX_GPIO
Quoted 39 lines
-----Original Message-----
From: Biwen Li <[email protected]>
Sent: Friday, October 16, 2020 2:42 PM
To: Priyanka Jain <[email protected]>
Cc: Jiafei Pan <[email protected]>; u-boot at lists.denx.de; Xiaobo Xie <[email protected]>; Biwen Li <[email protected]>
Subject: [PATCH 13/15] configs: ls208xa: enableCONFIG_MPC8XXX_GPIOFrom: Biwen Li <[email protected]>
Enable
CONFIG_MPC8XXX_GPIOfor LS208xASigned-off-by Biwen Li <[email protected]>---
include/configs/ls2080a_common.h| 10 ++++++++++1 file changed, 10 insertions(+)include/configs/ls2080a_common.h +10
-0@@ -66,6 +66,16 @@/* Size of malloc() pool */ #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 2048 * 1024) +/* GPIO */ +#ifdef CONFIG_DM_GPIO +#ifndef CONFIG_MPC8XXX_GPIO +#define CONFIG_MPC8XXX_GPIO +#endif +#ifndef CONFIG_CMD_GPIO +#define CONFIG_CMD_GPIO +#endif +#endif +/* I2C */ #ifndef CONFIG_DM_I2C
Quoted 3 lines
#define
CONFIG_SYS_I2C
--
2.17.1
Kindly fix below checkpatch error:
ERROR: All commands are managed by Kconfig
#29: FILE: include/configs/ls2080a_common.h:75:
+#define CONFIG_CMD_GPIO
total: 1 errors, 0 warnings, 0 checks, 16 lines checked
Regards
Priyanka
PATCH 14/15 configs: lx2160a: enable CONFIG_MPC8XXX_GPIO
In reply to Biwen LiFrom: Biwen Li <[email protected]>
Enable CONFIG_MPC8XXX_GPIO for SoC LX2160A
--- include/configs/lx2160a_common.h | 10 ++++++++++ 1 file changed, 10 insertions(+)
include/configs/lx2160a_common.h +10 -0
@@ -158,6 +158,16 @@#define NXP_FSPI_FLASH_NUM 1#endif +/* GPIO */ +#ifdef CONFIG_DM_GPIO +#ifndef CONFIG_MPC8XXX_GPIO +#define CONFIG_MPC8XXX_GPIO +#endif +#ifndef CONFIG_CMD_GPIO +#define CONFIG_CMD_GPIO +#endif +#endif +#ifndef __ASSEMBLY__unsigned long get_board_sys_clk (void );unsigned long get_board_ddr_clk (void );
Signature · 1 line
2.17.1
PATCH 14/15 configs: lx2160a: enable CONFIG_MPC8XXX_GPIO
Quoted 40 lines
-----Original Message-----
From: Biwen Li <[email protected]>
Sent: Friday, October 16, 2020 2:42 PM
To: Priyanka Jain <[email protected]>
Cc: Jiafei Pan <[email protected]>; u-boot at lists.denx.de; Xiaobo Xie <[email protected]>; Biwen Li <[email protected]>
Subject: [PATCH 14/15] configs: lx2160a: enableCONFIG_MPC8XXX_GPIOFrom: Biwen Li <[email protected]>
Enable
CONFIG_MPC8XXX_GPIOfor SoC LX2160ASigned-off-by Biwen Li <[email protected]>---
include/configs/lx2160a_common.h| 10 ++++++++++1 file changed, 10 insertions(+)include/configs/lx2160a_common.h +10
-1@@ -158,6 +158,16 @@#define NXP_FSPI_FLASH_NUM 1#endif +/* GPIO */ +#ifdef CONFIG_DM_GPIO +#ifndef CONFIG_MPC8XXX_GPIO +#define CONFIG_MPC8XXX_GPIO +#endif +#ifndef CONFIG_CMD_GPIO +#define CONFIG_CMD_GPIO +#endif +#endif +#ifndef __ASSEMBLY__unsigned long get_board_sys_clk (void );unsigned long get_board_ddr_clk (void ); --
Quoted 1 line
2.17.1
Kindly fix below checkpatch error:
ERROR: All commands are managed by Kconfig
#27: FILE: include/configs/lx2160a_common.h:169:
+#define CONFIG_CMD_GPIO
total: 1 errors, 0 warnings, 0 checks, 16 lines checked
Regards
Priyanka
PATCH 15/15 configs: ls1046a: enable MPC8XXX_GPIO
In reply to Biwen LiFrom: Biwen Li <[email protected]>
Enable MPC8XXX_GPIO for SoC LS1046A
--- include/configs/ls1046a_common.h | 10 ++++++++++ 1 file changed, 10 insertions(+)
include/configs/ls1046a_common.h +10 -0
@@ -126,6 +126,16 @@#define CONFIG_SYS_MONITOR_LEN 0xa0000#endif +/* GPIO */ +#ifdef CONFIG_DM_GPIO +#ifndef CONFIG_MPC8XXX_GPIO +#define CONFIG_MPC8XXX_GPIO +#endif +#ifndef CONFIG_CMD_GPIO +#define CONFIG_CMD_GPIO +#endif +#endif +/* I2C */ #ifndef CONFIG_DM_I2C #define CONFIG_SYS_I2C
Signature · 1 line
2.17.1
PATCH 15/15 configs: ls1046a: enable MPC8XXX_GPIO
Quoted 40 lines
-----Original Message-----
From: Biwen Li <[email protected]>
Sent: Friday, October 16, 2020 2:42 PM
To: Priyanka Jain <[email protected]>
Cc: Jiafei Pan <[email protected]>; u-boot at lists.denx.de; Xiaobo Xie <[email protected]>; Biwen Li <[email protected]>
Subject: [PATCH 15/15] configs: ls1046a: enableMPC8XXX_GPIOFrom: Biwen Li <[email protected]>
Enable
MPC8XXX_GPIOfor SoC LS1046ASigned-off-by Biwen Li <[email protected]>---
include/configs/ls1046a_common.h| 10 ++++++++++1 file changed, 10 insertions(+)include/configs/ls1046a_common.h +10
-1@@ -126,6 +126,16 @@#define CONFIG_SYS_MONITOR_LEN 0xa0000#endif +/* GPIO */ +#ifdef CONFIG_DM_GPIO +#ifndef CONFIG_MPC8XXX_GPIO +#define CONFIG_MPC8XXX_GPIO +#endif +#ifndef CONFIG_CMD_GPIO +#define CONFIG_CMD_GPIO +#endif +#endif +/* I2C */ #ifndef CONFIG_DM_I2C #define CONFIG_SYS_I2C --
Quoted 1 line
2.17.1
Kindly fix below checkpatch error:
ERROR: All commands are managed by Kconfig
#27: FILE: include/configs/ls1046a_common.h:135:
+#define CONFIG_CMD_GPIO
total: 1 errors, 0 warnings, 0 checks, 16 lines checked
Regards
Priyanka
PATCH 1/15 gpio: mpc8xxx_gpio: fix a bug on ls1046ardb
In reply to Biwen LiHi Priyanka,
These patches depend on the patch("[V3] gpio: mpc8xxx: support fsl-layerscape platform" , https://patchwork.ozlabs.org/project/uboot/patch/20200924134050.8618-1-hui.song_1 at nxp.com/),
Best Regads,
Biwen Li
Quoted 125 lines
To: Priyanka Jain <[email protected]>
Cc: Jiafei Pan <[email protected]>; u-boot at lists.denx.de; Xiaobo Xie <[email protected]>; Biwen Li <[email protected]>
Subject: [PATCH 01/15] gpio:mpc8xxx_gpio: fix a bug on ls1046ardbFrom: Biwen Li <[email protected]>
Fix a bug as belows,
=> gpio status -a
"Synchronous Abort" handler, esr0x96000061
elr: 0000000082047964 lr : 0000000082047960 (reloc)
elr:00000000fbd72964lr :00000000fbd72960x0 :00000000ffffffffx1 :000000000000000ax2 : 0000000000000020 x3 : 0000000000000001 x4 : 0000000000000000 x5 : 0000000000000030 x6 : 0000000000000020 x7 : 0000000000000002 x8 :00000000ffffffe0x9 : 0000000000000008
x10: 0000000000000010 x11: 0000000000000006
x12:000000000001869fx13: 0000000000000230
x14:00000000fbc23e9cx15:00000000ffffffff... resetingSigned-off-by Biwen Li <[email protected]>--- .../asm/arch-fsl-layerscape/immap_lsch3.h | 10 +++++ drivers/gpio/mpc8xxx_gpio.c | 45 +++---------------- 2 files changed, 17 insertions(+), 38 deletions(-)arch/arm/include/asm/arch-fsl-layerscape/immap_lsch3.h +10
-0@@ -589,5 +589,15 @@ struct ccsr_serdes {u8 res5[0x19fc -0xa00 ]; }; +struct ccsr_gpio { +u32 gpdir; +u32 gpodr; +u32 gpdat; +u32 gpier; +u32 gpimr; +u32 gpicr; +u32 gpibe; +}; +#endif /*__ASSEMBLY__ */ #endif /* __ARCH_FSL_LSCH3_IMMAP_H_ */ drivers/gpio/mpc8xxx_gpio.c index renamed from drivers/gpio/mpc8xxx_gpio.c +0
-0
27881a7322..e7fc45d4f5100644drivers/gpio/mpc8xxx_gpio.c +8
-39@@ -16,16 +16,6 @@#include <asm/io.h> #include <dm/of_access.h> -struct ccsr_gpio { -u32 gpdir; -u32 gpodr; -u32 gpdat; -u32 gpier; -u32 gpimr; -u32 gpicr; -u32 gpibe; -}; -struct mpc8xxx_gpio_data {/* The bank's register base in memory */ struct ccsr_gpio __iomem *base;@@ -187,32 +177,11 @@ static int mpc8xxx_gpio_ofdata_to_platdata(struct udevice *dev) {struct mpc8xxx_gpio_plat *plat =dev_get_platdata (dev);struct mpc8xxx_gpio_data *data =dev_get_priv (dev); -fdt_addr_t addr; -u32 i; -u32 reg[4 ]; -if (ofnode_read_bool (dev->node,"little-endian" )) +if (dev_read_bool (dev,"little-endian" )) data->little_endian = true; -if (data->little_endian) -dev_read_u32_array (dev,"reg" , reg,4 ); -else -dev_read_u32_array (dev,"reg" , reg,2 ); - -if (data->little_endian) { -for (i =0 ; i <2 ; i++) - reg[i] =be32_to_cpu (reg[i]); - } - - addr =dev_translate_address (dev, reg); - - plat->addr = addr; - -if (data->little_endian) - plat->size = reg[3 ]; -else - plat->size = reg[1 ]; - + plat->addr = (ulong )dev_read_addr_size_index (dev,0 , (fdt_size_t +*)&plat->size); plat->ngpios =dev_read_u32_default (dev,"ngpios" ,32 );return 0 ;@@ -257,11 +226,11 @@ static int mpc8xxx_gpio_probe(struct udevice *dev)if (!str)return -ENOMEM ; -if (ofnode_device_is_compatible (dev->node,"fsl,qoriq-gpio" )) { -unsigned long gpibe = data->addr +sizeof (struct ccsr_gpio ) - -sizeof (u32); - -out_be32 ((unsigned int *)gpibe,0xffffffff ); +if (device_is_compatible (dev,"fsl,qoriq-gpio" )) { +if (data->little_endian) +out_le32 (&data->base->gpibe,0xffffffff ); +else +out_be32 (&data->base->gpibe,0xffffffff ); } uc_priv->bank_name = str; --2.17.1