ARM: uniphier: use pinctrl drivers and some cleanups
Subsystems (5)
v2 cover ARM: uniphier: use pinctrl drivers and some cleanups
Masahiro Yamada (18):
pinctrl: uniphier: add UniPhier pinctrl core support
pinctrl: uniphier: add UniPhier PH1-LD4 pinctrl driver
pinctrl: uniphier: add UniPhier PH1-Pro4 pinctrl driver
pinctrl: uniphier: add UniPhier PH1-sLD8 pinctrl driver
pinctrl: uniphier: add UniPhier PH1-Pro5 pinctrl driver
pinctrl: uniphier: add UniPhier ProXstream2 pinctrl driver
pinctrl: uniphier: add UniPhier PH1-LD6b pinctrl driver
ARM: uniphier: enable simple-bus driver for SPL
ARM: uniphier: increase CONFIG_SYS_MALLOC_F_LEN to bind all nodes
ARM: dts: uniphier: prepare device trees to use pinctrl in SPL
ARM: uniphier: enable PINCTRL and SPL_PINCTRL
ARM: uniphier: drop ad-hoc early pin-muxing settings
ARM: uniphier: drop ad-hoc input enable settings
ARM: uniphier: drop DCC micro support card support
ARM: uniphier: enable setexpr command
ARM: uniphier: change the external bus address mapping
ARM: uniphier: remove ifdef CONFIG_{SOC} conditionals from sg-regs.h
ARM: uniphier: parse device tree to determine DRAM base and size
arch/arm/dts/uniphier-ph1-ld4-ref.dts | 16 ++- arch/arm/dts/uniphier-ph1-ld6b-ref.dts | 16 ++- arch/arm/dts/uniphier-ph1-pro4-ref.dts | 16 ++- arch/arm/dts/uniphier-ph1-sld8-ref.dts | 16 ++- arch/arm/mach-uniphier/Kconfig | 23 +--- arch/arm/mach-uniphier/Makefile | 3 +- arch/arm/mach-uniphier/board_common.c | 12 -- arch/arm/mach-uniphier/dram_init.c | 51 +++++++- arch/arm/mach-uniphier/include/mach/board.h | 6 +- arch/arm/mach-uniphier/include/mach/sg-regs.h | 40 +++--- arch/arm/mach-uniphier/ph1-ld4/Makefile | 7 +- arch/arm/mach-uniphier/ph1-ld4/early_pinctrl.c | 27 ---- arch/arm/mach-uniphier/ph1-ld4/lowlevel_debug.S | 4 +- arch/arm/mach-uniphier/ph1-ld4/pinctrl.c | 46 +++---- arch/arm/mach-uniphier/ph1-ld4/sbc_init.c | 12 +- arch/arm/mach-uniphier/ph1-ld4/sbc_init_3cs.c | 49 -------- arch/arm/mach-uniphier/ph1-ld4/sg_init.c | 18 --- arch/arm/mach-uniphier/ph1-pro4/Makefile | 7 +- arch/arm/mach-uniphier/ph1-pro4/early_pinctrl.c | 26 ---- arch/arm/mach-uniphier/ph1-pro4/lowlevel_debug.S | 4 +- arch/arm/mach-uniphier/ph1-pro4/pinctrl.c | 50 ++++---- arch/arm/mach-uniphier/ph1-pro4/sbc_init.c | 12 +- arch/arm/mach-uniphier/ph1-pro4/sbc_init_3cs.c | 42 ------- arch/arm/mach-uniphier/ph1-pro4/sg_init.c | 18 --- arch/arm/mach-uniphier/ph1-sld3/Makefile | 3 +- arch/arm/mach-uniphier/ph1-sld3/early_pinctrl.c | 12 +- arch/arm/mach-uniphier/ph1-sld3/lowlevel_debug.S | 4 +- arch/arm/mach-uniphier/ph1-sld3/pinctrl.c | 16 +-- arch/arm/mach-uniphier/ph1-sld3/sbc_init.c | 14 +-- arch/arm/mach-uniphier/ph1-sld3/sbc_init_3cs.c | 37 ------ arch/arm/mach-uniphier/ph1-sld8/early_pinctrl.c | 27 ---- arch/arm/mach-uniphier/ph1-sld8/lowlevel_debug.S | 4 +- arch/arm/mach-uniphier/ph1-sld8/pinctrl.c | 55 ++++---- arch/arm/mach-uniphier/ph1-sld8/sbc_init_3cs.c | 57 --------- arch/arm/mach-uniphier/ph1-sld8/sg_init.c | 1 - arch/arm/mach-uniphier/spl.c | 13 +- arch/arm/mach-uniphier/support_card.c | 89 ++----------- configs/ph1_ld4_defconfig | 7 +- configs/ph1_pro4_defconfig | 7 +- configs/ph1_sld3_defconfig | 3 +- configs/ph1_sld8_defconfig | 7 +- drivers/pinctrl/Kconfig | 2 + drivers/pinctrl/Makefile | 2 + drivers/pinctrl/uniphier/Kconfig | 42 +++++++ drivers/pinctrl/uniphier/Makefile | 8 ++ drivers/pinctrl/uniphier/pinctrl-ph1-ld4.c | 133 ++++++++++++++++++++ drivers/pinctrl/uniphier/pinctrl-ph1-ld6b.c | 133 ++++++++++++++++++++ drivers/pinctrl/uniphier/pinctrl-ph1-pro4.c | 129 +++++++++++++++++++ drivers/pinctrl/uniphier/pinctrl-ph1-pro5.c | 144 +++++++++++++++++++++ drivers/pinctrl/uniphier/pinctrl-ph1-sld8.c | 141 +++++++++++++++++++++ drivers/pinctrl/uniphier/pinctrl-proxstream2.c | 140 +++++++++++++++++++++ drivers/pinctrl/uniphier/pinctrl-uniphier-core.c | 154 +++++++++++++++++++++++ drivers/pinctrl/uniphier/pinctrl-uniphier.h | 113 +++++++++++++++++ include/configs/uniphier.h | 35 ++---- 54 files changed, 1437 insertions(+), 616 deletions(-) delete mode 100644 arch/arm/mach-uniphier/ph1-ld4/early_pinctrl.c delete mode 100644 arch/arm/mach-uniphier/ph1-ld4/sbc_init_3cs.c delete mode 100644 arch/arm/mach-uniphier/ph1-ld4/sg_init.c delete mode 100644 arch/arm/mach-uniphier/ph1-pro4/early_pinctrl.c delete mode 100644 arch/arm/mach-uniphier/ph1-pro4/sbc_init_3cs.c delete mode 100644 arch/arm/mach-uniphier/ph1-pro4/sg_init.c delete mode 100644 arch/arm/mach-uniphier/ph1-sld3/sbc_init_3cs.c delete mode 100644 arch/arm/mach-uniphier/ph1-sld8/early_pinctrl.c delete mode 100644 arch/arm/mach-uniphier/ph1-sld8/sbc_init_3cs.c delete mode 100644 arch/arm/mach-uniphier/ph1-sld8/sg_init.c create mode 100644 drivers/pinctrl/uniphier/Kconfig create mode 100644 drivers/pinctrl/uniphier/Makefile create mode 100644 drivers/pinctrl/uniphier/pinctrl-ph1-ld4.c create mode 100644 drivers/pinctrl/uniphier/pinctrl-ph1-ld6b.c create mode 100644 drivers/pinctrl/uniphier/pinctrl-ph1-pro4.c create mode 100644 drivers/pinctrl/uniphier/pinctrl-ph1-pro5.c create mode 100644 drivers/pinctrl/uniphier/pinctrl-ph1-sld8.c create mode 100644 drivers/pinctrl/uniphier/pinctrl-proxstream2.c create mode 100644 drivers/pinctrl/uniphier/pinctrl-uniphier-core.c create mode 100644 drivers/pinctrl/uniphier/pinctrl-uniphier.h
Signature · 1 line
1.9.1
PATCH v2 1/18 pinctrl: uniphier: add UniPhier pinctrl core support
The core support for the pinctrl drivers for all the UniPhier SoCs.
---
Changes in v2:
- add comments to structures
- re-design to maximize code re-use of Linux pinctrl drivers
- implement input enabling
drivers/pinctrl/Kconfig | 2 + drivers/pinctrl/Makefile | 2 + drivers/pinctrl/uniphier/Kconfig | 6 + drivers/pinctrl/uniphier/Makefile | 1 + drivers/pinctrl/uniphier/pinctrl-uniphier-core.c | 154 +++++++++++++++++++++++ drivers/pinctrl/uniphier/pinctrl-uniphier.h | 113 +++++++++++++++++ 6 files changed, 278 insertions(+) create mode 100644 drivers/pinctrl/uniphier/Kconfig create mode 100644 drivers/pinctrl/uniphier/Makefile create mode 100644 drivers/pinctrl/uniphier/pinctrl-uniphier-core.c create mode 100644 drivers/pinctrl/uniphier/pinctrl-uniphier.h
drivers/pinctrl/Kconfig +2 -0
@@ -124,4 +124,6 @@ config PINCTRL_SANDBOX endif +source "drivers/pinctrl/uniphier/Kconfig" + endmenu
drivers/pinctrl/Makefile +2 -0
@@ -3,3 +3,5 @@ obj-$(CONFIG_$(SPL_)PINCTRL_GENERIC) += pinctrl-generic.o obj-$(CONFIG_ARCH_ROCKCHIP) += rockchip/ obj-$(CONFIG_PINCTRL_SANDBOX) += pinctrl-sandbox.o + +obj-$(CONFIG_ARCH_UNIPHIER) += uniphier/
drivers/pinctrl/uniphier/Kconfig new file +6 -0
@@ -0,0 +1,6 @@ +if ARCH_UNIPHIER + +config PINCTRL_UNIPHIER_CORE + bool + +endif
drivers/pinctrl/uniphier/Makefile new file +1 -0
@@ -0,0 +1 @@ +obj-$(CONFIG_PINCTRL_UNIPHIER_CORE) += pinctrl-uniphier-core.o
drivers/pinctrl/uniphier/pinctrl-uniphier-core.c new file +154 -0
154 lines not on this page · raw message
drivers/pinctrl/uniphier/pinctrl-uniphier.h new file +113 -0
113 lines not on this page · raw message
Signature · 1 line
1.9.1
PATCH v2 2/18 pinctrl: uniphier: add UniPhier PH1-LD4 pinctrl driver
In reply to Masahiro YamadaAdd pin configuration and pinmux support for UniPhier PH1-LD4 SoC.
---
Changes in v2:
- Add input-enable settings
- Sync pin-mux table with Linux pinctrl driver
drivers/pinctrl/uniphier/Kconfig | 6 ++ drivers/pinctrl/uniphier/Makefile | 2 + drivers/pinctrl/uniphier/pinctrl-ph1-ld4.c | 133 +++++++++++++++++++++++++++++ 3 files changed, 141 insertions(+) create mode 100644 drivers/pinctrl/uniphier/pinctrl-ph1-ld4.c
drivers/pinctrl/uniphier/Kconfig +6 -0
@@ -3,4 +3,10 @@ if ARCH_UNIPHIER config PINCTRL_UNIPHIER_CORE bool +config PINCTRL_UNIPHIER_PH1_LD4 + bool "UniPhier PH1-LD4 SoC pinctrl driver" + depends on MACH_PH1_LD4 + default y + select PINCTRL_UNIPHIER_CORE + endif
drivers/pinctrl/uniphier/Makefile +2 -0
@@ -1 +1,3 @@ obj-$(CONFIG_PINCTRL_UNIPHIER_CORE) += pinctrl-uniphier-core.o + +obj-$(CONFIG_PINCTRL_UNIPHIER_PH1_LD4) += pinctrl-ph1-ld4.o
drivers/pinctrl/uniphier/pinctrl-ph1-ld4.c new file +133 -0
133 lines not on this page · raw message
Signature · 1 line
1.9.1
PATCH v2 3/18 pinctrl: uniphier: add UniPhier PH1-Pro4 pinctrl driver
In reply to Masahiro YamadaAdd pin configuration and pinmux support for UniPhier PH1-Pro4 SoC.
---
Changes in v2:
- Add input-enable settings
- Sync pin-mux table with Linux pinctrl driver
drivers/pinctrl/uniphier/Kconfig | 6 ++ drivers/pinctrl/uniphier/Makefile | 1 + drivers/pinctrl/uniphier/pinctrl-ph1-pro4.c | 129 ++++++++++++++++++++++++++++ 3 files changed, 136 insertions(+) create mode 100644 drivers/pinctrl/uniphier/pinctrl-ph1-pro4.c
drivers/pinctrl/uniphier/Kconfig +6 -0
@@ -9,4 +9,10 @@ config PINCTRL_UNIPHIER_PH1_LD4 default y select PINCTRL_UNIPHIER_CORE +config PINCTRL_UNIPHIER_PH1_PRO4 + bool "UniPhier PH1-Pro4 SoC pinctrl driver" + depends on MACH_PH1_PRO4 + default y + select PINCTRL_UNIPHIER_CORE + endif
drivers/pinctrl/uniphier/Makefile +1 -0
@@ -1,3 +1,4 @@ obj-$(CONFIG_PINCTRL_UNIPHIER_CORE) += pinctrl-uniphier-core.o obj-$(CONFIG_PINCTRL_UNIPHIER_PH1_LD4) += pinctrl-ph1-ld4.o +obj-$(CONFIG_PINCTRL_UNIPHIER_PH1_PRO4) += pinctrl-ph1-pro4.o
drivers/pinctrl/uniphier/pinctrl-ph1-pro4.c new file +129 -0
129 lines not on this page · raw message
Signature · 1 line
1.9.1
PATCH v2 4/18 pinctrl: uniphier: add UniPhier PH1-sLD8 pinctrl driver
In reply to Masahiro YamadaAdd pin configuration and pinmux support for UniPhier PH1-sLD8 SoC.
---
Changes in v2:
- Add input-enable settings
- Sync pin-mux table with Linux pinctrl driver
drivers/pinctrl/uniphier/Kconfig | 6 ++ drivers/pinctrl/uniphier/Makefile | 1 + drivers/pinctrl/uniphier/pinctrl-ph1-sld8.c | 141 ++++++++++++++++++++++++++++ 3 files changed, 148 insertions(+) create mode 100644 drivers/pinctrl/uniphier/pinctrl-ph1-sld8.c
drivers/pinctrl/uniphier/Kconfig +6 -0
@@ -15,4 +15,10 @@ config PINCTRL_UNIPHIER_PH1_PRO4 default y select PINCTRL_UNIPHIER_CORE +config PINCTRL_UNIPHIER_PH1_SLD8 + bool "UniPhier PH1-sLD8 SoC pinctrl driver" + depends on MACH_PH1_SLD8 + default y + select PINCTRL_UNIPHIER_CORE + endif
drivers/pinctrl/uniphier/Makefile +1 -0
@@ -2,3 +2,4 @@ obj-$(CONFIG_PINCTRL_UNIPHIER_CORE) += pinctrl-uniphier-core.o obj-$(CONFIG_PINCTRL_UNIPHIER_PH1_LD4) += pinctrl-ph1-ld4.o obj-$(CONFIG_PINCTRL_UNIPHIER_PH1_PRO4) += pinctrl-ph1-pro4.o +obj-$(CONFIG_PINCTRL_UNIPHIER_PH1_SLD8) += pinctrl-ph1-sld8.o
drivers/pinctrl/uniphier/pinctrl-ph1-sld8.c new file +141 -0
141 lines not on this page · raw message
Signature · 1 line
1.9.1
PATCH v2 5/18 pinctrl: uniphier: add UniPhier PH1-Pro5 pinctrl driver
In reply to Masahiro YamadaAdd pin configuration and pinmux support for UniPhier PH1-Pro5 SoC.
---
Changes in v2:
- Add input-enable settings
- Sync pin-mux table with Linux pinctrl driver
drivers/pinctrl/uniphier/Kconfig | 6 ++ drivers/pinctrl/uniphier/Makefile | 1 + drivers/pinctrl/uniphier/pinctrl-ph1-pro5.c | 144 ++++++++++++++++++++++++++++ 3 files changed, 151 insertions(+) create mode 100644 drivers/pinctrl/uniphier/pinctrl-ph1-pro5.c
drivers/pinctrl/uniphier/Kconfig +6 -0
@@ -21,4 +21,10 @@ config PINCTRL_UNIPHIER_PH1_SLD8 default y select PINCTRL_UNIPHIER_CORE +config PINCTRL_UNIPHIER_PH1_PRO5 + bool "UniPhier PH1-Pro5 SoC pinctrl driver" + depends on MACH_PH1_PRO5 + default y + select PINCTRL_UNIPHIER_CORE + endif
drivers/pinctrl/uniphier/Makefile +1 -0
@@ -3,3 +3,4 @@ obj-$(CONFIG_PINCTRL_UNIPHIER_CORE) += pinctrl-uniphier-core.o obj-$(CONFIG_PINCTRL_UNIPHIER_PH1_LD4) += pinctrl-ph1-ld4.o obj-$(CONFIG_PINCTRL_UNIPHIER_PH1_PRO4) += pinctrl-ph1-pro4.o obj-$(CONFIG_PINCTRL_UNIPHIER_PH1_SLD8) += pinctrl-ph1-sld8.o +obj-$(CONFIG_PINCTRL_UNIPHIER_PH1_PRO5) += pinctrl-ph1-pro5.o
drivers/pinctrl/uniphier/pinctrl-ph1-pro5.c new file +144 -0
144 lines not on this page · raw message
Signature · 1 line
1.9.1
PATCH v2 6/18 pinctrl: uniphier: add UniPhier ProXstream2 pinctrl driver
In reply to Masahiro YamadaAdd pin configuration and pinmux support for UniPhier ProXstream2 SoC.
---
Changes in v2:
- Add input-enable settings
- Sync pin-mux table with Linux pinctrl driver
drivers/pinctrl/uniphier/Kconfig | 6 ++ drivers/pinctrl/uniphier/Makefile | 1 + drivers/pinctrl/uniphier/pinctrl-proxstream2.c | 140 +++++++++++++++++++++++++ 3 files changed, 147 insertions(+) create mode 100644 drivers/pinctrl/uniphier/pinctrl-proxstream2.c
drivers/pinctrl/uniphier/Kconfig +6 -0
@@ -27,4 +27,10 @@ config PINCTRL_UNIPHIER_PH1_PRO5 default y select PINCTRL_UNIPHIER_CORE +config PINCTRL_UNIPHIER_PROXSTREAM2 + bool "UniPhier ProXstream2 SoC pinctrl driver" + depends on MACH_PROXSTREAM2 + default y + select PINCTRL_UNIPHIER_CORE + endif
drivers/pinctrl/uniphier/Makefile +1 -0
@@ -4,3 +4,4 @@ obj-$(CONFIG_PINCTRL_UNIPHIER_PH1_LD4) += pinctrl-ph1-ld4.o obj-$(CONFIG_PINCTRL_UNIPHIER_PH1_PRO4) += pinctrl-ph1-pro4.o obj-$(CONFIG_PINCTRL_UNIPHIER_PH1_SLD8) += pinctrl-ph1-sld8.o obj-$(CONFIG_PINCTRL_UNIPHIER_PH1_PRO5) += pinctrl-ph1-pro5.o +obj-$(CONFIG_PINCTRL_UNIPHIER_PROXSTREAM2) += pinctrl-proxstream2.o
drivers/pinctrl/uniphier/pinctrl-proxstream2.c new file +140 -0
140 lines not on this page · raw message
Signature · 1 line
1.9.1
PATCH v2 7/18 pinctrl: uniphier: add UniPhier PH1-LD6b pinctrl driver
In reply to Masahiro YamadaAdd pin configuration and pinmux support for UniPhier PH1-LD6b SoC.
---
Changes in v2:
- Add input-enable settings
- Sync pin-mux table with Linux pinctrl driver
drivers/pinctrl/uniphier/Kconfig | 6 ++ drivers/pinctrl/uniphier/Makefile | 1 + drivers/pinctrl/uniphier/pinctrl-ph1-ld6b.c | 133 ++++++++++++++++++++++++++++ 3 files changed, 140 insertions(+) create mode 100644 drivers/pinctrl/uniphier/pinctrl-ph1-ld6b.c
drivers/pinctrl/uniphier/Kconfig +6 -0
@@ -33,4 +33,10 @@ config PINCTRL_UNIPHIER_PROXSTREAM2 default y select PINCTRL_UNIPHIER_CORE +config PINCTRL_UNIPHIER_PH1_LD6B + bool "UniPhier PH1-LD6b SoC pinctrl driver" + depends on MACH_PH1_LD6B + default y + select PINCTRL_UNIPHIER_CORE + endif
drivers/pinctrl/uniphier/Makefile +1 -0
@@ -5,3 +5,4 @@ obj-$(CONFIG_PINCTRL_UNIPHIER_PH1_PRO4) += pinctrl-ph1-pro4.o obj-$(CONFIG_PINCTRL_UNIPHIER_PH1_SLD8) += pinctrl-ph1-sld8.o obj-$(CONFIG_PINCTRL_UNIPHIER_PH1_PRO5) += pinctrl-ph1-pro5.o obj-$(CONFIG_PINCTRL_UNIPHIER_PROXSTREAM2) += pinctrl-proxstream2.o +obj-$(CONFIG_PINCTRL_UNIPHIER_PH1_LD6B) += pinctrl-ph1-ld6b.o
drivers/pinctrl/uniphier/pinctrl-ph1-ld6b.c new file +133 -0
133 lines not on this page · raw message
Signature · 1 line
1.9.1
PATCH v2 8/18 ARM: uniphier: enable simple-bus driver for SPL
In reply to Masahiro YamadaIn UniPhier device trees, pinctrl device nodes are located under the simple-bus (AMBA).
This is needed to bind pinctrl devices in SPL.
---
Changes in v2: None
configs/ph1_ld4_defconfig | 1 + configs/ph1_pro4_defconfig | 1 + configs/ph1_sld8_defconfig | 1 + 3 files changed, 3 insertions(+)
configs/ph1_ld4_defconfig +1 -0
@@ -17,6 +17,7 @@ CONFIG_CMD_PING=y CONFIG_CMD_TIME=y # CONFIG_CMD_MISC is not set CONFIG_NET_RANDOM_ETHADDR=y +CONFIG_SPL_SIMPLE_BUS=y CONFIG_NAND_DENALI=y CONFIG_SYS_NAND_DENALI_64BIT=y CONFIG_NAND_DENALI_SPARE_AREA_SKIP_BYTES=8
configs/ph1_pro4_defconfig +1 -0
@@ -16,6 +16,7 @@ CONFIG_CMD_PING=y CONFIG_CMD_TIME=y # CONFIG_CMD_MISC is not set CONFIG_NET_RANDOM_ETHADDR=y +CONFIG_SPL_SIMPLE_BUS=y CONFIG_NAND_DENALI=y CONFIG_SYS_NAND_DENALI_64BIT=y CONFIG_NAND_DENALI_SPARE_AREA_SKIP_BYTES=8
configs/ph1_sld8_defconfig +1 -0
@@ -17,6 +17,7 @@ CONFIG_CMD_PING=y CONFIG_CMD_TIME=y # CONFIG_CMD_MISC is not set CONFIG_NET_RANDOM_ETHADDR=y +CONFIG_SPL_SIMPLE_BUS=y CONFIG_NAND_DENALI=y CONFIG_SYS_NAND_DENALI_64BIT=y CONFIG_NAND_DENALI_SPARE_AREA_SKIP_BYTES=8
Signature · 1 line
1.9.1
PATCH v2 9/18 ARM: uniphier: increase CONFIG_SYS_MALLOC_F_LEN to bind all nodes
In reply to Masahiro YamadaIn the next commit, I will add "u-boot,dm-pre-reloc" to the "soc" (simple-bus) nodes in UniPhier device trees. But, before that, CONFIG_SYS_MALLOC_F_LEN must be increased.
Adding "u-boot,dm-pre-reloc" to a simple-bus node causes it to bind all of its child nodes. (See simple_bus_post_bind() function)
Actually, I want only UART0 and pinctrl to be bound in SPL and before relocation in U-boot proper. But, with "u-boot,dm-pre-reloc" in the simple-bus node, all the other unwanted nodes are also bound. The default value for CONFIG_SYS_MALLOC_F_LEN, 0x400, is not enough for that. Increase the pre-reloc malloc size to 0x2000, hoping the root cause will be fixed later.
---
Changes in v2: None
configs/ph1_ld4_defconfig | 1 + configs/ph1_pro4_defconfig | 1 + configs/ph1_sld8_defconfig | 1 + 3 files changed, 3 insertions(+)
configs/ph1_ld4_defconfig +1 -0
@@ -1,5 +1,6 @@ CONFIG_ARM=y CONFIG_ARCH_UNIPHIER=y +CONFIG_SYS_MALLOC_F_LEN=0x2000 CONFIG_MACH_PH1_LD4=y CONFIG_PFC_MICRO_SUPPORT_CARD=y CONFIG_SYS_TEXT_BASE=0x84000000
configs/ph1_pro4_defconfig +1 -0
@@ -1,5 +1,6 @@ CONFIG_ARM=y CONFIG_ARCH_UNIPHIER=y +CONFIG_SYS_MALLOC_F_LEN=0x2000 CONFIG_PFC_MICRO_SUPPORT_CARD=y CONFIG_SYS_TEXT_BASE=0x84000000 CONFIG_DEFAULT_DEVICE_TREE="uniphier-ph1-pro4-ref"
configs/ph1_sld8_defconfig +1 -0
@@ -1,5 +1,6 @@ CONFIG_ARM=y CONFIG_ARCH_UNIPHIER=y +CONFIG_SYS_MALLOC_F_LEN=0x2000 CONFIG_MACH_PH1_SLD8=y CONFIG_PFC_MICRO_SUPPORT_CARD=y CONFIG_SYS_TEXT_BASE=0x84000000
Signature · 1 line
1.9.1
PATCH v2 10/18 ARM: dts: uniphier: prepare device trees to use pinctrl in SPL
In reply to Masahiro YamadaAdd "u-boot,dm-pre-reloc" for device nodes we want in SPL DTB (spl/u-boot-spl.dtb).
The "soc" node (this is simple-bus node) also needs the property to bind the pinctrl node located under it.
I am collecting this U-Boot specific hack to the bottom of board DTS rather than inserting "u-boot,dm-pre-reloc" into SoC DTSI. My goal is to sync DTSI with Linux for easier maintenance.
---
Changes in v2: None
arch/arm/dts/uniphier-ph1-ld4-ref.dts | 16 +++++++++++++++- arch/arm/dts/uniphier-ph1-ld6b-ref.dts | 16 +++++++++++++++- arch/arm/dts/uniphier-ph1-pro4-ref.dts | 16 +++++++++++++++- arch/arm/dts/uniphier-ph1-sld8-ref.dts | 16 +++++++++++++++- 4 files changed, 60 insertions(+), 4 deletions(-)
arch/arm/dts/uniphier-ph1-ld4-ref.dts +15 -1
@@ -61,6 +61,20 @@ }; /* for U-boot only */ +/ { + soc { + u-boot,dm-pre-reloc; + }; +}; + &serial0 { - u-boot,dm-pre-reloc; + u-boot,dm-pre-reloc; +}; + +&pinctrl { + u-boot,dm-pre-reloc; +}; + +&pinctrl_uart0 { + u-boot,dm-pre-reloc; };
arch/arm/dts/uniphier-ph1-ld6b-ref.dts +15 -1
@@ -54,6 +54,20 @@ }; /* for U-boot only */ +/ { + soc { + u-boot,dm-pre-reloc; + }; +}; + &serial0 { - u-boot,dm-pre-reloc; + u-boot,dm-pre-reloc; +}; + +&pinctrl { + u-boot,dm-pre-reloc; +}; + +&pinctrl_uart0 { + u-boot,dm-pre-reloc; };
arch/arm/dts/uniphier-ph1-pro4-ref.dts +15 -1
@@ -68,6 +68,20 @@ }; /* for U-boot only */ +/ { + soc { + u-boot,dm-pre-reloc; + }; +}; + &serial0 { - u-boot,dm-pre-reloc; + u-boot,dm-pre-reloc; +}; + +&pinctrl { + u-boot,dm-pre-reloc; +}; + +&pinctrl_uart0 { + u-boot,dm-pre-reloc; };
arch/arm/dts/uniphier-ph1-sld8-ref.dts +15 -1
@@ -65,6 +65,20 @@ }; /* for U-boot only */ +/ { + soc { + u-boot,dm-pre-reloc; + }; +}; + &serial0 { - u-boot,dm-pre-reloc; + u-boot,dm-pre-reloc; +}; + +&pinctrl { + u-boot,dm-pre-reloc; +}; + +&pinctrl_uart0 { + u-boot,dm-pre-reloc; };
Signature · 1 line
1.9.1
PATCH v2 11/18 ARM: uniphier: enable PINCTRL and SPL_PINCTRL
In reply to Masahiro YamadaNow, UniPhier SoCs are ready to enable pinctrl drivers.
---
Changes in v2: None
configs/ph1_ld4_defconfig | 2 ++ configs/ph1_pro4_defconfig | 2 ++ configs/ph1_sld8_defconfig | 2 ++ 3 files changed, 6 insertions(+)
configs/ph1_ld4_defconfig +2 -0
@@ -24,6 +24,8 @@ CONFIG_SYS_NAND_DENALI_64BIT=y CONFIG_NAND_DENALI_SPARE_AREA_SKIP_BYTES=8 CONFIG_SPL_NAND_DENALI=y CONFIG_UNIPHIER_SERIAL=y +CONFIG_PINCTRL=y +CONFIG_SPL_PINCTRL=y CONFIG_USB=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_STORAGE=y
configs/ph1_pro4_defconfig +2 -0
@@ -23,6 +23,8 @@ CONFIG_SYS_NAND_DENALI_64BIT=y CONFIG_NAND_DENALI_SPARE_AREA_SKIP_BYTES=8 CONFIG_SPL_NAND_DENALI=y CONFIG_UNIPHIER_SERIAL=y +CONFIG_PINCTRL=y +CONFIG_SPL_PINCTRL=y CONFIG_USB=y CONFIG_USB_XHCI_HCD=y CONFIG_USB_STORAGE=y
configs/ph1_sld8_defconfig +2 -0
@@ -24,6 +24,8 @@ CONFIG_SYS_NAND_DENALI_64BIT=y CONFIG_NAND_DENALI_SPARE_AREA_SKIP_BYTES=8 CONFIG_SPL_NAND_DENALI=y CONFIG_UNIPHIER_SERIAL=y +CONFIG_PINCTRL=y +CONFIG_SPL_PINCTRL=y CONFIG_USB=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_STORAGE=y
Signature · 1 line
1.9.1
PATCH v2 12/18 ARM: uniphier: drop ad-hoc early pin-muxing settings
In reply to Masahiro YamadaAs the UniPhier serial driver had already switched to Drive Model and the pinctrl drivers are now enabled, these pin-muxing settings are properly handled by the pinctrl drivers.
---
Changes in v2: None
arch/arm/mach-uniphier/ph1-ld4/Makefile | 2 +- arch/arm/mach-uniphier/ph1-ld4/early_pinctrl.c | 27 ------------------------- arch/arm/mach-uniphier/ph1-pro4/Makefile | 2 +- arch/arm/mach-uniphier/ph1-pro4/early_pinctrl.c | 26 ------------------------ arch/arm/mach-uniphier/ph1-sld8/early_pinctrl.c | 27 ------------------------- arch/arm/mach-uniphier/spl.c | 5 +++++ 6 files changed, 7 insertions(+), 82 deletions(-) delete mode 100644 arch/arm/mach-uniphier/ph1-ld4/early_pinctrl.c delete mode 100644 arch/arm/mach-uniphier/ph1-pro4/early_pinctrl.c delete mode 100644 arch/arm/mach-uniphier/ph1-sld8/early_pinctrl.c
arch/arm/mach-uniphier/ph1-ld4/Makefile +1 -1
@@ -5,7 +5,7 @@ ifdef CONFIG_SPL_BUILD obj-$(CONFIG_DEBUG_LL) += lowlevel_debug.o obj-y += bcu_init.o sg_init.o pll_init.o early_clkrst_init.o \ - early_pinctrl.o pll_spectrum.o umc_init.o ddrphy_init.o + pll_spectrum.o umc_init.o ddrphy_init.o obj-$(CONFIG_PFC_MICRO_SUPPORT_CARD) += sbc_init.o obj-$(CONFIG_DCC_MICRO_SUPPORT_CARD) += sbc_init_3cs.o else
arch/arm/mach-uniphier/ph1-ld4/early_pinctrl.c deleted +0 -27
@@ -1,27 +0,0 @@ -/* -* Copyright (C) 2011-2015 Panasonic Corporation -* Copyright (C) 2015 Socionext Inc. -* -* SPDX-License-Identifier: GPL-2.0+ -*/ - -#include <mach/sg-regs.h> - -void early_pin_init (void ) -{ -/* Comment format: PAD Name -> Function Name */ - -#ifdef CONFIG_UNIPHIER_SERIAL -sg_set_pinsel (85 ,1 );/* HSDOUT3 -> RXD0 */ -sg_set_pinsel (88 ,1 );/* HDDOUT6 -> TXD0 */ - -sg_set_pinsel (69 ,23 );/* PCIOWR -> TXD1 */ -sg_set_pinsel (70 ,23 );/* PCIORD -> RXD1 */ - -sg_set_pinsel (128 ,13 );/* XIRQ6 -> TXD2 */ -sg_set_pinsel (129 ,13 );/* XIRQ7 -> RXD2 */ - -sg_set_pinsel (110 ,1 );/* SBO0 -> TXD3 */ -sg_set_pinsel (111 ,1 );/* SBI0 -> RXD3 */ -#endif -}
arch/arm/mach-uniphier/ph1-pro4/Makefile +1 -1
@@ -5,7 +5,7 @@ ifdef CONFIG_SPL_BUILD obj-$(CONFIG_DEBUG_LL) += lowlevel_debug.o obj-y += sg_init.o pll_init.o early_clkrst_init.o \ - early_pinctrl.o pll_spectrum.o umc_init.o ddrphy_init.o + pll_spectrum.o umc_init.o ddrphy_init.o obj-$(CONFIG_PFC_MICRO_SUPPORT_CARD) += sbc_init.o obj-$(CONFIG_DCC_MICRO_SUPPORT_CARD) += sbc_init_3cs.o else
arch/arm/mach-uniphier/ph1-pro4/early_pinctrl.c deleted +0 -26
@@ -1,26 +0,0 @@ -/* -* Copyright (C) 2011-2015 Masahiro Yamada <[email protected]> -* -* SPDX-License-Identifier: GPL-2.0+ -*/ - -#include <linux/io.h> -#include <mach/sg-regs.h> - -void early_pin_init (void ) -{ -/* Comment format: PAD Name -> Function Name */ - -#ifdef CONFIG_UNIPHIER_SERIAL -sg_set_pinsel (127 ,0 );/* RXD0 -> RXD0 */ -sg_set_pinsel (128 ,0 );/* TXD0 -> TXD0 */ -sg_set_pinsel (129 ,0 );/* RXD1 -> RXD1 */ -sg_set_pinsel (130 ,0 );/* TXD1 -> TXD1 */ -sg_set_pinsel (131 ,0 );/* RXD2 -> RXD2 */ -sg_set_pinsel (132 ,0 );/* TXD2 -> TXD2 */ -sg_set_pinsel (88 ,2 );/* CH6CLK -> RXD3 */ -sg_set_pinsel (89 ,2 );/* CH6VAL -> TXD3 */ -#endif - -writel (1 ,SG_LOADPINCTRL ); -}
arch/arm/mach-uniphier/ph1-sld8/early_pinctrl.c deleted +0 -27
@@ -1,27 +0,0 @@ -/* -* Copyright (C) 2011-2015 Panasonic Corporation -* Copyright (C) 2015 Socionext Inc. -* -* SPDX-License-Identifier: GPL-2.0+ -*/ - -#include <mach/sg-regs.h> - -void early_pin_init (void ) -{ -/* Comment format: PAD Name -> Function Name */ - -#ifdef CONFIG_UNIPHIER_SERIAL -sg_set_pinsel (70 ,3 );/* HDDOUT0 -> TXD0 */ -sg_set_pinsel (71 ,3 );/* HSDOUT1 -> RXD0 */ - -sg_set_pinsel (114 ,0 );/* TXD1 -> TXD1 */ -sg_set_pinsel (115 ,0 );/* RXD1 -> RXD1 */ - -sg_set_pinsel (112 ,1 );/* SBO1 -> TXD2 */ -sg_set_pinsel (113 ,1 );/* SBI1 -> RXD2 */ - -sg_set_pinsel (110 ,1 );/* SBO0 -> TXD3 */ -sg_set_pinsel (111 ,1 );/* SBI0 -> RXD3 */ -#endif -}
arch/arm/mach-uniphier/spl.c +5 -0
@@ -15,6 +15,11 @@void __weak bcu_init (void ) { }; + +void __weak early_pin_init (void ) +{ +}; +void sbc_init (void );void sg_init (void );void pll_init (void );
Signature · 1 line
1.9.1
PATCH v2 13/18 ARM: uniphier: drop ad-hoc input enable settings
In reply to Masahiro YamadaThese input enable settings are handled by the pinctrl drivers.
Because the external bus pins are input-enabled by default, on-board devices such as LED still work fine even with this delayed input enabling.
---
Changes in v2:
- Newly added
arch/arm/mach-uniphier/ph1-ld4/Makefile | 2 +- arch/arm/mach-uniphier/ph1-ld4/sg_init.c | 18 ------------------ arch/arm/mach-uniphier/ph1-pro4/Makefile | 2 +- arch/arm/mach-uniphier/ph1-pro4/sg_init.c | 18 ------------------ arch/arm/mach-uniphier/ph1-sld8/pinctrl.c | 9 --------- arch/arm/mach-uniphier/ph1-sld8/sg_init.c | 1 - arch/arm/mach-uniphier/spl.c | 8 +++++--- 7 files changed, 7 insertions(+), 51 deletions(-) delete mode 100644 arch/arm/mach-uniphier/ph1-ld4/sg_init.c delete mode 100644 arch/arm/mach-uniphier/ph1-pro4/sg_init.c delete mode 100644 arch/arm/mach-uniphier/ph1-sld8/sg_init.c
arch/arm/mach-uniphier/ph1-ld4/Makefile +1 -1
@@ -4,7 +4,7 @@ ifdef CONFIG_SPL_BUILD obj-$(CONFIG_DEBUG_LL) += lowlevel_debug.o -obj-y += bcu_init.o sg_init.o pll_init.o early_clkrst_init.o \ +obj-y += bcu_init.o pll_init.o early_clkrst_init.o \ pll_spectrum.o umc_init.o ddrphy_init.o obj-$(CONFIG_PFC_MICRO_SUPPORT_CARD) += sbc_init.o obj-$(CONFIG_DCC_MICRO_SUPPORT_CARD) += sbc_init_3cs.o
arch/arm/mach-uniphier/ph1-ld4/sg_init.c deleted +0 -18
@@ -1,18 +0,0 @@ -/* -* Copyright (C) 2011-2015 Masahiro Yamada <[email protected]> -* -* SPDX-License-Identifier: GPL-2.0+ -*/ - -#include <linux/io.h> -#include <mach/sg-regs.h> - -void sg_init (void ) -{ -u32 tmp; - -/* Input ports must be enabled before deasserting reset of cores */ - tmp =readl (SG_IECTRL ); - tmp |=0x1 ; -writel (tmp,SG_IECTRL ); -}
arch/arm/mach-uniphier/ph1-pro4/Makefile +1 -1
@@ -4,7 +4,7 @@ ifdef CONFIG_SPL_BUILD obj-$(CONFIG_DEBUG_LL) += lowlevel_debug.o -obj-y += sg_init.o pll_init.o early_clkrst_init.o \ +obj-y += pll_init.o early_clkrst_init.o \ pll_spectrum.o umc_init.o ddrphy_init.o obj-$(CONFIG_PFC_MICRO_SUPPORT_CARD) += sbc_init.o obj-$(CONFIG_DCC_MICRO_SUPPORT_CARD) += sbc_init_3cs.o
arch/arm/mach-uniphier/ph1-pro4/sg_init.c deleted +0 -18
@@ -1,18 +0,0 @@ -/* -* Copyright (C) 2011-2015 Masahiro Yamada <[email protected]> -* -* SPDX-License-Identifier: GPL-2.0+ -*/ - -#include <linux/io.h> -#include <mach/sg-regs.h> - -void sg_init (void ) -{ -u32 tmp; - -/* Input ports must be enabled before deasserting reset of cores */ - tmp =readl (SG_IECTRL ); - tmp |=1 <<6 ; -writel (tmp,SG_IECTRL ); -}
arch/arm/mach-uniphier/ph1-sld8/pinctrl.c +0 -9
@@ -11,15 +11,6 @@ void pin_init(void) {/* Comment format: PAD Name -> Function Name */ -#ifdef CONFIG_SYS_I2C_UNIPHIER - { -u32 tmp; - tmp =readl (SG_IECTRL ); - tmp |=0xc00 ;/* enable SCL0, SDA0, SCL1, SDA1 */ -writel (tmp,SG_IECTRL ); - } -#endif -#ifdef CONFIG_NAND_DENALI sg_set_pinsel (15 ,0 );/* XNFRE_GB -> XNFRE_GB */ sg_set_pinsel (16 ,0 );/* XNFWE_GB -> XNFWE_GB */
arch/arm/mach-uniphier/ph1-sld8/sg_init.c deleted +0 -1
@@ -1 +0,0 @@ -#include "../ph1-ld4/sg_init.c"
arch/arm/mach-uniphier/spl.c +5 -3
@@ -1,7 +1,5 @@/* -* Copyright (C) 2013-2015 Panasonic Corporation -* Copyright (C) 2015 Socionext Inc. -* Author: Masahiro Yamada <[email protected]> +* Copyright (C) 2013-2015 Masahiro Yamada <[email protected]> * * SPDX-License-Identifier: GPL-2.0+ */
@@ -16,6 +14,10 @@ void __weak bcu_init(void) { }; +void __weak sg_init (void ) +{ +}; +void __weak early_pin_init (void ) { };
Signature · 1 line
1.9.1
PATCH v2 14/18 ARM: uniphier: drop DCC micro support card support
In reply to Masahiro YamadaHistorically (for compatibility with very old platforms), two different types of micro support cards have been used with the UniPhier SoC development boards. It has been painful to maintain both. Having one of them is enough.
---
Changes in v2: None
arch/arm/mach-uniphier/Kconfig | 23 ++----- arch/arm/mach-uniphier/Makefile | 3 +- arch/arm/mach-uniphier/include/mach/board.h | 6 +- arch/arm/mach-uniphier/ph1-ld4/Makefile | 3 +- arch/arm/mach-uniphier/ph1-ld4/sbc_init_3cs.c | 49 --------------- arch/arm/mach-uniphier/ph1-pro4/Makefile | 3 +- arch/arm/mach-uniphier/ph1-pro4/sbc_init_3cs.c | 42 ------------- arch/arm/mach-uniphier/ph1-sld3/Makefile | 3 +- arch/arm/mach-uniphier/ph1-sld3/sbc_init_3cs.c | 37 ----------- arch/arm/mach-uniphier/ph1-sld8/sbc_init_3cs.c | 57 ----------------- arch/arm/mach-uniphier/support_card.c | 87 +++----------------------- configs/ph1_ld4_defconfig | 2 +- configs/ph1_pro4_defconfig | 2 +- configs/ph1_sld3_defconfig | 2 +- configs/ph1_sld8_defconfig | 2 +- include/configs/uniphier.h | 19 ++---- 16 files changed, 29 insertions(+), 311 deletions(-) delete mode 100644 arch/arm/mach-uniphier/ph1-ld4/sbc_init_3cs.c delete mode 100644 arch/arm/mach-uniphier/ph1-pro4/sbc_init_3cs.c delete mode 100644 arch/arm/mach-uniphier/ph1-sld3/sbc_init_3cs.c delete mode 100644 arch/arm/mach-uniphier/ph1-sld8/sbc_init_3cs.c
arch/arm/mach-uniphier/Kconfig +4 -19
@@ -26,29 +26,14 @@ config MACH_PH1_SLD8 endchoice -choice - prompt "UniPhier Support Card select" - optional - -config PFC_MICRO_SUPPORT_CARD - bool "Support card with PFC CPLD" - help - This option provides support for the expansion board with PFC - original address mapping. - - Say Y to use the on-board UART, Ether, LED devices. - -config DCC_MICRO_SUPPORT_CARD - bool "Support card with DCC CPLD" +config MICRO_SUPPORT_CARD + bool "Use Micro Support Card" help - This option provides support for the expansion board with DCC- - arranged address mapping that is compatible with legacy UniPhier - reference boards. + This option provides support for the expansion board, available + on some UniPhier reference boards. Say Y to use the on-board UART, Ether, LED devices. -endchoice - config CMD_PINMON bool "Enable boot mode pins monitor command" default y
arch/arm/mach-uniphier/Makefile +1 -2
@@ -29,8 +29,7 @@ endif obj-y += timer.o -obj-$(CONFIG_PFC_MICRO_SUPPORT_CARD) += support_card.o -obj-$(CONFIG_DCC_MICRO_SUPPORT_CARD) += support_card.o +obj-$(CONFIG_MICRO_SUPPORT_CARD) += support_card.o obj-$(CONFIG_MACH_PH1_SLD3) += ph1-sld3/ obj-$(CONFIG_MACH_PH1_LD4) += ph1-ld4/
arch/arm/mach-uniphier/include/mach/board.h +2 -4
@@ -1,6 +1,5 @@/* -* Copyright (C) 2012-2014 Panasonic Corporation -* Author: Masahiro Yamada <[email protected]> +* Copyright (C) 2012-2015 Masahiro Yamada <[email protected]> * * SPDX-License-Identifier: GPL-2.0+ */
@@ -8,8 +7,7 @@#ifndef ARCH_BOARD_H #define ARCH_BOARD_H -#if defined(CONFIG_PFC_MICRO_SUPPORT_CARD ) || \ - defined(CONFIG_DCC_MICRO_SUPPORT_CARD ) +#if defined(CONFIG_MICRO_SUPPORT_CARD )void support_card_reset (void );void support_card_init (void );void support_card_late_init (void );
arch/arm/mach-uniphier/ph1-ld4/Makefile +1 -2
@@ -6,8 +6,7 @@ ifdef CONFIG_SPL_BUILD obj-$(CONFIG_DEBUG_LL) += lowlevel_debug.o obj-y += bcu_init.o pll_init.o early_clkrst_init.o \ pll_spectrum.o umc_init.o ddrphy_init.o -obj-$(CONFIG_PFC_MICRO_SUPPORT_CARD) += sbc_init.o -obj-$(CONFIG_DCC_MICRO_SUPPORT_CARD) += sbc_init_3cs.o +obj-$(CONFIG_MICRO_SUPPORT_CARD) += sbc_init.o else obj-$(CONFIG_BOARD_EARLY_INIT_F) += pinctrl.o clkrst_init.o endif
arch/arm/mach-uniphier/ph1-ld4/sbc_init_3cs.c deleted +0 -49
49 lines not on this page · raw message
arch/arm/mach-uniphier/ph1-pro4/Makefile +1 -2
@@ -6,8 +6,7 @@ ifdef CONFIG_SPL_BUILD obj-$(CONFIG_DEBUG_LL) += lowlevel_debug.o obj-y += pll_init.o early_clkrst_init.o \ pll_spectrum.o umc_init.o ddrphy_init.o -obj-$(CONFIG_PFC_MICRO_SUPPORT_CARD) += sbc_init.o -obj-$(CONFIG_DCC_MICRO_SUPPORT_CARD) += sbc_init_3cs.o +obj-$(CONFIG_MICRO_SUPPORT_CARD) += sbc_init.o else obj-$(CONFIG_BOARD_EARLY_INIT_F) += pinctrl.o clkrst_init.o endif
arch/arm/mach-uniphier/ph1-pro4/sbc_init_3cs.c deleted +0 -42
42 lines not on this page · raw message
arch/arm/mach-uniphier/ph1-sld3/Makefile +1 -2
@@ -6,8 +6,7 @@ ifdef CONFIG_SPL_BUILD obj-$(CONFIG_DEBUG_LL) += lowlevel_debug.o obj-y += bcu_init.o memconf.o sg_init.o pll_init.o early_clkrst_init.o \ early_pinctrl.o pll_spectrum.o umc_init.o -obj-$(CONFIG_PFC_MICRO_SUPPORT_CARD) += sbc_init.o -obj-$(CONFIG_DCC_MICRO_SUPPORT_CARD) += sbc_init_3cs.o +obj-$(CONFIG_MICRO_SUPPORT_CARD) += sbc_init.o else obj-$(CONFIG_BOARD_EARLY_INIT_F) += pinctrl.o clkrst_init.o endif
arch/arm/mach-uniphier/ph1-sld3/sbc_init_3cs.c deleted +0 -37
@@ -1,37 +0,0 @@ -/* -* Copyright (C) 2011-2015 Masahiro Yamada <[email protected]> -* -* SPDX-License-Identifier: GPL-2.0+ -*/ - -#include <common.h> -#include <linux/io.h> -#include <mach/sbc-regs.h> -#include <mach/sg-regs.h> - -void sbc_init (void ) -{ -/* only address/data multiplex mode is supported */ - -/* XECS0 : boot/sub memory (boot swap = off/on) */ -writel (SBCTRL0_ADMULTIPLX_MEM_VALUE ,SBCTRL00 ); -writel (SBCTRL1_ADMULTIPLX_MEM_VALUE ,SBCTRL01 ); -writel (SBCTRL2_ADMULTIPLX_MEM_VALUE ,SBCTRL02 ); - -/* XECS1 : sub/boot memory (boot swap = off/on) */ -writel (SBCTRL0_ADMULTIPLX_MEM_VALUE ,SBCTRL10 ); -writel (SBCTRL1_ADMULTIPLX_MEM_VALUE ,SBCTRL11 ); -writel (SBCTRL2_ADMULTIPLX_MEM_VALUE ,SBCTRL12 ); - -/* XECS2 : peripherals */ -writel (SBCTRL0_ADMULTIPLX_PERI_VALUE ,SBCTRL20 ); -writel (SBCTRL1_ADMULTIPLX_PERI_VALUE ,SBCTRL21 ); -writel (SBCTRL2_ADMULTIPLX_PERI_VALUE ,SBCTRL22 ); - -/* base address regsiters */ -writel (0x0000bc01 ,SBBASE0 ); -writel (0x0400bc01 ,SBBASE1 ); -writel (0x0800bf01 ,SBBASE2 ); - -sg_set_pinsel (99 ,1 );/* GPIO26 -> EA24 */ -}
arch/arm/mach-uniphier/ph1-sld8/sbc_init_3cs.c deleted +0 -57
57 lines not on this page · raw message
arch/arm/mach-uniphier/support_card.c +10 -77
127 lines not on this page · raw message
configs/ph1_ld4_defconfig +1 -1
@@ -2,7 +2,7 @@ CONFIG_ARM=y CONFIG_ARCH_UNIPHIER=y CONFIG_SYS_MALLOC_F_LEN=0x2000 CONFIG_MACH_PH1_LD4=y -CONFIG_PFC_MICRO_SUPPORT_CARD=y +CONFIG_MICRO_SUPPORT_CARD=y CONFIG_SYS_TEXT_BASE=0x84000000 CONFIG_DEFAULT_DEVICE_TREE="uniphier-ph1-ld4-ref" CONFIG_HUSH_PARSER=y
configs/ph1_pro4_defconfig +1 -1
@@ -1,7 +1,7 @@ CONFIG_ARM=y CONFIG_ARCH_UNIPHIER=y CONFIG_SYS_MALLOC_F_LEN=0x2000 -CONFIG_PFC_MICRO_SUPPORT_CARD=y +CONFIG_MICRO_SUPPORT_CARD=y CONFIG_SYS_TEXT_BASE=0x84000000 CONFIG_DEFAULT_DEVICE_TREE="uniphier-ph1-pro4-ref" CONFIG_HUSH_PARSER=y
configs/ph1_sld3_defconfig +1 -1
@@ -1,7 +1,7 @@ CONFIG_ARM=y CONFIG_ARCH_UNIPHIER=y CONFIG_MACH_PH1_SLD3=y -CONFIG_PFC_MICRO_SUPPORT_CARD=y +CONFIG_MICRO_SUPPORT_CARD=y CONFIG_SYS_TEXT_BASE=0x84000000 CONFIG_DEFAULT_DEVICE_TREE="uniphier-ph1-sld3-ref" CONFIG_HUSH_PARSER=y
configs/ph1_sld8_defconfig +1 -1
@@ -2,7 +2,7 @@ CONFIG_ARM=y CONFIG_ARCH_UNIPHIER=y CONFIG_SYS_MALLOC_F_LEN=0x2000 CONFIG_MACH_PH1_SLD8=y -CONFIG_PFC_MICRO_SUPPORT_CARD=y +CONFIG_MICRO_SUPPORT_CARD=y CONFIG_SYS_TEXT_BASE=0x84000000 CONFIG_DEFAULT_DEVICE_TREE="uniphier-ph1-sld8-ref" CONFIG_HUSH_PARSER=y
include/configs/uniphier.h +5 -14
@@ -62,19 +62,10 @@/* * Support card address map */ -#if defined(CONFIG_PFC_MICRO_SUPPORT_CARD ) -# define CONFIG_SUPPORT_CARD_BASE 0x03f00000 -# define CONFIG_SUPPORT_CARD_ETHER_BASE (CONFIG_SUPPORT_CARD_BASE + 0x00000000) -# define CONFIG_SUPPORT_CARD_LED_BASE (CONFIG_SUPPORT_CARD_BASE + 0x00090000) -# define CONFIG_SUPPORT_CARD_UART_BASE (CONFIG_SUPPORT_CARD_BASE + 0x000b0000) -#endif - -#if defined(CONFIG_DCC_MICRO_SUPPORT_CARD ) -# define CONFIG_SUPPORT_CARD_BASE 0x08000000 -# define CONFIG_SUPPORT_CARD_ETHER_BASE (CONFIG_SUPPORT_CARD_BASE + 0x00000000) -# define CONFIG_SUPPORT_CARD_LED_BASE (CONFIG_SUPPORT_CARD_BASE + 0x00401630) -# define CONFIG_SUPPORT_CARD_UART_BASE (CONFIG_SUPPORT_CARD_BASE + 0x00200000) -#endif +#define CONFIG_SUPPORT_CARD_BASE 0x03f00000 +#define CONFIG_SUPPORT_CARD_ETHER_BASE (CONFIG_SUPPORT_CARD_BASE + 0x00000000) +#define CONFIG_SUPPORT_CARD_LED_BASE (CONFIG_SUPPORT_CARD_BASE + 0x00090000) +#define CONFIG_SUPPORT_CARD_UART_BASE (CONFIG_SUPPORT_CARD_BASE + 0x000b0000)#ifdef CONFIG_SYS_NS16550_SERIAL #define CONFIG_SYS_NS16550
@@ -140,7 +131,7 @@#define CONFIG_FLASH_SHOW_PROGRESS 45/* count down from 45/5: 9..1 */ -#define CONFIG_SYS_MAX_FLASH_BANKS_DETECT 2 +#define CONFIG_SYS_MAX_FLASH_BANKS_DETECT 1/* serial console configuration */ #define CONFIG_BAUDRATE 115200
Signature · 1 line
1.9.1
PATCH v2 15/18 ARM: uniphier: enable setexpr command
In reply to Masahiro YamadaThis command will be used in the next commit to calculate base-offseted addresses.
---
Changes in v2: None
configs/ph1_ld4_defconfig | 1 - configs/ph1_pro4_defconfig | 1 - configs/ph1_sld3_defconfig | 1 - configs/ph1_sld8_defconfig | 1 - 4 files changed, 4 deletions(-)
configs/ph1_ld4_defconfig +0 -1
@@ -12,7 +12,6 @@ CONFIG_CMD_NAND=y CONFIG_CMD_I2C=y CONFIG_CMD_USB=y # CONFIG_CMD_FPGA is not set -# CONFIG_CMD_SETEXPR is not set CONFIG_CMD_TFTPPUT=y CONFIG_CMD_PING=y CONFIG_CMD_TIME=y
configs/ph1_pro4_defconfig +0 -1
@@ -11,7 +11,6 @@ CONFIG_CMD_NAND=y CONFIG_CMD_I2C=y CONFIG_CMD_USB=y # CONFIG_CMD_FPGA is not set -# CONFIG_CMD_SETEXPR is not set CONFIG_CMD_TFTPPUT=y CONFIG_CMD_PING=y CONFIG_CMD_TIME=y
configs/ph1_sld3_defconfig +0 -1
@@ -11,7 +11,6 @@ CONFIG_CMD_NAND=y CONFIG_CMD_I2C=y CONFIG_CMD_USB=y # CONFIG_CMD_FPGA is not set -# CONFIG_CMD_SETEXPR is not set CONFIG_CMD_TFTPPUT=y CONFIG_CMD_PING=y CONFIG_CMD_TIME=y
configs/ph1_sld8_defconfig +0 -1
@@ -12,7 +12,6 @@ CONFIG_CMD_NAND=y CONFIG_CMD_I2C=y CONFIG_CMD_USB=y # CONFIG_CMD_FPGA is not set -# CONFIG_CMD_SETEXPR is not set CONFIG_CMD_TFTPPUT=y CONFIG_CMD_PING=y CONFIG_CMD_TIME=y
Signature · 1 line
1.9.1
PATCH v2 16/18 ARM: uniphier: change the external bus address mapping
In reply to Masahiro YamadaIn UniPhier SoCs before ProXstream2 and PH1-LD6b, two address spaces
0x00000000 - 0x0fffffff
0x40000000 - 0x4fffffff
are both mapped to the external bus (also called system bus), so either was OK.
In the newest two SoCs, the former (0x00000000 - 0x0fffffff) is assigned for the serial NOR interface.
Going forward, use the latter for the external bus.
---
Changes in v2: None
arch/arm/mach-uniphier/ph1-ld4/sbc_init.c | 12 ++++++------ arch/arm/mach-uniphier/ph1-pro4/sbc_init.c | 12 ++++++------ arch/arm/mach-uniphier/ph1-sld3/sbc_init.c | 12 ++++++------ arch/arm/mach-uniphier/support_card.c | 2 +- include/configs/uniphier.h | 7 ++++++- 5 files changed, 25 insertions(+), 20 deletions(-)
arch/arm/mach-uniphier/ph1-ld4/sbc_init.c +6 -6
@@ -30,18 +30,18 @@ void sbc_init(void)if (boot_is_swapped ()) {/* * Boot Swap On: boot from external NOR/SRAM -* 0x02000000-0x03ffffff is a mirror of 0x00000000-0x01ffffff. +* 0x42000000-0x43ffffff is a mirror of 0x40000000-0x41ffffff. * -* 0x00000000-0x01efffff, 0x02000000-0x03efffff: memory bank -* 0x01f00000-0x01ffffff, 0x03f00000-0x03ffffff: peripherals +* 0x40000000-0x41efffff, 0x42000000-0x43efffff: memory bank +* 0x41f00000-0x41ffffff, 0x43f00000-0x43ffffff: peripherals */ writel (0x0000bc01 ,SBBASE0 ); }else {/* * Boot Swap Off: boot from mask ROM -* 0x00000000-0x01ffffff: mask ROM -* 0x02000000-0x03efffff: memory bank (31MB) -* 0x03f00000-0x03ffffff: peripherals (1MB) +* 0x40000000-0x41ffffff: mask ROM +* 0x42000000-0x43efffff: memory bank (31MB) +* 0x43f00000-0x43ffffff: peripherals (1MB) */ writel (0x0000be01 ,SBBASE0 );/* dummy */ writel (0x0200be01 ,SBBASE1 );
arch/arm/mach-uniphier/ph1-pro4/sbc_init.c +6 -6
@@ -23,18 +23,18 @@ void sbc_init(void)if (boot_is_swapped ()) {/* * Boot Swap On: boot from external NOR/SRAM -* 0x02000000-0x03ffffff is a mirror of 0x00000000-0x01ffffff. +* 0x42000000-0x43ffffff is a mirror of 0x40000000-0x41ffffff. * -* 0x00000000-0x01efffff, 0x02000000-0x03efffff: memory bank -* 0x01f00000-0x01ffffff, 0x03f00000-0x03ffffff: peripherals +* 0x40000000-0x41efffff, 0x42000000-0x43efffff: memory bank +* 0x41f00000-0x41ffffff, 0x43f00000-0x43ffffff: peripherals */ writel (0x0000bc01 ,SBBASE0 ); }else {/* * Boot Swap Off: boot from mask ROM -* 0x00000000-0x01ffffff: mask ROM -* 0x02000000-0x03efffff: memory bank (31MB) -* 0x03f00000-0x03ffffff: peripherals (1MB) +* 0x40000000-0x41ffffff: mask ROM +* 0x42000000-0x43efffff: memory bank (31MB) +* 0x43f00000-0x43ffffff: peripherals (1MB) */ writel (0x0000be01 ,SBBASE0 );/* dummy */ writel (0x0200be01 ,SBBASE1 );
arch/arm/mach-uniphier/ph1-sld3/sbc_init.c +6 -6
@@ -24,18 +24,18 @@ void sbc_init(void)if (boot_is_swapped ()) {/* * Boot Swap On: boot from external NOR/SRAM -* 0x02000000-0x03ffffff is a mirror of 0x00000000-0x01ffffff. +* 0x42000000-0x43ffffff is a mirror of 0x40000000-0x41ffffff. * -* 0x00000000-0x01efffff, 0x02000000-0x03efffff: memory bank -* 0x01f00000-0x01ffffff, 0x03f00000-0x03ffffff: peripherals +* 0x40000000-0x41efffff, 0x42000000-0x43efffff: memory bank +* 0x41f00000-0x41ffffff, 0x43f00000-0x43ffffff: peripherals */ writel (0x0000bc01 ,SBBASE0 ); }else {/* * Boot Swap Off: boot from mask ROM -* 0x00000000-0x01ffffff: mask ROM -* 0x02000000-0x03efffff: memory bank (31MB) -* 0x03f00000-0x03ffffff: peripherals (1MB) +* 0x40000000-0x41ffffff: mask ROM +* 0x42000000-0x43efffff: memory bank (31MB) +* 0x43f00000-0x43ffffff: peripherals (1MB) */ writel (0x0000be01 ,SBBASE0 );/* dummy */ writel (0x0200be01 ,SBBASE1 );
arch/arm/mach-uniphier/support_card.c +1 -1
@@ -103,7 +103,7 @@ static int mem_is_flash(const struct memory_bank *mem)/* {address, size} */ static const struct memory_bank memory_banks[] = { - {0x02000000 ,0x01f00000 }, + {0x42000000 ,0x01f00000 }, }; static const struct memory_bank
include/configs/uniphier.h +6 -1
@@ -62,7 +62,7 @@/* * Support card address map */ -#define CONFIG_SUPPORT_CARD_BASE 0x03f00000 +#define CONFIG_SUPPORT_CARD_BASE 0x43f00000#define CONFIG_SUPPORT_CARD_ETHER_BASE (CONFIG_SUPPORT_CARD_BASE + 0x00000000)#define CONFIG_SUPPORT_CARD_LED_BASE (CONFIG_SUPPORT_CARD_BASE + 0x00090000)#define CONFIG_SUPPORT_CARD_UART_BASE (CONFIG_SUPPORT_CARD_BASE + 0x000b0000)
@@ -240,6 +240,7 @@"fit_addr_r=0x84100000\0" \"fit_size=0x00f00000\0" \"norboot=run add_default_bootargs &&" \ +"setexpr fit_addr $nor_base + $fit_addr &&" \"bootm $fit_addr\0" \"nandboot=run add_default_bootargs &&" \"nand read $fit_addr_r $fit_addr $fit_size &&" \
@@ -262,6 +263,9 @@"ramdisk_size=0x00600000\0" \"ramdisk_file=rootfs.cpio.uboot\0" \"norboot=run add_default_bootargs &&" \ +"setexpr kernel_addr $nor_base + $kernel_addr &&" \ +"setexpr ramdisk_addr $nor_base + $ramdisk_addr &&" \ +"setexpr fdt_addr $nor_base + $fdt_addr &&" \"bootm $kernel_addr $ramdisk_addr $fdt_addr\0" \"nandboot=run add_default_bootargs &&" \"nand read $kernel_addr_r $kernel_addr $kernel_size &&" \
@@ -278,6 +282,7 @@#define CONFIG_EXTRA_ENV_SETTINGS \ "netdev=eth0\0" \ "verify=n\0" \ + "norbase=0x42000000\0" \ "nandupdate=nand erase 0 0x00100000 &&" \ "tftpboot u-boot-spl-dtb.bin &&" \ "nand write $loadaddr 0 0x00010000 &&" \
Signature · 1 line
1.9.1
PATCH v2 17/18 ARM: uniphier: remove ifdef CONFIG_{SOC} conditionals from sg-regs.h
In reply to Masahiro YamadaTo achieve the complete run-time configuration by device trees, ifdef conditionals in header files are not preferable.
---
Changes in v2: None
arch/arm/mach-uniphier/include/mach/sg-regs.h | 40 +++++++------------ arch/arm/mach-uniphier/ph1-ld4/lowlevel_debug.S | 4 +- arch/arm/mach-uniphier/ph1-ld4/pinctrl.c | 46 +++++++++++----------- arch/arm/mach-uniphier/ph1-pro4/lowlevel_debug.S | 4 +- arch/arm/mach-uniphier/ph1-pro4/pinctrl.c | 50 ++++++++++++------------ arch/arm/mach-uniphier/ph1-sld3/early_pinctrl.c | 12 +++--- arch/arm/mach-uniphier/ph1-sld3/lowlevel_debug.S | 4 +- arch/arm/mach-uniphier/ph1-sld3/pinctrl.c | 16 ++++---- arch/arm/mach-uniphier/ph1-sld3/sbc_init.c | 2 +- arch/arm/mach-uniphier/ph1-sld8/lowlevel_debug.S | 4 +- arch/arm/mach-uniphier/ph1-sld8/pinctrl.c | 46 +++++++++++----------- 11 files changed, 109 insertions(+), 119 deletions(-)
arch/arm/mach-uniphier/include/mach/sg-regs.h +15 -25
@@ -53,24 +53,6 @@/* Pin Control */ #define SG_PINCTRL_BASE (SG_CTRL_BASE | 0x1000) -#if defined(CONFIG_MACH_PH1_PRO4 ) -# define SG_PINCTRL (n) (SG_PINCTRL_BASE + (n) * 8) -#elif defined(CONFIG_MACH_PH1_SLD3 ) || defined(CONFIG_MACH_PH1_LD4 ) || \ - defined(CONFIG_MACH_PH1_SLD8 ) -# define SG_PINCTRL (n) (SG_PINCTRL_BASE + (n) * 4) -#endif - -#if defined(CONFIG_MACH_PH1_SLD3 ) || defined(CONFIG_MACH_PH1_PRO4 ) -#define SG_PINSELBITS 4 -#elif defined(CONFIG_MACH_PH1_LD4 ) || defined(CONFIG_MACH_PH1_SLD8 ) -#define SG_PINSELBITS 8 -#endif - -#define SG_PINSEL_ADDR (n) (SG_PINCTRL((n) * (SG_PINSELBITS) / 32)) -#define SG_PINSEL_MASK (n) (~(((1 << (SG_PINSELBITS)) - 1) << \ - ((n) * (SG_PINSELBITS) % 32))) -#define SG_PINSEL_MODE (n, mode) ((mode) << ((n) * (SG_PINSELBITS) % 32)) -/* Only for PH1-Pro4 */ #define SG_LOADPINCTRL (SG_CTRL_BASE | 0x1700)
@@ -98,11 +80,11 @@#ifdef __ASSEMBLY__ - .macro set_pinsel, n, value, ra, rd - ldr \ra, =SG_PINSEL_ADDR(\n) + .macro sg_set_pinsel, pin, muxval, mux_bits, reg_stride, ra, rd + ldr \ra, =(SG_PINCTRL_BASE + \pin * \mux_bits / 32 * \reg_stride) ldr \rd, [\ra] - and \rd, \rd, #SG_PINSEL_MASK(\n) - orr \rd, \rd, #SG_PINSEL_MODE(\n, \value) + and \rd, \rd, #~(((1 << \mux_bits) - 1) << (\pin * \mux_bits % 32)) + orr \rd, \rd, #(\muxval << (\pin * \mux_bits % 32)) str \rd, [\ra] .endm
@@ -111,10 +93,18 @@#include <linux/types.h> #include <linux/io.h> -static inline void sg_set_pinsel (int n,int value) +static inline void sg_set_pinsel (unsigned pin,unsigned muxval, +unsigned mux_bits,unsigned reg_stride) { -writel ((readl (SG_PINSEL_ADDR (n)) &SG_PINSEL_MASK (n)) - |SG_PINSEL_MODE (n, value),SG_PINSEL_ADDR (n)); +unsigned shift = pin * mux_bits %32 ; +unsigned reg =SG_PINCTRL_BASE + pin * mux_bits /32 * reg_stride; +u32 mask = (1U << mux_bits) -1 ; +u32 tmp; + + tmp =readl (reg); + tmp &= ~(mask << shift); + tmp |= (mask & muxval) << shift; +writel (tmp, reg); }#endif /* __ASSEMBLY__ */
arch/arm/mach-uniphier/ph1-ld4/lowlevel_debug.S +2 -2
@@ -17,8 +17,8 @@ ENTRY(setup_lowlevel_debug) init_debug_uart r0, r1, r2 /* UART Port 0 */ - set_pinsel 85, 1, r0, r1 - set_pinsel 88, 1, r0, r1 + sg_set_pinsel 85, 1, 8, 4, r0, r1 + sg_set_pinsel 88, 1, 8, 4, r0, r1 ldr r0, =SG_IECTRL ldr r1, [r0]
arch/arm/mach-uniphier/ph1-ld4/pinctrl.c +23 -23
55 lines not on this page · raw message
arch/arm/mach-uniphier/ph1-pro4/lowlevel_debug.S +2 -2
@@ -23,8 +23,8 @@ ENTRY(setup_lowlevel_debug) init_debug_uart r0, r1, r2 /* UART Port 0 */ - set_pinsel 127, 0, r0, r1 - set_pinsel 128, 0, r0, r1 + sg_set_pinsel 127, 0, 4, 8, r0, r1 + sg_set_pinsel 128, 0, 4, 8, r0, r1 ldr r0, =SG_LOADPINCTRL mov r1, #1
arch/arm/mach-uniphier/ph1-pro4/pinctrl.c +25 -25
62 lines not on this page · raw message
arch/arm/mach-uniphier/ph1-sld3/early_pinctrl.c +6 -6
@@ -11,13 +11,13 @@ void early_pin_init(void)/* Comment format: PAD Name -> Function Name */ #ifdef CONFIG_UNIPHIER_SERIAL -sg_set_pinsel (63 ,0 );/* RXD0 */ -sg_set_pinsel (64 ,1 );/* TXD0 */ +sg_set_pinsel (63 ,0 ,4 ,4 );/* RXD0 */ +sg_set_pinsel (64 ,1 ,4 ,4 );/* TXD0 */ -sg_set_pinsel (65 ,0 );/* RXD1 */ -sg_set_pinsel (66 ,1 );/* TXD1 */ +sg_set_pinsel (65 ,0 ,4 ,4 );/* RXD1 */ +sg_set_pinsel (66 ,1 ,4 ,4 );/* TXD1 */ -sg_set_pinsel (96 ,2 );/* RXD2 */ -sg_set_pinsel (102 ,2 );/* TXD2 */ +sg_set_pinsel (96 ,2 ,4 ,4 );/* RXD2 */ +sg_set_pinsel (102 ,2 ,4 ,4 );/* TXD2 */ #endif }
arch/arm/mach-uniphier/ph1-sld3/lowlevel_debug.S +2 -2
@@ -26,8 +26,8 @@ ENTRY(setup_lowlevel_debug) init_debug_uart r0, r1, r2 - set_pinsel 63, 0, r0, r1 - set_pinsel 64, 1, r0, r1 + sg_set_pinsel 63, 0, 4, 4, r0, r1 + sg_set_pinsel 64, 1, 4, 4, r0, r1 mov pc, lr ENDPROC(setup_lowlevel_debug)
arch/arm/mach-uniphier/ph1-sld3/pinctrl.c +8 -8
@@ -9,16 +9,16 @@void pin_init (void ) {#ifdef CONFIG_USB_EHCI_UNIPHIER -sg_set_pinsel (13 ,0 );/* USB0OC */ -sg_set_pinsel (14 ,1 );/* USB0VBUS */ +sg_set_pinsel (13 ,0 ,4 ,4 );/* USB0OC */ +sg_set_pinsel (14 ,1 ,4 ,4 );/* USB0VBUS */ -sg_set_pinsel (15 ,0 );/* USB1OC */ -sg_set_pinsel (16 ,1 );/* USB1VBUS */ +sg_set_pinsel (15 ,0 ,4 ,4 );/* USB1OC */ +sg_set_pinsel (16 ,1 ,4 ,4 );/* USB1VBUS */ -sg_set_pinsel (17 ,0 );/* USB2OC */ -sg_set_pinsel (18 ,1 );/* USB2VBUS */ +sg_set_pinsel (17 ,0 ,4 ,4 );/* USB2OC */ +sg_set_pinsel (18 ,1 ,4 ,4 );/* USB2VBUS */ -sg_set_pinsel (19 ,0 );/* USB3OC */ -sg_set_pinsel (20 ,1 );/* USB3VBUS */ +sg_set_pinsel (19 ,0 ,4 ,4 );/* USB3OC */ +sg_set_pinsel (20 ,1 ,4 ,4 );/* USB3VBUS */ #endif }
arch/arm/mach-uniphier/ph1-sld3/sbc_init.c +1 -1
@@ -41,5 +41,5 @@ void sbc_init(void)writel (0x0200be01 ,SBBASE1 ); } -sg_set_pinsel (99 ,1 );/* GPIO26 -> EA24 */ +sg_set_pinsel (99 ,1 ,4 ,4 );/* GPIO26 -> EA24 */ }
arch/arm/mach-uniphier/ph1-sld8/lowlevel_debug.S +2 -2
@@ -17,8 +17,8 @@ ENTRY(setup_lowlevel_debug) init_debug_uart r0, r1, r2 /* UART Port 0 */ - set_pinsel 70, 3, r0, r1 - set_pinsel 71, 3, r0, r1 + sg_set_pinsel 70, 3, 8, 4, r0, r1 + sg_set_pinsel 71, 3, 8, 4, r0, r1 ldr r0, =SG_IECTRL ldr r1, [r0]
arch/arm/mach-uniphier/ph1-sld8/pinctrl.c +23 -23
54 lines not on this page · raw message
Signature · 1 line
1.9.1
PATCH v2 18/18 ARM: uniphier: parse device tree to determine DRAM base and size
In reply to Masahiro YamadaDevice tree specifies the available memory ranges in its "/memory" node. Use it to simplify the CONFIG defines.
---
Changes in v2: None
arch/arm/mach-uniphier/board_common.c | 12 --------- arch/arm/mach-uniphier/dram_init.c | 51 ++++++++++++++++++++++++++++++++--- include/configs/uniphier.h | 11 +------- 3 files changed, 48 insertions(+), 26 deletions(-)
arch/arm/mach-uniphier/board_common.c +0 -12
@@ -18,15 +18,3 @@ int board_init(void)return 0 ; } - -#if CONFIG_NR_DRAM_BANKS >=2 -void dram_init_banksize (void ) -{ -DECLARE_GLOBAL_DATA_PTR ; - - gd->bd->bi_dram[0 ].start =CONFIG_SDRAM0_BASE ; - gd->bd->bi_dram[0 ].size =CONFIG_SDRAM0_SIZE ; - gd->bd->bi_dram[1 ].start =CONFIG_SDRAM1_BASE ; - gd->bd->bi_dram[1 ].size =CONFIG_SDRAM1_SIZE ; -} -#endif
arch/arm/mach-uniphier/dram_init.c +47 -4
63 lines not on this page · raw message
include/configs/uniphier.h +1 -10
@@ -295,17 +295,8 @@/* Open Firmware flat tree */ #define CONFIG_OF_LIBFDT -/* Memory Size & Mapping */ -#define CONFIG_SYS_SDRAM_BASE CONFIG_SDRAM0_BASE - -#if CONFIG_SDRAM0_BASE +CONFIG_SDRAM0_SIZE >=CONFIG_SDRAM1_BASE -/* Thre is no memory hole */ -#define CONFIG_NR_DRAM_BANKS 1 -#define CONFIG_SYS_SDRAM_SIZE (CONFIG_SDRAM0_SIZE + CONFIG_SDRAM1_SIZE) -#else +#define CONFIG_SYS_SDRAM_BASE 0x80000000#define CONFIG_NR_DRAM_BANKS 2 -#define CONFIG_SYS_SDRAM_SIZE (CONFIG_SDRAM0_SIZE) -#endif #if defined(CONFIG_MACH_PH1_SLD3 ) || defined(CONFIG_MACH_PH1_LD4 ) || \ defined(CONFIG_MACH_PH1_SLD8 )
Signature · 1 line
1.9.1
v2 cover ARM: uniphier: use pinctrl drivers and some cleanups
In reply to Masahiro Yamada2015-09-11 20:17 GMT+09:00 Masahiro Yamada <[email protected]>:
Quoted 14 lines
Masahiro Yamada (18):
pinctrl: uniphier: add UniPhier pinctrl core support
pinctrl: uniphier: add UniPhier PH1-LD4 pinctrl driver
pinctrl: uniphier: add UniPhier PH1-Pro4 pinctrl driver
pinctrl: uniphier: add UniPhier PH1-sLD8 pinctrl driver
pinctrl: uniphier: add UniPhier PH1-Pro5 pinctrl driver
pinctrl: uniphier: add UniPhier ProXstream2 pinctrl driver
pinctrl: uniphier: add UniPhier PH1-LD6b pinctrl driver
ARM: uniphier: enable simple-bus driver for SPL
ARM: uniphier: increaseCONFIG_SYS_MALLOC_F_LENto bind all nodes
ARM: dts: uniphier: prepare device trees to use pinctrl in SPL
Quoted 9 lines
ARM: uniphier: enable PINCTRL and
SPL_PINCTRL
ARM: uniphier: drop ad-hoc early pin-muxing settings
ARM: uniphier: drop ad-hoc input enable settings
ARM: uniphier: drop DCC micro support card support
ARM: uniphier: enable setexpr command
ARM: uniphier: change the external bus address mapping
ARM: uniphier: remove ifdef CONFIG_{SOC} conditionals fromsg-regs.h
ARM: uniphier: parse device tree to determine DRAM base and size
Series, applied to u-boot-uniphier/master.
Signature · 2 lines
Best Regards Masahiro Yamada