diff options
author | Arnd Bergmann <arnd@arndb.de> | 2023-01-04 13:55:37 +0100 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2023-01-12 10:53:11 +0100 |
commit | 9a99b142f7ef23bc3cb4cb82bf7f5abc173b11ca (patch) | |
tree | 365dd29400a957137e8d29bd06fbbc7c7b022993 /arch/arm/mach-omap1 | |
parent | 8825acd7cc8a13af7ae6c2c5e5025af38df6c2e4 (diff) | |
download | linux-stable-9a99b142f7ef23bc3cb4cb82bf7f5abc173b11ca.tar.gz linux-stable-9a99b142f7ef23bc3cb4cb82bf7f5abc173b11ca.tar.bz2 linux-stable-9a99b142f7ef23bc3cb4cb82bf7f5abc173b11ca.zip |
ARM: omap1: merge omap1_map_io functions
The OMAP15xx/OMAP16xx variants are exactly the same, so merge them
into one.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/arm/mach-omap1')
-rw-r--r-- | arch/arm/mach-omap1/board-ams-delta.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap1/board-nokia770.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap1/board-osk.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap1/board-palmte.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap1/board-sx1.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap1/common.h | 21 | ||||
-rw-r--r-- | arch/arm/mach-omap1/io.c | 56 |
7 files changed, 18 insertions, 69 deletions
diff --git a/arch/arm/mach-omap1/board-ams-delta.c b/arch/arm/mach-omap1/board-ams-delta.c index 651c28d81132..0f67ac4c6fd2 100644 --- a/arch/arm/mach-omap1/board-ams-delta.c +++ b/arch/arm/mach-omap1/board-ams-delta.c @@ -871,7 +871,7 @@ static void __init ams_delta_init_late(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)); } diff --git a/arch/arm/mach-omap1/board-nokia770.c b/arch/arm/mach-omap1/board-nokia770.c index 8e0e58495023..a501a473ffd6 100644 --- a/arch/arm/mach-omap1/board-nokia770.c +++ b/arch/arm/mach-omap1/board-nokia770.c @@ -288,7 +288,7 @@ static void __init omap_nokia770_init(void) MACHINE_START(NOKIA770, "Nokia 770") .atag_offset = 0x100, - .map_io = omap16xx_map_io, + .map_io = omap1_map_io, .init_early = omap1_init_early, .init_irq = omap1_init_irq, .handle_irq = omap1_handle_irq, diff --git a/arch/arm/mach-omap1/board-osk.c b/arch/arm/mach-omap1/board-osk.c index 7049e608b25a..df758c1f9237 100644 --- a/arch/arm/mach-omap1/board-osk.c +++ b/arch/arm/mach-omap1/board-osk.c @@ -386,7 +386,7 @@ static void __init osk_init(void) MACHINE_START(OMAP_OSK, "TI-OSK") /* Maintainer: Dirk Behme <dirk.behme@de.bosch.com> */ .atag_offset = 0x100, - .map_io = omap16xx_map_io, + .map_io = omap1_map_io, .init_early = omap1_init_early, .init_irq = omap1_init_irq, .handle_irq = omap1_handle_irq, diff --git a/arch/arm/mach-omap1/board-palmte.c b/arch/arm/mach-omap1/board-palmte.c index 72e1979c7a8b..f79c497f04d5 100644 --- a/arch/arm/mach-omap1/board-palmte.c +++ b/arch/arm/mach-omap1/board-palmte.c @@ -256,7 +256,7 @@ static void __init omap_palmte_init(void) MACHINE_START(OMAP_PALMTE, "OMAP310 based Palm Tungsten E") .atag_offset = 0x100, - .map_io = omap15xx_map_io, + .map_io = omap1_map_io, .init_early = omap1_init_early, .init_irq = omap1_init_irq, .handle_irq = omap1_handle_irq, diff --git a/arch/arm/mach-omap1/board-sx1.c b/arch/arm/mach-omap1/board-sx1.c index f0dbb0e8d8e7..0c0cdd5e77c7 100644 --- a/arch/arm/mach-omap1/board-sx1.c +++ b/arch/arm/mach-omap1/board-sx1.c @@ -335,7 +335,7 @@ static void __init omap_sx1_init(void) MACHINE_START(SX1, "OMAP310 based Siemens SX1") .atag_offset = 0x100, - .map_io = omap15xx_map_io, + .map_io = omap1_map_io, .init_early = omap1_init_early, .init_irq = omap1_init_irq, .handle_irq = omap1_handle_irq, diff --git a/arch/arm/mach-omap1/common.h b/arch/arm/mach-omap1/common.h index 3fd9ed9efb12..7a7c3d9eb84a 100644 --- a/arch/arm/mach-omap1/common.h +++ b/arch/arm/mach-omap1/common.h @@ -35,26 +35,6 @@ #include "soc.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 int omap_serial_wakeup_init(void); #else @@ -64,6 +44,7 @@ static inline int omap_serial_wakeup_init(void) } #endif +void omap1_map_io(void); void omap1_init_early(void); void omap1_init_irq(void); void __exception_irq_entry omap1_handle_irq(struct pt_regs *regs); diff --git a/arch/arm/mach-omap1/io.c b/arch/arm/mach-omap1/io.c index a08406cb2303..1f20fe99be57 100644 --- a/arch/arm/mach-omap1/io.c +++ b/arch/arm/mach-omap1/io.c @@ -22,64 +22,32 @@ * The machine specific code may provide the extra mapping besides the * default mapping provided here. */ - -#ifdef CONFIG_ARCH_OMAP15XX -static struct map_desc omap1510_io_desc[] __initdata = { +static struct map_desc omap1_io_desc[] __initdata = { { .virtual = OMAP1_IO_VIRT, .pfn = __phys_to_pfn(OMAP1_IO_PHYS), .length = OMAP1_IO_SIZE, .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, - .pfn = __phys_to_pfn(OMAP1510_DSPREG_START), - .length = OMAP1510_DSPREG_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, + .virtual = OMAP1_DSP_BASE, + .pfn = __phys_to_pfn(OMAP1_DSP_START), + .length = OMAP1_DSP_SIZE, .type = MT_DEVICE }, { - .virtual = OMAP16XX_DSPREG_BASE, - .pfn = __phys_to_pfn(OMAP16XX_DSPREG_START), - .length = OMAP16XX_DSPREG_SIZE, + .virtual = OMAP1_DSPREG_BASE, + .pfn = __phys_to_pfn(OMAP1_DSPREG_START), + .length = OMAP1_DSPREG_SIZE, .type = MT_DEVICE } }; -#endif -#ifdef CONFIG_ARCH_OMAP15XX -void __init omap15xx_map_io(void) -{ - iotable_init(omap1510_io_desc, ARRAY_SIZE(omap1510_io_desc)); -} -#endif - -#if defined(CONFIG_ARCH_OMAP16XX) -void __init omap16xx_map_io(void) +/* + * Maps common IO regions for omap1 + */ +void __init omap1_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. |