ARM: lpc32xx: clean up header files
authorArnd Bergmann <arnd@arndb.de>
Fri, 9 Aug 2019 14:40:38 +0000 (16:40 +0200)
committerArnd Bergmann <arnd@arndb.de>
Thu, 15 Aug 2019 19:34:05 +0000 (21:34 +0200)
All device drivers have stopped relying on mach/*.h headers,
so move the remaining headers into arch/arm/mach-lpc32xx/lpc32xx.h
to prepare for multiplatform builds.

The mach/entry-macro.S file has been unused for a long time now
and can simply get removed.

Link: https://lore.kernel.org/r/20190809144043.476786-13-arnd@arndb.de
Acked-by: Sylvain Lemieux <slemieux.tyco@gmail.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
arch/arm/mach-lpc32xx/common.c
arch/arm/mach-lpc32xx/include/mach/entry-macro.S [deleted file]
arch/arm/mach-lpc32xx/include/mach/hardware.h [deleted file]
arch/arm/mach-lpc32xx/include/mach/uncompress.h
arch/arm/mach-lpc32xx/lpc32xx.h [moved from arch/arm/mach-lpc32xx/include/mach/platform.h with 98% similarity]
arch/arm/mach-lpc32xx/pm.c
arch/arm/mach-lpc32xx/serial.c
arch/arm/mach-lpc32xx/suspend.S

index a475339333c13b1ca2b2ad5cdd09d060cc85a404..304ea61a07160b6d3beb17b651e66be7bcd25d25 100644 (file)
@@ -13,8 +13,7 @@
 #include <asm/mach/map.h>
 #include <asm/system_info.h>
 
-#include <mach/hardware.h>
-#include <mach/platform.h>
+#include "lpc32xx.h"
 #include "common.h"
 
 /*
diff --git a/arch/arm/mach-lpc32xx/include/mach/entry-macro.S b/arch/arm/mach-lpc32xx/include/mach/entry-macro.S
deleted file mode 100644 (file)
index eec0f5f..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
-/*
- * arch/arm/mach-lpc32xx/include/mach/entry-macro.S
- *
- * Author: Kevin Wells <kevin.wells@nxp.com>
- *
- * Copyright (C) 2010 NXP Semiconductors
- */
-
-#include <mach/hardware.h>
-#include <mach/platform.h>
-
-#define LPC32XX_INTC_MASKED_STATUS_OFS 0x8
-
-       .macro  get_irqnr_preamble, base, tmp
-       ldr     \base, =IO_ADDRESS(LPC32XX_MIC_BASE)
-       .endm
-
-/*
- * Return IRQ number in irqnr. Also return processor Z flag status in CPSR
- * as set if an interrupt is pending.
- */
-       .macro  get_irqnr_and_base, irqnr, irqstat, base, tmp
-       ldr     \irqstat, [\base, #LPC32XX_INTC_MASKED_STATUS_OFS]
-       clz     \irqnr, \irqstat
-       rsb     \irqnr, \irqnr, #31
-       teq     \irqstat, #0
-       .endm
diff --git a/arch/arm/mach-lpc32xx/include/mach/hardware.h b/arch/arm/mach-lpc32xx/include/mach/hardware.h
deleted file mode 100644 (file)
index 4866f09..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
-/*
- * arch/arm/mach-lpc32xx/include/mach/hardware.h
- *
- * Copyright (c) 2005 MontaVista Software, Inc. <source@mvista.com>
- */
-
-#ifndef __ASM_ARCH_HARDWARE_H
-#define __ASM_ARCH_HARDWARE_H
-
-/*
- * Start of virtual addresses for IO devices
- */
-#define IO_BASE                0xF0000000
-
-/*
- * This macro relies on fact that for all HW i/o addresses bits 20-23 are 0
- */
-#define IO_ADDRESS(x)  IOMEM(((((x) & 0xff000000) >> 4) | ((x) & 0xfffff)) |\
-                        IO_BASE)
-
-#define io_p2v(x)      ((void __iomem *) (unsigned long) IO_ADDRESS(x))
-#define io_v2p(x)      ((((x) & 0x0ff00000) << 4) | ((x) & 0x000fffff))
-
-#endif
index a568812a0b916fe86da6b0b2382a25e7ec0a87db..74b7aa0da0e4c98c50aac8a83bac92fe9e8d7a70 100644 (file)
 
 #include <linux/io.h>
 
-#include <mach/hardware.h>
-#include <mach/platform.h>
-
 /*
  * Uncompress output is hardcoded to standard UART 5
  */
 
 #define UART_FIFO_CTL_TX_RESET (1 << 2)
 #define UART_STATUS_TX_MT      (1 << 6)
+#define LPC32XX_UART5_BASE     0x40090000
 
 #define _UARTREG(x)            (void __iomem *)(LPC32XX_UART5_BASE + (x))
 
similarity index 98%
rename from arch/arm/mach-lpc32xx/include/mach/platform.h
rename to arch/arm/mach-lpc32xx/lpc32xx.h
index 1c53790444fc17810fa6c015f1542f26a6e6f7de..5eeb884a19939ffa319586152f4efec9f61406da 100644 (file)
@@ -7,8 +7,8 @@
  * Copyright (C) 2010 NXP Semiconductors
  */
 
-#ifndef __ASM_ARCH_PLATFORM_H
-#define __ASM_ARCH_PLATFORM_H
+#ifndef __ARM_LPC32XX_H
+#define __ARM_LPC32XX_H
 
 #define _SBF(f, v)                             ((v) << (f))
 #define _BIT(n)                                        _SBF(n, 1)
 #define LPC32XX_USB_OTG_DEV_CLOCK_ON   _BIT(1)
 #define LPC32XX_USB_OTG_HOST_CLOCK_ON  _BIT(0)
 
+/*
+ * Start of virtual addresses for IO devices
+ */
+#define IO_BASE                0xF0000000
+
+/*
+ * This macro relies on fact that for all HW i/o addresses bits 20-23 are 0
+ */
+#define IO_ADDRESS(x)  IOMEM(((((x) & 0xff000000) >> 4) | ((x) & 0xfffff)) |\
+                        IO_BASE)
+
+#define io_p2v(x)      ((void __iomem *) (unsigned long) IO_ADDRESS(x))
+#define io_v2p(x)      ((((x) & 0x0ff00000) << 4) | ((x) & 0x000fffff))
+
 #endif
index 32bca351a73b9cae8db47cf9a774c23d2d15edc3..b27fa1b9f56c1dd0f2d00571615c7307aacbcfda 100644 (file)
@@ -70,8 +70,7 @@
 
 #include <asm/cacheflush.h>
 
-#include <mach/hardware.h>
-#include <mach/platform.h>
+#include "lpc32xx.h"
 #include "common.h"
 
 #define TEMP_IRAM_AREA  IO_ADDRESS(LPC32XX_IRAM_BASE)
index cfb35e5691cd51196e7b2b8473f026e225a8419e..3e765c4bf986091eb881fd588e549165d3edf7f3 100644 (file)
@@ -16,8 +16,7 @@
 #include <linux/clk.h>
 #include <linux/io.h>
 
-#include <mach/hardware.h>
-#include <mach/platform.h>
+#include "lpc32xx.h"
 #include "common.h"
 
 #define LPC32XX_SUART_FIFO_SIZE        64
index 374f9f07fe480ead6bac9c1c79378c91f61f1b84..3f0a8282ef6fd2edfb9dd308689ef94350fccd39 100644 (file)
@@ -11,8 +11,7 @@
  */
 #include <linux/linkage.h>
 #include <asm/assembler.h>
-#include <mach/platform.h>
-#include <mach/hardware.h>
+#include "lpc32xx.h"
 
 /* Using named register defines makes the code easier to follow */
 #define WORK1_REG                      r0