Commit 6a28adef authored by Sekhar Nori's avatar Sekhar Nori Committed by Kevin Hilman

davinci: DA8XX/OMAP-L1XX: Avoid use of IO_ADDRESS for SYSCFG module

Avoid use of IO_ADDRESS() for SYSCFG module by doing an ioremap() instead.
Signed-off-by: default avatarSekhar Nori <nsekhar@ti.com>
Signed-off-by: default avatarKevin Hilman <khilman@deeprootsystems.com>
parent 3c60a66d
...@@ -1184,7 +1184,6 @@ static struct davinci_soc_info davinci_soc_info_da830 = { ...@@ -1184,7 +1184,6 @@ static struct davinci_soc_info davinci_soc_info_da830 = {
.cpu_clks = da830_clks, .cpu_clks = da830_clks,
.psc_bases = da830_psc_bases, .psc_bases = da830_psc_bases,
.psc_bases_num = ARRAY_SIZE(da830_psc_bases), .psc_bases_num = ARRAY_SIZE(da830_psc_bases),
.pinmux_base = IO_ADDRESS(DA8XX_SYSCFG_BASE + 0x120),
.pinmux_pins = da830_pins, .pinmux_pins = da830_pins,
.pinmux_pins_num = ARRAY_SIZE(da830_pins), .pinmux_pins_num = ARRAY_SIZE(da830_pins),
.intc_base = (void __iomem *)DA8XX_CP_INTC_VIRT, .intc_base = (void __iomem *)DA8XX_CP_INTC_VIRT,
...@@ -1201,5 +1200,11 @@ static struct davinci_soc_info davinci_soc_info_da830 = { ...@@ -1201,5 +1200,11 @@ static struct davinci_soc_info davinci_soc_info_da830 = {
void __init da830_init(void) void __init da830_init(void)
{ {
da8xx_syscfg_base = ioremap(DA8XX_SYSCFG_BASE, SZ_4K);
if (WARN(!da8xx_syscfg_base, "Unable to map syscfg module"))
return;
davinci_soc_info_da830.pinmux_base = DA8XX_SYSCFG_VIRT(0x120);
davinci_common_init(&davinci_soc_info_da830); davinci_common_init(&davinci_soc_info_da830);
} }
...@@ -799,7 +799,6 @@ static struct davinci_soc_info davinci_soc_info_da850 = { ...@@ -799,7 +799,6 @@ static struct davinci_soc_info davinci_soc_info_da850 = {
.cpu_clks = da850_clks, .cpu_clks = da850_clks,
.psc_bases = da850_psc_bases, .psc_bases = da850_psc_bases,
.psc_bases_num = ARRAY_SIZE(da850_psc_bases), .psc_bases_num = ARRAY_SIZE(da850_psc_bases),
.pinmux_base = IO_ADDRESS(DA8XX_SYSCFG_BASE + 0x120),
.pinmux_pins = da850_pins, .pinmux_pins = da850_pins,
.pinmux_pins_num = ARRAY_SIZE(da850_pins), .pinmux_pins_num = ARRAY_SIZE(da850_pins),
.intc_base = (void __iomem *)DA8XX_CP_INTC_VIRT, .intc_base = (void __iomem *)DA8XX_CP_INTC_VIRT,
...@@ -816,5 +815,11 @@ static struct davinci_soc_info davinci_soc_info_da850 = { ...@@ -816,5 +815,11 @@ static struct davinci_soc_info davinci_soc_info_da850 = {
void __init da850_init(void) void __init da850_init(void)
{ {
da8xx_syscfg_base = ioremap(DA8XX_SYSCFG_BASE, SZ_4K);
if (WARN(!da8xx_syscfg_base, "Unable to map syscfg module"))
return;
davinci_soc_info_da850.pinmux_base = DA8XX_SYSCFG_VIRT(0x120);
davinci_common_init(&davinci_soc_info_da850); davinci_common_init(&davinci_soc_info_da850);
} }
...@@ -43,6 +43,8 @@ ...@@ -43,6 +43,8 @@
#define DA8XX_MDIO_REG_OFFSET 0x4000 #define DA8XX_MDIO_REG_OFFSET 0x4000
#define DA8XX_EMAC_CTRL_RAM_SIZE SZ_8K #define DA8XX_EMAC_CTRL_RAM_SIZE SZ_8K
void __iomem *da8xx_syscfg_base;
static struct plat_serial8250_port da8xx_serial_pdata[] = { static struct plat_serial8250_port da8xx_serial_pdata[] = {
{ {
.mapbase = DA8XX_UART0_BASE, .mapbase = DA8XX_UART0_BASE,
......
...@@ -18,6 +18,8 @@ ...@@ -18,6 +18,8 @@
#include <mach/asp.h> #include <mach/asp.h>
#include <mach/mmc.h> #include <mach/mmc.h>
extern void __iomem *da8xx_syscfg_base;
/* /*
* The cp_intc interrupt controller for the da8xx isn't in the same * The cp_intc interrupt controller for the da8xx isn't in the same
* chunk of physical memory space as the other registers (like it is * chunk of physical memory space as the other registers (like it is
...@@ -30,6 +32,7 @@ ...@@ -30,6 +32,7 @@
#define DA8XX_CP_INTC_VIRT (IO_VIRT - DA8XX_CP_INTC_SIZE - SZ_4K) #define DA8XX_CP_INTC_VIRT (IO_VIRT - DA8XX_CP_INTC_SIZE - SZ_4K)
#define DA8XX_SYSCFG_BASE (IO_PHYS + 0x14000) #define DA8XX_SYSCFG_BASE (IO_PHYS + 0x14000)
#define DA8XX_SYSCFG_VIRT(x) (da8xx_syscfg_base + (x))
#define DA8XX_PSC0_BASE 0x01c10000 #define DA8XX_PSC0_BASE 0x01c10000
#define DA8XX_PLL0_BASE 0x01c11000 #define DA8XX_PLL0_BASE 0x01c11000
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment