diff options
author | Tom Rini <trini@konsulko.com> | 2017-01-17 16:39:43 (GMT) |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2017-01-17 16:39:43 (GMT) |
commit | bfd07670a48d9fbf22646c93e07dcd8cbc8d0864 (patch) | |
tree | 3ce5c9c53c29c93bd72adfecfc0085b8a9346ad6 /arch/arm/mach-uniphier/clk | |
parent | 373ae16c9282cf6dfb39cd6e1b8ad26098635ca2 (diff) | |
parent | 2cfa35c47b9c9b80c8ff084f55391a03fd575956 (diff) | |
download | u-boot-bfd07670a48d9fbf22646c93e07dcd8cbc8d0864.tar.xz |
Merge branch 'master' of git://git.denx.de/u-boot-uniphier
- Enable eMMC driver for LD11/LD20 SoCs
- Refactoring of SoC init code
- Bug fix of pinctrl driver
Diffstat (limited to 'arch/arm/mach-uniphier/clk')
-rw-r--r-- | arch/arm/mach-uniphier/clk/Makefile | 20 | ||||
-rw-r--r-- | arch/arm/mach-uniphier/clk/clk-dram-ld11.c (renamed from arch/arm/mach-uniphier/clk/early-clk-ld11.c) | 11 | ||||
-rw-r--r-- | arch/arm/mach-uniphier/clk/clk-dram-ld20.c (renamed from arch/arm/mach-uniphier/clk/early-clk-ld20.c) | 10 | ||||
-rw-r--r-- | arch/arm/mach-uniphier/clk/clk-dram-pro5.c (renamed from arch/arm/mach-uniphier/clk/early-clk-pro5.c) | 11 | ||||
-rw-r--r-- | arch/arm/mach-uniphier/clk/clk-dram-pxs2.c (renamed from arch/arm/mach-uniphier/clk/early-clk-pxs2.c) | 16 | ||||
-rw-r--r-- | arch/arm/mach-uniphier/clk/clk-dram-sld3.c (renamed from arch/arm/mach-uniphier/clk/early-clk-ld4.c) | 12 | ||||
-rw-r--r-- | arch/arm/mach-uniphier/clk/clk-early-ld11.c | 20 | ||||
-rw-r--r-- | arch/arm/mach-uniphier/clk/clk-early-sld3.c | 31 | ||||
-rw-r--r-- | arch/arm/mach-uniphier/clk/clk-ld20.c | 14 | ||||
-rw-r--r-- | arch/arm/mach-uniphier/clk/dpll-pro5.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-uniphier/clk/dpll-pxs2.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-uniphier/clk/pll-ld20.c | 4 |
12 files changed, 87 insertions, 74 deletions
diff --git a/arch/arm/mach-uniphier/clk/Makefile b/arch/arm/mach-uniphier/clk/Makefile index 95f433e..37df04b 100644 --- a/arch/arm/mach-uniphier/clk/Makefile +++ b/arch/arm/mach-uniphier/clk/Makefile @@ -4,15 +4,15 @@ ifdef CONFIG_SPL_BUILD -obj-$(CONFIG_ARCH_UNIPHIER_SLD3) += early-clk-ld4.o dpll-sld3.o -obj-$(CONFIG_ARCH_UNIPHIER_LD4) += early-clk-ld4.o dpll-ld4.o -obj-$(CONFIG_ARCH_UNIPHIER_PRO4) += early-clk-ld4.o dpll-pro4.o -obj-$(CONFIG_ARCH_UNIPHIER_SLD8) += early-clk-ld4.o dpll-sld8.o -obj-$(CONFIG_ARCH_UNIPHIER_PRO5) += early-clk-pro5.o -obj-$(CONFIG_ARCH_UNIPHIER_PXS2) += early-clk-pxs2.o -obj-$(CONFIG_ARCH_UNIPHIER_LD6B) += early-clk-pxs2.o -obj-$(CONFIG_ARCH_UNIPHIER_LD11) += early-clk-ld11.o dpll-ld11.o -obj-$(CONFIG_ARCH_UNIPHIER_LD20) += early-clk-ld20.o dpll-ld20.o +obj-$(CONFIG_ARCH_UNIPHIER_SLD3) += clk-early-sld3.o clk-dram-sld3.o dpll-sld3.o +obj-$(CONFIG_ARCH_UNIPHIER_LD4) += clk-early-sld3.o clk-dram-sld3.o dpll-ld4.o +obj-$(CONFIG_ARCH_UNIPHIER_PRO4) += clk-early-sld3.o clk-dram-sld3.o dpll-pro4.o +obj-$(CONFIG_ARCH_UNIPHIER_SLD8) += clk-early-sld3.o clk-dram-sld3.o dpll-sld8.o +obj-$(CONFIG_ARCH_UNIPHIER_PRO5) += clk-early-sld3.o clk-dram-pro5.o dpll-pro5.o +obj-$(CONFIG_ARCH_UNIPHIER_PXS2) += clk-early-sld3.o clk-dram-pxs2.o dpll-pxs2.o +obj-$(CONFIG_ARCH_UNIPHIER_LD6B) += clk-early-sld3.o clk-dram-pxs2.o dpll-pxs2.o +obj-$(CONFIG_ARCH_UNIPHIER_LD11) += clk-early-ld11.o clk-dram-ld11.o dpll-ld11.o +obj-$(CONFIG_ARCH_UNIPHIER_LD20) += clk-early-ld11.o clk-dram-ld20.o dpll-ld20.o else @@ -24,7 +24,7 @@ obj-$(CONFIG_ARCH_UNIPHIER_PRO5) += clk-pro5.o obj-$(CONFIG_ARCH_UNIPHIER_PXS2) += clk-pxs2.o obj-$(CONFIG_ARCH_UNIPHIER_LD6B) += clk-pxs2.o obj-$(CONFIG_ARCH_UNIPHIER_LD11) += clk-ld11.o pll-ld11.o -obj-$(CONFIG_ARCH_UNIPHIER_LD20) += clk-ld20.o pll-ld20.o +obj-$(CONFIG_ARCH_UNIPHIER_LD20) += pll-ld20.o endif diff --git a/arch/arm/mach-uniphier/clk/early-clk-ld11.c b/arch/arm/mach-uniphier/clk/clk-dram-ld11.c index c94d83c..593e11a 100644 --- a/arch/arm/mach-uniphier/clk/early-clk-ld11.c +++ b/arch/arm/mach-uniphier/clk/clk-dram-ld11.c @@ -1,6 +1,5 @@ /* - * Copyright (C) 2016 Socionext Inc. - * Author: Masahiro Yamada <yamada.masahiro@socionext.com> + * Copyright (C) 2016-2017 Socionext Inc. * * SPDX-License-Identifier: GPL-2.0+ */ @@ -10,7 +9,7 @@ #include "../init.h" #include "../sc64-regs.h" -int uniphier_ld11_early_clk_init(const struct uniphier_board_data *bd) +void uniphier_ld11_dram_clk_init(void) { u32 tmp; @@ -20,13 +19,7 @@ int uniphier_ld11_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_UMC31 | SC_CLKCTRL7_UMC30; writel(tmp, SC_CLKCTRL7); - - return 0; } diff --git a/arch/arm/mach-uniphier/clk/early-clk-ld20.c b/arch/arm/mach-uniphier/clk/clk-dram-ld20.c index 5201a55..62e5acd 100644 --- a/arch/arm/mach-uniphier/clk/early-clk-ld20.c +++ b/arch/arm/mach-uniphier/clk/clk-dram-ld20.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016 Masahiro Yamada <yamada.masahiro@socionext.com> + * Copyright (C) 2016-2017 Socionext Inc. * * SPDX-License-Identifier: GPL-2.0+ */ @@ -9,7 +9,7 @@ #include "../init.h" #include "../sc64-regs.h" -int uniphier_ld20_early_clk_init(const struct uniphier_board_data *bd) +void uniphier_ld20_dram_clk_init(void) { u32 tmp; @@ -21,14 +21,8 @@ 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; writel(tmp, SC_CLKCTRL7); - - return 0; } diff --git a/arch/arm/mach-uniphier/clk/early-clk-pro5.c b/arch/arm/mach-uniphier/clk/clk-dram-pro5.c index c41a8ea..1edc85a 100644 --- a/arch/arm/mach-uniphier/clk/early-clk-pro5.c +++ b/arch/arm/mach-uniphier/clk/clk-dram-pro5.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2015 Masahiro Yamada <yamada.m@jp.panasonic.com> + * Copyright (C) 2015-2017 Socionext Inc. * * SPDX-License-Identifier: GPL-2.0+ */ @@ -9,7 +9,7 @@ #include "../init.h" #include "../sc-regs.h" -int uniphier_pro5_early_clk_init(const struct uniphier_board_data *bd) +void uniphier_pro5_dram_clk_init(void) { u32 tmp; @@ -24,17 +24,12 @@ int uniphier_pro5_early_clk_init(const struct uniphier_board_data *bd) SC_RSTCTRL4_NRST_UMCA1 | SC_RSTCTRL4_NRST_UMCA0 | SC_RSTCTRL4_NRST_UMC31 | SC_RSTCTRL4_NRST_UMC30; writel(tmp, SC_RSTCTRL4); - readl(SC_RSTCTRL); /* dummy read */ + readl(SC_RSTCTRL4); /* dummy read */ /* provide clocks */ - tmp = readl(SC_CLKCTRL); - tmp |= SC_CLKCTRL_CEN_SBC | SC_CLKCTRL_CEN_PERI; - writel(tmp, SC_CLKCTRL); tmp = readl(SC_CLKCTRL4); tmp |= SC_CLKCTRL4_CEN_UMCSB | SC_CLKCTRL4_CEN_UMC1 | SC_CLKCTRL4_CEN_UMC0; writel(tmp, SC_CLKCTRL4); readl(SC_CLKCTRL4); /* dummy read */ - - return 0; } diff --git a/arch/arm/mach-uniphier/clk/early-clk-pxs2.c b/arch/arm/mach-uniphier/clk/clk-dram-pxs2.c index 665ecd5..75eaab7 100644 --- a/arch/arm/mach-uniphier/clk/early-clk-pxs2.c +++ b/arch/arm/mach-uniphier/clk/clk-dram-pxs2.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2015 Masahiro Yamada <yamada.masahiro@socionext.com> + * Copyright (C) 2016-2017 Socionext Inc. * * SPDX-License-Identifier: GPL-2.0+ */ @@ -11,17 +11,11 @@ #include "../init.h" #include "../sc-regs.h" -int uniphier_pxs2_early_clk_init(const struct uniphier_board_data *bd) +void uniphier_pxs2_dram_clk_init(void) { u32 tmp; /* deassert reset */ - if (spl_boot_device() != BOOT_DEVICE_NAND) { - tmp = readl(SC_RSTCTRL); - tmp &= ~SC_RSTCTRL_NRST_NAND; - writel(tmp, SC_RSTCTRL); - }; - tmp = readl(SC_RSTCTRL4); tmp |= SC_RSTCTRL4_NRST_UMCSB | SC_RSTCTRL4_NRST_UMCA2 | SC_RSTCTRL4_NRST_UMCA1 | SC_RSTCTRL4_NRST_UMCA0 | @@ -31,15 +25,9 @@ int uniphier_pxs2_early_clk_init(const struct uniphier_board_data *bd) readl(SC_RSTCTRL4); /* dummy read */ /* provide clocks */ - tmp = readl(SC_CLKCTRL); - tmp |= SC_CLKCTRL_CEN_SBC | SC_CLKCTRL_CEN_PERI; - writel(tmp, SC_CLKCTRL); - tmp = readl(SC_CLKCTRL4); tmp |= SC_CLKCTRL4_CEN_UMCSB | SC_CLKCTRL4_CEN_UMC2 | SC_CLKCTRL4_CEN_UMC1 | SC_CLKCTRL4_CEN_UMC0; writel(tmp, SC_CLKCTRL4); readl(SC_CLKCTRL4); /* dummy read */ - - return 0; } diff --git a/arch/arm/mach-uniphier/clk/early-clk-ld4.c b/arch/arm/mach-uniphier/clk/clk-dram-sld3.c index b6e8b64..3430303 100644 --- a/arch/arm/mach-uniphier/clk/early-clk-ld4.c +++ b/arch/arm/mach-uniphier/clk/clk-dram-sld3.c @@ -1,5 +1,6 @@ /* - * Copyright (C) 2011-2015 Masahiro Yamada <yamada.m@jp.panasonic.com> + * Copyright (C) 2011-2014 Panasonic Corporation + * Copyright (C) 2015-2017 Socionext Inc. * * SPDX-License-Identifier: GPL-2.0+ */ @@ -11,24 +12,19 @@ #include "../init.h" #include "../sc-regs.h" -int uniphier_ld4_early_clk_init(const struct uniphier_board_data *bd) +void uniphier_sld3_dram_clk_init(void) { u32 tmp; /* deassert reset */ tmp = readl(SC_RSTCTRL); - tmp |= SC_RSTCTRL_NRST_UMC1 | SC_RSTCTRL_NRST_UMC0; - if (spl_boot_device() != BOOT_DEVICE_NAND) - tmp &= ~SC_RSTCTRL_NRST_NAND; writel(tmp, SC_RSTCTRL); readl(SC_RSTCTRL); /* dummy read */ /* provide clocks */ tmp = readl(SC_CLKCTRL); - tmp |= SC_CLKCTRL_CEN_UMC | SC_CLKCTRL_CEN_SBC | SC_CLKCTRL_CEN_PERI; + tmp |= SC_CLKCTRL_CEN_UMC; writel(tmp, SC_CLKCTRL); readl(SC_CLKCTRL); /* dummy read */ - - return 0; } diff --git a/arch/arm/mach-uniphier/clk/clk-early-ld11.c b/arch/arm/mach-uniphier/clk/clk-early-ld11.c new file mode 100644 index 0000000..bb6f7a4 --- /dev/null +++ b/arch/arm/mach-uniphier/clk/clk-early-ld11.c @@ -0,0 +1,20 @@ +/* + * Copyright (C) 2016-2017 Socionext Inc. + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#include <linux/io.h> + +#include "../init.h" +#include "../sc64-regs.h" + +void uniphier_ld11_early_clk_init(void) +{ + u32 tmp; + + /* provide clocks */ + tmp = readl(SC_CLKCTRL4); + tmp |= SC_CLKCTRL4_PERI; + writel(tmp, SC_CLKCTRL4); +} diff --git a/arch/arm/mach-uniphier/clk/clk-early-sld3.c b/arch/arm/mach-uniphier/clk/clk-early-sld3.c new file mode 100644 index 0000000..3235da2 --- /dev/null +++ b/arch/arm/mach-uniphier/clk/clk-early-sld3.c @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2011-2014 Panasonic Corporation + * Copyright (C) 2015-2017 Socionext Inc. + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#include <common.h> +#include <spl.h> +#include <linux/io.h> + +#include "../init.h" +#include "../sc-regs.h" + +void uniphier_sld3_early_clk_init(void) +{ + u32 tmp; + + /* deassert reset */ + if (spl_boot_device() != BOOT_DEVICE_NAND) { + tmp = readl(SC_RSTCTRL); + tmp &= ~SC_RSTCTRL_NRST_NAND; + writel(tmp, SC_RSTCTRL); + }; + + /* provide clocks */ + tmp = readl(SC_CLKCTRL); + tmp |= SC_CLKCTRL_CEN_SBC | SC_CLKCTRL_CEN_PERI; + writel(tmp, SC_CLKCTRL); + readl(SC_CLKCTRL); /* dummy read */ +} diff --git a/arch/arm/mach-uniphier/clk/clk-ld20.c b/arch/arm/mach-uniphier/clk/clk-ld20.c deleted file mode 100644 index 556a30a..0000000 --- a/arch/arm/mach-uniphier/clk/clk-ld20.c +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Copyright (C) 2016 Masahiro Yamada <yamada.masahiro@socionext.com> - * - * SPDX-License-Identifier: GPL-2.0+ - */ - -#include <linux/io.h> - -#include "../init.h" -#include "../sc64-regs.h" - -void uniphier_ld20_clk_init(void) -{ -} diff --git a/arch/arm/mach-uniphier/clk/dpll-pro5.c b/arch/arm/mach-uniphier/clk/dpll-pro5.c new file mode 100644 index 0000000..d3a42c7 --- /dev/null +++ b/arch/arm/mach-uniphier/clk/dpll-pro5.c @@ -0,0 +1,6 @@ +#include "../init.h" + +int uniphier_pro5_dpll_init(const struct uniphier_board_data *bd) +{ + return 0; +} diff --git a/arch/arm/mach-uniphier/clk/dpll-pxs2.c b/arch/arm/mach-uniphier/clk/dpll-pxs2.c new file mode 100644 index 0000000..328ebf6 --- /dev/null +++ b/arch/arm/mach-uniphier/clk/dpll-pxs2.c @@ -0,0 +1,6 @@ +#include "../init.h" + +int uniphier_pxs2_dpll_init(const struct uniphier_board_data *bd) +{ + return 0; +} diff --git a/arch/arm/mach-uniphier/clk/pll-ld20.c b/arch/arm/mach-uniphier/clk/pll-ld20.c index 8ad6883..121a369 100644 --- a/arch/arm/mach-uniphier/clk/pll-ld20.c +++ b/arch/arm/mach-uniphier/clk/pll-ld20.c @@ -11,7 +11,7 @@ #include "../sc64-regs.h" #include "pll.h" -int uniphier_ld20_pll_init(const struct uniphier_board_data *bd) +void uniphier_ld20_pll_init(void) { uniphier_ld20_sscpll_init(SC_CPLLCTRL, UNIPHIER_PLL_FREQ_DEFAULT, 0, 4); /* do nothing for SPLL */ @@ -36,6 +36,4 @@ int uniphier_ld20_pll_init(const struct uniphier_board_data *bd) uniphier_ld20_dspll_init(SC_VPLL8KCTRL); uniphier_ld20_dspll_init(SC_A2PLLCTRL); - - return 0; } |