Commit 9a99b142 authored by Arnd Bergmann's avatar Arnd Bergmann

ARM: omap1: merge omap1_map_io functions

The OMAP15xx/OMAP16xx variants are exactly the same, so merge them
into one.
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
parent 8825acd7
...@@ -871,7 +871,7 @@ static void __init ams_delta_init_late(void) ...@@ -871,7 +871,7 @@ static void __init ams_delta_init_late(void)
static void __init ams_delta_map_io(void) static void __init ams_delta_map_io(void)
{ {
omap15xx_map_io(); omap1_map_io();
iotable_init(ams_delta_io_desc, ARRAY_SIZE(ams_delta_io_desc)); iotable_init(ams_delta_io_desc, ARRAY_SIZE(ams_delta_io_desc));
} }
......
...@@ -288,7 +288,7 @@ static void __init omap_nokia770_init(void) ...@@ -288,7 +288,7 @@ static void __init omap_nokia770_init(void)
MACHINE_START(NOKIA770, "Nokia 770") MACHINE_START(NOKIA770, "Nokia 770")
.atag_offset = 0x100, .atag_offset = 0x100,
.map_io = omap16xx_map_io, .map_io = omap1_map_io,
.init_early = omap1_init_early, .init_early = omap1_init_early,
.init_irq = omap1_init_irq, .init_irq = omap1_init_irq,
.handle_irq = omap1_handle_irq, .handle_irq = omap1_handle_irq,
......
...@@ -386,7 +386,7 @@ static void __init osk_init(void) ...@@ -386,7 +386,7 @@ static void __init osk_init(void)
MACHINE_START(OMAP_OSK, "TI-OSK") MACHINE_START(OMAP_OSK, "TI-OSK")
/* Maintainer: Dirk Behme <dirk.behme@de.bosch.com> */ /* Maintainer: Dirk Behme <dirk.behme@de.bosch.com> */
.atag_offset = 0x100, .atag_offset = 0x100,
.map_io = omap16xx_map_io, .map_io = omap1_map_io,
.init_early = omap1_init_early, .init_early = omap1_init_early,
.init_irq = omap1_init_irq, .init_irq = omap1_init_irq,
.handle_irq = omap1_handle_irq, .handle_irq = omap1_handle_irq,
......
...@@ -256,7 +256,7 @@ static void __init omap_palmte_init(void) ...@@ -256,7 +256,7 @@ static void __init omap_palmte_init(void)
MACHINE_START(OMAP_PALMTE, "OMAP310 based Palm Tungsten E") MACHINE_START(OMAP_PALMTE, "OMAP310 based Palm Tungsten E")
.atag_offset = 0x100, .atag_offset = 0x100,
.map_io = omap15xx_map_io, .map_io = omap1_map_io,
.init_early = omap1_init_early, .init_early = omap1_init_early,
.init_irq = omap1_init_irq, .init_irq = omap1_init_irq,
.handle_irq = omap1_handle_irq, .handle_irq = omap1_handle_irq,
......
...@@ -335,7 +335,7 @@ static void __init omap_sx1_init(void) ...@@ -335,7 +335,7 @@ static void __init omap_sx1_init(void)
MACHINE_START(SX1, "OMAP310 based Siemens SX1") MACHINE_START(SX1, "OMAP310 based Siemens SX1")
.atag_offset = 0x100, .atag_offset = 0x100,
.map_io = omap15xx_map_io, .map_io = omap1_map_io,
.init_early = omap1_init_early, .init_early = omap1_init_early,
.init_irq = omap1_init_irq, .init_irq = omap1_init_irq,
.handle_irq = omap1_handle_irq, .handle_irq = omap1_handle_irq,
......
...@@ -35,26 +35,6 @@ ...@@ -35,26 +35,6 @@
#include "soc.h" #include "soc.h"
#include "i2c.h" #include "i2c.h"
#ifdef CONFIG_ARCH_OMAP15XX
void omap1510_fpga_init_irq(void);
void omap15xx_map_io(void);
#else
static inline void omap1510_fpga_init_irq(void)
{
}
static inline void omap15xx_map_io(void)
{
}
#endif
#ifdef CONFIG_ARCH_OMAP16XX
void omap16xx_map_io(void);
#else
static inline void omap16xx_map_io(void)
{
}
#endif
#ifdef CONFIG_OMAP_SERIAL_WAKE #ifdef CONFIG_OMAP_SERIAL_WAKE
int omap_serial_wakeup_init(void); int omap_serial_wakeup_init(void);
#else #else
...@@ -64,6 +44,7 @@ static inline int omap_serial_wakeup_init(void) ...@@ -64,6 +44,7 @@ static inline int omap_serial_wakeup_init(void)
} }
#endif #endif
void omap1_map_io(void);
void omap1_init_early(void); void omap1_init_early(void);
void omap1_init_irq(void); void omap1_init_irq(void);
void __exception_irq_entry omap1_handle_irq(struct pt_regs *regs); void __exception_irq_entry omap1_handle_irq(struct pt_regs *regs);
......
...@@ -22,64 +22,32 @@ ...@@ -22,64 +22,32 @@
* The machine specific code may provide the extra mapping besides the * The machine specific code may provide the extra mapping besides the
* default mapping provided here. * default mapping provided here.
*/ */
static struct map_desc omap1_io_desc[] __initdata = {
#ifdef CONFIG_ARCH_OMAP15XX
static struct map_desc omap1510_io_desc[] __initdata = {
{ {
.virtual = OMAP1_IO_VIRT, .virtual = OMAP1_IO_VIRT,
.pfn = __phys_to_pfn(OMAP1_IO_PHYS), .pfn = __phys_to_pfn(OMAP1_IO_PHYS),
.length = OMAP1_IO_SIZE, .length = OMAP1_IO_SIZE,
.type = MT_DEVICE .type = MT_DEVICE
},
{
.virtual = OMAP1510_DSP_BASE,
.pfn = __phys_to_pfn(OMAP1510_DSP_START),
.length = OMAP1510_DSP_SIZE,
.type = MT_DEVICE
}, { }, {
.virtual = OMAP1510_DSPREG_BASE, .virtual = OMAP1_DSP_BASE,
.pfn = __phys_to_pfn(OMAP1510_DSPREG_START), .pfn = __phys_to_pfn(OMAP1_DSP_START),
.length = OMAP1510_DSPREG_SIZE, .length = OMAP1_DSP_SIZE,
.type = MT_DEVICE
}
};
#endif
#if defined(CONFIG_ARCH_OMAP16XX)
static struct map_desc omap16xx_io_desc[] __initdata = {
{
.virtual = OMAP1_IO_VIRT,
.pfn = __phys_to_pfn(OMAP1_IO_PHYS),
.length = OMAP1_IO_SIZE,
.type = MT_DEVICE
},
{
.virtual = OMAP16XX_DSP_BASE,
.pfn = __phys_to_pfn(OMAP16XX_DSP_START),
.length = OMAP16XX_DSP_SIZE,
.type = MT_DEVICE .type = MT_DEVICE
}, { }, {
.virtual = OMAP16XX_DSPREG_BASE, .virtual = OMAP1_DSPREG_BASE,
.pfn = __phys_to_pfn(OMAP16XX_DSPREG_START), .pfn = __phys_to_pfn(OMAP1_DSPREG_START),
.length = OMAP16XX_DSPREG_SIZE, .length = OMAP1_DSPREG_SIZE,
.type = MT_DEVICE .type = MT_DEVICE
} }
}; };
#endif
#ifdef CONFIG_ARCH_OMAP15XX /*
void __init omap15xx_map_io(void) * Maps common IO regions for omap1
{ */
iotable_init(omap1510_io_desc, ARRAY_SIZE(omap1510_io_desc)); void __init omap1_map_io(void)
}
#endif
#if defined(CONFIG_ARCH_OMAP16XX)
void __init omap16xx_map_io(void)
{ {
iotable_init(omap16xx_io_desc, ARRAY_SIZE(omap16xx_io_desc)); iotable_init(omap1_io_desc, ARRAY_SIZE(omap1_io_desc));
} }
#endif
/* /*
* Common low-level hardware init for omap1. * Common low-level hardware init for omap1.
......
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