Skip to contentSkip to conversation

omap plat/cpu.h removal for v3.8 merge window

PATCH In review Tony Lindgren 3 participants 9 messages Oct 8, 2012 – Oct 17, 2012

Subsystems (18)
lore
Share & tools
lore

Tony Lindgren

author maintainer
#0 lore raw

cover omap plat/cpu.h removal for v3.8 merge window

Hi all,

These two patches for v3.8 merge window make plat/cpu.h local to mach-omap1 and mach-omap2.

We'll have to keep plat/cpu.h around until the merge window so drivers are fixed, but after that it can be removed.

These patches are based on current linux next with the following patches:

- [PATCH 00/16] More omap plat header cleanup for v3.8 merge window

- [PATCH V2 0/7] ARM: OMAP: Move plat/dma*.h,omap-secure.h headers as part of single zImage work

- [PATCH v2 1/5] [media] omap3isp: Fix compilation error in ispreg.h
...
[PATCH v2 5/5] arm: omap: Move iopgtable header to drivers/iommu/

- [PATCH 0/6] ARM: OMAP: remove clock files in arch/arm/plat-omap

Regards,

Tony

---

Tony Lindgren (2):
ARM: OMAP: Trivial driver changes to remove include plat/cpu.h
ARM: OMAP: Split plat/cpu.h into local soc.h for mach-omap1 and mach-omap2

 arch/arm/mach-omap1/clock.c                 |    2 
 arch/arm/mach-omap1/clock_data.c            |    2 
 arch/arm/mach-omap1/i2c.c                   |    2 
 arch/arm/mach-omap1/id.c                    |    2 
 arch/arm/mach-omap1/include/mach/hardware.h |    2 
 arch/arm/mach-omap1/include/mach/memory.h   |    2 
 arch/arm/mach-omap1/irq.c                   |    2 
 arch/arm/mach-omap1/mcbsp.c                 |    2 
 arch/arm/mach-omap1/soc.h                   |  229 +++++++++++
 arch/arm/mach-omap2/board-3430sdp.c         |    1 
 arch/arm/mach-omap2/board-flash.c           |    2 
 arch/arm/mach-omap2/board-omap3beagle.c     |    1 
 arch/arm/mach-omap2/board-omap3evm.c        |    1 
 arch/arm/mach-omap2/board-zoom-display.c    |    1 
 arch/arm/mach-omap2/clock33xx_data.c        |    2 
 arch/arm/mach-omap2/clockdomain.c           |    1 
 arch/arm/mach-omap2/clockdomain.h           |    1 
 arch/arm/mach-omap2/clockdomain2xxx_3xxx.c  |    2 
 arch/arm/mach-omap2/clockdomains2420_data.c |    1 
 arch/arm/mach-omap2/clockdomains2430_data.c |    1 
 arch/arm/mach-omap2/clockdomains3xxx_data.c |    1 
 arch/arm/mach-omap2/common.h                |    1 
 arch/arm/mach-omap2/display.c               |    1 
 arch/arm/mach-omap2/dma.c                   |    1 
 arch/arm/mach-omap2/gpmc.c                  |    1 
 arch/arm/mach-omap2/hsmmc.c                 |    1 
 arch/arm/mach-omap2/i2c.c                   |    1 
 arch/arm/mach-omap2/mux.c                   |    1 
 arch/arm/mach-omap2/omap-mpuss-lowpower.c   |    1 
 arch/arm/mach-omap2/omap_hwmod.h            |    1 
 arch/arm/mach-omap2/omap_hwmod_33xx_data.c  |    1 
 arch/arm/mach-omap2/omap_twl.c              |    1 
 arch/arm/mach-omap2/opp3xxx_data.c          |    1 
 arch/arm/mach-omap2/pm-debug.c              |    1 
 arch/arm/mach-omap2/pm.c                    |    1 
 arch/arm/mach-omap2/pm24xx.c                |    1 
 arch/arm/mach-omap2/pm34xx.c                |    1 
 arch/arm/mach-omap2/pm44xx.c                |    1 
 arch/arm/mach-omap2/pmu.c                   |    1 
 arch/arm/mach-omap2/powerdomain.h           |    2 
 arch/arm/mach-omap2/powerdomains2xxx_data.c |    1 
 arch/arm/mach-omap2/prcm.c                  |    1 
 arch/arm/mach-omap2/serial.c                |    1 
 arch/arm/mach-omap2/soc.h                   |  468 ++++++++++++++++++++++
 arch/arm/mach-omap2/sr_device.c             |    2 
 arch/arm/mach-omap2/usb-host.c              |    1 
 arch/arm/mach-omap2/usb-musb.c              |    3 
 arch/arm/plat-omap/dma.c                    |    4 
 arch/arm/plat-omap/i2c.c                    |    4 
 arch/arm/plat-omap/include/plat/cpu.h       |  562 ---------------------------
 arch/arm/plat-omap/sram.c                   |    3 
 drivers/char/hw_random/omap-rng.c           |    2 
 drivers/crypto/omap-aes.c                   |    6 
 drivers/crypto/omap-sham.c                  |    8 
 drivers/dma/omap-dma.c                      |    9 
 drivers/mmc/host/omap_hsmmc.c               |    1 
 sound/soc/omap/omap-pcm.c                   |    9 
 57 files changed, 763 insertions(+), 602 deletions(-)
 create mode 100644 arch/arm/mach-omap1/soc.h
Signature · 1 line
Signature
author maintainer
#1 lore raw

PATCH 1/2 ARM: OMAP: Trivial driver changes to remove include plat/cpu.h

Drivers should not use cpu_is_omap or cpu_class_is_omap macros, they should be private to the platform init code. And we'll be removing plat/cpu.h and only have a private soc.h for the arch/arm/*omap* code.

This patch is intended as preparation for the core omap changes and removes the need to include plat/cpu.h from several drivers. This is needed for the ARM common zImage support.

These changes are OK to do because:

- omap-rng.c and hsmmc.c don't need plat/cpu.h

- omap-aes.c and omap-sham.c get the proper platform_data passed to them so they don't need extra checks in the driver

- omap-dma.c and omap-pcm.c can test the arch locally as omap1 and omap2 cannot be compiled together because of conflicting compiler flags

Cc Deepak Saxena <[email protected]>
Cc Matt Mackall <[email protected]>
Cc Herbert Xu <[email protected]>
Cc David S. Miller <[email protected]>
Cc Venkatraman S <[email protected]>
Cc Chris Ball <[email protected]>
Cc Vinod Koul <[email protected]>
Cc Dan Williams <[email protected]>
Cc Peter Ujfalusi <[email protected]>
Cc Jarkko Nikula <[email protected]>
Cc Liam Girdwood <[email protected]>
Cc Mark Brown <[email protected]>
Cc linux-crypto at vger.kernel.org
Cc linux-mmc at vger.kernel.org
Cc alsa-devel at alsa-project.org
Cc linux-kernel at vger.kernel.org
---
 drivers/char/hw_random/omap-rng.c |    2 --
 drivers/crypto/omap-aes.c         |    6 ------
 drivers/crypto/omap-sham.c        |    8 --------
 drivers/dma/omap-dma.c            |    9 +++++++--
 drivers/mmc/host/omap_hsmmc.c     |    1 -
 sound/soc/omap/omap-pcm.c         |    9 +++++++--
 6 files changed, 14 insertions(+), 21 deletions(-)
drivers/char/hw_random/omap-rng.c +0 -2
index a5effd8..45e467d 100644
@@ -27,8 +27,6 @@
 
 #include <asm/io.h>
 
-#include <plat/cpu.h>
-
 #define RNG_OUT_REG		0x00		/* Output register */
 #define RNG_STAT_REG		0x04		/* Status register
 							[0] = STAT_BUSY */
drivers/crypto/omap-aes.c +0 -6
index 3e61feb..649a146 100644
@@ -29,7 +29,6 @@
 #include <crypto/scatterwalk.h>
 #include <crypto/aes.h>
 
-#include <plat/cpu.h>
 #include <plat-omap/dma-omap.h>
 
 /* OMAP TRM gives bitfields as start:end, where start is the higher bit
@@ -941,11 +940,6 @@ static int __init omap_aes_mod_init(void)
 {
 	pr_info("loading %s driver\n", "omap-aes");
 
-	if (!cpu_class_is_omap2() || omap_type() != OMAP2_DEVICE_TYPE_SEC) {
-		pr_err("Unsupported cpu\n");
-		return -ENODEV;
-	}
-
 	return  platform_driver_register(&omap_aes_driver);
 }
 
drivers/crypto/omap-sham.c +0 -8
index 6d79695..d76fe06 100644
@@ -37,7 +37,6 @@
 #include <crypto/hash.h>
 #include <crypto/internal/hash.h>
 
-#include <plat/cpu.h>
 #include <plat-omap/dma-omap.h>
 #include <mach/irqs.h>
 
@@ -1289,13 +1288,6 @@ static int __init omap_sham_mod_init(void)
 {
 	pr_info("loading %s driver\n", "omap-sham");
 
-	if (!cpu_class_is_omap2() ||
-		(omap_type() != OMAP2_DEVICE_TYPE_SEC &&
-			omap_type() != OMAP2_DEVICE_TYPE_EMU)) {
-		pr_err("Unsupported cpu\n");
-		return -ENODEV;
-	}
-
 	return platform_driver_register(&omap_sham_driver);
 }
 
drivers/dma/omap-dma.c +7 -2
index 0b4fa50..56d9253 100644
@@ -19,9 +19,14 @@
 
 #include "virt-dma.h"
 
-#include <plat/cpu.h>
 #include <plat-omap/dma-omap.h>
 
+#ifdef CONFIG_ARCH_OMAP2PLUS
+#define dma_omap2plus()	1
+#else
+#define dma_omap2plus()	0
+#endif
+
 struct omap_dmadev {
 	struct dma_device ddev;
 	spinlock_t lock;
@@ -438,7 +443,7 @@ static struct dma_async_tx_descriptor *omap_dma_prep_dma_cyclic(
 		omap_disable_dma_irq(c->dma_ch, OMAP_DMA_BLOCK_IRQ);
 	}
 
-	if (!cpu_class_is_omap1()) {
+	if (dma_omap2plus()) {
 		omap_set_dma_src_burst_mode(c->dma_ch, OMAP_DMA_DATA_BURST_16);
 		omap_set_dma_dest_burst_mode(c->dma_ch, OMAP_DMA_DATA_BURST_16);
 	}
drivers/mmc/host/omap_hsmmc.c +0 -1
index 85b164e..24df035 100644
@@ -40,7 +40,6 @@
 #include <linux/pm_runtime.h>
 #include <linux/platform_data/mmc-omap.h>
 #include <mach/hardware.h>
-#include <plat/cpu.h>
 
 /* OMAP HSMMC Host Controller Registers */
 #define OMAP_HSMMC_SYSSTATUS	0x0014
sound/soc/omap/omap-pcm.c +7 -2
index 340874e..52977aa 100644
@@ -32,9 +32,14 @@
 #include <sound/dmaengine_pcm.h>
 #include <sound/soc.h>
 
-#include <plat/cpu.h>
 #include "omap-pcm.h"
 
+#ifdef CONFIG_ARCH_OMAP1
+#define pcm_omap1510()	cpu_is_omap1510()
+#else
+#define pcm_omap1510()	0
+#endif
+
 static const struct snd_pcm_hardware omap_pcm_hardware = {
 	.info			= SNDRV_PCM_INFO_MMAP |
 				  SNDRV_PCM_INFO_MMAP_VALID |
@@ -159,7 +164,7 @@ static snd_pcm_uframes_t omap_pcm_pointer(struct snd_pcm_substream *substream)
 {
 	snd_pcm_uframes_t offset;
 
-	if (cpu_is_omap1510())
+	if (pcm_omap1510())
 		offset = snd_dmaengine_pcm_pointer_no_residue(substream);
 	else
 		offset = snd_dmaengine_pcm_pointer(substream);
author maintainer
#8 lore raw

PATCH 2/2 ARM: OMAP: Split plat/cpu.h into local soc.h for mach-omap1 and mach-omap2

In reply to Tony Lindgren

We want to remove plat/cpu.h. To do this, let's first split it to private soc.h to mach-omap1 and mach-omap2. We have to keep plat/cpu.h around until the remaining drivers are fixed, so let's include the local soc.h in plat/cpu.h and print a warning for drivers still including plat/cpu.h.

Once the drivers are fixed not to include plat/cpu.h, we can remove the file (and the warning).

This is needed for the ARM common zImage support.

---
 arch/arm/mach-omap1/clock.c                 |    2 
 arch/arm/mach-omap1/clock_data.c            |    2 
 arch/arm/mach-omap1/i2c.c                   |    2 
 arch/arm/mach-omap1/id.c                    |    2 
 arch/arm/mach-omap1/include/mach/hardware.h |    2 
 arch/arm/mach-omap1/include/mach/memory.h   |    2 
 arch/arm/mach-omap1/irq.c                   |    2 
 arch/arm/mach-omap1/mcbsp.c                 |    2 
 arch/arm/mach-omap1/soc.h                   |  229 +++++++++++
 arch/arm/mach-omap2/board-3430sdp.c         |    1 
 arch/arm/mach-omap2/board-flash.c           |    2 
 arch/arm/mach-omap2/board-omap3beagle.c     |    1 
 arch/arm/mach-omap2/board-omap3evm.c        |    1 
 arch/arm/mach-omap2/board-zoom-display.c    |    1 
 arch/arm/mach-omap2/clock33xx_data.c        |    2 
 arch/arm/mach-omap2/clockdomain.c           |    1 
 arch/arm/mach-omap2/clockdomain.h           |    1 
 arch/arm/mach-omap2/clockdomain2xxx_3xxx.c  |    2 
 arch/arm/mach-omap2/clockdomains2420_data.c |    1 
 arch/arm/mach-omap2/clockdomains2430_data.c |    1 
 arch/arm/mach-omap2/clockdomains3xxx_data.c |    1 
 arch/arm/mach-omap2/common.h                |    1 
 arch/arm/mach-omap2/display.c               |    1 
 arch/arm/mach-omap2/dma.c                   |    1 
 arch/arm/mach-omap2/gpmc.c                  |    1 
 arch/arm/mach-omap2/hsmmc.c                 |    1 
 arch/arm/mach-omap2/i2c.c                   |    1 
 arch/arm/mach-omap2/mux.c                   |    1 
 arch/arm/mach-omap2/omap-mpuss-lowpower.c   |    1 
 arch/arm/mach-omap2/omap_hwmod.h            |    1 
 arch/arm/mach-omap2/omap_hwmod_33xx_data.c  |    1 
 arch/arm/mach-omap2/omap_twl.c              |    1 
 arch/arm/mach-omap2/opp3xxx_data.c          |    1 
 arch/arm/mach-omap2/pm-debug.c              |    1 
 arch/arm/mach-omap2/pm.c                    |    1 
 arch/arm/mach-omap2/pm24xx.c                |    1 
 arch/arm/mach-omap2/pm34xx.c                |    1 
 arch/arm/mach-omap2/pm44xx.c                |    1 
 arch/arm/mach-omap2/pmu.c                   |    1 
 arch/arm/mach-omap2/powerdomain.h           |    2 
 arch/arm/mach-omap2/powerdomains2xxx_data.c |    1 
 arch/arm/mach-omap2/prcm.c                  |    1 
 arch/arm/mach-omap2/serial.c                |    1 
 arch/arm/mach-omap2/soc.h                   |  468 ++++++++++++++++++++++
 arch/arm/mach-omap2/sr_device.c             |    2 
 arch/arm/mach-omap2/usb-host.c              |    1 
 arch/arm/mach-omap2/usb-musb.c              |    3 
 arch/arm/plat-omap/dma.c                    |    4 
 arch/arm/plat-omap/i2c.c                    |    4 
 arch/arm/plat-omap/include/plat/cpu.h       |  562 ---------------------------
 arch/arm/plat-omap/sram.c                   |    3 
 51 files changed, 749 insertions(+), 581 deletions(-)
 create mode 100644 arch/arm/mach-omap1/soc.h
arch/arm/mach-omap1/clock.c +1 -1
index 4c895ef..9e74aa6 100644
@@ -22,7 +22,7 @@
 
 #include <asm/mach-types.h>
 
-#include <plat/cpu.h>
+#include "soc.h"
 #include <plat/usb.h>
 
 #include <mach/hardware.h>
arch/arm/mach-omap1/clock_data.c +1 -1
index c78fb91..28aea55 100644
@@ -22,7 +22,7 @@
 
 #include <asm/mach-types.h>  /* for machine_is_* */
 
-#include <plat/cpu.h>
+#include "soc.h"
 
 #include <mach/hardware.h>
 #include <mach/usb.h>   /* for OTG_BASE */
arch/arm/mach-omap1/i2c.c +1 -1
index a6f465a..32bcbb8 100644
@@ -21,7 +21,7 @@
 
 #include <linux/i2c-omap.h>
 #include <mach/mux.h>
-#include <plat/cpu.h>
+#include "soc.h"
 
 #include "../plat-omap/i2c.h"
 
arch/arm/mach-omap1/id.c +1 -1
index a1b846a..52de382 100644
@@ -17,7 +17,7 @@
 #include <linux/io.h>
 #include <asm/system_info.h>
 
-#include <plat/cpu.h>
+#include "soc.h"
 
 #include <mach/hardware.h>
 
arch/arm/mach-omap1/include/mach/hardware.h +1 -1
index 2a4eb19..dc3237b 100644
@@ -39,7 +39,7 @@
 #include <asm/sizes.h>
 #ifndef __ASSEMBLER__
 #include <asm/types.h>
-#include <plat/cpu.h>
+#include "../../mach-omap1/soc.h"
 
 /*
  * NOTE: Please use ioremap + __raw_read/write where possible instead of these
arch/arm/mach-omap1/include/mach/memory.h +1 -1
index 901082d..351ae4f 100644
@@ -19,7 +19,7 @@
  * because of the strncmp().
  */
 #if defined(CONFIG_ARCH_OMAP15XX) && !defined(__ASSEMBLER__)
-#include <plat/cpu.h>
+#include "../../mach-omap1/soc.h"
 
 /*
  * OMAP-1510 Local Bus address offset
arch/arm/mach-omap1/irq.c +1 -1
index 6995fb6..122ef67 100644
@@ -45,7 +45,7 @@
 #include <asm/irq.h>
 #include <asm/mach/irq.h>
 
-#include <plat/cpu.h>
+#include "soc.h"
 
 #include <mach/hardware.h>
 
arch/arm/mach-omap1/mcbsp.c +1 -1
index 3d461e1..c6d8fdf 100644
@@ -21,7 +21,7 @@
 
 #include <plat-omap/dma-omap.h>
 #include <mach/mux.h>
-#include <plat/cpu.h>
+#include "soc.h"
 #include <linux/platform_data/asoc-ti-mcbsp.h>
 
 #include <mach/irqs.h>
arch/arm/mach-omap1/soc.h new file +229 -0

229 lines not on this page · raw message

arch/arm/mach-omap2/board-3430sdp.c +1 -0
index 2abbd6a..69f980e 100644
@@ -39,6 +39,7 @@
 
 #include "gpmc-smc91x.h"
 
+#include "soc.h"
 #include "board-flash.h"
 #include "mux.h"
 #include "sdram-qimonda-hyb18m512160af-6.h"
arch/arm/mach-omap2/board-flash.c +1 -1
index 42c4b4e..a544c3a 100644
@@ -17,11 +17,11 @@
 #include <linux/mtd/physmap.h>
 #include <linux/io.h>
 
-#include <plat/cpu.h>
 #include <plat/gpmc.h>
 #include <linux/platform_data/mtd-nand-omap2.h>
 #include <linux/platform_data/mtd-onenand-omap2.h>
 
+#include "soc.h"
 #include "common.h"
 #include "board-flash.h"
 
arch/arm/mach-omap2/board-omap3beagle.c +1 -0
index 521244d..cb59660 100644
@@ -46,6 +46,7 @@
 #include <plat/usb.h>
 #include "omap_device.h"
 
+#include "soc.h"
 #include "mux.h"
 #include "hsmmc.h"
 #include "pm.h"
arch/arm/mach-omap2/board-omap3evm.c +1 -0
index a3959de..aa3c9a3 100644
@@ -52,6 +52,7 @@
 #include <video/omapdss.h>
 #include <video/omap-panel-tfp410.h>
 
+#include "soc.h"
 #include "mux.h"
 #include "sdram-micron-mt46h32m32lf-6.h"
 #include "hsmmc.h"
arch/arm/mach-omap2/board-zoom-display.c +1 -0
index 230cb33..1c7c834 100644
@@ -18,6 +18,7 @@
 #include <video/omapdss.h>
 #include "board-zoom.h"
 
+#include "soc.h"
 #include "common.h"
 
 #define LCD_PANEL_RESET_GPIO_PROD	96
arch/arm/mach-omap2/clock33xx_data.c +1 -1
index 8bb21ec..fce6d7c 100644
@@ -18,7 +18,7 @@
 #include <linux/list.h>
 #include <linux/clk.h>
 
-#include "am33xx.h"
+#include "soc.h"
 #include "iomap.h"
 #include "control.h"
 #include "clock.h"
arch/arm/mach-omap2/clockdomain.c +1 -0
index 32dbcbc..467567a 100644
@@ -27,6 +27,7 @@
 
 #include <linux/bitops.h>
 
+#include "soc.h"
 #include "clock.h"
 #include "clockdomain.h"
 
arch/arm/mach-omap2/clockdomain.h +0 -1
index 53e8ba0..bc42446 100644
@@ -20,7 +20,6 @@
 #include "powerdomain.h"
 #include "clock.h"
 #include "omap_hwmod.h"
-#include <plat/cpu.h>
 
 /*
  * Clockdomain flags
arch/arm/mach-omap2/clockdomain2xxx_3xxx.c +2 -0
index 9a7792a..d60bf11 100644
@@ -14,6 +14,8 @@
 
 #include <linux/types.h>
 #include <plat/prcm.h>
+
+#include "soc.h"
 #include "prm.h"
 #include "prm2xxx_3xxx.h"
 #include "cm.h"
arch/arm/mach-omap2/clockdomains2420_data.c +1 -0
index 5c74185..7e76bec 100644
@@ -35,6 +35,7 @@
 #include <linux/kernel.h>
 #include <linux/io.h>
 
+#include "soc.h"
 #include "clockdomain.h"
 #include "prm2xxx_3xxx.h"
 #include "cm2xxx_3xxx.h"
arch/arm/mach-omap2/clockdomains2430_data.c +1 -0
index f096175..b923007 100644
@@ -35,6 +35,7 @@
 #include <linux/kernel.h>
 #include <linux/io.h>
 
+#include "soc.h"
 #include "clockdomain.h"
 #include "prm2xxx_3xxx.h"
 #include "cm2xxx_3xxx.h"
arch/arm/mach-omap2/clockdomains3xxx_data.c +1 -0
index 933a35c..e6b91e5 100644
@@ -33,6 +33,7 @@
 #include <linux/kernel.h>
 #include <linux/io.h>
 
+#include "soc.h"
 #include "clockdomain.h"
 #include "prm2xxx_3xxx.h"
 #include "cm2xxx_3xxx.h"
arch/arm/mach-omap2/common.h +0 -1
index e328e07..c85022a 100644
@@ -34,7 +34,6 @@
 
 #include <asm/proc-fns.h>
 
-#include <plat/cpu.h>
 #include "../plat-omap/common.h"
 
 #include "i2c.h"
arch/arm/mach-omap2/display.c +1 -0
index bfa3e4c..a6b2c09 100644
@@ -30,6 +30,7 @@
 #include "omap-pm.h"
 #include "common.h"
 
+#include "soc.h"
 #include "iomap.h"
 #include "mux.h"
 #include "control.h"
arch/arm/mach-omap2/dma.c +1 -0
index aa4a2d6..2ed4ac1 100644
@@ -28,6 +28,7 @@
 #include <linux/init.h>
 #include <linux/device.h>
 
+#include "soc.h"
 #include "omap_hwmod.h"
 #include "omap_device.h"
 #include <plat-omap/dma-omap.h>
arch/arm/mach-omap2/gpmc.c +0 -1
index a63ebc7..a3457f7 100644
@@ -29,7 +29,6 @@
 #include <asm/mach-types.h>
 #include <plat/gpmc.h>
 
-#include <plat/cpu.h>
 #include <plat/gpmc.h>
 #include <plat/sdrc.h>
 #include "omap_device.h"
arch/arm/mach-omap2/hsmmc.c +1 -0
index 1d5957e..435ba26 100644
@@ -17,6 +17,7 @@
 #include <mach/hardware.h>
 #include <linux/platform_data/gpio-omap.h>
 
+#include "soc.h"
 #include "mmc.h"
 #include "omap-pm.h"
 #include "omap_device.h"
arch/arm/mach-omap2/i2c.c +1 -0
index 8b39937..ad55b94 100644
@@ -19,6 +19,7 @@
  *
  */
 
+#include "soc.h"
 #include "common.h"
 #include "omap_hwmod.h"
 #include "omap_device.h"
arch/arm/mach-omap2/mux.c +1 -0
index 6dd62f8..7a7e97f 100644
@@ -38,6 +38,7 @@
 
 #include "omap_hwmod.h"
 
+#include "soc.h"
 #include "control.h"
 #include "mux.h"
 #include "prm.h"
arch/arm/mach-omap2/omap-mpuss-lowpower.c +1 -0
index ff4e6a0..3f5fd7e 100644
@@ -50,6 +50,7 @@
 #include <asm/suspend.h>
 #include <asm/hardware/cache-l2x0.h>
 
+#include "soc.h"
 #include "common.h"
 #include "omap44xx.h"
 #include "omap4-sar-layout.h"
arch/arm/mach-omap2/omap_hwmod.h +0 -1
index b3349f7..87b59b4 100644
@@ -35,7 +35,6 @@
 #include <linux/list.h>
 #include <linux/ioport.h>
 #include <linux/spinlock.h>
-#include <plat/cpu.h>
 
 struct omap_device;
 
arch/arm/mach-omap2/omap_hwmod_33xx_data.c +0 -1
index 87cba19..46b2797 100644
@@ -17,7 +17,6 @@
 #include <linux/i2c-omap.h>
 
 #include "omap_hwmod.h"
-#include <plat/cpu.h>
 #include <linux/platform_data/gpio-omap.h>
 #include <linux/platform_data/spi-omap2-mcspi.h>
 #include <plat-omap/dma-omap.h>
arch/arm/mach-omap2/omap_twl.c +1 -0
index f515a1a..2bf35dc 100644
@@ -18,6 +18,7 @@
 #include <linux/kernel.h>
 #include <linux/i2c/twl.h>
 
+#include "soc.h"
 #include "voltage.h"
 
 #include "pm.h"
arch/arm/mach-omap2/opp3xxx_data.c +1 -0
index 75cef5f..62772e0 100644
@@ -19,6 +19,7 @@
  */
 #include <linux/module.h>
 
+#include "soc.h"
 #include "control.h"
 #include "omap_opp_data.h"
 #include "pm.h"
arch/arm/mach-omap2/pm-debug.c +1 -0
index 1c45ff2..2071212 100644
@@ -33,6 +33,7 @@
 #include <plat/dmtimer.h>
 #include "omap-pm.h"
 
+#include "soc.h"
 #include "cm2xxx_3xxx.h"
 #include "prm2xxx_3xxx.h"
 #include "pm.h"
arch/arm/mach-omap2/pm.c +1 -0
index 29c82ad..2af95a4 100644
@@ -23,6 +23,7 @@
 #include "omap_device.h"
 #include "common.h"
 
+#include "soc.h"
 #include "prcm-common.h"
 #include "voltage.h"
 #include "powerdomain.h"
arch/arm/mach-omap2/pm24xx.c +1 -0
index be8989e..6d17e044 100644
@@ -40,6 +40,7 @@
 
 #include "../plat-omap/sram.h"
 
+#include "soc.h"
 #include "common.h"
 #include "clock.h"
 #include "prm2xxx_3xxx.h"
arch/arm/mach-omap2/pm34xx.c +1 -0
index 87b9080..621d885 100644
@@ -44,6 +44,7 @@
 
 #include "../plat-omap/sram.h"
 
+#include "soc.h"
 #include "common.h"
 #include "cm2xxx_3xxx.h"
 #include "cm-regbits-34xx.h"
arch/arm/mach-omap2/pm44xx.c +1 -0
index 04922d1..7da75ae 100644
@@ -18,6 +18,7 @@
 #include <linux/slab.h>
 #include <asm/system_misc.h>
 
+#include "soc.h"
 #include "common.h"
 #include "clockdomain.h"
 #include "powerdomain.h"
arch/arm/mach-omap2/pmu.c +1 -0
index 98c5969..3cf79b5 100644
@@ -15,6 +15,7 @@
 
 #include <asm/pmu.h>
 
+#include "soc.h"
 #include "omap_hwmod.h"
 #include "omap_device.h"
 
arch/arm/mach-omap2/powerdomain.h +0 -2
index baee906..5277d56eb 100644
@@ -22,8 +22,6 @@
 
 #include <linux/atomic.h>
 
-#include <plat/cpu.h>
-
 #include "voltage.h"
 
 /* Powerdomain basic power states */
arch/arm/mach-omap2/powerdomains2xxx_data.c +1 -0
index 2385c1f..ba520d4 100644
@@ -14,6 +14,7 @@
 #include <linux/kernel.h>
 #include <linux/init.h>
 
+#include "soc.h"
 #include "powerdomain.h"
 #include "powerdomains2xxx_3xxx_data.h"
 
arch/arm/mach-omap2/prcm.c +1 -0
index 0f51e03..cff270a 100644
@@ -28,6 +28,7 @@
 #include "common.h"
 #include <plat/prcm.h>
 
+#include "soc.h"
 #include "clock.h"
 #include "clock2xxx.h"
 #include "cm2xxx_3xxx.h"
arch/arm/mach-omap2/serial.c +1 -0
index d157584..35684d4 100644
@@ -35,6 +35,7 @@
 #include "omap_device.h"
 #include "omap-pm.h"
 
+#include "soc.h"
 #include "prm2xxx_3xxx.h"
 #include "pm.h"
 #include "cm2xxx_3xxx.h"
arch/arm/mach-omap2/soc.h +467 -1

474 lines not on this page · raw message

arch/arm/mach-omap2/sr_device.c +1 -1
index 692b4eb..96c67cd 100644
@@ -23,8 +23,8 @@
 #include <linux/slab.h>
 #include <linux/io.h>
 
+#include "soc.h"
 #include "omap_device.h"
-
 #include "voltage.h"
 #include "control.h"
 #include "pm.h"
arch/arm/mach-omap2/usb-host.c +1 -0
index 84d8228..4fe6712 100644
@@ -26,6 +26,7 @@
 #include <asm/io.h>
 
 #include <plat/usb.h>
+#include "soc.h"
 #include "omap_device.h"
 
 #include "mux.h"
arch/arm/mach-omap2/usb-musb.c +1 -2
index 24f300a..07f385a 100644
@@ -28,8 +28,7 @@
 #include <plat/usb.h>
 #include "omap_device.h"
 
-#include "am35xx.h"
-
+#include "soc.h"
 #include "mux.h"
 
 static struct musb_hdrc_config musb_config = {
arch/arm/plat-omap/dma.c +3 -1
index b4dcd92..49803cc 100644
@@ -36,9 +36,11 @@
 #include <linux/slab.h>
 #include <linux/delay.h>
 
-#include <plat/cpu.h>
 #include <plat-omap/dma-omap.h>
 
+#include "../mach-omap1/soc.h"
+#include "../mach-omap2/soc.h"
+
 /*
  * MAX_LOGICAL_DMA_CH_COUNT: the maximum number of logical DMA
  * channels that an instance of the SDMA IP block can support.  Used
arch/arm/plat-omap/i2c.c +3 -1
index 37597a6..be6deb7 100644
@@ -32,7 +32,9 @@
 #include <linux/clk.h>
 
 #include <mach/irqs.h>
-#include <plat/cpu.h>
+
+#include "../mach-omap1/soc.h"
+#include "../mach-omap2/soc.h"
 
 #include "i2c.h"
 
arch/arm/plat-omap/include/plat/cpu.h +5 -557

575 lines not on this page · raw message

arch/arm/plat-omap/sram.c +2 -1
index dc2d800..70dcc22 100644
@@ -25,7 +25,8 @@
 
 #include <asm/mach/map.h>
 
-#include <plat/cpu.h>
+#include "../mach-omap1/soc.h"
+#include "../mach-omap2/soc.h"
 
 #include "sram.h"
 
author maintainer
#2 lore raw

Re: [PATCH 1/2] ARM: OMAP: Trivial driver changes to remove include plat/cpu.h

In reply to Tony Lindgren
Quoted 24 lines · Tony Lindgren

Drivers should not use cpu_is_omap or cpu_class_is_omap macros, they should be private to the platform init code. And we'll be removing plat/cpu.h and only have a private soc.h for the arch/arm/*omap* code.

This patch is intended as preparation for the core omap changes and removes the need to include plat/cpu.h from several drivers. This is needed for the ARM common zImage support.

These changes are OK to do because:

- omap-rng.c and hsmmc.c don't need plat/cpu.h

- omap-aes.c and omap-sham.c get the proper platform_data passed to them so they don't need extra checks in the driver

- omap-dma.c and omap-pcm.c can test the arch locally as omap1 and omap2 cannot be compiled together because of conflicting compiler flags

drivers/mmc/host/omap_hsmmc.c line 45

Quoted 7 lines
drivers/mmc/host/omap_hsmmc.c +0 -1
@@ -40,7 +40,6 @@
 #include <linux/pm_runtime.h>
 #include <linux/platform_data/mmc-omap.h>
 #include <mach/hardware.h>
-#include <plat/cpu.h>
 
 /* OMAP HSMMC Host Controller Registers */
 #define OMAP_HSMMC_SYSSTATUS	0x0014

Actually I'll fold this mmc change into an earlier patch I've posted as "ARM: OMAP: Split plat/mmc.h into local headers and platform_data".

Regards,

Tony

Acked-by on v1 1/2
#3 lore raw

Re: [PATCH 1/2] ARM: OMAP: Trivial driver changes to remove include plat/cpu.h

In reply to Tony Lindgren
Quoted 3 lines · On Mon, 08 Oct 2012 10:35:57 -0700 Tony Lindgren <[email protected]> wrote:

- omap-dma.c and omap-pcm.c can test the arch locally as omap1 and omap2 cannot be compiled together because of conflicting compiler flags

...

Quoted 1 line
 sound/soc/omap/omap-pcm.c         |    9 +++++++--

Build tested above for omap1 and omap2+.

Acked-by on v1 1/2
#4 lore raw

Re: [PATCH 1/2] ARM: OMAP: Trivial driver changes to remove include plat/cpu.h

In reply to Tony Lindgren
Quoted 5 lines · Tony Lindgren

- omap-dma.c and omap-pcm.c can test the arch locally as omap1 and omap2 cannot be compiled together because of conflicting compiler flags

 sound/soc/omap/omap-pcm.c         |    9 +++++++--

Tony: is this going to be included in 3.7?

author maintainer
#5 lore raw

Re: [PATCH 1/2] ARM: OMAP: Trivial driver changes to remove include plat/cpu.h

Quoted 9 lines · Péter Ujfalusi
Quoted 5 lines · Tony Lindgren

- omap-dma.c and omap-pcm.c can test the arch locally as omap1 and omap2 cannot be compiled together because of conflicting compiler flags

 sound/soc/omap/omap-pcm.c         |    9 +++++++--

Tony: is this going to be included in 3.7?

Hmm I guess we could try to get this out of the way to cut down the dependencies. Let's if maintainers of the other affected drivers this is OK for the -rc series.

Regards,

Tony

author maintainer
#6 lore raw

Re: [PATCH 1/2] ARM: OMAP: Trivial driver changes to remove include plat/cpu.h

Quoted 7 lines · Tony Lindgren
Quoted 6 lines · P?ter Ujfalusi
Quoted 3 lines · Tony Lindgren

- omap-dma.c and omap-pcm.c can test the arch locally as omap1 and omap2 cannot be compiled together because of conflicting compiler flags

Quoted 8 lines
Quoted 3 lines
Quoted 1 line
 sound/soc/omap/omap-pcm.c         |    9 +++++++--

Tony: is this going to be included in 3.7?

Hmm I guess we could try to get this out of the way to cut down the dependencies. Let's if maintainers of the other affected drivers this is OK for the -rc series.

It seems that nobody needs these until for v3.8, so I'll be applying this into omap-for-v3.8/cleanup-headers-prepare branch soon.

Anybody else care to ack?

Regards,

Tony

author maintainer
#7 lore raw

Re: [PATCH 1/2] ARM: OMAP: Trivial driver changes to remove include plat/cpu.h

Quoted 17 lines · Tony Lindgren
Quoted 7 lines · Tony Lindgren
Quoted 6 lines · Péter Ujfalusi
Quoted 3 lines · Tony Lindgren

- omap-dma.c and omap-pcm.c can test the arch locally as omap1 and omap2 cannot be compiled together because of conflicting compiler flags

Quoted 8 lines
Quoted 3 lines
Quoted 1 line
 sound/soc/omap/omap-pcm.c         |    9 +++++++--

Tony: is this going to be included in 3.7?

Hmm I guess we could try to get this out of the way to cut down the dependencies. Let's if maintainers of the other affected drivers this is OK for the -rc series.

Quoted 5 lines

It seems that nobody needs these until for v3.8, so I'll be applying this into omap-for-v3.8/cleanup-headers-prepare branch soon.

Anybody else care to ack?

OK pushed out now with just that patch in the branch in case driver branches need to merge it in too to avoid conflicts.

Regards,

Tony