ARM: iop32x: merge everything into mach-iop32x/
authorArnd Bergmann <arnd@arndb.de>
Fri, 9 Aug 2019 16:33:21 +0000 (18:33 +0200)
committerArnd Bergmann <arnd@arndb.de>
Wed, 14 Aug 2019 13:36:22 +0000 (15:36 +0200)
Various bits of iop32x are now in their traditional locations in plat-iop,
mach-iop/include/mach/ and in include/asm/mach/hardware. As nothing
outside of the iop32x mach code references these any more, this can all
be moved into one place now.

The only remaining things in the include/mach/ directory are now the
NR_IRQS definition, the entry-macros.S file and the the decompressor
uart access. After the irqchip code has been converted to SPARSE_IRQ
and GENERIC_IRQ_MULTI_HANDLER, it can be moved to ARCH_MULTIPLATFORM.

Link: https://lore.kernel.org/r/20190809163334.489360-7-arnd@arndb.de
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
28 files changed:
arch/arm/Makefile
arch/arm/mach-iop32x/Makefile
arch/arm/mach-iop32x/adma.c [moved from arch/arm/plat-iop/adma.c with 98% similarity]
arch/arm/mach-iop32x/cp6.c [moved from arch/arm/plat-iop/cp6.c with 100% similarity]
arch/arm/mach-iop32x/em7210.c
arch/arm/mach-iop32x/glantank.c
arch/arm/mach-iop32x/glantank.h [moved from arch/arm/mach-iop32x/include/mach/glantank.h with 78% similarity]
arch/arm/mach-iop32x/hardware.h [moved from arch/arm/mach-iop32x/include/mach/hardware.h with 90% similarity]
arch/arm/mach-iop32x/i2c.c [moved from arch/arm/plat-iop/i2c.c with 96% similarity]
arch/arm/mach-iop32x/include/mach/entry-macro.S
arch/arm/mach-iop32x/include/mach/iop32x.h [deleted file]
arch/arm/mach-iop32x/include/mach/irqs.h
arch/arm/mach-iop32x/include/mach/time.h [deleted file]
arch/arm/mach-iop32x/iop3xx.h [moved from arch/arm/include/asm/hardware/iop3xx.h with 96% similarity]
arch/arm/mach-iop32x/iq31244.c
arch/arm/mach-iop32x/iq31244.h [moved from arch/arm/mach-iop32x/include/mach/iq31244.h with 89% similarity]
arch/arm/mach-iop32x/iq80321.c
arch/arm/mach-iop32x/iq80321.h [moved from arch/arm/mach-iop32x/include/mach/iq80321.h with 89% similarity]
arch/arm/mach-iop32x/irq.c
arch/arm/mach-iop32x/irqs.h [new file with mode: 0644]
arch/arm/mach-iop32x/n2100.c
arch/arm/mach-iop32x/n2100.h [moved from arch/arm/mach-iop32x/include/mach/n2100.h with 89% similarity]
arch/arm/mach-iop32x/pci.c [moved from arch/arm/plat-iop/pci.c with 99% similarity]
arch/arm/mach-iop32x/pmu.c [moved from arch/arm/plat-iop/pmu.c with 96% similarity]
arch/arm/mach-iop32x/restart.c [moved from arch/arm/plat-iop/restart.c with 82% similarity]
arch/arm/mach-iop32x/setup.c [moved from arch/arm/plat-iop/setup.c with 95% similarity]
arch/arm/mach-iop32x/time.c [moved from arch/arm/plat-iop/time.c with 97% similarity]
arch/arm/plat-iop/Makefile [deleted file]

index 516ff35..c96bc7e 100644 (file)
@@ -229,7 +229,6 @@ plat-$(CONFIG_ARCH_EXYNOS)  += samsung
 plat-$(CONFIG_ARCH_OMAP)       += omap
 plat-$(CONFIG_ARCH_S3C64XX)    += samsung
 plat-$(CONFIG_ARCH_S5PV210)    += samsung
-plat-$(CONFIG_PLAT_IOP)                += iop
 plat-$(CONFIG_PLAT_ORION)      += orion
 plat-$(CONFIG_PLAT_PXA)                += pxa
 plat-$(CONFIG_PLAT_S3C24XX)    += samsung
index 71d6244..c8018ef 100644 (file)
@@ -3,7 +3,15 @@
 # Makefile for the linux kernel.
 #
 
-obj-y                  := irq.o
+obj-$(CONFIG_ARCH_IOP32X) += irq.o
+obj-$(CONFIG_ARCH_IOP32X) += i2c.o
+obj-$(CONFIG_ARCH_IOP32X) += pci.o
+obj-$(CONFIG_ARCH_IOP32X) += setup.o
+obj-$(CONFIG_ARCH_IOP32X) += time.o
+obj-$(CONFIG_ARCH_IOP32X) += cp6.o
+obj-$(CONFIG_ARCH_IOP32X) += adma.o
+obj-$(CONFIG_ARCH_IOP32X) += pmu.o
+obj-$(CONFIG_ARCH_IOP32X) += restart.o
 
 obj-$(CONFIG_MACH_GLANTANK) += glantank.o
 obj-$(CONFIG_ARCH_IQ80321) += iq80321.o
similarity index 98%
rename from arch/arm/plat-iop/adma.c
rename to arch/arm/mach-iop32x/adma.c
index 601cc9c..764bcbf 100644 (file)
@@ -4,10 +4,12 @@
  * Copyright © 2006, Intel Corporation.
  */
 #include <linux/platform_device.h>
-#include <asm/hardware/iop3xx.h>
 #include <linux/dma-mapping.h>
 #include <linux/platform_data/dma-iop32x.h>
 
+#include "iop3xx.h"
+#include "irqs.h"
+
 #define IRQ_DMA0_EOT IRQ_IOP32X_DMA0_EOT
 #define IRQ_DMA0_EOC IRQ_IOP32X_DMA0_EOC
 #define IRQ_DMA0_ERR IRQ_IOP32X_DMA0_ERR
index 61a1e59..d43ced3 100644 (file)
@@ -21,7 +21,6 @@
 #include <linux/i2c.h>
 #include <linux/gpio.h>
 #include <linux/gpio/machine.h>
-#include <mach/hardware.h>
 #include <linux/io.h>
 #include <linux/irq.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/pci.h>
 #include <asm/mach/time.h>
 #include <asm/mach-types.h>
-#include <mach/time.h>
+
+#include "hardware.h"
 #include "gpio-iop32x.h"
+#include "irqs.h"
 
 static void __init em7210_timer_init(void)
 {
index 5a45d61..2fe0f77 100644 (file)
@@ -22,7 +22,6 @@
 #include <linux/platform_device.h>
 #include <linux/io.h>
 #include <linux/gpio/machine.h>
-#include <mach/hardware.h>
 #include <asm/irq.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 #include <asm/mach/time.h>
 #include <asm/mach-types.h>
 #include <asm/page.h>
-#include <mach/time.h>
+
+#include "hardware.h"
 #include "gpio-iop32x.h"
+#include "irqs.h"
 
 /*
  * GLAN Tank timer tick configuration.
similarity index 78%
rename from arch/arm/mach-iop32x/include/mach/glantank.h
rename to arch/arm/mach-iop32x/glantank.h
index b9df2e4..f38e86b 100644 (file)
@@ -1,7 +1,5 @@
 /* SPDX-License-Identifier: GPL-2.0 */
 /*
- * arch/arm/mach-iop32x/include/mach/glantank.h
- *
  * IO-Data GLAN Tank board registers
  */
 
similarity index 90%
rename from arch/arm/mach-iop32x/include/mach/hardware.h
rename to arch/arm/mach-iop32x/hardware.h
index 6e5303e..43ab4fb 100644 (file)
@@ -1,8 +1,4 @@
 /* SPDX-License-Identifier: GPL-2.0 */
-/*
- * arch/arm/mach-iop32x/include/mach/hardware.h
- */
-
 #ifndef __HARDWARE_H
 #define __HARDWARE_H
 
@@ -28,7 +24,7 @@ void iop32x_init_irq(void);
 /*
  * Generic chipset bits
  */
-#include "iop32x.h"
+#include "iop3xx.h"
 
 /*
  * Board specific bits
similarity index 96%
rename from arch/arm/plat-iop/i2c.c
rename to arch/arm/mach-iop32x/i2c.c
index 8d5fe34..dc9f6a1 100644 (file)
 #include <asm/mach/map.h>
 #include <asm/setup.h>
 #include <asm/memory.h>
-#include <mach/hardware.h>
-#include <asm/hardware/iop3xx.h>
 #include <asm/mach/arch.h>
 
+#include "hardware.h"
+#include "iop3xx.h"
+#include "irqs.h"
+
 /*
  * Each of the I2C busses have corresponding GPIO lines, and the driver
  * need to access these directly to drive the bus low at times.
index ea13ae0..8e6766d 100644 (file)
@@ -7,8 +7,6 @@
  * License version 2. This program is licensed "as is" without any
  * warranty of any kind, whether express or implied.
  */
-#include <mach/iop32x.h>
-
        .macro get_irqnr_preamble, base, tmp
        mrc     p15, 0, \tmp, c15, c1, 0
        orr     \tmp, \tmp, #(1 << 6)
diff --git a/arch/arm/mach-iop32x/include/mach/iop32x.h b/arch/arm/mach-iop32x/include/mach/iop32x.h
deleted file mode 100644 (file)
index 84223f8..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-/*
- * arch/arm/mach-iop32x/include/mach/iop32x.h
- *
- * Intel IOP32X Chip definitions
- *
- * Author: Rory Bolt <rorybolt@pacbell.net>
- * Copyright (C) 2002 Rory Bolt
- * Copyright (C) 2004 Intel Corp.
- */
-
-#ifndef __IOP32X_H
-#define __IOP32X_H
-
-/*
- * Peripherals that are shared between the iop32x and iop33x but
- * located at different addresses.
- */
-#define IOP3XX_TIMER_REG(reg)  (IOP3XX_PERIPHERAL_VIRT_BASE + 0x07e0 + (reg))
-
-#include <asm/hardware/iop3xx.h>
-
-/* ATU Parameters
- * set up a 1:1 bus to physical ram relationship
- * w/ physical ram on top of pci in the memory map
- */
-#define IOP32X_MAX_RAM_SIZE            0x40000000UL
-#define IOP3XX_MAX_RAM_SIZE            IOP32X_MAX_RAM_SIZE
-#define IOP3XX_PCI_LOWER_MEM_BA        0x80000000
-
-#endif
index 82b1174..c4e78df 100644 (file)
@@ -9,39 +9,6 @@
 #ifndef __IRQS_H
 #define __IRQS_H
 
-/*
- * IOP80321 chipset interrupts
- */
-#define IRQ_IOP32X_DMA0_EOT    0
-#define IRQ_IOP32X_DMA0_EOC    1
-#define IRQ_IOP32X_DMA1_EOT    2
-#define IRQ_IOP32X_DMA1_EOC    3
-#define IRQ_IOP32X_AA_EOT      6
-#define IRQ_IOP32X_AA_EOC      7
-#define IRQ_IOP32X_CORE_PMON   8
-#define IRQ_IOP32X_TIMER0      9
-#define IRQ_IOP32X_TIMER1      10
-#define IRQ_IOP32X_I2C_0       11
-#define IRQ_IOP32X_I2C_1       12
-#define IRQ_IOP32X_MESSAGING   13
-#define IRQ_IOP32X_ATU_BIST    14
-#define IRQ_IOP32X_PERFMON     15
-#define IRQ_IOP32X_CORE_PMU    16
-#define IRQ_IOP32X_BIU_ERR     17
-#define IRQ_IOP32X_ATU_ERR     18
-#define IRQ_IOP32X_MCU_ERR     19
-#define IRQ_IOP32X_DMA0_ERR    20
-#define IRQ_IOP32X_DMA1_ERR    21
-#define IRQ_IOP32X_AA_ERR      23
-#define IRQ_IOP32X_MSG_ERR     24
-#define IRQ_IOP32X_SSP         25
-#define IRQ_IOP32X_XINT0       27
-#define IRQ_IOP32X_XINT1       28
-#define IRQ_IOP32X_XINT2       29
-#define IRQ_IOP32X_XINT3       30
-#define IRQ_IOP32X_HPI         31
-
 #define NR_IRQS                        32
 
-
 #endif
diff --git a/arch/arm/mach-iop32x/include/mach/time.h b/arch/arm/mach-iop32x/include/mach/time.h
deleted file mode 100644 (file)
index d08950c..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-#ifndef _IOP32X_TIME_H_
-#define _IOP32X_TIME_H_
-#define IRQ_IOP_TIMER0 IRQ_IOP32X_TIMER0
-#endif
similarity index 96%
rename from arch/arm/include/asm/hardware/iop3xx.h
rename to arch/arm/mach-iop32x/iop3xx.h
index 3cb6f22..46b4b34 100644 (file)
@@ -1,7 +1,5 @@
 /* SPDX-License-Identifier: GPL-2.0-only */
 /*
- * arch/arm/include/asm/hardware/iop3xx.h
- *
  * Intel IOP32X and IOP33X register definitions
  *
  * Author: Rory Bolt <rorybolt@pacbell.net>
 #define __IOP3XX_H
 
 /*
+ * Peripherals that are shared between the iop32x and iop33x but
+ * located at different addresses.
+ */
+#define IOP3XX_TIMER_REG(reg)  (IOP3XX_PERIPHERAL_VIRT_BASE + 0x07e0 + (reg))
+
+#include "iop3xx.h"
+
+/* ATU Parameters
+ * set up a 1:1 bus to physical ram relationship
+ * w/ physical ram on top of pci in the memory map
+ */
+#define IOP32X_MAX_RAM_SIZE            0x40000000UL
+#define IOP3XX_MAX_RAM_SIZE            IOP32X_MAX_RAM_SIZE
+#define IOP3XX_PCI_LOWER_MEM_BA        0x80000000
+
+/*
  * IOP3XX GPIO handling
  */
 #define IOP3XX_GPIO_LINE(x)    (x)
index 8755aa8..04a7d38 100644 (file)
@@ -23,7 +23,6 @@
 #include <linux/platform_device.h>
 #include <linux/io.h>
 #include <linux/gpio/machine.h>
-#include <mach/hardware.h>
 #include <asm/cputype.h>
 #include <asm/irq.h>
 #include <asm/mach/arch.h>
@@ -33,7 +32,9 @@
 #include <asm/mach-types.h>
 #include <asm/page.h>
 #include <asm/pgtable.h>
-#include <mach/time.h>
+
+#include "hardware.h"
+#include "irqs.h"
 #include "gpio-iop32x.h"
 
 /*
similarity index 89%
rename from arch/arm/mach-iop32x/include/mach/iq31244.h
rename to arch/arm/mach-iop32x/iq31244.h
index e62da5d..a7ac691 100644 (file)
@@ -1,7 +1,5 @@
 /* SPDX-License-Identifier: GPL-2.0 */
 /*
- * arch/arm/mach-iop32x/include/mach/iq31244.h
- *
  * Intel IQ31244 evaluation board registers
  */
 
index e12699d..4bd596d 100644 (file)
@@ -20,7 +20,6 @@
 #include <linux/platform_device.h>
 #include <linux/io.h>
 #include <linux/gpio/machine.h>
-#include <mach/hardware.h>
 #include <asm/irq.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
@@ -29,7 +28,9 @@
 #include <asm/mach-types.h>
 #include <asm/page.h>
 #include <asm/pgtable.h>
-#include <mach/time.h>
+
+#include "hardware.h"
+#include "irqs.h"
 #include "gpio-iop32x.h"
 
 /*
similarity index 89%
rename from arch/arm/mach-iop32x/include/mach/iq80321.h
rename to arch/arm/mach-iop32x/iq80321.h
index faf62c2..3a5d106 100644 (file)
@@ -1,7 +1,5 @@
 /* SPDX-License-Identifier: GPL-2.0 */
 /*
- * arch/arm/mach-iop32x/include/mach/iq80321.h
- *
  * Intel IQ80321 evaluation board registers
  */
 
index 2f5d4ec..2d48bf1 100644 (file)
 #include <linux/list.h>
 #include <asm/mach/irq.h>
 #include <asm/irq.h>
-#include <mach/hardware.h>
 #include <asm/mach-types.h>
 
+#include "hardware.h"
+
 static u32 iop32x_mask;
 
 static void intctl_write(u32 val)
diff --git a/arch/arm/mach-iop32x/irqs.h b/arch/arm/mach-iop32x/irqs.h
new file mode 100644 (file)
index 0000000..69858e4
--- /dev/null
@@ -0,0 +1,42 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+/*
+ * Author:     Rory Bolt <rorybolt@pacbell.net>
+ * Copyright:  (C) 2002 Rory Bolt
+ */
+
+#ifndef __IOP32X_IRQS_H
+#define __IOP32X_IRQS_H
+
+/*
+ * IOP80321 chipset interrupts
+ */
+#define IRQ_IOP32X_DMA0_EOT    0
+#define IRQ_IOP32X_DMA0_EOC    1
+#define IRQ_IOP32X_DMA1_EOT    2
+#define IRQ_IOP32X_DMA1_EOC    3
+#define IRQ_IOP32X_AA_EOT      6
+#define IRQ_IOP32X_AA_EOC      7
+#define IRQ_IOP32X_CORE_PMON   8
+#define IRQ_IOP32X_TIMER0      9
+#define IRQ_IOP32X_TIMER1      10
+#define IRQ_IOP32X_I2C_0       11
+#define IRQ_IOP32X_I2C_1       12
+#define IRQ_IOP32X_MESSAGING   13
+#define IRQ_IOP32X_ATU_BIST    14
+#define IRQ_IOP32X_PERFMON     15
+#define IRQ_IOP32X_CORE_PMU    16
+#define IRQ_IOP32X_BIU_ERR     17
+#define IRQ_IOP32X_ATU_ERR     18
+#define IRQ_IOP32X_MCU_ERR     19
+#define IRQ_IOP32X_DMA0_ERR    20
+#define IRQ_IOP32X_DMA1_ERR    21
+#define IRQ_IOP32X_AA_ERR      23
+#define IRQ_IOP32X_MSG_ERR     24
+#define IRQ_IOP32X_SSP         25
+#define IRQ_IOP32X_XINT0       27
+#define IRQ_IOP32X_XINT1       28
+#define IRQ_IOP32X_XINT2       29
+#define IRQ_IOP32X_XINT3       30
+#define IRQ_IOP32X_HPI         31
+
+#endif
index 26d76b3..5382a93 100644 (file)
@@ -28,7 +28,6 @@
 #include <linux/io.h>
 #include <linux/gpio.h>
 #include <linux/gpio/machine.h>
-#include <mach/hardware.h>
 #include <asm/irq.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
@@ -37,7 +36,9 @@
 #include <asm/mach-types.h>
 #include <asm/page.h>
 #include <asm/pgtable.h>
-#include <mach/time.h>
+
+#include "hardware.h"
+#include "irqs.h"
 #include "gpio-iop32x.h"
 
 /*
similarity index 89%
rename from arch/arm/mach-iop32x/include/mach/n2100.h
rename to arch/arm/mach-iop32x/n2100.h
index 70bb660..0b97b94 100644 (file)
@@ -1,7 +1,5 @@
 /* SPDX-License-Identifier: GPL-2.0 */
 /*
- * arch/arm/mach-iop32x/include/mach/n2100.h
- *
  * Thecus N2100 board registers
  */
 
similarity index 99%
rename from arch/arm/plat-iop/pci.c
rename to arch/arm/mach-iop32x/pci.c
index 4c42c95..ab0010d 100644 (file)
@@ -17,9 +17,9 @@
 #include <linux/io.h>
 #include <asm/irq.h>
 #include <asm/signal.h>
-#include <mach/hardware.h>
 #include <asm/mach/pci.h>
-#include <asm/hardware/iop3xx.h>
+#include "hardware.h"
+#include "iop3xx.h"
 
 // #define DEBUG
 
similarity index 96%
rename from arch/arm/plat-iop/pmu.c
rename to arch/arm/mach-iop32x/pmu.c
index 3834142..bdbc7a3 100644 (file)
@@ -5,7 +5,7 @@
  */
 
 #include <linux/platform_device.h>
-#include <mach/irqs.h>
+#include "irqs.h"
 
 static struct resource pmu_resource = {
        .start  = IRQ_IOP32X_CORE_PMU,
similarity index 82%
rename from arch/arm/plat-iop/restart.c
rename to arch/arm/mach-iop32x/restart.c
index cf6d3d9..3dfa54d 100644 (file)
@@ -4,9 +4,9 @@
  *
  * Copyright (C) 2001 MontaVista Software, Inc.
  */
-#include <asm/hardware/iop3xx.h>
 #include <asm/system_misc.h>
-#include <mach/hardware.h>
+#include "hardware.h"
+#include "iop3xx.h"
 
 void iop3xx_restart(enum reboot_mode mode, const char *cmd)
 {
similarity index 95%
rename from arch/arm/plat-iop/setup.c
rename to arch/arm/mach-iop32x/setup.c
index d10e010..a0a81c2 100644 (file)
@@ -10,7 +10,7 @@
 #include <linux/mm.h>
 #include <linux/init.h>
 #include <asm/mach/map.h>
-#include <asm/hardware/iop3xx.h>
+#include "iop3xx.h"
 
 /*
  * Standard IO mapping for all IOP3xx based systems.  Note that
similarity index 97%
rename from arch/arm/plat-iop/time.c
rename to arch/arm/mach-iop32x/time.c
index f9dd1f5..18a4df5 100644 (file)
 #include <linux/clockchips.h>
 #include <linux/export.h>
 #include <linux/sched_clock.h>
-#include <mach/hardware.h>
 #include <asm/irq.h>
 #include <linux/uaccess.h>
 #include <asm/mach/irq.h>
 #include <asm/mach/time.h>
-#include <mach/time.h>
+
+#include "hardware.h"
+#include "irqs.h"
 
 /*
  * Minimum clocksource/clockevent timer range in seconds
@@ -167,7 +168,7 @@ void __init iop_init_time(unsigned long tick_rate)
         */
        write_tmr0(timer_ctl & ~IOP_TMR_EN);
        write_tisr(1);
-       setup_irq(IRQ_IOP_TIMER0, &iop_timer_irq);
+       setup_irq(IRQ_IOP32X_TIMER0, &iop_timer_irq);
        iop_clockevent.cpumask = cpumask_of(0);
        clockevents_config_and_register(&iop_clockevent, tick_rate,
                                        0xf, 0xfffffffe);
diff --git a/arch/arm/plat-iop/Makefile b/arch/arm/plat-iop/Makefile
deleted file mode 100644 (file)
index 86e354b..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0
-#
-# Makefile for the linux kernel.
-#
-
-# IOP32X
-obj-$(CONFIG_ARCH_IOP32X) += i2c.o
-obj-$(CONFIG_ARCH_IOP32X) += pci.o
-obj-$(CONFIG_ARCH_IOP32X) += setup.o
-obj-$(CONFIG_ARCH_IOP32X) += time.o
-obj-$(CONFIG_ARCH_IOP32X) += cp6.o
-obj-$(CONFIG_ARCH_IOP32X) += adma.o
-obj-$(CONFIG_ARCH_IOP32X) += pmu.o
-obj-$(CONFIG_ARCH_IOP32X) += restart.o