aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2
diff options
context:
space:
mode:
authorPaul Walmsley <paul@pwsan.com>2010-10-08 13:40:20 -0400
committerPaul Walmsley <paul@pwsan.com>2010-10-08 13:40:20 -0400
commit4814ced5116e3b73dc4f63eec84999739fc8ed11 (patch)
treea70a0a532d3c552c76c6a0e4dce13e5c492bd772 /arch/arm/mach-omap2
parentaa218dafd7b37ba92fcfdd6d5c8d459772f88042 (diff)
OMAP: control: move plat-omap/control.h to mach-omap2/control.h
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>
Diffstat (limited to 'arch/arm/mach-omap2')
-rw-r--r--arch/arm/mach-omap2/board-3430sdp.c2
-rw-r--r--arch/arm/mach-omap2/board-4430sdp.c2
-rw-r--r--arch/arm/mach-omap2/board-am3517evm.c2
-rw-r--r--arch/arm/mach-omap2/board-apollon.c2
-rw-r--r--arch/arm/mach-omap2/board-cm-t3517.c2
-rw-r--r--arch/arm/mach-omap2/board-h4.c2
-rw-r--r--arch/arm/mach-omap2/board-ldp.c2
-rw-r--r--arch/arm/mach-omap2/board-omap3logic.c2
-rw-r--r--arch/arm/mach-omap2/board-omap4panda.c4
-rw-r--r--arch/arm/mach-omap2/clock2420_data.c2
-rw-r--r--arch/arm/mach-omap2/clock2430_data.c2
-rw-r--r--arch/arm/mach-omap2/clock3xxx_data.c2
-rw-r--r--arch/arm/mach-omap2/clock44xx_data.c2
-rw-r--r--arch/arm/mach-omap2/common.c2
-rw-r--r--arch/arm/mach-omap2/control.c3
-rw-r--r--arch/arm/mach-omap2/control.h368
-rw-r--r--arch/arm/mach-omap2/cpuidle34xx.c2
-rw-r--r--arch/arm/mach-omap2/devices.c3
-rw-r--r--arch/arm/mach-omap2/hsmmc.c2
-rw-r--r--arch/arm/mach-omap2/id.c3
-rw-r--r--arch/arm/mach-omap2/mcbsp.c4
-rw-r--r--arch/arm/mach-omap2/mux.c8
-rw-r--r--arch/arm/mach-omap2/pm24xx.c2
-rw-r--r--arch/arm/mach-omap2/pm34xx.c2
-rw-r--r--arch/arm/mach-omap2/prcm.c2
-rw-r--r--arch/arm/mach-omap2/serial.c2
-rw-r--r--arch/arm/mach-omap2/sleep34xx.S2
-rw-r--r--arch/arm/mach-omap2/usb-fs.c6
28 files changed, 404 insertions, 35 deletions
diff --git a/arch/arm/mach-omap2/board-3430sdp.c b/arch/arm/mach-omap2/board-3430sdp.c
index 9ba2ee246a75..88b5734d0bb2 100644
--- a/arch/arm/mach-omap2/board-3430sdp.c
+++ b/arch/arm/mach-omap2/board-3430sdp.c
@@ -39,7 +39,6 @@
39#include <plat/gpmc.h> 39#include <plat/gpmc.h>
40#include <plat/display.h> 40#include <plat/display.h>
41 41
42#include <plat/control.h>
43#include <plat/gpmc-smc91x.h> 42#include <plat/gpmc-smc91x.h>
44 43
45#include "board-flash.h" 44#include "board-flash.h"
@@ -47,6 +46,7 @@
47#include "sdram-qimonda-hyb18m512160af-6.h" 46#include "sdram-qimonda-hyb18m512160af-6.h"
48#include "hsmmc.h" 47#include "hsmmc.h"
49#include "pm.h" 48#include "pm.h"
49#include "control.h"
50 50
51#define CONFIG_DISABLE_HFCLK 1 51#define CONFIG_DISABLE_HFCLK 1
52 52
diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c
index 1d7d70ae7cb8..aafd30680fc8 100644
--- a/arch/arm/mach-omap2/board-4430sdp.c
+++ b/arch/arm/mach-omap2/board-4430sdp.c
@@ -32,12 +32,12 @@
32 32
33#include <plat/board.h> 33#include <plat/board.h>
34#include <plat/common.h> 34#include <plat/common.h>
35#include <plat/control.h>
36#include <plat/usb.h> 35#include <plat/usb.h>
37#include <plat/mmc.h> 36#include <plat/mmc.h>
38 37
39#include "hsmmc.h" 38#include "hsmmc.h"
40#include "timer-gp.h" 39#include "timer-gp.h"
40#include "control.h"
41 41
42#define ETH_KS8851_IRQ 34 42#define ETH_KS8851_IRQ 34
43#define ETH_KS8851_POWER_ON 48 43#define ETH_KS8851_POWER_ON 48
diff --git a/arch/arm/mach-omap2/board-am3517evm.c b/arch/arm/mach-omap2/board-am3517evm.c
index b091741500de..fada04ea1d5c 100644
--- a/arch/arm/mach-omap2/board-am3517evm.c
+++ b/arch/arm/mach-omap2/board-am3517evm.c
@@ -32,11 +32,11 @@
32 32
33#include <plat/board.h> 33#include <plat/board.h>
34#include <plat/common.h> 34#include <plat/common.h>
35#include <plat/control.h>
36#include <plat/usb.h> 35#include <plat/usb.h>
37#include <plat/display.h> 36#include <plat/display.h>
38 37
39#include "mux.h" 38#include "mux.h"
39#include "control.h"
40 40
41#define AM35XX_EVM_PHY_MASK (0xF) 41#define AM35XX_EVM_PHY_MASK (0xF)
42#define AM35XX_EVM_MDIO_FREQUENCY (1000000) 42#define AM35XX_EVM_MDIO_FREQUENCY (1000000)
diff --git a/arch/arm/mach-omap2/board-apollon.c b/arch/arm/mach-omap2/board-apollon.c
index c6421a72514a..102719cb052b 100644
--- a/arch/arm/mach-omap2/board-apollon.c
+++ b/arch/arm/mach-omap2/board-apollon.c
@@ -39,9 +39,9 @@
39#include <plat/board.h> 39#include <plat/board.h>
40#include <plat/common.h> 40#include <plat/common.h>
41#include <plat/gpmc.h> 41#include <plat/gpmc.h>
42#include <plat/control.h>
43 42
44#include "mux.h" 43#include "mux.h"
44#include "control.h"
45 45
46/* LED & Switch macros */ 46/* LED & Switch macros */
47#define LED0_GPIO13 13 47#define LED0_GPIO13 13
diff --git a/arch/arm/mach-omap2/board-cm-t3517.c b/arch/arm/mach-omap2/board-cm-t3517.c
index 1115b8ab5e1d..c49319ff5c36 100644
--- a/arch/arm/mach-omap2/board-cm-t3517.c
+++ b/arch/arm/mach-omap2/board-cm-t3517.c
@@ -40,7 +40,6 @@
40 40
41#include <plat/board.h> 41#include <plat/board.h>
42#include <plat/common.h> 42#include <plat/common.h>
43#include <plat/control.h>
44#include <plat/usb.h> 43#include <plat/usb.h>
45#include <plat/nand.h> 44#include <plat/nand.h>
46#include <plat/gpmc.h> 45#include <plat/gpmc.h>
@@ -48,6 +47,7 @@
48#include <mach/am35xx.h> 47#include <mach/am35xx.h>
49 48
50#include "mux.h" 49#include "mux.h"
50#include "control.h"
51 51
52#if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE) 52#if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE)
53static struct gpio_led cm_t3517_leds[] = { 53static struct gpio_led cm_t3517_leds[] = {
diff --git a/arch/arm/mach-omap2/board-h4.c b/arch/arm/mach-omap2/board-h4.c
index e09bd686389f..08492a34d310 100644
--- a/arch/arm/mach-omap2/board-h4.c
+++ b/arch/arm/mach-omap2/board-h4.c
@@ -31,7 +31,6 @@
31#include <asm/mach/arch.h> 31#include <asm/mach/arch.h>
32#include <asm/mach/map.h> 32#include <asm/mach/map.h>
33 33
34#include <plat/control.h>
35#include <mach/gpio.h> 34#include <mach/gpio.h>
36#include <plat/usb.h> 35#include <plat/usb.h>
37#include <plat/board.h> 36#include <plat/board.h>
@@ -42,6 +41,7 @@
42#include <plat/gpmc.h> 41#include <plat/gpmc.h>
43 42
44#include "mux.h" 43#include "mux.h"
44#include "control.h"
45 45
46#define H4_FLASH_CS 0 46#define H4_FLASH_CS 0
47#define H4_SMC91X_CS 1 47#define H4_SMC91X_CS 1
diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c
index 7c1e6ad3972e..8495f37d2756 100644
--- a/arch/arm/mach-omap2/board-ldp.c
+++ b/arch/arm/mach-omap2/board-ldp.c
@@ -42,12 +42,12 @@
42#include <mach/board-zoom.h> 42#include <mach/board-zoom.h>
43 43
44#include <asm/delay.h> 44#include <asm/delay.h>
45#include <plat/control.h>
46#include <plat/usb.h> 45#include <plat/usb.h>
47 46
48#include "board-flash.h" 47#include "board-flash.h"
49#include "mux.h" 48#include "mux.h"
50#include "hsmmc.h" 49#include "hsmmc.h"
50#include "control.h"
51 51
52#define LDP_SMSC911X_CS 1 52#define LDP_SMSC911X_CS 1
53#define LDP_SMSC911X_GPIO 152 53#define LDP_SMSC911X_GPIO 152
diff --git a/arch/arm/mach-omap2/board-omap3logic.c b/arch/arm/mach-omap2/board-omap3logic.c
index 3151cf269a59..44ff6744ef59 100644
--- a/arch/arm/mach-omap2/board-omap3logic.c
+++ b/arch/arm/mach-omap2/board-omap3logic.c
@@ -36,6 +36,7 @@
36#include "mux.h" 36#include "mux.h"
37#include "hsmmc.h" 37#include "hsmmc.h"
38#include "timer-gp.h" 38#include "timer-gp.h"
39#include "control.h"
39 40
40#include <plat/mux.h> 41#include <plat/mux.h>
41#include <plat/board.h> 42#include <plat/board.h>
@@ -43,7 +44,6 @@
43#include <plat/gpmc-smsc911x.h> 44#include <plat/gpmc-smsc911x.h>
44#include <plat/gpmc.h> 45#include <plat/gpmc.h>
45#include <plat/sdrc.h> 46#include <plat/sdrc.h>
46#include <plat/control.h>
47 47
48#define OMAP3LOGIC_SMSC911X_CS 1 48#define OMAP3LOGIC_SMSC911X_CS 1
49 49
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c
index 83bd1fe5e323..992a03e248c5 100644
--- a/arch/arm/mach-omap2/board-omap4panda.c
+++ b/arch/arm/mach-omap2/board-omap4panda.c
@@ -34,12 +34,12 @@
34 34
35#include <plat/board.h> 35#include <plat/board.h>
36#include <plat/common.h> 36#include <plat/common.h>
37#include <plat/control.h>
38#include <plat/usb.h> 37#include <plat/usb.h>
39#include <plat/mmc.h> 38#include <plat/mmc.h>
40#include "hsmmc.h"
41#include "timer-gp.h" 39#include "timer-gp.h"
42 40
41#include "hsmmc.h"
42#include "control.h"
43 43
44static struct gpio_led gpio_leds[] = { 44static struct gpio_led gpio_leds[] = {
45 { 45 {
diff --git a/arch/arm/mach-omap2/clock2420_data.c b/arch/arm/mach-omap2/clock2420_data.c
index 7086fe4fb7af..21f856252ad8 100644
--- a/arch/arm/mach-omap2/clock2420_data.c
+++ b/arch/arm/mach-omap2/clock2420_data.c
@@ -18,7 +18,6 @@
18#include <linux/list.h> 18#include <linux/list.h>
19 19
20#include <plat/clkdev_omap.h> 20#include <plat/clkdev_omap.h>
21#include <plat/control.h>
22 21
23#include "clock.h" 22#include "clock.h"
24#include "clock2xxx.h" 23#include "clock2xxx.h"
@@ -28,6 +27,7 @@
28#include "prm-regbits-24xx.h" 27#include "prm-regbits-24xx.h"
29#include "cm-regbits-24xx.h" 28#include "cm-regbits-24xx.h"
30#include "sdrc.h" 29#include "sdrc.h"
30#include "control.h"
31 31
32#define OMAP_CM_REGADDR OMAP2420_CM_REGADDR 32#define OMAP_CM_REGADDR OMAP2420_CM_REGADDR
33 33
diff --git a/arch/arm/mach-omap2/clock2430_data.c b/arch/arm/mach-omap2/clock2430_data.c
index 454831966d33..e32afcbdfb88 100644
--- a/arch/arm/mach-omap2/clock2430_data.c
+++ b/arch/arm/mach-omap2/clock2430_data.c
@@ -18,7 +18,6 @@
18#include <linux/list.h> 18#include <linux/list.h>
19 19
20#include <plat/clkdev_omap.h> 20#include <plat/clkdev_omap.h>
21#include <plat/control.h>
22 21
23#include "clock.h" 22#include "clock.h"
24#include "clock2xxx.h" 23#include "clock2xxx.h"
@@ -28,6 +27,7 @@
28#include "prm-regbits-24xx.h" 27#include "prm-regbits-24xx.h"
29#include "cm-regbits-24xx.h" 28#include "cm-regbits-24xx.h"
30#include "sdrc.h" 29#include "sdrc.h"
30#include "control.h"
31 31
32#define OMAP_CM_REGADDR OMAP2430_CM_REGADDR 32#define OMAP_CM_REGADDR OMAP2430_CM_REGADDR
33 33
diff --git a/arch/arm/mach-omap2/clock3xxx_data.c b/arch/arm/mach-omap2/clock3xxx_data.c
index 4ac1fb8c0014..d85ecd5aebfd 100644
--- a/arch/arm/mach-omap2/clock3xxx_data.c
+++ b/arch/arm/mach-omap2/clock3xxx_data.c
@@ -20,7 +20,6 @@
20#include <linux/clk.h> 20#include <linux/clk.h>
21#include <linux/list.h> 21#include <linux/list.h>
22 22
23#include <plat/control.h>
24#include <plat/clkdev_omap.h> 23#include <plat/clkdev_omap.h>
25 24
26#include "clock.h" 25#include "clock.h"
@@ -33,6 +32,7 @@
33#include "cm-regbits-34xx.h" 32#include "cm-regbits-34xx.h"
34#include "prm.h" 33#include "prm.h"
35#include "prm-regbits-34xx.h" 34#include "prm-regbits-34xx.h"
35#include "control.h"
36 36
37/* 37/*
38 * clocks 38 * clocks
diff --git a/arch/arm/mach-omap2/clock44xx_data.c b/arch/arm/mach-omap2/clock44xx_data.c
index 67fac44cb6e6..1599836ba3d9 100644
--- a/arch/arm/mach-omap2/clock44xx_data.c
+++ b/arch/arm/mach-omap2/clock44xx_data.c
@@ -26,7 +26,6 @@
26#include <linux/kernel.h> 26#include <linux/kernel.h>
27#include <linux/list.h> 27#include <linux/list.h>
28#include <linux/clk.h> 28#include <linux/clk.h>
29#include <plat/control.h>
30#include <plat/clkdev_omap.h> 29#include <plat/clkdev_omap.h>
31 30
32#include "clock.h" 31#include "clock.h"
@@ -35,6 +34,7 @@
35#include "cm-regbits-44xx.h" 34#include "cm-regbits-44xx.h"
36#include "prm.h" 35#include "prm.h"
37#include "prm-regbits-44xx.h" 36#include "prm-regbits-44xx.h"
37#include "control.h"
38 38
39/* Root clocks */ 39/* Root clocks */
40 40
diff --git a/arch/arm/mach-omap2/common.c b/arch/arm/mach-omap2/common.c
index cddc89ab7479..778929f7e92d 100644
--- a/arch/arm/mach-omap2/common.c
+++ b/arch/arm/mach-omap2/common.c
@@ -19,12 +19,12 @@
19 19
20#include <plat/common.h> 20#include <plat/common.h>
21#include <plat/board.h> 21#include <plat/board.h>
22#include <plat/control.h>
23#include <plat/mux.h> 22#include <plat/mux.h>
24 23
25#include <plat/clock.h> 24#include <plat/clock.h>
26 25
27#include "sdrc.h" 26#include "sdrc.h"
27#include "control.h"
28 28
29/* Global address base setup code */ 29/* Global address base setup code */
30 30
diff --git a/arch/arm/mach-omap2/control.c b/arch/arm/mach-omap2/control.c
index 5d9b30dd6e56..1fa3294b6048 100644
--- a/arch/arm/mach-omap2/control.c
+++ b/arch/arm/mach-omap2/control.c
@@ -16,14 +16,15 @@
16#include <linux/io.h> 16#include <linux/io.h>
17 17
18#include <plat/common.h> 18#include <plat/common.h>
19#include <plat/control.h>
20#include <plat/sdrc.h> 19#include <plat/sdrc.h>
20
21#include "cm-regbits-34xx.h" 21#include "cm-regbits-34xx.h"
22#include "prm-regbits-34xx.h" 22#include "prm-regbits-34xx.h"
23#include "cm.h" 23#include "cm.h"
24#include "prm.h" 24#include "prm.h"
25#include "sdrc.h" 25#include "sdrc.h"
26#include "pm.h" 26#include "pm.h"
27#include "control.h"
27 28
28static void __iomem *omap2_ctrl_base; 29static void __iomem *omap2_ctrl_base;
29static void __iomem *omap4_ctrl_pad_base; 30static void __iomem *omap4_ctrl_pad_base;
diff --git a/arch/arm/mach-omap2/control.h b/arch/arm/mach-omap2/control.h
new file mode 100644
index 000000000000..b6c6b7c450b3
--- /dev/null
+++ b/arch/arm/mach-omap2/control.h
@@ -0,0 +1,368 @@
1/*
2 * arch/arm/mach-omap2/control.h
3 *
4 * OMAP2/3/4 System Control Module definitions
5 *
6 * Copyright (C) 2007-2010 Texas Instruments, Inc.
7 * Copyright (C) 2007-2008, 2010 Nokia Corporation
8 *
9 * Written by Paul Walmsley
10 *
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation.
14 */
15
16#ifndef __ARCH_ARM_MACH_OMAP2_CONTROL_H
17#define __ARCH_ARM_MACH_OMAP2_CONTROL_H
18
19#include <mach/io.h>
20#include <mach/ctrl_module_core_44xx.h>
21#include <mach/ctrl_module_wkup_44xx.h>
22#include <mach/ctrl_module_pad_core_44xx.h>
23#include <mach/ctrl_module_pad_wkup_44xx.h>
24
25#ifndef __ASSEMBLY__
26#define OMAP242X_CTRL_REGADDR(reg) \
27 OMAP2_L4_IO_ADDRESS(OMAP242X_CTRL_BASE + (reg))
28#define OMAP243X_CTRL_REGADDR(reg) \
29 OMAP2_L4_IO_ADDRESS(OMAP243X_CTRL_BASE + (reg))
30#define OMAP343X_CTRL_REGADDR(reg) \
31 OMAP2_L4_IO_ADDRESS(OMAP343X_CTRL_BASE + (reg))
32#else
33#define OMAP242X_CTRL_REGADDR(reg) \
34 OMAP2_L4_IO_ADDRESS(OMAP242X_CTRL_BASE + (reg))
35#define OMAP243X_CTRL_REGADDR(reg) \
36 OMAP2_L4_IO_ADDRESS(OMAP243X_CTRL_BASE + (reg))
37#define OMAP343X_CTRL_REGADDR(reg) \
38 OMAP2_L4_IO_ADDRESS(OMAP343X_CTRL_BASE + (reg))
39#endif /* __ASSEMBLY__ */
40
41/*
42 * As elsewhere, the "OMAP2_" prefix indicates that the macro is valid for
43 * OMAP24XX and OMAP34XX.
44 */
45
46/* Control submodule offsets */
47
48#define OMAP2_CONTROL_INTERFACE 0x000
49#define OMAP2_CONTROL_PADCONFS 0x030
50#define OMAP2_CONTROL_GENERAL 0x270
51#define OMAP343X_CONTROL_MEM_WKUP 0x600
52#define OMAP343X_CONTROL_PADCONFS_WKUP 0xa00
53#define OMAP343X_CONTROL_GENERAL_WKUP 0xa60
54
55/* Control register offsets - read/write with omap_ctrl_{read,write}{bwl}() */
56
57#define OMAP2_CONTROL_SYSCONFIG (OMAP2_CONTROL_INTERFACE + 0x10)
58
59/* CONTROL_GENERAL register offsets common to OMAP2 & 3 */
60#define OMAP2_CONTROL_DEVCONF0 (OMAP2_CONTROL_GENERAL + 0x0004)
61#define OMAP2_CONTROL_MSUSPENDMUX_0 (OMAP2_CONTROL_GENERAL + 0x0020)
62#define OMAP2_CONTROL_MSUSPENDMUX_1 (OMAP2_CONTROL_GENERAL + 0x0024)
63#define OMAP2_CONTROL_MSUSPENDMUX_2 (OMAP2_CONTROL_GENERAL + 0x0028)
64#define OMAP2_CONTROL_MSUSPENDMUX_3 (OMAP2_CONTROL_GENERAL + 0x002c)
65#define OMAP2_CONTROL_MSUSPENDMUX_4 (OMAP2_CONTROL_GENERAL + 0x0030)
66#define OMAP2_CONTROL_MSUSPENDMUX_5 (OMAP2_CONTROL_GENERAL + 0x0034)
67#define OMAP2_CONTROL_SEC_CTRL (OMAP2_CONTROL_GENERAL + 0x0040)
68#define OMAP2_CONTROL_RPUB_KEY_H_0 (OMAP2_CONTROL_GENERAL + 0x0090)
69#define OMAP2_CONTROL_RPUB_KEY_H_1 (OMAP2_CONTROL_GENERAL + 0x0094)
70#define OMAP2_CONTROL_RPUB_KEY_H_2 (OMAP2_CONTROL_GENERAL + 0x0098)
71#define OMAP2_CONTROL_RPUB_KEY_H_3 (OMAP2_CONTROL_GENERAL + 0x009c)
72
73/* 242x-only CONTROL_GENERAL register offsets */
74#define OMAP242X_CONTROL_DEVCONF OMAP2_CONTROL_DEVCONF0 /* match TRM */
75#define OMAP242X_CONTROL_OCM_RAM_PERM (OMAP2_CONTROL_GENERAL + 0x0068)
76
77/* 243x-only CONTROL_GENERAL register offsets */
78/* CONTROL_IVA2_BOOT{ADDR,MOD} are at the same place on 343x - noted below */
79#define OMAP243X_CONTROL_DEVCONF1 (OMAP2_CONTROL_GENERAL + 0x0078)
80#define OMAP243X_CONTROL_CSIRXFE (OMAP2_CONTROL_GENERAL + 0x007c)
81#define OMAP243X_CONTROL_IVA2_BOOTADDR (OMAP2_CONTROL_GENERAL + 0x0190)
82#define OMAP243X_CONTROL_IVA2_BOOTMOD (OMAP2_CONTROL_GENERAL + 0x0194)
83#define OMAP243X_CONTROL_IVA2_GEMCFG (OMAP2_CONTROL_GENERAL + 0x0198)
84#define OMAP243X_CONTROL_PBIAS_LITE (OMAP2_CONTROL_GENERAL + 0x0230)
85
86/* 24xx-only CONTROL_GENERAL register offsets */
87#define OMAP24XX_CONTROL_DEBOBS (OMAP2_CONTROL_GENERAL + 0x0000)
88#define OMAP24XX_CONTROL_EMU_SUPPORT (OMAP2_CONTROL_GENERAL + 0x0008)
89#define OMAP24XX_CONTROL_SEC_TEST (OMAP2_CONTROL_GENERAL + 0x0044)
90#define OMAP24XX_CONTROL_PSA_CTRL (OMAP2_CONTROL_GENERAL + 0x0048)
91#define OMAP24XX_CONTROL_PSA_CMD (OMAP2_CONTROL_GENERAL + 0x004c)
92#define OMAP24XX_CONTROL_PSA_VALUE (OMAP2_CONTROL_GENERAL + 0x0050)
93#define OMAP24XX_CONTROL_SEC_EMU (OMAP2_CONTROL_GENERAL + 0x0060)
94#define OMAP24XX_CONTROL_SEC_TAP (OMAP2_CONTROL_GENERAL + 0x0064)
95#define OMAP24XX_CONTROL_OCM_PUB_RAM_ADD (OMAP2_CONTROL_GENERAL + 0x006c)
96#define OMAP24XX_CONTROL_EXT_SEC_RAM_START_ADD (OMAP2_CONTROL_GENERAL + 0x0070)
97#define OMAP24XX_CONTROL_EXT_SEC_RAM_STOP_ADD (OMAP2_CONTROL_GENERAL + 0x0074)
98#define OMAP24XX_CONTROL_SEC_STATUS (OMAP2_CONTROL_GENERAL + 0x0080)
99#define OMAP24XX_CONTROL_SEC_ERR_STATUS (OMAP2_CONTROL_GENERAL + 0x0084)
100#define OMAP24XX_CONTROL_STATUS (OMAP2_CONTROL_GENERAL + 0x0088)
101#define OMAP24XX_CONTROL_GENERAL_PURPOSE_STATUS (OMAP2_CONTROL_GENERAL + 0x008c)
102#define OMAP24XX_CONTROL_RAND_KEY_0 (OMAP2_CONTROL_GENERAL + 0x00a0)
103#define OMAP24XX_CONTROL_RAND_KEY_1 (OMAP2_CONTROL_GENERAL + 0x00a4)
104#define OMAP24XX_CONTROL_RAND_KEY_2 (OMAP2_CONTROL_GENERAL + 0x00a8)
105#define OMAP24XX_CONTROL_RAND_KEY_3 (OMAP2_CONTROL_GENERAL + 0x00ac)
106#define OMAP24XX_CONTROL_CUST_KEY_0 (OMAP2_CONTROL_GENERAL + 0x00b0)
107#define OMAP24XX_CONTROL_CUST_KEY_1 (OMAP2_CONTROL_GENERAL + 0x00b4)
108#define OMAP24XX_CONTROL_TEST_KEY_0 (OMAP2_CONTROL_GENERAL + 0x00c0)
109#define OMAP24XX_CONTROL_TEST_KEY_1 (OMAP2_CONTROL_GENERAL + 0x00c4)
110#define OMAP24XX_CONTROL_TEST_KEY_2 (OMAP2_CONTROL_GENERAL + 0x00c8)
111#define OMAP24XX_CONTROL_TEST_KEY_3 (OMAP2_CONTROL_GENERAL + 0x00cc)
112#define OMAP24XX_CONTROL_TEST_KEY_4 (OMAP2_CONTROL_GENERAL + 0x00d0)
113#define OMAP24XX_CONTROL_TEST_KEY_5 (OMAP2_CONTROL_GENERAL + 0x00d4)
114#define OMAP24XX_CONTROL_TEST_KEY_6 (OMAP2_CONTROL_GENERAL + 0x00d8)
115#define OMAP24XX_CONTROL_TEST_KEY_7 (OMAP2_CONTROL_GENERAL + 0x00dc)
116#define OMAP24XX_CONTROL_TEST_KEY_8 (OMAP2_CONTROL_GENERAL + 0x00e0)
117#define OMAP24XX_CONTROL_TEST_KEY_9 (OMAP2_CONTROL_GENERAL + 0x00e4)
118
119#define OMAP343X_CONTROL_PADCONF_SYSNIRQ (OMAP2_CONTROL_INTERFACE + 0x01b0)
120
121/* 34xx-only CONTROL_GENERAL register offsets */
122#define OMAP343X_CONTROL_PADCONF_OFF (OMAP2_CONTROL_GENERAL + 0x0000)
123#define OMAP343X_CONTROL_MEM_DFTRW0 (OMAP2_CONTROL_GENERAL + 0x0008)
124#define OMAP343X_CONTROL_MEM_DFTRW1 (OMAP2_CONTROL_GENERAL + 0x000c)
125#define OMAP343X_CONTROL_DEVCONF1 (OMAP2_CONTROL_GENERAL + 0x0068)
126#define OMAP343X_CONTROL_CSIRXFE (OMAP2_CONTROL_GENERAL + 0x006c)
127#define OMAP343X_CONTROL_SEC_STATUS (OMAP2_CONTROL_GENERAL + 0x0070)
128#define OMAP343X_CONTROL_SEC_ERR_STATUS (OMAP2_CONTROL_GENERAL + 0x0074)
129#define OMAP343X_CONTROL_SEC_ERR_STATUS_DEBUG (OMAP2_CONTROL_GENERAL + 0x0078)
130#define OMAP343X_CONTROL_STATUS (OMAP2_CONTROL_GENERAL + 0x0080)
131#define OMAP343X_CONTROL_GENERAL_PURPOSE_STATUS (OMAP2_CONTROL_GENERAL + 0x0084)
132#define OMAP343X_CONTROL_RPUB_KEY_H_4 (OMAP2_CONTROL_GENERAL + 0x00a0)
133#define OMAP343X_CONTROL_RAND_KEY_0 (OMAP2_CONTROL_GENERAL + 0x00a8)
134#define OMAP343X_CONTROL_RAND_KEY_1 (OMAP2_CONTROL_GENERAL + 0x00ac)
135#define OMAP343X_CONTROL_RAND_KEY_2 (OMAP2_CONTROL_GENERAL + 0x00b0)
136#define OMAP343X_CONTROL_RAND_KEY_3 (OMAP2_CONTROL_GENERAL + 0x00b4)
137#define OMAP343X_CONTROL_TEST_KEY_0 (OMAP2_CONTROL_GENERAL + 0x00c8)
138#define OMAP343X_CONTROL_TEST_KEY_1 (OMAP2_CONTROL_GENERAL + 0x00cc)
139#define OMAP343X_CONTROL_TEST_KEY_2 (OMAP2_CONTROL_GENERAL + 0x00d0)
140#define OMAP343X_CONTROL_TEST_KEY_3 (OMAP2_CONTROL_GENERAL + 0x00d4)
141#define OMAP343X_CONTROL_TEST_KEY_4 (OMAP2_CONTROL_GENERAL + 0x00d8)
142#define OMAP343X_CONTROL_TEST_KEY_5 (OMAP2_CONTROL_GENERAL + 0x00dc)
143#define OMAP343X_CONTROL_TEST_KEY_6 (OMAP2_CONTROL_GENERAL + 0x00e0)
144#define OMAP343X_CONTROL_TEST_KEY_7 (OMAP2_CONTROL_GENERAL + 0x00e4)
145#define OMAP343X_CONTROL_TEST_KEY_8 (OMAP2_CONTROL_GENERAL + 0x00e8)
146#define OMAP343X_CONTROL_TEST_KEY_9 (OMAP2_CONTROL_GENERAL + 0x00ec)
147#define OMAP343X_CONTROL_TEST_KEY_10 (OMAP2_CONTROL_GENERAL + 0x00f0)
148#define OMAP343X_CONTROL_TEST_KEY_11 (OMAP2_CONTROL_GENERAL + 0x00f4)
149#define OMAP343X_CONTROL_TEST_KEY_12 (OMAP2_CONTROL_GENERAL + 0x00f8)
150#define OMAP343X_CONTROL_TEST_KEY_13 (OMAP2_CONTROL_GENERAL + 0x00fc)
151#define OMAP343X_CONTROL_IVA2_BOOTADDR (OMAP2_CONTROL_GENERAL + 0x0190)
152#define OMAP343X_CONTROL_IVA2_BOOTMOD (OMAP2_CONTROL_GENERAL + 0x0194)
153#define OMAP343X_CONTROL_DEBOBS(i) (OMAP2_CONTROL_GENERAL + 0x01B0 \
154 + ((i) >> 1) * 4 + (!((i) & 1)) * 2)
155#define OMAP343X_CONTROL_PROG_IO0 (OMAP2_CONTROL_GENERAL + 0x01D4)
156#define OMAP343X_CONTROL_PROG_IO1 (OMAP2_CONTROL_GENERAL + 0x01D8)
157#define OMAP343X_CONTROL_DSS_DPLL_SPREADING (OMAP2_CONTROL_GENERAL + 0x01E0)
158#define OMAP343X_CONTROL_CORE_DPLL_SPREADING (OMAP2_CONTROL_GENERAL + 0x01E4)
159#define OMAP343X_CONTROL_PER_DPLL_SPREADING (OMAP2_CONTROL_GENERAL + 0x01E8)
160#define OMAP343X_CONTROL_USBHOST_DPLL_SPREADING (OMAP2_CONTROL_GENERAL + 0x01EC)
161#define OMAP343X_CONTROL_PBIAS_LITE (OMAP2_CONTROL_GENERAL + 0x02B0)
162#define OMAP343X_CONTROL_TEMP_SENSOR (OMAP2_CONTROL_GENERAL + 0x02B4)
163#define OMAP343X_CONTROL_SRAMLDO4 (OMAP2_CONTROL_GENERAL + 0x02B8)
164#define OMAP343X_CONTROL_SRAMLDO5 (OMAP2_CONTROL_GENERAL + 0x02C0)
165#define OMAP343X_CONTROL_CSI (OMAP2_CONTROL_GENERAL + 0x02C4)
166
167/* AM35XX only CONTROL_GENERAL register offsets */
168#define AM35XX_CONTROL_MSUSPENDMUX_6 (OMAP2_CONTROL_GENERAL + 0x0038)
169#define AM35XX_CONTROL_DEVCONF2 (OMAP2_CONTROL_GENERAL + 0x0310)
170#define AM35XX_CONTROL_DEVCONF3 (OMAP2_CONTROL_GENERAL + 0x0314)
171#define AM35XX_CONTROL_CBA_PRIORITY (OMAP2_CONTROL_GENERAL + 0x0320)
172#define AM35XX_CONTROL_LVL_INTR_CLEAR (OMAP2_CONTROL_GENERAL + 0x0324)
173#define AM35XX_CONTROL_IP_SW_RESET (OMAP2_CONTROL_GENERAL + 0x0328)
174#define AM35XX_CONTROL_IPSS_CLK_CTRL (OMAP2_CONTROL_GENERAL + 0x032C)
175
176/* 34xx PADCONF register offsets */
177#define OMAP343X_PADCONF_ETK(i) (OMAP2_CONTROL_PADCONFS + 0x5a8 + \
178 (i)*2)
179#define OMAP343X_PADCONF_ETK_CLK OMAP343X_PADCONF_ETK(0)
180#define OMAP343X_PADCONF_ETK_CTL OMAP343X_PADCONF_ETK(1)
181#define OMAP343X_PADCONF_ETK_D0 OMAP343X_PADCONF_ETK(2)
182#define OMAP343X_PADCONF_ETK_D1 OMAP343X_PADCONF_ETK(3)
183#define OMAP343X_PADCONF_ETK_D2 OMAP343X_PADCONF_ETK(4)
184#define OMAP343X_PADCONF_ETK_D3 OMAP343X_PADCONF_ETK(5)
185#define OMAP343X_PADCONF_ETK_D4 OMAP343X_PADCONF_ETK(6)
186#define OMAP343X_PADCONF_ETK_D5 OMAP343X_PADCONF_ETK(7)
187#define OMAP343X_PADCONF_ETK_D6 OMAP343X_PADCONF_ETK(8)
188#define OMAP343X_PADCONF_ETK_D7 OMAP343X_PADCONF_ETK(9)
189#define OMAP343X_PADCONF_ETK_D8 OMAP343X_PADCONF_ETK(10)
190#define OMAP343X_PADCONF_ETK_D9 OMAP343X_PADCONF_ETK(11)
191#define OMAP343X_PADCONF_ETK_D10 OMAP343X_PADCONF_ETK(12)
192#define OMAP343X_PADCONF_ETK_D11 OMAP343X_PADCONF_ETK(13)
193#define OMAP343X_PADCONF_ETK_D12 OMAP343X_PADCONF_ETK(14)
194#define OMAP343X_PADCONF_ETK_D13 OMAP343X_PADCONF_ETK(15)
195#define OMAP343X_PADCONF_ETK_D14 OMAP343X_PADCONF_ETK(16)
196#define OMAP343X_PADCONF_ETK_D15 OMAP343X_PADCONF_ETK(17)
197
198/* 34xx GENERAL_WKUP regist offsets */
199#define OMAP343X_CONTROL_WKUP_DEBOBSMUX(i) (OMAP343X_CONTROL_GENERAL_WKUP + \
200 0x008 + (i))
201#define OMAP343X_CONTROL_WKUP_DEBOBS0 (OMAP343X_CONTROL_GENERAL_WKUP + 0x008)
202#define OMAP343X_CONTROL_WKUP_DEBOBS1 (OMAP343X_CONTROL_GENERAL_WKUP + 0x00C)
203#define OMAP343X_CONTROL_WKUP_DEBOBS2 (OMAP343X_CONTROL_GENERAL_WKUP + 0x010)
204#define OMAP343X_CONTROL_WKUP_DEBOBS3 (OMAP343X_CONTROL_GENERAL_WKUP + 0x014)
205#define OMAP343X_CONTROL_WKUP_DEBOBS4 (OMAP343X_CONTROL_GENERAL_WKUP + 0x018)
206
207/* 34xx D2D idle-related pins, handled by PM core */
208#define OMAP3_PADCONF_SAD2D_MSTANDBY 0x250
209#define OMAP3_PADCONF_SAD2D_IDLEACK 0x254
210
211/*
212 * REVISIT: This list of registers is not comprehensive - there are more
213 * that should be added.
214 */
215
216/*
217 * Control module register bit defines - these should eventually go into
218 * their own regbits file. Some of these will be complicated, depending
219 * on the device type (general-purpose, emulator, test, secure, bad, other)
220 * and the security mode (secure, non-secure, don't care)
221 */
222/* CONTROL_DEVCONF0 bits */
223#define OMAP2_MMCSDIO1ADPCLKISEL (1 << 24) /* MMC1 loop back clock */
224#define OMAP24XX_USBSTANDBYCTRL (1 << 15)
225#define OMAP2_MCBSP2_CLKS_MASK (1 << 6)
226#define OMAP2_MCBSP1_FSR_MASK (1 << 4)
227#define OMAP2_MCBSP1_CLKR_MASK (1 << 3)
228#define OMAP2_MCBSP1_CLKS_MASK (1 << 2)
229
230/* CONTROL_DEVCONF1 bits */
231#define OMAP243X_MMC1_ACTIVE_OVERWRITE (1 << 31)
232#define OMAP2_MMCSDIO2ADPCLKISEL (1 << 6) /* MMC2 loop back clock */
233#define OMAP2_MCBSP5_CLKS_MASK (1 << 4) /* > 242x */
234#define OMAP2_MCBSP4_CLKS_MASK (1 << 2) /* > 242x */
235#define OMAP2_MCBSP3_CLKS_MASK (1 << 0) /* > 242x */
236
237/* CONTROL_STATUS bits */
238#define OMAP2_DEVICETYPE_MASK (0x7 << 8)
239#define OMAP2_SYSBOOT_5_MASK (1 << 5)
240#define OMAP2_SYSBOOT_4_MASK (1 << 4)
241#define OMAP2_SYSBOOT_3_MASK (1 << 3)
242#define OMAP2_SYSBOOT_2_MASK (1 << 2)
243#define OMAP2_SYSBOOT_1_MASK (1 << 1)
244#define OMAP2_SYSBOOT_0_MASK (1 << 0)
245
246/* CONTROL_PBIAS_LITE bits */
247#define OMAP343X_PBIASLITESUPPLY_HIGH1 (1 << 15)
248#define OMAP343X_PBIASLITEVMODEERROR1 (1 << 11)
249#define OMAP343X_PBIASSPEEDCTRL1 (1 << 10)
250#define OMAP343X_PBIASLITEPWRDNZ1 (1 << 9)
251#define OMAP343X_PBIASLITEVMODE1 (1 << 8)
252#define OMAP343X_PBIASLITESUPPLY_HIGH0 (1 << 7)
253#define OMAP343X_PBIASLITEVMODEERROR0 (1 << 3)
254#define OMAP2_PBIASSPEEDCTRL0 (1 << 2)
255#define OMAP2_PBIASLITEPWRDNZ0 (1 << 1)
256#define OMAP2_PBIASLITEVMODE0 (1 << 0)
257
258/* CONTROL_PROG_IO1 bits */
259#define OMAP3630_PRG_SDMMC1_SPEEDCTRL (1 << 20)
260
261/* CONTROL_IVA2_BOOTMOD bits */
262#define OMAP3_IVA2_BOOTMOD_SHIFT 0
263#define OMAP3_IVA2_BOOTMOD_MASK (0xf << 0)
264#define OMAP3_IVA2_BOOTMOD_IDLE (0x1 << 0)
265
266/* CONTROL_PADCONF_X bits */
267#define OMAP3_PADCONF_WAKEUPEVENT0 (1 << 15)
268#define OMAP3_PADCONF_WAKEUPENABLE0 (1 << 14)
269
270#define OMAP343X_SCRATCHPAD_ROM (OMAP343X_CTRL_BASE + 0x860)
271#define OMAP343X_SCRATCHPAD (OMAP343X_CTRL_BASE + 0x910)
272#define OMAP343X_SCRATCHPAD_ROM_OFFSET 0x19C
273
274/* AM35XX_CONTROL_IPSS_CLK_CTRL bits */
275#define AM35XX_USBOTG_VBUSP_CLK_SHIFT 0
276#define AM35XX_CPGMAC_VBUSP_CLK_SHIFT 1
277#define AM35XX_VPFE_VBUSP_CLK_SHIFT 2
278#define AM35XX_HECC_VBUSP_CLK_SHIFT 3
279#define AM35XX_USBOTG_FCLK_SHIFT 8
280#define AM35XX_CPGMAC_FCLK_SHIFT 9
281#define AM35XX_VPFE_FCLK_SHIFT 10
282
283/*AM35XX CONTROL_LVL_INTR_CLEAR bits*/
284#define AM35XX_CPGMAC_C0_MISC_PULSE_CLR BIT(0)
285#define AM35XX_CPGMAC_C0_RX_PULSE_CLR BIT(1)
286#define AM35XX_CPGMAC_C0_RX_THRESH_CLR BIT(2)
287#define AM35XX_CPGMAC_C0_TX_PULSE_CLR BIT(3)
288#define AM35XX_USBOTGSS_INT_CLR BIT(4)
289#define AM35XX_VPFE_CCDC_VD0_INT_CLR BIT(5)
290#define AM35XX_VPFE_CCDC_VD1_INT_CLR BIT(6)
291#define AM35XX_VPFE_CCDC_VD2_INT_CLR BIT(7)
292
293/*AM35XX CONTROL_IP_SW_RESET bits*/
294#define AM35XX_USBOTGSS_SW_RST BIT(0)
295#define AM35XX_CPGMACSS_SW_RST BIT(1)
296#define AM35XX_VPFE_VBUSP_SW_RST BIT(2)
297#define AM35XX_HECC_SW_RST BIT(3)
298#define AM35XX_VPFE_PCLK_SW_RST BIT(4)
299
300/*
301 * CONTROL OMAP STATUS register to identify OMAP3 features
302 */
303#define OMAP3_CONTROL_OMAP_STATUS 0x044c
304
305#define OMAP3_SGX_SHIFT 13
306#define OMAP3_SGX_MASK (3 << OMAP3_SGX_SHIFT)
307#define FEAT_SGX_FULL 0
308#define FEAT_SGX_HALF 1
309#define FEAT_SGX_NONE 2
310
311#define OMAP3_IVA_SHIFT 12
312#define OMAP3_IVA_MASK (1 << OMAP3_SGX_SHIFT)
313#define FEAT_IVA 0
314#define FEAT_IVA_NONE 1
315
316#define OMAP3_L2CACHE_SHIFT 10
317#define OMAP3_L2CACHE_MASK (3 << OMAP3_L2CACHE_SHIFT)
318#define FEAT_L2CACHE_NONE 0
319#define FEAT_L2CACHE_64KB 1
320#define FEAT_L2CACHE_128KB 2
321#define FEAT_L2CACHE_256KB 3
322
323#define OMAP3_ISP_SHIFT 5
324#define OMAP3_ISP_MASK (1 << OMAP3_ISP_SHIFT)
325#define FEAT_ISP 0
326#define FEAT_ISP_NONE 1
327
328#define OMAP3_NEON_SHIFT 4
329#define OMAP3_NEON_MASK (1 << OMAP3_NEON_SHIFT)
330#define FEAT_NEON 0
331#define FEAT_NEON_NONE 1
332
333
334#ifndef __ASSEMBLY__
335#ifdef CONFIG_ARCH_OMAP2PLUS
336extern void __iomem *omap_ctrl_base_get(void);
337extern u8 omap_ctrl_readb(u16 offset);
338extern u16 omap_ctrl_readw(u16 offset);
339extern u32 omap_ctrl_readl(u16 offset);
340extern u32 omap4_ctrl_pad_readl(u16 offset);
341extern void omap_ctrl_writeb(u8 val, u16 offset);
342extern void omap_ctrl_writew(u16 val, u16 offset);
343extern void omap_ctrl_writel(u32 val, u16 offset);
344extern void omap4_ctrl_pad_writel(u32 val, u16 offset);
345
346extern void omap3_save_scratchpad_contents(void);
347extern void omap3_clear_scratchpad_contents(void);
348extern u32 *get_restore_pointer(void);
349extern u32 *get_es3_restore_pointer(void);
350extern u32 omap3_arm_context[128];
351extern void omap3_control_save_context(void);
352extern void omap3_control_restore_context(void);
353
354#else
355#define omap_ctrl_base_get() 0
356#define omap_ctrl_readb(x) 0
357#define omap_ctrl_readw(x) 0
358#define omap_ctrl_readl(x) 0
359#define omap4_ctrl_pad_readl(x) 0
360#define omap_ctrl_writeb(x, y) WARN_ON(1)
361#define omap_ctrl_writew(x, y) WARN_ON(1)
362#define omap_ctrl_writel(x, y) WARN_ON(1)
363#define omap4_ctrl_pad_writel(x, y) WARN_ON(1)
364#endif
365#endif /* __ASSEMBLY__ */
366
367#endif /* __ARCH_ARM_MACH_OMAP2_CONTROL_H */
368
diff --git a/arch/arm/mach-omap2/cpuidle34xx.c b/arch/arm/mach-omap2/cpuidle34xx.c
index 703b5ec88e98..0d50b45d041c 100644
--- a/arch/arm/mach-omap2/cpuidle34xx.c
+++ b/arch/arm/mach-omap2/cpuidle34xx.c
@@ -29,10 +29,10 @@
29#include <plat/irqs.h> 29#include <plat/irqs.h>
30#include <plat/powerdomain.h> 30#include <plat/powerdomain.h>
31#include <plat/clockdomain.h> 31#include <plat/clockdomain.h>
32#include <plat/control.h>
33#include <plat/serial.h> 32#include <plat/serial.h>
34 33
35#include "pm.h" 34#include "pm.h"
35#include "control.h"
36 36
37#ifdef CONFIG_CPU_IDLE 37#ifdef CONFIG_CPU_IDLE
38 38
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
index 818452ac905d..eaf37994403b 100644
--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -9,7 +9,6 @@
9 * (at your option) any later version. 9 * (at your option) any later version.
10 */ 10 */
11 11
12#include <linux/module.h>
13#include <linux/kernel.h> 12#include <linux/kernel.h>
14#include <linux/init.h> 13#include <linux/init.h>
15#include <linux/platform_device.h> 14#include <linux/platform_device.h>
@@ -23,7 +22,6 @@
23#include <asm/mach/map.h> 22#include <asm/mach/map.h>
24#include <asm/pmu.h> 23#include <asm/pmu.h>
25 24
26#include <plat/control.h>
27#include <plat/tc.h> 25#include <plat/tc.h>
28#include <plat/board.h> 26#include <plat/board.h>
29#include <mach/gpio.h> 27#include <mach/gpio.h>
@@ -33,6 +31,7 @@
33#include <plat/omap_device.h> 31#include <plat/omap_device.h>
34 32
35#include "mux.h" 33#include "mux.h"
34#include "control.h"
36 35
37#if defined(CONFIG_VIDEO_OMAP2) || defined(CONFIG_VIDEO_OMAP2_MODULE) 36#if defined(CONFIG_VIDEO_OMAP2) || defined(CONFIG_VIDEO_OMAP2_MODULE)
38 37
diff --git a/arch/arm/mach-omap2/hsmmc.c b/arch/arm/mach-omap2/hsmmc.c
index ab78a5a8d9b0..34272e4863fd 100644
--- a/arch/arm/mach-omap2/hsmmc.c
+++ b/arch/arm/mach-omap2/hsmmc.c
@@ -14,11 +14,11 @@
14#include <linux/string.h> 14#include <linux/string.h>
15#include <linux/delay.h> 15#include <linux/delay.h>
16#include <mach/hardware.h> 16#include <mach/hardware.h>
17#include <plat/control.h>
18#include <plat/mmc.h> 17#include <plat/mmc.h>
19#include <plat/omap-pm.h> 18#include <plat/omap-pm.h>
20 19
21#include "hsmmc.h" 20#include "hsmmc.h"
21#include "control.h"
22 22
23#if defined(CONFIG_MMC_OMAP_HS) || defined(CONFIG_MMC_OMAP_HS_MODULE) 23#if defined(CONFIG_MMC_OMAP_HS) || defined(CONFIG_MMC_OMAP_HS_MODULE)
24 24
diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
index 04a2fa240bc3..5f9086c65e48 100644
--- a/arch/arm/mach-omap2/id.c
+++ b/arch/arm/mach-omap2/id.c
@@ -22,11 +22,12 @@
22#include <asm/cputype.h> 22#include <asm/cputype.h>
23 23
24#include <plat/common.h> 24#include <plat/common.h>
25#include <plat/control.h>
26#include <plat/cpu.h> 25#include <plat/cpu.h>
27 26
28#include <mach/id.h> 27#include <mach/id.h>
29 28
29#include "control.h"
30
30static struct omap_chip_id omap_chip; 31static struct omap_chip_id omap_chip;
31static unsigned int omap_revision; 32static unsigned int omap_revision;
32 33
diff --git a/arch/arm/mach-omap2/mcbsp.c b/arch/arm/mach-omap2/mcbsp.c
index 51abcedfde83..eba9fa14a9de 100644
--- a/arch/arm/mach-omap2/mcbsp.c
+++ b/arch/arm/mach-omap2/mcbsp.c
@@ -22,7 +22,9 @@
22#include <plat/dma.h> 22#include <plat/dma.h>
23#include <plat/cpu.h> 23#include <plat/cpu.h>
24#include <plat/mcbsp.h> 24#include <plat/mcbsp.h>
25#include <plat/control.h> 25
26#include "control.h"
27
26 28
27/* McBSP internal signal muxing functions */ 29/* McBSP internal signal muxing functions */
28 30
diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c
index e33740c091be..074536ae401f 100644
--- a/arch/arm/mach-omap2/mux.c
+++ b/arch/arm/mach-omap2/mux.c
@@ -23,12 +23,11 @@
23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24 * 24 *
25 */ 25 */
26#include <linux/module.h> 26#include <linux/kernel.h>
27#include <linux/init.h> 27#include <linux/init.h>
28#include <linux/io.h> 28#include <linux/io.h>
29#include <linux/slab.h>
30#include <linux/spinlock.h>
31#include <linux/list.h> 29#include <linux/list.h>
30#include <linux/slab.h>
32#include <linux/ctype.h> 31#include <linux/ctype.h>
33#include <linux/debugfs.h> 32#include <linux/debugfs.h>
34#include <linux/seq_file.h> 33#include <linux/seq_file.h>
@@ -36,8 +35,7 @@
36 35
37#include <asm/system.h> 36#include <asm/system.h>
38 37
39#include <plat/control.h> 38#include "control.h"
40
41#include "mux.h" 39#include "mux.h"
42 40
43#define OMAP_MUX_BASE_OFFSET 0x30 /* Offset from CTRL_BASE */ 41#define OMAP_MUX_BASE_OFFSET 0x30 /* Offset from CTRL_BASE */
diff --git a/arch/arm/mach-omap2/pm24xx.c b/arch/arm/mach-omap2/pm24xx.c
index f5c7ef955942..a40457d81927 100644
--- a/arch/arm/mach-omap2/pm24xx.c
+++ b/arch/arm/mach-omap2/pm24xx.c
@@ -38,7 +38,6 @@
38#include <mach/irqs.h> 38#include <mach/irqs.h>
39#include <plat/clock.h> 39#include <plat/clock.h>
40#include <plat/sram.h> 40#include <plat/sram.h>
41#include <plat/control.h>
42#include <plat/dma.h> 41#include <plat/dma.h>
43#include <plat/board.h> 42#include <plat/board.h>
44 43
@@ -48,6 +47,7 @@
48#include "cm-regbits-24xx.h" 47#include "cm-regbits-24xx.h"
49#include "sdrc.h" 48#include "sdrc.h"
50#include "pm.h" 49#include "pm.h"
50#include "control.h"
51 51
52#include <plat/powerdomain.h> 52#include <plat/powerdomain.h>
53#include <plat/clockdomain.h> 53#include <plat/clockdomain.h>
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
index e57c9aeeefe0..8c8f1acd3526 100644
--- a/arch/arm/mach-omap2/pm34xx.c
+++ b/arch/arm/mach-omap2/pm34xx.c
@@ -32,7 +32,6 @@
32#include <plat/sram.h> 32#include <plat/sram.h>
33#include <plat/clockdomain.h> 33#include <plat/clockdomain.h>
34#include <plat/powerdomain.h> 34#include <plat/powerdomain.h>
35#include <plat/control.h>
36#include <plat/serial.h> 35#include <plat/serial.h>
37#include <plat/sdrc.h> 36#include <plat/sdrc.h>
38#include <plat/prcm.h> 37#include <plat/prcm.h>
@@ -48,6 +47,7 @@
48#include "prm.h" 47#include "prm.h"
49#include "pm.h" 48#include "pm.h"
50#include "sdrc.h" 49#include "sdrc.h"
50#include "control.h"
51 51
52/* Scratchpad offsets */ 52/* Scratchpad offsets */
53#define OMAP343X_TABLE_ADDRESS_OFFSET 0x31 53#define OMAP343X_TABLE_ADDRESS_OFFSET 0x31
diff --git a/arch/arm/mach-omap2/prcm.c b/arch/arm/mach-omap2/prcm.c
index a48a1e24f42b..a51846e3a6fa 100644
--- a/arch/arm/mach-omap2/prcm.c
+++ b/arch/arm/mach-omap2/prcm.c
@@ -26,7 +26,6 @@
26#include <plat/common.h> 26#include <plat/common.h>
27#include <plat/prcm.h> 27#include <plat/prcm.h>
28#include <plat/irqs.h> 28#include <plat/irqs.h>
29#include <plat/control.h>
30 29
31#include "clock.h" 30#include "clock.h"
32#include "clock2xxx.h" 31#include "clock2xxx.h"
@@ -34,6 +33,7 @@
34#include "prm.h" 33#include "prm.h"
35#include "prm-regbits-24xx.h" 34#include "prm-regbits-24xx.h"
36#include "prm-regbits-44xx.h" 35#include "prm-regbits-44xx.h"
36#include "control.h"
37 37
38static void __iomem *prm_base; 38static void __iomem *prm_base;
39static void __iomem *cm_base; 39static void __iomem *cm_base;
diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
index 0bcc9df0c034..338e46a844a4 100644
--- a/arch/arm/mach-omap2/serial.c
+++ b/arch/arm/mach-omap2/serial.c
@@ -35,7 +35,6 @@
35#include <plat/common.h> 35#include <plat/common.h>
36#include <plat/board.h> 36#include <plat/board.h>
37#include <plat/clock.h> 37#include <plat/clock.h>
38#include <plat/control.h>
39#include <plat/dma.h> 38#include <plat/dma.h>
40#include <plat/omap_hwmod.h> 39#include <plat/omap_hwmod.h>
41#include <plat/omap_device.h> 40#include <plat/omap_device.h>
@@ -44,6 +43,7 @@
44#include "pm.h" 43#include "pm.h"
45#include "cm.h" 44#include "cm.h"
46#include "prm-regbits-34xx.h" 45#include "prm-regbits-34xx.h"
46#include "control.h"
47 47
48#define UART_OMAP_NO_EMPTY_FIFO_READ_IP_REV 0x52 48#define UART_OMAP_NO_EMPTY_FIFO_READ_IP_REV 0x52
49#define UART_OMAP_WER 0x17 /* Wake-up enable register */ 49#define UART_OMAP_WER 0x17 /* Wake-up enable register */
diff --git a/arch/arm/mach-omap2/sleep34xx.S b/arch/arm/mach-omap2/sleep34xx.S
index ba53191ae4c5..2fb205a7f285 100644
--- a/arch/arm/mach-omap2/sleep34xx.S
+++ b/arch/arm/mach-omap2/sleep34xx.S
@@ -27,11 +27,11 @@
27#include <linux/linkage.h> 27#include <linux/linkage.h>
28#include <asm/assembler.h> 28#include <asm/assembler.h>
29#include <mach/io.h> 29#include <mach/io.h>
30#include <plat/control.h>
31 30
32#include "cm.h" 31#include "cm.h"
33#include "prm.h" 32#include "prm.h"
34#include "sdrc.h" 33#include "sdrc.h"
34#include "control.h"
35 35
36#define SDRC_SCRATCHPAD_SEM_V 0xfa00291c 36#define SDRC_SCRATCHPAD_SEM_V 0xfa00291c
37 37
diff --git a/arch/arm/mach-omap2/usb-fs.c b/arch/arm/mach-omap2/usb-fs.c
index a216d88b04b5..1481078763b8 100644
--- a/arch/arm/mach-omap2/usb-fs.c
+++ b/arch/arm/mach-omap2/usb-fs.c
@@ -29,18 +29,18 @@
29 29
30#include <asm/irq.h> 30#include <asm/irq.h>
31 31
32#include <plat/control.h>
33#include <plat/usb.h> 32#include <plat/usb.h>
34#include <plat/board.h> 33#include <plat/board.h>
35 34
35#include "control.h"
36#include "mux.h"
37
36#define INT_USB_IRQ_GEN INT_24XX_USB_IRQ_GEN 38#define INT_USB_IRQ_GEN INT_24XX_USB_IRQ_GEN
37#define INT_USB_IRQ_NISO INT_24XX_USB_IRQ_NISO 39#define INT_USB_IRQ_NISO INT_24XX_USB_IRQ_NISO
38#define INT_USB_IRQ_ISO INT_24XX_USB_IRQ_ISO 40#define INT_USB_IRQ_ISO INT_24XX_USB_IRQ_ISO
39#define INT_USB_IRQ_HGEN INT_24XX_USB_IRQ_HGEN 41#define INT_USB_IRQ_HGEN INT_24XX_USB_IRQ_HGEN
40#define INT_USB_IRQ_OTG INT_24XX_USB_IRQ_OTG 42#define INT_USB_IRQ_OTG INT_24XX_USB_IRQ_OTG
41 43
42#include "mux.h"
43
44#if defined(CONFIG_ARCH_OMAP2) 44#if defined(CONFIG_ARCH_OMAP2)
45 45
46#ifdef CONFIG_USB_GADGET_OMAP 46#ifdef CONFIG_USB_GADGET_OMAP