diff options
author | Tom Rini <trini@konsulko.com> | 2016-05-02 12:18:43 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2016-05-02 12:18:43 -0400 |
commit | 9a1f4bae0bded0ce354dd4b098d4b4a3b81d4d9a (patch) | |
tree | 69e41f1752a89ef97da3e002f1a00475a31dc3aa /arch | |
parent | 821c89d38cb6832f162b5b20ec86f07610407c25 (diff) | |
parent | bef4b024e9839ea7afe689b050fc95118eeb0b01 (diff) | |
download | u-boot-imx-9a1f4bae0bded0ce354dd4b098d4b4a3b81d4d9a.zip u-boot-imx-9a1f4bae0bded0ce354dd4b098d4b4a3b81d4d9a.tar.gz u-boot-imx-9a1f4bae0bded0ce354dd4b098d4b4a3b81d4d9a.tar.bz2 |
Merge branch 'master' of git://git.denx.de/u-boot-uniphier
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-uniphier/boot-mode/boot-mode-ld20.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-uniphier/early-clk/early-clk-ld20.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-uniphier/early-pinctrl/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/mach-uniphier/early-pinctrl/early-pinctrl-ld20.c | 32 | ||||
-rw-r--r-- | arch/arm/mach-uniphier/early-pinctrl/early-pinctrl-sld3.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-uniphier/init.h | 7 | ||||
-rw-r--r-- | arch/arm/mach-uniphier/init/init-ld20.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-uniphier/init/init-sld3.c | 5 | ||||
-rw-r--r-- | arch/arm/mach-uniphier/sbc/Makefile | 4 | ||||
-rw-r--r-- | arch/arm/mach-uniphier/sbc/sbc-sld3.c | 17 |
10 files changed, 47 insertions, 29 deletions
diff --git a/arch/arm/mach-uniphier/boot-mode/boot-mode-ld20.c b/arch/arm/mach-uniphier/boot-mode/boot-mode-ld20.c index 100275e..b092c1b 100644 --- a/arch/arm/mach-uniphier/boot-mode/boot-mode-ld20.c +++ b/arch/arm/mach-uniphier/boot-mode/boot-mode-ld20.c @@ -43,7 +43,7 @@ static struct boot_device_info boot_device_table[] = { {BOOT_DEVICE_MMC1, "eMMC (High Speed SDR, 8bit, 1.8V, Training Off)"}, {BOOT_DEVICE_MMC1, "eMMC (High Speed SDR, 8bit, 1.8V, Training On)"}, {BOOT_DEVICE_MMC1, "eMMC (Legacy, 4bit, 1.8V, Training Off)"}, - {BOOT_DEVICE_NONE, "Reserved"}, + {BOOT_DEVICE_NOR, "NOR Boot (XECS1)"}, }; static int get_boot_mode_sel(void) diff --git a/arch/arm/mach-uniphier/early-clk/early-clk-ld20.c b/arch/arm/mach-uniphier/early-clk/early-clk-ld20.c index 37adb37..5201a55 100644 --- a/arch/arm/mach-uniphier/early-clk/early-clk-ld20.c +++ b/arch/arm/mach-uniphier/early-clk/early-clk-ld20.c @@ -21,6 +21,10 @@ int uniphier_ld20_early_clk_init(const struct uniphier_board_data *bd) writel(tmp, SC_RSTCTRL7); /* provide clocks */ + tmp = readl(SC_CLKCTRL4); + tmp |= SC_CLKCTRL4_PERI; + writel(tmp, SC_CLKCTRL4); + tmp = readl(SC_CLKCTRL7); tmp |= SC_CLKCTRL7_UMCSB | SC_CLKCTRL7_UMC32 | SC_CLKCTRL7_UMC31 | SC_CLKCTRL7_UMC30; diff --git a/arch/arm/mach-uniphier/early-pinctrl/Makefile b/arch/arm/mach-uniphier/early-pinctrl/Makefile index dc4064c..a103902 100644 --- a/arch/arm/mach-uniphier/early-pinctrl/Makefile +++ b/arch/arm/mach-uniphier/early-pinctrl/Makefile @@ -3,3 +3,4 @@ # obj-$(CONFIG_ARCH_UNIPHIER_SLD3) += early-pinctrl-sld3.o +obj-$(CONFIG_ARCH_UNIPHIER_LD20) += early-pinctrl-ld20.o diff --git a/arch/arm/mach-uniphier/early-pinctrl/early-pinctrl-ld20.c b/arch/arm/mach-uniphier/early-pinctrl/early-pinctrl-ld20.c new file mode 100644 index 0000000..537deaf --- /dev/null +++ b/arch/arm/mach-uniphier/early-pinctrl/early-pinctrl-ld20.c @@ -0,0 +1,32 @@ +/* + * Copyright (C) 2016 Masahiro Yamada <yamada.masahiro@socionext.com> + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#include "../init.h" +#include "../sg-regs.h" + +int uniphier_ld20_early_pin_init(const struct uniphier_board_data *bd) +{ + /* Comment format: PAD Name -> Function Name */ + sg_set_pinsel(0, 0, 8, 4); /* XECS1 -> XECS1 */ + sg_set_pinsel(1, 0, 8, 4); /* ERXW -> ERXW */ + sg_set_pinsel(2, 0, 8, 4); /* XERWE1 -> XERWE1 */ + sg_set_pinsel(6, 2, 8, 4); /* XNFRE -> XERWE0 */ + sg_set_pinsel(7, 2, 8, 4); /* XNFWE -> ES0 */ + sg_set_pinsel(8, 2, 8, 4); /* NFALE -> ES1 */ + sg_set_pinsel(9, 2, 8, 4); /* NFCLE -> ES2 */ + sg_set_pinsel(10, 2, 8, 4); /* NFD0 -> ED0 */ + sg_set_pinsel(11, 2, 8, 4); /* NFD1 -> ED1 */ + sg_set_pinsel(12, 2, 8, 4); /* NFD2 -> ED2 */ + sg_set_pinsel(13, 2, 8, 4); /* NFD3 -> ED3 */ + sg_set_pinsel(14, 2, 8, 4); /* NFD4 -> ED4 */ + sg_set_pinsel(15, 2, 8, 4); /* NFD5 -> ED5 */ + sg_set_pinsel(16, 2, 8, 4); /* NFD6 -> ED6 */ + sg_set_pinsel(17, 2, 8, 4); /* NFD7 -> ED7 */ + sg_set_iectrl_range(0, 2); + sg_set_iectrl_range(6, 17); + + return 0; +} diff --git a/arch/arm/mach-uniphier/early-pinctrl/early-pinctrl-sld3.c b/arch/arm/mach-uniphier/early-pinctrl/early-pinctrl-sld3.c index 22c07fb..6c5d58f 100644 --- a/arch/arm/mach-uniphier/early-pinctrl/early-pinctrl-sld3.c +++ b/arch/arm/mach-uniphier/early-pinctrl/early-pinctrl-sld3.c @@ -22,5 +22,7 @@ int uniphier_sld3_early_pin_init(const struct uniphier_board_data *bd) sg_set_pinsel(102, 2, 4, 4); /* TXD2 */ #endif + sg_set_pinsel(99, 1, 4, 4); /* GPIO26 -> EA24 */ + return 0; } diff --git a/arch/arm/mach-uniphier/init.h b/arch/arm/mach-uniphier/init.h index f5b3fa8..ab0a68d 100644 --- a/arch/arm/mach-uniphier/init.h +++ b/arch/arm/mach-uniphier/init.h @@ -37,7 +37,6 @@ int uniphier_ld20_init(const struct uniphier_board_data *bd); #if defined(CONFIG_MICRO_SUPPORT_CARD) int uniphier_sbc_init_admulti(const struct uniphier_board_data *bd); int uniphier_sbc_init_savepin(const struct uniphier_board_data *bd); -int uniphier_sld3_sbc_init(const struct uniphier_board_data *bd); int uniphier_ld4_sbc_init(const struct uniphier_board_data *bd); int uniphier_pxs2_sbc_init(const struct uniphier_board_data *bd); #else @@ -53,11 +52,6 @@ static inline int uniphier_sbc_init_savepin( return 0; } -static inline int uniphier_sld3_sbc_init(const struct uniphier_board_data *bd) -{ - return 0; -} - static inline int uniphier_ld4_sbc_init(const struct uniphier_board_data *bd) { return 0; @@ -90,6 +84,7 @@ int uniphier_pxs2_early_clk_init(const struct uniphier_board_data *bd); int uniphier_ld20_early_clk_init(const struct uniphier_board_data *bd); int uniphier_sld3_early_pin_init(const struct uniphier_board_data *bd); +int uniphier_ld20_early_pin_init(const struct uniphier_board_data *bd); int uniphier_ld4_umc_init(const struct uniphier_board_data *bd); int uniphier_pro4_umc_init(const struct uniphier_board_data *bd); diff --git a/arch/arm/mach-uniphier/init/init-ld20.c b/arch/arm/mach-uniphier/init/init-ld20.c index 0ad264c..660ad45 100644 --- a/arch/arm/mach-uniphier/init/init-ld20.c +++ b/arch/arm/mach-uniphier/init/init-ld20.c @@ -13,6 +13,8 @@ int uniphier_ld20_init(const struct uniphier_board_data *bd) { uniphier_sbc_init_savepin(bd); + uniphier_pxs2_sbc_init(bd); + uniphier_ld20_early_pin_init(bd); support_card_reset(); diff --git a/arch/arm/mach-uniphier/init/init-sld3.c b/arch/arm/mach-uniphier/init/init-sld3.c index 473e0c8..50fcbb0 100644 --- a/arch/arm/mach-uniphier/init/init-sld3.c +++ b/arch/arm/mach-uniphier/init/init-sld3.c @@ -15,7 +15,8 @@ int uniphier_sld3_init(const struct uniphier_board_data *bd) uniphier_sld3_bcu_init(bd); uniphier_sbc_init_admulti(bd); - uniphier_sld3_sbc_init(bd); + + uniphier_sld3_early_pin_init(bd); support_card_reset(); @@ -34,8 +35,6 @@ int uniphier_sld3_init(const struct uniphier_board_data *bd) led_puts("L2"); - uniphier_sld3_early_pin_init(bd); - led_puts("L3"); #ifdef CONFIG_SPL_SERIAL_SUPPORT diff --git a/arch/arm/mach-uniphier/sbc/Makefile b/arch/arm/mach-uniphier/sbc/Makefile index 3c1e92a..38da253 100644 --- a/arch/arm/mach-uniphier/sbc/Makefile +++ b/arch/arm/mach-uniphier/sbc/Makefile @@ -2,11 +2,11 @@ # SPDX-License-Identifier: GPL-2.0+ # -obj-$(CONFIG_ARCH_UNIPHIER_SLD3) += sbc-admulti.o sbc-sld3.o +obj-$(CONFIG_ARCH_UNIPHIER_SLD3) += sbc-admulti.o obj-$(CONFIG_ARCH_UNIPHIER_LD4) += sbc-savepin.o sbc-ld4.o obj-$(CONFIG_ARCH_UNIPHIER_PRO4) += sbc-savepin.o obj-$(CONFIG_ARCH_UNIPHIER_SLD8) += sbc-savepin.o sbc-ld4.o obj-$(CONFIG_ARCH_UNIPHIER_PRO5) += sbc-savepin.o obj-$(CONFIG_ARCH_UNIPHIER_PXS2) += sbc-savepin.o sbc-pxs2.o obj-$(CONFIG_ARCH_UNIPHIER_LD6B) += sbc-savepin.o sbc-pxs2.o -obj-$(CONFIG_ARCH_UNIPHIER_LD20) += sbc-savepin.o +obj-$(CONFIG_ARCH_UNIPHIER_LD20) += sbc-savepin.o sbc-pxs2.o diff --git a/arch/arm/mach-uniphier/sbc/sbc-sld3.c b/arch/arm/mach-uniphier/sbc/sbc-sld3.c deleted file mode 100644 index ac9d030..0000000 --- a/arch/arm/mach-uniphier/sbc/sbc-sld3.c +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright (C) 2011-2015 Masahiro Yamada <yamada.masahiro@socionext.com> - * - * SPDX-License-Identifier: GPL-2.0+ - */ - -#include <linux/io.h> - -#include "../init.h" -#include "../sg-regs.h" - -int uniphier_sld3_sbc_init(const struct uniphier_board_data *bd) -{ - sg_set_pinsel(99, 1, 4, 4); /* GPIO26 -> EA24 */ - - return 0; -} |