Merge branch 'master' of http://git.denx.de/u-boot-sunxi
diff --git a/arch/arm/dts/uniphier-ph1-ld11.dtsi b/arch/arm/dts/uniphier-ph1-ld11.dtsi
index 069cdf2..7d498ce 100644
--- a/arch/arm/dts/uniphier-ph1-ld11.dtsi
+++ b/arch/arm/dts/uniphier-ph1-ld11.dtsi
@@ -69,6 +69,7 @@
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart0>;
clocks = <&uart_clk>;
+ clock-frequency = <58820000>;
};
serial1: serial@54006900 {
@@ -79,6 +80,7 @@
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart1>;
clocks = <&uart_clk>;
+ clock-frequency = <58820000>;
};
serial2: serial@54006a00 {
@@ -89,6 +91,7 @@
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart2>;
clocks = <&uart_clk>;
+ clock-frequency = <58820000>;
};
serial3: serial@54006b00 {
@@ -99,6 +102,7 @@
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart3>;
clocks = <&uart_clk>;
+ clock-frequency = <58820000>;
};
i2c0: i2c@58780000 {
diff --git a/arch/arm/dts/uniphier-ph1-ld20.dtsi b/arch/arm/dts/uniphier-ph1-ld20.dtsi
index 1bb45be..fc1c6bf 100644
--- a/arch/arm/dts/uniphier-ph1-ld20.dtsi
+++ b/arch/arm/dts/uniphier-ph1-ld20.dtsi
@@ -105,6 +105,7 @@
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart0>;
clocks = <&uart_clk>;
+ clock-frequency = <58820000>;
};
serial1: serial@54006900 {
@@ -115,6 +116,7 @@
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart1>;
clocks = <&uart_clk>;
+ clock-frequency = <58820000>;
};
serial2: serial@54006a00 {
@@ -125,6 +127,7 @@
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart2>;
clocks = <&uart_clk>;
+ clock-frequency = <58820000>;
};
serial3: serial@54006b00 {
@@ -135,6 +138,7 @@
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart3>;
clocks = <&uart_clk>;
+ clock-frequency = <58820000>;
};
i2c0: i2c@58780000 {
diff --git a/arch/arm/dts/uniphier-ph1-sld3-ref.dts b/arch/arm/dts/uniphier-ph1-sld3-ref.dts
index c4601cf..099df83 100644
--- a/arch/arm/dts/uniphier-ph1-sld3-ref.dts
+++ b/arch/arm/dts/uniphier-ph1-sld3-ref.dts
@@ -57,6 +57,10 @@
status = "okay";
};
+&emmc {
+ status = "okay";
+};
+
&sd {
status = "okay";
};
diff --git a/arch/arm/dts/uniphier-pinctrl.dtsi b/arch/arm/dts/uniphier-pinctrl.dtsi
index 988e60a..2d36f98 100644
--- a/arch/arm/dts/uniphier-pinctrl.dtsi
+++ b/arch/arm/dts/uniphier-pinctrl.dtsi
@@ -42,6 +42,11 @@
function = "i2c4";
};
+ pinctrl_nand: nand_grp {
+ groups = "nand";
+ function = "nand";
+ };
+
pinctrl_sd: sd_grp {
groups = "sd";
function = "sd";
diff --git a/arch/arm/mach-uniphier/arm32/debug_ll.S b/arch/arm/mach-uniphier/arm32/debug_ll.S
index 5db7427..76631f2 100644
--- a/arch/arm/mach-uniphier/arm32/debug_ll.S
+++ b/arch/arm/mach-uniphier/arm32/debug_ll.S
@@ -29,7 +29,7 @@
#if defined(CONFIG_ARCH_UNIPHIER_SLD3)
#define UNIPHIER_SLD3_UART_CLK 36864000
cmp r1, #0x25
- bne ph1_sld3_end
+ bne sld3_end
sg_set_pinsel 64, 1, 4, 4, r0, r1 @ TXD0 -> TXD0
@@ -45,12 +45,12 @@
ldr r3, =DIV_ROUND(UNIPHIER_SLD3_UART_CLK, 16 * BAUDRATE)
b init_uart
-ph1_sld3_end:
+sld3_end:
#endif
#if defined(CONFIG_ARCH_UNIPHIER_LD4)
#define UNIPHIER_LD4_UART_CLK 36864000
cmp r1, #0x26
- bne ph1_ld4_end
+ bne ld4_end
ldr r0, =SG_IECTRL
ldr r1, [r0]
@@ -62,12 +62,12 @@
ldr r3, =DIV_ROUND(UNIPHIER_LD4_UART_CLK, 16 * BAUDRATE)
b init_uart
-ph1_ld4_end:
+ld4_end:
#endif
#if defined(CONFIG_ARCH_UNIPHIER_PRO4)
#define UNIPHIER_PRO4_UART_CLK 73728000
cmp r1, #0x28
- bne ph1_pro4_end
+ bne pro4_end
sg_set_pinsel 128, 0, 4, 8, r0, r1 @ TXD0 -> TXD0
@@ -83,12 +83,12 @@
ldr r3, =DIV_ROUND(UNIPHIER_PRO4_UART_CLK, 16 * BAUDRATE)
b init_uart
-ph1_pro4_end:
+pro4_end:
#endif
#if defined(CONFIG_ARCH_UNIPHIER_SLD8)
#define UNIPHIER_SLD8_UART_CLK 80000000
cmp r1, #0x29
- bne ph1_sld8_end
+ bne sld8_end
ldr r0, =SG_IECTRL
ldr r1, [r0]
@@ -100,12 +100,12 @@
ldr r3, =DIV_ROUND(UNIPHIER_SLD8_UART_CLK, 16 * BAUDRATE)
b init_uart
-ph1_sld8_end:
+sld8_end:
#endif
#if defined(CONFIG_ARCH_UNIPHIER_PRO5)
#define UNIPHIER_PRO5_UART_CLK 73728000
cmp r1, #0x2A
- bne ph1_pro5_end
+ bne pro5_end
sg_set_pinsel 47, 0, 4, 8, r0, r1 @ TXD0 -> TXD0
sg_set_pinsel 49, 0, 4, 8, r0, r1 @ TXD1 -> TXD1
@@ -124,12 +124,12 @@
ldr r3, =DIV_ROUND(UNIPHIER_PRO5_UART_CLK, 16 * BAUDRATE)
b init_uart
-ph1_pro5_end:
+pro5_end:
#endif
#if defined(CONFIG_ARCH_UNIPHIER_PXS2)
#define UNIPHIER_PXS2_UART_CLK 88900000
cmp r1, #0x2E
- bne proxstream2_end
+ bne pxs2_end
ldr r0, =SG_IECTRL
ldr r1, [r0]
@@ -149,12 +149,12 @@
ldr r3, =DIV_ROUND(UNIPHIER_PXS2_UART_CLK, 16 * BAUDRATE)
b init_uart
-proxstream2_end:
+pxs2_end:
#endif
#if defined(CONFIG_ARCH_UNIPHIER_LD6B)
#define UNIPHIER_LD6B_UART_CLK 88900000
cmp r1, #0x2F
- bne ph1_ld6b_end
+ bne ld6b_end
ldr r0, =SG_IECTRL
ldr r1, [r0]
@@ -173,7 +173,7 @@
ldr r3, =DIV_ROUND(UNIPHIER_LD6B_UART_CLK, 16 * BAUDRATE)
b init_uart
-ph1_ld6b_end:
+ld6b_end:
#endif
mov pc, lr
diff --git a/arch/arm/mach-uniphier/bcu/bcu-ld4.c b/arch/arm/mach-uniphier/bcu/bcu-ld4.c
index bbe8a74..eeab802 100644
--- a/arch/arm/mach-uniphier/bcu/bcu-ld4.c
+++ b/arch/arm/mach-uniphier/bcu/bcu-ld4.c
@@ -11,7 +11,7 @@
#define ch(x) ((x) >= 32 ? 0 : (x) < 0 ? 0x11111111 : 0x11111111 << (x))
-int ph1_ld4_bcu_init(const struct uniphier_board_data *bd)
+int uniphier_ld4_bcu_init(const struct uniphier_board_data *bd)
{
int shift;
diff --git a/arch/arm/mach-uniphier/bcu/bcu-sld3.c b/arch/arm/mach-uniphier/bcu/bcu-sld3.c
index b7497e9..493e6d5 100644
--- a/arch/arm/mach-uniphier/bcu/bcu-sld3.c
+++ b/arch/arm/mach-uniphier/bcu/bcu-sld3.c
@@ -11,7 +11,7 @@
#define ch(x) ((x) >= 32 ? 0 : (x) < 0 ? 0x11111111 : 0x11111111 << (x))
-int ph1_sld3_bcu_init(const struct uniphier_board_data *bd)
+int uniphier_sld3_bcu_init(const struct uniphier_board_data *bd)
{
int shift;
diff --git a/arch/arm/mach-uniphier/board_early_init_f.c b/arch/arm/mach-uniphier/board_early_init_f.c
index 8e568ee..6f2adf1 100644
--- a/arch/arm/mach-uniphier/board_early_init_f.c
+++ b/arch/arm/mach-uniphier/board_early_init_f.c
@@ -15,51 +15,51 @@
switch (uniphier_get_soc_type()) {
#if defined(CONFIG_ARCH_UNIPHIER_SLD3)
case SOC_UNIPHIER_SLD3:
- ph1_sld3_pin_init();
+ uniphier_sld3_pin_init();
led_puts("U1");
- ph1_ld4_clk_init();
+ uniphier_ld4_clk_init();
break;
#endif
#if defined(CONFIG_ARCH_UNIPHIER_LD4)
case SOC_UNIPHIER_LD4:
- ph1_ld4_pin_init();
+ uniphier_ld4_pin_init();
led_puts("U1");
- ph1_ld4_clk_init();
+ uniphier_ld4_clk_init();
break;
#endif
#if defined(CONFIG_ARCH_UNIPHIER_PRO4)
case SOC_UNIPHIER_PRO4:
- ph1_pro4_pin_init();
+ uniphier_pro4_pin_init();
led_puts("U1");
- ph1_pro4_clk_init();
+ uniphier_pro4_clk_init();
break;
#endif
#if defined(CONFIG_ARCH_UNIPHIER_SLD8)
case SOC_UNIPHIER_SLD8:
- ph1_sld8_pin_init();
+ uniphier_sld8_pin_init();
led_puts("U1");
- ph1_ld4_clk_init();
+ uniphier_ld4_clk_init();
break;
#endif
#if defined(CONFIG_ARCH_UNIPHIER_PRO5)
case SOC_UNIPHIER_PRO5:
- ph1_pro5_pin_init();
+ uniphier_pro5_pin_init();
led_puts("U1");
- ph1_pro5_clk_init();
+ uniphier_pro5_clk_init();
break;
#endif
#if defined(CONFIG_ARCH_UNIPHIER_PXS2)
case SOC_UNIPHIER_PXS2:
- proxstream2_pin_init();
+ uniphier_pxs2_pin_init();
led_puts("U1");
- proxstream2_clk_init();
+ uniphier_pxs2_clk_init();
break;
#endif
#if defined(CONFIG_ARCH_UNIPHIER_LD6B)
case SOC_UNIPHIER_LD6B:
- ph1_ld6b_pin_init();
+ uniphier_ld6b_pin_init();
led_puts("U1");
- proxstream2_clk_init();
+ uniphier_pxs2_clk_init();
break;
#endif
default:
diff --git a/arch/arm/mach-uniphier/boards.c b/arch/arm/mach-uniphier/boards.c
index 5e98c3f..0d2b94d 100644
--- a/arch/arm/mach-uniphier/boards.c
+++ b/arch/arm/mach-uniphier/boards.c
@@ -13,7 +13,7 @@
DECLARE_GLOBAL_DATA_PTR;
#if defined(CONFIG_ARCH_UNIPHIER_SLD3)
-static const struct uniphier_board_data ph1_sld3_data = {
+static const struct uniphier_board_data uniphier_sld3_data = {
.dram_freq = 1600,
.dram_nr_ch = 3,
.dram_ch[0] = {
@@ -35,7 +35,7 @@
#endif
#if defined(CONFIG_ARCH_UNIPHIER_LD4)
-static const struct uniphier_board_data ph1_ld4_data = {
+static const struct uniphier_board_data uniphier_ld4_data = {
.dram_freq = 1600,
.dram_nr_ch = 2,
.dram_ddr3plus = true,
@@ -54,7 +54,7 @@
#if defined(CONFIG_ARCH_UNIPHIER_PRO4)
/* 1GB RAM board */
-static const struct uniphier_board_data ph1_pro4_data = {
+static const struct uniphier_board_data uniphier_pro4_data = {
.dram_freq = 1600,
.dram_nr_ch = 2,
.dram_ch[0] = {
@@ -70,7 +70,7 @@
};
/* 2GB RAM board */
-static const struct uniphier_board_data ph1_pro4_2g_data = {
+static const struct uniphier_board_data uniphier_pro4_2g_data = {
.dram_freq = 1600,
.dram_nr_ch = 2,
.dram_ch[0] = {
@@ -87,7 +87,7 @@
#endif
#if defined(CONFIG_ARCH_UNIPHIER_SLD8)
-static const struct uniphier_board_data ph1_sld8_data = {
+static const struct uniphier_board_data uniphier_sld8_data = {
.dram_freq = 1333,
.dram_nr_ch = 2,
.dram_ddr3plus = true,
@@ -105,7 +105,7 @@
#endif
#if defined(CONFIG_ARCH_UNIPHIER_PRO5)
-static const struct uniphier_board_data ph1_pro5_data = {
+static const struct uniphier_board_data uniphier_pro5_data = {
.dram_freq = 1866,
.dram_nr_ch = 2,
.dram_ch[0] = {
@@ -122,7 +122,7 @@
#endif
#if defined(CONFIG_ARCH_UNIPHIER_PXS2)
-static const struct uniphier_board_data proxstream2_data = {
+static const struct uniphier_board_data uniphier_pxs2_data = {
.dram_freq = 2133,
.dram_nr_ch = 3,
.dram_ch[0] = {
@@ -144,7 +144,7 @@
#endif
#if defined(CONFIG_ARCH_UNIPHIER_LD6B)
-static const struct uniphier_board_data ph1_ld6b_data = {
+static const struct uniphier_board_data uniphier_ld6b_data = {
.dram_freq = 1866,
.dram_nr_ch = 3,
.dram_ch[0] = {
@@ -172,27 +172,27 @@
static const struct uniphier_board_id uniphier_boards[] = {
#if defined(CONFIG_ARCH_UNIPHIER_SLD3)
- { "socionext,ph1-sld3", &ph1_sld3_data, },
+ { "socionext,ph1-sld3", &uniphier_sld3_data, },
#endif
#if defined(CONFIG_ARCH_UNIPHIER_LD4)
- { "socionext,ph1-ld4", &ph1_ld4_data, },
+ { "socionext,ph1-ld4", &uniphier_ld4_data, },
#endif
#if defined(CONFIG_ARCH_UNIPHIER_PRO4)
- { "socionext,ph1-pro4-ace", &ph1_pro4_2g_data, },
- { "socionext,ph1-pro4-sanji", &ph1_pro4_2g_data, },
- { "socionext,ph1-pro4", &ph1_pro4_data, },
+ { "socionext,ph1-pro4-ace", &uniphier_pro4_2g_data, },
+ { "socionext,ph1-pro4-sanji", &uniphier_pro4_2g_data, },
+ { "socionext,ph1-pro4", &uniphier_pro4_data, },
#endif
#if defined(CONFIG_ARCH_UNIPHIER_SLD8)
- { "socionext,ph1-sld8", &ph1_sld8_data, },
+ { "socionext,ph1-sld8", &uniphier_sld8_data, },
#endif
#if defined(CONFIG_ARCH_UNIPHIER_PRO5)
- { "socionext,ph1-pro5", &ph1_pro5_data, },
+ { "socionext,ph1-pro5", &uniphier_pro5_data, },
#endif
#if defined(CONFIG_ARCH_UNIPHIER_PXS2)
- { "socionext,proxstream2", &proxstream2_data, },
+ { "socionext,proxstream2", &uniphier_pxs2_data, },
#endif
#if defined(CONFIG_ARCH_UNIPHIER_LD6B)
- { "socionext,ph1-ld6b", &ph1_ld6b_data, },
+ { "socionext,ph1-ld6b", &uniphier_ld6b_data, },
#endif
};
diff --git a/arch/arm/mach-uniphier/boot-mode/boot-device.h b/arch/arm/mach-uniphier/boot-mode/boot-device.h
index 1c59aaa..2e05a47 100644
--- a/arch/arm/mach-uniphier/boot-mode/boot-device.h
+++ b/arch/arm/mach-uniphier/boot-mode/boot-device.h
@@ -12,15 +12,15 @@
char *info;
};
-u32 ph1_sld3_boot_device(void);
-u32 ph1_ld4_boot_device(void);
-u32 ph1_pro5_boot_device(void);
-u32 proxstream2_boot_device(void);
+u32 uniphier_sld3_boot_device(void);
+u32 uniphier_ld4_boot_device(void);
+u32 uniphier_pro5_boot_device(void);
+u32 uniphier_pxs2_boot_device(void);
-void ph1_sld3_boot_mode_show(void);
-void ph1_ld4_boot_mode_show(void);
-void ph1_pro5_boot_mode_show(void);
-void proxstream2_boot_mode_show(void);
+void uniphier_sld3_boot_mode_show(void);
+void uniphier_ld4_boot_mode_show(void);
+void uniphier_pro5_boot_mode_show(void);
+void uniphier_pxs2_boot_mode_show(void);
u32 spl_boot_device_raw(void);
diff --git a/arch/arm/mach-uniphier/boot-mode/boot-mode-ld4.c b/arch/arm/mach-uniphier/boot-mode/boot-mode-ld4.c
index ef52d69..0597618 100644
--- a/arch/arm/mach-uniphier/boot-mode/boot-mode-ld4.c
+++ b/arch/arm/mach-uniphier/boot-mode/boot-mode-ld4.c
@@ -51,7 +51,7 @@
return (readl(SG_PINMON0) >> 1) & 0x1f;
}
-u32 ph1_ld4_boot_device(void)
+u32 uniphier_ld4_boot_device(void)
{
int boot_mode;
@@ -60,7 +60,7 @@
return boot_device_table[boot_mode].type;
}
-void ph1_ld4_boot_mode_show(void)
+void uniphier_ld4_boot_mode_show(void)
{
int mode_sel, i;
diff --git a/arch/arm/mach-uniphier/boot-mode/boot-mode-pro5.c b/arch/arm/mach-uniphier/boot-mode/boot-mode-pro5.c
index 0ec6a08..f9726f1 100644
--- a/arch/arm/mach-uniphier/boot-mode/boot-mode-pro5.c
+++ b/arch/arm/mach-uniphier/boot-mode/boot-mode-pro5.c
@@ -52,7 +52,7 @@
return (readl(SG_PINMON0) >> 1) & 0x1f;
}
-u32 ph1_pro5_boot_device(void)
+u32 uniphier_pro5_boot_device(void)
{
int boot_mode;
@@ -61,7 +61,7 @@
return boot_device_table[boot_mode].type;
}
-void ph1_pro5_boot_mode_show(void)
+void uniphier_pro5_boot_mode_show(void)
{
int mode_sel, i;
diff --git a/arch/arm/mach-uniphier/boot-mode/boot-mode-pxs2.c b/arch/arm/mach-uniphier/boot-mode/boot-mode-pxs2.c
index 1b0c183..4b06f74 100644
--- a/arch/arm/mach-uniphier/boot-mode/boot-mode-pxs2.c
+++ b/arch/arm/mach-uniphier/boot-mode/boot-mode-pxs2.c
@@ -51,7 +51,7 @@
return (readl(SG_PINMON0) >> 1) & 0x1f;
}
-u32 proxstream2_boot_device(void)
+u32 uniphier_pxs2_boot_device(void)
{
int boot_mode;
@@ -63,7 +63,7 @@
return boot_device_table[boot_mode].type;
}
-void proxstream2_boot_mode_show(void)
+void uniphier_pxs2_boot_mode_show(void)
{
int mode_sel, i;
diff --git a/arch/arm/mach-uniphier/boot-mode/boot-mode-sld3.c b/arch/arm/mach-uniphier/boot-mode/boot-mode-sld3.c
index 0258fae..a4a3c47 100644
--- a/arch/arm/mach-uniphier/boot-mode/boot-mode-sld3.c
+++ b/arch/arm/mach-uniphier/boot-mode/boot-mode-sld3.c
@@ -83,7 +83,7 @@
return readl(SG_PINMON0) & 0x3f;
}
-u32 ph1_sld3_boot_device(void)
+u32 uniphier_sld3_boot_device(void)
{
int boot_mode;
@@ -92,7 +92,7 @@
return boot_device_table[boot_mode].type;
}
-void ph1_sld3_boot_mode_show(void)
+void uniphier_sld3_boot_mode_show(void)
{
int mode_sel, i;
diff --git a/arch/arm/mach-uniphier/boot-mode/boot-mode.c b/arch/arm/mach-uniphier/boot-mode/boot-mode.c
index 317a4f1..b08cd6c 100644
--- a/arch/arm/mach-uniphier/boot-mode/boot-mode.c
+++ b/arch/arm/mach-uniphier/boot-mode/boot-mode.c
@@ -21,23 +21,23 @@
switch (uniphier_get_soc_type()) {
#if defined(CONFIG_ARCH_UNIPHIER_SLD3)
case SOC_UNIPHIER_SLD3:
- return ph1_sld3_boot_device();
+ return uniphier_sld3_boot_device();
#endif
#if defined(CONFIG_ARCH_UNIPHIER_LD4) || defined(CONFIG_ARCH_UNIPHIER_PRO4) || \
defined(CONFIG_ARCH_UNIPHIER_SLD8)
case SOC_UNIPHIER_LD4:
case SOC_UNIPHIER_PRO4:
case SOC_UNIPHIER_SLD8:
- return ph1_ld4_boot_device();
+ return uniphier_ld4_boot_device();
#endif
#if defined(CONFIG_ARCH_UNIPHIER_PRO5)
case SOC_UNIPHIER_PRO5:
- return ph1_pro5_boot_device();
+ return uniphier_pro5_boot_device();
#endif
#if defined(CONFIG_ARCH_UNIPHIER_PXS2) || defined(CONFIG_ARCH_UNIPHIER_LD6B)
case SOC_UNIPHIER_PXS2:
case SOC_UNIPHIER_LD6B:
- return proxstream2_boot_device();
+ return uniphier_pxs2_boot_device();
#endif
default:
return BOOT_DEVICE_NONE;
diff --git a/arch/arm/mach-uniphier/boot-mode/cmd_pinmon.c b/arch/arm/mach-uniphier/boot-mode/cmd_pinmon.c
index 3a66e2b..bccab62 100644
--- a/arch/arm/mach-uniphier/boot-mode/cmd_pinmon.c
+++ b/arch/arm/mach-uniphier/boot-mode/cmd_pinmon.c
@@ -17,7 +17,7 @@
switch (uniphier_get_soc_type()) {
#if defined(CONFIG_ARCH_UNIPHIER_SLD3)
case SOC_UNIPHIER_SLD3:
- ph1_sld3_boot_mode_show();
+ uniphier_sld3_boot_mode_show();
break;
#endif
#if defined(CONFIG_ARCH_UNIPHIER_LD4) || defined(CONFIG_ARCH_UNIPHIER_PRO4) || \
@@ -25,18 +25,18 @@
case SOC_UNIPHIER_LD4:
case SOC_UNIPHIER_PRO4:
case SOC_UNIPHIER_SLD8:
- ph1_ld4_boot_mode_show();
+ uniphier_ld4_boot_mode_show();
break;
#endif
#if defined(CONFIG_ARCH_UNIPHIER_PRO5)
case SOC_UNIPHIER_PRO5:
- ph1_pro5_boot_mode_show();
+ uniphier_pro5_boot_mode_show();
break;
#endif
#if defined(CONFIG_ARCH_UNIPHIER_PXS2) || defined(CONFIG_ARCH_UNIPHIER_LD6B)
case SOC_UNIPHIER_PXS2:
case SOC_UNIPHIER_LD6B:
- proxstream2_boot_mode_show();
+ uniphier_pxs2_boot_mode_show();
break;
#endif
default:
diff --git a/arch/arm/mach-uniphier/clk/clk-ld4.c b/arch/arm/mach-uniphier/clk/clk-ld4.c
index 7a34bee..8744d26 100644
--- a/arch/arm/mach-uniphier/clk/clk-ld4.c
+++ b/arch/arm/mach-uniphier/clk/clk-ld4.c
@@ -9,7 +9,7 @@
#include "../init.h"
#include "../sc-regs.h"
-void ph1_ld4_clk_init(void)
+void uniphier_ld4_clk_init(void)
{
u32 tmp;
@@ -27,7 +27,7 @@
writel(tmp, SC_RSTCTRL);
readl(SC_RSTCTRL); /* dummy read */
- /* privide clocks */
+ /* provide clocks */
tmp = readl(SC_CLKCTRL);
#ifdef CONFIG_UNIPHIER_ETH
tmp |= SC_CLKCTRL_CEN_ETHER;
diff --git a/arch/arm/mach-uniphier/clk/clk-pro4.c b/arch/arm/mach-uniphier/clk/clk-pro4.c
index c784c31..8746d7d 100644
--- a/arch/arm/mach-uniphier/clk/clk-pro4.c
+++ b/arch/arm/mach-uniphier/clk/clk-pro4.c
@@ -9,7 +9,7 @@
#include "../init.h"
#include "../sc-regs.h"
-void ph1_pro4_clk_init(void)
+void uniphier_pro4_clk_init(void)
{
u32 tmp;
@@ -38,7 +38,7 @@
readl(SC_RSTCTRL2); /* dummy read */
#endif
- /* privide clocks */
+ /* provide clocks */
tmp = readl(SC_CLKCTRL);
#ifdef CONFIG_USB_XHCI_UNIPHIER
tmp |= SC_CLKCTRL_CEN_USB31 | SC_CLKCTRL_CEN_USB30 |
diff --git a/arch/arm/mach-uniphier/clk/clk-pro5.c b/arch/arm/mach-uniphier/clk/clk-pro5.c
index 039da73..823bb06 100644
--- a/arch/arm/mach-uniphier/clk/clk-pro5.c
+++ b/arch/arm/mach-uniphier/clk/clk-pro5.c
@@ -9,7 +9,7 @@
#include "../init.h"
#include "../sc-regs.h"
-void ph1_pro5_clk_init(void)
+void uniphier_pro5_clk_init(void)
{
u32 tmp;
@@ -31,7 +31,7 @@
readl(SC_RSTCTRL2); /* dummy read */
#endif
- /* privide clocks */
+ /* provide clocks */
tmp = readl(SC_CLKCTRL);
#ifdef CONFIG_USB_XHCI_UNIPHIER
tmp |= SC_CLKCTRL_CEN_USB31 | SC_CLKCTRL_CEN_USB30 |
diff --git a/arch/arm/mach-uniphier/clk/clk-pxs2.c b/arch/arm/mach-uniphier/clk/clk-pxs2.c
index a528f04..76bf856 100644
--- a/arch/arm/mach-uniphier/clk/clk-pxs2.c
+++ b/arch/arm/mach-uniphier/clk/clk-pxs2.c
@@ -9,7 +9,7 @@
#include "../init.h"
#include "../sc-regs.h"
-void proxstream2_clk_init(void)
+void uniphier_pxs2_clk_init(void)
{
u32 tmp;
@@ -34,7 +34,7 @@
readl(SC_RSTCTRL2); /* dummy read */
#endif
- /* privide clocks */
+ /* provide clocks */
tmp = readl(SC_CLKCTRL);
#ifdef CONFIG_USB_XHCI_UNIPHIER
tmp |= SC_CLKCTRL_CEN_USB31 | SC_CLKCTRL_CEN_USB30 |
diff --git a/arch/arm/mach-uniphier/dram/ddrphy-ld4.c b/arch/arm/mach-uniphier/dram/ddrphy-ld4.c
index eb9bf24..c9e164f 100644
--- a/arch/arm/mach-uniphier/dram/ddrphy-ld4.c
+++ b/arch/arm/mach-uniphier/dram/ddrphy-ld4.c
@@ -27,7 +27,8 @@
static u32 ddrphy_mr0[DRAM_FREQ_NR] = {0x00000b51, 0x00000d71};
static u32 ddrphy_mr2[DRAM_FREQ_NR] = {0x00000290, 0x00000298};
-int ph1_ld4_ddrphy_init(struct ddrphy __iomem *phy, int freq, bool ddr3plus)
+int uniphier_ld4_ddrphy_init(struct ddrphy __iomem *phy, int freq,
+ bool ddr3plus)
{
enum dram_freq freq_e;
u32 tmp;
diff --git a/arch/arm/mach-uniphier/dram/ddrphy-regs.h b/arch/arm/mach-uniphier/dram/ddrphy-regs.h
index a1d51ce..a8fe6a0 100644
--- a/arch/arm/mach-uniphier/dram/ddrphy-regs.h
+++ b/arch/arm/mach-uniphier/dram/ddrphy-regs.h
@@ -159,7 +159,8 @@
#define NR_DATX8_PER_DDRPHY 2
#ifndef __ASSEMBLY__
-int ph1_ld4_ddrphy_init(struct ddrphy __iomem *phy, int freq, bool ddr3plus);
+int uniphier_ld4_ddrphy_init(struct ddrphy __iomem *phy, int freq,
+ bool ddr3plus);
void ddrphy_prepare_training(struct ddrphy __iomem *phy, int rank);
int ddrphy_training(struct ddrphy __iomem *phy);
#endif
diff --git a/arch/arm/mach-uniphier/dram/umc-ld4.c b/arch/arm/mach-uniphier/dram/umc-ld4.c
index 72447cc..fc75864 100644
--- a/arch/arm/mach-uniphier/dram/umc-ld4.c
+++ b/arch/arm/mach-uniphier/dram/umc-ld4.c
@@ -152,7 +152,7 @@
writel(0x00000101, dc_base + UMC_DIOCTLA);
- ret = ph1_ld4_ddrphy_init(phy_base, freq, ddr3plus);
+ ret = uniphier_ld4_ddrphy_init(phy_base, freq, ddr3plus);
if (ret)
return ret;
@@ -164,7 +164,7 @@
return umc_dramcont_init(dc_base, ca_base, freq, size, ddr3plus);
}
-int ph1_ld4_umc_init(const struct uniphier_board_data *bd)
+int uniphier_ld4_umc_init(const struct uniphier_board_data *bd)
{
void __iomem *umc_base = (void __iomem *)0x5b800000;
void __iomem *ca_base = umc_base + 0x00001000;
diff --git a/arch/arm/mach-uniphier/dram/umc-pro4.c b/arch/arm/mach-uniphier/dram/umc-pro4.c
index 23fb7b9..853f561 100644
--- a/arch/arm/mach-uniphier/dram/umc-pro4.c
+++ b/arch/arm/mach-uniphier/dram/umc-pro4.c
@@ -142,7 +142,7 @@
writel(0x00000100 | ((1 << (phy + 1)) - 1),
dc_base + UMC_DIOCTLA);
- ret = ph1_ld4_ddrphy_init(phy_base, freq, ddr3plus);
+ ret = uniphier_ld4_ddrphy_init(phy_base, freq, ddr3plus);
if (ret)
return ret;
@@ -158,7 +158,7 @@
ddr3plus);
}
-int ph1_pro4_umc_init(const struct uniphier_board_data *bd)
+int uniphier_pro4_umc_init(const struct uniphier_board_data *bd)
{
void __iomem *umc_base = (void __iomem *)0x5b800000;
void __iomem *ca_base = umc_base + 0x00001000;
diff --git a/arch/arm/mach-uniphier/dram/umc-pxs2.c b/arch/arm/mach-uniphier/dram/umc-pxs2.c
index 50c0238..b4da3d2 100644
--- a/arch/arm/mach-uniphier/dram/umc-pxs2.c
+++ b/arch/arm/mach-uniphier/dram/umc-pxs2.c
@@ -598,7 +598,7 @@
writel(0x000000ff, um_base + UMC_MBUS3);
}
-int proxstream2_umc_init(const struct uniphier_board_data *bd)
+int uniphier_pxs2_umc_init(const struct uniphier_board_data *bd)
{
void __iomem *um_base = (void __iomem *)0x5b600000;
void __iomem *umc_ch_base = (void __iomem *)0x5b800000;
diff --git a/arch/arm/mach-uniphier/dram/umc-sld8.c b/arch/arm/mach-uniphier/dram/umc-sld8.c
index 6cacd25..e831766 100644
--- a/arch/arm/mach-uniphier/dram/umc-sld8.c
+++ b/arch/arm/mach-uniphier/dram/umc-sld8.c
@@ -155,7 +155,7 @@
writel(0x00000101, dc_base + UMC_DIOCTLA);
- ret = ph1_ld4_ddrphy_init(phy_base, freq, ddr3plus);
+ ret = uniphier_ld4_ddrphy_init(phy_base, freq, ddr3plus);
if (ret)
return ret;
@@ -167,7 +167,7 @@
return umc_dramcont_init(dc_base, ca_base, freq, size, ddr3plus);
}
-int ph1_sld8_umc_init(const struct uniphier_board_data *bd)
+int uniphier_sld8_umc_init(const struct uniphier_board_data *bd)
{
void __iomem *umc_base = (void __iomem *)0x5b800000;
void __iomem *ca_base = umc_base + 0x00001000;
diff --git a/arch/arm/mach-uniphier/dram_init.c b/arch/arm/mach-uniphier/dram_init.c
index cffdfc9..815f243 100644
--- a/arch/arm/mach-uniphier/dram_init.c
+++ b/arch/arm/mach-uniphier/dram_init.c
@@ -23,14 +23,25 @@
int dram_init(void)
{
+ const void *fdt = gd->fdt_blob;
const fdt32_t *val;
- int len;
+ int ac, sc, len;
- val = get_memory_reg_prop(gd->fdt_blob, &len);
- if (len < sizeof(*val))
+ ac = fdt_address_cells(fdt, 0);
+ sc = fdt_size_cells(fdt, 0);
+ if (ac < 0 || sc < 1 || sc > 2) {
+ printf("invalid address/size cells\n");
return -EINVAL;
+ }
- gd->ram_size = fdt32_to_cpu(*(val + 1));
+ val = get_memory_reg_prop(fdt, &len);
+ if (len / sizeof(*val) < ac + sc)
+ return -EINVAL;
+
+ val += ac;
+
+ gd->ram_size = sc == 2 ? fdt64_to_cpu(*(fdt64_t *)val) :
+ fdt32_to_cpu(*val);
debug("DRAM size = %08lx\n", (unsigned long)gd->ram_size);
@@ -39,19 +50,33 @@
void dram_init_banksize(void)
{
+ const void *fdt = gd->fdt_blob;
const fdt32_t *val;
- int len, i;
+ int ac, sc, cells, len, i;
- val = get_memory_reg_prop(gd->fdt_blob, &len);
+ val = get_memory_reg_prop(fdt, &len);
if (len < 0)
return;
+ ac = fdt_address_cells(fdt, 0);
+ sc = fdt_size_cells(fdt, 0);
+ if (ac < 1 || sc > 2 || sc < 1 || sc > 2) {
+ printf("invalid address/size cells\n");
+ return;
+ }
+
+ cells = ac + sc;
+
len /= sizeof(*val);
- len /= 2;
- for (i = 0; i < len; i++) {
- gd->bd->bi_dram[i].start = fdt32_to_cpu(*val++);
- gd->bd->bi_dram[i].size = fdt32_to_cpu(*val++);
+ for (i = 0; i < CONFIG_NR_DRAM_BANKS && len >= cells;
+ i++, len -= cells) {
+ gd->bd->bi_dram[i].start = ac == 2 ?
+ fdt64_to_cpu(*(fdt64_t *)val) : fdt32_to_cpu(*val);
+ val += ac;
+ gd->bd->bi_dram[i].size = sc == 2 ?
+ fdt64_to_cpu(*(fdt64_t *)val) : fdt32_to_cpu(*val);
+ val += sc;
debug("DRAM bank %d: start = %08lx, size = %08lx\n",
i, (unsigned long)gd->bd->bi_dram[i].start,
diff --git a/arch/arm/mach-uniphier/early-clk/early-clk-ld4.c b/arch/arm/mach-uniphier/early-clk/early-clk-ld4.c
index 6574767..b6e8b64 100644
--- a/arch/arm/mach-uniphier/early-clk/early-clk-ld4.c
+++ b/arch/arm/mach-uniphier/early-clk/early-clk-ld4.c
@@ -11,7 +11,7 @@
#include "../init.h"
#include "../sc-regs.h"
-int ph1_ld4_early_clk_init(const struct uniphier_board_data *bd)
+int uniphier_ld4_early_clk_init(const struct uniphier_board_data *bd)
{
u32 tmp;
@@ -24,7 +24,7 @@
writel(tmp, SC_RSTCTRL);
readl(SC_RSTCTRL); /* dummy read */
- /* privide clocks */
+ /* provide clocks */
tmp = readl(SC_CLKCTRL);
tmp |= SC_CLKCTRL_CEN_UMC | SC_CLKCTRL_CEN_SBC | SC_CLKCTRL_CEN_PERI;
writel(tmp, SC_CLKCTRL);
diff --git a/arch/arm/mach-uniphier/early-clk/early-clk-pro5.c b/arch/arm/mach-uniphier/early-clk/early-clk-pro5.c
index d986358..c41a8ea 100644
--- a/arch/arm/mach-uniphier/early-clk/early-clk-pro5.c
+++ b/arch/arm/mach-uniphier/early-clk/early-clk-pro5.c
@@ -9,7 +9,7 @@
#include "../init.h"
#include "../sc-regs.h"
-int ph1_pro5_early_clk_init(const struct uniphier_board_data *bd)
+int uniphier_pro5_early_clk_init(const struct uniphier_board_data *bd)
{
u32 tmp;
@@ -26,7 +26,7 @@
writel(tmp, SC_RSTCTRL4);
readl(SC_RSTCTRL); /* dummy read */
- /* privide clocks */
+ /* provide clocks */
tmp = readl(SC_CLKCTRL);
tmp |= SC_CLKCTRL_CEN_SBC | SC_CLKCTRL_CEN_PERI;
writel(tmp, SC_CLKCTRL);
diff --git a/arch/arm/mach-uniphier/early-clk/early-clk-pxs2.c b/arch/arm/mach-uniphier/early-clk/early-clk-pxs2.c
index a573a96..665ecd5 100644
--- a/arch/arm/mach-uniphier/early-clk/early-clk-pxs2.c
+++ b/arch/arm/mach-uniphier/early-clk/early-clk-pxs2.c
@@ -11,7 +11,7 @@
#include "../init.h"
#include "../sc-regs.h"
-int proxstream2_early_clk_init(const struct uniphier_board_data *bd)
+int uniphier_pxs2_early_clk_init(const struct uniphier_board_data *bd)
{
u32 tmp;
@@ -30,7 +30,7 @@
writel(tmp, SC_RSTCTRL4);
readl(SC_RSTCTRL4); /* dummy read */
- /* privide clocks */
+ /* provide clocks */
tmp = readl(SC_CLKCTRL);
tmp |= SC_CLKCTRL_CEN_SBC | SC_CLKCTRL_CEN_PERI;
writel(tmp, SC_CLKCTRL);
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 7923644..22c07fb 100644
--- a/arch/arm/mach-uniphier/early-pinctrl/early-pinctrl-sld3.c
+++ b/arch/arm/mach-uniphier/early-pinctrl/early-pinctrl-sld3.c
@@ -7,7 +7,7 @@
#include "../init.h"
#include "../sg-regs.h"
-int ph1_sld3_early_pin_init(const struct uniphier_board_data *bd)
+int uniphier_sld3_early_pin_init(const struct uniphier_board_data *bd)
{
/* Comment format: PAD Name -> Function Name */
diff --git a/arch/arm/mach-uniphier/init.h b/arch/arm/mach-uniphier/init.h
index cef9d62..3abf4aa 100644
--- a/arch/arm/mach-uniphier/init.h
+++ b/arch/arm/mach-uniphier/init.h
@@ -26,26 +26,28 @@
const struct uniphier_board_data *uniphier_get_board_param(void);
-int ph1_sld3_init(const struct uniphier_board_data *bd);
-int ph1_ld4_init(const struct uniphier_board_data *bd);
-int ph1_pro4_init(const struct uniphier_board_data *bd);
-int ph1_sld8_init(const struct uniphier_board_data *bd);
-int ph1_pro5_init(const struct uniphier_board_data *bd);
-int proxstream2_init(const struct uniphier_board_data *bd);
+int uniphier_sld3_init(const struct uniphier_board_data *bd);
+int uniphier_ld4_init(const struct uniphier_board_data *bd);
+int uniphier_pro4_init(const struct uniphier_board_data *bd);
+int uniphier_sld8_init(const struct uniphier_board_data *bd);
+int uniphier_pro5_init(const struct uniphier_board_data *bd);
+int uniphier_pxs2_init(const struct uniphier_board_data *bd);
#if defined(CONFIG_MICRO_SUPPORT_CARD)
-int sbc_admulti_init(const struct uniphier_board_data *bd);
-int sbc_savepin_init(const struct uniphier_board_data *bd);
+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
-static inline int sbc_admulti_init(const struct uniphier_board_data *bd)
+static inline int uniphier_sbc_init_admulti(
+ const struct uniphier_board_data *bd)
{
return 0;
}
-static inline int sbc_savepin_init(const struct uniphier_board_data *bd)
+static inline int uniphier_sbc_init_savepin(
+ const struct uniphier_board_data *bd)
{
return 0;
}
@@ -66,44 +68,44 @@
}
#endif
-int ph1_sld3_bcu_init(const struct uniphier_board_data *bd);
-int ph1_ld4_bcu_init(const struct uniphier_board_data *bd);
+int uniphier_sld3_bcu_init(const struct uniphier_board_data *bd);
+int uniphier_ld4_bcu_init(const struct uniphier_board_data *bd);
int memconf_init(const struct uniphier_board_data *bd);
-int ph1_sld3_memconf_init(const struct uniphier_board_data *bd);
-int proxstream2_memconf_init(const struct uniphier_board_data *bd);
+int uniphier_sld3_memconf_init(const struct uniphier_board_data *bd);
+int uniphier_pxs2_memconf_init(const struct uniphier_board_data *bd);
-int ph1_sld3_pll_init(const struct uniphier_board_data *bd);
-int ph1_ld4_pll_init(const struct uniphier_board_data *bd);
-int ph1_pro4_pll_init(const struct uniphier_board_data *bd);
-int ph1_sld8_pll_init(const struct uniphier_board_data *bd);
+int uniphier_sld3_pll_init(const struct uniphier_board_data *bd);
+int uniphier_ld4_pll_init(const struct uniphier_board_data *bd);
+int uniphier_pro4_pll_init(const struct uniphier_board_data *bd);
+int uniphier_sld8_pll_init(const struct uniphier_board_data *bd);
-int ph1_sld3_enable_dpll_ssc(const struct uniphier_board_data *bd);
-int ph1_ld4_enable_dpll_ssc(const struct uniphier_board_data *bd);
+int uniphier_sld3_enable_dpll_ssc(const struct uniphier_board_data *bd);
+int uniphier_ld4_enable_dpll_ssc(const struct uniphier_board_data *bd);
-int ph1_ld4_early_clk_init(const struct uniphier_board_data *bd);
-int ph1_pro5_early_clk_init(const struct uniphier_board_data *bd);
-int proxstream2_early_clk_init(const struct uniphier_board_data *bd);
+int uniphier_ld4_early_clk_init(const struct uniphier_board_data *bd);
+int uniphier_pro5_early_clk_init(const struct uniphier_board_data *bd);
+int uniphier_pxs2_early_clk_init(const struct uniphier_board_data *bd);
-int ph1_sld3_early_pin_init(const struct uniphier_board_data *bd);
+int uniphier_sld3_early_pin_init(const struct uniphier_board_data *bd);
-int ph1_ld4_umc_init(const struct uniphier_board_data *bd);
-int ph1_pro4_umc_init(const struct uniphier_board_data *bd);
-int ph1_sld8_umc_init(const struct uniphier_board_data *bd);
-int proxstream2_umc_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);
+int uniphier_sld8_umc_init(const struct uniphier_board_data *bd);
+int uniphier_pxs2_umc_init(const struct uniphier_board_data *bd);
-void ph1_sld3_pin_init(void);
-void ph1_ld4_pin_init(void);
-void ph1_pro4_pin_init(void);
-void ph1_sld8_pin_init(void);
-void ph1_pro5_pin_init(void);
-void proxstream2_pin_init(void);
-void ph1_ld6b_pin_init(void);
+void uniphier_sld3_pin_init(void);
+void uniphier_ld4_pin_init(void);
+void uniphier_pro4_pin_init(void);
+void uniphier_sld8_pin_init(void);
+void uniphier_pro5_pin_init(void);
+void uniphier_pxs2_pin_init(void);
+void uniphier_ld6b_pin_init(void);
-void ph1_ld4_clk_init(void);
-void ph1_pro4_clk_init(void);
-void ph1_pro5_clk_init(void);
-void proxstream2_clk_init(void);
+void uniphier_ld4_clk_init(void);
+void uniphier_pro4_clk_init(void);
+void uniphier_pro5_clk_init(void);
+void uniphier_pxs2_clk_init(void);
#define pr_err(fmt, args...) printf(fmt, ##args)
diff --git a/arch/arm/mach-uniphier/init/init-ld4.c b/arch/arm/mach-uniphier/init/init-ld4.c
index 5295cd0..b1c9b5d 100644
--- a/arch/arm/mach-uniphier/init/init-ld4.c
+++ b/arch/arm/mach-uniphier/init/init-ld4.c
@@ -10,16 +10,16 @@
#include "../init.h"
#include "../micro-support-card.h"
-int ph1_ld4_init(const struct uniphier_board_data *bd)
+int uniphier_ld4_init(const struct uniphier_board_data *bd)
{
- ph1_ld4_bcu_init(bd);
+ uniphier_ld4_bcu_init(bd);
- sbc_savepin_init(bd);
+ uniphier_sbc_init_savepin(bd);
uniphier_ld4_sbc_init(bd);
support_card_reset();
- ph1_ld4_pll_init(bd);
+ uniphier_ld4_pll_init(bd);
support_card_init();
@@ -29,7 +29,7 @@
led_puts("L1");
- ph1_ld4_early_clk_init(bd);
+ uniphier_ld4_early_clk_init(bd);
led_puts("L2");
@@ -44,7 +44,7 @@
{
int res;
- res = ph1_ld4_umc_init(bd);
+ res = uniphier_ld4_umc_init(bd);
if (res < 0) {
while (1)
;
@@ -53,7 +53,7 @@
led_puts("L5");
- ph1_ld4_enable_dpll_ssc(bd);
+ uniphier_ld4_enable_dpll_ssc(bd);
led_puts("L6");
diff --git a/arch/arm/mach-uniphier/init/init-pro4.c b/arch/arm/mach-uniphier/init/init-pro4.c
index 456fb48..3528d84 100644
--- a/arch/arm/mach-uniphier/init/init-pro4.c
+++ b/arch/arm/mach-uniphier/init/init-pro4.c
@@ -10,13 +10,13 @@
#include "../init.h"
#include "../micro-support-card.h"
-int ph1_pro4_init(const struct uniphier_board_data *bd)
+int uniphier_pro4_init(const struct uniphier_board_data *bd)
{
- sbc_savepin_init(bd);
+ uniphier_sbc_init_savepin(bd);
support_card_reset();
- ph1_pro4_pll_init(bd);
+ uniphier_pro4_pll_init(bd);
support_card_init();
@@ -26,7 +26,7 @@
led_puts("L1");
- ph1_ld4_early_clk_init(bd);
+ uniphier_ld4_early_clk_init(bd);
led_puts("L2");
@@ -41,7 +41,7 @@
{
int res;
- res = ph1_pro4_umc_init(bd);
+ res = uniphier_pro4_umc_init(bd);
if (res < 0) {
while (1)
;
@@ -50,7 +50,7 @@
led_puts("L5");
- ph1_ld4_enable_dpll_ssc(bd);
+ uniphier_ld4_enable_dpll_ssc(bd);
led_puts("L6");
diff --git a/arch/arm/mach-uniphier/init/init-pro5.c b/arch/arm/mach-uniphier/init/init-pro5.c
index c2c6803..c809ae7 100644
--- a/arch/arm/mach-uniphier/init/init-pro5.c
+++ b/arch/arm/mach-uniphier/init/init-pro5.c
@@ -10,9 +10,9 @@
#include "../init.h"
#include "../micro-support-card.h"
-int ph1_pro5_init(const struct uniphier_board_data *bd)
+int uniphier_pro5_init(const struct uniphier_board_data *bd)
{
- sbc_savepin_init(bd);
+ uniphier_sbc_init_savepin(bd);
support_card_reset();
@@ -24,7 +24,7 @@
led_puts("L1");
- ph1_pro5_early_clk_init(bd);
+ uniphier_pro5_early_clk_init(bd);
led_puts("L2");
diff --git a/arch/arm/mach-uniphier/init/init-pxs2.c b/arch/arm/mach-uniphier/init/init-pxs2.c
index 2d4b6fb..5e07db1 100644
--- a/arch/arm/mach-uniphier/init/init-pxs2.c
+++ b/arch/arm/mach-uniphier/init/init-pxs2.c
@@ -10,11 +10,11 @@
#include "../init.h"
#include "../micro-support-card.h"
-int proxstream2_init(const struct uniphier_board_data *bd)
+int uniphier_pxs2_init(const struct uniphier_board_data *bd)
{
int ret;
- sbc_savepin_init(bd);
+ uniphier_sbc_init_savepin(bd);
uniphier_pxs2_sbc_init(bd);
support_card_reset();
@@ -24,11 +24,11 @@
led_puts("L0");
memconf_init(bd);
- proxstream2_memconf_init(bd);
+ uniphier_pxs2_memconf_init(bd);
led_puts("L1");
- proxstream2_early_clk_init(bd);
+ uniphier_pxs2_early_clk_init(bd);
led_puts("L2");
@@ -40,7 +40,7 @@
led_puts("L4");
- ret = proxstream2_umc_init(bd);
+ ret = uniphier_pxs2_umc_init(bd);
if (ret)
return ret;
diff --git a/arch/arm/mach-uniphier/init/init-sld3.c b/arch/arm/mach-uniphier/init/init-sld3.c
index c48126f..473e0c8 100644
--- a/arch/arm/mach-uniphier/init/init-sld3.c
+++ b/arch/arm/mach-uniphier/init/init-sld3.c
@@ -10,31 +10,31 @@
#include "../init.h"
#include "../micro-support-card.h"
-int ph1_sld3_init(const struct uniphier_board_data *bd)
+int uniphier_sld3_init(const struct uniphier_board_data *bd)
{
- ph1_sld3_bcu_init(bd);
+ uniphier_sld3_bcu_init(bd);
- sbc_admulti_init(bd);
+ uniphier_sbc_init_admulti(bd);
uniphier_sld3_sbc_init(bd);
support_card_reset();
- ph1_sld3_pll_init(bd);
+ uniphier_sld3_pll_init(bd);
support_card_init();
led_puts("L0");
memconf_init(bd);
- ph1_sld3_memconf_init(bd);
+ uniphier_sld3_memconf_init(bd);
led_puts("L1");
- ph1_ld4_early_clk_init(bd);
+ uniphier_ld4_early_clk_init(bd);
led_puts("L2");
- ph1_sld3_early_pin_init(bd);
+ uniphier_sld3_early_pin_init(bd);
led_puts("L3");
@@ -46,7 +46,7 @@
led_puts("L5");
- ph1_sld3_enable_dpll_ssc(bd);
+ uniphier_sld3_enable_dpll_ssc(bd);
led_puts("L6");
diff --git a/arch/arm/mach-uniphier/init/init-sld8.c b/arch/arm/mach-uniphier/init/init-sld8.c
index 1f31ca6..07c6d60 100644
--- a/arch/arm/mach-uniphier/init/init-sld8.c
+++ b/arch/arm/mach-uniphier/init/init-sld8.c
@@ -10,16 +10,16 @@
#include "../init.h"
#include "../micro-support-card.h"
-int ph1_sld8_init(const struct uniphier_board_data *bd)
+int uniphier_sld8_init(const struct uniphier_board_data *bd)
{
- ph1_ld4_bcu_init(bd);
+ uniphier_ld4_bcu_init(bd);
- sbc_savepin_init(bd);
+ uniphier_sbc_init_savepin(bd);
uniphier_ld4_sbc_init(bd);
support_card_reset();
- ph1_sld8_pll_init(bd);
+ uniphier_sld8_pll_init(bd);
support_card_init();
@@ -29,7 +29,7 @@
led_puts("L1");
- ph1_ld4_early_clk_init(bd);
+ uniphier_ld4_early_clk_init(bd);
led_puts("L2");
@@ -44,7 +44,7 @@
{
int res;
- res = ph1_sld8_umc_init(bd);
+ res = uniphier_sld8_umc_init(bd);
if (res < 0) {
while (1)
;
@@ -53,7 +53,7 @@
led_puts("L5");
- ph1_ld4_enable_dpll_ssc(bd);
+ uniphier_ld4_enable_dpll_ssc(bd);
led_puts("L6");
diff --git a/arch/arm/mach-uniphier/init/init.c b/arch/arm/mach-uniphier/init/init.c
index 7316d51..c56c44c 100644
--- a/arch/arm/mach-uniphier/init/init.c
+++ b/arch/arm/mach-uniphier/init/init.c
@@ -26,33 +26,33 @@
switch (uniphier_get_soc_type()) {
#if defined(CONFIG_ARCH_UNIPHIER_SLD3)
case SOC_UNIPHIER_SLD3:
- ph1_sld3_init(param);
+ uniphier_sld3_init(param);
break;
#endif
#if defined(CONFIG_ARCH_UNIPHIER_LD4)
case SOC_UNIPHIER_LD4:
- ph1_ld4_init(param);
+ uniphier_ld4_init(param);
break;
#endif
#if defined(CONFIG_ARCH_UNIPHIER_PRO4)
case SOC_UNIPHIER_PRO4:
- ph1_pro4_init(param);
+ uniphier_pro4_init(param);
break;
#endif
#if defined(CONFIG_ARCH_UNIPHIER_SLD8)
case SOC_UNIPHIER_SLD8:
- ph1_sld8_init(param);
+ uniphier_sld8_init(param);
break;
#endif
#if defined(CONFIG_ARCH_UNIPHIER_PRO5)
case SOC_UNIPHIER_PRO5:
- ph1_pro5_init(param);
+ uniphier_pro5_init(param);
break;
#endif
#if defined(CONFIG_ARCH_UNIPHIER_PXS2) || defined(CONFIG_ARCH_UNIPHIER_LD6B)
case SOC_UNIPHIER_PXS2:
case SOC_UNIPHIER_LD6B:
- proxstream2_init(param);
+ uniphier_pxs2_init(param);
break;
#endif
default:
diff --git a/arch/arm/mach-uniphier/memconf/memconf-pxs2.c b/arch/arm/mach-uniphier/memconf/memconf-pxs2.c
index c47fe0a..bf14d0d 100644
--- a/arch/arm/mach-uniphier/memconf/memconf-pxs2.c
+++ b/arch/arm/mach-uniphier/memconf/memconf-pxs2.c
@@ -12,7 +12,7 @@
#include "../init.h"
#include "../sg-regs.h"
-int proxstream2_memconf_init(const struct uniphier_board_data *bd)
+int uniphier_pxs2_memconf_init(const struct uniphier_board_data *bd)
{
u32 tmp;
unsigned long size_per_word;
diff --git a/arch/arm/mach-uniphier/memconf/memconf-sld3.c b/arch/arm/mach-uniphier/memconf/memconf-sld3.c
index 6fdf910..948f82c 100644
--- a/arch/arm/mach-uniphier/memconf/memconf-sld3.c
+++ b/arch/arm/mach-uniphier/memconf/memconf-sld3.c
@@ -12,7 +12,7 @@
#include "../init.h"
#include "../sg-regs.h"
-int ph1_sld3_memconf_init(const struct uniphier_board_data *bd)
+int uniphier_sld3_memconf_init(const struct uniphier_board_data *bd)
{
u32 tmp;
unsigned long size_per_word;
diff --git a/arch/arm/mach-uniphier/pinctrl/pinctrl-ld4.c b/arch/arm/mach-uniphier/pinctrl/pinctrl-ld4.c
index 2fe2c7f..625d40c 100644
--- a/arch/arm/mach-uniphier/pinctrl/pinctrl-ld4.c
+++ b/arch/arm/mach-uniphier/pinctrl/pinctrl-ld4.c
@@ -9,7 +9,7 @@
#include "../init.h"
#include "../sg-regs.h"
-void ph1_ld4_pin_init(void)
+void uniphier_ld4_pin_init(void)
{
u32 tmp;
diff --git a/arch/arm/mach-uniphier/pinctrl/pinctrl-ld6b.c b/arch/arm/mach-uniphier/pinctrl/pinctrl-ld6b.c
index 4faeaf5..913722b 100644
--- a/arch/arm/mach-uniphier/pinctrl/pinctrl-ld6b.c
+++ b/arch/arm/mach-uniphier/pinctrl/pinctrl-ld6b.c
@@ -9,7 +9,7 @@
#include "../init.h"
#include "../sg-regs.h"
-void ph1_ld6b_pin_init(void)
+void uniphier_ld6b_pin_init(void)
{
/* Comment format: PAD Name -> Function Name */
diff --git a/arch/arm/mach-uniphier/pinctrl/pinctrl-pro4.c b/arch/arm/mach-uniphier/pinctrl/pinctrl-pro4.c
index b08ca1e..3796491 100644
--- a/arch/arm/mach-uniphier/pinctrl/pinctrl-pro4.c
+++ b/arch/arm/mach-uniphier/pinctrl/pinctrl-pro4.c
@@ -9,7 +9,7 @@
#include "../init.h"
#include "../sg-regs.h"
-void ph1_pro4_pin_init(void)
+void uniphier_pro4_pin_init(void)
{
/* Comment format: PAD Name -> Function Name */
diff --git a/arch/arm/mach-uniphier/pinctrl/pinctrl-pro5.c b/arch/arm/mach-uniphier/pinctrl/pinctrl-pro5.c
index 79160d6..32ba923 100644
--- a/arch/arm/mach-uniphier/pinctrl/pinctrl-pro5.c
+++ b/arch/arm/mach-uniphier/pinctrl/pinctrl-pro5.c
@@ -9,7 +9,7 @@
#include "../init.h"
#include "../sg-regs.h"
-void ph1_pro5_pin_init(void)
+void uniphier_pro5_pin_init(void)
{
/* Comment format: PAD Name -> Function Name */
diff --git a/arch/arm/mach-uniphier/pinctrl/pinctrl-pxs2.c b/arch/arm/mach-uniphier/pinctrl/pinctrl-pxs2.c
index a662db8..2d62ab3 100644
--- a/arch/arm/mach-uniphier/pinctrl/pinctrl-pxs2.c
+++ b/arch/arm/mach-uniphier/pinctrl/pinctrl-pxs2.c
@@ -9,7 +9,7 @@
#include "../init.h"
#include "../sg-regs.h"
-void proxstream2_pin_init(void)
+void uniphier_pxs2_pin_init(void)
{
/* Comment format: PAD Name -> Function Name */
diff --git a/arch/arm/mach-uniphier/pinctrl/pinctrl-sld3.c b/arch/arm/mach-uniphier/pinctrl/pinctrl-sld3.c
index 367d9f3..62edc49 100644
--- a/arch/arm/mach-uniphier/pinctrl/pinctrl-sld3.c
+++ b/arch/arm/mach-uniphier/pinctrl/pinctrl-sld3.c
@@ -7,7 +7,7 @@
#include "../init.h"
#include "../sg-regs.h"
-void ph1_sld3_pin_init(void)
+void uniphier_sld3_pin_init(void)
{
#ifdef CONFIG_USB_EHCI
sg_set_pinsel(13, 0, 4, 4); /* USB0OC */
@@ -22,4 +22,27 @@
sg_set_pinsel(19, 0, 4, 4); /* USB3OC */
sg_set_pinsel(20, 1, 4, 4); /* USB3VBUS */
#endif
+
+#ifdef CONFIG_NAND_DENALI
+ sg_set_pinsel(38, 1, 4, 4); /* NFALE_GB, NFCLE_GB */
+ sg_set_pinsel(39, 1, 4, 4); /* XNFRYBY0_GB */
+ sg_set_pinsel(40, 1, 4, 4); /* XNFCE0_GB, XNFRE_GB, XNFWE_GB, XNFWP_GB */
+ sg_set_pinsel(41, 1, 4, 4); /* XNFRYBY1_GB, XNFCE1_GB */
+ sg_set_pinsel(58, 1, 4, 4); /* NFD[0-3]_GB */
+ sg_set_pinsel(59, 1, 4, 4); /* NFD[4-7]_GB */
+#endif
+
+#ifdef CONFIG_MMC_UNIPHIER
+ /* eMMC */
+ sg_set_pinsel(55, 1, 4, 4); /* XERST */
+ sg_set_pinsel(56, 1, 4, 4); /* MMCDAT[0-3] */
+ sg_set_pinsel(57, 1, 4, 4); /* MMCDAT[4-7] */
+ sg_set_pinsel(60, 1, 4, 4); /* MMCCLK, MMCCMD */
+
+ /* SD card */
+ sg_set_pinsel(42, 1, 4, 4); /* SD1CLK, SD1CMD, SD1DAT[0-3] */
+ sg_set_pinsel(43, 1, 4, 4); /* SD1CD */
+ sg_set_pinsel(44, 1, 4, 4); /* SD1WP */
+ sg_set_pinsel(45, 1, 4, 4); /* SDVTCG */
+#endif
}
diff --git a/arch/arm/mach-uniphier/pinctrl/pinctrl-sld8.c b/arch/arm/mach-uniphier/pinctrl/pinctrl-sld8.c
index f3fae1d..1c97c8b 100644
--- a/arch/arm/mach-uniphier/pinctrl/pinctrl-sld8.c
+++ b/arch/arm/mach-uniphier/pinctrl/pinctrl-sld8.c
@@ -9,7 +9,7 @@
#include "../init.h"
#include "../sg-regs.h"
-void ph1_sld8_pin_init(void)
+void uniphier_sld8_pin_init(void)
{
/* Comment format: PAD Name -> Function Name */
diff --git a/arch/arm/mach-uniphier/pll/pll-init-ld4.c b/arch/arm/mach-uniphier/pll/pll-init-ld4.c
index b2de9e8..57c1d9f 100644
--- a/arch/arm/mach-uniphier/pll/pll-init-ld4.c
+++ b/arch/arm/mach-uniphier/pll/pll-init-ld4.c
@@ -183,7 +183,7 @@
writel(tmp, SC_VPLL27BCTRL);
}
-int ph1_ld4_pll_init(const struct uniphier_board_data *bd)
+int uniphier_ld4_pll_init(const struct uniphier_board_data *bd)
{
int ret;
diff --git a/arch/arm/mach-uniphier/pll/pll-init-pro4.c b/arch/arm/mach-uniphier/pll/pll-init-pro4.c
index 69d518d..a7e4e0e 100644
--- a/arch/arm/mach-uniphier/pll/pll-init-pro4.c
+++ b/arch/arm/mach-uniphier/pll/pll-init-pro4.c
@@ -145,7 +145,7 @@
writel(tmp, SC_VPLL27BCTRL);
}
-int ph1_pro4_pll_init(const struct uniphier_board_data *bd)
+int uniphier_pro4_pll_init(const struct uniphier_board_data *bd)
{
int ret;
diff --git a/arch/arm/mach-uniphier/pll/pll-init-sld3.c b/arch/arm/mach-uniphier/pll/pll-init-sld3.c
index b93806c..5b4f2e3 100644
--- a/arch/arm/mach-uniphier/pll/pll-init-sld3.c
+++ b/arch/arm/mach-uniphier/pll/pll-init-sld3.c
@@ -6,7 +6,7 @@
#include "../init.h"
-int ph1_sld3_pll_init(const struct uniphier_board_data *bd)
+int uniphier_sld3_pll_init(const struct uniphier_board_data *bd)
{
/* add pll init code here */
return 0;
diff --git a/arch/arm/mach-uniphier/pll/pll-init-sld8.c b/arch/arm/mach-uniphier/pll/pll-init-sld8.c
index 3c75504..b26106e 100644
--- a/arch/arm/mach-uniphier/pll/pll-init-sld8.c
+++ b/arch/arm/mach-uniphier/pll/pll-init-sld8.c
@@ -188,7 +188,7 @@
writel(tmp, SC_VPLL27BCTRL);
}
-int ph1_sld8_pll_init(const struct uniphier_board_data *bd)
+int uniphier_sld8_pll_init(const struct uniphier_board_data *bd)
{
dpll_init();
upll_init();
diff --git a/arch/arm/mach-uniphier/pll/pll-spectrum-ld4.c b/arch/arm/mach-uniphier/pll/pll-spectrum-ld4.c
index a1c8089..dc97697 100644
--- a/arch/arm/mach-uniphier/pll/pll-spectrum-ld4.c
+++ b/arch/arm/mach-uniphier/pll/pll-spectrum-ld4.c
@@ -9,7 +9,7 @@
#include "../init.h"
#include "../sc-regs.h"
-int ph1_ld4_enable_dpll_ssc(const struct uniphier_board_data *bd)
+int uniphier_ld4_enable_dpll_ssc(const struct uniphier_board_data *bd)
{
u32 tmp;
diff --git a/arch/arm/mach-uniphier/pll/pll-spectrum-sld3.c b/arch/arm/mach-uniphier/pll/pll-spectrum-sld3.c
index 94654ee..ff09a92 100644
--- a/arch/arm/mach-uniphier/pll/pll-spectrum-sld3.c
+++ b/arch/arm/mach-uniphier/pll/pll-spectrum-sld3.c
@@ -10,7 +10,7 @@
#include "../init.h"
#include "../sc-regs.h"
-int ph1_sld3_enable_dpll_ssc(const struct uniphier_board_data *bd)
+int uniphier_sld3_enable_dpll_ssc(const struct uniphier_board_data *bd)
{
u32 tmp;
diff --git a/arch/arm/mach-uniphier/sbc/sbc-admulti.c b/arch/arm/mach-uniphier/sbc/sbc-admulti.c
index 8e9f8eb..05108dd 100644
--- a/arch/arm/mach-uniphier/sbc/sbc-admulti.c
+++ b/arch/arm/mach-uniphier/sbc/sbc-admulti.c
@@ -19,7 +19,7 @@
#define SBCTRL1_ADMULTIPLX_MEM_VALUE 0x03005500
#define SBCTRL2_ADMULTIPLX_MEM_VALUE 0x14000010
-int sbc_admulti_init(const struct uniphier_board_data *bd)
+int uniphier_sbc_init_admulti(const struct uniphier_board_data *bd)
{
/*
* Only CS1 is connected to support card.
diff --git a/arch/arm/mach-uniphier/sbc/sbc-savepin.c b/arch/arm/mach-uniphier/sbc/sbc-savepin.c
index e3e3daa..41e9796 100644
--- a/arch/arm/mach-uniphier/sbc/sbc-savepin.c
+++ b/arch/arm/mach-uniphier/sbc/sbc-savepin.c
@@ -22,7 +22,7 @@
#define SBCTRL2_SAVEPIN_MEM_VALUE 0x34000009
#define SBCTRL4_SAVEPIN_MEM_VALUE 0x02110210
-int sbc_savepin_init(const struct uniphier_board_data *bd)
+int uniphier_sbc_init_savepin(const struct uniphier_board_data *bd)
{
/*
* Only CS1 is connected to support card.
diff --git a/drivers/clk/uniphier/clk-uniphier-core.c b/drivers/clk/uniphier/clk-uniphier-core.c
index e79e0ff..25c163b 100644
--- a/drivers/clk/uniphier/clk-uniphier-core.c
+++ b/drivers/clk/uniphier/clk-uniphier-core.c
@@ -8,13 +8,12 @@
#include <mapmem.h>
#include <linux/bitops.h>
#include <linux/io.h>
+#include <linux/sizes.h>
#include <clk.h>
#include <dm/device.h>
#include "clk-uniphier.h"
-DECLARE_GLOBAL_DATA_PTR;
-
static int uniphier_clk_enable(struct udevice *dev, int index)
{
struct uniphier_clk_priv *priv = dev_get_priv(dev);
@@ -133,14 +132,12 @@
{
struct uniphier_clk_priv *priv = dev_get_priv(dev);
fdt_addr_t addr;
- fdt_size_t size;
- addr = fdtdec_get_addr_size(gd->fdt_blob, dev->of_offset, "reg",
- &size);
+ addr = dev_get_addr(dev);
if (addr == FDT_ADDR_T_NONE)
return -EINVAL;
- priv->base = map_sysmem(addr, size);
+ priv->base = map_sysmem(addr, SZ_4K);
if (!priv->base)
return -ENOMEM;
diff --git a/drivers/gpio/gpio-uniphier.c b/drivers/gpio/gpio-uniphier.c
index 80bb16e..bde51ea 100644
--- a/drivers/gpio/gpio-uniphier.c
+++ b/drivers/gpio/gpio-uniphier.c
@@ -9,6 +9,7 @@
#include <mapmem.h>
#include <linux/bitops.h>
#include <linux/io.h>
+#include <linux/sizes.h>
#include <asm/errno.h>
#include <asm/gpio.h>
@@ -91,17 +92,14 @@
{
struct uniphier_gpio_priv *priv = dev_get_priv(dev);
struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev);
- DECLARE_GLOBAL_DATA_PTR;
fdt_addr_t addr;
- fdt_size_t size;
unsigned int tmp;
- addr = fdtdec_get_addr_size(gd->fdt_blob, dev->of_offset, "reg",
- &size);
+ addr = dev_get_addr(dev);
if (addr == FDT_ADDR_T_NONE)
return -EINVAL;
- priv->base = map_sysmem(addr, size);
+ priv->base = map_sysmem(addr, SZ_8);
if (!priv->base)
return -ENOMEM;
diff --git a/drivers/i2c/i2c-uniphier-f.c b/drivers/i2c/i2c-uniphier-f.c
index b3349af..aebdcfc 100644
--- a/drivers/i2c/i2c-uniphier-f.c
+++ b/drivers/i2c/i2c-uniphier-f.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <linux/types.h>
#include <linux/io.h>
+#include <linux/sizes.h>
#include <asm/errno.h>
#include <dm/device.h>
#include <dm/root.h>
@@ -14,8 +15,6 @@
#include <fdtdec.h>
#include <mapmem.h>
-DECLARE_GLOBAL_DATA_PTR;
-
struct uniphier_fi2c_regs {
u32 cr; /* control register */
#define I2C_CR_MST (1 << 3) /* master mode */
@@ -112,15 +111,14 @@
static int uniphier_fi2c_probe(struct udevice *dev)
{
fdt_addr_t addr;
- fdt_size_t size;
struct uniphier_fi2c_dev *priv = dev_get_priv(dev);
int ret;
- addr = fdtdec_get_addr_size(gd->fdt_blob, dev->of_offset, "reg",
- &size);
-
- priv->regs = map_sysmem(addr, size);
+ addr = dev_get_addr(dev);
+ if (addr == FDT_ADDR_T_NONE)
+ return -EINVAL;
+ priv->regs = map_sysmem(addr, SZ_128);
if (!priv->regs)
return -ENOMEM;
diff --git a/drivers/i2c/i2c-uniphier.c b/drivers/i2c/i2c-uniphier.c
index 85b9eff..f8221da 100644
--- a/drivers/i2c/i2c-uniphier.c
+++ b/drivers/i2c/i2c-uniphier.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <linux/types.h>
#include <linux/io.h>
+#include <linux/sizes.h>
#include <asm/errno.h>
#include <dm/device.h>
#include <dm/root.h>
@@ -14,8 +15,6 @@
#include <fdtdec.h>
#include <mapmem.h>
-DECLARE_GLOBAL_DATA_PTR;
-
struct uniphier_i2c_regs {
u32 dtrm; /* data transmission */
#define I2C_DTRM_STA (1 << 10)
@@ -48,13 +47,13 @@
static int uniphier_i2c_probe(struct udevice *dev)
{
fdt_addr_t addr;
- fdt_size_t size;
struct uniphier_i2c_dev *priv = dev_get_priv(dev);
- addr = fdtdec_get_addr_size(gd->fdt_blob, dev->of_offset, "reg", &size);
-
- priv->regs = map_sysmem(addr, size);
+ addr = dev_get_addr(dev);
+ if (addr == FDT_ADDR_T_NONE)
+ return -EINVAL;
+ priv->regs = map_sysmem(addr, SZ_64);
if (!priv->regs)
return -ENOMEM;
diff --git a/drivers/mmc/uniphier-sd.c b/drivers/mmc/uniphier-sd.c
index 3bc4d94..81a80cd 100644
--- a/drivers/mmc/uniphier-sd.c
+++ b/drivers/mmc/uniphier-sd.c
@@ -12,6 +12,7 @@
#include <dm/device.h>
#include <linux/compat.h>
#include <linux/io.h>
+#include <linux/sizes.h>
#include <asm/unaligned.h>
#include <asm/dma-mapping.h>
@@ -650,15 +651,17 @@
struct uniphier_sd_priv *priv = dev_get_priv(dev);
struct mmc_uclass_priv *upriv = dev_get_uclass_priv(dev);
fdt_addr_t base;
- fdt_size_t size;
struct udevice *clk_dev;
int clk_id;
int ret;
priv->dev = dev;
- base = fdtdec_get_addr_size(gd->fdt_blob, dev->of_offset, "reg", &size);
- priv->regbase = map_sysmem(base, size);
+ base = dev_get_addr(dev);
+ if (base == FDT_ADDR_T_NONE)
+ return -EINVAL;
+
+ priv->regbase = map_sysmem(base, SZ_2K);
if (!priv->regbase)
return -ENOMEM;
diff --git a/drivers/mtd/nand/denali.c b/drivers/mtd/nand/denali.c
index 018d14f..5894fcc 100644
--- a/drivers/mtd/nand/denali.c
+++ b/drivers/mtd/nand/denali.c
@@ -431,7 +431,16 @@
static void detect_max_banks(struct denali_nand_info *denali)
{
uint32_t features = readl(denali->flash_reg + FEATURES);
- denali->max_banks = 2 << (features & FEATURES__N_BANKS);
+ /*
+ * Read the revision register, so we can calculate the max_banks
+ * properly: the encoding changed from rev 5.0 to 5.1
+ */
+ u32 revision = MAKE_COMPARABLE_REVISION(
+ readl(denali->flash_reg + REVISION));
+ if (revision < REVISION_5_1)
+ denali->max_banks = 2 << (features & FEATURES__N_BANKS);
+ else
+ denali->max_banks = 1 << (features & FEATURES__N_BANKS);
}
static void detect_partition_feature(struct denali_nand_info *denali)
diff --git a/drivers/mtd/nand/denali.h b/drivers/mtd/nand/denali.h
index 93b5725..db1457a 100644
--- a/drivers/mtd/nand/denali.h
+++ b/drivers/mtd/nand/denali.h
@@ -166,6 +166,8 @@
#define REVISION 0x370
#define REVISION__VALUE 0xffff
+#define MAKE_COMPARABLE_REVISION(x) swab16((x) & REVISION__VALUE)
+#define REVISION_5_1 0x00000501
#define ONFI_DEVICE_FEATURES 0x380
#define ONFI_DEVICE_FEATURES__VALUE 0x003f
diff --git a/drivers/pinctrl/uniphier/Kconfig b/drivers/pinctrl/uniphier/Kconfig
index d22d485..1856ff0 100644
--- a/drivers/pinctrl/uniphier/Kconfig
+++ b/drivers/pinctrl/uniphier/Kconfig
@@ -39,4 +39,10 @@
default y
select PINCTRL_UNIPHIER
+config PINCTRL_UNIPHIER_LD20
+ bool "UniPhier PH1-LD11/PH1-LD20 SoC pinctrl driver"
+ depends on ARCH_UNIPHIER_LD11 || ARCH_UNIPHIER_LD20
+ default y
+ select PINCTRL_UNIPHIER
+
endif
diff --git a/drivers/pinctrl/uniphier/Makefile b/drivers/pinctrl/uniphier/Makefile
index c6cc13d..bea4dd8 100644
--- a/drivers/pinctrl/uniphier/Makefile
+++ b/drivers/pinctrl/uniphier/Makefile
@@ -10,3 +10,4 @@
obj-$(CONFIG_PINCTRL_UNIPHIER_PRO5) += pinctrl-uniphier-pro5.o
obj-$(CONFIG_PINCTRL_UNIPHIER_PXS2) += pinctrl-uniphier-pxs2.o
obj-$(CONFIG_PINCTRL_UNIPHIER_LD6B) += pinctrl-uniphier-ld6b.o
+obj-$(CONFIG_PINCTRL_UNIPHIER_LD20) += pinctrl-uniphier-ld20.o
diff --git a/drivers/pinctrl/uniphier/pinctrl-uniphier-core.c b/drivers/pinctrl/uniphier/pinctrl-uniphier-core.c
index ffdccab..b8e26d9 100644
--- a/drivers/pinctrl/uniphier/pinctrl-uniphier-core.c
+++ b/drivers/pinctrl/uniphier/pinctrl-uniphier-core.c
@@ -8,13 +8,12 @@
#include <mapmem.h>
#include <linux/io.h>
#include <linux/err.h>
+#include <linux/sizes.h>
#include <dm/device.h>
#include <dm/pinctrl.h>
#include "pinctrl-uniphier.h"
-DECLARE_GLOBAL_DATA_PTR;
-
static int uniphier_pinctrl_get_groups_count(struct udevice *dev)
{
struct uniphier_pinctrl_priv *priv = dev_get_priv(dev);
@@ -45,7 +44,23 @@
return priv->socdata->functions[selector];
}
-static void uniphier_pinconf_input_enable(struct udevice *dev, unsigned pin)
+static void uniphier_pinconf_input_enable_perpin(struct udevice *dev,
+ unsigned pin)
+{
+ struct uniphier_pinctrl_priv *priv = dev_get_priv(dev);
+ unsigned reg;
+ u32 mask, tmp;
+
+ reg = UNIPHIER_PINCTRL_IECTRL + pin / 32 * 4;
+ mask = BIT(pin % 32);
+
+ tmp = readl(priv->base + reg);
+ tmp |= mask;
+ writel(tmp, priv->base + reg);
+}
+
+static void uniphier_pinconf_input_enable_legacy(struct udevice *dev,
+ unsigned pin)
{
struct uniphier_pinctrl_priv *priv = dev_get_priv(dev);
int pins_count = priv->socdata->pins_count;
@@ -65,18 +80,47 @@
}
}
+static void uniphier_pinconf_input_enable(struct udevice *dev, unsigned pin)
+{
+ struct uniphier_pinctrl_priv *priv = dev_get_priv(dev);
+
+ if (priv->socdata->caps & UNIPHIER_PINCTRL_CAPS_PERPIN_IECTRL)
+ uniphier_pinconf_input_enable_perpin(dev, pin);
+ else
+ uniphier_pinconf_input_enable_legacy(dev, pin);
+}
+
static void uniphier_pinmux_set_one(struct udevice *dev, unsigned pin,
unsigned muxval)
{
struct uniphier_pinctrl_priv *priv = dev_get_priv(dev);
- unsigned mux_bits = priv->socdata->mux_bits;
- unsigned reg_stride = priv->socdata->reg_stride;
- unsigned reg, reg_end, shift, mask;
+ unsigned mux_bits, reg_stride, reg, reg_end, shift, mask;
+ bool load_pinctrl;
u32 tmp;
/* some pins need input-enabling */
uniphier_pinconf_input_enable(dev, pin);
+ if (priv->socdata->caps & UNIPHIER_PINCTRL_CAPS_DBGMUX_SEPARATE) {
+ /*
+ * Mode offset bit
+ * Normal 4 * n shift+3:shift
+ * Debug 4 * n shift+7:shift+4
+ */
+ mux_bits = 4;
+ reg_stride = 8;
+ load_pinctrl = true;
+ } else {
+ /*
+ * Mode offset bit
+ * Normal 8 * n shift+3:shift
+ * Debug 8 * n + 4 shift+3:shift
+ */
+ mux_bits = 8;
+ reg_stride = 4;
+ load_pinctrl = false;
+ }
+
reg = UNIPHIER_PINCTRL_PINMUX_BASE + pin * mux_bits / 32 * reg_stride;
reg_end = reg + reg_stride;
shift = pin * mux_bits % 32;
@@ -95,7 +139,7 @@
muxval >>= mux_bits;
}
- if (priv->socdata->load_pinctrl)
+ if (load_pinctrl)
writel(1, priv->base + UNIPHIER_PINCTRL_LOAD_PINMUX);
}
@@ -128,14 +172,12 @@
{
struct uniphier_pinctrl_priv *priv = dev_get_priv(dev);
fdt_addr_t addr;
- fdt_size_t size;
- addr = fdtdec_get_addr_size(gd->fdt_blob, dev->of_offset, "reg",
- &size);
+ addr = dev_get_addr(dev);
if (addr == FDT_ADDR_T_NONE)
return -EINVAL;
- priv->base = map_sysmem(addr, size);
+ priv->base = map_sysmem(addr, SZ_4K);
if (!priv->base)
return -ENOMEM;
diff --git a/drivers/pinctrl/uniphier/pinctrl-uniphier-ld20.c b/drivers/pinctrl/uniphier/pinctrl-uniphier-ld20.c
new file mode 100644
index 0000000..3d5ac5f
--- /dev/null
+++ b/drivers/pinctrl/uniphier/pinctrl-uniphier-ld20.c
@@ -0,0 +1,114 @@
+/*
+ * Copyright (C) 2016 Masahiro Yamada <yamada.masahiro@socionext.com>
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+#include <dm/device.h>
+#include <dm/pinctrl.h>
+
+#include "pinctrl-uniphier.h"
+
+static const unsigned emmc_pins[] = {18, 19, 20, 21, 22, 23, 24, 25};
+static const unsigned emmc_muxvals[] = {0, 0, 0, 0, 0, 0, 0, 0};
+static const unsigned emmc_dat8_pins[] = {26, 27, 28, 29};
+static const unsigned emmc_dat8_muxvals[] = {0, 0, 0, 0};
+static const unsigned i2c0_pins[] = {63, 64};
+static const unsigned i2c0_muxvals[] = {0, 0};
+static const unsigned i2c1_pins[] = {65, 66};
+static const unsigned i2c1_muxvals[] = {0, 0};
+static const unsigned i2c3_pins[] = {67, 68};
+static const unsigned i2c3_muxvals[] = {1, 1};
+static const unsigned i2c4_pins[] = {61, 62};
+static const unsigned i2c4_muxvals[] = {1, 1};
+static const unsigned nand_pins[] = {3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
+ 15, 16};
+static const unsigned nand_muxvals[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0};
+static const unsigned nand_cs1_pins[] = {};
+static const unsigned nand_cs1_muxvals[] = {};
+static const unsigned sd_pins[] = {10, 11, 12, 13, 14, 15, 16, 17};
+static const unsigned sd_muxvals[] = {8, 8, 8, 8, 8, 8, 8, 8}; /* No SDVOLC */
+static const unsigned uart0_pins[] = {54, 55};
+static const unsigned uart0_muxvals[] = {0, 0};
+static const unsigned uart1_pins[] = {58, 59};
+static const unsigned uart1_muxvals[] = {1, 1};
+static const unsigned uart2_pins[] = {90, 91};
+static const unsigned uart2_muxvals[] = {1, 1};
+static const unsigned uart3_pins[] = {94, 95};
+static const unsigned uart3_muxvals[] = {1, 1};
+static const unsigned usb0_pins[] = {46, 47};
+static const unsigned usb0_muxvals[] = {0, 0};
+static const unsigned usb1_pins[] = {48, 49};
+static const unsigned usb1_muxvals[] = {0, 0};
+static const unsigned usb2_pins[] = {50, 51};
+static const unsigned usb2_muxvals[] = {0, 0};
+static const unsigned usb3_pins[] = {52, 53};
+static const unsigned usb3_muxvals[] = {0, 0};
+
+static const struct uniphier_pinctrl_group uniphier_ld20_groups[] = {
+ UNIPHIER_PINCTRL_GROUP(emmc),
+ UNIPHIER_PINCTRL_GROUP(emmc_dat8),
+ UNIPHIER_PINCTRL_GROUP(i2c0),
+ UNIPHIER_PINCTRL_GROUP(i2c1),
+ UNIPHIER_PINCTRL_GROUP(i2c3),
+ UNIPHIER_PINCTRL_GROUP(i2c4),
+ UNIPHIER_PINCTRL_GROUP(nand),
+ UNIPHIER_PINCTRL_GROUP(nand_cs1),
+ UNIPHIER_PINCTRL_GROUP(sd), /* SD does not exist for LD11 */
+ UNIPHIER_PINCTRL_GROUP(uart0),
+ UNIPHIER_PINCTRL_GROUP(uart1),
+ UNIPHIER_PINCTRL_GROUP(uart2),
+ UNIPHIER_PINCTRL_GROUP(uart3),
+ UNIPHIER_PINCTRL_GROUP(usb0),
+ UNIPHIER_PINCTRL_GROUP(usb1),
+ UNIPHIER_PINCTRL_GROUP(usb2),
+ UNIPHIER_PINCTRL_GROUP(usb3), /* USB3 does not exist for LD11 */
+};
+
+static const char * const uniphier_ld20_functions[] = {
+ "emmc",
+ "i2c0",
+ "i2c1",
+ "i2c3",
+ "i2c4",
+ "nand",
+ "sd", /* SD does not exist for LD11 */
+ "uart0",
+ "uart1",
+ "uart2",
+ "uart3",
+ "usb0",
+ "usb1",
+ "usb2",
+ "usb3", /* USB3 does not exist for LD11 */
+};
+
+static struct uniphier_pinctrl_socdata uniphier_ld20_pinctrl_socdata = {
+ .groups = uniphier_ld20_groups,
+ .groups_count = ARRAY_SIZE(uniphier_ld20_groups),
+ .functions = uniphier_ld20_functions,
+ .functions_count = ARRAY_SIZE(uniphier_ld20_functions),
+ .caps = UNIPHIER_PINCTRL_CAPS_PERPIN_IECTRL,
+};
+
+static int uniphier_ld20_pinctrl_probe(struct udevice *dev)
+{
+ return uniphier_pinctrl_probe(dev, &uniphier_ld20_pinctrl_socdata);
+}
+
+static const struct udevice_id uniphier_ld20_pinctrl_match[] = {
+ { .compatible = "socionext,ph1-ld11-pinctrl" },
+ { .compatible = "socionext,ph1-ld20-pinctrl" },
+ { /* sentinel */ }
+};
+
+U_BOOT_DRIVER(uniphier_ld20_pinctrl) = {
+ .name = "uniphier-ld20-pinctrl",
+ .id = UCLASS_PINCTRL,
+ .of_match = of_match_ptr(uniphier_ld20_pinctrl_match),
+ .probe = uniphier_ld20_pinctrl_probe,
+ .remove = uniphier_pinctrl_remove,
+ .priv_auto_alloc_size = sizeof(struct uniphier_pinctrl_priv),
+ .ops = &uniphier_pinctrl_ops,
+};
diff --git a/drivers/pinctrl/uniphier/pinctrl-uniphier-ld4.c b/drivers/pinctrl/uniphier/pinctrl-uniphier-ld4.c
index b3d47f0..8f7574e 100644
--- a/drivers/pinctrl/uniphier/pinctrl-uniphier-ld4.c
+++ b/drivers/pinctrl/uniphier/pinctrl-uniphier-ld4.c
@@ -107,9 +107,6 @@
.groups_count = ARRAY_SIZE(ph1_ld4_groups),
.functions = ph1_ld4_functions,
.functions_count = ARRAY_SIZE(ph1_ld4_functions),
- .mux_bits = 8,
- .reg_stride = 4,
- .load_pinctrl = false,
};
static int ph1_ld4_pinctrl_probe(struct udevice *dev)
diff --git a/drivers/pinctrl/uniphier/pinctrl-uniphier-ld6b.c b/drivers/pinctrl/uniphier/pinctrl-uniphier-ld6b.c
index 8703a21..2a5d5f3 100644
--- a/drivers/pinctrl/uniphier/pinctrl-uniphier-ld6b.c
+++ b/drivers/pinctrl/uniphier/pinctrl-uniphier-ld6b.c
@@ -107,9 +107,6 @@
.groups_count = ARRAY_SIZE(ph1_ld6b_groups),
.functions = ph1_ld6b_functions,
.functions_count = ARRAY_SIZE(ph1_ld6b_functions),
- .mux_bits = 8,
- .reg_stride = 4,
- .load_pinctrl = false,
};
static int ph1_ld6b_pinctrl_probe(struct udevice *dev)
diff --git a/drivers/pinctrl/uniphier/pinctrl-uniphier-pro4.c b/drivers/pinctrl/uniphier/pinctrl-uniphier-pro4.c
index b3eaf13..60fbbaf 100644
--- a/drivers/pinctrl/uniphier/pinctrl-uniphier-pro4.c
+++ b/drivers/pinctrl/uniphier/pinctrl-uniphier-pro4.c
@@ -103,9 +103,7 @@
.groups_count = ARRAY_SIZE(ph1_pro4_groups),
.functions = ph1_pro4_functions,
.functions_count = ARRAY_SIZE(ph1_pro4_functions),
- .mux_bits = 4,
- .reg_stride = 8,
- .load_pinctrl = true,
+ .caps = UNIPHIER_PINCTRL_CAPS_DBGMUX_SEPARATE,
};
static int ph1_pro4_pinctrl_probe(struct udevice *dev)
diff --git a/drivers/pinctrl/uniphier/pinctrl-uniphier-pro5.c b/drivers/pinctrl/uniphier/pinctrl-uniphier-pro5.c
index 3749250..30c9b4d 100644
--- a/drivers/pinctrl/uniphier/pinctrl-uniphier-pro5.c
+++ b/drivers/pinctrl/uniphier/pinctrl-uniphier-pro5.c
@@ -117,9 +117,7 @@
.groups_count = ARRAY_SIZE(ph1_pro5_groups),
.functions = ph1_pro5_functions,
.functions_count = ARRAY_SIZE(ph1_pro5_functions),
- .mux_bits = 4,
- .reg_stride = 8,
- .load_pinctrl = true,
+ .caps = UNIPHIER_PINCTRL_CAPS_DBGMUX_SEPARATE,
};
static int ph1_pro5_pinctrl_probe(struct udevice *dev)
diff --git a/drivers/pinctrl/uniphier/pinctrl-uniphier-pxs2.c b/drivers/pinctrl/uniphier/pinctrl-uniphier-pxs2.c
index 2cca69d..976bb2f 100644
--- a/drivers/pinctrl/uniphier/pinctrl-uniphier-pxs2.c
+++ b/drivers/pinctrl/uniphier/pinctrl-uniphier-pxs2.c
@@ -114,9 +114,6 @@
.groups_count = ARRAY_SIZE(proxstream2_groups),
.functions = proxstream2_functions,
.functions_count = ARRAY_SIZE(proxstream2_functions),
- .mux_bits = 8,
- .reg_stride = 4,
- .load_pinctrl = false,
};
static int proxstream2_pinctrl_probe(struct udevice *dev)
diff --git a/drivers/pinctrl/uniphier/pinctrl-uniphier-sld8.c b/drivers/pinctrl/uniphier/pinctrl-uniphier-sld8.c
index 5fafdb6..6cbf215 100644
--- a/drivers/pinctrl/uniphier/pinctrl-uniphier-sld8.c
+++ b/drivers/pinctrl/uniphier/pinctrl-uniphier-sld8.c
@@ -115,9 +115,6 @@
.groups_count = ARRAY_SIZE(ph1_sld8_groups),
.functions = ph1_sld8_functions,
.functions_count = ARRAY_SIZE(ph1_sld8_functions),
- .mux_bits = 8,
- .reg_stride = 4,
- .load_pinctrl = false,
};
static int ph1_sld8_pinctrl_probe(struct udevice *dev)
diff --git a/drivers/pinctrl/uniphier/pinctrl-uniphier.h b/drivers/pinctrl/uniphier/pinctrl-uniphier.h
index 6bdebf2..2b43848 100644
--- a/drivers/pinctrl/uniphier/pinctrl-uniphier.h
+++ b/drivers/pinctrl/uniphier/pinctrl-uniphier.h
@@ -7,6 +7,7 @@
#ifndef __PINCTRL_UNIPHIER_H__
#define __PINCTRL_UNIPHIER_H__
+#include <linux/bitops.h>
#include <linux/bug.h>
#include <linux/kernel.h>
#include <linux/types.h>
@@ -59,8 +60,7 @@
* @functions_count: number of pinmux functions
* @mux_bits: bit width of each pinmux register
* @reg_stride: stride of pinmux register address
- * @load_pinctrl: if true, LOAD_PINMUX register must be set to one for new
- * values in pinmux registers to become really effective
+ * @caps: SoC-specific capability flag
*/
struct uniphier_pinctrl_socdata {
const struct uniphier_pinctrl_pin *pins;
@@ -69,9 +69,9 @@
int groups_count;
const char * const *functions;
int functions_count;
- unsigned mux_bits;
- unsigned reg_stride;
- bool load_pinctrl;
+ unsigned caps;
+#define UNIPHIER_PINCTRL_CAPS_PERPIN_IECTRL BIT(1)
+#define UNIPHIER_PINCTRL_CAPS_DBGMUX_SEPARATE BIT(0)
};
#define UNIPHIER_PINCTRL_PIN(a, b) \
diff --git a/drivers/serial/serial_uniphier.c b/drivers/serial/serial_uniphier.c
index edb9203..525f0a4 100644
--- a/drivers/serial/serial_uniphier.c
+++ b/drivers/serial/serial_uniphier.c
@@ -6,6 +6,7 @@
#include <linux/io.h>
#include <linux/serial_reg.h>
+#include <linux/sizes.h>
#include <asm/errno.h>
#include <dm/device.h>
#include <mapmem.h>
@@ -91,12 +92,13 @@
struct uniphier_serial_private_data *priv = dev_get_priv(dev);
struct uniphier_serial __iomem *port;
fdt_addr_t base;
- fdt_size_t size;
u32 tmp;
- base = fdtdec_get_addr_size(gd->fdt_blob, dev->of_offset, "reg", &size);
+ base = dev_get_addr(dev);
+ if (base == FDT_ADDR_T_NONE)
+ return -EINVAL;
- port = map_sysmem(base, size);
+ port = map_sysmem(base, SZ_64);
if (!port)
return -ENOMEM;
diff --git a/include/configs/uniphier.h b/include/configs/uniphier.h
index 5f3d6b8..c6fc90f 100644
--- a/include/configs/uniphier.h
+++ b/include/configs/uniphier.h
@@ -12,12 +12,6 @@
#define CONFIG_I2C_EEPROM
#define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 10
-#ifdef CONFIG_SYS_NS16550_SERIAL
-#define CONFIG_SYS_NS16550_COM1 CONFIG_SUPPORT_CARD_UART_BASE
-#define CONFIG_SYS_NS16550_CLK 12288000
-#define CONFIG_SYS_NS16550_REG_SIZE -2
-#endif
-
#define CONFIG_SMC911X
/* dummy: referenced by examples/standalone/smc911x_eeprom.c */
@@ -108,14 +102,6 @@
/* Time clock 1MHz */
#define CONFIG_SYS_TIMER_RATE 1000000
-/*
- * By default, ARP timeout is 5 sec.
- * The first ARP request does not seem to work.
- * So we need to retry ARP request anyway.
- * We want to shrink the interval until the second ARP request.
- */
-#define CONFIG_ARP_TIMEOUT 500UL /* 0.5 msec */
-
#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_MAX_CHIPS 2
#define CONFIG_SYS_NAND_ONFI_DETECTION
@@ -229,6 +215,10 @@
"netdev=eth0\0" \
"verify=n\0" \
"nor_base=0x42000000\0" \
+ "sramupdate=setexpr tmp_addr $nor_base + 0x50000 &&" \
+ "tftpboot $tmp_addr u-boot-spl.bin &&" \
+ "setexpr tmp_addr $nor_base + 0x60000 &&" \
+ "tftpboot $tmp_addr u-boot.bin\0" \
"emmcupdate=mmcsetn &&" \
"mmc partconf $mmc_first_dev 0 1 1 &&" \
"mmc erase 0 800 &&" \
@@ -279,5 +269,6 @@
#define CONFIG_SPL_TARGET "u-boot-with-spl.bin"
#define CONFIG_SPL_MAX_FOOTPRINT 0x10000
+#define CONFIG_SPL_MAX_SIZE 0x10000
#endif /* __CONFIG_UNIPHIER_COMMON_H__ */
diff --git a/lib/Kconfig b/lib/Kconfig
index 7a45336..2b97c2b 100644
--- a/lib/Kconfig
+++ b/lib/Kconfig
@@ -16,7 +16,7 @@
depends on HAVE_PRIVATE_LIBGCC
help
This option allows you to use the built-in libgcc implementation
- of U-Boot instead of the one privided by the compiler.
+ of U-Boot instead of the one provided by the compiler.
If unsure, say N.
config SYS_HZ