ARM: omap1: merge omap1_map_io functions
authorArnd Bergmann <arnd@arndb.de>
Wed, 4 Jan 2023 12:55:37 +0000 (13:55 +0100)
committerArnd Bergmann <arnd@arndb.de>
Thu, 12 Jan 2023 09:53:11 +0000 (10:53 +0100)
The OMAP15xx/OMAP16xx variants are exactly the same, so merge them
into one.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
arch/arm/mach-omap1/board-ams-delta.c
arch/arm/mach-omap1/board-nokia770.c
arch/arm/mach-omap1/board-osk.c
arch/arm/mach-omap1/board-palmte.c
arch/arm/mach-omap1/board-sx1.c
arch/arm/mach-omap1/common.h
arch/arm/mach-omap1/io.c

index 651c28d..0f67ac4 100644 (file)
@@ -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));
 }
 
index 8e0e584..a501a47 100644 (file)
@@ -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,
index 7049e60..df758c1 100644 (file)
@@ -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,
index 72e1979..f79c497 100644 (file)
@@ -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,
index f0dbb0e..0c0cdd5 100644 (file)
@@ -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,
index 3fd9ed9..7a7c3d9 100644 (file)
 #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);
index a08406c..1f20fe9 100644 (file)
  * 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.