summaryrefslogtreecommitdiff
path: root/arch/arm/mach-uniphier/debug-uart
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-uniphier/debug-uart')
-rw-r--r--arch/arm/mach-uniphier/debug-uart/debug-uart-ld6b.c4
-rw-r--r--arch/arm/mach-uniphier/debug-uart/debug-uart-pro4.c6
-rw-r--r--arch/arm/mach-uniphier/debug-uart/debug-uart-pro5.c6
-rw-r--r--arch/arm/mach-uniphier/debug-uart/debug-uart-pxs2.c4
-rw-r--r--arch/arm/mach-uniphier/debug-uart/debug-uart.c5
5 files changed, 13 insertions, 12 deletions
diff --git a/arch/arm/mach-uniphier/debug-uart/debug-uart-ld6b.c b/arch/arm/mach-uniphier/debug-uart/debug-uart-ld6b.c
index 22d2caa109..f64ff39c9e 100644
--- a/arch/arm/mach-uniphier/debug-uart/debug-uart-ld6b.c
+++ b/arch/arm/mach-uniphier/debug-uart/debug-uart-ld6b.c
@@ -22,9 +22,9 @@ unsigned int uniphier_ld6b_debug_uart_init(void)
sg_set_pinsel(115, 0, 8, 4); /* TXD1 -> TXD1 */
sg_set_pinsel(113, 2, 8, 4); /* SBO0 -> TXD2 */
- tmp = readl(SC_CLKCTRL);
+ tmp = readl(sc_base + SC_CLKCTRL);
tmp |= SC_CLKCTRL_CEN_PERI;
- writel(tmp, SC_CLKCTRL);
+ writel(tmp, sc_base + SC_CLKCTRL);
return DIV_ROUND_CLOSEST(UNIPHIER_LD6B_UART_CLK, 16 * CONFIG_BAUDRATE);
}
diff --git a/arch/arm/mach-uniphier/debug-uart/debug-uart-pro4.c b/arch/arm/mach-uniphier/debug-uart/debug-uart-pro4.c
index 0d6629918a..79c6c101e2 100644
--- a/arch/arm/mach-uniphier/debug-uart/debug-uart-pro4.c
+++ b/arch/arm/mach-uniphier/debug-uart/debug-uart-pro4.c
@@ -20,11 +20,11 @@ unsigned int uniphier_pro4_debug_uart_init(void)
sg_set_iectrl(0);
sg_set_pinsel(128, 0, 4, 8); /* TXD0 -> TXD0 */
- writel(1, SG_LOADPINCTRL);
+ writel(1, sg_base + SG_LOADPINCTRL);
- tmp = readl(SC_CLKCTRL);
+ tmp = readl(sc_base + SC_CLKCTRL);
tmp |= SC_CLKCTRL_CEN_PERI;
- writel(tmp, SC_CLKCTRL);
+ writel(tmp, sc_base + SC_CLKCTRL);
return DIV_ROUND_CLOSEST(UNIPHIER_PRO4_UART_CLK, 16 * CONFIG_BAUDRATE);
}
diff --git a/arch/arm/mach-uniphier/debug-uart/debug-uart-pro5.c b/arch/arm/mach-uniphier/debug-uart/debug-uart-pro5.c
index 1a0a942f2d..ef3b383ee4 100644
--- a/arch/arm/mach-uniphier/debug-uart/debug-uart-pro5.c
+++ b/arch/arm/mach-uniphier/debug-uart/debug-uart-pro5.c
@@ -23,11 +23,11 @@ unsigned int uniphier_pro5_debug_uart_init(void)
sg_set_pinsel(51, 0, 4, 8); /* TXD2 -> TXD2 */
sg_set_pinsel(53, 0, 4, 8); /* TXD3 -> TXD3 */
- writel(1, SG_LOADPINCTRL);
+ writel(1, sg_base + SG_LOADPINCTRL);
- tmp = readl(SC_CLKCTRL);
+ tmp = readl(sc_base + SC_CLKCTRL);
tmp |= SC_CLKCTRL_CEN_PERI;
- writel(tmp, SC_CLKCTRL);
+ writel(tmp, sc_base + SC_CLKCTRL);
return DIV_ROUND_CLOSEST(UNIPHIER_PRO5_UART_CLK, 16 * CONFIG_BAUDRATE);
}
diff --git a/arch/arm/mach-uniphier/debug-uart/debug-uart-pxs2.c b/arch/arm/mach-uniphier/debug-uart/debug-uart-pxs2.c
index 5d50c4fa24..ee8caad1d4 100644
--- a/arch/arm/mach-uniphier/debug-uart/debug-uart-pxs2.c
+++ b/arch/arm/mach-uniphier/debug-uart/debug-uart-pxs2.c
@@ -23,9 +23,9 @@ unsigned int uniphier_pxs2_debug_uart_init(void)
sg_set_pinsel(113, 8, 8, 4); /* TXD2 -> TXD2 */
sg_set_pinsel(219, 8, 8, 4); /* TXD3 -> TXD3 */
- tmp = readl(SC_CLKCTRL);
+ tmp = readl(sc_base + SC_CLKCTRL);
tmp |= SC_CLKCTRL_CEN_PERI;
- writel(tmp, SC_CLKCTRL);
+ writel(tmp, sc_base + SC_CLKCTRL);
return DIV_ROUND_CLOSEST(UNIPHIER_PXS2_UART_CLK, 16 * CONFIG_BAUDRATE);
}
diff --git a/arch/arm/mach-uniphier/debug-uart/debug-uart.c b/arch/arm/mach-uniphier/debug-uart/debug-uart.c
index bc96b2e7be..a70ce59acc 100644
--- a/arch/arm/mach-uniphier/debug-uart/debug-uart.c
+++ b/arch/arm/mach-uniphier/debug-uart/debug-uart.c
@@ -32,7 +32,8 @@ void sg_set_pinsel(unsigned int pin, unsigned int muxval,
unsigned int mux_bits, unsigned int reg_stride)
{
unsigned int shift = pin * mux_bits % 32;
- unsigned long reg = SG_PINCTRL_BASE + pin * mux_bits / 32 * reg_stride;
+ void __iomem *reg = sg_base + SG_PINCTRL_BASE +
+ pin * mux_bits / 32 * reg_stride;
u32 mask = (1U << mux_bits) - 1;
u32 tmp;
@@ -45,7 +46,7 @@ void sg_set_pinsel(unsigned int pin, unsigned int muxval,
void sg_set_iectrl(unsigned int pin)
{
unsigned int bit = pin % 32;
- unsigned long reg = SG_IECTRL + pin / 32 * 4;
+ void __iomem *reg = sg_base + SG_IECTRL + pin / 32 * 4;
u32 tmp;
tmp = readl(reg);