]> git.baikalelectronics.ru Git - kernel.git/commitdiff
ARM: omap1: enable multiplatform
authorArnd Bergmann <arnd@arndb.de>
Mon, 30 May 2022 12:46:17 +0000 (14:46 +0200)
committerArnd Bergmann <arnd@arndb.de>
Fri, 3 Jun 2022 18:48:53 +0000 (20:48 +0200)
With all the header files out of the way, and the clock driver
converted to the common framework, nothing stops us from building
OMAP together with the other platforms.

As usual, the decompressor support is a victim here, and is
only available when CONFIG_DEBUG_LL is configured for the
particular board.

Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
arch/arm/Kconfig
arch/arm/configs/omap1_defconfig
arch/arm/mach-omap1/Kconfig
arch/arm/mach-omap1/hardware.h
arch/arm/mach-omap1/include/mach/serial.h [deleted file]
arch/arm/mach-omap1/include/mach/uncompress.h [deleted file]
arch/arm/mach-omap1/serial.c
arch/arm/mach-omap1/serial.h [new file with mode: 0644]

index f182f32145a8707f356f0b919620a578c9b5f5b4..7630ba9cb6ccc30cd75672c57e0aa248f5a298c9 100644 (file)
@@ -396,19 +396,6 @@ config ARCH_SA1100
        help
          Support for StrongARM 11x0 based boards.
 
-config ARCH_OMAP1
-       bool "TI OMAP1"
-       depends on CPU_LITTLE_ENDIAN
-       select CLKSRC_MMIO
-       select FORCE_PCI if PCCARD
-       select GENERIC_IRQ_CHIP
-       select GPIOLIB
-       select HAVE_LEGACY_CLK
-       select IRQ_DOMAIN
-       select SPARSE_IRQ
-       help
-         Support for older TI OMAP1 (omap7xx, omap15xx or omap16xx)
-
 endchoice
 
 menu "Multiple platform selection"
index 3148567b66b6abb9f4c6417514851b62ff1f7796..14c17a218ec5732c847d5bab46787ee87a7d16dc 100644 (file)
@@ -17,6 +17,9 @@ CONFIG_MODULES=y
 CONFIG_MODULE_UNLOAD=y
 CONFIG_MODULE_FORCE_UNLOAD=y
 # CONFIG_BLK_DEV_BSG is not set
+CONFIG_ARCH_MULTI_V4T=y
+CONFIG_ARCH_MULTI_V5=y
+# CONFIG_ARCH_MULTI_V7 is not set
 CONFIG_ARCH_OMAP=y
 CONFIG_ARCH_OMAP1=y
 CONFIG_OMAP_RESET_CLOCKS=y
index d4b0cd91a4f951e651819039f6271113e11b3322..0ac0567f721d8a2fff3d80c094aaf3a048909dc9 100644 (file)
@@ -1,4 +1,16 @@
 # SPDX-License-Identifier: GPL-2.0-only
+menuconfig ARCH_OMAP1
+       bool "TI OMAP1"
+       depends on ARCH_MULTI_V4T || ARCH_MULTI_V5
+       depends on CPU_LITTLE_ENDIAN
+       select ARCH_HAS_HOLES_MEMORYMODEL
+       select ARCH_OMAP
+       select CLKSRC_MMIO
+       select FORCE_PCI if PCCARD
+       select GPIOLIB
+       help
+         Support for older TI OMAP1 (omap7xx, omap15xx or omap16xx)
+
 if ARCH_OMAP1
 
 menu "TI OMAP1 specific features"
@@ -6,23 +18,27 @@ menu "TI OMAP1 specific features"
 comment "OMAP Core Type"
 
 config ARCH_OMAP730
+       depends on ARCH_MULTI_V5
        bool "OMAP730 Based System"
        select ARCH_OMAP_OTG
        select CPU_ARM926T
        select OMAP_MPU_TIMER
 
 config ARCH_OMAP850
+       depends on ARCH_MULTI_V5
        bool "OMAP850 Based System"
        select ARCH_OMAP_OTG
        select CPU_ARM926T
 
 config ARCH_OMAP15XX
+       depends on ARCH_MULTI_V4T
        default y
        bool "OMAP15xx Based System"
        select CPU_ARM925T
        select OMAP_MPU_TIMER
 
 config ARCH_OMAP16XX
+       depends on ARCH_MULTI_V5
        bool "OMAP16xx Based System"
        select ARCH_OMAP_OTG
        select CPU_ARM926T
index 738becbd2972e19b7be9cd4b2d4c9e9504280924..c228234a1ed47fa66b72a71d7eb24109d5294eb0 100644 (file)
@@ -64,7 +64,7 @@ static inline u32 omap_cs3_phys(void)
 #define OMAP1_IO_OFFSET                0x00f00000      /* Virtual IO = 0xff0b0000 */
 #define OMAP1_IO_ADDRESS(pa)   IOMEM((pa) - OMAP1_IO_OFFSET)
 
-#include <mach/serial.h>
+#include "serial.h"
 
 /*
  * ---------------------------------------------------------------------------
diff --git a/arch/arm/mach-omap1/include/mach/serial.h b/arch/arm/mach-omap1/include/mach/serial.h
deleted file mode 100644 (file)
index 4700e38..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (C) 2009 Texas Instruments
- * Added OMAP4 support- Santosh Shilimkar <santosh.shilimkar@ti.com>
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- */
-
-#ifndef __ASM_ARCH_SERIAL_H
-#define __ASM_ARCH_SERIAL_H
-
-#include <linux/init.h>
-
-/*
- * Memory entry used for the DEBUG_LL UART configuration, relative to
- * start of RAM. See also uncompress.h and debug-macro.S.
- *
- * Note that using a memory location for storing the UART configuration
- * has at least two limitations:
- *
- * 1. Kernel uncompress code cannot overlap OMAP_UART_INFO as the
- *    uncompress code could then partially overwrite itself
- * 2. We assume printascii is called at least once before paging_init,
- *    and addruart has a chance to read OMAP_UART_INFO
- */
-#define OMAP_UART_INFO_OFS     0x3ffc
-
-#define OMAP_PORT_SHIFT                2
-#define OMAP7XX_PORT_SHIFT     0
-
-#define OMAP1510_BASE_BAUD     (12000000/16)
-#define OMAP16XX_BASE_BAUD     (48000000/16)
-
-/*
- * DEBUG_LL port encoding stored into the UART1 scratchpad register by
- * decomp_setup in uncompress.h
- */
-#define OMAP1UART1             11
-#define OMAP1UART2             12
-#define OMAP1UART3             13
-
-#ifndef __ASSEMBLER__
-extern void omap_serial_init(void);
-#endif
-
-#endif
diff --git a/arch/arm/mach-omap1/include/mach/uncompress.h b/arch/arm/mach-omap1/include/mach/uncompress.h
deleted file mode 100644 (file)
index 9cca6a5..0000000
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * arch/arm/plat-omap/include/mach/uncompress.h
- *
- * Serial port stubs for kernel decompress status messages
- *
- * Initially based on:
- * linux-2.4.15-rmk1-dsplinux1.6/arch/arm/plat-omap/include/mach1510/uncompress.h
- * Copyright (C) 2000 RidgeRun, Inc.
- * Author: Greg Lonnon <glonnon@ridgerun.com>
- *
- * Rewritten by:
- * Author: <source@mvista.com>
- * 2004 (c) MontaVista Software, Inc.
- *
- * This file is licensed under the terms of the GNU General Public License
- * version 2. This program is licensed "as is" without any warranty of any
- * kind, whether express or implied.
- */
-
-#include <linux/types.h>
-#include <linux/serial_reg.h>
-
-#include <asm/memory.h>
-#include <asm/mach-types.h>
-
-#include "serial.h"
-
-#define MDR1_MODE_MASK                 0x07
-
-volatile u8 *uart_base;
-int uart_shift;
-
-/*
- * Store the DEBUG_LL uart number into memory.
- * See also debug-macro.S, and serial.c for related code.
- */
-static void set_omap_uart_info(unsigned char port)
-{
-       /*
-        * Get address of some.bss variable and round it down
-        * a la CONFIG_AUTO_ZRELADDR.
-        */
-       u32 ram_start = (u32)&uart_shift & 0xf8000000;
-       u32 *uart_info = (u32 *)(ram_start + OMAP_UART_INFO_OFS);
-       *uart_info = port;
-}
-
-static inline void putc(int c)
-{
-       if (!uart_base)
-               return;
-
-       /* Check for UART 16x mode */
-       if ((uart_base[UART_OMAP_MDR1 << uart_shift] & MDR1_MODE_MASK) != 0)
-               return;
-
-       while (!(uart_base[UART_LSR << uart_shift] & UART_LSR_THRE))
-               barrier();
-       uart_base[UART_TX << uart_shift] = c;
-}
-
-static inline void flush(void)
-{
-}
-
-/*
- * Macros to configure UART1 and debug UART
- */
-#define _DEBUG_LL_ENTRY(mach, dbg_uart, dbg_shft, dbg_id)              \
-       if (machine_is_##mach()) {                                      \
-               uart_base = (volatile u8 *)(dbg_uart);                  \
-               uart_shift = (dbg_shft);                                \
-               port = (dbg_id);                                        \
-               set_omap_uart_info(port);                               \
-               break;                                                  \
-       }
-
-#define DEBUG_LL_OMAP7XX(p, mach)                                      \
-       _DEBUG_LL_ENTRY(mach, OMAP1_UART##p##_BASE, OMAP7XX_PORT_SHIFT, \
-               OMAP1UART##p)
-
-#define DEBUG_LL_OMAP1(p, mach)                                                \
-       _DEBUG_LL_ENTRY(mach, OMAP1_UART##p##_BASE, OMAP_PORT_SHIFT,    \
-               OMAP1UART##p)
-
-static inline void arch_decomp_setup(void)
-{
-       int port = 0;
-
-       /*
-        * Initialize the port based on the machine ID from the bootloader.
-        * Note that we're using macros here instead of switch statement
-        * as machine_is functions are optimized out for the boards that
-        * are not selected.
-        */
-       do {
-               /* omap7xx/8xx based boards using UART1 with shift 0 */
-               DEBUG_LL_OMAP7XX(1, herald);
-               DEBUG_LL_OMAP7XX(1, omap_perseus2);
-
-               /* omap15xx/16xx based boards using UART1 */
-               DEBUG_LL_OMAP1(1, ams_delta);
-               DEBUG_LL_OMAP1(1, nokia770);
-               DEBUG_LL_OMAP1(1, omap_h2);
-               DEBUG_LL_OMAP1(1, omap_h3);
-               DEBUG_LL_OMAP1(1, omap_innovator);
-               DEBUG_LL_OMAP1(1, omap_osk);
-               DEBUG_LL_OMAP1(1, omap_palmte);
-               DEBUG_LL_OMAP1(1, omap_palmz71);
-
-               /* omap15xx/16xx based boards using UART2 */
-               DEBUG_LL_OMAP1(2, omap_palmtt);
-
-               /* omap15xx/16xx based boards using UART3 */
-               DEBUG_LL_OMAP1(3, sx1);
-       } while (0);
-}
index 299ae1106187b56ce23e1eb69b69738acac73b34..88928fc33b2ec5a962f6c82ddeda69ffa3ec2090 100644 (file)
@@ -19,8 +19,7 @@
 
 #include <asm/mach-types.h>
 
-#include <mach/serial.h>
-
+#include "serial.h"
 #include "mux.h"
 #include "pm.h"
 #include "soc.h"
diff --git a/arch/arm/mach-omap1/serial.h b/arch/arm/mach-omap1/serial.h
new file mode 100644 (file)
index 0000000..4700e38
--- /dev/null
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2009 Texas Instruments
+ * Added OMAP4 support- Santosh Shilimkar <santosh.shilimkar@ti.com>
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef __ASM_ARCH_SERIAL_H
+#define __ASM_ARCH_SERIAL_H
+
+#include <linux/init.h>
+
+/*
+ * Memory entry used for the DEBUG_LL UART configuration, relative to
+ * start of RAM. See also uncompress.h and debug-macro.S.
+ *
+ * Note that using a memory location for storing the UART configuration
+ * has at least two limitations:
+ *
+ * 1. Kernel uncompress code cannot overlap OMAP_UART_INFO as the
+ *    uncompress code could then partially overwrite itself
+ * 2. We assume printascii is called at least once before paging_init,
+ *    and addruart has a chance to read OMAP_UART_INFO
+ */
+#define OMAP_UART_INFO_OFS     0x3ffc
+
+#define OMAP_PORT_SHIFT                2
+#define OMAP7XX_PORT_SHIFT     0
+
+#define OMAP1510_BASE_BAUD     (12000000/16)
+#define OMAP16XX_BASE_BAUD     (48000000/16)
+
+/*
+ * DEBUG_LL port encoding stored into the UART1 scratchpad register by
+ * decomp_setup in uncompress.h
+ */
+#define OMAP1UART1             11
+#define OMAP1UART2             12
+#define OMAP1UART3             13
+
+#ifndef __ASSEMBLER__
+extern void omap_serial_init(void);
+#endif
+
+#endif