]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
OMAP: control: move plat-omap/control.h to mach-omap2/control.h
authorPaul Walmsley <paul@pwsan.com>
Fri, 8 Oct 2010 17:40:20 +0000 (11:40 -0600)
committerPaul Walmsley <paul@pwsan.com>
Fri, 8 Oct 2010 17:40:20 +0000 (11:40 -0600)
Only OMAP2+ platforms have the System Control Module (SCM) IP block.
In the past, we've kept the SCM header file in plat-omap.  This has
led to abuse - device drivers including it; includes being added that
create implicit dependencies on OMAP2+ builds; etc.

In response, move the SCM headers into mach-omap2/.

As part of this, remove the direct SCM access from the OMAP UDC
driver.  It was clearly broken.  The UDC code needs an indepth review for
use on OMAP2+ chips.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Cory Maccarrone <darkstar6262@gmail.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
31 files changed:
arch/arm/mach-omap2/board-3430sdp.c
arch/arm/mach-omap2/board-4430sdp.c
arch/arm/mach-omap2/board-am3517evm.c
arch/arm/mach-omap2/board-apollon.c
arch/arm/mach-omap2/board-cm-t3517.c
arch/arm/mach-omap2/board-h4.c
arch/arm/mach-omap2/board-ldp.c
arch/arm/mach-omap2/board-omap3logic.c
arch/arm/mach-omap2/board-omap4panda.c
arch/arm/mach-omap2/clock2420_data.c
arch/arm/mach-omap2/clock2430_data.c
arch/arm/mach-omap2/clock3xxx_data.c
arch/arm/mach-omap2/clock44xx_data.c
arch/arm/mach-omap2/common.c
arch/arm/mach-omap2/control.c
arch/arm/mach-omap2/control.h [moved from arch/arm/plat-omap/include/plat/control.h with 97% similarity]
arch/arm/mach-omap2/cpuidle34xx.c
arch/arm/mach-omap2/devices.c
arch/arm/mach-omap2/hsmmc.c
arch/arm/mach-omap2/id.c
arch/arm/mach-omap2/mcbsp.c
arch/arm/mach-omap2/mux.c
arch/arm/mach-omap2/pm24xx.c
arch/arm/mach-omap2/pm34xx.c
arch/arm/mach-omap2/prcm.c
arch/arm/mach-omap2/serial.c
arch/arm/mach-omap2/sleep34xx.S
arch/arm/mach-omap2/usb-fs.c
arch/arm/plat-omap/include/plat/omap-serial.h
arch/arm/plat-omap/mcbsp.c
drivers/usb/gadget/omap_udc.c

index 9ba2ee246a75db90e01b2e0546153eccacbfff02..88b5734d0bb2e7fb8e9b7ccf8f4ea216b0b94804 100644 (file)
@@ -39,7 +39,6 @@
 #include <plat/gpmc.h>
 #include <plat/display.h>
 
-#include <plat/control.h>
 #include <plat/gpmc-smc91x.h>
 
 #include "board-flash.h"
@@ -47,6 +46,7 @@
 #include "sdram-qimonda-hyb18m512160af-6.h"
 #include "hsmmc.h"
 #include "pm.h"
+#include "control.h"
 
 #define CONFIG_DISABLE_HFCLK 1
 
index 1d7d70ae7cb8e4eebb13afff65e4f0789952a113..aafd30680fc8b115c2d0011f1388d880df6f0e6c 100644 (file)
 
 #include <plat/board.h>
 #include <plat/common.h>
-#include <plat/control.h>
 #include <plat/usb.h>
 #include <plat/mmc.h>
 
 #include "hsmmc.h"
 #include "timer-gp.h"
+#include "control.h"
 
 #define ETH_KS8851_IRQ                 34
 #define ETH_KS8851_POWER_ON            48
index b091741500ded9ab4c8a27c05cfc7157d6c9459a..fada04ea1d5cf3a2356753063d11318c8aebd8fd 100644 (file)
 
 #include <plat/board.h>
 #include <plat/common.h>
-#include <plat/control.h>
 #include <plat/usb.h>
 #include <plat/display.h>
 
 #include "mux.h"
+#include "control.h"
 
 #define AM35XX_EVM_PHY_MASK            (0xF)
 #define AM35XX_EVM_MDIO_FREQUENCY      (1000000)
index c6421a72514a2a4e776aab63a2e1107434c3ffc2..102719cb052ba2ab239523810f8a4bd2a4d68603 100644 (file)
@@ -39,9 +39,9 @@
 #include <plat/board.h>
 #include <plat/common.h>
 #include <plat/gpmc.h>
-#include <plat/control.h>
 
 #include "mux.h"
+#include "control.h"
 
 /* LED & Switch macros */
 #define LED0_GPIO13            13
index 1115b8ab5e1dea3cdf17445150afc1e0a23dcd45..c49319ff5c36aff1043e24200d14680513fe5174 100644 (file)
@@ -40,7 +40,6 @@
 
 #include <plat/board.h>
 #include <plat/common.h>
-#include <plat/control.h>
 #include <plat/usb.h>
 #include <plat/nand.h>
 #include <plat/gpmc.h>
@@ -48,6 +47,7 @@
 #include <mach/am35xx.h>
 
 #include "mux.h"
+#include "control.h"
 
 #if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE)
 static struct gpio_led cm_t3517_leds[] = {
index e09bd686389f32dc385da26db744efbecc7fe5a7..08492a34d3109ac3c9bb926a916a6d0f24108c08 100644 (file)
@@ -31,7 +31,6 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 
-#include <plat/control.h>
 #include <mach/gpio.h>
 #include <plat/usb.h>
 #include <plat/board.h>
@@ -42,6 +41,7 @@
 #include <plat/gpmc.h>
 
 #include "mux.h"
+#include "control.h"
 
 #define H4_FLASH_CS    0
 #define H4_SMC91X_CS   1
index 7c1e6ad3972e93332940ae32df26f0719e35bd9b..8495f37d27560afa7d769cba08aa29b5219f2591 100644 (file)
 #include <mach/board-zoom.h>
 
 #include <asm/delay.h>
-#include <plat/control.h>
 #include <plat/usb.h>
 
 #include "board-flash.h"
 #include "mux.h"
 #include "hsmmc.h"
+#include "control.h"
 
 #define LDP_SMSC911X_CS                1
 #define LDP_SMSC911X_GPIO      152
index 3151cf269a59bc2157f499954bf24eb155942037..44ff6744ef596d764c87ac8569f1306ae230be51 100644 (file)
@@ -36,6 +36,7 @@
 #include "mux.h"
 #include "hsmmc.h"
 #include "timer-gp.h"
+#include "control.h"
 
 #include <plat/mux.h>
 #include <plat/board.h>
@@ -43,7 +44,6 @@
 #include <plat/gpmc-smsc911x.h>
 #include <plat/gpmc.h>
 #include <plat/sdrc.h>
-#include <plat/control.h>
 
 #define OMAP3LOGIC_SMSC911X_CS                 1
 
index 83bd1fe5e323fa173687f2c8734293e09cab5e15..992a03e248c5bb04ab3646e12f74fddb133b0698 100644 (file)
 
 #include <plat/board.h>
 #include <plat/common.h>
-#include <plat/control.h>
 #include <plat/usb.h>
 #include <plat/mmc.h>
-#include "hsmmc.h"
 #include "timer-gp.h"
 
+#include "hsmmc.h"
+#include "control.h"
 
 static struct gpio_led gpio_leds[] = {
        {
index 7086fe4fb7af70a8d15e598a2c9d51516f14dd90..21f856252ad86e3c95ac14ba75620a8385ce1676 100644 (file)
@@ -18,7 +18,6 @@
 #include <linux/list.h>
 
 #include <plat/clkdev_omap.h>
-#include <plat/control.h>
 
 #include "clock.h"
 #include "clock2xxx.h"
@@ -28,6 +27,7 @@
 #include "prm-regbits-24xx.h"
 #include "cm-regbits-24xx.h"
 #include "sdrc.h"
+#include "control.h"
 
 #define OMAP_CM_REGADDR                 OMAP2420_CM_REGADDR
 
index 454831966d338bc3d64f1e8ede2c8e25ad7e84c4..e32afcbdfb88aabdfd69979d478e6f21cce491d0 100644 (file)
@@ -18,7 +18,6 @@
 #include <linux/list.h>
 
 #include <plat/clkdev_omap.h>
-#include <plat/control.h>
 
 #include "clock.h"
 #include "clock2xxx.h"
@@ -28,6 +27,7 @@
 #include "prm-regbits-24xx.h"
 #include "cm-regbits-24xx.h"
 #include "sdrc.h"
+#include "control.h"
 
 #define OMAP_CM_REGADDR                        OMAP2430_CM_REGADDR
 
index 4ac1fb8c00147b32b11cdd8f3f7e5f597f6b3242..d85ecd5aebfd1d64358f4f91789b65c542df9c43 100644 (file)
@@ -20,7 +20,6 @@
 #include <linux/clk.h>
 #include <linux/list.h>
 
-#include <plat/control.h>
 #include <plat/clkdev_omap.h>
 
 #include "clock.h"
@@ -33,6 +32,7 @@
 #include "cm-regbits-34xx.h"
 #include "prm.h"
 #include "prm-regbits-34xx.h"
+#include "control.h"
 
 /*
  * clocks
index 67fac44cb6e64088be130aa9cbe649e259987340..1599836ba3d9ba2787aa38f4414d88b346dc37bb 100644 (file)
@@ -26,7 +26,6 @@
 #include <linux/kernel.h>
 #include <linux/list.h>
 #include <linux/clk.h>
-#include <plat/control.h>
 #include <plat/clkdev_omap.h>
 
 #include "clock.h"
@@ -35,6 +34,7 @@
 #include "cm-regbits-44xx.h"
 #include "prm.h"
 #include "prm-regbits-44xx.h"
+#include "control.h"
 
 /* Root clocks */
 
index cddc89ab7479e96a6ca87151d230e008e1a436fe..778929f7e92d37a1284900f3d9ca2a9e5e56ceb4 100644 (file)
 
 #include <plat/common.h>
 #include <plat/board.h>
-#include <plat/control.h>
 #include <plat/mux.h>
 
 #include <plat/clock.h>
 
 #include "sdrc.h"
+#include "control.h"
 
 /* Global address base setup code */
 
index 5d9b30dd6e56c2c2123f79828c02e84987358d40..1fa3294b6048b443a3b279ec8b14f78984c38246 100644 (file)
 #include <linux/io.h>
 
 #include <plat/common.h>
-#include <plat/control.h>
 #include <plat/sdrc.h>
+
 #include "cm-regbits-34xx.h"
 #include "prm-regbits-34xx.h"
 #include "cm.h"
 #include "prm.h"
 #include "sdrc.h"
 #include "pm.h"
+#include "control.h"
 
 static void __iomem *omap2_ctrl_base;
 static void __iomem *omap4_ctrl_pad_base;
similarity index 97%
rename from arch/arm/plat-omap/include/plat/control.h
rename to arch/arm/mach-omap2/control.h
index 54b0c3529c83885bc7e4744e89ab7f9258d4e37e..b6c6b7c450b303d80f20247a37904da4ed6d2666 100644 (file)
@@ -1,10 +1,10 @@
 /*
- * arch/arm/plat-omap/include/mach/control.h
+ * arch/arm/mach-omap2/control.h
  *
  * OMAP2/3/4 System Control Module definitions
  *
- * Copyright (C) 2007-2009 Texas Instruments, Inc.
- * Copyright (C) 2007-2008 Nokia Corporation
+ * Copyright (C) 2007-2010 Texas Instruments, Inc.
+ * Copyright (C) 2007-2008, 2010 Nokia Corporation
  *
  * Written by Paul Walmsley
  *
@@ -13,8 +13,8 @@
  * the Free Software Foundation.
  */
 
-#ifndef __ASM_ARCH_CONTROL_H
-#define __ASM_ARCH_CONTROL_H
+#ifndef __ARCH_ARM_MACH_OMAP2_CONTROL_H
+#define __ARCH_ARM_MACH_OMAP2_CONTROL_H
 
 #include <mach/io.h>
 #include <mach/ctrl_module_core_44xx.h>
 #define                FEAT_L2CACHE_256KB      3
 
 #define OMAP3_ISP_SHIFT                        5
-#define OMAP3_ISP_MASK                 (1<< OMAP3_ISP_SHIFT)
+#define OMAP3_ISP_MASK                 (1 << OMAP3_ISP_SHIFT)
 #define                FEAT_ISP                0
 #define                FEAT_ISP_NONE           1
 
 #define OMAP3_NEON_SHIFT               4
-#define OMAP3_NEON_MASK                        (1<< OMAP3_NEON_SHIFT)
+#define OMAP3_NEON_MASK                        (1 << OMAP3_NEON_SHIFT)
 #define                FEAT_NEON               0
 #define                FEAT_NEON_NONE          1
 
@@ -364,5 +364,5 @@ extern void omap3_control_restore_context(void);
 #endif
 #endif /* __ASSEMBLY__ */
 
-#endif /* __ASM_ARCH_CONTROL_H */
+#endif /* __ARCH_ARM_MACH_OMAP2_CONTROL_H */
 
index 703b5ec88e98af56bfbed229cbc717cf85cc5184..0d50b45d041c1d30d1f2aa1b8c84ed8ad7b1d667 100644 (file)
 #include <plat/irqs.h>
 #include <plat/powerdomain.h>
 #include <plat/clockdomain.h>
-#include <plat/control.h>
 #include <plat/serial.h>
 
 #include "pm.h"
+#include "control.h"
 
 #ifdef CONFIG_CPU_IDLE
 
index 818452ac905d5f568c896ddbd0cdec7a9a49c358..eaf37994403b4d1ae01efbe4ef883b5396d2e1d2 100644 (file)
@@ -9,7 +9,6 @@
  * (at your option) any later version.
  */
 
-#include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/platform_device.h>
@@ -23,7 +22,6 @@
 #include <asm/mach/map.h>
 #include <asm/pmu.h>
 
-#include <plat/control.h>
 #include <plat/tc.h>
 #include <plat/board.h>
 #include <mach/gpio.h>
@@ -33,6 +31,7 @@
 #include <plat/omap_device.h>
 
 #include "mux.h"
+#include "control.h"
 
 #if defined(CONFIG_VIDEO_OMAP2) || defined(CONFIG_VIDEO_OMAP2_MODULE)
 
index ab78a5a8d9b0f943b8e6358ef30d273a25e4d742..34272e4863fd9a15d54cf114152c3202d3b1bbe2 100644 (file)
 #include <linux/string.h>
 #include <linux/delay.h>
 #include <mach/hardware.h>
-#include <plat/control.h>
 #include <plat/mmc.h>
 #include <plat/omap-pm.h>
 
 #include "hsmmc.h"
+#include "control.h"
 
 #if defined(CONFIG_MMC_OMAP_HS) || defined(CONFIG_MMC_OMAP_HS_MODULE)
 
index 04a2fa240bc3b1381474966b2ce2dc3b4b9cc348..5f9086c65e48262835a39d3c7c86b000eba543dd 100644 (file)
 #include <asm/cputype.h>
 
 #include <plat/common.h>
-#include <plat/control.h>
 #include <plat/cpu.h>
 
 #include <mach/id.h>
 
+#include "control.h"
+
 static struct omap_chip_id omap_chip;
 static unsigned int omap_revision;
 
index 51abcedfde830c9ce8fb7b52e06ddc86def7fe29..eba9fa14a9debbfb212aefe11df09191989fa192 100644 (file)
@@ -22,7 +22,9 @@
 #include <plat/dma.h>
 #include <plat/cpu.h>
 #include <plat/mcbsp.h>
-#include <plat/control.h>
+
+#include "control.h"
+
 
 /* McBSP internal signal muxing functions */
 
index e33740c091be0727ac3dc91fd4bae3121a1c601f..074536ae401fa11dcf439e0abce049df9f2b406a 100644 (file)
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  *
  */
-#include <linux/module.h>
+#include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/io.h>
-#include <linux/slab.h>
-#include <linux/spinlock.h>
 #include <linux/list.h>
+#include <linux/slab.h>
 #include <linux/ctype.h>
 #include <linux/debugfs.h>
 #include <linux/seq_file.h>
@@ -36,8 +35,7 @@
 
 #include <asm/system.h>
 
-#include <plat/control.h>
-
+#include "control.h"
 #include "mux.h"
 
 #define OMAP_MUX_BASE_OFFSET           0x30    /* Offset from CTRL_BASE */
index f5c7ef95594237e33b53ed19d372d78da78b5351..a40457d81927e256ec1f6af538acf038c7e11eb1 100644 (file)
@@ -38,7 +38,6 @@
 #include <mach/irqs.h>
 #include <plat/clock.h>
 #include <plat/sram.h>
-#include <plat/control.h>
 #include <plat/dma.h>
 #include <plat/board.h>
 
@@ -48,6 +47,7 @@
 #include "cm-regbits-24xx.h"
 #include "sdrc.h"
 #include "pm.h"
+#include "control.h"
 
 #include <plat/powerdomain.h>
 #include <plat/clockdomain.h>
index e57c9aeeefe03c9343251d46c3125ab7c0607670..8c8f1acd3526f4955a91f650c2ae38d4743ebbb0 100644 (file)
@@ -32,7 +32,6 @@
 #include <plat/sram.h>
 #include <plat/clockdomain.h>
 #include <plat/powerdomain.h>
-#include <plat/control.h>
 #include <plat/serial.h>
 #include <plat/sdrc.h>
 #include <plat/prcm.h>
@@ -48,6 +47,7 @@
 #include "prm.h"
 #include "pm.h"
 #include "sdrc.h"
+#include "control.h"
 
 /* Scratchpad offsets */
 #define OMAP343X_TABLE_ADDRESS_OFFSET     0x31
index a48a1e24f42bfc06334846565b864b6d72d96a14..a51846e3a6faac854d0d9a7c692123a12e9184f4 100644 (file)
@@ -26,7 +26,6 @@
 #include <plat/common.h>
 #include <plat/prcm.h>
 #include <plat/irqs.h>
-#include <plat/control.h>
 
 #include "clock.h"
 #include "clock2xxx.h"
@@ -34,6 +33,7 @@
 #include "prm.h"
 #include "prm-regbits-24xx.h"
 #include "prm-regbits-44xx.h"
+#include "control.h"
 
 static void __iomem *prm_base;
 static void __iomem *cm_base;
index 0bcc9df0c0343d8307e2b2b7dc7622f6480dc3a5..338e46a844a4bff27b7a50a28919efac5358b56c 100644 (file)
@@ -35,7 +35,6 @@
 #include <plat/common.h>
 #include <plat/board.h>
 #include <plat/clock.h>
-#include <plat/control.h>
 #include <plat/dma.h>
 #include <plat/omap_hwmod.h>
 #include <plat/omap_device.h>
@@ -44,6 +43,7 @@
 #include "pm.h"
 #include "cm.h"
 #include "prm-regbits-34xx.h"
+#include "control.h"
 
 #define UART_OMAP_NO_EMPTY_FIFO_READ_IP_REV    0x52
 #define UART_OMAP_WER          0x17    /* Wake-up enable register */
index ba53191ae4c55bfdaf4515f4edd0a9ca67bce4b9..2fb205a7f285505b46cd4c75b113673fe352809b 100644 (file)
 #include <linux/linkage.h>
 #include <asm/assembler.h>
 #include <mach/io.h>
-#include <plat/control.h>
 
 #include "cm.h"
 #include "prm.h"
 #include "sdrc.h"
+#include "control.h"
 
 #define SDRC_SCRATCHPAD_SEM_V  0xfa00291c
 
index a216d88b04b5c4f0690a7c32b514084b78590800..1481078763b805fdba84802256f78e1a63c9b093 100644 (file)
 
 #include <asm/irq.h>
 
-#include <plat/control.h>
 #include <plat/usb.h>
 #include <plat/board.h>
 
+#include "control.h"
+#include "mux.h"
+
 #define INT_USB_IRQ_GEN                INT_24XX_USB_IRQ_GEN
 #define INT_USB_IRQ_NISO       INT_24XX_USB_IRQ_NISO
 #define INT_USB_IRQ_ISO                INT_24XX_USB_IRQ_ISO
 #define INT_USB_IRQ_HGEN       INT_24XX_USB_IRQ_HGEN
 #define INT_USB_IRQ_OTG                INT_24XX_USB_IRQ_OTG
 
-#include "mux.h"
-
 #if defined(CONFIG_ARCH_OMAP2)
 
 #ifdef CONFIG_USB_GADGET_OMAP
index 0d6f076cf74835000b57c961b9de0f9ea4227a4f..c8dae02f0704799e3a60dc5df2716ffd427b5cec 100644 (file)
@@ -20,7 +20,6 @@
 #include <linux/serial_core.h>
 #include <linux/platform_device.h>
 
-#include <plat/control.h>
 #include <plat/mux.h>
 
 #define DRIVER_NAME    "omap-hsuart"
index 09f8c287133449074da9beeed63fb3bcee9de9e8..45d99e955f7f6a02867c85eb696984543b127bf6 100644 (file)
@@ -27,7 +27,6 @@
 
 #include <plat/dma.h>
 #include <plat/mcbsp.h>
-#include <plat/control.h>
 
 #include "../mach-omap2/cm-regbits-34xx.h"
 
index f81e4f025f239fe3cfeaf4af1dd17d5c5248d7cf..7f472a57490e0ee0087c18efe68e5a72c098afa6 100644 (file)
@@ -54,7 +54,6 @@
 
 #include <plat/dma.h>
 #include <plat/usb.h>
-#include <plat/control.h>
 
 #include "omap_udc.h"
 
@@ -2309,21 +2308,12 @@ static char *trx_mode(unsigned m, int enabled)
 static int proc_otg_show(struct seq_file *s)
 {
        u32             tmp;
-       u32             trans;
-       char            *ctrl_name;
+       u32             trans = 0;
+       char            *ctrl_name = "(UNKNOWN)";
 
+       /* XXX This needs major revision for OMAP2+ */
        tmp = omap_readl(OTG_REV);
-       if (cpu_is_omap24xx()) {
-               /*
-                * REVISIT: Not clear how this works on OMAP2.  trans
-                * is ANDed to produce bits 7 and 8, which might make
-                * sense for USB_TRANSCEIVER_CTRL on OMAP1,
-                * but with CONTROL_DEVCONF, these bits have something to
-                * do with the frame adjustment counter and McBSP2.
-                */
-               ctrl_name = "control_devconf";
-               trans = omap_ctrl_readl(OMAP2_CONTROL_DEVCONF0);
-       } else {
+       if (cpu_class_is_omap1()) {
                ctrl_name = "tranceiver_ctrl";
                trans = omap_readw(USB_TRANSCEIVER_CTRL);
        }