aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2012-09-16 23:12:26 -0400
committerOlof Johansson <olof@lixom.net>2012-09-16 23:13:04 -0400
commitf4936639bc4a75218b5598ff69c52b9a8dd7f23d (patch)
tree9c08fc81cb3d3e658ca7f8dc20a949496d9e6130 /arch/arm/mach-omap2
parentd1226e8f98f130918265fb5b4dddcb60b783eb34 (diff)
parent11964f53eb4d9ce59a058be9999d9cfcb1ced878 (diff)
Merge tag 'omap-devel-am33xx-for-v3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/soc
From Tony Lindgren: From Paul Walmsley <paul@pwsan.com>: AM33xx hwmod data and miscellaneous clock and hwmod fixes. AM33xx should now boot on mainline after this is applied, according to Vaibhav. (The shortlog makes no sense here since it contains mostly the dependent cleanups that are part of the preceding branches). Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'arch/arm/mach-omap2')
-rw-r--r--arch/arm/mach-omap2/Makefile1
-rw-r--r--arch/arm/mach-omap2/am33xx.h25
-rw-r--r--arch/arm/mach-omap2/board-2430sdp.c6
-rw-r--r--arch/arm/mach-omap2/board-3430sdp.c10
-rw-r--r--arch/arm/mach-omap2/board-3630sdp.c6
-rw-r--r--arch/arm/mach-omap2/board-4430sdp.c6
-rw-r--r--arch/arm/mach-omap2/board-am3517crane.c10
-rw-r--r--arch/arm/mach-omap2/board-am3517evm.c11
-rw-r--r--arch/arm/mach-omap2/board-apollon.c2
-rw-r--r--arch/arm/mach-omap2/board-cm-t35.c10
-rw-r--r--arch/arm/mach-omap2/board-cm-t3517.c9
-rw-r--r--arch/arm/mach-omap2/board-devkit8000.c7
-rw-r--r--arch/arm/mach-omap2/board-flash.c4
-rw-r--r--arch/arm/mach-omap2/board-generic.c2
-rw-r--r--arch/arm/mach-omap2/board-h4.c5
-rw-r--r--arch/arm/mach-omap2/board-igep0020.c5
-rw-r--r--arch/arm/mach-omap2/board-ldp.c7
-rw-r--r--arch/arm/mach-omap2/board-n8x0.c5
-rw-r--r--arch/arm/mach-omap2/board-omap3beagle.c5
-rw-r--r--arch/arm/mach-omap2/board-omap3evm.c23
-rw-r--r--arch/arm/mach-omap2/board-omap3logic.c18
-rw-r--r--arch/arm/mach-omap2/board-omap3pandora.c5
-rw-r--r--arch/arm/mach-omap2/board-omap3stalker.c15
-rw-r--r--arch/arm/mach-omap2/board-omap3touchbook.c5
-rw-r--r--arch/arm/mach-omap2/board-omap4panda.c6
-rw-r--r--arch/arm/mach-omap2/board-overo.c6
-rw-r--r--arch/arm/mach-omap2/board-rm680.c6
-rw-r--r--arch/arm/mach-omap2/board-rx51-peripherals.c6
-rw-r--r--arch/arm/mach-omap2/board-rx51.c2
-rw-r--r--arch/arm/mach-omap2/board-ti8168evm.c8
-rw-r--r--arch/arm/mach-omap2/board-zoom-debugboard.c3
-rw-r--r--arch/arm/mach-omap2/board-zoom-display.c2
-rw-r--r--arch/arm/mach-omap2/board-zoom-peripherals.c6
-rw-r--r--arch/arm/mach-omap2/board-zoom.c1
-rw-r--r--arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c2
-rw-r--r--arch/arm/mach-omap2/clkt_dpll.c6
-rw-r--r--arch/arm/mach-omap2/clock.c8
-rw-r--r--arch/arm/mach-omap2/clock2420_data.c2
-rw-r--r--arch/arm/mach-omap2/clock2430.c2
-rw-r--r--arch/arm/mach-omap2/clock2430_data.c2
-rw-r--r--arch/arm/mach-omap2/clock2xxx.c2
-rw-r--r--arch/arm/mach-omap2/clock33xx_data.c4
-rw-r--r--arch/arm/mach-omap2/clock3xxx.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/cm2xxx_3xxx.c3
-rw-r--r--arch/arm/mach-omap2/common-board-devices.c1
-rw-r--r--arch/arm/mach-omap2/common.c3
-rw-r--r--arch/arm/mach-omap2/common.h9
-rw-r--r--arch/arm/mach-omap2/control.c2
-rw-r--r--arch/arm/mach-omap2/control.h2
-rw-r--r--arch/arm/mach-omap2/cpuidle34xx.c1
-rw-r--r--arch/arm/mach-omap2/devices.c19
-rw-r--r--arch/arm/mach-omap2/dpll3xxx.c6
-rw-r--r--arch/arm/mach-omap2/dpll44xx.c2
-rw-r--r--arch/arm/mach-omap2/emu.c3
-rw-r--r--arch/arm/mach-omap2/gpio.c1
-rw-r--r--arch/arm/mach-omap2/gpmc-nand.c32
-rw-r--r--arch/arm/mach-omap2/gpmc-onenand.c27
-rw-r--r--arch/arm/mach-omap2/gpmc-smc91x.c3
-rw-r--r--arch/arm/mach-omap2/gpmc-smsc911x.c1
-rw-r--r--arch/arm/mach-omap2/gpmc.c167
-rw-r--r--arch/arm/mach-omap2/hsmmc.c2
-rw-r--r--arch/arm/mach-omap2/i2c.c1
-rw-r--r--arch/arm/mach-omap2/id.c2
-rw-r--r--arch/arm/mach-omap2/include/mach/gpio.h2
-rw-r--r--arch/arm/mach-omap2/include/mach/hardware.h2
-rw-r--r--arch/arm/mach-omap2/include/mach/irqs.h2
-rw-r--r--arch/arm/mach-omap2/io.c3
-rw-r--r--arch/arm/mach-omap2/irq.c5
-rw-r--r--arch/arm/mach-omap2/mailbox.c4
-rw-r--r--arch/arm/mach-omap2/mcbsp.c2
-rw-r--r--arch/arm/mach-omap2/msdi.c1
-rw-r--r--arch/arm/mach-omap2/omap-iommu.c12
-rw-r--r--arch/arm/mach-omap2/omap-mpuss-lowpower.c3
-rw-r--r--arch/arm/mach-omap2/omap-smp.c2
-rw-r--r--arch/arm/mach-omap2/omap-wakeupgen.c1
-rw-r--r--arch/arm/mach-omap2/omap24xx.h87
-rw-r--r--arch/arm/mach-omap2/omap34xx.h99
-rw-r--r--arch/arm/mach-omap2/omap4-common.c9
-rw-r--r--arch/arm/mach-omap2/omap44xx.h62
-rw-r--r--arch/arm/mach-omap2/omap54xx.h32
-rw-r--r--arch/arm/mach-omap2/omap_hwmod.c186
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_2420_data.c25
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_2430_data.c73
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c108
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c8
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_33xx_data.c3381
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_3xxx_data.c152
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_44xx_data.c3
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_common_data.h1
-rw-r--r--arch/arm/mach-omap2/omap_l3_noc.c5
-rw-r--r--arch/arm/mach-omap2/omap_phy_internal.c2
-rw-r--r--arch/arm/mach-omap2/opp2420_data.c2
-rw-r--r--arch/arm/mach-omap2/opp2430_data.c2
-rw-r--r--arch/arm/mach-omap2/opp3xxx_data.c2
-rw-r--r--arch/arm/mach-omap2/opp4xxx_data.c3
-rw-r--r--arch/arm/mach-omap2/pm-debug.c1
-rw-r--r--arch/arm/mach-omap2/pm24xx.c14
-rw-r--r--arch/arm/mach-omap2/pm34xx.c2
-rw-r--r--arch/arm/mach-omap2/powerdomain.c6
-rw-r--r--arch/arm/mach-omap2/powerdomains3xxx_data.c4
-rw-r--r--arch/arm/mach-omap2/prcm.c1
-rw-r--r--arch/arm/mach-omap2/prm2xxx_3xxx.c7
-rw-r--r--arch/arm/mach-omap2/prm44xx.c5
-rw-r--r--arch/arm/mach-omap2/prm_common.c1
-rw-r--r--arch/arm/mach-omap2/sdrc2xxx.c2
-rw-r--r--arch/arm/mach-omap2/serial.c20
-rw-r--r--arch/arm/mach-omap2/sleep24xx.S3
-rw-r--r--arch/arm/mach-omap2/sleep34xx.S2
-rw-r--r--arch/arm/mach-omap2/sleep44xx.S2
-rw-r--r--arch/arm/mach-omap2/soc.h7
-rw-r--r--arch/arm/mach-omap2/sram242x.S3
-rw-r--r--arch/arm/mach-omap2/sram243x.S3
-rw-r--r--arch/arm/mach-omap2/sram34xx.S3
-rw-r--r--arch/arm/mach-omap2/ti81xx.h27
-rw-r--r--arch/arm/mach-omap2/timer.c9
-rw-r--r--arch/arm/mach-omap2/twl-common.c3
-rw-r--r--arch/arm/mach-omap2/twl-common.h6
-rw-r--r--arch/arm/mach-omap2/usb-host.c2
-rw-r--r--arch/arm/mach-omap2/usb-musb.c7
-rw-r--r--arch/arm/mach-omap2/vc.c3
-rw-r--r--arch/arm/mach-omap2/voltagedomains3xxx_data.c3
123 files changed, 4458 insertions, 538 deletions
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index f6a24b3f9c4f..b3603282d75f 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -194,6 +194,7 @@ obj-$(CONFIG_SOC_OMAP2430) += omap_hwmod_2430_data.o
194obj-$(CONFIG_ARCH_OMAP3) += omap_hwmod_2xxx_3xxx_ipblock_data.o 194obj-$(CONFIG_ARCH_OMAP3) += omap_hwmod_2xxx_3xxx_ipblock_data.o
195obj-$(CONFIG_ARCH_OMAP3) += omap_hwmod_2xxx_3xxx_interconnect_data.o 195obj-$(CONFIG_ARCH_OMAP3) += omap_hwmod_2xxx_3xxx_interconnect_data.o
196obj-$(CONFIG_ARCH_OMAP3) += omap_hwmod_3xxx_data.o 196obj-$(CONFIG_ARCH_OMAP3) += omap_hwmod_3xxx_data.o
197obj-$(CONFIG_SOC_AM33XX) += omap_hwmod_33xx_data.o
197obj-$(CONFIG_ARCH_OMAP4) += omap_hwmod_44xx_data.o 198obj-$(CONFIG_ARCH_OMAP4) += omap_hwmod_44xx_data.o
198 199
199# EMU peripherals 200# EMU peripherals
diff --git a/arch/arm/mach-omap2/am33xx.h b/arch/arm/mach-omap2/am33xx.h
new file mode 100644
index 000000000000..06c19bb7bca6
--- /dev/null
+++ b/arch/arm/mach-omap2/am33xx.h
@@ -0,0 +1,25 @@
1/*
2 * This file contains the address info for various AM33XX modules.
3 *
4 * Copyright (C) 2011 Texas Instruments, Inc. - http://www.ti.com/
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License as
8 * published by the Free Software Foundation version 2.
9 *
10 * This program is distributed "as is" WITHOUT ANY WARRANTY of any
11 * kind, whether express or implied; without even the implied warranty
12 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 */
15
16#ifndef __ASM_ARCH_AM33XX_H
17#define __ASM_ARCH_AM33XX_H
18
19#define L4_SLOW_AM33XX_BASE 0x48000000
20
21#define AM33XX_SCM_BASE 0x44E10000
22#define AM33XX_CTRL_BASE AM33XX_SCM_BASE
23#define AM33XX_PRCM_BASE 0x44E00000
24
25#endif /* __ASM_ARCH_AM33XX_H */
diff --git a/arch/arm/mach-omap2/board-2430sdp.c b/arch/arm/mach-omap2/board-2430sdp.c
index 9511584fdc4f..0900eac57d56 100644
--- a/arch/arm/mach-omap2/board-2430sdp.c
+++ b/arch/arm/mach-omap2/board-2430sdp.c
@@ -33,7 +33,6 @@
33#include <asm/mach/arch.h> 33#include <asm/mach/arch.h>
34#include <asm/mach/map.h> 34#include <asm/mach/map.h>
35 35
36#include <plat/board.h>
37#include "common.h" 36#include "common.h"
38#include <plat/gpmc.h> 37#include <plat/gpmc.h>
39#include <plat/usb.h> 38#include <plat/usb.h>
@@ -212,9 +211,6 @@ static struct regulator_init_data sdp2430_vmmc1 = {
212}; 211};
213 212
214static struct twl4030_gpio_platform_data sdp2430_gpio_data = { 213static struct twl4030_gpio_platform_data sdp2430_gpio_data = {
215 .gpio_base = OMAP_MAX_GPIO_LINES,
216 .irq_base = TWL4030_GPIO_IRQ_BASE,
217 .irq_end = TWL4030_GPIO_IRQ_END,
218}; 214};
219 215
220static struct twl4030_platform_data sdp2430_twldata = { 216static struct twl4030_platform_data sdp2430_twldata = {
@@ -235,7 +231,7 @@ static int __init omap2430_i2c_init(void)
235 sdp2430_i2c1_boardinfo[0].irq = gpio_to_irq(78); 231 sdp2430_i2c1_boardinfo[0].irq = gpio_to_irq(78);
236 omap_register_i2c_bus(1, 100, sdp2430_i2c1_boardinfo, 232 omap_register_i2c_bus(1, 100, sdp2430_i2c1_boardinfo,
237 ARRAY_SIZE(sdp2430_i2c1_boardinfo)); 233 ARRAY_SIZE(sdp2430_i2c1_boardinfo));
238 omap_pmic_init(2, 100, "twl4030", INT_24XX_SYS_NIRQ, 234 omap_pmic_init(2, 100, "twl4030", 7 + OMAP_INTC_START,
239 &sdp2430_twldata); 235 &sdp2430_twldata);
240 return 0; 236 return 0;
241} 237}
diff --git a/arch/arm/mach-omap2/board-3430sdp.c b/arch/arm/mach-omap2/board-3430sdp.c
index a98c688058a9..5453173ff57b 100644
--- a/arch/arm/mach-omap2/board-3430sdp.c
+++ b/arch/arm/mach-omap2/board-3430sdp.c
@@ -25,13 +25,11 @@
25#include <linux/gpio.h> 25#include <linux/gpio.h>
26#include <linux/mmc/host.h> 26#include <linux/mmc/host.h>
27 27
28#include <mach/hardware.h>
29#include <asm/mach-types.h> 28#include <asm/mach-types.h>
30#include <asm/mach/arch.h> 29#include <asm/mach/arch.h>
31#include <asm/mach/map.h> 30#include <asm/mach/map.h>
32 31
33#include <plat/mcspi.h> 32#include <plat/mcspi.h>
34#include <plat/board.h>
35#include <plat/usb.h> 33#include <plat/usb.h>
36#include "common.h" 34#include "common.h"
37#include <plat/dma.h> 35#include <plat/dma.h>
@@ -191,9 +189,6 @@ static struct omap_dss_board_info sdp3430_dss_data = {
191 .default_device = &sdp3430_lcd_device, 189 .default_device = &sdp3430_lcd_device,
192}; 190};
193 191
194static struct omap_board_config_kernel sdp3430_config[] __initdata = {
195};
196
197static struct omap2_hsmmc_info mmc[] = { 192static struct omap2_hsmmc_info mmc[] = {
198 { 193 {
199 .mmc = 1, 194 .mmc = 1,
@@ -233,9 +228,6 @@ static int sdp3430_twl_gpio_setup(struct device *dev,
233} 228}
234 229
235static struct twl4030_gpio_platform_data sdp3430_gpio_data = { 230static struct twl4030_gpio_platform_data sdp3430_gpio_data = {
236 .gpio_base = OMAP_MAX_GPIO_LINES,
237 .irq_base = TWL4030_GPIO_IRQ_BASE,
238 .irq_end = TWL4030_GPIO_IRQ_END,
239 .pulldowns = BIT(2) | BIT(6) | BIT(8) | BIT(13) 231 .pulldowns = BIT(2) | BIT(6) | BIT(8) | BIT(13)
240 | BIT(16) | BIT(17), 232 | BIT(16) | BIT(17),
241 .setup = sdp3430_twl_gpio_setup, 233 .setup = sdp3430_twl_gpio_setup,
@@ -576,8 +568,6 @@ static void __init omap_3430sdp_init(void)
576 int gpio_pendown; 568 int gpio_pendown;
577 569
578 omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); 570 omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
579 omap_board_config = sdp3430_config;
580 omap_board_config_size = ARRAY_SIZE(sdp3430_config);
581 omap_hsmmc_init(mmc); 571 omap_hsmmc_init(mmc);
582 omap3430_i2c_init(); 572 omap3430_i2c_init();
583 omap_display_init(&sdp3430_dss_data); 573 omap_display_init(&sdp3430_dss_data);
diff --git a/arch/arm/mach-omap2/board-3630sdp.c b/arch/arm/mach-omap2/board-3630sdp.c
index 2dc9ba523c7a..8518b1345988 100644
--- a/arch/arm/mach-omap2/board-3630sdp.c
+++ b/arch/arm/mach-omap2/board-3630sdp.c
@@ -17,7 +17,6 @@
17#include <asm/mach/arch.h> 17#include <asm/mach/arch.h>
18 18
19#include "common.h" 19#include "common.h"
20#include <plat/board.h>
21#include <plat/gpmc-smc91x.h> 20#include <plat/gpmc-smc91x.h>
22#include <plat/usb.h> 21#include <plat/usb.h>
23 22
@@ -67,9 +66,6 @@ static const struct usbhs_omap_board_data usbhs_bdata __initconst = {
67 .reset_gpio_port[2] = -EINVAL 66 .reset_gpio_port[2] = -EINVAL
68}; 67};
69 68
70static struct omap_board_config_kernel sdp_config[] __initdata = {
71};
72
73#ifdef CONFIG_OMAP_MUX 69#ifdef CONFIG_OMAP_MUX
74static struct omap_board_mux board_mux[] __initdata = { 70static struct omap_board_mux board_mux[] __initdata = {
75 { .reg_offset = OMAP_MUX_TERMINATOR }, 71 { .reg_offset = OMAP_MUX_TERMINATOR },
@@ -197,8 +193,6 @@ static struct flash_partitions sdp_flash_partitions[] = {
197static void __init omap_sdp_init(void) 193static void __init omap_sdp_init(void)
198{ 194{
199 omap3_mux_init(board_mux, OMAP_PACKAGE_CBP); 195 omap3_mux_init(board_mux, OMAP_PACKAGE_CBP);
200 omap_board_config = sdp_config;
201 omap_board_config_size = ARRAY_SIZE(sdp_config);
202 zoom_peripherals_init(); 196 zoom_peripherals_init();
203 omap_sdrc_init(h8mbx00u0mer0em_sdrc_params, 197 omap_sdrc_init(h8mbx00u0mer0em_sdrc_params,
204 h8mbx00u0mer0em_sdrc_params); 198 h8mbx00u0mer0em_sdrc_params);
diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c
index ad8a7d94afcd..db43e22526c0 100644
--- a/arch/arm/mach-omap2/board-4430sdp.c
+++ b/arch/arm/mach-omap2/board-4430sdp.c
@@ -28,13 +28,11 @@
28#include <linux/leds_pwm.h> 28#include <linux/leds_pwm.h>
29#include <linux/platform_data/omap4-keypad.h> 29#include <linux/platform_data/omap4-keypad.h>
30 30
31#include <mach/hardware.h>
32#include <asm/hardware/gic.h> 31#include <asm/hardware/gic.h>
33#include <asm/mach-types.h> 32#include <asm/mach-types.h>
34#include <asm/mach/arch.h> 33#include <asm/mach/arch.h>
35#include <asm/mach/map.h> 34#include <asm/mach/map.h>
36 35
37#include <plat/board.h>
38#include "common.h" 36#include "common.h"
39#include <plat/usb.h> 37#include <plat/usb.h>
40#include <plat/mmc.h> 38#include <plat/mmc.h>
@@ -45,6 +43,7 @@
45#include <linux/wl12xx.h> 43#include <linux/wl12xx.h>
46#include <linux/platform_data/omap-abe-twl6040.h> 44#include <linux/platform_data/omap-abe-twl6040.h>
47 45
46#include "soc.h"
48#include "mux.h" 47#include "mux.h"
49#include "hsmmc.h" 48#include "hsmmc.h"
50#include "control.h" 49#include "control.h"
@@ -544,7 +543,6 @@ static struct twl6040_platform_data twl6040_data = {
544 .codec = &twl6040_codec, 543 .codec = &twl6040_codec,
545 .vibra = &twl6040_vibra, 544 .vibra = &twl6040_vibra,
546 .audpwron_gpio = 127, 545 .audpwron_gpio = 127,
547 .irq_base = TWL6040_CODEC_IRQ_BASE,
548}; 546};
549 547
550static struct twl4030_platform_data sdp4430_twldata = { 548static struct twl4030_platform_data sdp4430_twldata = {
@@ -581,7 +579,7 @@ static int __init omap4_i2c_init(void)
581 TWL_COMMON_REGULATOR_V1V8 | 579 TWL_COMMON_REGULATOR_V1V8 |
582 TWL_COMMON_REGULATOR_V2V1); 580 TWL_COMMON_REGULATOR_V2V1);
583 omap4_pmic_init("twl6030", &sdp4430_twldata, 581 omap4_pmic_init("twl6030", &sdp4430_twldata,
584 &twl6040_data, OMAP44XX_IRQ_SYS_2N); 582 &twl6040_data, 119 + OMAP44XX_IRQ_GIC_START);
585 omap_register_i2c_bus(2, 400, NULL, 0); 583 omap_register_i2c_bus(2, 400, NULL, 0);
586 omap_register_i2c_bus(3, 400, sdp4430_i2c_3_boardinfo, 584 omap_register_i2c_bus(3, 400, sdp4430_i2c_3_boardinfo,
587 ARRAY_SIZE(sdp4430_i2c_3_boardinfo)); 585 ARRAY_SIZE(sdp4430_i2c_3_boardinfo));
diff --git a/arch/arm/mach-omap2/board-am3517crane.c b/arch/arm/mach-omap2/board-am3517crane.c
index 92432c28673d..318feadb1d6e 100644
--- a/arch/arm/mach-omap2/board-am3517crane.c
+++ b/arch/arm/mach-omap2/board-am3517crane.c
@@ -21,12 +21,10 @@
21#include <linux/init.h> 21#include <linux/init.h>
22#include <linux/gpio.h> 22#include <linux/gpio.h>
23 23
24#include <mach/hardware.h>
25#include <asm/mach-types.h> 24#include <asm/mach-types.h>
26#include <asm/mach/arch.h> 25#include <asm/mach/arch.h>
27#include <asm/mach/map.h> 26#include <asm/mach/map.h>
28 27
29#include <plat/board.h>
30#include "common.h" 28#include "common.h"
31#include <plat/usb.h> 29#include <plat/usb.h>
32 30
@@ -37,11 +35,6 @@
37#define GPIO_USB_POWER 35 35#define GPIO_USB_POWER 35
38#define GPIO_USB_NRESET 38 36#define GPIO_USB_NRESET 38
39 37
40
41/* Board initialization */
42static struct omap_board_config_kernel am3517_crane_config[] __initdata = {
43};
44
45#ifdef CONFIG_OMAP_MUX 38#ifdef CONFIG_OMAP_MUX
46static struct omap_board_mux board_mux[] __initdata = { 39static struct omap_board_mux board_mux[] __initdata = {
47 { .reg_offset = OMAP_MUX_TERMINATOR }, 40 { .reg_offset = OMAP_MUX_TERMINATOR },
@@ -67,9 +60,6 @@ static void __init am3517_crane_init(void)
67 omap_serial_init(); 60 omap_serial_init();
68 omap_sdrc_init(NULL, NULL); 61 omap_sdrc_init(NULL, NULL);
69 62
70 omap_board_config = am3517_crane_config;
71 omap_board_config_size = ARRAY_SIZE(am3517_crane_config);
72
73 /* Configure GPIO for EHCI port */ 63 /* Configure GPIO for EHCI port */
74 if (omap_mux_init_gpio(GPIO_USB_NRESET, OMAP_PIN_OUTPUT)) { 64 if (omap_mux_init_gpio(GPIO_USB_NRESET, OMAP_PIN_OUTPUT)) {
75 pr_err("Can not configure mux for GPIO_USB_NRESET %d\n", 65 pr_err("Can not configure mux for GPIO_USB_NRESET %d\n",
diff --git a/arch/arm/mach-omap2/board-am3517evm.c b/arch/arm/mach-omap2/board-am3517evm.c
index 18f601096ce1..403d048a00ee 100644
--- a/arch/arm/mach-omap2/board-am3517evm.c
+++ b/arch/arm/mach-omap2/board-am3517evm.c
@@ -25,14 +25,13 @@
25#include <linux/can/platform/ti_hecc.h> 25#include <linux/can/platform/ti_hecc.h>
26#include <linux/davinci_emac.h> 26#include <linux/davinci_emac.h>
27#include <linux/mmc/host.h> 27#include <linux/mmc/host.h>
28#include <linux/platform_data/gpio-omap.h>
28 29
29#include <mach/hardware.h>
30#include <mach/am35xx.h> 30#include <mach/am35xx.h>
31#include <asm/mach-types.h> 31#include <asm/mach-types.h>
32#include <asm/mach/arch.h> 32#include <asm/mach/arch.h>
33#include <asm/mach/map.h> 33#include <asm/mach/map.h>
34 34
35#include <plat/board.h>
36#include "common.h" 35#include "common.h"
37#include <plat/usb.h> 36#include <plat/usb.h>
38#include <video/omapdss.h> 37#include <video/omapdss.h>
@@ -296,8 +295,7 @@ static struct resource am3517_hecc_resources[] = {
296 .flags = IORESOURCE_MEM, 295 .flags = IORESOURCE_MEM,
297 }, 296 },
298 { 297 {
299 .start = INT_35XX_HECC0_IRQ, 298 .start = 24 + OMAP_INTC_START,
300 .end = INT_35XX_HECC0_IRQ,
301 .flags = IORESOURCE_IRQ, 299 .flags = IORESOURCE_IRQ,
302 }, 300 },
303}; 301};
@@ -324,9 +322,6 @@ static void am3517_evm_hecc_init(struct ti_hecc_platform_data *pdata)
324 platform_device_register(&am3517_hecc_device); 322 platform_device_register(&am3517_hecc_device);
325} 323}
326 324
327static struct omap_board_config_kernel am3517_evm_config[] __initdata = {
328};
329
330static struct omap2_hsmmc_info mmc[] = { 325static struct omap2_hsmmc_info mmc[] = {
331 { 326 {
332 .mmc = 1, 327 .mmc = 1,
@@ -346,8 +341,6 @@ static struct omap2_hsmmc_info mmc[] = {
346 341
347static void __init am3517_evm_init(void) 342static void __init am3517_evm_init(void)
348{ 343{
349 omap_board_config = am3517_evm_config;
350 omap_board_config_size = ARRAY_SIZE(am3517_evm_config);
351 omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); 344 omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
352 345
353 am3517_evm_i2c_init(); 346 am3517_evm_i2c_init();
diff --git a/arch/arm/mach-omap2/board-apollon.c b/arch/arm/mach-omap2/board-apollon.c
index e5fa46bfde2f..3e2d76f05af4 100644
--- a/arch/arm/mach-omap2/board-apollon.c
+++ b/arch/arm/mach-omap2/board-apollon.c
@@ -29,13 +29,11 @@
29#include <linux/smc91x.h> 29#include <linux/smc91x.h>
30#include <linux/gpio.h> 30#include <linux/gpio.h>
31 31
32#include <mach/hardware.h>
33#include <asm/mach-types.h> 32#include <asm/mach-types.h>
34#include <asm/mach/arch.h> 33#include <asm/mach/arch.h>
35#include <asm/mach/flash.h> 34#include <asm/mach/flash.h>
36 35
37#include <plat/led.h> 36#include <plat/led.h>
38#include <plat/board.h>
39#include "common.h" 37#include "common.h"
40#include <plat/gpmc.h> 38#include <plat/gpmc.h>
41 39
diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c
index 97d719047af3..34cb90471d96 100644
--- a/arch/arm/mach-omap2/board-cm-t35.c
+++ b/arch/arm/mach-omap2/board-cm-t35.c
@@ -23,6 +23,7 @@
23#include <linux/input/matrix_keypad.h> 23#include <linux/input/matrix_keypad.h>
24#include <linux/delay.h> 24#include <linux/delay.h>
25#include <linux/gpio.h> 25#include <linux/gpio.h>
26#include <linux/platform_data/gpio-omap.h>
26 27
27#include <linux/i2c/at24.h> 28#include <linux/i2c/at24.h>
28#include <linux/i2c/twl.h> 29#include <linux/i2c/twl.h>
@@ -37,7 +38,6 @@
37#include <asm/mach/arch.h> 38#include <asm/mach/arch.h>
38#include <asm/mach/map.h> 39#include <asm/mach/map.h>
39 40
40#include <plat/board.h>
41#include "common.h" 41#include "common.h"
42#include <plat/nand.h> 42#include <plat/nand.h>
43#include <plat/gpmc.h> 43#include <plat/gpmc.h>
@@ -470,9 +470,6 @@ static int cm_t35_twl_gpio_setup(struct device *dev, unsigned gpio,
470} 470}
471 471
472static struct twl4030_gpio_platform_data cm_t35_gpio_data = { 472static struct twl4030_gpio_platform_data cm_t35_gpio_data = {
473 .gpio_base = OMAP_MAX_GPIO_LINES,
474 .irq_base = TWL4030_GPIO_IRQ_BASE,
475 .irq_end = TWL4030_GPIO_IRQ_END,
476 .setup = cm_t35_twl_gpio_setup, 473 .setup = cm_t35_twl_gpio_setup,
477}; 474};
478 475
@@ -714,13 +711,8 @@ static inline void cm_t35_init_mux(void) {}
714static inline void cm_t3730_init_mux(void) {} 711static inline void cm_t3730_init_mux(void) {}
715#endif 712#endif
716 713
717static struct omap_board_config_kernel cm_t35_config[] __initdata = {
718};
719
720static void __init cm_t3x_common_init(void) 714static void __init cm_t3x_common_init(void)
721{ 715{
722 omap_board_config = cm_t35_config;
723 omap_board_config_size = ARRAY_SIZE(cm_t35_config);
724 omap3_mux_init(board_mux, OMAP_PACKAGE_CUS); 716 omap3_mux_init(board_mux, OMAP_PACKAGE_CUS);
725 omap_serial_init(); 717 omap_serial_init();
726 omap_sdrc_init(mt46h32m32lf6_sdrc_params, 718 omap_sdrc_init(mt46h32m32lf6_sdrc_params,
diff --git a/arch/arm/mach-omap2/board-cm-t3517.c b/arch/arm/mach-omap2/board-cm-t3517.c
index a33ad4641d9a..27a5450751ed 100644
--- a/arch/arm/mach-omap2/board-cm-t3517.c
+++ b/arch/arm/mach-omap2/board-cm-t3517.c
@@ -38,7 +38,6 @@
38#include <asm/mach/arch.h> 38#include <asm/mach/arch.h>
39#include <asm/mach/map.h> 39#include <asm/mach/map.h>
40 40
41#include <plat/board.h>
42#include "common.h" 41#include "common.h"
43#include <plat/usb.h> 42#include <plat/usb.h>
44#include <plat/nand.h> 43#include <plat/nand.h>
@@ -90,8 +89,7 @@ static struct resource cm_t3517_hecc_resources[] = {
90 .flags = IORESOURCE_MEM, 89 .flags = IORESOURCE_MEM,
91 }, 90 },
92 { 91 {
93 .start = INT_35XX_HECC0_IRQ, 92 .start = 24 + OMAP_INTC_START,
94 .end = INT_35XX_HECC0_IRQ,
95 .flags = IORESOURCE_IRQ, 93 .flags = IORESOURCE_IRQ,
96 }, 94 },
97}; 95};
@@ -249,9 +247,6 @@ static void __init cm_t3517_init_nand(void)
249static inline void cm_t3517_init_nand(void) {} 247static inline void cm_t3517_init_nand(void) {}
250#endif 248#endif
251 249
252static struct omap_board_config_kernel cm_t3517_config[] __initdata = {
253};
254
255#ifdef CONFIG_OMAP_MUX 250#ifdef CONFIG_OMAP_MUX
256static struct omap_board_mux board_mux[] __initdata = { 251static struct omap_board_mux board_mux[] __initdata = {
257 /* GPIO186 - Green LED */ 252 /* GPIO186 - Green LED */
@@ -285,8 +280,6 @@ static void __init cm_t3517_init(void)
285 omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); 280 omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
286 omap_serial_init(); 281 omap_serial_init();
287 omap_sdrc_init(NULL, NULL); 282 omap_sdrc_init(NULL, NULL);
288 omap_board_config = cm_t3517_config;
289 omap_board_config_size = ARRAY_SIZE(cm_t3517_config);
290 cm_t3517_init_leds(); 283 cm_t3517_init_leds();
291 cm_t3517_init_nand(); 284 cm_t3517_init_nand();
292 cm_t3517_init_rtc(); 285 cm_t3517_init_rtc();
diff --git a/arch/arm/mach-omap2/board-devkit8000.c b/arch/arm/mach-omap2/board-devkit8000.c
index 6567c1cd5572..18b63ad56274 100644
--- a/arch/arm/mach-omap2/board-devkit8000.c
+++ b/arch/arm/mach-omap2/board-devkit8000.c
@@ -32,15 +32,12 @@
32 32
33#include <linux/regulator/machine.h> 33#include <linux/regulator/machine.h>
34#include <linux/i2c/twl.h> 34#include <linux/i2c/twl.h>
35
36#include <mach/hardware.h>
37#include <mach/id.h> 35#include <mach/id.h>
38#include <asm/mach-types.h> 36#include <asm/mach-types.h>
39#include <asm/mach/arch.h> 37#include <asm/mach/arch.h>
40#include <asm/mach/map.h> 38#include <asm/mach/map.h>
41#include <asm/mach/flash.h> 39#include <asm/mach/flash.h>
42 40
43#include <plat/board.h>
44#include "common.h" 41#include "common.h"
45#include <plat/gpmc.h> 42#include <plat/gpmc.h>
46#include <plat/nand.h> 43#include <plat/nand.h>
@@ -56,7 +53,6 @@
56#include <linux/interrupt.h> 53#include <linux/interrupt.h>
57 54
58#include "sdram-micron-mt46h32m32lf-6.h" 55#include "sdram-micron-mt46h32m32lf-6.h"
59
60#include "mux.h" 56#include "mux.h"
61#include "hsmmc.h" 57#include "hsmmc.h"
62#include "common-board-devices.h" 58#include "common-board-devices.h"
@@ -236,9 +232,6 @@ static int devkit8000_twl_gpio_setup(struct device *dev,
236} 232}
237 233
238static struct twl4030_gpio_platform_data devkit8000_gpio_data = { 234static struct twl4030_gpio_platform_data devkit8000_gpio_data = {
239 .gpio_base = OMAP_MAX_GPIO_LINES,
240 .irq_base = TWL4030_GPIO_IRQ_BASE,
241 .irq_end = TWL4030_GPIO_IRQ_END,
242 .use_leds = true, 235 .use_leds = true,
243 .pulldowns = BIT(1) | BIT(2) | BIT(6) | BIT(8) | BIT(13) 236 .pulldowns = BIT(1) | BIT(2) | BIT(6) | BIT(8) | BIT(13)
244 | BIT(15) | BIT(16) | BIT(17), 237 | BIT(15) | BIT(16) | BIT(17),
diff --git a/arch/arm/mach-omap2/board-flash.c b/arch/arm/mach-omap2/board-flash.c
index 53c39d239d6e..9017813f9abc 100644
--- a/arch/arm/mach-omap2/board-flash.c
+++ b/arch/arm/mach-omap2/board-flash.c
@@ -16,13 +16,14 @@
16#include <linux/platform_device.h> 16#include <linux/platform_device.h>
17#include <linux/mtd/physmap.h> 17#include <linux/mtd/physmap.h>
18#include <linux/io.h> 18#include <linux/io.h>
19#include <plat/irqs.h>
20 19
20#include <plat/cpu.h>
21#include <plat/gpmc.h> 21#include <plat/gpmc.h>
22#include <plat/nand.h> 22#include <plat/nand.h>
23#include <plat/onenand.h> 23#include <plat/onenand.h>
24#include <plat/tc.h> 24#include <plat/tc.h>
25 25
26#include "common.h"
26#include "board-flash.h" 27#include "board-flash.h"
27 28
28#define REG_FPGA_REV 0x10 29#define REG_FPGA_REV 0x10
@@ -140,7 +141,6 @@ __init board_nand_init(struct mtd_partition *nand_parts,
140 board_nand_data.devsize = nand_type; 141 board_nand_data.devsize = nand_type;
141 142
142 board_nand_data.ecc_opt = OMAP_ECC_HAMMING_CODE_DEFAULT; 143 board_nand_data.ecc_opt = OMAP_ECC_HAMMING_CODE_DEFAULT;
143 board_nand_data.gpmc_irq = OMAP_GPMC_IRQ_BASE + cs;
144 gpmc_nand_init(&board_nand_data); 144 gpmc_nand_init(&board_nand_data);
145} 145}
146#endif /* CONFIG_MTD_NAND_OMAP2 || CONFIG_MTD_NAND_OMAP2_MODULE */ 146#endif /* CONFIG_MTD_NAND_OMAP2 || CONFIG_MTD_NAND_OMAP2_MODULE */
diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c
index 6f93a20536ea..2ea7c577b295 100644
--- a/arch/arm/mach-omap2/board-generic.c
+++ b/arch/arm/mach-omap2/board-generic.c
@@ -16,11 +16,9 @@
16#include <linux/of_platform.h> 16#include <linux/of_platform.h>
17#include <linux/irqdomain.h> 17#include <linux/irqdomain.h>
18 18
19#include <mach/hardware.h>
20#include <asm/hardware/gic.h> 19#include <asm/hardware/gic.h>
21#include <asm/mach/arch.h> 20#include <asm/mach/arch.h>
22 21
23#include <plat/board.h>
24#include "common.h" 22#include "common.h"
25#include "common-board-devices.h" 23#include "common-board-devices.h"
26 24
diff --git a/arch/arm/mach-omap2/board-h4.c b/arch/arm/mach-omap2/board-h4.c
index ace20482e3e1..12569cb0eddd 100644
--- a/arch/arm/mach-omap2/board-h4.c
+++ b/arch/arm/mach-omap2/board-h4.c
@@ -27,20 +27,19 @@
27#include <linux/io.h> 27#include <linux/io.h>
28#include <linux/input/matrix_keypad.h> 28#include <linux/input/matrix_keypad.h>
29 29
30#include <mach/hardware.h>
31#include <asm/mach-types.h> 30#include <asm/mach-types.h>
32#include <asm/mach/arch.h> 31#include <asm/mach/arch.h>
33#include <asm/mach/map.h> 32#include <asm/mach/map.h>
34 33
35#include <plat/board.h>
36#include "common.h"
37#include <plat/menelaus.h> 34#include <plat/menelaus.h>
38#include <plat/dma.h> 35#include <plat/dma.h>
39#include <plat/gpmc.h> 36#include <plat/gpmc.h>
37#include <plat/debug-devices.h>
40 38
41#include <video/omapdss.h> 39#include <video/omapdss.h>
42#include <video/omap-panel-generic-dpi.h> 40#include <video/omap-panel-generic-dpi.h>
43 41
42#include "common.h"
44#include "mux.h" 43#include "mux.h"
45#include "control.h" 44#include "control.h"
46 45
diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c
index 28214483aaba..8408bb2748a6 100644
--- a/arch/arm/mach-omap2/board-igep0020.c
+++ b/arch/arm/mach-omap2/board-igep0020.c
@@ -29,10 +29,10 @@
29#include <asm/mach-types.h> 29#include <asm/mach-types.h>
30#include <asm/mach/arch.h> 30#include <asm/mach/arch.h>
31 31
32#include <plat/board.h>
33#include "common.h" 32#include "common.h"
34#include <plat/gpmc.h> 33#include <plat/gpmc.h>
35#include <plat/usb.h> 34#include <plat/usb.h>
35
36#include <video/omapdss.h> 36#include <video/omapdss.h>
37#include <video/omap-panel-tfp410.h> 37#include <video/omap-panel-tfp410.h>
38#include <plat/onenand.h> 38#include <plat/onenand.h>
@@ -425,9 +425,6 @@ static int igep_twl_gpio_setup(struct device *dev,
425}; 425};
426 426
427static struct twl4030_gpio_platform_data igep_twl4030_gpio_pdata = { 427static struct twl4030_gpio_platform_data igep_twl4030_gpio_pdata = {
428 .gpio_base = OMAP_MAX_GPIO_LINES,
429 .irq_base = TWL4030_GPIO_IRQ_BASE,
430 .irq_end = TWL4030_GPIO_IRQ_END,
431 .use_leds = true, 428 .use_leds = true,
432 .setup = igep_twl_gpio_setup, 429 .setup = igep_twl_gpio_setup,
433}; 430};
diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c
index ef9e82977499..3f3a552b1036 100644
--- a/arch/arm/mach-omap2/board-ldp.c
+++ b/arch/arm/mach-omap2/board-ldp.c
@@ -29,18 +29,14 @@
29#include <linux/smsc911x.h> 29#include <linux/smsc911x.h>
30#include <linux/mmc/host.h> 30#include <linux/mmc/host.h>
31 31
32#include <mach/hardware.h>
33#include <asm/mach-types.h> 32#include <asm/mach-types.h>
34#include <asm/mach/arch.h> 33#include <asm/mach/arch.h>
35#include <asm/mach/map.h> 34#include <asm/mach/map.h>
36 35
37#include <plat/mcspi.h> 36#include <plat/mcspi.h>
38#include <plat/board.h>
39#include "common.h" 37#include "common.h"
40#include <plat/gpmc.h> 38#include <plat/gpmc.h>
41#include <mach/board-zoom.h> 39#include <mach/board-zoom.h>
42
43#include <asm/delay.h>
44#include <plat/usb.h> 40#include <plat/usb.h>
45#include <plat/gpmc-smsc911x.h> 41#include <plat/gpmc-smsc911x.h>
46 42
@@ -275,9 +271,6 @@ static int ldp_twl_gpio_setup(struct device *dev, unsigned gpio, unsigned ngpio)
275} 271}
276 272
277static struct twl4030_gpio_platform_data ldp_gpio_data = { 273static struct twl4030_gpio_platform_data ldp_gpio_data = {
278 .gpio_base = OMAP_MAX_GPIO_LINES,
279 .irq_base = TWL4030_GPIO_IRQ_BASE,
280 .irq_end = TWL4030_GPIO_IRQ_END,
281 .setup = ldp_twl_gpio_setup, 274 .setup = ldp_twl_gpio_setup,
282}; 275};
283 276
diff --git a/arch/arm/mach-omap2/board-n8x0.c b/arch/arm/mach-omap2/board-n8x0.c
index 677357ff61ac..d8deaea37dca 100644
--- a/arch/arm/mach-omap2/board-n8x0.c
+++ b/arch/arm/mach-omap2/board-n8x0.c
@@ -25,14 +25,11 @@
25#include <asm/mach/arch.h> 25#include <asm/mach/arch.h>
26#include <asm/mach-types.h> 26#include <asm/mach-types.h>
27 27
28#include <plat/board.h>
29#include "common.h" 28#include "common.h"
30#include <plat/menelaus.h> 29#include <plat/menelaus.h>
31#include <mach/irqs.h>
32#include <plat/mcspi.h> 30#include <plat/mcspi.h>
33#include <plat/onenand.h> 31#include <plat/onenand.h>
34#include <plat/mmc.h> 32#include <plat/mmc.h>
35#include <plat/serial.h>
36 33
37#include "mux.h" 34#include "mux.h"
38 35
@@ -600,7 +597,7 @@ static struct menelaus_platform_data n8x0_menelaus_platform_data __initdata = {
600static struct i2c_board_info __initdata n8x0_i2c_board_info_1[] __initdata = { 597static struct i2c_board_info __initdata n8x0_i2c_board_info_1[] __initdata = {
601 { 598 {
602 I2C_BOARD_INFO("menelaus", 0x72), 599 I2C_BOARD_INFO("menelaus", 0x72),
603 .irq = INT_24XX_SYS_NIRQ, 600 .irq = 7 + OMAP_INTC_START,
604 .platform_data = &n8x0_menelaus_platform_data, 601 .platform_data = &n8x0_menelaus_platform_data,
605 }, 602 },
606}; 603};
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
index 6202fc76e490..801bcb4c5e22 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -33,13 +33,11 @@
33#include <linux/regulator/machine.h> 33#include <linux/regulator/machine.h>
34#include <linux/i2c/twl.h> 34#include <linux/i2c/twl.h>
35 35
36#include <mach/hardware.h>
37#include <asm/mach-types.h> 36#include <asm/mach-types.h>
38#include <asm/mach/arch.h> 37#include <asm/mach/arch.h>
39#include <asm/mach/map.h> 38#include <asm/mach/map.h>
40#include <asm/mach/flash.h> 39#include <asm/mach/flash.h>
41 40
42#include <plat/board.h>
43#include "common.h" 41#include "common.h"
44#include <video/omapdss.h> 42#include <video/omapdss.h>
45#include <video/omap-panel-tfp410.h> 43#include <video/omap-panel-tfp410.h>
@@ -297,9 +295,6 @@ static int beagle_twl_gpio_setup(struct device *dev,
297} 295}
298 296
299static struct twl4030_gpio_platform_data beagle_gpio_data = { 297static struct twl4030_gpio_platform_data beagle_gpio_data = {
300 .gpio_base = OMAP_MAX_GPIO_LINES,
301 .irq_base = TWL4030_GPIO_IRQ_BASE,
302 .irq_end = TWL4030_GPIO_IRQ_END,
303 .use_leds = true, 298 .use_leds = true,
304 .pullups = BIT(1), 299 .pullups = BIT(1),
305 .pulldowns = BIT(2) | BIT(6) | BIT(7) | BIT(8) | BIT(13) 300 .pulldowns = BIT(2) | BIT(6) | BIT(7) | BIT(8) | BIT(13)
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c
index 0d362e9f9cb9..b94873d0c6b6 100644
--- a/arch/arm/mach-omap2/board-omap3evm.c
+++ b/arch/arm/mach-omap2/board-omap3evm.c
@@ -40,12 +40,10 @@
40#include <linux/mmc/host.h> 40#include <linux/mmc/host.h>
41#include <linux/export.h> 41#include <linux/export.h>
42 42
43#include <mach/hardware.h>
44#include <asm/mach-types.h> 43#include <asm/mach-types.h>
45#include <asm/mach/arch.h> 44#include <asm/mach/arch.h>
46#include <asm/mach/map.h> 45#include <asm/mach/map.h>
47 46
48#include <plat/board.h>
49#include <plat/usb.h> 47#include <plat/usb.h>
50#include <plat/nand.h> 48#include <plat/nand.h>
51#include "common.h" 49#include "common.h"
@@ -75,6 +73,18 @@
75#define OMAP3EVM_GEN1_ETHR_GPIO_RST 64 73#define OMAP3EVM_GEN1_ETHR_GPIO_RST 64
76#define OMAP3EVM_GEN2_ETHR_GPIO_RST 7 74#define OMAP3EVM_GEN2_ETHR_GPIO_RST 7
77 75
76/*
77 * OMAP35x EVM revision
78 * Run time detection of EVM revision is done by reading Ethernet
79 * PHY ID -
80 * GEN_1 = 0x01150000
81 * GEN_2 = 0x92200000
82 */
83enum {
84 OMAP3EVM_BOARD_GEN_1 = 0, /* EVM Rev between A - D */
85 OMAP3EVM_BOARD_GEN_2, /* EVM Rev >= Rev E */
86};
87
78static u8 omap3_evm_version; 88static u8 omap3_evm_version;
79 89
80u8 get_omap3_evm_rev(void) 90u8 get_omap3_evm_rev(void)
@@ -377,9 +387,6 @@ static int omap3evm_twl_gpio_setup(struct device *dev,
377} 387}
378 388
379static struct twl4030_gpio_platform_data omap3evm_gpio_data = { 389static struct twl4030_gpio_platform_data omap3evm_gpio_data = {
380 .gpio_base = OMAP_MAX_GPIO_LINES,
381 .irq_base = TWL4030_GPIO_IRQ_BASE,
382 .irq_end = TWL4030_GPIO_IRQ_END,
383 .use_leds = true, 390 .use_leds = true,
384 .setup = omap3evm_twl_gpio_setup, 391 .setup = omap3evm_twl_gpio_setup,
385}; 392};
@@ -526,9 +533,6 @@ static int __init omap3_evm_i2c_init(void)
526 return 0; 533 return 0;
527} 534}
528 535
529static struct omap_board_config_kernel omap3_evm_config[] __initdata = {
530};
531
532static struct usbhs_omap_board_data usbhs_bdata __initdata = { 536static struct usbhs_omap_board_data usbhs_bdata __initdata = {
533 537
534 .port_mode[0] = OMAP_USBHS_PORT_MODE_UNUSED, 538 .port_mode[0] = OMAP_USBHS_PORT_MODE_UNUSED,
@@ -688,9 +692,6 @@ static void __init omap3_evm_init(void)
688 obm = (cpu_is_omap3630()) ? omap36x_board_mux : omap35x_board_mux; 692 obm = (cpu_is_omap3630()) ? omap36x_board_mux : omap35x_board_mux;
689 omap3_mux_init(obm, OMAP_PACKAGE_CBB); 693 omap3_mux_init(obm, OMAP_PACKAGE_CBB);
690 694
691 omap_board_config = omap3_evm_config;
692 omap_board_config_size = ARRAY_SIZE(omap3_evm_config);
693
694 omap_mux_init_gpio(63, OMAP_PIN_INPUT); 695 omap_mux_init_gpio(63, OMAP_PIN_INPUT);
695 omap_hsmmc_init(mmc); 696 omap_hsmmc_init(mmc);
696 697
diff --git a/arch/arm/mach-omap2/board-omap3logic.c b/arch/arm/mach-omap2/board-omap3logic.c
index fca93d1afd43..b5e56fa83c19 100644
--- a/arch/arm/mach-omap2/board-omap3logic.c
+++ b/arch/arm/mach-omap2/board-omap3logic.c
@@ -30,24 +30,21 @@
30#include <linux/i2c/twl.h> 30#include <linux/i2c/twl.h>
31#include <linux/mmc/host.h> 31#include <linux/mmc/host.h>
32 32
33#include <mach/hardware.h>
34#include <asm/mach-types.h> 33#include <asm/mach-types.h>
35#include <asm/mach/arch.h> 34#include <asm/mach/arch.h>
36#include <asm/mach/map.h> 35#include <asm/mach/map.h>
37 36
38#include "mux.h"
39#include "hsmmc.h"
40#include "control.h"
41#include "common-board-devices.h"
42
43#include <plat/mux.h>
44#include <plat/board.h>
45#include "common.h"
46#include <plat/gpmc-smsc911x.h> 37#include <plat/gpmc-smsc911x.h>
47#include <plat/gpmc.h> 38#include <plat/gpmc.h>
48#include <plat/sdrc.h> 39#include <plat/sdrc.h>
49#include <plat/usb.h> 40#include <plat/usb.h>
50 41
42#include "common.h"
43#include "mux.h"
44#include "hsmmc.h"
45#include "control.h"
46#include "common-board-devices.h"
47
51#define OMAP3LOGIC_SMSC911X_CS 1 48#define OMAP3LOGIC_SMSC911X_CS 1
52 49
53#define OMAP3530_LV_SOM_MMC_GPIO_CD 110 50#define OMAP3530_LV_SOM_MMC_GPIO_CD 110
@@ -78,9 +75,6 @@ static struct regulator_init_data omap3logic_vmmc1 = {
78}; 75};
79 76
80static struct twl4030_gpio_platform_data omap3logic_gpio_data = { 77static struct twl4030_gpio_platform_data omap3logic_gpio_data = {
81 .gpio_base = OMAP_MAX_GPIO_LINES,
82 .irq_base = TWL4030_GPIO_IRQ_BASE,
83 .irq_end = TWL4030_GPIO_IRQ_END,
84 .use_leds = true, 78 .use_leds = true,
85 .pullups = BIT(1), 79 .pullups = BIT(1),
86 .pulldowns = BIT(2) | BIT(6) | BIT(7) | BIT(8) 80 .pulldowns = BIT(2) | BIT(6) | BIT(7) | BIT(8)
diff --git a/arch/arm/mach-omap2/board-omap3pandora.c b/arch/arm/mach-omap2/board-omap3pandora.c
index 57aebee44fd0..e700a98feba6 100644
--- a/arch/arm/mach-omap2/board-omap3pandora.c
+++ b/arch/arm/mach-omap2/board-omap3pandora.c
@@ -40,9 +40,7 @@
40#include <asm/mach/arch.h> 40#include <asm/mach/arch.h>
41#include <asm/mach/map.h> 41#include <asm/mach/map.h>
42 42
43#include <plat/board.h>
44#include "common.h" 43#include "common.h"
45#include <mach/hardware.h>
46#include <plat/mcspi.h> 44#include <plat/mcspi.h>
47#include <plat/usb.h> 45#include <plat/usb.h>
48#include <video/omapdss.h> 46#include <video/omapdss.h>
@@ -321,9 +319,6 @@ static int omap3pandora_twl_gpio_setup(struct device *dev,
321} 319}
322 320
323static struct twl4030_gpio_platform_data omap3pandora_gpio_data = { 321static struct twl4030_gpio_platform_data omap3pandora_gpio_data = {
324 .gpio_base = OMAP_MAX_GPIO_LINES,
325 .irq_base = TWL4030_GPIO_IRQ_BASE,
326 .irq_end = TWL4030_GPIO_IRQ_END,
327 .setup = omap3pandora_twl_gpio_setup, 322 .setup = omap3pandora_twl_gpio_setup,
328}; 323};
329 324
diff --git a/arch/arm/mach-omap2/board-omap3stalker.c b/arch/arm/mach-omap2/board-omap3stalker.c
index b318f5602e36..b8756f0d2a08 100644
--- a/arch/arm/mach-omap2/board-omap3stalker.c
+++ b/arch/arm/mach-omap2/board-omap3stalker.c
@@ -28,14 +28,17 @@
28#include <linux/regulator/machine.h> 28#include <linux/regulator/machine.h>
29#include <linux/i2c/twl.h> 29#include <linux/i2c/twl.h>
30#include <linux/mmc/host.h> 30#include <linux/mmc/host.h>
31#include <linux/input/matrix_keypad.h>
32#include <linux/spi/spi.h>
33#include <linux/interrupt.h>
34#include <linux/smsc911x.h>
35#include <linux/i2c/at24.h>
31 36
32#include <mach/hardware.h>
33#include <asm/mach-types.h> 37#include <asm/mach-types.h>
34#include <asm/mach/arch.h> 38#include <asm/mach/arch.h>
35#include <asm/mach/map.h> 39#include <asm/mach/map.h>
36#include <asm/mach/flash.h> 40#include <asm/mach/flash.h>
37 41
38#include <plat/board.h>
39#include "common.h" 42#include "common.h"
40#include <plat/gpmc.h> 43#include <plat/gpmc.h>
41#include <plat/nand.h> 44#include <plat/nand.h>
@@ -279,9 +282,6 @@ omap3stalker_twl_gpio_setup(struct device *dev,
279} 282}
280 283
281static struct twl4030_gpio_platform_data omap3stalker_gpio_data = { 284static struct twl4030_gpio_platform_data omap3stalker_gpio_data = {
282 .gpio_base = OMAP_MAX_GPIO_LINES,
283 .irq_base = TWL4030_GPIO_IRQ_BASE,
284 .irq_end = TWL4030_GPIO_IRQ_END,
285 .use_leds = true, 285 .use_leds = true,
286 .setup = omap3stalker_twl_gpio_setup, 286 .setup = omap3stalker_twl_gpio_setup,
287}; 287};
@@ -362,9 +362,6 @@ static int __init omap3_stalker_i2c_init(void)
362 362
363#define OMAP3_STALKER_TS_GPIO 175 363#define OMAP3_STALKER_TS_GPIO 175
364 364
365static struct omap_board_config_kernel omap3_stalker_config[] __initdata = {
366};
367
368static struct platform_device *omap3_stalker_devices[] __initdata = { 365static struct platform_device *omap3_stalker_devices[] __initdata = {
369 &keys_gpio, 366 &keys_gpio,
370}; 367};
@@ -399,8 +396,6 @@ static void __init omap3_stalker_init(void)
399{ 396{
400 regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies)); 397 regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
401 omap3_mux_init(board_mux, OMAP_PACKAGE_CUS); 398 omap3_mux_init(board_mux, OMAP_PACKAGE_CUS);
402 omap_board_config = omap3_stalker_config;
403 omap_board_config_size = ARRAY_SIZE(omap3_stalker_config);
404 399
405 omap_mux_init_gpio(23, OMAP_PIN_INPUT); 400 omap_mux_init_gpio(23, OMAP_PIN_INPUT);
406 omap_hsmmc_init(mmc); 401 omap_hsmmc_init(mmc);
diff --git a/arch/arm/mach-omap2/board-omap3touchbook.c b/arch/arm/mach-omap2/board-omap3touchbook.c
index 485d14d6a8cd..0e2f838e4009 100644
--- a/arch/arm/mach-omap2/board-omap3touchbook.c
+++ b/arch/arm/mach-omap2/board-omap3touchbook.c
@@ -37,14 +37,12 @@
37#include <linux/regulator/machine.h> 37#include <linux/regulator/machine.h>
38#include <linux/i2c/twl.h> 38#include <linux/i2c/twl.h>
39 39
40#include <mach/hardware.h>
41#include <asm/mach-types.h> 40#include <asm/mach-types.h>
42#include <asm/mach/arch.h> 41#include <asm/mach/arch.h>
43#include <asm/mach/map.h> 42#include <asm/mach/map.h>
44#include <asm/mach/flash.h> 43#include <asm/mach/flash.h>
45#include <asm/system_info.h> 44#include <asm/system_info.h>
46 45
47#include <plat/board.h>
48#include "common.h" 46#include "common.h"
49#include <plat/gpmc.h> 47#include <plat/gpmc.h>
50#include <plat/nand.h> 48#include <plat/nand.h>
@@ -139,9 +137,6 @@ static int touchbook_twl_gpio_setup(struct device *dev,
139} 137}
140 138
141static struct twl4030_gpio_platform_data touchbook_gpio_data = { 139static struct twl4030_gpio_platform_data touchbook_gpio_data = {
142 .gpio_base = OMAP_MAX_GPIO_LINES,
143 .irq_base = TWL4030_GPIO_IRQ_BASE,
144 .irq_end = TWL4030_GPIO_IRQ_END,
145 .use_leds = true, 140 .use_leds = true,
146 .pullups = BIT(1), 141 .pullups = BIT(1),
147 .pulldowns = BIT(2) | BIT(6) | BIT(7) | BIT(8) | BIT(13) 142 .pulldowns = BIT(2) | BIT(6) | BIT(7) | BIT(8) | BIT(13)
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c
index 70f6d1d25463..45fe2d3f59b1 100644
--- a/arch/arm/mach-omap2/board-omap4panda.c
+++ b/arch/arm/mach-omap2/board-omap4panda.c
@@ -32,19 +32,18 @@
32#include <linux/wl12xx.h> 32#include <linux/wl12xx.h>
33#include <linux/platform_data/omap-abe-twl6040.h> 33#include <linux/platform_data/omap-abe-twl6040.h>
34 34
35#include <mach/hardware.h>
36#include <asm/hardware/gic.h> 35#include <asm/hardware/gic.h>
37#include <asm/mach-types.h> 36#include <asm/mach-types.h>
38#include <asm/mach/arch.h> 37#include <asm/mach/arch.h>
39#include <asm/mach/map.h> 38#include <asm/mach/map.h>
40#include <video/omapdss.h> 39#include <video/omapdss.h>
41 40
42#include <plat/board.h>
43#include "common.h" 41#include "common.h"
44#include <plat/usb.h> 42#include <plat/usb.h>
45#include <plat/mmc.h> 43#include <plat/mmc.h>
46#include <video/omap-panel-tfp410.h> 44#include <video/omap-panel-tfp410.h>
47 45
46#include "soc.h"
48#include "hsmmc.h" 47#include "hsmmc.h"
49#include "control.h" 48#include "control.h"
50#include "mux.h" 49#include "mux.h"
@@ -263,7 +262,6 @@ static struct twl6040_codec_data twl6040_codec = {
263static struct twl6040_platform_data twl6040_data = { 262static struct twl6040_platform_data twl6040_data = {
264 .codec = &twl6040_codec, 263 .codec = &twl6040_codec,
265 .audpwron_gpio = 127, 264 .audpwron_gpio = 127,
266 .irq_base = TWL6040_CODEC_IRQ_BASE,
267}; 265};
268 266
269/* Panda board uses the common PMIC configuration */ 267/* Panda board uses the common PMIC configuration */
@@ -294,7 +292,7 @@ static int __init omap4_panda_i2c_init(void)
294 TWL_COMMON_REGULATOR_V1V8 | 292 TWL_COMMON_REGULATOR_V1V8 |
295 TWL_COMMON_REGULATOR_V2V1); 293 TWL_COMMON_REGULATOR_V2V1);
296 omap4_pmic_init("twl6030", &omap4_panda_twldata, 294 omap4_pmic_init("twl6030", &omap4_panda_twldata,
297 &twl6040_data, OMAP44XX_IRQ_SYS_2N); 295 &twl6040_data, 119 + OMAP44XX_IRQ_GIC_START);
298 omap_register_i2c_bus(2, 400, NULL, 0); 296 omap_register_i2c_bus(2, 400, NULL, 0);
299 /* 297 /*
300 * Bus 3 is attached to the DVI port where devices like the pico DLP 298 * Bus 3 is attached to the DVI port where devices like the pico DLP
diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c
index 779734d8ba37..7a62d1322b7a 100644
--- a/arch/arm/mach-omap2/board-overo.c
+++ b/arch/arm/mach-omap2/board-overo.c
@@ -42,16 +42,13 @@
42#include <asm/mach/flash.h> 42#include <asm/mach/flash.h>
43#include <asm/mach/map.h> 43#include <asm/mach/map.h>
44 44
45#include <plat/board.h>
46#include "common.h" 45#include "common.h"
47#include <video/omapdss.h> 46#include <video/omapdss.h>
48#include <video/omap-panel-generic-dpi.h> 47#include <video/omap-panel-generic-dpi.h>
49#include <video/omap-panel-tfp410.h> 48#include <video/omap-panel-tfp410.h>
50#include <plat/gpmc.h> 49#include <plat/gpmc.h>
51#include <mach/hardware.h>
52#include <plat/nand.h> 50#include <plat/nand.h>
53#include <plat/mcspi.h> 51#include <plat/mcspi.h>
54#include <plat/mux.h>
55#include <plat/usb.h> 52#include <plat/usb.h>
56 53
57#include "mux.h" 54#include "mux.h"
@@ -399,9 +396,6 @@ static int overo_twl_gpio_setup(struct device *dev,
399} 396}
400 397
401static struct twl4030_gpio_platform_data overo_gpio_data = { 398static struct twl4030_gpio_platform_data overo_gpio_data = {
402 .gpio_base = OMAP_MAX_GPIO_LINES,
403 .irq_base = TWL4030_GPIO_IRQ_BASE,
404 .irq_end = TWL4030_GPIO_IRQ_END,
405 .use_leds = true, 399 .use_leds = true,
406 .setup = overo_twl_gpio_setup, 400 .setup = overo_twl_gpio_setup,
407}; 401};
diff --git a/arch/arm/mach-omap2/board-rm680.c b/arch/arm/mach-omap2/board-rm680.c
index 0ad1bb3bdb98..00773a32524a 100644
--- a/arch/arm/mach-omap2/board-rm680.c
+++ b/arch/arm/mach-omap2/board-rm680.c
@@ -27,6 +27,7 @@
27#include <plat/gpmc.h> 27#include <plat/gpmc.h>
28#include "common.h" 28#include "common.h"
29#include <plat/onenand.h> 29#include <plat/onenand.h>
30#include <plat/serial.h>
30 31
31#include "mux.h" 32#include "mux.h"
32#include "hsmmc.h" 33#include "hsmmc.h"
@@ -72,9 +73,6 @@ static struct platform_device *rm680_peripherals_devices[] __initdata = {
72 73
73/* TWL */ 74/* TWL */
74static struct twl4030_gpio_platform_data rm680_gpio_data = { 75static struct twl4030_gpio_platform_data rm680_gpio_data = {
75 .gpio_base = OMAP_MAX_GPIO_LINES,
76 .irq_base = TWL4030_GPIO_IRQ_BASE,
77 .irq_end = TWL4030_GPIO_IRQ_END,
78 .pullups = BIT(0), 76 .pullups = BIT(0),
79 .pulldowns = BIT(1) | BIT(2) | BIT(8) | BIT(15), 77 .pulldowns = BIT(1) | BIT(2) | BIT(8) | BIT(15),
80}; 78};
@@ -87,7 +85,7 @@ static struct twl4030_platform_data rm680_twl_data = {
87static void __init rm680_i2c_init(void) 85static void __init rm680_i2c_init(void)
88{ 86{
89 omap3_pmic_get_config(&rm680_twl_data, TWL_COMMON_PDATA_USB, 0); 87 omap3_pmic_get_config(&rm680_twl_data, TWL_COMMON_PDATA_USB, 0);
90 omap_pmic_init(1, 2900, "twl5031", INT_34XX_SYS_NIRQ, &rm680_twl_data); 88 omap_pmic_init(1, 2900, "twl5031", 7 + OMAP_INTC_START, &rm680_twl_data);
91 omap_register_i2c_bus(2, 400, NULL, 0); 89 omap_register_i2c_bus(2, 400, NULL, 0);
92 omap_register_i2c_bus(3, 400, NULL, 0); 90 omap_register_i2c_bus(3, 400, NULL, 0);
93} 91}
diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c
index df2534de3361..456049055daa 100644
--- a/arch/arm/mach-omap2/board-rx51-peripherals.c
+++ b/arch/arm/mach-omap2/board-rx51-peripherals.c
@@ -28,7 +28,6 @@
28#include <asm/system_info.h> 28#include <asm/system_info.h>
29 29
30#include <plat/mcspi.h> 30#include <plat/mcspi.h>
31#include <plat/board.h>
32#include "common.h" 31#include "common.h"
33#include <plat/dma.h> 32#include <plat/dma.h>
34#include <plat/gpmc.h> 33#include <plat/gpmc.h>
@@ -774,9 +773,6 @@ static int rx51_twlgpio_setup(struct device *dev, unsigned gpio, unsigned n)
774} 773}
775 774
776static struct twl4030_gpio_platform_data rx51_gpio_data = { 775static struct twl4030_gpio_platform_data rx51_gpio_data = {
777 .gpio_base = OMAP_MAX_GPIO_LINES,
778 .irq_base = TWL4030_GPIO_IRQ_BASE,
779 .irq_end = TWL4030_GPIO_IRQ_END,
780 .pulldowns = BIT(0) | BIT(1) | BIT(2) | BIT(3) 776 .pulldowns = BIT(0) | BIT(1) | BIT(2) | BIT(3)
781 | BIT(4) | BIT(5) 777 | BIT(4) | BIT(5)
782 | BIT(8) | BIT(9) | BIT(10) | BIT(11) 778 | BIT(8) | BIT(9) | BIT(10) | BIT(11)
@@ -1051,7 +1047,7 @@ static int __init rx51_i2c_init(void)
1051 rx51_twldata.vdac->constraints.apply_uV = true; 1047 rx51_twldata.vdac->constraints.apply_uV = true;
1052 rx51_twldata.vdac->constraints.name = "VDAC"; 1048 rx51_twldata.vdac->constraints.name = "VDAC";
1053 1049
1054 omap_pmic_init(1, 2200, "twl5030", INT_34XX_SYS_NIRQ, &rx51_twldata); 1050 omap_pmic_init(1, 2200, "twl5030", 7 + OMAP_INTC_START, &rx51_twldata);
1055 omap_register_i2c_bus(2, 100, rx51_peripherals_i2c_board_info_2, 1051 omap_register_i2c_bus(2, 100, rx51_peripherals_i2c_board_info_2,
1056 ARRAY_SIZE(rx51_peripherals_i2c_board_info_2)); 1052 ARRAY_SIZE(rx51_peripherals_i2c_board_info_2));
1057#if defined(CONFIG_SENSORS_LIS3_I2C) || defined(CONFIG_SENSORS_LIS3_I2C_MODULE) 1053#if defined(CONFIG_SENSORS_LIS3_I2C) || defined(CONFIG_SENSORS_LIS3_I2C_MODULE)
diff --git a/arch/arm/mach-omap2/board-rx51.c b/arch/arm/mach-omap2/board-rx51.c
index 345dd931f76f..93b466150002 100644
--- a/arch/arm/mach-omap2/board-rx51.c
+++ b/arch/arm/mach-omap2/board-rx51.c
@@ -18,13 +18,11 @@
18#include <linux/gpio.h> 18#include <linux/gpio.h>
19#include <linux/leds.h> 19#include <linux/leds.h>
20 20
21#include <mach/hardware.h>
22#include <asm/mach-types.h> 21#include <asm/mach-types.h>
23#include <asm/mach/arch.h> 22#include <asm/mach/arch.h>
24#include <asm/mach/map.h> 23#include <asm/mach/map.h>
25 24
26#include <plat/mcspi.h> 25#include <plat/mcspi.h>
27#include <plat/board.h>
28#include "common.h" 26#include "common.h"
29#include <plat/dma.h> 27#include <plat/dma.h>
30#include <plat/gpmc.h> 28#include <plat/gpmc.h>
diff --git a/arch/arm/mach-omap2/board-ti8168evm.c b/arch/arm/mach-omap2/board-ti8168evm.c
index d4c8392cadb6..c4f8833b4c3c 100644
--- a/arch/arm/mach-omap2/board-ti8168evm.c
+++ b/arch/arm/mach-omap2/board-ti8168evm.c
@@ -15,13 +15,10 @@
15#include <linux/kernel.h> 15#include <linux/kernel.h>
16#include <linux/init.h> 16#include <linux/init.h>
17 17
18#include <mach/hardware.h>
19#include <asm/mach-types.h> 18#include <asm/mach-types.h>
20#include <asm/mach/arch.h> 19#include <asm/mach/arch.h>
21#include <asm/mach/map.h> 20#include <asm/mach/map.h>
22 21
23#include <plat/irqs.h>
24#include <plat/board.h>
25#include "common.h" 22#include "common.h"
26#include <plat/usb.h> 23#include <plat/usb.h>
27 24
@@ -32,15 +29,10 @@ static struct omap_musb_board_data musb_board_data = {
32 .power = 500, 29 .power = 500,
33}; 30};
34 31
35static struct omap_board_config_kernel ti81xx_evm_config[] __initdata = {
36};
37
38static void __init ti81xx_evm_init(void) 32static void __init ti81xx_evm_init(void)
39{ 33{
40 omap_serial_init(); 34 omap_serial_init();
41 omap_sdrc_init(NULL, NULL); 35 omap_sdrc_init(NULL, NULL);
42 omap_board_config = ti81xx_evm_config;
43 omap_board_config_size = ARRAY_SIZE(ti81xx_evm_config);
44 usb_musb_init(&musb_board_data); 36 usb_musb_init(&musb_board_data);
45} 37}
46 38
diff --git a/arch/arm/mach-omap2/board-zoom-debugboard.c b/arch/arm/mach-omap2/board-zoom-debugboard.c
index f64f44173061..5ec069e529e7 100644
--- a/arch/arm/mach-omap2/board-zoom-debugboard.c
+++ b/arch/arm/mach-omap2/board-zoom-debugboard.c
@@ -22,6 +22,9 @@
22 22
23#include <mach/board-zoom.h> 23#include <mach/board-zoom.h>
24 24
25#include "soc.h"
26#include "common.h"
27
25#define ZOOM_SMSC911X_CS 7 28#define ZOOM_SMSC911X_CS 7
26#define ZOOM_SMSC911X_GPIO 158 29#define ZOOM_SMSC911X_GPIO 158
27#define ZOOM_QUADUART_CS 3 30#define ZOOM_QUADUART_CS 3
diff --git a/arch/arm/mach-omap2/board-zoom-display.c b/arch/arm/mach-omap2/board-zoom-display.c
index 28187f134fff..ea79bc299baf 100644
--- a/arch/arm/mach-omap2/board-zoom-display.c
+++ b/arch/arm/mach-omap2/board-zoom-display.c
@@ -18,6 +18,8 @@
18#include <video/omapdss.h> 18#include <video/omapdss.h>
19#include <mach/board-zoom.h> 19#include <mach/board-zoom.h>
20 20
21#include "common.h"
22
21#define LCD_PANEL_RESET_GPIO_PROD 96 23#define LCD_PANEL_RESET_GPIO_PROD 96
22#define LCD_PANEL_RESET_GPIO_PILOT 55 24#define LCD_PANEL_RESET_GPIO_PILOT 55
23#define LCD_PANEL_QVGA_GPIO 56 25#define LCD_PANEL_QVGA_GPIO 56
diff --git a/arch/arm/mach-omap2/board-zoom-peripherals.c b/arch/arm/mach-omap2/board-zoom-peripherals.c
index b797cb279618..6bcc107b9fc3 100644
--- a/arch/arm/mach-omap2/board-zoom-peripherals.c
+++ b/arch/arm/mach-omap2/board-zoom-peripherals.c
@@ -19,6 +19,7 @@
19#include <linux/regulator/fixed.h> 19#include <linux/regulator/fixed.h>
20#include <linux/wl12xx.h> 20#include <linux/wl12xx.h>
21#include <linux/mmc/host.h> 21#include <linux/mmc/host.h>
22#include <linux/platform_data/gpio-omap.h>
22 23
23#include <asm/mach-types.h> 24#include <asm/mach-types.h>
24#include <asm/mach/arch.h> 25#include <asm/mach/arch.h>
@@ -251,9 +252,6 @@ static void zoom2_set_hs_extmute(int mute)
251} 252}
252 253
253static struct twl4030_gpio_platform_data zoom_gpio_data = { 254static struct twl4030_gpio_platform_data zoom_gpio_data = {
254 .gpio_base = OMAP_MAX_GPIO_LINES,
255 .irq_base = TWL4030_GPIO_IRQ_BASE,
256 .irq_end = TWL4030_GPIO_IRQ_END,
257 .setup = zoom_twl_gpio_setup, 255 .setup = zoom_twl_gpio_setup,
258}; 256};
259 257
@@ -281,7 +279,7 @@ static int __init omap_i2c_init(void)
281 codec_data->hs_extmute = 1; 279 codec_data->hs_extmute = 1;
282 codec_data->set_hs_extmute = zoom2_set_hs_extmute; 280 codec_data->set_hs_extmute = zoom2_set_hs_extmute;
283 } 281 }
284 omap_pmic_init(1, 2400, "twl5030", INT_34XX_SYS_NIRQ, &zoom_twldata); 282 omap_pmic_init(1, 2400, "twl5030", 7 + OMAP_INTC_START, &zoom_twldata);
285 omap_register_i2c_bus(2, 400, NULL, 0); 283 omap_register_i2c_bus(2, 400, NULL, 0);
286 omap_register_i2c_bus(3, 400, NULL, 0); 284 omap_register_i2c_bus(3, 400, NULL, 0);
287 return 0; 285 return 0;
diff --git a/arch/arm/mach-omap2/board-zoom.c b/arch/arm/mach-omap2/board-zoom.c
index 4e7e56142e6f..4994438e1f46 100644
--- a/arch/arm/mach-omap2/board-zoom.c
+++ b/arch/arm/mach-omap2/board-zoom.c
@@ -22,7 +22,6 @@
22#include <asm/mach/arch.h> 22#include <asm/mach/arch.h>
23 23
24#include "common.h" 24#include "common.h"
25#include <plat/board.h>
26#include <plat/usb.h> 25#include <plat/usb.h>
27 26
28#include <mach/board-zoom.h> 27#include <mach/board-zoom.h>
diff --git a/arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c b/arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c
index 3d9d746b221a..cabcfdba5246 100644
--- a/arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c
+++ b/arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c
@@ -33,11 +33,11 @@
33#include <linux/cpufreq.h> 33#include <linux/cpufreq.h>
34#include <linux/slab.h> 34#include <linux/slab.h>
35 35
36#include <plat/cpu.h>
37#include <plat/clock.h> 36#include <plat/clock.h>
38#include <plat/sram.h> 37#include <plat/sram.h>
39#include <plat/sdrc.h> 38#include <plat/sdrc.h>
40 39
40#include "soc.h"
41#include "clock.h" 41#include "clock.h"
42#include "clock2xxx.h" 42#include "clock2xxx.h"
43#include "opp2xxx.h" 43#include "opp2xxx.h"
diff --git a/arch/arm/mach-omap2/clkt_dpll.c b/arch/arm/mach-omap2/clkt_dpll.c
index cd7fd0f91149..0bf0ec3e352c 100644
--- a/arch/arm/mach-omap2/clkt_dpll.c
+++ b/arch/arm/mach-omap2/clkt_dpll.c
@@ -22,8 +22,8 @@
22#include <asm/div64.h> 22#include <asm/div64.h>
23 23
24#include <plat/clock.h> 24#include <plat/clock.h>
25#include <plat/cpu.h>
26 25
26#include "soc.h"
27#include "clock.h" 27#include "clock.h"
28#include "cm-regbits-24xx.h" 28#include "cm-regbits-24xx.h"
29#include "cm-regbits-34xx.h" 29#include "cm-regbits-34xx.h"
@@ -211,7 +211,7 @@ void omap2_init_dpll_parent(struct clk *clk)
211 if (v == OMAP3XXX_EN_DPLL_LPBYPASS || 211 if (v == OMAP3XXX_EN_DPLL_LPBYPASS ||
212 v == OMAP3XXX_EN_DPLL_FRBYPASS) 212 v == OMAP3XXX_EN_DPLL_FRBYPASS)
213 clk_reparent(clk, dd->clk_bypass); 213 clk_reparent(clk, dd->clk_bypass);
214 } else if (cpu_is_omap44xx()) { 214 } else if (soc_is_am33xx() || cpu_is_omap44xx()) {
215 if (v == OMAP4XXX_EN_DPLL_LPBYPASS || 215 if (v == OMAP4XXX_EN_DPLL_LPBYPASS ||
216 v == OMAP4XXX_EN_DPLL_FRBYPASS || 216 v == OMAP4XXX_EN_DPLL_FRBYPASS ||
217 v == OMAP4XXX_EN_DPLL_MNBYPASS) 217 v == OMAP4XXX_EN_DPLL_MNBYPASS)
@@ -257,7 +257,7 @@ u32 omap2_get_dpll_rate(struct clk *clk)
257 if (v == OMAP3XXX_EN_DPLL_LPBYPASS || 257 if (v == OMAP3XXX_EN_DPLL_LPBYPASS ||
258 v == OMAP3XXX_EN_DPLL_FRBYPASS) 258 v == OMAP3XXX_EN_DPLL_FRBYPASS)
259 return dd->clk_bypass->rate; 259 return dd->clk_bypass->rate;
260 } else if (cpu_is_omap44xx()) { 260 } else if (soc_is_am33xx() || cpu_is_omap44xx()) {
261 if (v == OMAP4XXX_EN_DPLL_LPBYPASS || 261 if (v == OMAP4XXX_EN_DPLL_LPBYPASS ||
262 v == OMAP4XXX_EN_DPLL_FRBYPASS || 262 v == OMAP4XXX_EN_DPLL_FRBYPASS ||
263 v == OMAP4XXX_EN_DPLL_MNBYPASS) 263 v == OMAP4XXX_EN_DPLL_MNBYPASS)
diff --git a/arch/arm/mach-omap2/clock.c b/arch/arm/mach-omap2/clock.c
index ea3f565ba1a4..1a1f97f3ca69 100644
--- a/arch/arm/mach-omap2/clock.c
+++ b/arch/arm/mach-omap2/clock.c
@@ -22,14 +22,16 @@
22#include <linux/clk.h> 22#include <linux/clk.h>
23#include <linux/io.h> 23#include <linux/io.h>
24#include <linux/bitops.h> 24#include <linux/bitops.h>
25#include <trace/events/power.h>
26 25
27#include <asm/cpu.h> 26#include <asm/cpu.h>
27
28#include <plat/clock.h> 28#include <plat/clock.h>
29#include "clockdomain.h"
30#include <plat/cpu.h>
31#include <plat/prcm.h> 29#include <plat/prcm.h>
32 30
31#include <trace/events/power.h>
32
33#include "soc.h"
34#include "clockdomain.h"
33#include "clock.h" 35#include "clock.h"
34#include "cm2xxx_3xxx.h" 36#include "cm2xxx_3xxx.h"
35#include "cm-regbits-24xx.h" 37#include "cm-regbits-24xx.h"
diff --git a/arch/arm/mach-omap2/clock2420_data.c b/arch/arm/mach-omap2/clock2420_data.c
index 002745181ad6..12c178dbc9f5 100644
--- a/arch/arm/mach-omap2/clock2420_data.c
+++ b/arch/arm/mach-omap2/clock2420_data.c
@@ -18,9 +18,9 @@
18#include <linux/clk.h> 18#include <linux/clk.h>
19#include <linux/list.h> 19#include <linux/list.h>
20 20
21#include <plat/hardware.h>
22#include <plat/clkdev_omap.h> 21#include <plat/clkdev_omap.h>
23 22
23#include "soc.h"
24#include "iomap.h" 24#include "iomap.h"
25#include "clock.h" 25#include "clock.h"
26#include "clock2xxx.h" 26#include "clock2xxx.h"
diff --git a/arch/arm/mach-omap2/clock2430.c b/arch/arm/mach-omap2/clock2430.c
index dfda9a3f2cb2..a8e326177466 100644
--- a/arch/arm/mach-omap2/clock2430.c
+++ b/arch/arm/mach-omap2/clock2430.c
@@ -21,9 +21,9 @@
21#include <linux/clk.h> 21#include <linux/clk.h>
22#include <linux/io.h> 22#include <linux/io.h>
23 23
24#include <plat/hardware.h>
25#include <plat/clock.h> 24#include <plat/clock.h>
26 25
26#include "soc.h"
27#include "iomap.h" 27#include "iomap.h"
28#include "clock.h" 28#include "clock.h"
29#include "clock2xxx.h" 29#include "clock2xxx.h"
diff --git a/arch/arm/mach-omap2/clock2430_data.c b/arch/arm/mach-omap2/clock2430_data.c
index cacabb070e22..02fe1f28affc 100644
--- a/arch/arm/mach-omap2/clock2430_data.c
+++ b/arch/arm/mach-omap2/clock2430_data.c
@@ -17,9 +17,9 @@
17#include <linux/clk.h> 17#include <linux/clk.h>
18#include <linux/list.h> 18#include <linux/list.h>
19 19
20#include <plat/hardware.h>
21#include <plat/clkdev_omap.h> 20#include <plat/clkdev_omap.h>
22 21
22#include "soc.h"
23#include "iomap.h" 23#include "iomap.h"
24#include "clock.h" 24#include "clock.h"
25#include "clock2xxx.h" 25#include "clock2xxx.h"
diff --git a/arch/arm/mach-omap2/clock2xxx.c b/arch/arm/mach-omap2/clock2xxx.c
index 12500097378d..e92be1fc1a00 100644
--- a/arch/arm/mach-omap2/clock2xxx.c
+++ b/arch/arm/mach-omap2/clock2xxx.c
@@ -22,9 +22,9 @@
22#include <linux/clk.h> 22#include <linux/clk.h>
23#include <linux/io.h> 23#include <linux/io.h>
24 24
25#include <plat/cpu.h>
26#include <plat/clock.h> 25#include <plat/clock.h>
27 26
27#include "soc.h"
28#include "clock.h" 28#include "clock.h"
29#include "clock2xxx.h" 29#include "clock2xxx.h"
30#include "cm.h" 30#include "cm.h"
diff --git a/arch/arm/mach-omap2/clock33xx_data.c b/arch/arm/mach-omap2/clock33xx_data.c
index 25bbcc7ca4dc..be177c19010a 100644
--- a/arch/arm/mach-omap2/clock33xx_data.c
+++ b/arch/arm/mach-omap2/clock33xx_data.c
@@ -18,8 +18,8 @@
18#include <linux/list.h> 18#include <linux/list.h>
19#include <linux/clk.h> 19#include <linux/clk.h>
20#include <plat/clkdev_omap.h> 20#include <plat/clkdev_omap.h>
21#include <plat/am33xx.h>
22 21
22#include "am33xx.h"
23#include "iomap.h" 23#include "iomap.h"
24#include "control.h" 24#include "control.h"
25#include "clock.h" 25#include "clock.h"
@@ -1027,7 +1027,9 @@ static struct omap_clk am33xx_clks[] = {
1027 CLK(NULL, "cefuse_fck", &cefuse_fck, CK_AM33XX), 1027 CLK(NULL, "cefuse_fck", &cefuse_fck, CK_AM33XX),
1028 CLK(NULL, "clkdiv32k_ick", &clkdiv32k_ick, CK_AM33XX), 1028 CLK(NULL, "clkdiv32k_ick", &clkdiv32k_ick, CK_AM33XX),
1029 CLK(NULL, "dcan0_fck", &dcan0_fck, CK_AM33XX), 1029 CLK(NULL, "dcan0_fck", &dcan0_fck, CK_AM33XX),
1030 CLK("481cc000.d_can", NULL, &dcan0_fck, CK_AM33XX),
1030 CLK(NULL, "dcan1_fck", &dcan1_fck, CK_AM33XX), 1031 CLK(NULL, "dcan1_fck", &dcan1_fck, CK_AM33XX),
1032 CLK("481d0000.d_can", NULL, &dcan1_fck, CK_AM33XX),
1031 CLK(NULL, "debugss_ick", &debugss_ick, CK_AM33XX), 1033 CLK(NULL, "debugss_ick", &debugss_ick, CK_AM33XX),
1032 CLK(NULL, "pruss_ocp_gclk", &pruss_ocp_gclk, CK_AM33XX), 1034 CLK(NULL, "pruss_ocp_gclk", &pruss_ocp_gclk, CK_AM33XX),
1033 CLK("davinci-mcasp.0", NULL, &mcasp0_fck, CK_AM33XX), 1035 CLK("davinci-mcasp.0", NULL, &mcasp0_fck, CK_AM33XX),
diff --git a/arch/arm/mach-omap2/clock3xxx.c b/arch/arm/mach-omap2/clock3xxx.c
index 794d82702c85..fc2765bcdd40 100644
--- a/arch/arm/mach-omap2/clock3xxx.c
+++ b/arch/arm/mach-omap2/clock3xxx.c
@@ -21,9 +21,9 @@
21#include <linux/clk.h> 21#include <linux/clk.h>
22#include <linux/io.h> 22#include <linux/io.h>
23 23
24#include <plat/hardware.h>
25#include <plat/clock.h> 24#include <plat/clock.h>
26 25
26#include "soc.h"
27#include "clock.h" 27#include "clock.h"
28#include "clock3xxx.h" 28#include "clock3xxx.h"
29#include "prm2xxx_3xxx.h" 29#include "prm2xxx_3xxx.h"
diff --git a/arch/arm/mach-omap2/clock3xxx_data.c b/arch/arm/mach-omap2/clock3xxx_data.c
index 83bed9ad3017..10a2398e1736 100644
--- a/arch/arm/mach-omap2/clock3xxx_data.c
+++ b/arch/arm/mach-omap2/clock3xxx_data.c
@@ -21,9 +21,9 @@
21#include <linux/list.h> 21#include <linux/list.h>
22#include <linux/io.h> 22#include <linux/io.h>
23 23
24#include <plat/hardware.h>
25#include <plat/clkdev_omap.h> 24#include <plat/clkdev_omap.h>
26 25
26#include "soc.h"
27#include "iomap.h" 27#include "iomap.h"
28#include "clock.h" 28#include "clock.h"
29#include "clock3xxx.h" 29#include "clock3xxx.h"
diff --git a/arch/arm/mach-omap2/clock44xx_data.c b/arch/arm/mach-omap2/clock44xx_data.c
index d7f55e43b761..500682c051c1 100644
--- a/arch/arm/mach-omap2/clock44xx_data.c
+++ b/arch/arm/mach-omap2/clock44xx_data.c
@@ -28,9 +28,9 @@
28#include <linux/clk.h> 28#include <linux/clk.h>
29#include <linux/io.h> 29#include <linux/io.h>
30 30
31#include <plat/hardware.h>
32#include <plat/clkdev_omap.h> 31#include <plat/clkdev_omap.h>
33 32
33#include "soc.h"
34#include "iomap.h" 34#include "iomap.h"
35#include "clock.h" 35#include "clock.h"
36#include "clock44xx.h" 36#include "clock44xx.h"
diff --git a/arch/arm/mach-omap2/cm2xxx_3xxx.c b/arch/arm/mach-omap2/cm2xxx_3xxx.c
index 389f9f8b570c..a911e76b4ecf 100644
--- a/arch/arm/mach-omap2/cm2xxx_3xxx.c
+++ b/arch/arm/mach-omap2/cm2xxx_3xxx.c
@@ -18,8 +18,7 @@
18#include <linux/err.h> 18#include <linux/err.h>
19#include <linux/io.h> 19#include <linux/io.h>
20 20
21#include <plat/hardware.h> 21#include "soc.h"
22
23#include "iomap.h" 22#include "iomap.h"
24#include "common.h" 23#include "common.h"
25#include "cm.h" 24#include "cm.h"
diff --git a/arch/arm/mach-omap2/common-board-devices.c b/arch/arm/mach-omap2/common-board-devices.c
index c1875862679f..013fedc9e131 100644
--- a/arch/arm/mach-omap2/common-board-devices.c
+++ b/arch/arm/mach-omap2/common-board-devices.c
@@ -27,6 +27,7 @@
27#include <plat/mcspi.h> 27#include <plat/mcspi.h>
28#include <plat/nand.h> 28#include <plat/nand.h>
29 29
30#include "common.h"
30#include "common-board-devices.h" 31#include "common-board-devices.h"
31 32
32#if defined(CONFIG_TOUCHSCREEN_ADS7846) || \ 33#if defined(CONFIG_TOUCHSCREEN_ADS7846) || \
diff --git a/arch/arm/mach-omap2/common.c b/arch/arm/mach-omap2/common.c
index 069f9725b1c3..8e43c4d885d5 100644
--- a/arch/arm/mach-omap2/common.c
+++ b/arch/arm/mach-omap2/common.c
@@ -17,11 +17,10 @@
17#include <linux/clk.h> 17#include <linux/clk.h>
18#include <linux/io.h> 18#include <linux/io.h>
19 19
20#include <plat/hardware.h>
21#include <plat/board.h>
22#include <plat/mux.h> 20#include <plat/mux.h>
23#include <plat/clock.h> 21#include <plat/clock.h>
24 22
23#include "soc.h"
25#include "iomap.h" 24#include "iomap.h"
26#include "common.h" 25#include "common.h"
27#include "sdrc.h" 26#include "sdrc.h"
diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h
index 1f65b1871c23..da0f5c187353 100644
--- a/arch/arm/mach-omap2/common.h
+++ b/arch/arm/mach-omap2/common.h
@@ -26,11 +26,18 @@
26#define __ARCH_ARM_MACH_OMAP2PLUS_COMMON_H 26#define __ARCH_ARM_MACH_OMAP2PLUS_COMMON_H
27#ifndef __ASSEMBLER__ 27#ifndef __ASSEMBLER__
28 28
29#include <linux/irq.h>
29#include <linux/delay.h> 30#include <linux/delay.h>
30#include <linux/i2c/twl.h> 31#include <linux/i2c/twl.h>
31#include <plat/common.h> 32
32#include <asm/proc-fns.h> 33#include <asm/proc-fns.h>
33 34
35#include <plat/cpu.h>
36#include <plat/serial.h>
37#include <plat/common.h>
38
39#define OMAP_INTC_START NR_IRQS
40
34#ifdef CONFIG_SOC_OMAP2420 41#ifdef CONFIG_SOC_OMAP2420
35extern void omap242x_map_common_io(void); 42extern void omap242x_map_common_io(void);
36#else 43#else
diff --git a/arch/arm/mach-omap2/control.c b/arch/arm/mach-omap2/control.c
index 3223b81e7532..d1ff8399a222 100644
--- a/arch/arm/mach-omap2/control.c
+++ b/arch/arm/mach-omap2/control.c
@@ -15,9 +15,9 @@
15#include <linux/kernel.h> 15#include <linux/kernel.h>
16#include <linux/io.h> 16#include <linux/io.h>
17 17
18#include <plat/hardware.h>
19#include <plat/sdrc.h> 18#include <plat/sdrc.h>
20 19
20#include "soc.h"
21#include "iomap.h" 21#include "iomap.h"
22#include "common.h" 22#include "common.h"
23#include "cm-regbits-34xx.h" 23#include "cm-regbits-34xx.h"
diff --git a/arch/arm/mach-omap2/control.h b/arch/arm/mach-omap2/control.h
index b8cdc8531b60..c1a5cab0f236 100644
--- a/arch/arm/mach-omap2/control.h
+++ b/arch/arm/mach-omap2/control.h
@@ -21,7 +21,7 @@
21#include <mach/ctrl_module_pad_core_44xx.h> 21#include <mach/ctrl_module_pad_core_44xx.h>
22#include <mach/ctrl_module_pad_wkup_44xx.h> 22#include <mach/ctrl_module_pad_wkup_44xx.h>
23 23
24#include <plat/am33xx.h> 24#include "am33xx.h"
25 25
26#ifndef __ASSEMBLY__ 26#ifndef __ASSEMBLY__
27#define OMAP242X_CTRL_REGADDR(reg) \ 27#define OMAP242X_CTRL_REGADDR(reg) \
diff --git a/arch/arm/mach-omap2/cpuidle34xx.c b/arch/arm/mach-omap2/cpuidle34xx.c
index f2a49a48ef59..bc2756959be5 100644
--- a/arch/arm/mach-omap2/cpuidle34xx.c
+++ b/arch/arm/mach-omap2/cpuidle34xx.c
@@ -28,7 +28,6 @@
28#include <linux/cpu_pm.h> 28#include <linux/cpu_pm.h>
29 29
30#include <plat/prcm.h> 30#include <plat/prcm.h>
31#include <plat/irqs.h>
32#include "powerdomain.h" 31#include "powerdomain.h"
33#include "clockdomain.h" 32#include "clockdomain.h"
34 33
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
index 02b9478b786f..6f6893e38ffc 100644
--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -19,18 +19,17 @@
19#include <linux/of.h> 19#include <linux/of.h>
20#include <linux/platform_data/omap4-keypad.h> 20#include <linux/platform_data/omap4-keypad.h>
21 21
22#include <mach/hardware.h>
23#include <mach/irqs.h>
24#include <asm/mach-types.h> 22#include <asm/mach-types.h>
25#include <asm/mach/map.h> 23#include <asm/mach/map.h>
26 24
27#include "iomap.h" 25#include "iomap.h"
28#include <plat/board.h>
29#include <plat/dma.h> 26#include <plat/dma.h>
30#include <plat/omap_hwmod.h> 27#include <plat/omap_hwmod.h>
31#include <plat/omap_device.h> 28#include <plat/omap_device.h>
32#include <plat/omap4-keypad.h> 29#include <plat/omap4-keypad.h>
33 30
31#include "soc.h"
32#include "common.h"
34#include "mux.h" 33#include "mux.h"
35#include "control.h" 34#include "control.h"
36#include "devices.h" 35#include "devices.h"
@@ -111,7 +110,7 @@ static struct resource omap2cam_resources[] = {
111 .flags = IORESOURCE_MEM, 110 .flags = IORESOURCE_MEM,
112 }, 111 },
113 { 112 {
114 .start = INT_24XX_CAM_IRQ, 113 .start = 24 + OMAP_INTC_START,
115 .flags = IORESOURCE_IRQ, 114 .flags = IORESOURCE_IRQ,
116 } 115 }
117}; 116};
@@ -200,7 +199,7 @@ static struct resource omap3isp_resources[] = {
200 .flags = IORESOURCE_MEM, 199 .flags = IORESOURCE_MEM,
201 }, 200 },
202 { 201 {
203 .start = INT_34XX_CAM_IRQ, 202 .start = 24 + OMAP_INTC_START,
204 .flags = IORESOURCE_IRQ, 203 .flags = IORESOURCE_IRQ,
205 } 204 }
206}; 205};
@@ -434,14 +433,12 @@ static inline void omap_init_mcspi(void) {}
434#endif 433#endif
435 434
436static struct resource omap2_pmu_resource = { 435static struct resource omap2_pmu_resource = {
437 .start = 3, 436 .start = 3 + OMAP_INTC_START,
438 .end = 3,
439 .flags = IORESOURCE_IRQ, 437 .flags = IORESOURCE_IRQ,
440}; 438};
441 439
442static struct resource omap3_pmu_resource = { 440static struct resource omap3_pmu_resource = {
443 .start = INT_34XX_BENCH_MPU_EMUL, 441 .start = 3 + OMAP_INTC_START,
444 .end = INT_34XX_BENCH_MPU_EMUL,
445 .flags = IORESOURCE_IRQ, 442 .flags = IORESOURCE_IRQ,
446}; 443};
447 444
@@ -474,7 +471,7 @@ static struct resource omap2_sham_resources[] = {
474 .flags = IORESOURCE_MEM, 471 .flags = IORESOURCE_MEM,
475 }, 472 },
476 { 473 {
477 .start = INT_24XX_SHA1MD5, 474 .start = 51 + OMAP_INTC_START,
478 .flags = IORESOURCE_IRQ, 475 .flags = IORESOURCE_IRQ,
479 } 476 }
480}; 477};
@@ -492,7 +489,7 @@ static struct resource omap3_sham_resources[] = {
492 .flags = IORESOURCE_MEM, 489 .flags = IORESOURCE_MEM,
493 }, 490 },
494 { 491 {
495 .start = INT_34XX_SHA1MD52_IRQ, 492 .start = 49 + OMAP_INTC_START,
496 .flags = IORESOURCE_IRQ, 493 .flags = IORESOURCE_IRQ,
497 }, 494 },
498 { 495 {
diff --git a/arch/arm/mach-omap2/dpll3xxx.c b/arch/arm/mach-omap2/dpll3xxx.c
index b9c8d2f6a81f..f48043dbac8a 100644
--- a/arch/arm/mach-omap2/dpll3xxx.c
+++ b/arch/arm/mach-omap2/dpll3xxx.c
@@ -28,9 +28,9 @@
28#include <linux/bitops.h> 28#include <linux/bitops.h>
29#include <linux/clkdev.h> 29#include <linux/clkdev.h>
30 30
31#include <plat/cpu.h>
32#include <plat/clock.h> 31#include <plat/clock.h>
33 32
33#include "soc.h"
34#include "clock.h" 34#include "clock.h"
35#include "cm2xxx_3xxx.h" 35#include "cm2xxx_3xxx.h"
36#include "cm-regbits-34xx.h" 36#include "cm-regbits-34xx.h"
@@ -311,7 +311,7 @@ static int omap3_noncore_dpll_program(struct clk *clk, u16 m, u8 n, u16 freqsel)
311 * Set jitter correction. No jitter correction for OMAP4 and 3630 311 * Set jitter correction. No jitter correction for OMAP4 and 3630
312 * since freqsel field is no longer present 312 * since freqsel field is no longer present
313 */ 313 */
314 if (!cpu_is_omap44xx() && !cpu_is_omap3630()) { 314 if (!soc_is_am33xx() && !cpu_is_omap44xx() && !cpu_is_omap3630()) {
315 v = __raw_readl(dd->control_reg); 315 v = __raw_readl(dd->control_reg);
316 v &= ~dd->freqsel_mask; 316 v &= ~dd->freqsel_mask;
317 v |= freqsel << __ffs(dd->freqsel_mask); 317 v |= freqsel << __ffs(dd->freqsel_mask);
@@ -471,7 +471,7 @@ int omap3_noncore_dpll_set_rate(struct clk *clk, unsigned long rate)
471 return -EINVAL; 471 return -EINVAL;
472 472
473 /* No freqsel on OMAP4 and OMAP3630 */ 473 /* No freqsel on OMAP4 and OMAP3630 */
474 if (!cpu_is_omap44xx() && !cpu_is_omap3630()) { 474 if (!soc_is_am33xx() && !cpu_is_omap44xx() && !cpu_is_omap3630()) {
475 freqsel = _omap3_dpll_compute_freqsel(clk, 475 freqsel = _omap3_dpll_compute_freqsel(clk,
476 dd->last_rounded_n); 476 dd->last_rounded_n);
477 if (!freqsel) 477 if (!freqsel)
diff --git a/arch/arm/mach-omap2/dpll44xx.c b/arch/arm/mach-omap2/dpll44xx.c
index 9c6a296b3dc3..09d0ccccb861 100644
--- a/arch/arm/mach-omap2/dpll44xx.c
+++ b/arch/arm/mach-omap2/dpll44xx.c
@@ -15,9 +15,9 @@
15#include <linux/io.h> 15#include <linux/io.h>
16#include <linux/bitops.h> 16#include <linux/bitops.h>
17 17
18#include <plat/cpu.h>
19#include <plat/clock.h> 18#include <plat/clock.h>
20 19
20#include "soc.h"
21#include "clock.h" 21#include "clock.h"
22#include "clock44xx.h" 22#include "clock44xx.h"
23#include "cm-regbits-44xx.h" 23#include "cm-regbits-44xx.h"
diff --git a/arch/arm/mach-omap2/emu.c b/arch/arm/mach-omap2/emu.c
index e28e761b7ab9..b3566f68a559 100644
--- a/arch/arm/mach-omap2/emu.c
+++ b/arch/arm/mach-omap2/emu.c
@@ -21,8 +21,7 @@
21#include <linux/clk.h> 21#include <linux/clk.h>
22#include <linux/err.h> 22#include <linux/err.h>
23 23
24#include <mach/hardware.h> 24#include "soc.h"
25
26#include "iomap.h" 25#include "iomap.h"
27 26
28MODULE_LICENSE("GPL"); 27MODULE_LICENSE("GPL");
diff --git a/arch/arm/mach-omap2/gpio.c b/arch/arm/mach-omap2/gpio.c
index 9ad7d489b0de..7b52bdfc59c9 100644
--- a/arch/arm/mach-omap2/gpio.c
+++ b/arch/arm/mach-omap2/gpio.c
@@ -21,6 +21,7 @@
21#include <linux/slab.h> 21#include <linux/slab.h>
22#include <linux/interrupt.h> 22#include <linux/interrupt.h>
23#include <linux/of.h> 23#include <linux/of.h>
24#include <linux/platform_data/gpio-omap.h>
24 25
25#include <plat/omap_hwmod.h> 26#include <plat/omap_hwmod.h>
26#include <plat/omap_device.h> 27#include <plat/omap_device.h>
diff --git a/arch/arm/mach-omap2/gpmc-nand.c b/arch/arm/mach-omap2/gpmc-nand.c
index 386dec8d2351..9e9f47ad6187 100644
--- a/arch/arm/mach-omap2/gpmc-nand.c
+++ b/arch/arm/mach-omap2/gpmc-nand.c
@@ -16,20 +16,28 @@
16 16
17#include <asm/mach/flash.h> 17#include <asm/mach/flash.h>
18 18
19#include <plat/cpu.h>
20#include <plat/nand.h> 19#include <plat/nand.h>
21#include <plat/board.h>
22#include <plat/gpmc.h> 20#include <plat/gpmc.h>
23 21
24static struct resource gpmc_nand_resource = { 22#include "soc.h"
25 .flags = IORESOURCE_MEM, 23
24static struct resource gpmc_nand_resource[] = {
25 {
26 .flags = IORESOURCE_MEM,
27 },
28 {
29 .flags = IORESOURCE_IRQ,
30 },
31 {
32 .flags = IORESOURCE_IRQ,
33 },
26}; 34};
27 35
28static struct platform_device gpmc_nand_device = { 36static struct platform_device gpmc_nand_device = {
29 .name = "omap2-nand", 37 .name = "omap2-nand",
30 .id = 0, 38 .id = 0,
31 .num_resources = 1, 39 .num_resources = ARRAY_SIZE(gpmc_nand_resource),
32 .resource = &gpmc_nand_resource, 40 .resource = gpmc_nand_resource,
33}; 41};
34 42
35static int omap2_nand_gpmc_retime(struct omap_nand_platform_data *gpmc_nand_data) 43static int omap2_nand_gpmc_retime(struct omap_nand_platform_data *gpmc_nand_data)
@@ -75,6 +83,7 @@ static int omap2_nand_gpmc_retime(struct omap_nand_platform_data *gpmc_nand_data
75 gpmc_cs_configure(gpmc_nand_data->cs, GPMC_CONFIG_DEV_SIZE, 0); 83 gpmc_cs_configure(gpmc_nand_data->cs, GPMC_CONFIG_DEV_SIZE, 0);
76 gpmc_cs_configure(gpmc_nand_data->cs, 84 gpmc_cs_configure(gpmc_nand_data->cs,
77 GPMC_CONFIG_DEV_TYPE, GPMC_DEVICETYPE_NAND); 85 GPMC_CONFIG_DEV_TYPE, GPMC_DEVICETYPE_NAND);
86 gpmc_cs_configure(gpmc_nand_data->cs, GPMC_CONFIG_WP, 0);
78 err = gpmc_cs_set_timings(gpmc_nand_data->cs, &t); 87 err = gpmc_cs_set_timings(gpmc_nand_data->cs, &t);
79 if (err) 88 if (err)
80 return err; 89 return err;
@@ -90,12 +99,19 @@ int __init gpmc_nand_init(struct omap_nand_platform_data *gpmc_nand_data)
90 gpmc_nand_device.dev.platform_data = gpmc_nand_data; 99 gpmc_nand_device.dev.platform_data = gpmc_nand_data;
91 100
92 err = gpmc_cs_request(gpmc_nand_data->cs, NAND_IO_SIZE, 101 err = gpmc_cs_request(gpmc_nand_data->cs, NAND_IO_SIZE,
93 &gpmc_nand_data->phys_base); 102 (unsigned long *)&gpmc_nand_resource[0].start);
94 if (err < 0) { 103 if (err < 0) {
95 dev_err(dev, "Cannot request GPMC CS\n"); 104 dev_err(dev, "Cannot request GPMC CS\n");
96 return err; 105 return err;
97 } 106 }
98 107
108 gpmc_nand_resource[0].end = gpmc_nand_resource[0].start +
109 NAND_IO_SIZE - 1;
110
111 gpmc_nand_resource[1].start =
112 gpmc_get_client_irq(GPMC_IRQ_FIFOEVENTENABLE);
113 gpmc_nand_resource[2].start =
114 gpmc_get_client_irq(GPMC_IRQ_COUNT_EVENT);
99 /* Set timings in GPMC */ 115 /* Set timings in GPMC */
100 err = omap2_nand_gpmc_retime(gpmc_nand_data); 116 err = omap2_nand_gpmc_retime(gpmc_nand_data);
101 if (err < 0) { 117 if (err < 0) {
@@ -108,6 +124,8 @@ int __init gpmc_nand_init(struct omap_nand_platform_data *gpmc_nand_data)
108 gpmc_cs_configure(gpmc_nand_data->cs, GPMC_CONFIG_RDY_BSY, 1); 124 gpmc_cs_configure(gpmc_nand_data->cs, GPMC_CONFIG_RDY_BSY, 1);
109 } 125 }
110 126
127 gpmc_update_nand_reg(&gpmc_nand_data->reg, gpmc_nand_data->cs);
128
111 err = platform_device_register(&gpmc_nand_device); 129 err = platform_device_register(&gpmc_nand_device);
112 if (err < 0) { 130 if (err < 0) {
113 dev_err(dev, "Unable to register NAND device\n"); 131 dev_err(dev, "Unable to register NAND device\n");
diff --git a/arch/arm/mach-omap2/gpmc-onenand.c b/arch/arm/mach-omap2/gpmc-onenand.c
index a0fa9bb2bda5..b66fb8e5faaa 100644
--- a/arch/arm/mach-omap2/gpmc-onenand.c
+++ b/arch/arm/mach-omap2/gpmc-onenand.c
@@ -18,16 +18,24 @@
18 18
19#include <asm/mach/flash.h> 19#include <asm/mach/flash.h>
20 20
21#include <plat/cpu.h>
22#include <plat/onenand.h> 21#include <plat/onenand.h>
23#include <plat/board.h>
24#include <plat/gpmc.h> 22#include <plat/gpmc.h>
25 23
24#include "soc.h"
25
26#define ONENAND_IO_SIZE SZ_128K
27
26static struct omap_onenand_platform_data *gpmc_onenand_data; 28static struct omap_onenand_platform_data *gpmc_onenand_data;
27 29
30static struct resource gpmc_onenand_resource = {
31 .flags = IORESOURCE_MEM,
32};
33
28static struct platform_device gpmc_onenand_device = { 34static struct platform_device gpmc_onenand_device = {
29 .name = "omap2-onenand", 35 .name = "omap2-onenand",
30 .id = -1, 36 .id = -1,
37 .num_resources = 1,
38 .resource = &gpmc_onenand_resource,
31}; 39};
32 40
33static int omap2_onenand_set_async_mode(int cs, void __iomem *onenand_base) 41static int omap2_onenand_set_async_mode(int cs, void __iomem *onenand_base)
@@ -390,6 +398,8 @@ static int gpmc_onenand_setup(void __iomem *onenand_base, int *freq_ptr)
390 398
391void __init gpmc_onenand_init(struct omap_onenand_platform_data *_onenand_data) 399void __init gpmc_onenand_init(struct omap_onenand_platform_data *_onenand_data)
392{ 400{
401 int err;
402
393 gpmc_onenand_data = _onenand_data; 403 gpmc_onenand_data = _onenand_data;
394 gpmc_onenand_data->onenand_setup = gpmc_onenand_setup; 404 gpmc_onenand_data->onenand_setup = gpmc_onenand_setup;
395 gpmc_onenand_device.dev.platform_data = gpmc_onenand_data; 405 gpmc_onenand_device.dev.platform_data = gpmc_onenand_data;
@@ -401,8 +411,19 @@ void __init gpmc_onenand_init(struct omap_onenand_platform_data *_onenand_data)
401 gpmc_onenand_data->flags |= ONENAND_SYNC_READ; 411 gpmc_onenand_data->flags |= ONENAND_SYNC_READ;
402 } 412 }
403 413
414 err = gpmc_cs_request(gpmc_onenand_data->cs, ONENAND_IO_SIZE,
415 (unsigned long *)&gpmc_onenand_resource.start);
416 if (err < 0) {
417 pr_err("%s: Cannot request GPMC CS\n", __func__);
418 return;
419 }
420
421 gpmc_onenand_resource.end = gpmc_onenand_resource.start +
422 ONENAND_IO_SIZE - 1;
423
404 if (platform_device_register(&gpmc_onenand_device) < 0) { 424 if (platform_device_register(&gpmc_onenand_device) < 0) {
405 printk(KERN_ERR "Unable to register OneNAND device\n"); 425 pr_err("%s: Unable to register OneNAND device\n", __func__);
426 gpmc_cs_free(gpmc_onenand_data->cs);
406 return; 427 return;
407 } 428 }
408} 429}
diff --git a/arch/arm/mach-omap2/gpmc-smc91x.c b/arch/arm/mach-omap2/gpmc-smc91x.c
index ba10c24f3d8d..245839dfc722 100644
--- a/arch/arm/mach-omap2/gpmc-smc91x.c
+++ b/arch/arm/mach-omap2/gpmc-smc91x.c
@@ -17,10 +17,11 @@
17#include <linux/io.h> 17#include <linux/io.h>
18#include <linux/smc91x.h> 18#include <linux/smc91x.h>
19 19
20#include <plat/board.h>
21#include <plat/gpmc.h> 20#include <plat/gpmc.h>
22#include <plat/gpmc-smc91x.h> 21#include <plat/gpmc-smc91x.h>
23 22
23#include "soc.h"
24
24static struct omap_smc91x_platform_data *gpmc_cfg; 25static struct omap_smc91x_platform_data *gpmc_cfg;
25 26
26static struct resource gpmc_smc91x_resources[] = { 27static struct resource gpmc_smc91x_resources[] = {
diff --git a/arch/arm/mach-omap2/gpmc-smsc911x.c b/arch/arm/mach-omap2/gpmc-smsc911x.c
index b6c77be3e8f7..a3a28878f0c9 100644
--- a/arch/arm/mach-omap2/gpmc-smsc911x.c
+++ b/arch/arm/mach-omap2/gpmc-smsc911x.c
@@ -20,7 +20,6 @@
20#include <linux/io.h> 20#include <linux/io.h>
21#include <linux/smsc911x.h> 21#include <linux/smsc911x.h>
22 22
23#include <plat/board.h>
24#include <plat/gpmc.h> 23#include <plat/gpmc.h>
25#include <plat/gpmc-smsc911x.h> 24#include <plat/gpmc-smsc911x.h>
26 25
diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c
index b2b5759ab0fe..055ae8bd943f 100644
--- a/arch/arm/mach-omap2/gpmc.c
+++ b/arch/arm/mach-omap2/gpmc.c
@@ -28,8 +28,13 @@
28#include <asm/mach-types.h> 28#include <asm/mach-types.h>
29#include <plat/gpmc.h> 29#include <plat/gpmc.h>
30 30
31#include <plat/cpu.h>
32#include <plat/gpmc.h>
31#include <plat/sdrc.h> 33#include <plat/sdrc.h>
32 34
35#include "soc.h"
36#include "common.h"
37
33/* GPMC register offsets */ 38/* GPMC register offsets */
34#define GPMC_REVISION 0x00 39#define GPMC_REVISION 0x00
35#define GPMC_SYSCONFIG 0x10 40#define GPMC_SYSCONFIG 0x10
@@ -78,6 +83,15 @@
78#define ENABLE_PREFETCH (0x1 << 7) 83#define ENABLE_PREFETCH (0x1 << 7)
79#define DMA_MPU_MODE 2 84#define DMA_MPU_MODE 2
80 85
86/* XXX: Only NAND irq has been considered,currently these are the only ones used
87 */
88#define GPMC_NR_IRQ 2
89
90struct gpmc_client_irq {
91 unsigned irq;
92 u32 bitmask;
93};
94
81/* Structure to save gpmc cs context */ 95/* Structure to save gpmc cs context */
82struct gpmc_cs_config { 96struct gpmc_cs_config {
83 u32 config1; 97 u32 config1;
@@ -105,6 +119,10 @@ struct omap3_gpmc_regs {
105 struct gpmc_cs_config cs_context[GPMC_CS_NUM]; 119 struct gpmc_cs_config cs_context[GPMC_CS_NUM];
106}; 120};
107 121
122static struct gpmc_client_irq gpmc_client_irq[GPMC_NR_IRQ];
123static struct irq_chip gpmc_irq_chip;
124static unsigned gpmc_irq_start;
125
108static struct resource gpmc_mem_root; 126static struct resource gpmc_mem_root;
109static struct resource gpmc_cs_mem[GPMC_CS_NUM]; 127static struct resource gpmc_cs_mem[GPMC_CS_NUM];
110static DEFINE_SPINLOCK(gpmc_mem_lock); 128static DEFINE_SPINLOCK(gpmc_mem_lock);
@@ -682,6 +700,117 @@ int gpmc_prefetch_reset(int cs)
682} 700}
683EXPORT_SYMBOL(gpmc_prefetch_reset); 701EXPORT_SYMBOL(gpmc_prefetch_reset);
684 702
703void gpmc_update_nand_reg(struct gpmc_nand_regs *reg, int cs)
704{
705 reg->gpmc_status = gpmc_base + GPMC_STATUS;
706 reg->gpmc_nand_command = gpmc_base + GPMC_CS0_OFFSET +
707 GPMC_CS_NAND_COMMAND + GPMC_CS_SIZE * cs;
708 reg->gpmc_nand_address = gpmc_base + GPMC_CS0_OFFSET +
709 GPMC_CS_NAND_ADDRESS + GPMC_CS_SIZE * cs;
710 reg->gpmc_nand_data = gpmc_base + GPMC_CS0_OFFSET +
711 GPMC_CS_NAND_DATA + GPMC_CS_SIZE * cs;
712 reg->gpmc_prefetch_config1 = gpmc_base + GPMC_PREFETCH_CONFIG1;
713 reg->gpmc_prefetch_config2 = gpmc_base + GPMC_PREFETCH_CONFIG2;
714 reg->gpmc_prefetch_control = gpmc_base + GPMC_PREFETCH_CONTROL;
715 reg->gpmc_prefetch_status = gpmc_base + GPMC_PREFETCH_STATUS;
716 reg->gpmc_ecc_config = gpmc_base + GPMC_ECC_CONFIG;
717 reg->gpmc_ecc_control = gpmc_base + GPMC_ECC_CONTROL;
718 reg->gpmc_ecc_size_config = gpmc_base + GPMC_ECC_SIZE_CONFIG;
719 reg->gpmc_ecc1_result = gpmc_base + GPMC_ECC1_RESULT;
720 reg->gpmc_bch_result0 = gpmc_base + GPMC_ECC_BCH_RESULT_0;
721}
722
723int gpmc_get_client_irq(unsigned irq_config)
724{
725 int i;
726
727 if (hweight32(irq_config) > 1)
728 return 0;
729
730 for (i = 0; i < GPMC_NR_IRQ; i++)
731 if (gpmc_client_irq[i].bitmask & irq_config)
732 return gpmc_client_irq[i].irq;
733
734 return 0;
735}
736
737static int gpmc_irq_endis(unsigned irq, bool endis)
738{
739 int i;
740 u32 regval;
741
742 for (i = 0; i < GPMC_NR_IRQ; i++)
743 if (irq == gpmc_client_irq[i].irq) {
744 regval = gpmc_read_reg(GPMC_IRQENABLE);
745 if (endis)
746 regval |= gpmc_client_irq[i].bitmask;
747 else
748 regval &= ~gpmc_client_irq[i].bitmask;
749 gpmc_write_reg(GPMC_IRQENABLE, regval);
750 break;
751 }
752
753 return 0;
754}
755
756static void gpmc_irq_disable(struct irq_data *p)
757{
758 gpmc_irq_endis(p->irq, false);
759}
760
761static void gpmc_irq_enable(struct irq_data *p)
762{
763 gpmc_irq_endis(p->irq, true);
764}
765
766static void gpmc_irq_noop(struct irq_data *data) { }
767
768static unsigned int gpmc_irq_noop_ret(struct irq_data *data) { return 0; }
769
770static int gpmc_setup_irq(int gpmc_irq)
771{
772 int i;
773 u32 regval;
774
775 if (!gpmc_irq)
776 return -EINVAL;
777
778 gpmc_irq_start = irq_alloc_descs(-1, 0, GPMC_NR_IRQ, 0);
779 if (IS_ERR_VALUE(gpmc_irq_start)) {
780 pr_err("irq_alloc_descs failed\n");
781 return gpmc_irq_start;
782 }
783
784 gpmc_irq_chip.name = "gpmc";
785 gpmc_irq_chip.irq_startup = gpmc_irq_noop_ret;
786 gpmc_irq_chip.irq_enable = gpmc_irq_enable;
787 gpmc_irq_chip.irq_disable = gpmc_irq_disable;
788 gpmc_irq_chip.irq_shutdown = gpmc_irq_noop;
789 gpmc_irq_chip.irq_ack = gpmc_irq_noop;
790 gpmc_irq_chip.irq_mask = gpmc_irq_noop;
791 gpmc_irq_chip.irq_unmask = gpmc_irq_noop;
792
793 gpmc_client_irq[0].bitmask = GPMC_IRQ_FIFOEVENTENABLE;
794 gpmc_client_irq[1].bitmask = GPMC_IRQ_COUNT_EVENT;
795
796 for (i = 0; i < GPMC_NR_IRQ; i++) {
797 gpmc_client_irq[i].irq = gpmc_irq_start + i;
798 irq_set_chip_and_handler(gpmc_client_irq[i].irq,
799 &gpmc_irq_chip, handle_simple_irq);
800 set_irq_flags(gpmc_client_irq[i].irq,
801 IRQF_VALID | IRQF_NOAUTOEN);
802 }
803
804 /* Disable interrupts */
805 gpmc_write_reg(GPMC_IRQENABLE, 0);
806
807 /* clear interrupts */
808 regval = gpmc_read_reg(GPMC_IRQSTATUS);
809 gpmc_write_reg(GPMC_IRQSTATUS, regval);
810
811 return request_irq(gpmc_irq, gpmc_handle_irq, 0, "gpmc", NULL);
812}
813
685static void __init gpmc_mem_init(void) 814static void __init gpmc_mem_init(void)
686{ 815{
687 int cs; 816 int cs;
@@ -711,8 +840,8 @@ static void __init gpmc_mem_init(void)
711 840
712static int __init gpmc_init(void) 841static int __init gpmc_init(void)
713{ 842{
714 u32 l, irq; 843 u32 l;
715 int cs, ret = -EINVAL; 844 int ret = -EINVAL;
716 int gpmc_irq; 845 int gpmc_irq;
717 char *ck = NULL; 846 char *ck = NULL;
718 847
@@ -722,16 +851,16 @@ static int __init gpmc_init(void)
722 l = OMAP2420_GPMC_BASE; 851 l = OMAP2420_GPMC_BASE;
723 else 852 else
724 l = OMAP34XX_GPMC_BASE; 853 l = OMAP34XX_GPMC_BASE;
725 gpmc_irq = INT_34XX_GPMC_IRQ; 854 gpmc_irq = 20 + OMAP_INTC_START;
726 } else if (cpu_is_omap34xx()) { 855 } else if (cpu_is_omap34xx()) {
727 ck = "gpmc_fck"; 856 ck = "gpmc_fck";
728 l = OMAP34XX_GPMC_BASE; 857 l = OMAP34XX_GPMC_BASE;
729 gpmc_irq = INT_34XX_GPMC_IRQ; 858 gpmc_irq = 20 + OMAP_INTC_START;
730 } else if (cpu_is_omap44xx() || soc_is_omap54xx()) { 859 } else if (cpu_is_omap44xx() || soc_is_omap54xx()) {
731 /* Base address and irq number are same for OMAP4/5 */ 860 /* Base address and irq number are same for OMAP4/5 */
732 ck = "gpmc_ck"; 861 ck = "gpmc_ck";
733 l = OMAP44XX_GPMC_BASE; 862 l = OMAP44XX_GPMC_BASE;
734 gpmc_irq = OMAP44XX_IRQ_GPMC; 863 gpmc_irq = 20 + OMAP44XX_IRQ_GIC_START;
735 } 864 }
736 865
737 if (WARN_ON(!ck)) 866 if (WARN_ON(!ck))
@@ -761,16 +890,7 @@ static int __init gpmc_init(void)
761 gpmc_write_reg(GPMC_SYSCONFIG, l); 890 gpmc_write_reg(GPMC_SYSCONFIG, l);
762 gpmc_mem_init(); 891 gpmc_mem_init();
763 892
764 /* initalize the irq_chained */ 893 ret = gpmc_setup_irq(gpmc_irq);
765 irq = OMAP_GPMC_IRQ_BASE;
766 for (cs = 0; cs < GPMC_CS_NUM; cs++) {
767 irq_set_chip_and_handler(irq, &dummy_irq_chip,
768 handle_simple_irq);
769 set_irq_flags(irq, IRQF_VALID);
770 irq++;
771 }
772
773 ret = request_irq(gpmc_irq, gpmc_handle_irq, IRQF_SHARED, "gpmc", NULL);
774 if (ret) 894 if (ret)
775 pr_err("gpmc: irq-%d could not claim: err %d\n", 895 pr_err("gpmc: irq-%d could not claim: err %d\n",
776 gpmc_irq, ret); 896 gpmc_irq, ret);
@@ -780,12 +900,19 @@ postcore_initcall(gpmc_init);
780 900
781static irqreturn_t gpmc_handle_irq(int irq, void *dev) 901static irqreturn_t gpmc_handle_irq(int irq, void *dev)
782{ 902{
783 u8 cs; 903 int i;
904 u32 regval;
905
906 regval = gpmc_read_reg(GPMC_IRQSTATUS);
907
908 if (!regval)
909 return IRQ_NONE;
910
911 for (i = 0; i < GPMC_NR_IRQ; i++)
912 if (regval & gpmc_client_irq[i].bitmask)
913 generic_handle_irq(gpmc_client_irq[i].irq);
784 914
785 /* check cs to invoke the irq */ 915 gpmc_write_reg(GPMC_IRQSTATUS, regval);
786 cs = ((gpmc_read_reg(GPMC_PREFETCH_CONFIG1)) >> CS_NUM_SHIFT) & 0x7;
787 if (OMAP_GPMC_IRQ_BASE+cs <= OMAP_GPMC_IRQ_END)
788 generic_handle_irq(OMAP_GPMC_IRQ_BASE+cs);
789 916
790 return IRQ_HANDLED; 917 return IRQ_HANDLED;
791} 918}
diff --git a/arch/arm/mach-omap2/hsmmc.c b/arch/arm/mach-omap2/hsmmc.c
index a9675d8d1822..80399d740952 100644
--- a/arch/arm/mach-omap2/hsmmc.c
+++ b/arch/arm/mach-omap2/hsmmc.c
@@ -15,6 +15,8 @@
15#include <linux/delay.h> 15#include <linux/delay.h>
16#include <linux/gpio.h> 16#include <linux/gpio.h>
17#include <mach/hardware.h> 17#include <mach/hardware.h>
18#include <linux/platform_data/gpio-omap.h>
19
18#include <plat/mmc.h> 20#include <plat/mmc.h>
19#include <plat/omap-pm.h> 21#include <plat/omap-pm.h>
20#include <plat/mux.h> 22#include <plat/mux.h>
diff --git a/arch/arm/mach-omap2/i2c.c b/arch/arm/mach-omap2/i2c.c
index a12e224eb97d..fc57e67b321f 100644
--- a/arch/arm/mach-omap2/i2c.c
+++ b/arch/arm/mach-omap2/i2c.c
@@ -19,7 +19,6 @@
19 * 19 *
20 */ 20 */
21 21
22#include <plat/cpu.h>
23#include <plat/i2c.h> 22#include <plat/i2c.h>
24#include "common.h" 23#include "common.h"
25#include <plat/omap_hwmod.h> 24#include <plat/omap_hwmod.h>
diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
index 40373db649aa..7219df0e831a 100644
--- a/arch/arm/mach-omap2/id.c
+++ b/arch/arm/mach-omap2/id.c
@@ -22,10 +22,10 @@
22#include <asm/cputype.h> 22#include <asm/cputype.h>
23 23
24#include "common.h" 24#include "common.h"
25#include <plat/cpu.h>
26 25
27#include <mach/id.h> 26#include <mach/id.h>
28 27
28#include "soc.h"
29#include "control.h" 29#include "control.h"
30 30
31static unsigned int omap_revision; 31static unsigned int omap_revision;
diff --git a/arch/arm/mach-omap2/include/mach/gpio.h b/arch/arm/mach-omap2/include/mach/gpio.h
index be4d290d57ee..5621cc59c9f4 100644
--- a/arch/arm/mach-omap2/include/mach/gpio.h
+++ b/arch/arm/mach-omap2/include/mach/gpio.h
@@ -1,5 +1,3 @@
1/* 1/*
2 * arch/arm/mach-omap2/include/mach/gpio.h 2 * arch/arm/mach-omap2/include/mach/gpio.h
3 */ 3 */
4
5#include <plat/gpio.h>
diff --git a/arch/arm/mach-omap2/include/mach/hardware.h b/arch/arm/mach-omap2/include/mach/hardware.h
index 78edf9d33f71..54492dbf6973 100644
--- a/arch/arm/mach-omap2/include/mach/hardware.h
+++ b/arch/arm/mach-omap2/include/mach/hardware.h
@@ -1,5 +1,3 @@
1/* 1/*
2 * arch/arm/mach-omap2/include/mach/hardware.h 2 * arch/arm/mach-omap2/include/mach/hardware.h
3 */ 3 */
4
5#include <plat/hardware.h>
diff --git a/arch/arm/mach-omap2/include/mach/irqs.h b/arch/arm/mach-omap2/include/mach/irqs.h
index 44dab7725696..ba5282cafa42 100644
--- a/arch/arm/mach-omap2/include/mach/irqs.h
+++ b/arch/arm/mach-omap2/include/mach/irqs.h
@@ -1,5 +1,3 @@
1/* 1/*
2 * arch/arm/mach-omap2/include/mach/irqs.h 2 * arch/arm/mach-omap2/include/mach/irqs.h
3 */ 3 */
4
5#include <plat/irqs.h>
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c
index 4d2d981ff5c5..4234d28dc171 100644
--- a/arch/arm/mach-omap2/io.c
+++ b/arch/arm/mach-omap2/io.c
@@ -33,6 +33,7 @@
33#include <plat/multi.h> 33#include <plat/multi.h>
34#include <plat/dma.h> 34#include <plat/dma.h>
35 35
36#include "soc.h"
36#include "iomap.h" 37#include "iomap.h"
37#include "voltage.h" 38#include "voltage.h"
38#include "powerdomain.h" 39#include "powerdomain.h"
@@ -523,6 +524,8 @@ void __init am33xx_init_early(void)
523 am33xx_voltagedomains_init(); 524 am33xx_voltagedomains_init();
524 am33xx_powerdomains_init(); 525 am33xx_powerdomains_init();
525 am33xx_clockdomains_init(); 526 am33xx_clockdomains_init();
527 am33xx_hwmod_init();
528 omap_hwmod_init_postsetup();
526 am33xx_clk_init(); 529 am33xx_clk_init();
527} 530}
528#endif 531#endif
diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c
index bcd83db41bbc..efed4f540adb 100644
--- a/arch/arm/mach-omap2/irq.c
+++ b/arch/arm/mach-omap2/irq.c
@@ -23,8 +23,7 @@
23#include <linux/of_address.h> 23#include <linux/of_address.h>
24#include <linux/of_irq.h> 24#include <linux/of_irq.h>
25 25
26#include <mach/hardware.h> 26#include "soc.h"
27
28#include "iomap.h" 27#include "iomap.h"
29#include "common.h" 28#include "common.h"
30 29
@@ -49,6 +48,8 @@
49#define OMAP3_IRQ_BASE OMAP2_L4_IO_ADDRESS(OMAP34XX_IC_BASE) 48#define OMAP3_IRQ_BASE OMAP2_L4_IO_ADDRESS(OMAP34XX_IC_BASE)
50#define INTCPS_SIR_IRQ_OFFSET 0x0040 /* omap2/3 active interrupt offset */ 49#define INTCPS_SIR_IRQ_OFFSET 0x0040 /* omap2/3 active interrupt offset */
51#define ACTIVEIRQ_MASK 0x7f /* omap2/3 active interrupt bits */ 50#define ACTIVEIRQ_MASK 0x7f /* omap2/3 active interrupt bits */
51#define INTCPS_NR_MIR_REGS 3
52#define INTCPS_NR_IRQS 96
52 53
53/* 54/*
54 * OMAP2 has a number of different interrupt controllers, each interrupt 55 * OMAP2 has a number of different interrupt controllers, each interrupt
diff --git a/arch/arm/mach-omap2/mailbox.c b/arch/arm/mach-omap2/mailbox.c
index 6875be837d9f..0d974565f8ca 100644
--- a/arch/arm/mach-omap2/mailbox.c
+++ b/arch/arm/mach-omap2/mailbox.c
@@ -16,8 +16,10 @@
16#include <linux/platform_device.h> 16#include <linux/platform_device.h>
17#include <linux/io.h> 17#include <linux/io.h>
18#include <linux/pm_runtime.h> 18#include <linux/pm_runtime.h>
19
19#include <plat/mailbox.h> 20#include <plat/mailbox.h>
20#include <mach/irqs.h> 21
22#include "soc.h"
21 23
22#define MAILBOX_REVISION 0x000 24#define MAILBOX_REVISION 0x000
23#define MAILBOX_MESSAGE(m) (0x040 + 4 * (m)) 25#define MAILBOX_MESSAGE(m) (0x040 + 4 * (m))
diff --git a/arch/arm/mach-omap2/mcbsp.c b/arch/arm/mach-omap2/mcbsp.c
index 577cb77db26c..d493727632e9 100644
--- a/arch/arm/mach-omap2/mcbsp.c
+++ b/arch/arm/mach-omap2/mcbsp.c
@@ -18,9 +18,7 @@
18#include <linux/platform_device.h> 18#include <linux/platform_device.h>
19#include <linux/slab.h> 19#include <linux/slab.h>
20 20
21#include <mach/irqs.h>
22#include <plat/dma.h> 21#include <plat/dma.h>
23#include <plat/cpu.h>
24#include <plat/mcbsp.h> 22#include <plat/mcbsp.h>
25#include <plat/omap_device.h> 23#include <plat/omap_device.h>
26#include <linux/pm_runtime.h> 24#include <linux/pm_runtime.h>
diff --git a/arch/arm/mach-omap2/msdi.c b/arch/arm/mach-omap2/msdi.c
index fb5bc6cf3773..9e57b4aadb06 100644
--- a/arch/arm/mach-omap2/msdi.c
+++ b/arch/arm/mach-omap2/msdi.c
@@ -23,6 +23,7 @@
23 23
24#include <linux/kernel.h> 24#include <linux/kernel.h>
25#include <linux/err.h> 25#include <linux/err.h>
26#include <linux/platform_data/gpio-omap.h>
26 27
27#include <plat/omap_hwmod.h> 28#include <plat/omap_hwmod.h>
28#include <plat/omap_device.h> 29#include <plat/omap_device.h>
diff --git a/arch/arm/mach-omap2/omap-iommu.c b/arch/arm/mach-omap2/omap-iommu.c
index 1be8bcb52e93..df298d46707c 100644
--- a/arch/arm/mach-omap2/omap-iommu.c
+++ b/arch/arm/mach-omap2/omap-iommu.c
@@ -14,7 +14,9 @@
14#include <linux/platform_device.h> 14#include <linux/platform_device.h>
15 15
16#include <plat/iommu.h> 16#include <plat/iommu.h>
17#include <plat/irqs.h> 17
18#include "soc.h"
19#include "common.h"
18 20
19struct iommu_device { 21struct iommu_device {
20 resource_size_t base; 22 resource_size_t base;
@@ -29,7 +31,7 @@ static int num_iommu_devices;
29static struct iommu_device omap3_devices[] = { 31static struct iommu_device omap3_devices[] = {
30 { 32 {
31 .base = 0x480bd400, 33 .base = 0x480bd400,
32 .irq = 24, 34 .irq = 24 + OMAP_INTC_START,
33 .pdata = { 35 .pdata = {
34 .name = "isp", 36 .name = "isp",
35 .nr_tlb_entries = 8, 37 .nr_tlb_entries = 8,
@@ -41,7 +43,7 @@ static struct iommu_device omap3_devices[] = {
41#if defined(CONFIG_OMAP_IOMMU_IVA2) 43#if defined(CONFIG_OMAP_IOMMU_IVA2)
42 { 44 {
43 .base = 0x5d000000, 45 .base = 0x5d000000,
44 .irq = 28, 46 .irq = 28 + OMAP_INTC_START,
45 .pdata = { 47 .pdata = {
46 .name = "iva2", 48 .name = "iva2",
47 .nr_tlb_entries = 32, 49 .nr_tlb_entries = 32,
@@ -64,7 +66,7 @@ static struct platform_device *omap3_iommu_pdev[NR_OMAP3_IOMMU_DEVICES];
64static struct iommu_device omap4_devices[] = { 66static struct iommu_device omap4_devices[] = {
65 { 67 {
66 .base = OMAP4_MMU1_BASE, 68 .base = OMAP4_MMU1_BASE,
67 .irq = OMAP44XX_IRQ_DUCATI_MMU, 69 .irq = 100 + OMAP44XX_IRQ_GIC_START,
68 .pdata = { 70 .pdata = {
69 .name = "ducati", 71 .name = "ducati",
70 .nr_tlb_entries = 32, 72 .nr_tlb_entries = 32,
@@ -75,7 +77,7 @@ static struct iommu_device omap4_devices[] = {
75 }, 77 },
76 { 78 {
77 .base = OMAP4_MMU2_BASE, 79 .base = OMAP4_MMU2_BASE,
78 .irq = OMAP44XX_IRQ_TESLA_MMU, 80 .irq = 28 + OMAP44XX_IRQ_GIC_START,
79 .pdata = { 81 .pdata = {
80 .name = "tesla", 82 .name = "tesla",
81 .nr_tlb_entries = 32, 83 .nr_tlb_entries = 32,
diff --git a/arch/arm/mach-omap2/omap-mpuss-lowpower.c b/arch/arm/mach-omap2/omap-mpuss-lowpower.c
index 637a1bdf2ac4..ff4e6a0e9c7c 100644
--- a/arch/arm/mach-omap2/omap-mpuss-lowpower.c
+++ b/arch/arm/mach-omap2/omap-mpuss-lowpower.c
@@ -50,9 +50,8 @@
50#include <asm/suspend.h> 50#include <asm/suspend.h>
51#include <asm/hardware/cache-l2x0.h> 51#include <asm/hardware/cache-l2x0.h>
52 52
53#include <plat/omap44xx.h>
54
55#include "common.h" 53#include "common.h"
54#include "omap44xx.h"
56#include "omap4-sar-layout.h" 55#include "omap4-sar-layout.h"
57#include "pm.h" 56#include "pm.h"
58#include "prcm_mpu44xx.h" 57#include "prcm_mpu44xx.h"
diff --git a/arch/arm/mach-omap2/omap-smp.c b/arch/arm/mach-omap2/omap-smp.c
index 9a35adf91232..19cc5f504f7e 100644
--- a/arch/arm/mach-omap2/omap-smp.c
+++ b/arch/arm/mach-omap2/omap-smp.c
@@ -24,11 +24,11 @@
24#include <asm/hardware/gic.h> 24#include <asm/hardware/gic.h>
25#include <asm/smp_scu.h> 25#include <asm/smp_scu.h>
26 26
27#include <mach/hardware.h>
28#include <mach/omap-secure.h> 27#include <mach/omap-secure.h>
29#include <mach/omap-wakeupgen.h> 28#include <mach/omap-wakeupgen.h>
30#include <asm/cputype.h> 29#include <asm/cputype.h>
31 30
31#include "soc.h"
32#include "iomap.h" 32#include "iomap.h"
33#include "common.h" 33#include "common.h"
34#include "clockdomain.h" 34#include "clockdomain.h"
diff --git a/arch/arm/mach-omap2/omap-wakeupgen.c b/arch/arm/mach-omap2/omap-wakeupgen.c
index 05fdebfaa195..b54427dec2a3 100644
--- a/arch/arm/mach-omap2/omap-wakeupgen.c
+++ b/arch/arm/mach-omap2/omap-wakeupgen.c
@@ -30,6 +30,7 @@
30#include <mach/omap-wakeupgen.h> 30#include <mach/omap-wakeupgen.h>
31#include <mach/omap-secure.h> 31#include <mach/omap-secure.h>
32 32
33#include "soc.h"
33#include "omap4-sar-layout.h" 34#include "omap4-sar-layout.h"
34#include "common.h" 35#include "common.h"
35 36
diff --git a/arch/arm/mach-omap2/omap24xx.h b/arch/arm/mach-omap2/omap24xx.h
new file mode 100644
index 000000000000..641a2c8d2eee
--- /dev/null
+++ b/arch/arm/mach-omap2/omap24xx.h
@@ -0,0 +1,87 @@
1/*
2 * This file contains the processor specific definitions
3 * of the TI OMAP24XX.
4 *
5 * Copyright (C) 2007 Texas Instruments.
6 * Copyright (C) 2007 Nokia Corporation.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 *
22 */
23
24#ifndef __ASM_ARCH_OMAP2_H
25#define __ASM_ARCH_OMAP2_H
26
27/*
28 * Please place only base defines here and put the rest in device
29 * specific headers. Note also that some of these defines are needed
30 * for omap1 to compile without adding ifdefs.
31 */
32
33#define L4_24XX_BASE 0x48000000
34#define L4_WK_243X_BASE 0x49000000
35#define L3_24XX_BASE 0x68000000
36
37/* interrupt controller */
38#define OMAP24XX_IC_BASE (L4_24XX_BASE + 0xfe000)
39#define OMAP24XX_IVA_INTC_BASE 0x40000000
40
41#define OMAP242X_CTRL_BASE L4_24XX_BASE
42#define OMAP2420_32KSYNCT_BASE (L4_24XX_BASE + 0x4000)
43#define OMAP2420_PRCM_BASE (L4_24XX_BASE + 0x8000)
44#define OMAP2420_CM_BASE (L4_24XX_BASE + 0x8000)
45#define OMAP2420_PRM_BASE OMAP2420_CM_BASE
46#define OMAP2420_SDRC_BASE (L3_24XX_BASE + 0x9000)
47#define OMAP2420_SMS_BASE 0x68008000
48#define OMAP2420_GPMC_BASE 0x6800a000
49
50#define OMAP2430_32KSYNCT_BASE (L4_WK_243X_BASE + 0x20000)
51#define OMAP2430_PRCM_BASE (L4_WK_243X_BASE + 0x6000)
52#define OMAP2430_CM_BASE (L4_WK_243X_BASE + 0x6000)
53#define OMAP2430_PRM_BASE OMAP2430_CM_BASE
54
55#define OMAP243X_SMS_BASE 0x6C000000
56#define OMAP243X_SDRC_BASE 0x6D000000
57#define OMAP243X_GPMC_BASE 0x6E000000
58#define OMAP243X_SCM_BASE (L4_WK_243X_BASE + 0x2000)
59#define OMAP243X_CTRL_BASE OMAP243X_SCM_BASE
60#define OMAP243X_HS_BASE (L4_24XX_BASE + 0x000ac000)
61
62/* DSP SS */
63#define OMAP2420_DSP_BASE 0x58000000
64#define OMAP2420_DSP_MEM_BASE (OMAP2420_DSP_BASE + 0x0)
65#define OMAP2420_DSP_IPI_BASE (OMAP2420_DSP_BASE + 0x1000000)
66#define OMAP2420_DSP_MMU_BASE (OMAP2420_DSP_BASE + 0x2000000)
67
68#define OMAP243X_DSP_BASE 0x5C000000
69#define OMAP243X_DSP_MEM_BASE (OMAP243X_DSP_BASE + 0x0)
70#define OMAP243X_DSP_MMU_BASE (OMAP243X_DSP_BASE + 0x1000000)
71
72/* Mailbox */
73#define OMAP24XX_MAILBOX_BASE (L4_24XX_BASE + 0x94000)
74
75/* Camera */
76#define OMAP24XX_CAMERA_BASE (L4_24XX_BASE + 0x52000)
77
78/* Security */
79#define OMAP24XX_SEC_BASE (L4_24XX_BASE + 0xA0000)
80#define OMAP24XX_SEC_RNG_BASE (OMAP24XX_SEC_BASE + 0x0000)
81#define OMAP24XX_SEC_DES_BASE (OMAP24XX_SEC_BASE + 0x2000)
82#define OMAP24XX_SEC_SHA1MD5_BASE (OMAP24XX_SEC_BASE + 0x4000)
83#define OMAP24XX_SEC_AES_BASE (OMAP24XX_SEC_BASE + 0x6000)
84#define OMAP24XX_SEC_PKA_BASE (OMAP24XX_SEC_BASE + 0x8000)
85
86#endif /* __ASM_ARCH_OMAP2_H */
87
diff --git a/arch/arm/mach-omap2/omap34xx.h b/arch/arm/mach-omap2/omap34xx.h
new file mode 100644
index 000000000000..c0d1b4b1653f
--- /dev/null
+++ b/arch/arm/mach-omap2/omap34xx.h
@@ -0,0 +1,99 @@
1/*
2 * This file contains the processor specific definitions of the TI OMAP34XX.
3 *
4 * Copyright (C) 2007 Texas Instruments.
5 * Copyright (C) 2007 Nokia Corporation.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
21
22#ifndef __ASM_ARCH_OMAP3_H
23#define __ASM_ARCH_OMAP3_H
24
25/*
26 * Please place only base defines here and put the rest in device
27 * specific headers.
28 */
29
30#define L4_34XX_BASE 0x48000000
31#define L4_WK_34XX_BASE 0x48300000
32#define L4_PER_34XX_BASE 0x49000000
33#define L4_EMU_34XX_BASE 0x54000000
34#define L3_34XX_BASE 0x68000000
35
36#define L4_WK_AM33XX_BASE 0x44C00000
37
38#define OMAP3430_32KSYNCT_BASE 0x48320000
39#define OMAP3430_CM_BASE 0x48004800
40#define OMAP3430_PRM_BASE 0x48306800
41#define OMAP343X_SMS_BASE 0x6C000000
42#define OMAP343X_SDRC_BASE 0x6D000000
43#define OMAP34XX_GPMC_BASE 0x6E000000
44#define OMAP343X_SCM_BASE 0x48002000
45#define OMAP343X_CTRL_BASE OMAP343X_SCM_BASE
46
47#define OMAP34XX_IC_BASE 0x48200000
48
49#define OMAP3430_ISP_BASE (L4_34XX_BASE + 0xBC000)
50#define OMAP3430_ISP_CBUFF_BASE (OMAP3430_ISP_BASE + 0x0100)
51#define OMAP3430_ISP_CCP2_BASE (OMAP3430_ISP_BASE + 0x0400)
52#define OMAP3430_ISP_CCDC_BASE (OMAP3430_ISP_BASE + 0x0600)
53#define OMAP3430_ISP_HIST_BASE (OMAP3430_ISP_BASE + 0x0A00)
54#define OMAP3430_ISP_H3A_BASE (OMAP3430_ISP_BASE + 0x0C00)
55#define OMAP3430_ISP_PREV_BASE (OMAP3430_ISP_BASE + 0x0E00)
56#define OMAP3430_ISP_RESZ_BASE (OMAP3430_ISP_BASE + 0x1000)
57#define OMAP3430_ISP_SBL_BASE (OMAP3430_ISP_BASE + 0x1200)
58#define OMAP3430_ISP_MMU_BASE (OMAP3430_ISP_BASE + 0x1400)
59#define OMAP3430_ISP_CSI2A_REGS1_BASE (OMAP3430_ISP_BASE + 0x1800)
60#define OMAP3430_ISP_CSIPHY2_BASE (OMAP3430_ISP_BASE + 0x1970)
61#define OMAP3630_ISP_CSI2A_REGS2_BASE (OMAP3430_ISP_BASE + 0x19C0)
62#define OMAP3630_ISP_CSI2C_REGS1_BASE (OMAP3430_ISP_BASE + 0x1C00)
63#define OMAP3630_ISP_CSIPHY1_BASE (OMAP3430_ISP_BASE + 0x1D70)
64#define OMAP3630_ISP_CSI2C_REGS2_BASE (OMAP3430_ISP_BASE + 0x1DC0)
65
66#define OMAP3430_ISP_END (OMAP3430_ISP_BASE + 0x06F)
67#define OMAP3430_ISP_CBUFF_END (OMAP3430_ISP_CBUFF_BASE + 0x077)
68#define OMAP3430_ISP_CCP2_END (OMAP3430_ISP_CCP2_BASE + 0x1EF)
69#define OMAP3430_ISP_CCDC_END (OMAP3430_ISP_CCDC_BASE + 0x0A7)
70#define OMAP3430_ISP_HIST_END (OMAP3430_ISP_HIST_BASE + 0x047)
71#define OMAP3430_ISP_H3A_END (OMAP3430_ISP_H3A_BASE + 0x05F)
72#define OMAP3430_ISP_PREV_END (OMAP3430_ISP_PREV_BASE + 0x09F)
73#define OMAP3430_ISP_RESZ_END (OMAP3430_ISP_RESZ_BASE + 0x0AB)
74#define OMAP3430_ISP_SBL_END (OMAP3430_ISP_SBL_BASE + 0x0FB)
75#define OMAP3430_ISP_MMU_END (OMAP3430_ISP_MMU_BASE + 0x06F)
76#define OMAP3430_ISP_CSI2A_REGS1_END (OMAP3430_ISP_CSI2A_REGS1_BASE + 0x16F)
77#define OMAP3430_ISP_CSIPHY2_END (OMAP3430_ISP_CSIPHY2_BASE + 0x00B)
78#define OMAP3630_ISP_CSI2A_REGS2_END (OMAP3630_ISP_CSI2A_REGS2_BASE + 0x3F)
79#define OMAP3630_ISP_CSI2C_REGS1_END (OMAP3630_ISP_CSI2C_REGS1_BASE + 0x16F)
80#define OMAP3630_ISP_CSIPHY1_END (OMAP3630_ISP_CSIPHY1_BASE + 0x00B)
81#define OMAP3630_ISP_CSI2C_REGS2_END (OMAP3630_ISP_CSI2C_REGS2_BASE + 0x3F)
82
83#define OMAP34XX_HSUSB_OTG_BASE (L4_34XX_BASE + 0xAB000)
84#define OMAP34XX_USBTLL_BASE (L4_34XX_BASE + 0x62000)
85#define OMAP34XX_UHH_CONFIG_BASE (L4_34XX_BASE + 0x64000)
86#define OMAP34XX_OHCI_BASE (L4_34XX_BASE + 0x64400)
87#define OMAP34XX_EHCI_BASE (L4_34XX_BASE + 0x64800)
88#define OMAP34XX_SR1_BASE 0x480C9000
89#define OMAP34XX_SR2_BASE 0x480CB000
90
91#define OMAP34XX_MAILBOX_BASE (L4_34XX_BASE + 0x94000)
92
93/* Security */
94#define OMAP34XX_SEC_BASE (L4_34XX_BASE + 0xA0000)
95#define OMAP34XX_SEC_SHA1MD5_BASE (OMAP34XX_SEC_BASE + 0x23000)
96#define OMAP34XX_SEC_AES_BASE (OMAP34XX_SEC_BASE + 0x25000)
97
98#endif /* __ASM_ARCH_OMAP3_H */
99
diff --git a/arch/arm/mach-omap2/omap4-common.c b/arch/arm/mach-omap2/omap4-common.c
index c29dee998a79..73c1440a8253 100644
--- a/arch/arm/mach-omap2/omap4-common.c
+++ b/arch/arm/mach-omap2/omap4-common.c
@@ -16,26 +16,25 @@
16#include <linux/io.h> 16#include <linux/io.h>
17#include <linux/platform_device.h> 17#include <linux/platform_device.h>
18#include <linux/memblock.h> 18#include <linux/memblock.h>
19#include <linux/of_irq.h>
20#include <linux/of_platform.h>
21#include <linux/export.h>
19 22
20#include <asm/hardware/gic.h> 23#include <asm/hardware/gic.h>
21#include <asm/hardware/cache-l2x0.h> 24#include <asm/hardware/cache-l2x0.h>
22#include <asm/mach/map.h> 25#include <asm/mach/map.h>
23#include <asm/memblock.h> 26#include <asm/memblock.h>
24#include <linux/of_irq.h>
25#include <linux/of_platform.h>
26 27
27#include <plat/irqs.h>
28#include <plat/sram.h> 28#include <plat/sram.h>
29#include <plat/omap-secure.h> 29#include <plat/omap-secure.h>
30#include <plat/mmc.h> 30#include <plat/mmc.h>
31 31
32#include <mach/hardware.h>
33#include <mach/omap-wakeupgen.h> 32#include <mach/omap-wakeupgen.h>
34 33
34#include "soc.h"
35#include "common.h" 35#include "common.h"
36#include "hsmmc.h" 36#include "hsmmc.h"
37#include "omap4-sar-layout.h" 37#include "omap4-sar-layout.h"
38#include <linux/export.h>
39 38
40#ifdef CONFIG_CACHE_L2X0 39#ifdef CONFIG_CACHE_L2X0
41static void __iomem *l2cache_base; 40static void __iomem *l2cache_base;
diff --git a/arch/arm/mach-omap2/omap44xx.h b/arch/arm/mach-omap2/omap44xx.h
new file mode 100644
index 000000000000..43b927b2e2e8
--- /dev/null
+++ b/arch/arm/mach-omap2/omap44xx.h
@@ -0,0 +1,62 @@
1/*:
2 * Address mappings and base address for OMAP4 interconnects
3 * and peripherals.
4 *
5 * Copyright (C) 2009 Texas Instruments
6 *
7 * Author: Santosh Shilimkar <santosh.shilimkar@ti.com>
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12 */
13#ifndef __ASM_ARCH_OMAP44XX_H
14#define __ASM_ARCH_OMAP44XX_H
15
16/*
17 * Please place only base defines here and put the rest in device
18 * specific headers.
19 */
20#define L4_44XX_BASE 0x4a000000
21#define L4_WK_44XX_BASE 0x4a300000
22#define L4_PER_44XX_BASE 0x48000000
23#define L4_EMU_44XX_BASE 0x54000000
24#define L3_44XX_BASE 0x44000000
25#define OMAP44XX_EMIF1_BASE 0x4c000000
26#define OMAP44XX_EMIF2_BASE 0x4d000000
27#define OMAP44XX_DMM_BASE 0x4e000000
28#define OMAP4430_32KSYNCT_BASE 0x4a304000
29#define OMAP4430_CM1_BASE 0x4a004000
30#define OMAP4430_CM_BASE OMAP4430_CM1_BASE
31#define OMAP4430_CM2_BASE 0x4a008000
32#define OMAP4430_PRM_BASE 0x4a306000
33#define OMAP4430_PRCM_MPU_BASE 0x48243000
34#define OMAP44XX_GPMC_BASE 0x50000000
35#define OMAP443X_SCM_BASE 0x4a002000
36#define OMAP443X_CTRL_BASE 0x4a100000
37#define OMAP44XX_IC_BASE 0x48200000
38#define OMAP44XX_IVA_INTC_BASE 0x40000000
39#define IRQ_SIR_IRQ 0x0040
40#define OMAP44XX_GIC_DIST_BASE 0x48241000
41#define OMAP44XX_GIC_CPU_BASE 0x48240100
42#define OMAP44XX_IRQ_GIC_START 32
43#define OMAP44XX_SCU_BASE 0x48240000
44#define OMAP44XX_LOCAL_TWD_BASE 0x48240600
45#define OMAP44XX_L2CACHE_BASE 0x48242000
46#define OMAP44XX_WKUPGEN_BASE 0x48281000
47#define OMAP44XX_MCPDM_BASE 0x40132000
48#define OMAP44XX_SAR_RAM_BASE 0x4a326000
49
50#define OMAP44XX_MAILBOX_BASE (L4_44XX_BASE + 0xF4000)
51#define OMAP44XX_HSUSB_OTG_BASE (L4_44XX_BASE + 0xAB000)
52
53#define OMAP4_MMU1_BASE 0x55082000
54#define OMAP4_MMU2_BASE 0x4A066000
55
56#define OMAP44XX_USBTLL_BASE (L4_44XX_BASE + 0x62000)
57#define OMAP44XX_UHH_CONFIG_BASE (L4_44XX_BASE + 0x64000)
58#define OMAP44XX_HSUSB_OHCI_BASE (L4_44XX_BASE + 0x64800)
59#define OMAP44XX_HSUSB_EHCI_BASE (L4_44XX_BASE + 0x64C00)
60
61#endif /* __ASM_ARCH_OMAP44XX_H */
62
diff --git a/arch/arm/mach-omap2/omap54xx.h b/arch/arm/mach-omap2/omap54xx.h
new file mode 100644
index 000000000000..a2582bb3cab3
--- /dev/null
+++ b/arch/arm/mach-omap2/omap54xx.h
@@ -0,0 +1,32 @@
1/*:
2 * Address mappings and base address for OMAP5 interconnects
3 * and peripherals.
4 *
5 * Copyright (C) 2012 Texas Instruments
6 * Santosh Shilimkar <santosh.shilimkar@ti.com>
7 * Sricharan <r.sricharan@ti.com>
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12 */
13#ifndef __ASM_SOC_OMAP54XX_H
14#define __ASM_SOC_OMAP54XX_H
15
16/*
17 * Please place only base defines here and put the rest in device
18 * specific headers.
19 */
20#define L4_54XX_BASE 0x4a000000
21#define L4_WK_54XX_BASE 0x4ae00000
22#define L4_PER_54XX_BASE 0x48000000
23#define L3_54XX_BASE 0x44000000
24#define OMAP54XX_32KSYNCT_BASE 0x4ae04000
25#define OMAP54XX_CM_CORE_AON_BASE 0x4a004000
26#define OMAP54XX_CM_CORE_BASE 0x4a008000
27#define OMAP54XX_PRM_BASE 0x4ae06000
28#define OMAP54XX_PRCM_MPU_BASE 0x48243000
29#define OMAP54XX_SCM_BASE 0x4a002000
30#define OMAP54XX_CTRL_BASE 0x4a002800
31
32#endif /* __ASM_SOC_OMAP555554XX_H */
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index 6ca8e519968d..22b1c18ef5c3 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -139,18 +139,20 @@
139#include <linux/slab.h> 139#include <linux/slab.h>
140#include <linux/bootmem.h> 140#include <linux/bootmem.h>
141 141
142#include "common.h"
143#include <plat/cpu.h>
144#include "clockdomain.h"
145#include "powerdomain.h"
146#include <plat/clock.h> 142#include <plat/clock.h>
147#include <plat/omap_hwmod.h> 143#include <plat/omap_hwmod.h>
148#include <plat/prcm.h> 144#include <plat/prcm.h>
149 145
146#include "soc.h"
147#include "common.h"
148#include "clockdomain.h"
149#include "powerdomain.h"
150#include "cm2xxx_3xxx.h" 150#include "cm2xxx_3xxx.h"
151#include "cminst44xx.h" 151#include "cminst44xx.h"
152#include "cm33xx.h"
152#include "prm2xxx_3xxx.h" 153#include "prm2xxx_3xxx.h"
153#include "prm44xx.h" 154#include "prm44xx.h"
155#include "prm33xx.h"
154#include "prminst44xx.h" 156#include "prminst44xx.h"
155#include "mux.h" 157#include "mux.h"
156#include "pm.h" 158#include "pm.h"
@@ -868,6 +870,26 @@ static void _omap4_enable_module(struct omap_hwmod *oh)
868} 870}
869 871
870/** 872/**
873 * _am33xx_enable_module - enable CLKCTRL modulemode on AM33XX
874 * @oh: struct omap_hwmod *
875 *
876 * Enables the PRCM module mode related to the hwmod @oh.
877 * No return value.
878 */
879static void _am33xx_enable_module(struct omap_hwmod *oh)
880{
881 if (!oh->clkdm || !oh->prcm.omap4.modulemode)
882 return;
883
884 pr_debug("omap_hwmod: %s: %s: %d\n",
885 oh->name, __func__, oh->prcm.omap4.modulemode);
886
887 am33xx_cm_module_enable(oh->prcm.omap4.modulemode, oh->clkdm->cm_inst,
888 oh->clkdm->clkdm_offs,
889 oh->prcm.omap4.clkctrl_offs);
890}
891
892/**
871 * _omap4_wait_target_disable - wait for a module to be disabled on OMAP4 893 * _omap4_wait_target_disable - wait for a module to be disabled on OMAP4
872 * @oh: struct omap_hwmod * 894 * @oh: struct omap_hwmod *
873 * 895 *
@@ -894,6 +916,31 @@ static int _omap4_wait_target_disable(struct omap_hwmod *oh)
894} 916}
895 917
896/** 918/**
919 * _am33xx_wait_target_disable - wait for a module to be disabled on AM33XX
920 * @oh: struct omap_hwmod *
921 *
922 * Wait for a module @oh to enter slave idle. Returns 0 if the module
923 * does not have an IDLEST bit or if the module successfully enters
924 * slave idle; otherwise, pass along the return value of the
925 * appropriate *_cm*_wait_module_idle() function.
926 */
927static int _am33xx_wait_target_disable(struct omap_hwmod *oh)
928{
929 if (!oh)
930 return -EINVAL;
931
932 if (oh->_int_flags & _HWMOD_NO_MPU_PORT)
933 return 0;
934
935 if (oh->flags & HWMOD_NO_IDLEST)
936 return 0;
937
938 return am33xx_cm_wait_module_idle(oh->clkdm->cm_inst,
939 oh->clkdm->clkdm_offs,
940 oh->prcm.omap4.clkctrl_offs);
941}
942
943/**
897 * _count_mpu_irqs - count the number of MPU IRQ lines associated with @oh 944 * _count_mpu_irqs - count the number of MPU IRQ lines associated with @oh
898 * @oh: struct omap_hwmod *oh 945 * @oh: struct omap_hwmod *oh
899 * 946 *
@@ -1614,6 +1661,36 @@ static int _omap4_disable_module(struct omap_hwmod *oh)
1614} 1661}
1615 1662
1616/** 1663/**
1664 * _am33xx_disable_module - enable CLKCTRL modulemode on AM33XX
1665 * @oh: struct omap_hwmod *
1666 *
1667 * Disable the PRCM module mode related to the hwmod @oh.
1668 * Return EINVAL if the modulemode is not supported and 0 in case of success.
1669 */
1670static int _am33xx_disable_module(struct omap_hwmod *oh)
1671{
1672 int v;
1673
1674 if (!oh->clkdm || !oh->prcm.omap4.modulemode)
1675 return -EINVAL;
1676
1677 pr_debug("omap_hwmod: %s: %s\n", oh->name, __func__);
1678
1679 am33xx_cm_module_disable(oh->clkdm->cm_inst, oh->clkdm->clkdm_offs,
1680 oh->prcm.omap4.clkctrl_offs);
1681
1682 if (_are_any_hardreset_lines_asserted(oh))
1683 return 0;
1684
1685 v = _am33xx_wait_target_disable(oh);
1686 if (v)
1687 pr_warn("omap_hwmod: %s: _wait_target_disable failed\n",
1688 oh->name);
1689
1690 return 0;
1691}
1692
1693/**
1617 * _ocp_softreset - reset an omap_hwmod via the OCP_SYSCONFIG bit 1694 * _ocp_softreset - reset an omap_hwmod via the OCP_SYSCONFIG bit
1618 * @oh: struct omap_hwmod * 1695 * @oh: struct omap_hwmod *
1619 * 1696 *
@@ -2548,6 +2625,33 @@ static int _omap4_wait_target_ready(struct omap_hwmod *oh)
2548} 2625}
2549 2626
2550/** 2627/**
2628 * _am33xx_wait_target_ready - wait for a module to leave slave idle
2629 * @oh: struct omap_hwmod *
2630 *
2631 * Wait for a module @oh to leave slave idle. Returns 0 if the module
2632 * does not have an IDLEST bit or if the module successfully leaves
2633 * slave idle; otherwise, pass along the return value of the
2634 * appropriate *_cm*_wait_module_ready() function.
2635 */
2636static int _am33xx_wait_target_ready(struct omap_hwmod *oh)
2637{
2638 if (!oh || !oh->clkdm)
2639 return -EINVAL;
2640
2641 if (oh->flags & HWMOD_NO_IDLEST)
2642 return 0;
2643
2644 if (!_find_mpu_rt_port(oh))
2645 return 0;
2646
2647 /* XXX check module SIDLEMODE, hardreset status */
2648
2649 return am33xx_cm_wait_module_ready(oh->clkdm->cm_inst,
2650 oh->clkdm->clkdm_offs,
2651 oh->prcm.omap4.clkctrl_offs);
2652}
2653
2654/**
2551 * _omap2_assert_hardreset - call OMAP2 PRM hardreset fn with hwmod args 2655 * _omap2_assert_hardreset - call OMAP2 PRM hardreset fn with hwmod args
2552 * @oh: struct omap_hwmod * to assert hardreset 2656 * @oh: struct omap_hwmod * to assert hardreset
2553 * @ohri: hardreset line data 2657 * @ohri: hardreset line data
@@ -2678,6 +2782,72 @@ static int _omap4_is_hardreset_asserted(struct omap_hwmod *oh,
2678 oh->prcm.omap4.rstctrl_offs); 2782 oh->prcm.omap4.rstctrl_offs);
2679} 2783}
2680 2784
2785/**
2786 * _am33xx_assert_hardreset - call AM33XX PRM hardreset fn with hwmod args
2787 * @oh: struct omap_hwmod * to assert hardreset
2788 * @ohri: hardreset line data
2789 *
2790 * Call am33xx_prminst_assert_hardreset() with parameters extracted
2791 * from the hwmod @oh and the hardreset line data @ohri. Only
2792 * intended for use as an soc_ops function pointer. Passes along the
2793 * return value from am33xx_prminst_assert_hardreset(). XXX This
2794 * function is scheduled for removal when the PRM code is moved into
2795 * drivers/.
2796 */
2797static int _am33xx_assert_hardreset(struct omap_hwmod *oh,
2798 struct omap_hwmod_rst_info *ohri)
2799
2800{
2801 return am33xx_prm_assert_hardreset(ohri->rst_shift,
2802 oh->clkdm->pwrdm.ptr->prcm_offs,
2803 oh->prcm.omap4.rstctrl_offs);
2804}
2805
2806/**
2807 * _am33xx_deassert_hardreset - call AM33XX PRM hardreset fn with hwmod args
2808 * @oh: struct omap_hwmod * to deassert hardreset
2809 * @ohri: hardreset line data
2810 *
2811 * Call am33xx_prminst_deassert_hardreset() with parameters extracted
2812 * from the hwmod @oh and the hardreset line data @ohri. Only
2813 * intended for use as an soc_ops function pointer. Passes along the
2814 * return value from am33xx_prminst_deassert_hardreset(). XXX This
2815 * function is scheduled for removal when the PRM code is moved into
2816 * drivers/.
2817 */
2818static int _am33xx_deassert_hardreset(struct omap_hwmod *oh,
2819 struct omap_hwmod_rst_info *ohri)
2820{
2821 if (ohri->st_shift)
2822 pr_err("omap_hwmod: %s: %s: hwmod data error: OMAP4 does not support st_shift\n",
2823 oh->name, ohri->name);
2824
2825 return am33xx_prm_deassert_hardreset(ohri->rst_shift,
2826 oh->clkdm->pwrdm.ptr->prcm_offs,
2827 oh->prcm.omap4.rstctrl_offs,
2828 oh->prcm.omap4.rstst_offs);
2829}
2830
2831/**
2832 * _am33xx_is_hardreset_asserted - call AM33XX PRM hardreset fn with hwmod args
2833 * @oh: struct omap_hwmod * to test hardreset
2834 * @ohri: hardreset line data
2835 *
2836 * Call am33xx_prminst_is_hardreset_asserted() with parameters
2837 * extracted from the hwmod @oh and the hardreset line data @ohri.
2838 * Only intended for use as an soc_ops function pointer. Passes along
2839 * the return value from am33xx_prminst_is_hardreset_asserted(). XXX
2840 * This function is scheduled for removal when the PRM code is moved
2841 * into drivers/.
2842 */
2843static int _am33xx_is_hardreset_asserted(struct omap_hwmod *oh,
2844 struct omap_hwmod_rst_info *ohri)
2845{
2846 return am33xx_prm_is_hardreset_asserted(ohri->rst_shift,
2847 oh->clkdm->pwrdm.ptr->prcm_offs,
2848 oh->prcm.omap4.rstctrl_offs);
2849}
2850
2681/* Public functions */ 2851/* Public functions */
2682 2852
2683u32 omap_hwmod_read(struct omap_hwmod *oh, u16 reg_offs) 2853u32 omap_hwmod_read(struct omap_hwmod *oh, u16 reg_offs)
@@ -3677,6 +3847,14 @@ void __init omap_hwmod_init(void)
3677 soc_ops.deassert_hardreset = _omap4_deassert_hardreset; 3847 soc_ops.deassert_hardreset = _omap4_deassert_hardreset;
3678 soc_ops.is_hardreset_asserted = _omap4_is_hardreset_asserted; 3848 soc_ops.is_hardreset_asserted = _omap4_is_hardreset_asserted;
3679 soc_ops.init_clkdm = _init_clkdm; 3849 soc_ops.init_clkdm = _init_clkdm;
3850 } else if (soc_is_am33xx()) {
3851 soc_ops.enable_module = _am33xx_enable_module;
3852 soc_ops.disable_module = _am33xx_disable_module;
3853 soc_ops.wait_target_ready = _am33xx_wait_target_ready;
3854 soc_ops.assert_hardreset = _am33xx_assert_hardreset;
3855 soc_ops.deassert_hardreset = _am33xx_deassert_hardreset;
3856 soc_ops.is_hardreset_asserted = _am33xx_is_hardreset_asserted;
3857 soc_ops.init_clkdm = _init_clkdm;
3680 } else { 3858 } else {
3681 WARN(1, "omap_hwmod: unknown SoC type\n"); 3859 WARN(1, "omap_hwmod: unknown SoC type\n");
3682 } 3860 }
diff --git a/arch/arm/mach-omap2/omap_hwmod_2420_data.c b/arch/arm/mach-omap2/omap_hwmod_2420_data.c
index 50cfab61b0e2..4e81637640e9 100644
--- a/arch/arm/mach-omap2/omap_hwmod_2420_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_2420_data.c
@@ -13,12 +13,9 @@
13 * XXX these should be marked initdata for multi-OMAP kernels 13 * XXX these should be marked initdata for multi-OMAP kernels
14 */ 14 */
15#include <plat/omap_hwmod.h> 15#include <plat/omap_hwmod.h>
16#include <mach/irqs.h>
17#include <plat/cpu.h>
18#include <plat/dma.h> 16#include <plat/dma.h>
19#include <plat/serial.h> 17#include <plat/serial.h>
20#include <plat/i2c.h> 18#include <plat/i2c.h>
21#include <plat/gpio.h>
22#include <plat/mcspi.h> 19#include <plat/mcspi.h>
23#include <plat/dmtimer.h> 20#include <plat/dmtimer.h>
24#include <plat/l3_2xxx.h> 21#include <plat/l3_2xxx.h>
@@ -162,9 +159,9 @@ static struct omap_hwmod omap2420_dma_system_hwmod = {
162 159
163/* mailbox */ 160/* mailbox */
164static struct omap_hwmod_irq_info omap2420_mailbox_irqs[] = { 161static struct omap_hwmod_irq_info omap2420_mailbox_irqs[] = {
165 { .name = "dsp", .irq = 26 }, 162 { .name = "dsp", .irq = 26 + OMAP_INTC_START, },
166 { .name = "iva", .irq = 34 }, 163 { .name = "iva", .irq = 34 + OMAP_INTC_START, },
167 { .irq = -1 } 164 { .irq = -1 },
168}; 165};
169 166
170static struct omap_hwmod omap2420_mailbox_hwmod = { 167static struct omap_hwmod omap2420_mailbox_hwmod = {
@@ -199,9 +196,9 @@ static struct omap_hwmod_opt_clk mcbsp_opt_clks[] = {
199 196
200/* mcbsp1 */ 197/* mcbsp1 */
201static struct omap_hwmod_irq_info omap2420_mcbsp1_irqs[] = { 198static struct omap_hwmod_irq_info omap2420_mcbsp1_irqs[] = {
202 { .name = "tx", .irq = 59 }, 199 { .name = "tx", .irq = 59 + OMAP_INTC_START, },
203 { .name = "rx", .irq = 60 }, 200 { .name = "rx", .irq = 60 + OMAP_INTC_START, },
204 { .irq = -1 } 201 { .irq = -1 },
205}; 202};
206 203
207static struct omap_hwmod omap2420_mcbsp1_hwmod = { 204static struct omap_hwmod omap2420_mcbsp1_hwmod = {
@@ -225,9 +222,9 @@ static struct omap_hwmod omap2420_mcbsp1_hwmod = {
225 222
226/* mcbsp2 */ 223/* mcbsp2 */
227static struct omap_hwmod_irq_info omap2420_mcbsp2_irqs[] = { 224static struct omap_hwmod_irq_info omap2420_mcbsp2_irqs[] = {
228 { .name = "tx", .irq = 62 }, 225 { .name = "tx", .irq = 62 + OMAP_INTC_START, },
229 { .name = "rx", .irq = 63 }, 226 { .name = "rx", .irq = 63 + OMAP_INTC_START, },
230 { .irq = -1 } 227 { .irq = -1 },
231}; 228};
232 229
233static struct omap_hwmod omap2420_mcbsp2_hwmod = { 230static struct omap_hwmod omap2420_mcbsp2_hwmod = {
@@ -265,8 +262,8 @@ static struct omap_hwmod_class omap2420_msdi_hwmod_class = {
265 262
266/* msdi1 */ 263/* msdi1 */
267static struct omap_hwmod_irq_info omap2420_msdi1_irqs[] = { 264static struct omap_hwmod_irq_info omap2420_msdi1_irqs[] = {
268 { .irq = 83 }, 265 { .irq = 83 + OMAP_INTC_START, },
269 { .irq = -1 } 266 { .irq = -1 },
270}; 267};
271 268
272static struct omap_hwmod_dma_info omap2420_msdi1_sdma_reqs[] = { 269static struct omap_hwmod_dma_info omap2420_msdi1_sdma_reqs[] = {
diff --git a/arch/arm/mach-omap2/omap_hwmod_2430_data.c b/arch/arm/mach-omap2/omap_hwmod_2430_data.c
index 58b5bc196d32..ceb23c3fa89d 100644
--- a/arch/arm/mach-omap2/omap_hwmod_2430_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_2430_data.c
@@ -13,20 +13,17 @@
13 * XXX these should be marked initdata for multi-OMAP kernels 13 * XXX these should be marked initdata for multi-OMAP kernels
14 */ 14 */
15#include <plat/omap_hwmod.h> 15#include <plat/omap_hwmod.h>
16#include <mach/irqs.h>
17#include <plat/cpu.h>
18#include <plat/dma.h> 16#include <plat/dma.h>
19#include <plat/serial.h> 17#include <plat/serial.h>
20#include <plat/i2c.h> 18#include <plat/i2c.h>
21#include <plat/gpio.h>
22#include <plat/mcbsp.h> 19#include <plat/mcbsp.h>
23#include <plat/mcspi.h> 20#include <plat/mcspi.h>
24#include <plat/dmtimer.h> 21#include <plat/dmtimer.h>
25#include <plat/mmc.h> 22#include <plat/mmc.h>
26#include <plat/l3_2xxx.h> 23#include <plat/l3_2xxx.h>
27 24
25#include "soc.h"
28#include "omap_hwmod_common_data.h" 26#include "omap_hwmod_common_data.h"
29
30#include "prm-regbits-24xx.h" 27#include "prm-regbits-24xx.h"
31#include "cm-regbits-24xx.h" 28#include "cm-regbits-24xx.h"
32#include "wd_timer.h" 29#include "wd_timer.h"
@@ -133,8 +130,8 @@ static struct omap_hwmod omap2430_i2c2_hwmod = {
133 130
134/* gpio5 */ 131/* gpio5 */
135static struct omap_hwmod_irq_info omap243x_gpio5_irqs[] = { 132static struct omap_hwmod_irq_info omap243x_gpio5_irqs[] = {
136 { .irq = 33 }, /* INT_24XX_GPIO_BANK5 */ 133 { .irq = 33 + OMAP_INTC_START, }, /* INT_24XX_GPIO_BANK5 */
137 { .irq = -1 } 134 { .irq = -1 },
138}; 135};
139 136
140static struct omap_hwmod omap2430_gpio5_hwmod = { 137static struct omap_hwmod omap2430_gpio5_hwmod = {
@@ -173,8 +170,8 @@ static struct omap_hwmod omap2430_dma_system_hwmod = {
173 170
174/* mailbox */ 171/* mailbox */
175static struct omap_hwmod_irq_info omap2430_mailbox_irqs[] = { 172static struct omap_hwmod_irq_info omap2430_mailbox_irqs[] = {
176 { .irq = 26 }, 173 { .irq = 26 + OMAP_INTC_START, },
177 { .irq = -1 } 174 { .irq = -1 },
178}; 175};
179 176
180static struct omap_hwmod omap2430_mailbox_hwmod = { 177static struct omap_hwmod omap2430_mailbox_hwmod = {
@@ -195,8 +192,8 @@ static struct omap_hwmod omap2430_mailbox_hwmod = {
195 192
196/* mcspi3 */ 193/* mcspi3 */
197static struct omap_hwmod_irq_info omap2430_mcspi3_mpu_irqs[] = { 194static struct omap_hwmod_irq_info omap2430_mcspi3_mpu_irqs[] = {
198 { .irq = 91 }, 195 { .irq = 91 + OMAP_INTC_START, },
199 { .irq = -1 } 196 { .irq = -1 },
200}; 197};
201 198
202static struct omap_hwmod_dma_info omap2430_mcspi3_sdma_reqs[] = { 199static struct omap_hwmod_dma_info omap2430_mcspi3_sdma_reqs[] = {
@@ -250,9 +247,9 @@ static struct omap_hwmod_class usbotg_class = {
250/* usb_otg_hs */ 247/* usb_otg_hs */
251static struct omap_hwmod_irq_info omap2430_usbhsotg_mpu_irqs[] = { 248static struct omap_hwmod_irq_info omap2430_usbhsotg_mpu_irqs[] = {
252 249
253 { .name = "mc", .irq = 92 }, 250 { .name = "mc", .irq = 92 + OMAP_INTC_START, },
254 { .name = "dma", .irq = 93 }, 251 { .name = "dma", .irq = 93 + OMAP_INTC_START, },
255 { .irq = -1 } 252 { .irq = -1 },
256}; 253};
257 254
258static struct omap_hwmod omap2430_usbhsotg_hwmod = { 255static struct omap_hwmod omap2430_usbhsotg_hwmod = {
@@ -303,11 +300,11 @@ static struct omap_hwmod_opt_clk mcbsp_opt_clks[] = {
303 300
304/* mcbsp1 */ 301/* mcbsp1 */
305static struct omap_hwmod_irq_info omap2430_mcbsp1_irqs[] = { 302static struct omap_hwmod_irq_info omap2430_mcbsp1_irqs[] = {
306 { .name = "tx", .irq = 59 }, 303 { .name = "tx", .irq = 59 + OMAP_INTC_START, },
307 { .name = "rx", .irq = 60 }, 304 { .name = "rx", .irq = 60 + OMAP_INTC_START, },
308 { .name = "ovr", .irq = 61 }, 305 { .name = "ovr", .irq = 61 + OMAP_INTC_START, },
309 { .name = "common", .irq = 64 }, 306 { .name = "common", .irq = 64 + OMAP_INTC_START, },
310 { .irq = -1 } 307 { .irq = -1 },
311}; 308};
312 309
313static struct omap_hwmod omap2430_mcbsp1_hwmod = { 310static struct omap_hwmod omap2430_mcbsp1_hwmod = {
@@ -331,10 +328,10 @@ static struct omap_hwmod omap2430_mcbsp1_hwmod = {
331 328
332/* mcbsp2 */ 329/* mcbsp2 */
333static struct omap_hwmod_irq_info omap2430_mcbsp2_irqs[] = { 330static struct omap_hwmod_irq_info omap2430_mcbsp2_irqs[] = {
334 { .name = "tx", .irq = 62 }, 331 { .name = "tx", .irq = 62 + OMAP_INTC_START, },
335 { .name = "rx", .irq = 63 }, 332 { .name = "rx", .irq = 63 + OMAP_INTC_START, },
336 { .name = "common", .irq = 16 }, 333 { .name = "common", .irq = 16 + OMAP_INTC_START, },
337 { .irq = -1 } 334 { .irq = -1 },
338}; 335};
339 336
340static struct omap_hwmod omap2430_mcbsp2_hwmod = { 337static struct omap_hwmod omap2430_mcbsp2_hwmod = {
@@ -358,10 +355,10 @@ static struct omap_hwmod omap2430_mcbsp2_hwmod = {
358 355
359/* mcbsp3 */ 356/* mcbsp3 */
360static struct omap_hwmod_irq_info omap2430_mcbsp3_irqs[] = { 357static struct omap_hwmod_irq_info omap2430_mcbsp3_irqs[] = {
361 { .name = "tx", .irq = 89 }, 358 { .name = "tx", .irq = 89 + OMAP_INTC_START, },
362 { .name = "rx", .irq = 90 }, 359 { .name = "rx", .irq = 90 + OMAP_INTC_START, },
363 { .name = "common", .irq = 17 }, 360 { .name = "common", .irq = 17 + OMAP_INTC_START, },
364 { .irq = -1 } 361 { .irq = -1 },
365}; 362};
366 363
367static struct omap_hwmod omap2430_mcbsp3_hwmod = { 364static struct omap_hwmod omap2430_mcbsp3_hwmod = {
@@ -385,10 +382,10 @@ static struct omap_hwmod omap2430_mcbsp3_hwmod = {
385 382
386/* mcbsp4 */ 383/* mcbsp4 */
387static struct omap_hwmod_irq_info omap2430_mcbsp4_irqs[] = { 384static struct omap_hwmod_irq_info omap2430_mcbsp4_irqs[] = {
388 { .name = "tx", .irq = 54 }, 385 { .name = "tx", .irq = 54 + OMAP_INTC_START, },
389 { .name = "rx", .irq = 55 }, 386 { .name = "rx", .irq = 55 + OMAP_INTC_START, },
390 { .name = "common", .irq = 18 }, 387 { .name = "common", .irq = 18 + OMAP_INTC_START, },
391 { .irq = -1 } 388 { .irq = -1 },
392}; 389};
393 390
394static struct omap_hwmod_dma_info omap2430_mcbsp4_sdma_chs[] = { 391static struct omap_hwmod_dma_info omap2430_mcbsp4_sdma_chs[] = {
@@ -418,10 +415,10 @@ static struct omap_hwmod omap2430_mcbsp4_hwmod = {
418 415
419/* mcbsp5 */ 416/* mcbsp5 */
420static struct omap_hwmod_irq_info omap2430_mcbsp5_irqs[] = { 417static struct omap_hwmod_irq_info omap2430_mcbsp5_irqs[] = {
421 { .name = "tx", .irq = 81 }, 418 { .name = "tx", .irq = 81 + OMAP_INTC_START, },
422 { .name = "rx", .irq = 82 }, 419 { .name = "rx", .irq = 82 + OMAP_INTC_START, },
423 { .name = "common", .irq = 19 }, 420 { .name = "common", .irq = 19 + OMAP_INTC_START, },
424 { .irq = -1 } 421 { .irq = -1 },
425}; 422};
426 423
427static struct omap_hwmod_dma_info omap2430_mcbsp5_sdma_chs[] = { 424static struct omap_hwmod_dma_info omap2430_mcbsp5_sdma_chs[] = {
@@ -468,8 +465,8 @@ static struct omap_hwmod_class omap2430_mmc_class = {
468 465
469/* MMC/SD/SDIO1 */ 466/* MMC/SD/SDIO1 */
470static struct omap_hwmod_irq_info omap2430_mmc1_mpu_irqs[] = { 467static struct omap_hwmod_irq_info omap2430_mmc1_mpu_irqs[] = {
471 { .irq = 83 }, 468 { .irq = 83 + OMAP_INTC_START, },
472 { .irq = -1 } 469 { .irq = -1 },
473}; 470};
474 471
475static struct omap_hwmod_dma_info omap2430_mmc1_sdma_reqs[] = { 472static struct omap_hwmod_dma_info omap2430_mmc1_sdma_reqs[] = {
@@ -509,8 +506,8 @@ static struct omap_hwmod omap2430_mmc1_hwmod = {
509 506
510/* MMC/SD/SDIO2 */ 507/* MMC/SD/SDIO2 */
511static struct omap_hwmod_irq_info omap2430_mmc2_mpu_irqs[] = { 508static struct omap_hwmod_irq_info omap2430_mmc2_mpu_irqs[] = {
512 { .irq = 86 }, 509 { .irq = 86 + OMAP_INTC_START, },
513 { .irq = -1 } 510 { .irq = -1 },
514}; 511};
515 512
516static struct omap_hwmod_dma_info omap2430_mmc2_sdma_reqs[] = { 513static struct omap_hwmod_dma_info omap2430_mmc2_sdma_reqs[] = {
diff --git a/arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c b/arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c
index 102d76e9e9ea..bea700e928e7 100644
--- a/arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c
@@ -15,8 +15,6 @@
15#include <plat/common.h> 15#include <plat/common.h>
16#include <plat/hdq1w.h> 16#include <plat/hdq1w.h>
17 17
18#include <mach/irqs.h>
19
20#include "omap_hwmod_common_data.h" 18#include "omap_hwmod_common_data.h"
21 19
22/* UART */ 20/* UART */
@@ -182,126 +180,126 @@ struct omap_hwmod_class iva_hwmod_class = {
182/* Common MPU IRQ line data */ 180/* Common MPU IRQ line data */
183 181
184struct omap_hwmod_irq_info omap2_timer1_mpu_irqs[] = { 182struct omap_hwmod_irq_info omap2_timer1_mpu_irqs[] = {
185 { .irq = 37, }, 183 { .irq = 37 + OMAP_INTC_START, },
186 { .irq = -1 } 184 { .irq = -1 },
187}; 185};
188 186
189struct omap_hwmod_irq_info omap2_timer2_mpu_irqs[] = { 187struct omap_hwmod_irq_info omap2_timer2_mpu_irqs[] = {
190 { .irq = 38, }, 188 { .irq = 38 + OMAP_INTC_START, },
191 { .irq = -1 } 189 { .irq = -1 },
192}; 190};
193 191
194struct omap_hwmod_irq_info omap2_timer3_mpu_irqs[] = { 192struct omap_hwmod_irq_info omap2_timer3_mpu_irqs[] = {
195 { .irq = 39, }, 193 { .irq = 39 + OMAP_INTC_START, },
196 { .irq = -1 } 194 { .irq = -1 },
197}; 195};
198 196
199struct omap_hwmod_irq_info omap2_timer4_mpu_irqs[] = { 197struct omap_hwmod_irq_info omap2_timer4_mpu_irqs[] = {
200 { .irq = 40, }, 198 { .irq = 40 + OMAP_INTC_START, },
201 { .irq = -1 } 199 { .irq = -1 },
202}; 200};
203 201
204struct omap_hwmod_irq_info omap2_timer5_mpu_irqs[] = { 202struct omap_hwmod_irq_info omap2_timer5_mpu_irqs[] = {
205 { .irq = 41, }, 203 { .irq = 41 + OMAP_INTC_START, },
206 { .irq = -1 } 204 { .irq = -1 },
207}; 205};
208 206
209struct omap_hwmod_irq_info omap2_timer6_mpu_irqs[] = { 207struct omap_hwmod_irq_info omap2_timer6_mpu_irqs[] = {
210 { .irq = 42, }, 208 { .irq = 42 + OMAP_INTC_START, },
211 { .irq = -1 } 209 { .irq = -1 },
212}; 210};
213 211
214struct omap_hwmod_irq_info omap2_timer7_mpu_irqs[] = { 212struct omap_hwmod_irq_info omap2_timer7_mpu_irqs[] = {
215 { .irq = 43, }, 213 { .irq = 43 + OMAP_INTC_START, },
216 { .irq = -1 } 214 { .irq = -1 },
217}; 215};
218 216
219struct omap_hwmod_irq_info omap2_timer8_mpu_irqs[] = { 217struct omap_hwmod_irq_info omap2_timer8_mpu_irqs[] = {
220 { .irq = 44, }, 218 { .irq = 44 + OMAP_INTC_START, },
221 { .irq = -1 } 219 { .irq = -1 },
222}; 220};
223 221
224struct omap_hwmod_irq_info omap2_timer9_mpu_irqs[] = { 222struct omap_hwmod_irq_info omap2_timer9_mpu_irqs[] = {
225 { .irq = 45, }, 223 { .irq = 45 + OMAP_INTC_START, },
226 { .irq = -1 } 224 { .irq = -1 },
227}; 225};
228 226
229struct omap_hwmod_irq_info omap2_timer10_mpu_irqs[] = { 227struct omap_hwmod_irq_info omap2_timer10_mpu_irqs[] = {
230 { .irq = 46, }, 228 { .irq = 46 + OMAP_INTC_START, },
231 { .irq = -1 } 229 { .irq = -1 },
232}; 230};
233 231
234struct omap_hwmod_irq_info omap2_timer11_mpu_irqs[] = { 232struct omap_hwmod_irq_info omap2_timer11_mpu_irqs[] = {
235 { .irq = 47, }, 233 { .irq = 47 + OMAP_INTC_START, },
236 { .irq = -1 } 234 { .irq = -1 },
237}; 235};
238 236
239struct omap_hwmod_irq_info omap2_uart1_mpu_irqs[] = { 237struct omap_hwmod_irq_info omap2_uart1_mpu_irqs[] = {
240 { .irq = INT_24XX_UART1_IRQ, }, 238 { .irq = 72 + OMAP_INTC_START, },
241 { .irq = -1 } 239 { .irq = -1 },
242}; 240};
243 241
244struct omap_hwmod_irq_info omap2_uart2_mpu_irqs[] = { 242struct omap_hwmod_irq_info omap2_uart2_mpu_irqs[] = {
245 { .irq = INT_24XX_UART2_IRQ, }, 243 { .irq = 73 + OMAP_INTC_START, },
246 { .irq = -1 } 244 { .irq = -1 },
247}; 245};
248 246
249struct omap_hwmod_irq_info omap2_uart3_mpu_irqs[] = { 247struct omap_hwmod_irq_info omap2_uart3_mpu_irqs[] = {
250 { .irq = INT_24XX_UART3_IRQ, }, 248 { .irq = 74 + OMAP_INTC_START, },
251 { .irq = -1 } 249 { .irq = -1 },
252}; 250};
253 251
254struct omap_hwmod_irq_info omap2_dispc_irqs[] = { 252struct omap_hwmod_irq_info omap2_dispc_irqs[] = {
255 { .irq = 25 }, 253 { .irq = 25 + OMAP_INTC_START, },
256 { .irq = -1 } 254 { .irq = -1 },
257}; 255};
258 256
259struct omap_hwmod_irq_info omap2_i2c1_mpu_irqs[] = { 257struct omap_hwmod_irq_info omap2_i2c1_mpu_irqs[] = {
260 { .irq = INT_24XX_I2C1_IRQ, }, 258 { .irq = 56 + OMAP_INTC_START, },
261 { .irq = -1 } 259 { .irq = -1 },
262}; 260};
263 261
264struct omap_hwmod_irq_info omap2_i2c2_mpu_irqs[] = { 262struct omap_hwmod_irq_info omap2_i2c2_mpu_irqs[] = {
265 { .irq = INT_24XX_I2C2_IRQ, }, 263 { .irq = 57 + OMAP_INTC_START, },
266 { .irq = -1 } 264 { .irq = -1 },
267}; 265};
268 266
269struct omap_hwmod_irq_info omap2_gpio1_irqs[] = { 267struct omap_hwmod_irq_info omap2_gpio1_irqs[] = {
270 { .irq = 29 }, /* INT_24XX_GPIO_BANK1 */ 268 { .irq = 29 + OMAP_INTC_START, }, /* INT_24XX_GPIO_BANK1 */
271 { .irq = -1 } 269 { .irq = -1 },
272}; 270};
273 271
274struct omap_hwmod_irq_info omap2_gpio2_irqs[] = { 272struct omap_hwmod_irq_info omap2_gpio2_irqs[] = {
275 { .irq = 30 }, /* INT_24XX_GPIO_BANK2 */ 273 { .irq = 30 + OMAP_INTC_START, }, /* INT_24XX_GPIO_BANK2 */
276 { .irq = -1 } 274 { .irq = -1 },
277}; 275};
278 276
279struct omap_hwmod_irq_info omap2_gpio3_irqs[] = { 277struct omap_hwmod_irq_info omap2_gpio3_irqs[] = {
280 { .irq = 31 }, /* INT_24XX_GPIO_BANK3 */ 278 { .irq = 31 + OMAP_INTC_START, }, /* INT_24XX_GPIO_BANK3 */
281 { .irq = -1 } 279 { .irq = -1 },
282}; 280};
283 281
284struct omap_hwmod_irq_info omap2_gpio4_irqs[] = { 282struct omap_hwmod_irq_info omap2_gpio4_irqs[] = {
285 { .irq = 32 }, /* INT_24XX_GPIO_BANK4 */ 283 { .irq = 32 + OMAP_INTC_START, }, /* INT_24XX_GPIO_BANK4 */
286 { .irq = -1 } 284 { .irq = -1 },
287}; 285};
288 286
289struct omap_hwmod_irq_info omap2_dma_system_irqs[] = { 287struct omap_hwmod_irq_info omap2_dma_system_irqs[] = {
290 { .name = "0", .irq = 12 }, /* INT_24XX_SDMA_IRQ0 */ 288 { .name = "0", .irq = 12 + OMAP_INTC_START, }, /* INT_24XX_SDMA_IRQ0 */
291 { .name = "1", .irq = 13 }, /* INT_24XX_SDMA_IRQ1 */ 289 { .name = "1", .irq = 13 + OMAP_INTC_START, }, /* INT_24XX_SDMA_IRQ1 */
292 { .name = "2", .irq = 14 }, /* INT_24XX_SDMA_IRQ2 */ 290 { .name = "2", .irq = 14 + OMAP_INTC_START, }, /* INT_24XX_SDMA_IRQ2 */
293 { .name = "3", .irq = 15 }, /* INT_24XX_SDMA_IRQ3 */ 291 { .name = "3", .irq = 15 + OMAP_INTC_START, }, /* INT_24XX_SDMA_IRQ3 */
294 { .irq = -1 } 292 { .irq = -1 },
295}; 293};
296 294
297struct omap_hwmod_irq_info omap2_mcspi1_mpu_irqs[] = { 295struct omap_hwmod_irq_info omap2_mcspi1_mpu_irqs[] = {
298 { .irq = 65 }, 296 { .irq = 65 + OMAP_INTC_START, },
299 { .irq = -1 } 297 { .irq = -1 },
300}; 298};
301 299
302struct omap_hwmod_irq_info omap2_mcspi2_mpu_irqs[] = { 300struct omap_hwmod_irq_info omap2_mcspi2_mpu_irqs[] = {
303 { .irq = 66 }, 301 { .irq = 66 + OMAP_INTC_START, },
304 { .irq = -1 } 302 { .irq = -1 },
305}; 303};
306 304
307struct omap_hwmod_class_sysconfig omap2_hdq1w_sysc = { 305struct omap_hwmod_class_sysconfig omap2_hdq1w_sysc = {
@@ -320,7 +318,7 @@ struct omap_hwmod_class omap2_hdq1w_class = {
320}; 318};
321 319
322struct omap_hwmod_irq_info omap2_hdq1w_mpu_irqs[] = { 320struct omap_hwmod_irq_info omap2_hdq1w_mpu_irqs[] = {
323 { .irq = 58, }, 321 { .irq = 58 + OMAP_INTC_START, },
324 { .irq = -1 } 322 { .irq = -1 },
325}; 323};
326 324
diff --git a/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c b/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c
index afad69c6ba6e..ceb305242340 100644
--- a/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c
@@ -10,21 +10,19 @@
10 */ 10 */
11#include <plat/omap_hwmod.h> 11#include <plat/omap_hwmod.h>
12#include <plat/serial.h> 12#include <plat/serial.h>
13#include <plat/gpio.h> 13#include <linux/platform_data/gpio-omap.h>
14#include <plat/dma.h> 14#include <plat/dma.h>
15#include <plat/dmtimer.h> 15#include <plat/dmtimer.h>
16#include <plat/mcspi.h> 16#include <plat/mcspi.h>
17 17
18#include <mach/irqs.h>
19
20#include "omap_hwmod_common_data.h" 18#include "omap_hwmod_common_data.h"
21#include "cm-regbits-24xx.h" 19#include "cm-regbits-24xx.h"
22#include "prm-regbits-24xx.h" 20#include "prm-regbits-24xx.h"
23#include "wd_timer.h" 21#include "wd_timer.h"
24 22
25struct omap_hwmod_irq_info omap2xxx_timer12_mpu_irqs[] = { 23struct omap_hwmod_irq_info omap2xxx_timer12_mpu_irqs[] = {
26 { .irq = 48, }, 24 { .irq = 48 + OMAP_INTC_START, },
27 { .irq = -1 } 25 { .irq = -1 },
28}; 26};
29 27
30struct omap_hwmod_dma_info omap2xxx_dss_sdma_chs[] = { 28struct omap_hwmod_dma_info omap2xxx_dss_sdma_chs[] = {
diff --git a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
new file mode 100644
index 000000000000..22433cb2bec0
--- /dev/null
+++ b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
@@ -0,0 +1,3381 @@
1/*
2 * omap_hwmod_33xx_data.c: Hardware modules present on the AM33XX chips
3 *
4 * Copyright (C) {2012} Texas Instruments Incorporated - http://www.ti.com/
5 *
6 * This file is automatically generated from the AM33XX hardware databases.
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License as
9 * published by the Free Software Foundation version 2.
10 *
11 * This program is distributed "as is" WITHOUT ANY WARRANTY of any
12 * kind, whether express or implied; without even the implied warranty
13 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 */
16
17#include <plat/omap_hwmod.h>
18#include <plat/cpu.h>
19#include <linux/platform_data/gpio-omap.h>
20#include <plat/dma.h>
21#include <plat/mmc.h>
22#include <plat/mcspi.h>
23#include <plat/i2c.h>
24
25#include "omap_hwmod_common_data.h"
26
27#include "control.h"
28#include "cm33xx.h"
29#include "prm33xx.h"
30#include "prm-regbits-33xx.h"
31
32/*
33 * IP blocks
34 */
35
36/*
37 * 'emif_fw' class
38 * instance(s): emif_fw
39 */
40static struct omap_hwmod_class am33xx_emif_fw_hwmod_class = {
41 .name = "emif_fw",
42};
43
44/* emif_fw */
45static struct omap_hwmod am33xx_emif_fw_hwmod = {
46 .name = "emif_fw",
47 .class = &am33xx_emif_fw_hwmod_class,
48 .clkdm_name = "l4fw_clkdm",
49 .main_clk = "l4fw_gclk",
50 .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
51 .prcm = {
52 .omap4 = {
53 .clkctrl_offs = AM33XX_CM_PER_EMIF_FW_CLKCTRL_OFFSET,
54 .modulemode = MODULEMODE_SWCTRL,
55 },
56 },
57};
58
59/*
60 * 'emif' class
61 * instance(s): emif
62 */
63static struct omap_hwmod_class_sysconfig am33xx_emif_sysc = {
64 .rev_offs = 0x0000,
65};
66
67static struct omap_hwmod_class am33xx_emif_hwmod_class = {
68 .name = "emif",
69 .sysc = &am33xx_emif_sysc,
70};
71
72static struct omap_hwmod_irq_info am33xx_emif_irqs[] = {
73 { .name = "ddrerr0", .irq = 101 + OMAP_INTC_START, },
74 { .irq = -1 },
75};
76
77/* emif */
78static struct omap_hwmod am33xx_emif_hwmod = {
79 .name = "emif",
80 .class = &am33xx_emif_hwmod_class,
81 .clkdm_name = "l3_clkdm",
82 .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
83 .mpu_irqs = am33xx_emif_irqs,
84 .main_clk = "dpll_ddr_m2_div2_ck",
85 .prcm = {
86 .omap4 = {
87 .clkctrl_offs = AM33XX_CM_PER_EMIF_CLKCTRL_OFFSET,
88 .modulemode = MODULEMODE_SWCTRL,
89 },
90 },
91};
92
93/*
94 * 'l3' class
95 * instance(s): l3_main, l3_s, l3_instr
96 */
97static struct omap_hwmod_class am33xx_l3_hwmod_class = {
98 .name = "l3",
99};
100
101/* l3_main (l3_fast) */
102static struct omap_hwmod_irq_info am33xx_l3_main_irqs[] = {
103 { .name = "l3debug", .irq = 9 + OMAP_INTC_START, },
104 { .name = "l3appint", .irq = 10 + OMAP_INTC_START, },
105 { .irq = -1 },
106};
107
108static struct omap_hwmod am33xx_l3_main_hwmod = {
109 .name = "l3_main",
110 .class = &am33xx_l3_hwmod_class,
111 .clkdm_name = "l3_clkdm",
112 .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
113 .mpu_irqs = am33xx_l3_main_irqs,
114 .main_clk = "l3_gclk",
115 .prcm = {
116 .omap4 = {
117 .clkctrl_offs = AM33XX_CM_PER_L3_CLKCTRL_OFFSET,
118 .modulemode = MODULEMODE_SWCTRL,
119 },
120 },
121};
122
123/* l3_s */
124static struct omap_hwmod am33xx_l3_s_hwmod = {
125 .name = "l3_s",
126 .class = &am33xx_l3_hwmod_class,
127 .clkdm_name = "l3s_clkdm",
128};
129
130/* l3_instr */
131static struct omap_hwmod am33xx_l3_instr_hwmod = {
132 .name = "l3_instr",
133 .class = &am33xx_l3_hwmod_class,
134 .clkdm_name = "l3_clkdm",
135 .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
136 .main_clk = "l3_gclk",
137 .prcm = {
138 .omap4 = {
139 .clkctrl_offs = AM33XX_CM_PER_L3_INSTR_CLKCTRL_OFFSET,
140 .modulemode = MODULEMODE_SWCTRL,
141 },
142 },
143};
144
145/*
146 * 'l4' class
147 * instance(s): l4_ls, l4_hs, l4_wkup, l4_fw
148 */
149static struct omap_hwmod_class am33xx_l4_hwmod_class = {
150 .name = "l4",
151};
152
153/* l4_ls */
154static struct omap_hwmod am33xx_l4_ls_hwmod = {
155 .name = "l4_ls",
156 .class = &am33xx_l4_hwmod_class,
157 .clkdm_name = "l4ls_clkdm",
158 .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
159 .main_clk = "l4ls_gclk",
160 .prcm = {
161 .omap4 = {
162 .clkctrl_offs = AM33XX_CM_PER_L4LS_CLKCTRL_OFFSET,
163 .modulemode = MODULEMODE_SWCTRL,
164 },
165 },
166};
167
168/* l4_hs */
169static struct omap_hwmod am33xx_l4_hs_hwmod = {
170 .name = "l4_hs",
171 .class = &am33xx_l4_hwmod_class,
172 .clkdm_name = "l4hs_clkdm",
173 .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
174 .main_clk = "l4hs_gclk",
175 .prcm = {
176 .omap4 = {
177 .clkctrl_offs = AM33XX_CM_PER_L4HS_CLKCTRL_OFFSET,
178 .modulemode = MODULEMODE_SWCTRL,
179 },
180 },
181};
182
183
184/* l4_wkup */
185static struct omap_hwmod am33xx_l4_wkup_hwmod = {
186 .name = "l4_wkup",
187 .class = &am33xx_l4_hwmod_class,
188 .clkdm_name = "l4_wkup_clkdm",
189 .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
190 .prcm = {
191 .omap4 = {
192 .clkctrl_offs = AM33XX_CM_WKUP_L4WKUP_CLKCTRL_OFFSET,
193 .modulemode = MODULEMODE_SWCTRL,
194 },
195 },
196};
197
198/* l4_fw */
199static struct omap_hwmod am33xx_l4_fw_hwmod = {
200 .name = "l4_fw",
201 .class = &am33xx_l4_hwmod_class,
202 .clkdm_name = "l4fw_clkdm",
203 .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
204 .prcm = {
205 .omap4 = {
206 .clkctrl_offs = AM33XX_CM_PER_L4FW_CLKCTRL_OFFSET,
207 .modulemode = MODULEMODE_SWCTRL,
208 },
209 },
210};
211
212/*
213 * 'mpu' class
214 */
215static struct omap_hwmod_class am33xx_mpu_hwmod_class = {
216 .name = "mpu",
217};
218
219/* mpu */
220static struct omap_hwmod_irq_info am33xx_mpu_irqs[] = {
221 { .name = "emuint", .irq = 0 + OMAP_INTC_START, },
222 { .name = "commtx", .irq = 1 + OMAP_INTC_START, },
223 { .name = "commrx", .irq = 2 + OMAP_INTC_START, },
224 { .name = "bench", .irq = 3 + OMAP_INTC_START, },
225 { .irq = -1 },
226};
227
228static struct omap_hwmod am33xx_mpu_hwmod = {
229 .name = "mpu",
230 .class = &am33xx_mpu_hwmod_class,
231 .clkdm_name = "mpu_clkdm",
232 .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
233 .mpu_irqs = am33xx_mpu_irqs,
234 .main_clk = "dpll_mpu_m2_ck",
235 .prcm = {
236 .omap4 = {
237 .clkctrl_offs = AM33XX_CM_MPU_MPU_CLKCTRL_OFFSET,
238 .modulemode = MODULEMODE_SWCTRL,
239 },
240 },
241};
242
243/*
244 * 'wakeup m3' class
245 * Wakeup controller sub-system under wakeup domain
246 */
247static struct omap_hwmod_class am33xx_wkup_m3_hwmod_class = {
248 .name = "wkup_m3",
249};
250
251static struct omap_hwmod_rst_info am33xx_wkup_m3_resets[] = {
252 { .name = "wkup_m3", .rst_shift = 3, .st_shift = 5 },
253};
254
255static struct omap_hwmod_irq_info am33xx_wkup_m3_irqs[] = {
256 { .name = "txev", .irq = 78 + OMAP_INTC_START, },
257 { .irq = -1 },
258};
259
260/* wkup_m3 */
261static struct omap_hwmod am33xx_wkup_m3_hwmod = {
262 .name = "wkup_m3",
263 .class = &am33xx_wkup_m3_hwmod_class,
264 .clkdm_name = "l4_wkup_aon_clkdm",
265 .flags = HWMOD_INIT_NO_RESET, /* Keep hardreset asserted */
266 .mpu_irqs = am33xx_wkup_m3_irqs,
267 .main_clk = "dpll_core_m4_div2_ck",
268 .prcm = {
269 .omap4 = {
270 .clkctrl_offs = AM33XX_CM_WKUP_WKUP_M3_CLKCTRL_OFFSET,
271 .rstctrl_offs = AM33XX_RM_WKUP_RSTCTRL_OFFSET,
272 .modulemode = MODULEMODE_SWCTRL,
273 },
274 },
275 .rst_lines = am33xx_wkup_m3_resets,
276 .rst_lines_cnt = ARRAY_SIZE(am33xx_wkup_m3_resets),
277};
278
279/*
280 * 'pru-icss' class
281 * Programmable Real-Time Unit and Industrial Communication Subsystem
282 */
283static struct omap_hwmod_class am33xx_pruss_hwmod_class = {
284 .name = "pruss",
285};
286
287static struct omap_hwmod_rst_info am33xx_pruss_resets[] = {
288 { .name = "pruss", .rst_shift = 1 },
289};
290
291static struct omap_hwmod_irq_info am33xx_pruss_irqs[] = {
292 { .name = "evtout0", .irq = 20 + OMAP_INTC_START, },
293 { .name = "evtout1", .irq = 21 + OMAP_INTC_START, },
294 { .name = "evtout2", .irq = 22 + OMAP_INTC_START, },
295 { .name = "evtout3", .irq = 23 + OMAP_INTC_START, },
296 { .name = "evtout4", .irq = 24 + OMAP_INTC_START, },
297 { .name = "evtout5", .irq = 25 + OMAP_INTC_START, },
298 { .name = "evtout6", .irq = 26 + OMAP_INTC_START, },
299 { .name = "evtout7", .irq = 27 + OMAP_INTC_START, },
300 { .irq = -1 },
301};
302
303/* pru-icss */
304/* Pseudo hwmod for reset control purpose only */
305static struct omap_hwmod am33xx_pruss_hwmod = {
306 .name = "pruss",
307 .class = &am33xx_pruss_hwmod_class,
308 .clkdm_name = "pruss_ocp_clkdm",
309 .mpu_irqs = am33xx_pruss_irqs,
310 .main_clk = "pruss_ocp_gclk",
311 .prcm = {
312 .omap4 = {
313 .clkctrl_offs = AM33XX_CM_PER_PRUSS_CLKCTRL_OFFSET,
314 .rstctrl_offs = AM33XX_RM_PER_RSTCTRL_OFFSET,
315 .modulemode = MODULEMODE_SWCTRL,
316 },
317 },
318 .rst_lines = am33xx_pruss_resets,
319 .rst_lines_cnt = ARRAY_SIZE(am33xx_pruss_resets),
320};
321
322/* gfx */
323/* Pseudo hwmod for reset control purpose only */
324static struct omap_hwmod_class am33xx_gfx_hwmod_class = {
325 .name = "gfx",
326};
327
328static struct omap_hwmod_rst_info am33xx_gfx_resets[] = {
329 { .name = "gfx", .rst_shift = 0 },
330};
331
332static struct omap_hwmod_irq_info am33xx_gfx_irqs[] = {
333 { .name = "gfxint", .irq = 37 + OMAP_INTC_START, },
334 { .irq = -1 },
335};
336
337static struct omap_hwmod am33xx_gfx_hwmod = {
338 .name = "gfx",
339 .class = &am33xx_gfx_hwmod_class,
340 .clkdm_name = "gfx_l3_clkdm",
341 .mpu_irqs = am33xx_gfx_irqs,
342 .main_clk = "gfx_fck_div_ck",
343 .prcm = {
344 .omap4 = {
345 .clkctrl_offs = AM33XX_CM_GFX_GFX_CLKCTRL_OFFSET,
346 .rstctrl_offs = AM33XX_RM_GFX_RSTCTRL_OFFSET,
347 .modulemode = MODULEMODE_SWCTRL,
348 },
349 },
350 .rst_lines = am33xx_gfx_resets,
351 .rst_lines_cnt = ARRAY_SIZE(am33xx_gfx_resets),
352};
353
354/*
355 * 'prcm' class
356 * power and reset manager (whole prcm infrastructure)
357 */
358static struct omap_hwmod_class am33xx_prcm_hwmod_class = {
359 .name = "prcm",
360};
361
362/* prcm */
363static struct omap_hwmod am33xx_prcm_hwmod = {
364 .name = "prcm",
365 .class = &am33xx_prcm_hwmod_class,
366 .clkdm_name = "l4_wkup_clkdm",
367};
368
369/*
370 * 'adc/tsc' class
371 * TouchScreen Controller (Anolog-To-Digital Converter)
372 */
373static struct omap_hwmod_class_sysconfig am33xx_adc_tsc_sysc = {
374 .rev_offs = 0x00,
375 .sysc_offs = 0x10,
376 .sysc_flags = SYSC_HAS_SIDLEMODE,
377 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
378 SIDLE_SMART_WKUP),
379 .sysc_fields = &omap_hwmod_sysc_type2,
380};
381
382static struct omap_hwmod_class am33xx_adc_tsc_hwmod_class = {
383 .name = "adc_tsc",
384 .sysc = &am33xx_adc_tsc_sysc,
385};
386
387static struct omap_hwmod_irq_info am33xx_adc_tsc_irqs[] = {
388 { .irq = 16 + OMAP_INTC_START, },
389 { .irq = -1 },
390};
391
392static struct omap_hwmod am33xx_adc_tsc_hwmod = {
393 .name = "adc_tsc",
394 .class = &am33xx_adc_tsc_hwmod_class,
395 .clkdm_name = "l4_wkup_clkdm",
396 .mpu_irqs = am33xx_adc_tsc_irqs,
397 .main_clk = "adc_tsc_fck",
398 .prcm = {
399 .omap4 = {
400 .clkctrl_offs = AM33XX_CM_WKUP_ADC_TSC_CLKCTRL_OFFSET,
401 .modulemode = MODULEMODE_SWCTRL,
402 },
403 },
404};
405
406/*
407 * Modules omap_hwmod structures
408 *
409 * The following IPs are excluded for the moment because:
410 * - They do not need an explicit SW control using omap_hwmod API.
411 * - They still need to be validated with the driver
412 * properly adapted to omap_hwmod / omap_device
413 *
414 * - cEFUSE (doesn't fall under any ocp_if)
415 * - clkdiv32k
416 * - debugss
417 * - ocmc ram
418 * - ocp watch point
419 * - aes0
420 * - sha0
421 */
422#if 0
423/*
424 * 'cefuse' class
425 */
426static struct omap_hwmod_class am33xx_cefuse_hwmod_class = {
427 .name = "cefuse",
428};
429
430static struct omap_hwmod am33xx_cefuse_hwmod = {
431 .name = "cefuse",
432 .class = &am33xx_cefuse_hwmod_class,
433 .clkdm_name = "l4_cefuse_clkdm",
434 .main_clk = "cefuse_fck",
435 .prcm = {
436 .omap4 = {
437 .clkctrl_offs = AM33XX_CM_CEFUSE_CEFUSE_CLKCTRL_OFFSET,
438 .modulemode = MODULEMODE_SWCTRL,
439 },
440 },
441};
442
443/*
444 * 'clkdiv32k' class
445 */
446static struct omap_hwmod_class am33xx_clkdiv32k_hwmod_class = {
447 .name = "clkdiv32k",
448};
449
450static struct omap_hwmod am33xx_clkdiv32k_hwmod = {
451 .name = "clkdiv32k",
452 .class = &am33xx_clkdiv32k_hwmod_class,
453 .clkdm_name = "clk_24mhz_clkdm",
454 .main_clk = "clkdiv32k_ick",
455 .prcm = {
456 .omap4 = {
457 .clkctrl_offs = AM33XX_CM_PER_CLKDIV32K_CLKCTRL_OFFSET,
458 .modulemode = MODULEMODE_SWCTRL,
459 },
460 },
461};
462
463/*
464 * 'debugss' class
465 * debug sub system
466 */
467static struct omap_hwmod_class am33xx_debugss_hwmod_class = {
468 .name = "debugss",
469};
470
471static struct omap_hwmod am33xx_debugss_hwmod = {
472 .name = "debugss",
473 .class = &am33xx_debugss_hwmod_class,
474 .clkdm_name = "l3_aon_clkdm",
475 .main_clk = "debugss_ick",
476 .prcm = {
477 .omap4 = {
478 .clkctrl_offs = AM33XX_CM_WKUP_DEBUGSS_CLKCTRL_OFFSET,
479 .modulemode = MODULEMODE_SWCTRL,
480 },
481 },
482};
483
484/* ocmcram */
485static struct omap_hwmod_class am33xx_ocmcram_hwmod_class = {
486 .name = "ocmcram",
487};
488
489static struct omap_hwmod am33xx_ocmcram_hwmod = {
490 .name = "ocmcram",
491 .class = &am33xx_ocmcram_hwmod_class,
492 .clkdm_name = "l3_clkdm",
493 .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
494 .main_clk = "l3_gclk",
495 .prcm = {
496 .omap4 = {
497 .clkctrl_offs = AM33XX_CM_PER_OCMCRAM_CLKCTRL_OFFSET,
498 .modulemode = MODULEMODE_SWCTRL,
499 },
500 },
501};
502
503/* ocpwp */
504static struct omap_hwmod_class am33xx_ocpwp_hwmod_class = {
505 .name = "ocpwp",
506};
507
508static struct omap_hwmod am33xx_ocpwp_hwmod = {
509 .name = "ocpwp",
510 .class = &am33xx_ocpwp_hwmod_class,
511 .clkdm_name = "l4ls_clkdm",
512 .main_clk = "l4ls_gclk",
513 .prcm = {
514 .omap4 = {
515 .clkctrl_offs = AM33XX_CM_PER_OCPWP_CLKCTRL_OFFSET,
516 .modulemode = MODULEMODE_SWCTRL,
517 },
518 },
519};
520
521/*
522 * 'aes' class
523 */
524static struct omap_hwmod_class am33xx_aes_hwmod_class = {
525 .name = "aes",
526};
527
528static struct omap_hwmod_irq_info am33xx_aes0_irqs[] = {
529 { .irq = 102 + OMAP_INTC_START, },
530 { .irq = -1 },
531};
532
533static struct omap_hwmod am33xx_aes0_hwmod = {
534 .name = "aes0",
535 .class = &am33xx_aes_hwmod_class,
536 .clkdm_name = "l3_clkdm",
537 .mpu_irqs = am33xx_aes0_irqs,
538 .main_clk = "l3_gclk",
539 .prcm = {
540 .omap4 = {
541 .clkctrl_offs = AM33XX_CM_PER_AES0_CLKCTRL_OFFSET,
542 .modulemode = MODULEMODE_SWCTRL,
543 },
544 },
545};
546
547/* sha0 */
548static struct omap_hwmod_class am33xx_sha0_hwmod_class = {
549 .name = "sha0",
550};
551
552static struct omap_hwmod_irq_info am33xx_sha0_irqs[] = {
553 { .irq = 108 + OMAP_INTC_START, },
554 { .irq = -1 },
555};
556
557static struct omap_hwmod am33xx_sha0_hwmod = {
558 .name = "sha0",
559 .class = &am33xx_sha0_hwmod_class,
560 .clkdm_name = "l3_clkdm",
561 .mpu_irqs = am33xx_sha0_irqs,
562 .main_clk = "l3_gclk",
563 .prcm = {
564 .omap4 = {
565 .clkctrl_offs = AM33XX_CM_PER_SHA0_CLKCTRL_OFFSET,
566 .modulemode = MODULEMODE_SWCTRL,
567 },
568 },
569};
570
571#endif
572
573/* 'smartreflex' class */
574static struct omap_hwmod_class am33xx_smartreflex_hwmod_class = {
575 .name = "smartreflex",
576};
577
578/* smartreflex0 */
579static struct omap_hwmod_irq_info am33xx_smartreflex0_irqs[] = {
580 { .irq = 120 + OMAP_INTC_START, },
581 { .irq = -1 },
582};
583
584static struct omap_hwmod am33xx_smartreflex0_hwmod = {
585 .name = "smartreflex0",
586 .class = &am33xx_smartreflex_hwmod_class,
587 .clkdm_name = "l4_wkup_clkdm",
588 .mpu_irqs = am33xx_smartreflex0_irqs,
589 .main_clk = "smartreflex0_fck",
590 .prcm = {
591 .omap4 = {
592 .clkctrl_offs = AM33XX_CM_WKUP_SMARTREFLEX0_CLKCTRL_OFFSET,
593 .modulemode = MODULEMODE_SWCTRL,
594 },
595 },
596};
597
598/* smartreflex1 */
599static struct omap_hwmod_irq_info am33xx_smartreflex1_irqs[] = {
600 { .irq = 121 + OMAP_INTC_START, },
601 { .irq = -1 },
602};
603
604static struct omap_hwmod am33xx_smartreflex1_hwmod = {
605 .name = "smartreflex1",
606 .class = &am33xx_smartreflex_hwmod_class,
607 .clkdm_name = "l4_wkup_clkdm",
608 .mpu_irqs = am33xx_smartreflex1_irqs,
609 .main_clk = "smartreflex1_fck",
610 .prcm = {
611 .omap4 = {
612 .clkctrl_offs = AM33XX_CM_WKUP_SMARTREFLEX1_CLKCTRL_OFFSET,
613 .modulemode = MODULEMODE_SWCTRL,
614 },
615 },
616};
617
618/*
619 * 'control' module class
620 */
621static struct omap_hwmod_class am33xx_control_hwmod_class = {
622 .name = "control",
623};
624
625static struct omap_hwmod_irq_info am33xx_control_irqs[] = {
626 { .irq = 8 + OMAP_INTC_START, },
627 { .irq = -1 },
628};
629
630static struct omap_hwmod am33xx_control_hwmod = {
631 .name = "control",
632 .class = &am33xx_control_hwmod_class,
633 .clkdm_name = "l4_wkup_clkdm",
634 .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
635 .mpu_irqs = am33xx_control_irqs,
636 .main_clk = "dpll_core_m4_div2_ck",
637 .prcm = {
638 .omap4 = {
639 .clkctrl_offs = AM33XX_CM_WKUP_CONTROL_CLKCTRL_OFFSET,
640 .modulemode = MODULEMODE_SWCTRL,
641 },
642 },
643};
644
645/*
646 * 'cpgmac' class
647 * cpsw/cpgmac sub system
648 */
649static struct omap_hwmod_class_sysconfig am33xx_cpgmac_sysc = {
650 .rev_offs = 0x0,
651 .sysc_offs = 0x8,
652 .syss_offs = 0x4,
653 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE |
654 SYSS_HAS_RESET_STATUS),
655 .idlemodes = (SIDLE_FORCE | SIDLE_NO | MSTANDBY_FORCE |
656 MSTANDBY_NO),
657 .sysc_fields = &omap_hwmod_sysc_type3,
658};
659
660static struct omap_hwmod_class am33xx_cpgmac0_hwmod_class = {
661 .name = "cpgmac0",
662 .sysc = &am33xx_cpgmac_sysc,
663};
664
665static struct omap_hwmod_irq_info am33xx_cpgmac0_irqs[] = {
666 { .name = "c0_rx_thresh_pend", .irq = 40 + OMAP_INTC_START, },
667 { .name = "c0_rx_pend", .irq = 41 + OMAP_INTC_START, },
668 { .name = "c0_tx_pend", .irq = 42 + OMAP_INTC_START, },
669 { .name = "c0_misc_pend", .irq = 43 + OMAP_INTC_START, },
670 { .irq = -1 },
671};
672
673static struct omap_hwmod am33xx_cpgmac0_hwmod = {
674 .name = "cpgmac0",
675 .class = &am33xx_cpgmac0_hwmod_class,
676 .clkdm_name = "cpsw_125mhz_clkdm",
677 .mpu_irqs = am33xx_cpgmac0_irqs,
678 .main_clk = "cpsw_125mhz_gclk",
679 .prcm = {
680 .omap4 = {
681 .clkctrl_offs = AM33XX_CM_PER_CPGMAC0_CLKCTRL_OFFSET,
682 .modulemode = MODULEMODE_SWCTRL,
683 },
684 },
685};
686
687/*
688 * dcan class
689 */
690static struct omap_hwmod_class am33xx_dcan_hwmod_class = {
691 .name = "d_can",
692};
693
694/* dcan0 */
695static struct omap_hwmod_irq_info am33xx_dcan0_irqs[] = {
696 { .name = "d_can_ms", .irq = 52 + OMAP_INTC_START, },
697 { .name = "d_can_mo", .irq = 53 + OMAP_INTC_START, },
698 { .irq = -1 },
699};
700
701static struct omap_hwmod am33xx_dcan0_hwmod = {
702 .name = "d_can0",
703 .class = &am33xx_dcan_hwmod_class,
704 .clkdm_name = "l4ls_clkdm",
705 .mpu_irqs = am33xx_dcan0_irqs,
706 .main_clk = "dcan0_fck",
707 .prcm = {
708 .omap4 = {
709 .clkctrl_offs = AM33XX_CM_PER_DCAN0_CLKCTRL_OFFSET,
710 .modulemode = MODULEMODE_SWCTRL,
711 },
712 },
713};
714
715/* dcan1 */
716static struct omap_hwmod_irq_info am33xx_dcan1_irqs[] = {
717 { .name = "d_can_ms", .irq = 55 + OMAP_INTC_START, },
718 { .name = "d_can_mo", .irq = 56 + OMAP_INTC_START, },
719 { .irq = -1 },
720};
721static struct omap_hwmod am33xx_dcan1_hwmod = {
722 .name = "d_can1",
723 .class = &am33xx_dcan_hwmod_class,
724 .clkdm_name = "l4ls_clkdm",
725 .mpu_irqs = am33xx_dcan1_irqs,
726 .main_clk = "dcan1_fck",
727 .prcm = {
728 .omap4 = {
729 .clkctrl_offs = AM33XX_CM_PER_DCAN1_CLKCTRL_OFFSET,
730 .modulemode = MODULEMODE_SWCTRL,
731 },
732 },
733};
734
735/* elm */
736static struct omap_hwmod_class_sysconfig am33xx_elm_sysc = {
737 .rev_offs = 0x0000,
738 .sysc_offs = 0x0010,
739 .syss_offs = 0x0014,
740 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
741 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
742 SYSS_HAS_RESET_STATUS),
743 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
744 .sysc_fields = &omap_hwmod_sysc_type1,
745};
746
747static struct omap_hwmod_class am33xx_elm_hwmod_class = {
748 .name = "elm",
749 .sysc = &am33xx_elm_sysc,
750};
751
752static struct omap_hwmod_irq_info am33xx_elm_irqs[] = {
753 { .irq = 4 + OMAP_INTC_START, },
754 { .irq = -1 },
755};
756
757static struct omap_hwmod am33xx_elm_hwmod = {
758 .name = "elm",
759 .class = &am33xx_elm_hwmod_class,
760 .clkdm_name = "l4ls_clkdm",
761 .mpu_irqs = am33xx_elm_irqs,
762 .main_clk = "l4ls_gclk",
763 .prcm = {
764 .omap4 = {
765 .clkctrl_offs = AM33XX_CM_PER_ELM_CLKCTRL_OFFSET,
766 .modulemode = MODULEMODE_SWCTRL,
767 },
768 },
769};
770
771/*
772 * 'epwmss' class: ecap0,1,2, ehrpwm0,1,2
773 */
774static struct omap_hwmod_class_sysconfig am33xx_epwmss_sysc = {
775 .rev_offs = 0x0,
776 .sysc_offs = 0x4,
777 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE),
778 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
779 SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
780 MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
781 .sysc_fields = &omap_hwmod_sysc_type2,
782};
783
784static struct omap_hwmod_class am33xx_epwmss_hwmod_class = {
785 .name = "epwmss",
786 .sysc = &am33xx_epwmss_sysc,
787};
788
789/* ehrpwm0 */
790static struct omap_hwmod_irq_info am33xx_ehrpwm0_irqs[] = {
791 { .name = "int", .irq = 86 + OMAP_INTC_START, },
792 { .name = "tzint", .irq = 58 + OMAP_INTC_START, },
793 { .irq = -1 },
794};
795
796static struct omap_hwmod am33xx_ehrpwm0_hwmod = {
797 .name = "ehrpwm0",
798 .class = &am33xx_epwmss_hwmod_class,
799 .clkdm_name = "l4ls_clkdm",
800 .mpu_irqs = am33xx_ehrpwm0_irqs,
801 .main_clk = "l4ls_gclk",
802 .prcm = {
803 .omap4 = {
804 .clkctrl_offs = AM33XX_CM_PER_EPWMSS0_CLKCTRL_OFFSET,
805 .modulemode = MODULEMODE_SWCTRL,
806 },
807 },
808};
809
810/* ehrpwm1 */
811static struct omap_hwmod_irq_info am33xx_ehrpwm1_irqs[] = {
812 { .name = "int", .irq = 87 + OMAP_INTC_START, },
813 { .name = "tzint", .irq = 59 + OMAP_INTC_START, },
814 { .irq = -1 },
815};
816
817static struct omap_hwmod am33xx_ehrpwm1_hwmod = {
818 .name = "ehrpwm1",
819 .class = &am33xx_epwmss_hwmod_class,
820 .clkdm_name = "l4ls_clkdm",
821 .mpu_irqs = am33xx_ehrpwm1_irqs,
822 .main_clk = "l4ls_gclk",
823 .prcm = {
824 .omap4 = {
825 .clkctrl_offs = AM33XX_CM_PER_EPWMSS1_CLKCTRL_OFFSET,
826 .modulemode = MODULEMODE_SWCTRL,
827 },
828 },
829};
830
831/* ehrpwm2 */
832static struct omap_hwmod_irq_info am33xx_ehrpwm2_irqs[] = {
833 { .name = "int", .irq = 39 + OMAP_INTC_START, },
834 { .name = "tzint", .irq = 60 + OMAP_INTC_START, },
835 { .irq = -1 },
836};
837
838static struct omap_hwmod am33xx_ehrpwm2_hwmod = {
839 .name = "ehrpwm2",
840 .class = &am33xx_epwmss_hwmod_class,
841 .clkdm_name = "l4ls_clkdm",
842 .mpu_irqs = am33xx_ehrpwm2_irqs,
843 .main_clk = "l4ls_gclk",
844 .prcm = {
845 .omap4 = {
846 .clkctrl_offs = AM33XX_CM_PER_EPWMSS2_CLKCTRL_OFFSET,
847 .modulemode = MODULEMODE_SWCTRL,
848 },
849 },
850};
851
852/* ecap0 */
853static struct omap_hwmod_irq_info am33xx_ecap0_irqs[] = {
854 { .irq = 31 + OMAP_INTC_START, },
855 { .irq = -1 },
856};
857
858static struct omap_hwmod am33xx_ecap0_hwmod = {
859 .name = "ecap0",
860 .class = &am33xx_epwmss_hwmod_class,
861 .clkdm_name = "l4ls_clkdm",
862 .mpu_irqs = am33xx_ecap0_irqs,
863 .main_clk = "l4ls_gclk",
864 .prcm = {
865 .omap4 = {
866 .clkctrl_offs = AM33XX_CM_PER_EPWMSS0_CLKCTRL_OFFSET,
867 .modulemode = MODULEMODE_SWCTRL,
868 },
869 },
870};
871
872/* ecap1 */
873static struct omap_hwmod_irq_info am33xx_ecap1_irqs[] = {
874 { .irq = 47 + OMAP_INTC_START, },
875 { .irq = -1 },
876};
877
878static struct omap_hwmod am33xx_ecap1_hwmod = {
879 .name = "ecap1",
880 .class = &am33xx_epwmss_hwmod_class,
881 .clkdm_name = "l4ls_clkdm",
882 .mpu_irqs = am33xx_ecap1_irqs,
883 .main_clk = "l4ls_gclk",
884 .prcm = {
885 .omap4 = {
886 .clkctrl_offs = AM33XX_CM_PER_EPWMSS1_CLKCTRL_OFFSET,
887 .modulemode = MODULEMODE_SWCTRL,
888 },
889 },
890};
891
892/* ecap2 */
893static struct omap_hwmod_irq_info am33xx_ecap2_irqs[] = {
894 { .irq = 61 + OMAP_INTC_START, },
895 { .irq = -1 },
896};
897
898static struct omap_hwmod am33xx_ecap2_hwmod = {
899 .name = "ecap2",
900 .mpu_irqs = am33xx_ecap2_irqs,
901 .class = &am33xx_epwmss_hwmod_class,
902 .clkdm_name = "l4ls_clkdm",
903 .main_clk = "l4ls_gclk",
904 .prcm = {
905 .omap4 = {
906 .clkctrl_offs = AM33XX_CM_PER_EPWMSS2_CLKCTRL_OFFSET,
907 .modulemode = MODULEMODE_SWCTRL,
908 },
909 },
910};
911
912/*
913 * 'gpio' class: for gpio 0,1,2,3
914 */
915static struct omap_hwmod_class_sysconfig am33xx_gpio_sysc = {
916 .rev_offs = 0x0000,
917 .sysc_offs = 0x0010,
918 .syss_offs = 0x0114,
919 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_ENAWAKEUP |
920 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
921 SYSS_HAS_RESET_STATUS),
922 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
923 SIDLE_SMART_WKUP),
924 .sysc_fields = &omap_hwmod_sysc_type1,
925};
926
927static struct omap_hwmod_class am33xx_gpio_hwmod_class = {
928 .name = "gpio",
929 .sysc = &am33xx_gpio_sysc,
930 .rev = 2,
931};
932
933static struct omap_gpio_dev_attr gpio_dev_attr = {
934 .bank_width = 32,
935 .dbck_flag = true,
936};
937
938/* gpio0 */
939static struct omap_hwmod_opt_clk gpio0_opt_clks[] = {
940 { .role = "dbclk", .clk = "gpio0_dbclk" },
941};
942
943static struct omap_hwmod_irq_info am33xx_gpio0_irqs[] = {
944 { .irq = 96 + OMAP_INTC_START, },
945 { .irq = -1 },
946};
947
948static struct omap_hwmod am33xx_gpio0_hwmod = {
949 .name = "gpio1",
950 .class = &am33xx_gpio_hwmod_class,
951 .clkdm_name = "l4_wkup_clkdm",
952 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
953 .mpu_irqs = am33xx_gpio0_irqs,
954 .main_clk = "dpll_core_m4_div2_ck",
955 .prcm = {
956 .omap4 = {
957 .clkctrl_offs = AM33XX_CM_WKUP_GPIO0_CLKCTRL_OFFSET,
958 .modulemode = MODULEMODE_SWCTRL,
959 },
960 },
961 .opt_clks = gpio0_opt_clks,
962 .opt_clks_cnt = ARRAY_SIZE(gpio0_opt_clks),
963 .dev_attr = &gpio_dev_attr,
964};
965
966/* gpio1 */
967static struct omap_hwmod_irq_info am33xx_gpio1_irqs[] = {
968 { .irq = 98 + OMAP_INTC_START, },
969 { .irq = -1 },
970};
971
972static struct omap_hwmod_opt_clk gpio1_opt_clks[] = {
973 { .role = "dbclk", .clk = "gpio1_dbclk" },
974};
975
976static struct omap_hwmod am33xx_gpio1_hwmod = {
977 .name = "gpio2",
978 .class = &am33xx_gpio_hwmod_class,
979 .clkdm_name = "l4ls_clkdm",
980 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
981 .mpu_irqs = am33xx_gpio1_irqs,
982 .main_clk = "l4ls_gclk",
983 .prcm = {
984 .omap4 = {
985 .clkctrl_offs = AM33XX_CM_PER_GPIO1_CLKCTRL_OFFSET,
986 .modulemode = MODULEMODE_SWCTRL,
987 },
988 },
989 .opt_clks = gpio1_opt_clks,
990 .opt_clks_cnt = ARRAY_SIZE(gpio1_opt_clks),
991 .dev_attr = &gpio_dev_attr,
992};
993
994/* gpio2 */
995static struct omap_hwmod_irq_info am33xx_gpio2_irqs[] = {
996 { .irq = 32 + OMAP_INTC_START, },
997 { .irq = -1 },
998};
999
1000static struct omap_hwmod_opt_clk gpio2_opt_clks[] = {
1001 { .role = "dbclk", .clk = "gpio2_dbclk" },
1002};
1003
1004static struct omap_hwmod am33xx_gpio2_hwmod = {
1005 .name = "gpio3",
1006 .class = &am33xx_gpio_hwmod_class,
1007 .clkdm_name = "l4ls_clkdm",
1008 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
1009 .mpu_irqs = am33xx_gpio2_irqs,
1010 .main_clk = "l4ls_gclk",
1011 .prcm = {
1012 .omap4 = {
1013 .clkctrl_offs = AM33XX_CM_PER_GPIO2_CLKCTRL_OFFSET,
1014 .modulemode = MODULEMODE_SWCTRL,
1015 },
1016 },
1017 .opt_clks = gpio2_opt_clks,
1018 .opt_clks_cnt = ARRAY_SIZE(gpio2_opt_clks),
1019 .dev_attr = &gpio_dev_attr,
1020};
1021
1022/* gpio3 */
1023static struct omap_hwmod_irq_info am33xx_gpio3_irqs[] = {
1024 { .irq = 62 + OMAP_INTC_START, },
1025 { .irq = -1 },
1026};
1027
1028static struct omap_hwmod_opt_clk gpio3_opt_clks[] = {
1029 { .role = "dbclk", .clk = "gpio3_dbclk" },
1030};
1031
1032static struct omap_hwmod am33xx_gpio3_hwmod = {
1033 .name = "gpio4",
1034 .class = &am33xx_gpio_hwmod_class,
1035 .clkdm_name = "l4ls_clkdm",
1036 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
1037 .mpu_irqs = am33xx_gpio3_irqs,
1038 .main_clk = "l4ls_gclk",
1039 .prcm = {
1040 .omap4 = {
1041 .clkctrl_offs = AM33XX_CM_PER_GPIO3_CLKCTRL_OFFSET,
1042 .modulemode = MODULEMODE_SWCTRL,
1043 },
1044 },
1045 .opt_clks = gpio3_opt_clks,
1046 .opt_clks_cnt = ARRAY_SIZE(gpio3_opt_clks),
1047 .dev_attr = &gpio_dev_attr,
1048};
1049
1050/* gpmc */
1051static struct omap_hwmod_class_sysconfig gpmc_sysc = {
1052 .rev_offs = 0x0,
1053 .sysc_offs = 0x10,
1054 .syss_offs = 0x14,
1055 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE |
1056 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
1057 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1058 .sysc_fields = &omap_hwmod_sysc_type1,
1059};
1060
1061static struct omap_hwmod_class am33xx_gpmc_hwmod_class = {
1062 .name = "gpmc",
1063 .sysc = &gpmc_sysc,
1064};
1065
1066static struct omap_hwmod_irq_info am33xx_gpmc_irqs[] = {
1067 { .irq = 100 + OMAP_INTC_START, },
1068 { .irq = -1 },
1069};
1070
1071static struct omap_hwmod am33xx_gpmc_hwmod = {
1072 .name = "gpmc",
1073 .class = &am33xx_gpmc_hwmod_class,
1074 .clkdm_name = "l3s_clkdm",
1075 .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
1076 .mpu_irqs = am33xx_gpmc_irqs,
1077 .main_clk = "l3s_gclk",
1078 .prcm = {
1079 .omap4 = {
1080 .clkctrl_offs = AM33XX_CM_PER_GPMC_CLKCTRL_OFFSET,
1081 .modulemode = MODULEMODE_SWCTRL,
1082 },
1083 },
1084};
1085
1086/* 'i2c' class */
1087static struct omap_hwmod_class_sysconfig am33xx_i2c_sysc = {
1088 .sysc_offs = 0x0010,
1089 .syss_offs = 0x0090,
1090 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
1091 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
1092 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
1093 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1094 SIDLE_SMART_WKUP),
1095 .sysc_fields = &omap_hwmod_sysc_type1,
1096};
1097
1098static struct omap_hwmod_class i2c_class = {
1099 .name = "i2c",
1100 .sysc = &am33xx_i2c_sysc,
1101 .rev = OMAP_I2C_IP_VERSION_2,
1102 .reset = &omap_i2c_reset,
1103};
1104
1105static struct omap_i2c_dev_attr i2c_dev_attr = {
1106 .flags = OMAP_I2C_FLAG_BUS_SHIFT_NONE |
1107 OMAP_I2C_FLAG_RESET_REGS_POSTIDLE,
1108};
1109
1110/* i2c1 */
1111static struct omap_hwmod_irq_info i2c1_mpu_irqs[] = {
1112 { .irq = 70 + OMAP_INTC_START, },
1113 { .irq = -1 },
1114};
1115
1116static struct omap_hwmod_dma_info i2c1_edma_reqs[] = {
1117 { .name = "tx", .dma_req = 0, },
1118 { .name = "rx", .dma_req = 0, },
1119 { .dma_req = -1 }
1120};
1121
1122static struct omap_hwmod am33xx_i2c1_hwmod = {
1123 .name = "i2c1",
1124 .class = &i2c_class,
1125 .clkdm_name = "l4_wkup_clkdm",
1126 .mpu_irqs = i2c1_mpu_irqs,
1127 .sdma_reqs = i2c1_edma_reqs,
1128 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
1129 .main_clk = "dpll_per_m2_div4_wkupdm_ck",
1130 .prcm = {
1131 .omap4 = {
1132 .clkctrl_offs = AM33XX_CM_WKUP_I2C0_CLKCTRL_OFFSET,
1133 .modulemode = MODULEMODE_SWCTRL,
1134 },
1135 },
1136 .dev_attr = &i2c_dev_attr,
1137};
1138
1139/* i2c1 */
1140static struct omap_hwmod_irq_info i2c2_mpu_irqs[] = {
1141 { .irq = 71 + OMAP_INTC_START, },
1142 { .irq = -1 },
1143};
1144
1145static struct omap_hwmod_dma_info i2c2_edma_reqs[] = {
1146 { .name = "tx", .dma_req = 0, },
1147 { .name = "rx", .dma_req = 0, },
1148 { .dma_req = -1 }
1149};
1150
1151static struct omap_hwmod am33xx_i2c2_hwmod = {
1152 .name = "i2c2",
1153 .class = &i2c_class,
1154 .clkdm_name = "l4ls_clkdm",
1155 .mpu_irqs = i2c2_mpu_irqs,
1156 .sdma_reqs = i2c2_edma_reqs,
1157 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
1158 .main_clk = "dpll_per_m2_div4_ck",
1159 .prcm = {
1160 .omap4 = {
1161 .clkctrl_offs = AM33XX_CM_PER_I2C1_CLKCTRL_OFFSET,
1162 .modulemode = MODULEMODE_SWCTRL,
1163 },
1164 },
1165 .dev_attr = &i2c_dev_attr,
1166};
1167
1168/* i2c3 */
1169static struct omap_hwmod_dma_info i2c3_edma_reqs[] = {
1170 { .name = "tx", .dma_req = 0, },
1171 { .name = "rx", .dma_req = 0, },
1172 { .dma_req = -1 }
1173};
1174
1175static struct omap_hwmod_irq_info i2c3_mpu_irqs[] = {
1176 { .irq = 30 + OMAP_INTC_START, },
1177 { .irq = -1 },
1178};
1179
1180static struct omap_hwmod am33xx_i2c3_hwmod = {
1181 .name = "i2c3",
1182 .class = &i2c_class,
1183 .clkdm_name = "l4ls_clkdm",
1184 .mpu_irqs = i2c3_mpu_irqs,
1185 .sdma_reqs = i2c3_edma_reqs,
1186 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
1187 .main_clk = "dpll_per_m2_div4_ck",
1188 .prcm = {
1189 .omap4 = {
1190 .clkctrl_offs = AM33XX_CM_PER_I2C2_CLKCTRL_OFFSET,
1191 .modulemode = MODULEMODE_SWCTRL,
1192 },
1193 },
1194 .dev_attr = &i2c_dev_attr,
1195};
1196
1197
1198/* lcdc */
1199static struct omap_hwmod_class_sysconfig lcdc_sysc = {
1200 .rev_offs = 0x0,
1201 .sysc_offs = 0x54,
1202 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE),
1203 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1204 .sysc_fields = &omap_hwmod_sysc_type2,
1205};
1206
1207static struct omap_hwmod_class am33xx_lcdc_hwmod_class = {
1208 .name = "lcdc",
1209 .sysc = &lcdc_sysc,
1210};
1211
1212static struct omap_hwmod_irq_info am33xx_lcdc_irqs[] = {
1213 { .irq = 36 + OMAP_INTC_START, },
1214 { .irq = -1 },
1215};
1216
1217static struct omap_hwmod am33xx_lcdc_hwmod = {
1218 .name = "lcdc",
1219 .class = &am33xx_lcdc_hwmod_class,
1220 .clkdm_name = "lcdc_clkdm",
1221 .mpu_irqs = am33xx_lcdc_irqs,
1222 .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY,
1223 .main_clk = "lcd_gclk",
1224 .prcm = {
1225 .omap4 = {
1226 .clkctrl_offs = AM33XX_CM_PER_LCDC_CLKCTRL_OFFSET,
1227 .modulemode = MODULEMODE_SWCTRL,
1228 },
1229 },
1230};
1231
1232/*
1233 * 'mailbox' class
1234 * mailbox module allowing communication between the on-chip processors using a
1235 * queued mailbox-interrupt mechanism.
1236 */
1237static struct omap_hwmod_class_sysconfig am33xx_mailbox_sysc = {
1238 .rev_offs = 0x0000,
1239 .sysc_offs = 0x0010,
1240 .sysc_flags = (SYSC_HAS_RESET_STATUS | SYSC_HAS_SIDLEMODE |
1241 SYSC_HAS_SOFTRESET),
1242 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1243 .sysc_fields = &omap_hwmod_sysc_type2,
1244};
1245
1246static struct omap_hwmod_class am33xx_mailbox_hwmod_class = {
1247 .name = "mailbox",
1248 .sysc = &am33xx_mailbox_sysc,
1249};
1250
1251static struct omap_hwmod_irq_info am33xx_mailbox_irqs[] = {
1252 { .irq = 77 + OMAP_INTC_START, },
1253 { .irq = -1 },
1254};
1255
1256static struct omap_hwmod am33xx_mailbox_hwmod = {
1257 .name = "mailbox",
1258 .class = &am33xx_mailbox_hwmod_class,
1259 .clkdm_name = "l4ls_clkdm",
1260 .mpu_irqs = am33xx_mailbox_irqs,
1261 .main_clk = "l4ls_gclk",
1262 .prcm = {
1263 .omap4 = {
1264 .clkctrl_offs = AM33XX_CM_PER_MAILBOX0_CLKCTRL_OFFSET,
1265 .modulemode = MODULEMODE_SWCTRL,
1266 },
1267 },
1268};
1269
1270/*
1271 * 'mcasp' class
1272 */
1273static struct omap_hwmod_class_sysconfig am33xx_mcasp_sysc = {
1274 .rev_offs = 0x0,
1275 .sysc_offs = 0x4,
1276 .sysc_flags = SYSC_HAS_SIDLEMODE,
1277 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1278 .sysc_fields = &omap_hwmod_sysc_type3,
1279};
1280
1281static struct omap_hwmod_class am33xx_mcasp_hwmod_class = {
1282 .name = "mcasp",
1283 .sysc = &am33xx_mcasp_sysc,
1284};
1285
1286/* mcasp0 */
1287static struct omap_hwmod_irq_info am33xx_mcasp0_irqs[] = {
1288 { .name = "ax", .irq = 80 + OMAP_INTC_START, },
1289 { .name = "ar", .irq = 81 + OMAP_INTC_START, },
1290 { .irq = -1 },
1291};
1292
1293static struct omap_hwmod_dma_info am33xx_mcasp0_edma_reqs[] = {
1294 { .name = "tx", .dma_req = 8, },
1295 { .name = "rx", .dma_req = 9, },
1296 { .dma_req = -1 }
1297};
1298
1299static struct omap_hwmod am33xx_mcasp0_hwmod = {
1300 .name = "mcasp0",
1301 .class = &am33xx_mcasp_hwmod_class,
1302 .clkdm_name = "l3s_clkdm",
1303 .mpu_irqs = am33xx_mcasp0_irqs,
1304 .sdma_reqs = am33xx_mcasp0_edma_reqs,
1305 .main_clk = "mcasp0_fck",
1306 .prcm = {
1307 .omap4 = {
1308 .clkctrl_offs = AM33XX_CM_PER_MCASP0_CLKCTRL_OFFSET,
1309 .modulemode = MODULEMODE_SWCTRL,
1310 },
1311 },
1312};
1313
1314/* mcasp1 */
1315static struct omap_hwmod_irq_info am33xx_mcasp1_irqs[] = {
1316 { .name = "ax", .irq = 82 + OMAP_INTC_START, },
1317 { .name = "ar", .irq = 83 + OMAP_INTC_START, },
1318 { .irq = -1 },
1319};
1320
1321static struct omap_hwmod_dma_info am33xx_mcasp1_edma_reqs[] = {
1322 { .name = "tx", .dma_req = 10, },
1323 { .name = "rx", .dma_req = 11, },
1324 { .dma_req = -1 }
1325};
1326
1327static struct omap_hwmod am33xx_mcasp1_hwmod = {
1328 .name = "mcasp1",
1329 .class = &am33xx_mcasp_hwmod_class,
1330 .clkdm_name = "l3s_clkdm",
1331 .mpu_irqs = am33xx_mcasp1_irqs,
1332 .sdma_reqs = am33xx_mcasp1_edma_reqs,
1333 .main_clk = "mcasp1_fck",
1334 .prcm = {
1335 .omap4 = {
1336 .clkctrl_offs = AM33XX_CM_PER_MCASP1_CLKCTRL_OFFSET,
1337 .modulemode = MODULEMODE_SWCTRL,
1338 },
1339 },
1340};
1341
1342/* 'mmc' class */
1343static struct omap_hwmod_class_sysconfig am33xx_mmc_sysc = {
1344 .rev_offs = 0x1fc,
1345 .sysc_offs = 0x10,
1346 .syss_offs = 0x14,
1347 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
1348 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
1349 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
1350 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1351 .sysc_fields = &omap_hwmod_sysc_type1,
1352};
1353
1354static struct omap_hwmod_class am33xx_mmc_hwmod_class = {
1355 .name = "mmc",
1356 .sysc = &am33xx_mmc_sysc,
1357};
1358
1359/* mmc0 */
1360static struct omap_hwmod_irq_info am33xx_mmc0_irqs[] = {
1361 { .irq = 64 + OMAP_INTC_START, },
1362 { .irq = -1 },
1363};
1364
1365static struct omap_hwmod_dma_info am33xx_mmc0_edma_reqs[] = {
1366 { .name = "tx", .dma_req = 24, },
1367 { .name = "rx", .dma_req = 25, },
1368 { .dma_req = -1 }
1369};
1370
1371static struct omap_mmc_dev_attr am33xx_mmc0_dev_attr = {
1372 .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
1373};
1374
1375static struct omap_hwmod am33xx_mmc0_hwmod = {
1376 .name = "mmc1",
1377 .class = &am33xx_mmc_hwmod_class,
1378 .clkdm_name = "l4ls_clkdm",
1379 .mpu_irqs = am33xx_mmc0_irqs,
1380 .sdma_reqs = am33xx_mmc0_edma_reqs,
1381 .main_clk = "mmc_clk",
1382 .prcm = {
1383 .omap4 = {
1384 .clkctrl_offs = AM33XX_CM_PER_MMC0_CLKCTRL_OFFSET,
1385 .modulemode = MODULEMODE_SWCTRL,
1386 },
1387 },
1388 .dev_attr = &am33xx_mmc0_dev_attr,
1389};
1390
1391/* mmc1 */
1392static struct omap_hwmod_irq_info am33xx_mmc1_irqs[] = {
1393 { .irq = 28 + OMAP_INTC_START, },
1394 { .irq = -1 },
1395};
1396
1397static struct omap_hwmod_dma_info am33xx_mmc1_edma_reqs[] = {
1398 { .name = "tx", .dma_req = 2, },
1399 { .name = "rx", .dma_req = 3, },
1400 { .dma_req = -1 }
1401};
1402
1403static struct omap_mmc_dev_attr am33xx_mmc1_dev_attr = {
1404 .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
1405};
1406
1407static struct omap_hwmod am33xx_mmc1_hwmod = {
1408 .name = "mmc2",
1409 .class = &am33xx_mmc_hwmod_class,
1410 .clkdm_name = "l4ls_clkdm",
1411 .mpu_irqs = am33xx_mmc1_irqs,
1412 .sdma_reqs = am33xx_mmc1_edma_reqs,
1413 .main_clk = "mmc_clk",
1414 .prcm = {
1415 .omap4 = {
1416 .clkctrl_offs = AM33XX_CM_PER_MMC1_CLKCTRL_OFFSET,
1417 .modulemode = MODULEMODE_SWCTRL,
1418 },
1419 },
1420 .dev_attr = &am33xx_mmc1_dev_attr,
1421};
1422
1423/* mmc2 */
1424static struct omap_hwmod_irq_info am33xx_mmc2_irqs[] = {
1425 { .irq = 29 + OMAP_INTC_START, },
1426 { .irq = -1 },
1427};
1428
1429static struct omap_hwmod_dma_info am33xx_mmc2_edma_reqs[] = {
1430 { .name = "tx", .dma_req = 64, },
1431 { .name = "rx", .dma_req = 65, },
1432 { .dma_req = -1 }
1433};
1434
1435static struct omap_mmc_dev_attr am33xx_mmc2_dev_attr = {
1436 .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
1437};
1438static struct omap_hwmod am33xx_mmc2_hwmod = {
1439 .name = "mmc3",
1440 .class = &am33xx_mmc_hwmod_class,
1441 .clkdm_name = "l3s_clkdm",
1442 .mpu_irqs = am33xx_mmc2_irqs,
1443 .sdma_reqs = am33xx_mmc2_edma_reqs,
1444 .main_clk = "mmc_clk",
1445 .prcm = {
1446 .omap4 = {
1447 .clkctrl_offs = AM33XX_CM_PER_MMC2_CLKCTRL_OFFSET,
1448 .modulemode = MODULEMODE_SWCTRL,
1449 },
1450 },
1451 .dev_attr = &am33xx_mmc2_dev_attr,
1452};
1453
1454/*
1455 * 'rtc' class
1456 * rtc subsystem
1457 */
1458static struct omap_hwmod_class_sysconfig am33xx_rtc_sysc = {
1459 .rev_offs = 0x0074,
1460 .sysc_offs = 0x0078,
1461 .sysc_flags = SYSC_HAS_SIDLEMODE,
1462 .idlemodes = (SIDLE_FORCE | SIDLE_NO |
1463 SIDLE_SMART | SIDLE_SMART_WKUP),
1464 .sysc_fields = &omap_hwmod_sysc_type3,
1465};
1466
1467static struct omap_hwmod_class am33xx_rtc_hwmod_class = {
1468 .name = "rtc",
1469 .sysc = &am33xx_rtc_sysc,
1470};
1471
1472static struct omap_hwmod_irq_info am33xx_rtc_irqs[] = {
1473 { .name = "rtcint", .irq = 75 + OMAP_INTC_START, },
1474 { .name = "rtcalarmint", .irq = 76 + OMAP_INTC_START, },
1475 { .irq = -1 },
1476};
1477
1478static struct omap_hwmod am33xx_rtc_hwmod = {
1479 .name = "rtc",
1480 .class = &am33xx_rtc_hwmod_class,
1481 .clkdm_name = "l4_rtc_clkdm",
1482 .mpu_irqs = am33xx_rtc_irqs,
1483 .main_clk = "clk_32768_ck",
1484 .prcm = {
1485 .omap4 = {
1486 .clkctrl_offs = AM33XX_CM_RTC_RTC_CLKCTRL_OFFSET,
1487 .modulemode = MODULEMODE_SWCTRL,
1488 },
1489 },
1490};
1491
1492/* 'spi' class */
1493static struct omap_hwmod_class_sysconfig am33xx_mcspi_sysc = {
1494 .rev_offs = 0x0000,
1495 .sysc_offs = 0x0110,
1496 .syss_offs = 0x0114,
1497 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
1498 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
1499 SYSS_HAS_RESET_STATUS),
1500 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1501 .sysc_fields = &omap_hwmod_sysc_type1,
1502};
1503
1504static struct omap_hwmod_class am33xx_spi_hwmod_class = {
1505 .name = "mcspi",
1506 .sysc = &am33xx_mcspi_sysc,
1507 .rev = OMAP4_MCSPI_REV,
1508};
1509
1510/* spi0 */
1511static struct omap_hwmod_irq_info am33xx_spi0_irqs[] = {
1512 { .irq = 65 + OMAP_INTC_START, },
1513 { .irq = -1 },
1514};
1515
1516static struct omap_hwmod_dma_info am33xx_mcspi0_edma_reqs[] = {
1517 { .name = "rx0", .dma_req = 17 },
1518 { .name = "tx0", .dma_req = 16 },
1519 { .name = "rx1", .dma_req = 19 },
1520 { .name = "tx1", .dma_req = 18 },
1521 { .dma_req = -1 }
1522};
1523
1524static struct omap2_mcspi_dev_attr mcspi_attrib = {
1525 .num_chipselect = 2,
1526};
1527static struct omap_hwmod am33xx_spi0_hwmod = {
1528 .name = "spi0",
1529 .class = &am33xx_spi_hwmod_class,
1530 .clkdm_name = "l4ls_clkdm",
1531 .mpu_irqs = am33xx_spi0_irqs,
1532 .sdma_reqs = am33xx_mcspi0_edma_reqs,
1533 .main_clk = "dpll_per_m2_div4_ck",
1534 .prcm = {
1535 .omap4 = {
1536 .clkctrl_offs = AM33XX_CM_PER_SPI0_CLKCTRL_OFFSET,
1537 .modulemode = MODULEMODE_SWCTRL,
1538 },
1539 },
1540 .dev_attr = &mcspi_attrib,
1541};
1542
1543/* spi1 */
1544static struct omap_hwmod_irq_info am33xx_spi1_irqs[] = {
1545 { .irq = 125 + OMAP_INTC_START, },
1546 { .irq = -1 },
1547};
1548
1549static struct omap_hwmod_dma_info am33xx_mcspi1_edma_reqs[] = {
1550 { .name = "rx0", .dma_req = 43 },
1551 { .name = "tx0", .dma_req = 42 },
1552 { .name = "rx1", .dma_req = 45 },
1553 { .name = "tx1", .dma_req = 44 },
1554 { .dma_req = -1 }
1555};
1556
1557static struct omap_hwmod am33xx_spi1_hwmod = {
1558 .name = "spi1",
1559 .class = &am33xx_spi_hwmod_class,
1560 .clkdm_name = "l4ls_clkdm",
1561 .mpu_irqs = am33xx_spi1_irqs,
1562 .sdma_reqs = am33xx_mcspi1_edma_reqs,
1563 .main_clk = "dpll_per_m2_div4_ck",
1564 .prcm = {
1565 .omap4 = {
1566 .clkctrl_offs = AM33XX_CM_PER_SPI1_CLKCTRL_OFFSET,
1567 .modulemode = MODULEMODE_SWCTRL,
1568 },
1569 },
1570 .dev_attr = &mcspi_attrib,
1571};
1572
1573/*
1574 * 'spinlock' class
1575 * spinlock provides hardware assistance for synchronizing the
1576 * processes running on multiple processors
1577 */
1578static struct omap_hwmod_class am33xx_spinlock_hwmod_class = {
1579 .name = "spinlock",
1580};
1581
1582static struct omap_hwmod am33xx_spinlock_hwmod = {
1583 .name = "spinlock",
1584 .class = &am33xx_spinlock_hwmod_class,
1585 .clkdm_name = "l4ls_clkdm",
1586 .main_clk = "l4ls_gclk",
1587 .prcm = {
1588 .omap4 = {
1589 .clkctrl_offs = AM33XX_CM_PER_SPINLOCK_CLKCTRL_OFFSET,
1590 .modulemode = MODULEMODE_SWCTRL,
1591 },
1592 },
1593};
1594
1595/* 'timer 2-7' class */
1596static struct omap_hwmod_class_sysconfig am33xx_timer_sysc = {
1597 .rev_offs = 0x0000,
1598 .sysc_offs = 0x0010,
1599 .syss_offs = 0x0014,
1600 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
1601 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1602 SIDLE_SMART_WKUP),
1603 .sysc_fields = &omap_hwmod_sysc_type2,
1604};
1605
1606static struct omap_hwmod_class am33xx_timer_hwmod_class = {
1607 .name = "timer",
1608 .sysc = &am33xx_timer_sysc,
1609};
1610
1611/* timer1 1ms */
1612static struct omap_hwmod_class_sysconfig am33xx_timer1ms_sysc = {
1613 .rev_offs = 0x0000,
1614 .sysc_offs = 0x0010,
1615 .syss_offs = 0x0014,
1616 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
1617 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
1618 SYSS_HAS_RESET_STATUS),
1619 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1620 .sysc_fields = &omap_hwmod_sysc_type1,
1621};
1622
1623static struct omap_hwmod_class am33xx_timer1ms_hwmod_class = {
1624 .name = "timer",
1625 .sysc = &am33xx_timer1ms_sysc,
1626};
1627
1628static struct omap_hwmod_irq_info am33xx_timer1_irqs[] = {
1629 { .irq = 67 + OMAP_INTC_START, },
1630 { .irq = -1 },
1631};
1632
1633static struct omap_hwmod am33xx_timer1_hwmod = {
1634 .name = "timer1",
1635 .class = &am33xx_timer1ms_hwmod_class,
1636 .clkdm_name = "l4_wkup_clkdm",
1637 .mpu_irqs = am33xx_timer1_irqs,
1638 .main_clk = "timer1_fck",
1639 .prcm = {
1640 .omap4 = {
1641 .clkctrl_offs = AM33XX_CM_WKUP_TIMER1_CLKCTRL_OFFSET,
1642 .modulemode = MODULEMODE_SWCTRL,
1643 },
1644 },
1645};
1646
1647static struct omap_hwmod_irq_info am33xx_timer2_irqs[] = {
1648 { .irq = 68 + OMAP_INTC_START, },
1649 { .irq = -1 },
1650};
1651
1652static struct omap_hwmod am33xx_timer2_hwmod = {
1653 .name = "timer2",
1654 .class = &am33xx_timer_hwmod_class,
1655 .clkdm_name = "l4ls_clkdm",
1656 .mpu_irqs = am33xx_timer2_irqs,
1657 .main_clk = "timer2_fck",
1658 .prcm = {
1659 .omap4 = {
1660 .clkctrl_offs = AM33XX_CM_PER_TIMER2_CLKCTRL_OFFSET,
1661 .modulemode = MODULEMODE_SWCTRL,
1662 },
1663 },
1664};
1665
1666static struct omap_hwmod_irq_info am33xx_timer3_irqs[] = {
1667 { .irq = 69 + OMAP_INTC_START, },
1668 { .irq = -1 },
1669};
1670
1671static struct omap_hwmod am33xx_timer3_hwmod = {
1672 .name = "timer3",
1673 .class = &am33xx_timer_hwmod_class,
1674 .clkdm_name = "l4ls_clkdm",
1675 .mpu_irqs = am33xx_timer3_irqs,
1676 .main_clk = "timer3_fck",
1677 .prcm = {
1678 .omap4 = {
1679 .clkctrl_offs = AM33XX_CM_PER_TIMER3_CLKCTRL_OFFSET,
1680 .modulemode = MODULEMODE_SWCTRL,
1681 },
1682 },
1683};
1684
1685static struct omap_hwmod_irq_info am33xx_timer4_irqs[] = {
1686 { .irq = 92 + OMAP_INTC_START, },
1687 { .irq = -1 },
1688};
1689
1690static struct omap_hwmod am33xx_timer4_hwmod = {
1691 .name = "timer4",
1692 .class = &am33xx_timer_hwmod_class,
1693 .clkdm_name = "l4ls_clkdm",
1694 .mpu_irqs = am33xx_timer4_irqs,
1695 .main_clk = "timer4_fck",
1696 .prcm = {
1697 .omap4 = {
1698 .clkctrl_offs = AM33XX_CM_PER_TIMER4_CLKCTRL_OFFSET,
1699 .modulemode = MODULEMODE_SWCTRL,
1700 },
1701 },
1702};
1703
1704static struct omap_hwmod_irq_info am33xx_timer5_irqs[] = {
1705 { .irq = 93 + OMAP_INTC_START, },
1706 { .irq = -1 },
1707};
1708
1709static struct omap_hwmod am33xx_timer5_hwmod = {
1710 .name = "timer5",
1711 .class = &am33xx_timer_hwmod_class,
1712 .clkdm_name = "l4ls_clkdm",
1713 .mpu_irqs = am33xx_timer5_irqs,
1714 .main_clk = "timer5_fck",
1715 .prcm = {
1716 .omap4 = {
1717 .clkctrl_offs = AM33XX_CM_PER_TIMER5_CLKCTRL_OFFSET,
1718 .modulemode = MODULEMODE_SWCTRL,
1719 },
1720 },
1721};
1722
1723static struct omap_hwmod_irq_info am33xx_timer6_irqs[] = {
1724 { .irq = 94 + OMAP_INTC_START, },
1725 { .irq = -1 },
1726};
1727
1728static struct omap_hwmod am33xx_timer6_hwmod = {
1729 .name = "timer6",
1730 .class = &am33xx_timer_hwmod_class,
1731 .clkdm_name = "l4ls_clkdm",
1732 .mpu_irqs = am33xx_timer6_irqs,
1733 .main_clk = "timer6_fck",
1734 .prcm = {
1735 .omap4 = {
1736 .clkctrl_offs = AM33XX_CM_PER_TIMER6_CLKCTRL_OFFSET,
1737 .modulemode = MODULEMODE_SWCTRL,
1738 },
1739 },
1740};
1741
1742static struct omap_hwmod_irq_info am33xx_timer7_irqs[] = {
1743 { .irq = 95 + OMAP_INTC_START, },
1744 { .irq = -1 },
1745};
1746
1747static struct omap_hwmod am33xx_timer7_hwmod = {
1748 .name = "timer7",
1749 .class = &am33xx_timer_hwmod_class,
1750 .clkdm_name = "l4ls_clkdm",
1751 .mpu_irqs = am33xx_timer7_irqs,
1752 .main_clk = "timer7_fck",
1753 .prcm = {
1754 .omap4 = {
1755 .clkctrl_offs = AM33XX_CM_PER_TIMER7_CLKCTRL_OFFSET,
1756 .modulemode = MODULEMODE_SWCTRL,
1757 },
1758 },
1759};
1760
1761/* tpcc */
1762static struct omap_hwmod_class am33xx_tpcc_hwmod_class = {
1763 .name = "tpcc",
1764};
1765
1766static struct omap_hwmod_irq_info am33xx_tpcc_irqs[] = {
1767 { .name = "edma0", .irq = 12 + OMAP_INTC_START, },
1768 { .name = "edma0_mperr", .irq = 13 + OMAP_INTC_START, },
1769 { .name = "edma0_err", .irq = 14 + OMAP_INTC_START, },
1770 { .irq = -1 },
1771};
1772
1773static struct omap_hwmod am33xx_tpcc_hwmod = {
1774 .name = "tpcc",
1775 .class = &am33xx_tpcc_hwmod_class,
1776 .clkdm_name = "l3_clkdm",
1777 .mpu_irqs = am33xx_tpcc_irqs,
1778 .main_clk = "l3_gclk",
1779 .prcm = {
1780 .omap4 = {
1781 .clkctrl_offs = AM33XX_CM_PER_TPCC_CLKCTRL_OFFSET,
1782 .modulemode = MODULEMODE_SWCTRL,
1783 },
1784 },
1785};
1786
1787static struct omap_hwmod_class_sysconfig am33xx_tptc_sysc = {
1788 .rev_offs = 0x0,
1789 .sysc_offs = 0x10,
1790 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
1791 SYSC_HAS_MIDLEMODE),
1792 .idlemodes = (SIDLE_FORCE | SIDLE_SMART | MSTANDBY_FORCE),
1793 .sysc_fields = &omap_hwmod_sysc_type2,
1794};
1795
1796/* 'tptc' class */
1797static struct omap_hwmod_class am33xx_tptc_hwmod_class = {
1798 .name = "tptc",
1799 .sysc = &am33xx_tptc_sysc,
1800};
1801
1802/* tptc0 */
1803static struct omap_hwmod_irq_info am33xx_tptc0_irqs[] = {
1804 { .irq = 112 + OMAP_INTC_START, },
1805 { .irq = -1 },
1806};
1807
1808static struct omap_hwmod am33xx_tptc0_hwmod = {
1809 .name = "tptc0",
1810 .class = &am33xx_tptc_hwmod_class,
1811 .clkdm_name = "l3_clkdm",
1812 .mpu_irqs = am33xx_tptc0_irqs,
1813 .main_clk = "l3_gclk",
1814 .prcm = {
1815 .omap4 = {
1816 .clkctrl_offs = AM33XX_CM_PER_TPTC0_CLKCTRL_OFFSET,
1817 .modulemode = MODULEMODE_SWCTRL,
1818 },
1819 },
1820};
1821
1822/* tptc1 */
1823static struct omap_hwmod_irq_info am33xx_tptc1_irqs[] = {
1824 { .irq = 113 + OMAP_INTC_START, },
1825 { .irq = -1 },
1826};
1827
1828static struct omap_hwmod am33xx_tptc1_hwmod = {
1829 .name = "tptc1",
1830 .class = &am33xx_tptc_hwmod_class,
1831 .clkdm_name = "l3_clkdm",
1832 .mpu_irqs = am33xx_tptc1_irqs,
1833 .flags = (HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY),
1834 .main_clk = "l3_gclk",
1835 .prcm = {
1836 .omap4 = {
1837 .clkctrl_offs = AM33XX_CM_PER_TPTC1_CLKCTRL_OFFSET,
1838 .modulemode = MODULEMODE_SWCTRL,
1839 },
1840 },
1841};
1842
1843/* tptc2 */
1844static struct omap_hwmod_irq_info am33xx_tptc2_irqs[] = {
1845 { .irq = 114 + OMAP_INTC_START, },
1846 { .irq = -1 },
1847};
1848
1849static struct omap_hwmod am33xx_tptc2_hwmod = {
1850 .name = "tptc2",
1851 .class = &am33xx_tptc_hwmod_class,
1852 .clkdm_name = "l3_clkdm",
1853 .mpu_irqs = am33xx_tptc2_irqs,
1854 .flags = (HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY),
1855 .main_clk = "l3_gclk",
1856 .prcm = {
1857 .omap4 = {
1858 .clkctrl_offs = AM33XX_CM_PER_TPTC2_CLKCTRL_OFFSET,
1859 .modulemode = MODULEMODE_SWCTRL,
1860 },
1861 },
1862};
1863
1864/* 'uart' class */
1865static struct omap_hwmod_class_sysconfig uart_sysc = {
1866 .rev_offs = 0x50,
1867 .sysc_offs = 0x54,
1868 .syss_offs = 0x58,
1869 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_ENAWAKEUP |
1870 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
1871 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1872 SIDLE_SMART_WKUP),
1873 .sysc_fields = &omap_hwmod_sysc_type1,
1874};
1875
1876static struct omap_hwmod_class uart_class = {
1877 .name = "uart",
1878 .sysc = &uart_sysc,
1879};
1880
1881/* uart1 */
1882static struct omap_hwmod_dma_info uart1_edma_reqs[] = {
1883 { .name = "tx", .dma_req = 26, },
1884 { .name = "rx", .dma_req = 27, },
1885 { .dma_req = -1 }
1886};
1887
1888static struct omap_hwmod_irq_info am33xx_uart1_irqs[] = {
1889 { .irq = 72 + OMAP_INTC_START, },
1890 { .irq = -1 },
1891};
1892
1893static struct omap_hwmod am33xx_uart1_hwmod = {
1894 .name = "uart1",
1895 .class = &uart_class,
1896 .clkdm_name = "l4_wkup_clkdm",
1897 .mpu_irqs = am33xx_uart1_irqs,
1898 .sdma_reqs = uart1_edma_reqs,
1899 .main_clk = "dpll_per_m2_div4_wkupdm_ck",
1900 .prcm = {
1901 .omap4 = {
1902 .clkctrl_offs = AM33XX_CM_WKUP_UART0_CLKCTRL_OFFSET,
1903 .modulemode = MODULEMODE_SWCTRL,
1904 },
1905 },
1906};
1907
1908static struct omap_hwmod_irq_info am33xx_uart2_irqs[] = {
1909 { .irq = 73 + OMAP_INTC_START, },
1910 { .irq = -1 },
1911};
1912
1913static struct omap_hwmod am33xx_uart2_hwmod = {
1914 .name = "uart2",
1915 .class = &uart_class,
1916 .clkdm_name = "l4ls_clkdm",
1917 .mpu_irqs = am33xx_uart2_irqs,
1918 .sdma_reqs = uart1_edma_reqs,
1919 .main_clk = "dpll_per_m2_div4_ck",
1920 .prcm = {
1921 .omap4 = {
1922 .clkctrl_offs = AM33XX_CM_PER_UART1_CLKCTRL_OFFSET,
1923 .modulemode = MODULEMODE_SWCTRL,
1924 },
1925 },
1926};
1927
1928/* uart3 */
1929static struct omap_hwmod_dma_info uart3_edma_reqs[] = {
1930 { .name = "tx", .dma_req = 30, },
1931 { .name = "rx", .dma_req = 31, },
1932 { .dma_req = -1 }
1933};
1934
1935static struct omap_hwmod_irq_info am33xx_uart3_irqs[] = {
1936 { .irq = 74 + OMAP_INTC_START, },
1937 { .irq = -1 },
1938};
1939
1940static struct omap_hwmod am33xx_uart3_hwmod = {
1941 .name = "uart3",
1942 .class = &uart_class,
1943 .clkdm_name = "l4ls_clkdm",
1944 .mpu_irqs = am33xx_uart3_irqs,
1945 .sdma_reqs = uart3_edma_reqs,
1946 .main_clk = "dpll_per_m2_div4_ck",
1947 .prcm = {
1948 .omap4 = {
1949 .clkctrl_offs = AM33XX_CM_PER_UART2_CLKCTRL_OFFSET,
1950 .modulemode = MODULEMODE_SWCTRL,
1951 },
1952 },
1953};
1954
1955static struct omap_hwmod_irq_info am33xx_uart4_irqs[] = {
1956 { .irq = 44 + OMAP_INTC_START, },
1957 { .irq = -1 },
1958};
1959
1960static struct omap_hwmod am33xx_uart4_hwmod = {
1961 .name = "uart4",
1962 .class = &uart_class,
1963 .clkdm_name = "l4ls_clkdm",
1964 .mpu_irqs = am33xx_uart4_irqs,
1965 .sdma_reqs = uart1_edma_reqs,
1966 .main_clk = "dpll_per_m2_div4_ck",
1967 .prcm = {
1968 .omap4 = {
1969 .clkctrl_offs = AM33XX_CM_PER_UART3_CLKCTRL_OFFSET,
1970 .modulemode = MODULEMODE_SWCTRL,
1971 },
1972 },
1973};
1974
1975static struct omap_hwmod_irq_info am33xx_uart5_irqs[] = {
1976 { .irq = 45 + OMAP_INTC_START, },
1977 { .irq = -1 },
1978};
1979
1980static struct omap_hwmod am33xx_uart5_hwmod = {
1981 .name = "uart5",
1982 .class = &uart_class,
1983 .clkdm_name = "l4ls_clkdm",
1984 .mpu_irqs = am33xx_uart5_irqs,
1985 .sdma_reqs = uart1_edma_reqs,
1986 .main_clk = "dpll_per_m2_div4_ck",
1987 .prcm = {
1988 .omap4 = {
1989 .clkctrl_offs = AM33XX_CM_PER_UART4_CLKCTRL_OFFSET,
1990 .modulemode = MODULEMODE_SWCTRL,
1991 },
1992 },
1993};
1994
1995static struct omap_hwmod_irq_info am33xx_uart6_irqs[] = {
1996 { .irq = 46 + OMAP_INTC_START, },
1997 { .irq = -1 },
1998};
1999
2000static struct omap_hwmod am33xx_uart6_hwmod = {
2001 .name = "uart6",
2002 .class = &uart_class,
2003 .clkdm_name = "l4ls_clkdm",
2004 .mpu_irqs = am33xx_uart6_irqs,
2005 .sdma_reqs = uart1_edma_reqs,
2006 .main_clk = "dpll_per_m2_div4_ck",
2007 .prcm = {
2008 .omap4 = {
2009 .clkctrl_offs = AM33XX_CM_PER_UART5_CLKCTRL_OFFSET,
2010 .modulemode = MODULEMODE_SWCTRL,
2011 },
2012 },
2013};
2014
2015/* 'wd_timer' class */
2016static struct omap_hwmod_class am33xx_wd_timer_hwmod_class = {
2017 .name = "wd_timer",
2018};
2019
2020/*
2021 * XXX: device.c file uses hardcoded name for watchdog timer
2022 * driver "wd_timer2, so we are also using same name as of now...
2023 */
2024static struct omap_hwmod am33xx_wd_timer1_hwmod = {
2025 .name = "wd_timer2",
2026 .class = &am33xx_wd_timer_hwmod_class,
2027 .clkdm_name = "l4_wkup_clkdm",
2028 .main_clk = "wdt1_fck",
2029 .prcm = {
2030 .omap4 = {
2031 .clkctrl_offs = AM33XX_CM_WKUP_WDT1_CLKCTRL_OFFSET,
2032 .modulemode = MODULEMODE_SWCTRL,
2033 },
2034 },
2035};
2036
2037/*
2038 * 'usb_otg' class
2039 * high-speed on-the-go universal serial bus (usb_otg) controller
2040 */
2041static struct omap_hwmod_class_sysconfig am33xx_usbhsotg_sysc = {
2042 .rev_offs = 0x0,
2043 .sysc_offs = 0x10,
2044 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE),
2045 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
2046 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
2047 .sysc_fields = &omap_hwmod_sysc_type2,
2048};
2049
2050static struct omap_hwmod_class am33xx_usbotg_class = {
2051 .name = "usbotg",
2052 .sysc = &am33xx_usbhsotg_sysc,
2053};
2054
2055static struct omap_hwmod_irq_info am33xx_usbss_mpu_irqs[] = {
2056 { .name = "usbss-irq", .irq = 17 + OMAP_INTC_START, },
2057 { .name = "musb0-irq", .irq = 18 + OMAP_INTC_START, },
2058 { .name = "musb1-irq", .irq = 19 + OMAP_INTC_START, },
2059 { .irq = -1 + OMAP_INTC_START, },
2060};
2061
2062static struct omap_hwmod am33xx_usbss_hwmod = {
2063 .name = "usb_otg_hs",
2064 .class = &am33xx_usbotg_class,
2065 .clkdm_name = "l3s_clkdm",
2066 .mpu_irqs = am33xx_usbss_mpu_irqs,
2067 .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY,
2068 .main_clk = "usbotg_fck",
2069 .prcm = {
2070 .omap4 = {
2071 .clkctrl_offs = AM33XX_CM_PER_USB0_CLKCTRL_OFFSET,
2072 .modulemode = MODULEMODE_SWCTRL,
2073 },
2074 },
2075};
2076
2077
2078/*
2079 * Interfaces
2080 */
2081
2082/* l4 fw -> emif fw */
2083static struct omap_hwmod_ocp_if am33xx_l4_fw__emif_fw = {
2084 .master = &am33xx_l4_fw_hwmod,
2085 .slave = &am33xx_emif_fw_hwmod,
2086 .clk = "l4fw_gclk",
2087 .user = OCP_USER_MPU,
2088};
2089
2090static struct omap_hwmod_addr_space am33xx_emif_addrs[] = {
2091 {
2092 .pa_start = 0x4c000000,
2093 .pa_end = 0x4c000fff,
2094 .flags = ADDR_TYPE_RT
2095 },
2096 { }
2097};
2098/* l3 main -> emif */
2099static struct omap_hwmod_ocp_if am33xx_l3_main__emif = {
2100 .master = &am33xx_l3_main_hwmod,
2101 .slave = &am33xx_emif_hwmod,
2102 .clk = "dpll_core_m4_ck",
2103 .addr = am33xx_emif_addrs,
2104 .user = OCP_USER_MPU | OCP_USER_SDMA,
2105};
2106
2107/* mpu -> l3 main */
2108static struct omap_hwmod_ocp_if am33xx_mpu__l3_main = {
2109 .master = &am33xx_mpu_hwmod,
2110 .slave = &am33xx_l3_main_hwmod,
2111 .clk = "dpll_mpu_m2_ck",
2112 .user = OCP_USER_MPU,
2113};
2114
2115/* l3 main -> l4 hs */
2116static struct omap_hwmod_ocp_if am33xx_l3_main__l4_hs = {
2117 .master = &am33xx_l3_main_hwmod,
2118 .slave = &am33xx_l4_hs_hwmod,
2119 .clk = "l3s_gclk",
2120 .user = OCP_USER_MPU | OCP_USER_SDMA,
2121};
2122
2123/* l3 main -> l3 s */
2124static struct omap_hwmod_ocp_if am33xx_l3_main__l3_s = {
2125 .master = &am33xx_l3_main_hwmod,
2126 .slave = &am33xx_l3_s_hwmod,
2127 .clk = "l3s_gclk",
2128 .user = OCP_USER_MPU | OCP_USER_SDMA,
2129};
2130
2131/* l3 s -> l4 per/ls */
2132static struct omap_hwmod_ocp_if am33xx_l3_s__l4_ls = {
2133 .master = &am33xx_l3_s_hwmod,
2134 .slave = &am33xx_l4_ls_hwmod,
2135 .clk = "l3s_gclk",
2136 .user = OCP_USER_MPU | OCP_USER_SDMA,
2137};
2138
2139/* l3 s -> l4 wkup */
2140static struct omap_hwmod_ocp_if am33xx_l3_s__l4_wkup = {
2141 .master = &am33xx_l3_s_hwmod,
2142 .slave = &am33xx_l4_wkup_hwmod,
2143 .clk = "l3s_gclk",
2144 .user = OCP_USER_MPU | OCP_USER_SDMA,
2145};
2146
2147/* l3 s -> l4 fw */
2148static struct omap_hwmod_ocp_if am33xx_l3_s__l4_fw = {
2149 .master = &am33xx_l3_s_hwmod,
2150 .slave = &am33xx_l4_fw_hwmod,
2151 .clk = "l3s_gclk",
2152 .user = OCP_USER_MPU | OCP_USER_SDMA,
2153};
2154
2155/* l3 main -> l3 instr */
2156static struct omap_hwmod_ocp_if am33xx_l3_main__l3_instr = {
2157 .master = &am33xx_l3_main_hwmod,
2158 .slave = &am33xx_l3_instr_hwmod,
2159 .clk = "l3s_gclk",
2160 .user = OCP_USER_MPU | OCP_USER_SDMA,
2161};
2162
2163/* mpu -> prcm */
2164static struct omap_hwmod_ocp_if am33xx_mpu__prcm = {
2165 .master = &am33xx_mpu_hwmod,
2166 .slave = &am33xx_prcm_hwmod,
2167 .clk = "dpll_mpu_m2_ck",
2168 .user = OCP_USER_MPU | OCP_USER_SDMA,
2169};
2170
2171/* l3 s -> l3 main*/
2172static struct omap_hwmod_ocp_if am33xx_l3_s__l3_main = {
2173 .master = &am33xx_l3_s_hwmod,
2174 .slave = &am33xx_l3_main_hwmod,
2175 .clk = "l3s_gclk",
2176 .user = OCP_USER_MPU | OCP_USER_SDMA,
2177};
2178
2179/* pru-icss -> l3 main */
2180static struct omap_hwmod_ocp_if am33xx_pruss__l3_main = {
2181 .master = &am33xx_pruss_hwmod,
2182 .slave = &am33xx_l3_main_hwmod,
2183 .clk = "l3_gclk",
2184 .user = OCP_USER_MPU | OCP_USER_SDMA,
2185};
2186
2187/* wkup m3 -> l4 wkup */
2188static struct omap_hwmod_ocp_if am33xx_wkup_m3__l4_wkup = {
2189 .master = &am33xx_wkup_m3_hwmod,
2190 .slave = &am33xx_l4_wkup_hwmod,
2191 .clk = "dpll_core_m4_div2_ck",
2192 .user = OCP_USER_MPU | OCP_USER_SDMA,
2193};
2194
2195/* gfx -> l3 main */
2196static struct omap_hwmod_ocp_if am33xx_gfx__l3_main = {
2197 .master = &am33xx_gfx_hwmod,
2198 .slave = &am33xx_l3_main_hwmod,
2199 .clk = "dpll_core_m4_ck",
2200 .user = OCP_USER_MPU | OCP_USER_SDMA,
2201};
2202
2203/* l4 wkup -> wkup m3 */
2204static struct omap_hwmod_addr_space am33xx_wkup_m3_addrs[] = {
2205 {
2206 .name = "umem",
2207 .pa_start = 0x44d00000,
2208 .pa_end = 0x44d00000 + SZ_16K - 1,
2209 .flags = ADDR_TYPE_RT
2210 },
2211 {
2212 .name = "dmem",
2213 .pa_start = 0x44d80000,
2214 .pa_end = 0x44d80000 + SZ_8K - 1,
2215 .flags = ADDR_TYPE_RT
2216 },
2217 { }
2218};
2219
2220static struct omap_hwmod_ocp_if am33xx_l4_wkup__wkup_m3 = {
2221 .master = &am33xx_l4_wkup_hwmod,
2222 .slave = &am33xx_wkup_m3_hwmod,
2223 .clk = "dpll_core_m4_div2_ck",
2224 .addr = am33xx_wkup_m3_addrs,
2225 .user = OCP_USER_MPU | OCP_USER_SDMA,
2226};
2227
2228/* l4 hs -> pru-icss */
2229static struct omap_hwmod_addr_space am33xx_pruss_addrs[] = {
2230 {
2231 .pa_start = 0x4a300000,
2232 .pa_end = 0x4a300000 + SZ_512K - 1,
2233 .flags = ADDR_TYPE_RT
2234 },
2235 { }
2236};
2237
2238static struct omap_hwmod_ocp_if am33xx_l4_hs__pruss = {
2239 .master = &am33xx_l4_hs_hwmod,
2240 .slave = &am33xx_pruss_hwmod,
2241 .clk = "dpll_core_m4_ck",
2242 .addr = am33xx_pruss_addrs,
2243 .user = OCP_USER_MPU | OCP_USER_SDMA,
2244};
2245
2246/* l3 main -> gfx */
2247static struct omap_hwmod_addr_space am33xx_gfx_addrs[] = {
2248 {
2249 .pa_start = 0x56000000,
2250 .pa_end = 0x56000000 + SZ_16M - 1,
2251 .flags = ADDR_TYPE_RT
2252 },
2253 { }
2254};
2255
2256static struct omap_hwmod_ocp_if am33xx_l3_main__gfx = {
2257 .master = &am33xx_l3_main_hwmod,
2258 .slave = &am33xx_gfx_hwmod,
2259 .clk = "dpll_core_m4_ck",
2260 .addr = am33xx_gfx_addrs,
2261 .user = OCP_USER_MPU | OCP_USER_SDMA,
2262};
2263
2264/* l4 wkup -> smartreflex0 */
2265static struct omap_hwmod_addr_space am33xx_smartreflex0_addrs[] = {
2266 {
2267 .pa_start = 0x44e37000,
2268 .pa_end = 0x44e37000 + SZ_4K - 1,
2269 .flags = ADDR_TYPE_RT
2270 },
2271 { }
2272};
2273
2274static struct omap_hwmod_ocp_if am33xx_l4_wkup__smartreflex0 = {
2275 .master = &am33xx_l4_wkup_hwmod,
2276 .slave = &am33xx_smartreflex0_hwmod,
2277 .clk = "dpll_core_m4_div2_ck",
2278 .addr = am33xx_smartreflex0_addrs,
2279 .user = OCP_USER_MPU,
2280};
2281
2282/* l4 wkup -> smartreflex1 */
2283static struct omap_hwmod_addr_space am33xx_smartreflex1_addrs[] = {
2284 {
2285 .pa_start = 0x44e39000,
2286 .pa_end = 0x44e39000 + SZ_4K - 1,
2287 .flags = ADDR_TYPE_RT
2288 },
2289 { }
2290};
2291
2292static struct omap_hwmod_ocp_if am33xx_l4_wkup__smartreflex1 = {
2293 .master = &am33xx_l4_wkup_hwmod,
2294 .slave = &am33xx_smartreflex1_hwmod,
2295 .clk = "dpll_core_m4_div2_ck",
2296 .addr = am33xx_smartreflex1_addrs,
2297 .user = OCP_USER_MPU,
2298};
2299
2300/* l4 wkup -> control */
2301static struct omap_hwmod_addr_space am33xx_control_addrs[] = {
2302 {
2303 .pa_start = 0x44e10000,
2304 .pa_end = 0x44e10000 + SZ_8K - 1,
2305 .flags = ADDR_TYPE_RT
2306 },
2307 { }
2308};
2309
2310static struct omap_hwmod_ocp_if am33xx_l4_wkup__control = {
2311 .master = &am33xx_l4_wkup_hwmod,
2312 .slave = &am33xx_control_hwmod,
2313 .clk = "dpll_core_m4_div2_ck",
2314 .addr = am33xx_control_addrs,
2315 .user = OCP_USER_MPU,
2316};
2317
2318/* l4 wkup -> rtc */
2319static struct omap_hwmod_addr_space am33xx_rtc_addrs[] = {
2320 {
2321 .pa_start = 0x44e3e000,
2322 .pa_end = 0x44e3e000 + SZ_4K - 1,
2323 .flags = ADDR_TYPE_RT
2324 },
2325 { }
2326};
2327
2328static struct omap_hwmod_ocp_if am33xx_l4_wkup__rtc = {
2329 .master = &am33xx_l4_wkup_hwmod,
2330 .slave = &am33xx_rtc_hwmod,
2331 .clk = "clkdiv32k_ick",
2332 .addr = am33xx_rtc_addrs,
2333 .user = OCP_USER_MPU,
2334};
2335
2336/* l4 per/ls -> DCAN0 */
2337static struct omap_hwmod_addr_space am33xx_dcan0_addrs[] = {
2338 {
2339 .pa_start = 0x481CC000,
2340 .pa_end = 0x481CC000 + SZ_4K - 1,
2341 .flags = ADDR_TYPE_RT
2342 },
2343 { }
2344};
2345
2346static struct omap_hwmod_ocp_if am33xx_l4_per__dcan0 = {
2347 .master = &am33xx_l4_ls_hwmod,
2348 .slave = &am33xx_dcan0_hwmod,
2349 .clk = "l4ls_gclk",
2350 .addr = am33xx_dcan0_addrs,
2351 .user = OCP_USER_MPU | OCP_USER_SDMA,
2352};
2353
2354/* l4 per/ls -> DCAN1 */
2355static struct omap_hwmod_addr_space am33xx_dcan1_addrs[] = {
2356 {
2357 .pa_start = 0x481D0000,
2358 .pa_end = 0x481D0000 + SZ_4K - 1,
2359 .flags = ADDR_TYPE_RT
2360 },
2361 { }
2362};
2363
2364static struct omap_hwmod_ocp_if am33xx_l4_per__dcan1 = {
2365 .master = &am33xx_l4_ls_hwmod,
2366 .slave = &am33xx_dcan1_hwmod,
2367 .clk = "l4ls_gclk",
2368 .addr = am33xx_dcan1_addrs,
2369 .user = OCP_USER_MPU | OCP_USER_SDMA,
2370};
2371
2372/* l4 per/ls -> GPIO2 */
2373static struct omap_hwmod_addr_space am33xx_gpio1_addrs[] = {
2374 {
2375 .pa_start = 0x4804C000,
2376 .pa_end = 0x4804C000 + SZ_4K - 1,
2377 .flags = ADDR_TYPE_RT,
2378 },
2379 { }
2380};
2381
2382static struct omap_hwmod_ocp_if am33xx_l4_per__gpio1 = {
2383 .master = &am33xx_l4_ls_hwmod,
2384 .slave = &am33xx_gpio1_hwmod,
2385 .clk = "l4ls_gclk",
2386 .addr = am33xx_gpio1_addrs,
2387 .user = OCP_USER_MPU | OCP_USER_SDMA,
2388};
2389
2390/* l4 per/ls -> gpio3 */
2391static struct omap_hwmod_addr_space am33xx_gpio2_addrs[] = {
2392 {
2393 .pa_start = 0x481AC000,
2394 .pa_end = 0x481AC000 + SZ_4K - 1,
2395 .flags = ADDR_TYPE_RT,
2396 },
2397 { }
2398};
2399
2400static struct omap_hwmod_ocp_if am33xx_l4_per__gpio2 = {
2401 .master = &am33xx_l4_ls_hwmod,
2402 .slave = &am33xx_gpio2_hwmod,
2403 .clk = "l4ls_gclk",
2404 .addr = am33xx_gpio2_addrs,
2405 .user = OCP_USER_MPU | OCP_USER_SDMA,
2406};
2407
2408/* l4 per/ls -> gpio4 */
2409static struct omap_hwmod_addr_space am33xx_gpio3_addrs[] = {
2410 {
2411 .pa_start = 0x481AE000,
2412 .pa_end = 0x481AE000 + SZ_4K - 1,
2413 .flags = ADDR_TYPE_RT,
2414 },
2415 { }
2416};
2417
2418static struct omap_hwmod_ocp_if am33xx_l4_per__gpio3 = {
2419 .master = &am33xx_l4_ls_hwmod,
2420 .slave = &am33xx_gpio3_hwmod,
2421 .clk = "l4ls_gclk",
2422 .addr = am33xx_gpio3_addrs,
2423 .user = OCP_USER_MPU | OCP_USER_SDMA,
2424};
2425
2426/* L4 WKUP -> I2C1 */
2427static struct omap_hwmod_addr_space am33xx_i2c1_addr_space[] = {
2428 {
2429 .pa_start = 0x44E0B000,
2430 .pa_end = 0x44E0B000 + SZ_4K - 1,
2431 .flags = ADDR_TYPE_RT,
2432 },
2433 { }
2434};
2435
2436static struct omap_hwmod_ocp_if am33xx_l4_wkup__i2c1 = {
2437 .master = &am33xx_l4_wkup_hwmod,
2438 .slave = &am33xx_i2c1_hwmod,
2439 .clk = "dpll_core_m4_div2_ck",
2440 .addr = am33xx_i2c1_addr_space,
2441 .user = OCP_USER_MPU,
2442};
2443
2444/* L4 WKUP -> GPIO1 */
2445static struct omap_hwmod_addr_space am33xx_gpio0_addrs[] = {
2446 {
2447 .pa_start = 0x44E07000,
2448 .pa_end = 0x44E07000 + SZ_4K - 1,
2449 .flags = ADDR_TYPE_RT,
2450 },
2451 { }
2452};
2453
2454static struct omap_hwmod_ocp_if am33xx_l4_wkup__gpio0 = {
2455 .master = &am33xx_l4_wkup_hwmod,
2456 .slave = &am33xx_gpio0_hwmod,
2457 .clk = "dpll_core_m4_div2_ck",
2458 .addr = am33xx_gpio0_addrs,
2459 .user = OCP_USER_MPU | OCP_USER_SDMA,
2460};
2461
2462/* L4 WKUP -> ADC_TSC */
2463static struct omap_hwmod_addr_space am33xx_adc_tsc_addrs[] = {
2464 {
2465 .pa_start = 0x44E0D000,
2466 .pa_end = 0x44E0D000 + SZ_8K - 1,
2467 .flags = ADDR_TYPE_RT
2468 },
2469 { }
2470};
2471
2472static struct omap_hwmod_ocp_if am33xx_l4_wkup__adc_tsc = {
2473 .master = &am33xx_l4_wkup_hwmod,
2474 .slave = &am33xx_adc_tsc_hwmod,
2475 .clk = "dpll_core_m4_div2_ck",
2476 .addr = am33xx_adc_tsc_addrs,
2477 .user = OCP_USER_MPU,
2478};
2479
2480static struct omap_hwmod_addr_space am33xx_cpgmac0_addr_space[] = {
2481 /* cpsw ss */
2482 {
2483 .pa_start = 0x4a100000,
2484 .pa_end = 0x4a100000 + SZ_2K - 1,
2485 .flags = ADDR_TYPE_RT,
2486 },
2487 /* cpsw wr */
2488 {
2489 .pa_start = 0x4a101200,
2490 .pa_end = 0x4a101200 + SZ_256 - 1,
2491 .flags = ADDR_TYPE_RT,
2492 },
2493 { }
2494};
2495
2496static struct omap_hwmod_ocp_if am33xx_l4_hs__cpgmac0 = {
2497 .master = &am33xx_l4_hs_hwmod,
2498 .slave = &am33xx_cpgmac0_hwmod,
2499 .clk = "cpsw_125mhz_gclk",
2500 .addr = am33xx_cpgmac0_addr_space,
2501 .user = OCP_USER_MPU,
2502};
2503
2504static struct omap_hwmod_addr_space am33xx_elm_addr_space[] = {
2505 {
2506 .pa_start = 0x48080000,
2507 .pa_end = 0x48080000 + SZ_8K - 1,
2508 .flags = ADDR_TYPE_RT
2509 },
2510 { }
2511};
2512
2513static struct omap_hwmod_ocp_if am33xx_l4_ls__elm = {
2514 .master = &am33xx_l4_ls_hwmod,
2515 .slave = &am33xx_elm_hwmod,
2516 .clk = "l4ls_gclk",
2517 .addr = am33xx_elm_addr_space,
2518 .user = OCP_USER_MPU,
2519};
2520
2521/*
2522 * Splitting the resources to handle access of PWMSS config space
2523 * and module specific part independently
2524 */
2525static struct omap_hwmod_addr_space am33xx_ehrpwm0_addr_space[] = {
2526 {
2527 .pa_start = 0x48300000,
2528 .pa_end = 0x48300000 + SZ_16 - 1,
2529 .flags = ADDR_TYPE_RT
2530 },
2531 {
2532 .pa_start = 0x48300200,
2533 .pa_end = 0x48300200 + SZ_256 - 1,
2534 .flags = ADDR_TYPE_RT
2535 },
2536 { }
2537};
2538
2539static struct omap_hwmod_ocp_if am33xx_l4_ls__ehrpwm0 = {
2540 .master = &am33xx_l4_ls_hwmod,
2541 .slave = &am33xx_ehrpwm0_hwmod,
2542 .clk = "l4ls_gclk",
2543 .addr = am33xx_ehrpwm0_addr_space,
2544 .user = OCP_USER_MPU,
2545};
2546
2547/*
2548 * Splitting the resources to handle access of PWMSS config space
2549 * and module specific part independently
2550 */
2551static struct omap_hwmod_addr_space am33xx_ehrpwm1_addr_space[] = {
2552 {
2553 .pa_start = 0x48302000,
2554 .pa_end = 0x48302000 + SZ_16 - 1,
2555 .flags = ADDR_TYPE_RT
2556 },
2557 {
2558 .pa_start = 0x48302200,
2559 .pa_end = 0x48302200 + SZ_256 - 1,
2560 .flags = ADDR_TYPE_RT
2561 },
2562 { }
2563};
2564
2565static struct omap_hwmod_ocp_if am33xx_l4_ls__ehrpwm1 = {
2566 .master = &am33xx_l4_ls_hwmod,
2567 .slave = &am33xx_ehrpwm1_hwmod,
2568 .clk = "l4ls_gclk",
2569 .addr = am33xx_ehrpwm1_addr_space,
2570 .user = OCP_USER_MPU,
2571};
2572
2573/*
2574 * Splitting the resources to handle access of PWMSS config space
2575 * and module specific part independently
2576 */
2577static struct omap_hwmod_addr_space am33xx_ehrpwm2_addr_space[] = {
2578 {
2579 .pa_start = 0x48304000,
2580 .pa_end = 0x48304000 + SZ_16 - 1,
2581 .flags = ADDR_TYPE_RT
2582 },
2583 {
2584 .pa_start = 0x48304200,
2585 .pa_end = 0x48304200 + SZ_256 - 1,
2586 .flags = ADDR_TYPE_RT
2587 },
2588 { }
2589};
2590
2591static struct omap_hwmod_ocp_if am33xx_l4_ls__ehrpwm2 = {
2592 .master = &am33xx_l4_ls_hwmod,
2593 .slave = &am33xx_ehrpwm2_hwmod,
2594 .clk = "l4ls_gclk",
2595 .addr = am33xx_ehrpwm2_addr_space,
2596 .user = OCP_USER_MPU,
2597};
2598
2599/*
2600 * Splitting the resources to handle access of PWMSS config space
2601 * and module specific part independently
2602 */
2603static struct omap_hwmod_addr_space am33xx_ecap0_addr_space[] = {
2604 {
2605 .pa_start = 0x48300000,
2606 .pa_end = 0x48300000 + SZ_16 - 1,
2607 .flags = ADDR_TYPE_RT
2608 },
2609 {
2610 .pa_start = 0x48300100,
2611 .pa_end = 0x48300100 + SZ_256 - 1,
2612 .flags = ADDR_TYPE_RT
2613 },
2614 { }
2615};
2616
2617static struct omap_hwmod_ocp_if am33xx_l4_ls__ecap0 = {
2618 .master = &am33xx_l4_ls_hwmod,
2619 .slave = &am33xx_ecap0_hwmod,
2620 .clk = "l4ls_gclk",
2621 .addr = am33xx_ecap0_addr_space,
2622 .user = OCP_USER_MPU,
2623};
2624
2625/*
2626 * Splitting the resources to handle access of PWMSS config space
2627 * and module specific part independently
2628 */
2629static struct omap_hwmod_addr_space am33xx_ecap1_addr_space[] = {
2630 {
2631 .pa_start = 0x48302000,
2632 .pa_end = 0x48302000 + SZ_16 - 1,
2633 .flags = ADDR_TYPE_RT
2634 },
2635 {
2636 .pa_start = 0x48302100,
2637 .pa_end = 0x48302100 + SZ_256 - 1,
2638 .flags = ADDR_TYPE_RT
2639 },
2640 { }
2641};
2642
2643static struct omap_hwmod_ocp_if am33xx_l4_ls__ecap1 = {
2644 .master = &am33xx_l4_ls_hwmod,
2645 .slave = &am33xx_ecap1_hwmod,
2646 .clk = "l4ls_gclk",
2647 .addr = am33xx_ecap1_addr_space,
2648 .user = OCP_USER_MPU,
2649};
2650
2651/*
2652 * Splitting the resources to handle access of PWMSS config space
2653 * and module specific part independently
2654 */
2655static struct omap_hwmod_addr_space am33xx_ecap2_addr_space[] = {
2656 {
2657 .pa_start = 0x48304000,
2658 .pa_end = 0x48304000 + SZ_16 - 1,
2659 .flags = ADDR_TYPE_RT
2660 },
2661 {
2662 .pa_start = 0x48304100,
2663 .pa_end = 0x48304100 + SZ_256 - 1,
2664 .flags = ADDR_TYPE_RT
2665 },
2666 { }
2667};
2668
2669static struct omap_hwmod_ocp_if am33xx_l4_ls__ecap2 = {
2670 .master = &am33xx_l4_ls_hwmod,
2671 .slave = &am33xx_ecap2_hwmod,
2672 .clk = "l4ls_gclk",
2673 .addr = am33xx_ecap2_addr_space,
2674 .user = OCP_USER_MPU,
2675};
2676
2677/* l3s cfg -> gpmc */
2678static struct omap_hwmod_addr_space am33xx_gpmc_addr_space[] = {
2679 {
2680 .pa_start = 0x50000000,
2681 .pa_end = 0x50000000 + SZ_8K - 1,
2682 .flags = ADDR_TYPE_RT,
2683 },
2684 { }
2685};
2686
2687static struct omap_hwmod_ocp_if am33xx_l3_s__gpmc = {
2688 .master = &am33xx_l3_s_hwmod,
2689 .slave = &am33xx_gpmc_hwmod,
2690 .clk = "l3s_gclk",
2691 .addr = am33xx_gpmc_addr_space,
2692 .user = OCP_USER_MPU,
2693};
2694
2695/* i2c2 */
2696static struct omap_hwmod_addr_space am33xx_i2c2_addr_space[] = {
2697 {
2698 .pa_start = 0x4802A000,
2699 .pa_end = 0x4802A000 + SZ_4K - 1,
2700 .flags = ADDR_TYPE_RT,
2701 },
2702 { }
2703};
2704
2705static struct omap_hwmod_ocp_if am33xx_l4_per__i2c2 = {
2706 .master = &am33xx_l4_ls_hwmod,
2707 .slave = &am33xx_i2c2_hwmod,
2708 .clk = "l4ls_gclk",
2709 .addr = am33xx_i2c2_addr_space,
2710 .user = OCP_USER_MPU,
2711};
2712
2713static struct omap_hwmod_addr_space am33xx_i2c3_addr_space[] = {
2714 {
2715 .pa_start = 0x4819C000,
2716 .pa_end = 0x4819C000 + SZ_4K - 1,
2717 .flags = ADDR_TYPE_RT
2718 },
2719 { }
2720};
2721
2722static struct omap_hwmod_ocp_if am33xx_l4_per__i2c3 = {
2723 .master = &am33xx_l4_ls_hwmod,
2724 .slave = &am33xx_i2c3_hwmod,
2725 .clk = "l4ls_gclk",
2726 .addr = am33xx_i2c3_addr_space,
2727 .user = OCP_USER_MPU,
2728};
2729
2730static struct omap_hwmod_addr_space am33xx_lcdc_addr_space[] = {
2731 {
2732 .pa_start = 0x4830E000,
2733 .pa_end = 0x4830E000 + SZ_8K - 1,
2734 .flags = ADDR_TYPE_RT,
2735 },
2736 { }
2737};
2738
2739static struct omap_hwmod_ocp_if am33xx_l3_main__lcdc = {
2740 .master = &am33xx_l3_main_hwmod,
2741 .slave = &am33xx_lcdc_hwmod,
2742 .clk = "dpll_core_m4_ck",
2743 .addr = am33xx_lcdc_addr_space,
2744 .user = OCP_USER_MPU,
2745};
2746
2747static struct omap_hwmod_addr_space am33xx_mailbox_addrs[] = {
2748 {
2749 .pa_start = 0x480C8000,
2750 .pa_end = 0x480C8000 + (SZ_4K - 1),
2751 .flags = ADDR_TYPE_RT
2752 },
2753 { }
2754};
2755
2756/* l4 ls -> mailbox */
2757static struct omap_hwmod_ocp_if am33xx_l4_per__mailbox = {
2758 .master = &am33xx_l4_ls_hwmod,
2759 .slave = &am33xx_mailbox_hwmod,
2760 .clk = "l4ls_gclk",
2761 .addr = am33xx_mailbox_addrs,
2762 .user = OCP_USER_MPU,
2763};
2764
2765/* l4 ls -> spinlock */
2766static struct omap_hwmod_addr_space am33xx_spinlock_addrs[] = {
2767 {
2768 .pa_start = 0x480Ca000,
2769 .pa_end = 0x480Ca000 + SZ_4K - 1,
2770 .flags = ADDR_TYPE_RT
2771 },
2772 { }
2773};
2774
2775static struct omap_hwmod_ocp_if am33xx_l4_ls__spinlock = {
2776 .master = &am33xx_l4_ls_hwmod,
2777 .slave = &am33xx_spinlock_hwmod,
2778 .clk = "l4ls_gclk",
2779 .addr = am33xx_spinlock_addrs,
2780 .user = OCP_USER_MPU,
2781};
2782
2783/* l4 ls -> mcasp0 */
2784static struct omap_hwmod_addr_space am33xx_mcasp0_addr_space[] = {
2785 {
2786 .pa_start = 0x48038000,
2787 .pa_end = 0x48038000 + SZ_8K - 1,
2788 .flags = ADDR_TYPE_RT
2789 },
2790 { }
2791};
2792
2793static struct omap_hwmod_ocp_if am33xx_l4_ls__mcasp0 = {
2794 .master = &am33xx_l4_ls_hwmod,
2795 .slave = &am33xx_mcasp0_hwmod,
2796 .clk = "l4ls_gclk",
2797 .addr = am33xx_mcasp0_addr_space,
2798 .user = OCP_USER_MPU,
2799};
2800
2801/* l3 s -> mcasp0 data */
2802static struct omap_hwmod_addr_space am33xx_mcasp0_data_addr_space[] = {
2803 {
2804 .pa_start = 0x46000000,
2805 .pa_end = 0x46000000 + SZ_4M - 1,
2806 .flags = ADDR_TYPE_RT
2807 },
2808 { }
2809};
2810
2811static struct omap_hwmod_ocp_if am33xx_l3_s__mcasp0_data = {
2812 .master = &am33xx_l3_s_hwmod,
2813 .slave = &am33xx_mcasp0_hwmod,
2814 .clk = "l3s_gclk",
2815 .addr = am33xx_mcasp0_data_addr_space,
2816 .user = OCP_USER_SDMA,
2817};
2818
2819/* l4 ls -> mcasp1 */
2820static struct omap_hwmod_addr_space am33xx_mcasp1_addr_space[] = {
2821 {
2822 .pa_start = 0x4803C000,
2823 .pa_end = 0x4803C000 + SZ_8K - 1,
2824 .flags = ADDR_TYPE_RT
2825 },
2826 { }
2827};
2828
2829static struct omap_hwmod_ocp_if am33xx_l4_ls__mcasp1 = {
2830 .master = &am33xx_l4_ls_hwmod,
2831 .slave = &am33xx_mcasp1_hwmod,
2832 .clk = "l4ls_gclk",
2833 .addr = am33xx_mcasp1_addr_space,
2834 .user = OCP_USER_MPU,
2835};
2836
2837/* l3 s -> mcasp1 data */
2838static struct omap_hwmod_addr_space am33xx_mcasp1_data_addr_space[] = {
2839 {
2840 .pa_start = 0x46400000,
2841 .pa_end = 0x46400000 + SZ_4M - 1,
2842 .flags = ADDR_TYPE_RT
2843 },
2844 { }
2845};
2846
2847static struct omap_hwmod_ocp_if am33xx_l3_s__mcasp1_data = {
2848 .master = &am33xx_l3_s_hwmod,
2849 .slave = &am33xx_mcasp1_hwmod,
2850 .clk = "l3s_gclk",
2851 .addr = am33xx_mcasp1_data_addr_space,
2852 .user = OCP_USER_SDMA,
2853};
2854
2855/* l4 ls -> mmc0 */
2856static struct omap_hwmod_addr_space am33xx_mmc0_addr_space[] = {
2857 {
2858 .pa_start = 0x48060100,
2859 .pa_end = 0x48060100 + SZ_4K - 1,
2860 .flags = ADDR_TYPE_RT,
2861 },
2862 { }
2863};
2864
2865static struct omap_hwmod_ocp_if am33xx_l4_ls__mmc0 = {
2866 .master = &am33xx_l4_ls_hwmod,
2867 .slave = &am33xx_mmc0_hwmod,
2868 .clk = "l4ls_gclk",
2869 .addr = am33xx_mmc0_addr_space,
2870 .user = OCP_USER_MPU,
2871};
2872
2873/* l4 ls -> mmc1 */
2874static struct omap_hwmod_addr_space am33xx_mmc1_addr_space[] = {
2875 {
2876 .pa_start = 0x481d8100,
2877 .pa_end = 0x481d8100 + SZ_4K - 1,
2878 .flags = ADDR_TYPE_RT,
2879 },
2880 { }
2881};
2882
2883static struct omap_hwmod_ocp_if am33xx_l4_ls__mmc1 = {
2884 .master = &am33xx_l4_ls_hwmod,
2885 .slave = &am33xx_mmc1_hwmod,
2886 .clk = "l4ls_gclk",
2887 .addr = am33xx_mmc1_addr_space,
2888 .user = OCP_USER_MPU,
2889};
2890
2891/* l3 s -> mmc2 */
2892static struct omap_hwmod_addr_space am33xx_mmc2_addr_space[] = {
2893 {
2894 .pa_start = 0x47810100,
2895 .pa_end = 0x47810100 + SZ_64K - 1,
2896 .flags = ADDR_TYPE_RT,
2897 },
2898 { }
2899};
2900
2901static struct omap_hwmod_ocp_if am33xx_l3_s__mmc2 = {
2902 .master = &am33xx_l3_s_hwmod,
2903 .slave = &am33xx_mmc2_hwmod,
2904 .clk = "l3s_gclk",
2905 .addr = am33xx_mmc2_addr_space,
2906 .user = OCP_USER_MPU,
2907};
2908
2909/* l4 ls -> mcspi0 */
2910static struct omap_hwmod_addr_space am33xx_mcspi0_addr_space[] = {
2911 {
2912 .pa_start = 0x48030000,
2913 .pa_end = 0x48030000 + SZ_1K - 1,
2914 .flags = ADDR_TYPE_RT,
2915 },
2916 { }
2917};
2918
2919static struct omap_hwmod_ocp_if am33xx_l4_ls__mcspi0 = {
2920 .master = &am33xx_l4_ls_hwmod,
2921 .slave = &am33xx_spi0_hwmod,
2922 .clk = "l4ls_gclk",
2923 .addr = am33xx_mcspi0_addr_space,
2924 .user = OCP_USER_MPU,
2925};
2926
2927/* l4 ls -> mcspi1 */
2928static struct omap_hwmod_addr_space am33xx_mcspi1_addr_space[] = {
2929 {
2930 .pa_start = 0x481A0000,
2931 .pa_end = 0x481A0000 + SZ_1K - 1,
2932 .flags = ADDR_TYPE_RT,
2933 },
2934 { }
2935};
2936
2937static struct omap_hwmod_ocp_if am33xx_l4_ls__mcspi1 = {
2938 .master = &am33xx_l4_ls_hwmod,
2939 .slave = &am33xx_spi1_hwmod,
2940 .clk = "l4ls_gclk",
2941 .addr = am33xx_mcspi1_addr_space,
2942 .user = OCP_USER_MPU,
2943};
2944
2945/* l4 wkup -> timer1 */
2946static struct omap_hwmod_addr_space am33xx_timer1_addr_space[] = {
2947 {
2948 .pa_start = 0x44E31000,
2949 .pa_end = 0x44E31000 + SZ_1K - 1,
2950 .flags = ADDR_TYPE_RT
2951 },
2952 { }
2953};
2954
2955static struct omap_hwmod_ocp_if am33xx_l4_wkup__timer1 = {
2956 .master = &am33xx_l4_wkup_hwmod,
2957 .slave = &am33xx_timer1_hwmod,
2958 .clk = "dpll_core_m4_div2_ck",
2959 .addr = am33xx_timer1_addr_space,
2960 .user = OCP_USER_MPU,
2961};
2962
2963/* l4 per -> timer2 */
2964static struct omap_hwmod_addr_space am33xx_timer2_addr_space[] = {
2965 {
2966 .pa_start = 0x48040000,
2967 .pa_end = 0x48040000 + SZ_1K - 1,
2968 .flags = ADDR_TYPE_RT
2969 },
2970 { }
2971};
2972
2973static struct omap_hwmod_ocp_if am33xx_l4_ls__timer2 = {
2974 .master = &am33xx_l4_ls_hwmod,
2975 .slave = &am33xx_timer2_hwmod,
2976 .clk = "l4ls_gclk",
2977 .addr = am33xx_timer2_addr_space,
2978 .user = OCP_USER_MPU,
2979};
2980
2981/* l4 per -> timer3 */
2982static struct omap_hwmod_addr_space am33xx_timer3_addr_space[] = {
2983 {
2984 .pa_start = 0x48042000,
2985 .pa_end = 0x48042000 + SZ_1K - 1,
2986 .flags = ADDR_TYPE_RT
2987 },
2988 { }
2989};
2990
2991static struct omap_hwmod_ocp_if am33xx_l4_ls__timer3 = {
2992 .master = &am33xx_l4_ls_hwmod,
2993 .slave = &am33xx_timer3_hwmod,
2994 .clk = "l4ls_gclk",
2995 .addr = am33xx_timer3_addr_space,
2996 .user = OCP_USER_MPU,
2997};
2998
2999/* l4 per -> timer4 */
3000static struct omap_hwmod_addr_space am33xx_timer4_addr_space[] = {
3001 {
3002 .pa_start = 0x48044000,
3003 .pa_end = 0x48044000 + SZ_1K - 1,
3004 .flags = ADDR_TYPE_RT
3005 },
3006 { }
3007};
3008
3009static struct omap_hwmod_ocp_if am33xx_l4_ls__timer4 = {
3010 .master = &am33xx_l4_ls_hwmod,
3011 .slave = &am33xx_timer4_hwmod,
3012 .clk = "l4ls_gclk",
3013 .addr = am33xx_timer4_addr_space,
3014 .user = OCP_USER_MPU,
3015};
3016
3017/* l4 per -> timer5 */
3018static struct omap_hwmod_addr_space am33xx_timer5_addr_space[] = {
3019 {
3020 .pa_start = 0x48046000,
3021 .pa_end = 0x48046000 + SZ_1K - 1,
3022 .flags = ADDR_TYPE_RT
3023 },
3024 { }
3025};
3026
3027static struct omap_hwmod_ocp_if am33xx_l4_ls__timer5 = {
3028 .master = &am33xx_l4_ls_hwmod,
3029 .slave = &am33xx_timer5_hwmod,
3030 .clk = "l4ls_gclk",
3031 .addr = am33xx_timer5_addr_space,
3032 .user = OCP_USER_MPU,
3033};
3034
3035/* l4 per -> timer6 */
3036static struct omap_hwmod_addr_space am33xx_timer6_addr_space[] = {
3037 {
3038 .pa_start = 0x48048000,
3039 .pa_end = 0x48048000 + SZ_1K - 1,
3040 .flags = ADDR_TYPE_RT
3041 },
3042 { }
3043};
3044
3045static struct omap_hwmod_ocp_if am33xx_l4_ls__timer6 = {
3046 .master = &am33xx_l4_ls_hwmod,
3047 .slave = &am33xx_timer6_hwmod,
3048 .clk = "l4ls_gclk",
3049 .addr = am33xx_timer6_addr_space,
3050 .user = OCP_USER_MPU,
3051};
3052
3053/* l4 per -> timer7 */
3054static struct omap_hwmod_addr_space am33xx_timer7_addr_space[] = {
3055 {
3056 .pa_start = 0x4804A000,
3057 .pa_end = 0x4804A000 + SZ_1K - 1,
3058 .flags = ADDR_TYPE_RT
3059 },
3060 { }
3061};
3062
3063static struct omap_hwmod_ocp_if am33xx_l4_ls__timer7 = {
3064 .master = &am33xx_l4_ls_hwmod,
3065 .slave = &am33xx_timer7_hwmod,
3066 .clk = "l4ls_gclk",
3067 .addr = am33xx_timer7_addr_space,
3068 .user = OCP_USER_MPU,
3069};
3070
3071/* l3 main -> tpcc */
3072static struct omap_hwmod_addr_space am33xx_tpcc_addr_space[] = {
3073 {
3074 .pa_start = 0x49000000,
3075 .pa_end = 0x49000000 + SZ_32K - 1,
3076 .flags = ADDR_TYPE_RT
3077 },
3078 { }
3079};
3080
3081static struct omap_hwmod_ocp_if am33xx_l3_main__tpcc = {
3082 .master = &am33xx_l3_main_hwmod,
3083 .slave = &am33xx_tpcc_hwmod,
3084 .clk = "l3_gclk",
3085 .addr = am33xx_tpcc_addr_space,
3086 .user = OCP_USER_MPU,
3087};
3088
3089/* l3 main -> tpcc0 */
3090static struct omap_hwmod_addr_space am33xx_tptc0_addr_space[] = {
3091 {
3092 .pa_start = 0x49800000,
3093 .pa_end = 0x49800000 + SZ_8K - 1,
3094 .flags = ADDR_TYPE_RT,
3095 },
3096 { }
3097};
3098
3099static struct omap_hwmod_ocp_if am33xx_l3_main__tptc0 = {
3100 .master = &am33xx_l3_main_hwmod,
3101 .slave = &am33xx_tptc0_hwmod,
3102 .clk = "l3_gclk",
3103 .addr = am33xx_tptc0_addr_space,
3104 .user = OCP_USER_MPU,
3105};
3106
3107/* l3 main -> tpcc1 */
3108static struct omap_hwmod_addr_space am33xx_tptc1_addr_space[] = {
3109 {
3110 .pa_start = 0x49900000,
3111 .pa_end = 0x49900000 + SZ_8K - 1,
3112 .flags = ADDR_TYPE_RT,
3113 },
3114 { }
3115};
3116
3117static struct omap_hwmod_ocp_if am33xx_l3_main__tptc1 = {
3118 .master = &am33xx_l3_main_hwmod,
3119 .slave = &am33xx_tptc1_hwmod,
3120 .clk = "l3_gclk",
3121 .addr = am33xx_tptc1_addr_space,
3122 .user = OCP_USER_MPU,
3123};
3124
3125/* l3 main -> tpcc2 */
3126static struct omap_hwmod_addr_space am33xx_tptc2_addr_space[] = {
3127 {
3128 .pa_start = 0x49a00000,
3129 .pa_end = 0x49a00000 + SZ_8K - 1,
3130 .flags = ADDR_TYPE_RT,
3131 },
3132 { }
3133};
3134
3135static struct omap_hwmod_ocp_if am33xx_l3_main__tptc2 = {
3136 .master = &am33xx_l3_main_hwmod,
3137 .slave = &am33xx_tptc2_hwmod,
3138 .clk = "l3_gclk",
3139 .addr = am33xx_tptc2_addr_space,
3140 .user = OCP_USER_MPU,
3141};
3142
3143/* l4 wkup -> uart1 */
3144static struct omap_hwmod_addr_space am33xx_uart1_addr_space[] = {
3145 {
3146 .pa_start = 0x44E09000,
3147 .pa_end = 0x44E09000 + SZ_8K - 1,
3148 .flags = ADDR_TYPE_RT,
3149 },
3150 { }
3151};
3152
3153static struct omap_hwmod_ocp_if am33xx_l4_wkup__uart1 = {
3154 .master = &am33xx_l4_wkup_hwmod,
3155 .slave = &am33xx_uart1_hwmod,
3156 .clk = "dpll_core_m4_div2_ck",
3157 .addr = am33xx_uart1_addr_space,
3158 .user = OCP_USER_MPU,
3159};
3160
3161/* l4 ls -> uart2 */
3162static struct omap_hwmod_addr_space am33xx_uart2_addr_space[] = {
3163 {
3164 .pa_start = 0x48022000,
3165 .pa_end = 0x48022000 + SZ_8K - 1,
3166 .flags = ADDR_TYPE_RT,
3167 },
3168 { }
3169};
3170
3171static struct omap_hwmod_ocp_if am33xx_l4_ls__uart2 = {
3172 .master = &am33xx_l4_ls_hwmod,
3173 .slave = &am33xx_uart2_hwmod,
3174 .clk = "l4ls_gclk",
3175 .addr = am33xx_uart2_addr_space,
3176 .user = OCP_USER_MPU,
3177};
3178
3179/* l4 ls -> uart3 */
3180static struct omap_hwmod_addr_space am33xx_uart3_addr_space[] = {
3181 {
3182 .pa_start = 0x48024000,
3183 .pa_end = 0x48024000 + SZ_8K - 1,
3184 .flags = ADDR_TYPE_RT,
3185 },
3186 { }
3187};
3188
3189static struct omap_hwmod_ocp_if am33xx_l4_ls__uart3 = {
3190 .master = &am33xx_l4_ls_hwmod,
3191 .slave = &am33xx_uart3_hwmod,
3192 .clk = "l4ls_gclk",
3193 .addr = am33xx_uart3_addr_space,
3194 .user = OCP_USER_MPU,
3195};
3196
3197/* l4 ls -> uart4 */
3198static struct omap_hwmod_addr_space am33xx_uart4_addr_space[] = {
3199 {
3200 .pa_start = 0x481A6000,
3201 .pa_end = 0x481A6000 + SZ_8K - 1,
3202 .flags = ADDR_TYPE_RT,
3203 },
3204 { }
3205};
3206
3207static struct omap_hwmod_ocp_if am33xx_l4_ls__uart4 = {
3208 .master = &am33xx_l4_ls_hwmod,
3209 .slave = &am33xx_uart4_hwmod,
3210 .clk = "l4ls_gclk",
3211 .addr = am33xx_uart4_addr_space,
3212 .user = OCP_USER_MPU,
3213};
3214
3215/* l4 ls -> uart5 */
3216static struct omap_hwmod_addr_space am33xx_uart5_addr_space[] = {
3217 {
3218 .pa_start = 0x481A8000,
3219 .pa_end = 0x481A8000 + SZ_8K - 1,
3220 .flags = ADDR_TYPE_RT,
3221 },
3222 { }
3223};
3224
3225static struct omap_hwmod_ocp_if am33xx_l4_ls__uart5 = {
3226 .master = &am33xx_l4_ls_hwmod,
3227 .slave = &am33xx_uart5_hwmod,
3228 .clk = "l4ls_gclk",
3229 .addr = am33xx_uart5_addr_space,
3230 .user = OCP_USER_MPU,
3231};
3232
3233/* l4 ls -> uart6 */
3234static struct omap_hwmod_addr_space am33xx_uart6_addr_space[] = {
3235 {
3236 .pa_start = 0x481aa000,
3237 .pa_end = 0x481aa000 + SZ_8K - 1,
3238 .flags = ADDR_TYPE_RT,
3239 },
3240 { }
3241};
3242
3243static struct omap_hwmod_ocp_if am33xx_l4_ls__uart6 = {
3244 .master = &am33xx_l4_ls_hwmod,
3245 .slave = &am33xx_uart6_hwmod,
3246 .clk = "l4ls_gclk",
3247 .addr = am33xx_uart6_addr_space,
3248 .user = OCP_USER_MPU,
3249};
3250
3251/* l4 wkup -> wd_timer1 */
3252static struct omap_hwmod_addr_space am33xx_wd_timer1_addrs[] = {
3253 {
3254 .pa_start = 0x44e35000,
3255 .pa_end = 0x44e35000 + SZ_4K - 1,
3256 .flags = ADDR_TYPE_RT
3257 },
3258 { }
3259};
3260
3261static struct omap_hwmod_ocp_if am33xx_l4_wkup__wd_timer1 = {
3262 .master = &am33xx_l4_wkup_hwmod,
3263 .slave = &am33xx_wd_timer1_hwmod,
3264 .clk = "dpll_core_m4_div2_ck",
3265 .addr = am33xx_wd_timer1_addrs,
3266 .user = OCP_USER_MPU,
3267};
3268
3269/* usbss */
3270/* l3 s -> USBSS interface */
3271static struct omap_hwmod_addr_space am33xx_usbss_addr_space[] = {
3272 {
3273 .name = "usbss",
3274 .pa_start = 0x47400000,
3275 .pa_end = 0x47400000 + SZ_4K - 1,
3276 .flags = ADDR_TYPE_RT
3277 },
3278 {
3279 .name = "musb0",
3280 .pa_start = 0x47401000,
3281 .pa_end = 0x47401000 + SZ_2K - 1,
3282 .flags = ADDR_TYPE_RT
3283 },
3284 {
3285 .name = "musb1",
3286 .pa_start = 0x47401800,
3287 .pa_end = 0x47401800 + SZ_2K - 1,
3288 .flags = ADDR_TYPE_RT
3289 },
3290 { }
3291};
3292
3293static struct omap_hwmod_ocp_if am33xx_l3_s__usbss = {
3294 .master = &am33xx_l3_s_hwmod,
3295 .slave = &am33xx_usbss_hwmod,
3296 .clk = "l3s_gclk",
3297 .addr = am33xx_usbss_addr_space,
3298 .user = OCP_USER_MPU,
3299 .flags = OCPIF_SWSUP_IDLE,
3300};
3301
3302static struct omap_hwmod_ocp_if *am33xx_hwmod_ocp_ifs[] __initdata = {
3303 &am33xx_l4_fw__emif_fw,
3304 &am33xx_l3_main__emif,
3305 &am33xx_mpu__l3_main,
3306 &am33xx_mpu__prcm,
3307 &am33xx_l3_s__l4_ls,
3308 &am33xx_l3_s__l4_wkup,
3309 &am33xx_l3_s__l4_fw,
3310 &am33xx_l3_main__l4_hs,
3311 &am33xx_l3_main__l3_s,
3312 &am33xx_l3_main__l3_instr,
3313 &am33xx_l3_main__gfx,
3314 &am33xx_l3_s__l3_main,
3315 &am33xx_pruss__l3_main,
3316 &am33xx_wkup_m3__l4_wkup,
3317 &am33xx_gfx__l3_main,
3318 &am33xx_l4_wkup__wkup_m3,
3319 &am33xx_l4_wkup__control,
3320 &am33xx_l4_wkup__smartreflex0,
3321 &am33xx_l4_wkup__smartreflex1,
3322 &am33xx_l4_wkup__uart1,
3323 &am33xx_l4_wkup__timer1,
3324 &am33xx_l4_wkup__rtc,
3325 &am33xx_l4_wkup__i2c1,
3326 &am33xx_l4_wkup__gpio0,
3327 &am33xx_l4_wkup__adc_tsc,
3328 &am33xx_l4_wkup__wd_timer1,
3329 &am33xx_l4_hs__pruss,
3330 &am33xx_l4_per__dcan0,
3331 &am33xx_l4_per__dcan1,
3332 &am33xx_l4_per__gpio1,
3333 &am33xx_l4_per__gpio2,
3334 &am33xx_l4_per__gpio3,
3335 &am33xx_l4_per__i2c2,
3336 &am33xx_l4_per__i2c3,
3337 &am33xx_l4_per__mailbox,
3338 &am33xx_l4_ls__mcasp0,
3339 &am33xx_l3_s__mcasp0_data,
3340 &am33xx_l4_ls__mcasp1,
3341 &am33xx_l3_s__mcasp1_data,
3342 &am33xx_l4_ls__mmc0,
3343 &am33xx_l4_ls__mmc1,
3344 &am33xx_l3_s__mmc2,
3345 &am33xx_l4_ls__timer2,
3346 &am33xx_l4_ls__timer3,
3347 &am33xx_l4_ls__timer4,
3348 &am33xx_l4_ls__timer5,
3349 &am33xx_l4_ls__timer6,
3350 &am33xx_l4_ls__timer7,
3351 &am33xx_l3_main__tpcc,
3352 &am33xx_l4_ls__uart2,
3353 &am33xx_l4_ls__uart3,
3354 &am33xx_l4_ls__uart4,
3355 &am33xx_l4_ls__uart5,
3356 &am33xx_l4_ls__uart6,
3357 &am33xx_l4_ls__spinlock,
3358 &am33xx_l4_ls__elm,
3359 &am33xx_l4_ls__ehrpwm0,
3360 &am33xx_l4_ls__ehrpwm1,
3361 &am33xx_l4_ls__ehrpwm2,
3362 &am33xx_l4_ls__ecap0,
3363 &am33xx_l4_ls__ecap1,
3364 &am33xx_l4_ls__ecap2,
3365 &am33xx_l3_s__gpmc,
3366 &am33xx_l3_main__lcdc,
3367 &am33xx_l4_ls__mcspi0,
3368 &am33xx_l4_ls__mcspi1,
3369 &am33xx_l3_main__tptc0,
3370 &am33xx_l3_main__tptc1,
3371 &am33xx_l3_main__tptc2,
3372 &am33xx_l3_s__usbss,
3373 &am33xx_l4_hs__cpgmac0,
3374 NULL,
3375};
3376
3377int __init am33xx_hwmod_init(void)
3378{
3379 omap_hwmod_init();
3380 return omap_hwmod_register_links(am33xx_hwmod_ocp_ifs);
3381}
diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
index c9e38200216b..75fbbac13921 100644
--- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
@@ -15,26 +15,26 @@
15 * XXX these should be marked initdata for multi-OMAP kernels 15 * XXX these should be marked initdata for multi-OMAP kernels
16 */ 16 */
17#include <linux/power/smartreflex.h> 17#include <linux/power/smartreflex.h>
18#include <linux/platform_data/gpio-omap.h>
18 19
19#include <plat/omap_hwmod.h> 20#include <plat/omap_hwmod.h>
20#include <mach/irqs.h>
21#include <plat/cpu.h>
22#include <plat/dma.h> 21#include <plat/dma.h>
23#include <plat/serial.h> 22#include <plat/serial.h>
24#include <plat/l3_3xxx.h> 23#include <plat/l3_3xxx.h>
25#include <plat/l4_3xxx.h> 24#include <plat/l4_3xxx.h>
26#include <plat/i2c.h> 25#include <plat/i2c.h>
27#include <plat/gpio.h>
28#include <plat/mmc.h> 26#include <plat/mmc.h>
29#include <plat/mcbsp.h> 27#include <plat/mcbsp.h>
30#include <plat/mcspi.h> 28#include <plat/mcspi.h>
31#include <plat/dmtimer.h> 29#include <plat/dmtimer.h>
32 30
31#include <mach/am35xx.h>
32
33#include "soc.h"
33#include "omap_hwmod_common_data.h" 34#include "omap_hwmod_common_data.h"
34#include "prm-regbits-34xx.h" 35#include "prm-regbits-34xx.h"
35#include "cm-regbits-34xx.h" 36#include "cm-regbits-34xx.h"
36#include "wd_timer.h" 37#include "wd_timer.h"
37#include <mach/am35xx.h>
38 38
39/* 39/*
40 * OMAP3xxx hardware module integration data 40 * OMAP3xxx hardware module integration data
@@ -51,9 +51,9 @@
51 51
52/* L3 */ 52/* L3 */
53static struct omap_hwmod_irq_info omap3xxx_l3_main_irqs[] = { 53static struct omap_hwmod_irq_info omap3xxx_l3_main_irqs[] = {
54 { .irq = INT_34XX_L3_DBG_IRQ }, 54 { .irq = 9 + OMAP_INTC_START, },
55 { .irq = INT_34XX_L3_APP_IRQ }, 55 { .irq = 10 + OMAP_INTC_START, },
56 { .irq = -1 } 56 { .irq = -1 },
57}; 57};
58 58
59static struct omap_hwmod omap3xxx_l3_main_hwmod = { 59static struct omap_hwmod omap3xxx_l3_main_hwmod = {
@@ -355,8 +355,8 @@ static struct omap_hwmod omap3xxx_timer11_hwmod = {
355 355
356/* timer12 */ 356/* timer12 */
357static struct omap_hwmod_irq_info omap3xxx_timer12_mpu_irqs[] = { 357static struct omap_hwmod_irq_info omap3xxx_timer12_mpu_irqs[] = {
358 { .irq = 95, }, 358 { .irq = 95 + OMAP_INTC_START, },
359 { .irq = -1 } 359 { .irq = -1 },
360}; 360};
361 361
362static struct omap_hwmod omap3xxx_timer12_hwmod = { 362static struct omap_hwmod omap3xxx_timer12_hwmod = {
@@ -490,8 +490,8 @@ static struct omap_hwmod omap3xxx_uart3_hwmod = {
490 490
491/* UART4 */ 491/* UART4 */
492static struct omap_hwmod_irq_info uart4_mpu_irqs[] = { 492static struct omap_hwmod_irq_info uart4_mpu_irqs[] = {
493 { .irq = INT_36XX_UART4_IRQ, }, 493 { .irq = 80 + OMAP_INTC_START, },
494 { .irq = -1 } 494 { .irq = -1 },
495}; 495};
496 496
497static struct omap_hwmod_dma_info uart4_sdma_reqs[] = { 497static struct omap_hwmod_dma_info uart4_sdma_reqs[] = {
@@ -518,8 +518,8 @@ static struct omap_hwmod omap36xx_uart4_hwmod = {
518}; 518};
519 519
520static struct omap_hwmod_irq_info am35xx_uart4_mpu_irqs[] = { 520static struct omap_hwmod_irq_info am35xx_uart4_mpu_irqs[] = {
521 { .irq = INT_35XX_UART4_IRQ, }, 521 { .irq = 84 + OMAP_INTC_START, },
522 { .irq = -1 } 522 { .irq = -1 },
523}; 523};
524 524
525static struct omap_hwmod_dma_info am35xx_uart4_sdma_reqs[] = { 525static struct omap_hwmod_dma_info am35xx_uart4_sdma_reqs[] = {
@@ -674,8 +674,8 @@ static struct omap_hwmod_class omap3xxx_dsi_hwmod_class = {
674}; 674};
675 675
676static struct omap_hwmod_irq_info omap3xxx_dsi1_irqs[] = { 676static struct omap_hwmod_irq_info omap3xxx_dsi1_irqs[] = {
677 { .irq = 25 }, 677 { .irq = 25 + OMAP_INTC_START, },
678 { .irq = -1 } 678 { .irq = -1 },
679}; 679};
680 680
681/* dss_dsi1 */ 681/* dss_dsi1 */
@@ -804,8 +804,8 @@ static struct omap_i2c_dev_attr i2c3_dev_attr = {
804}; 804};
805 805
806static struct omap_hwmod_irq_info i2c3_mpu_irqs[] = { 806static struct omap_hwmod_irq_info i2c3_mpu_irqs[] = {
807 { .irq = INT_34XX_I2C3_IRQ, }, 807 { .irq = 61 + OMAP_INTC_START, },
808 { .irq = -1 } 808 { .irq = -1 },
809}; 809};
810 810
811static struct omap_hwmod_dma_info i2c3_sdma_reqs[] = { 811static struct omap_hwmod_dma_info i2c3_sdma_reqs[] = {
@@ -963,8 +963,8 @@ static struct omap_hwmod omap3xxx_gpio4_hwmod = {
963 963
964/* gpio5 */ 964/* gpio5 */
965static struct omap_hwmod_irq_info omap3xxx_gpio5_irqs[] = { 965static struct omap_hwmod_irq_info omap3xxx_gpio5_irqs[] = {
966 { .irq = 33 }, /* INT_34XX_GPIO_BANK5 */ 966 { .irq = 33 + OMAP_INTC_START, }, /* INT_34XX_GPIO_BANK5 */
967 { .irq = -1 } 967 { .irq = -1 },
968}; 968};
969 969
970static struct omap_hwmod_opt_clk gpio5_opt_clks[] = { 970static struct omap_hwmod_opt_clk gpio5_opt_clks[] = {
@@ -993,8 +993,8 @@ static struct omap_hwmod omap3xxx_gpio5_hwmod = {
993 993
994/* gpio6 */ 994/* gpio6 */
995static struct omap_hwmod_irq_info omap3xxx_gpio6_irqs[] = { 995static struct omap_hwmod_irq_info omap3xxx_gpio6_irqs[] = {
996 { .irq = 34 }, /* INT_34XX_GPIO_BANK6 */ 996 { .irq = 34 + OMAP_INTC_START, }, /* INT_34XX_GPIO_BANK6 */
997 { .irq = -1 } 997 { .irq = -1 },
998}; 998};
999 999
1000static struct omap_hwmod_opt_clk gpio6_opt_clks[] = { 1000static struct omap_hwmod_opt_clk gpio6_opt_clks[] = {
@@ -1098,10 +1098,10 @@ static struct omap_hwmod_opt_clk mcbsp234_opt_clks[] = {
1098 1098
1099/* mcbsp1 */ 1099/* mcbsp1 */
1100static struct omap_hwmod_irq_info omap3xxx_mcbsp1_irqs[] = { 1100static struct omap_hwmod_irq_info omap3xxx_mcbsp1_irqs[] = {
1101 { .name = "common", .irq = 16 }, 1101 { .name = "common", .irq = 16 + OMAP_INTC_START, },
1102 { .name = "tx", .irq = 59 }, 1102 { .name = "tx", .irq = 59 + OMAP_INTC_START, },
1103 { .name = "rx", .irq = 60 }, 1103 { .name = "rx", .irq = 60 + OMAP_INTC_START, },
1104 { .irq = -1 } 1104 { .irq = -1 },
1105}; 1105};
1106 1106
1107static struct omap_hwmod omap3xxx_mcbsp1_hwmod = { 1107static struct omap_hwmod omap3xxx_mcbsp1_hwmod = {
@@ -1125,10 +1125,10 @@ static struct omap_hwmod omap3xxx_mcbsp1_hwmod = {
1125 1125
1126/* mcbsp2 */ 1126/* mcbsp2 */
1127static struct omap_hwmod_irq_info omap3xxx_mcbsp2_irqs[] = { 1127static struct omap_hwmod_irq_info omap3xxx_mcbsp2_irqs[] = {
1128 { .name = "common", .irq = 17 }, 1128 { .name = "common", .irq = 17 + OMAP_INTC_START, },
1129 { .name = "tx", .irq = 62 }, 1129 { .name = "tx", .irq = 62 + OMAP_INTC_START, },
1130 { .name = "rx", .irq = 63 }, 1130 { .name = "rx", .irq = 63 + OMAP_INTC_START, },
1131 { .irq = -1 } 1131 { .irq = -1 },
1132}; 1132};
1133 1133
1134static struct omap_mcbsp_dev_attr omap34xx_mcbsp2_dev_attr = { 1134static struct omap_mcbsp_dev_attr omap34xx_mcbsp2_dev_attr = {
@@ -1157,10 +1157,10 @@ static struct omap_hwmod omap3xxx_mcbsp2_hwmod = {
1157 1157
1158/* mcbsp3 */ 1158/* mcbsp3 */
1159static struct omap_hwmod_irq_info omap3xxx_mcbsp3_irqs[] = { 1159static struct omap_hwmod_irq_info omap3xxx_mcbsp3_irqs[] = {
1160 { .name = "common", .irq = 22 }, 1160 { .name = "common", .irq = 22 + OMAP_INTC_START, },
1161 { .name = "tx", .irq = 89 }, 1161 { .name = "tx", .irq = 89 + OMAP_INTC_START, },
1162 { .name = "rx", .irq = 90 }, 1162 { .name = "rx", .irq = 90 + OMAP_INTC_START, },
1163 { .irq = -1 } 1163 { .irq = -1 },
1164}; 1164};
1165 1165
1166static struct omap_mcbsp_dev_attr omap34xx_mcbsp3_dev_attr = { 1166static struct omap_mcbsp_dev_attr omap34xx_mcbsp3_dev_attr = {
@@ -1189,10 +1189,10 @@ static struct omap_hwmod omap3xxx_mcbsp3_hwmod = {
1189 1189
1190/* mcbsp4 */ 1190/* mcbsp4 */
1191static struct omap_hwmod_irq_info omap3xxx_mcbsp4_irqs[] = { 1191static struct omap_hwmod_irq_info omap3xxx_mcbsp4_irqs[] = {
1192 { .name = "common", .irq = 23 }, 1192 { .name = "common", .irq = 23 + OMAP_INTC_START, },
1193 { .name = "tx", .irq = 54 }, 1193 { .name = "tx", .irq = 54 + OMAP_INTC_START, },
1194 { .name = "rx", .irq = 55 }, 1194 { .name = "rx", .irq = 55 + OMAP_INTC_START, },
1195 { .irq = -1 } 1195 { .irq = -1 },
1196}; 1196};
1197 1197
1198static struct omap_hwmod_dma_info omap3xxx_mcbsp4_sdma_chs[] = { 1198static struct omap_hwmod_dma_info omap3xxx_mcbsp4_sdma_chs[] = {
@@ -1222,10 +1222,10 @@ static struct omap_hwmod omap3xxx_mcbsp4_hwmod = {
1222 1222
1223/* mcbsp5 */ 1223/* mcbsp5 */
1224static struct omap_hwmod_irq_info omap3xxx_mcbsp5_irqs[] = { 1224static struct omap_hwmod_irq_info omap3xxx_mcbsp5_irqs[] = {
1225 { .name = "common", .irq = 27 }, 1225 { .name = "common", .irq = 27 + OMAP_INTC_START, },
1226 { .name = "tx", .irq = 81 }, 1226 { .name = "tx", .irq = 81 + OMAP_INTC_START, },
1227 { .name = "rx", .irq = 82 }, 1227 { .name = "rx", .irq = 82 + OMAP_INTC_START, },
1228 { .irq = -1 } 1228 { .irq = -1 },
1229}; 1229};
1230 1230
1231static struct omap_hwmod_dma_info omap3xxx_mcbsp5_sdma_chs[] = { 1231static struct omap_hwmod_dma_info omap3xxx_mcbsp5_sdma_chs[] = {
@@ -1267,8 +1267,8 @@ static struct omap_hwmod_class omap3xxx_mcbsp_sidetone_hwmod_class = {
1267 1267
1268/* mcbsp2_sidetone */ 1268/* mcbsp2_sidetone */
1269static struct omap_hwmod_irq_info omap3xxx_mcbsp2_sidetone_irqs[] = { 1269static struct omap_hwmod_irq_info omap3xxx_mcbsp2_sidetone_irqs[] = {
1270 { .name = "irq", .irq = 4 }, 1270 { .name = "irq", .irq = 4 + OMAP_INTC_START, },
1271 { .irq = -1 } 1271 { .irq = -1 },
1272}; 1272};
1273 1273
1274static struct omap_hwmod omap3xxx_mcbsp2_sidetone_hwmod = { 1274static struct omap_hwmod omap3xxx_mcbsp2_sidetone_hwmod = {
@@ -1289,8 +1289,8 @@ static struct omap_hwmod omap3xxx_mcbsp2_sidetone_hwmod = {
1289 1289
1290/* mcbsp3_sidetone */ 1290/* mcbsp3_sidetone */
1291static struct omap_hwmod_irq_info omap3xxx_mcbsp3_sidetone_irqs[] = { 1291static struct omap_hwmod_irq_info omap3xxx_mcbsp3_sidetone_irqs[] = {
1292 { .name = "irq", .irq = 5 }, 1292 { .name = "irq", .irq = 5 + OMAP_INTC_START, },
1293 { .irq = -1 } 1293 { .irq = -1 },
1294}; 1294};
1295 1295
1296static struct omap_hwmod omap3xxx_mcbsp3_sidetone_hwmod = { 1296static struct omap_hwmod omap3xxx_mcbsp3_sidetone_hwmod = {
@@ -1352,8 +1352,8 @@ static struct omap_smartreflex_dev_attr sr1_dev_attr = {
1352}; 1352};
1353 1353
1354static struct omap_hwmod_irq_info omap3_smartreflex_mpu_irqs[] = { 1354static struct omap_hwmod_irq_info omap3_smartreflex_mpu_irqs[] = {
1355 { .irq = 18 }, 1355 { .irq = 18 + OMAP_INTC_START, },
1356 { .irq = -1 } 1356 { .irq = -1 },
1357}; 1357};
1358 1358
1359static struct omap_hwmod omap34xx_sr1_hwmod = { 1359static struct omap_hwmod omap34xx_sr1_hwmod = {
@@ -1397,8 +1397,8 @@ static struct omap_smartreflex_dev_attr sr2_dev_attr = {
1397}; 1397};
1398 1398
1399static struct omap_hwmod_irq_info omap3_smartreflex_core_irqs[] = { 1399static struct omap_hwmod_irq_info omap3_smartreflex_core_irqs[] = {
1400 { .irq = 19 }, 1400 { .irq = 19 + OMAP_INTC_START, },
1401 { .irq = -1 } 1401 { .irq = -1 },
1402}; 1402};
1403 1403
1404static struct omap_hwmod omap34xx_sr2_hwmod = { 1404static struct omap_hwmod omap34xx_sr2_hwmod = {
@@ -1458,8 +1458,8 @@ static struct omap_hwmod_class omap3xxx_mailbox_hwmod_class = {
1458}; 1458};
1459 1459
1460static struct omap_hwmod_irq_info omap3xxx_mailbox_irqs[] = { 1460static struct omap_hwmod_irq_info omap3xxx_mailbox_irqs[] = {
1461 { .irq = 26 }, 1461 { .irq = 26 + OMAP_INTC_START, },
1462 { .irq = -1 } 1462 { .irq = -1 },
1463}; 1463};
1464 1464
1465static struct omap_hwmod omap3xxx_mailbox_hwmod = { 1465static struct omap_hwmod omap3xxx_mailbox_hwmod = {
@@ -1549,8 +1549,8 @@ static struct omap_hwmod omap34xx_mcspi2 = {
1549 1549
1550/* mcspi3 */ 1550/* mcspi3 */
1551static struct omap_hwmod_irq_info omap34xx_mcspi3_mpu_irqs[] = { 1551static struct omap_hwmod_irq_info omap34xx_mcspi3_mpu_irqs[] = {
1552 { .name = "irq", .irq = 91 }, /* 91 */ 1552 { .name = "irq", .irq = 91 + OMAP_INTC_START, }, /* 91 */
1553 { .irq = -1 } 1553 { .irq = -1 },
1554}; 1554};
1555 1555
1556static struct omap_hwmod_dma_info omap34xx_mcspi3_sdma_reqs[] = { 1556static struct omap_hwmod_dma_info omap34xx_mcspi3_sdma_reqs[] = {
@@ -1585,8 +1585,8 @@ static struct omap_hwmod omap34xx_mcspi3 = {
1585 1585
1586/* mcspi4 */ 1586/* mcspi4 */
1587static struct omap_hwmod_irq_info omap34xx_mcspi4_mpu_irqs[] = { 1587static struct omap_hwmod_irq_info omap34xx_mcspi4_mpu_irqs[] = {
1588 { .name = "irq", .irq = INT_34XX_SPI4_IRQ }, /* 48 */ 1588 { .name = "irq", .irq = 48 + OMAP_INTC_START, },
1589 { .irq = -1 } 1589 { .irq = -1 },
1590}; 1590};
1591 1591
1592static struct omap_hwmod_dma_info omap34xx_mcspi4_sdma_reqs[] = { 1592static struct omap_hwmod_dma_info omap34xx_mcspi4_sdma_reqs[] = {
@@ -1638,9 +1638,9 @@ static struct omap_hwmod_class usbotg_class = {
1638/* usb_otg_hs */ 1638/* usb_otg_hs */
1639static struct omap_hwmod_irq_info omap3xxx_usbhsotg_mpu_irqs[] = { 1639static struct omap_hwmod_irq_info omap3xxx_usbhsotg_mpu_irqs[] = {
1640 1640
1641 { .name = "mc", .irq = 92 }, 1641 { .name = "mc", .irq = 92 + OMAP_INTC_START, },
1642 { .name = "dma", .irq = 93 }, 1642 { .name = "dma", .irq = 93 + OMAP_INTC_START, },
1643 { .irq = -1 } 1643 { .irq = -1 },
1644}; 1644};
1645 1645
1646static struct omap_hwmod omap3xxx_usbhsotg_hwmod = { 1646static struct omap_hwmod omap3xxx_usbhsotg_hwmod = {
@@ -1670,8 +1670,8 @@ static struct omap_hwmod omap3xxx_usbhsotg_hwmod = {
1670 1670
1671/* usb_otg_hs */ 1671/* usb_otg_hs */
1672static struct omap_hwmod_irq_info am35xx_usbhsotg_mpu_irqs[] = { 1672static struct omap_hwmod_irq_info am35xx_usbhsotg_mpu_irqs[] = {
1673 { .name = "mc", .irq = 71 }, 1673 { .name = "mc", .irq = 71 + OMAP_INTC_START, },
1674 { .irq = -1 } 1674 { .irq = -1 },
1675}; 1675};
1676 1676
1677static struct omap_hwmod_class am35xx_usbotg_class = { 1677static struct omap_hwmod_class am35xx_usbotg_class = {
@@ -1706,8 +1706,8 @@ static struct omap_hwmod_class omap34xx_mmc_class = {
1706/* MMC/SD/SDIO1 */ 1706/* MMC/SD/SDIO1 */
1707 1707
1708static struct omap_hwmod_irq_info omap34xx_mmc1_mpu_irqs[] = { 1708static struct omap_hwmod_irq_info omap34xx_mmc1_mpu_irqs[] = {
1709 { .irq = 83, }, 1709 { .irq = 83 + OMAP_INTC_START, },
1710 { .irq = -1 } 1710 { .irq = -1 },
1711}; 1711};
1712 1712
1713static struct omap_hwmod_dma_info omap34xx_mmc1_sdma_reqs[] = { 1713static struct omap_hwmod_dma_info omap34xx_mmc1_sdma_reqs[] = {
@@ -1773,8 +1773,8 @@ static struct omap_hwmod omap3xxx_es3plus_mmc1_hwmod = {
1773/* MMC/SD/SDIO2 */ 1773/* MMC/SD/SDIO2 */
1774 1774
1775static struct omap_hwmod_irq_info omap34xx_mmc2_mpu_irqs[] = { 1775static struct omap_hwmod_irq_info omap34xx_mmc2_mpu_irqs[] = {
1776 { .irq = INT_24XX_MMC2_IRQ, }, 1776 { .irq = 86 + OMAP_INTC_START, },
1777 { .irq = -1 } 1777 { .irq = -1 },
1778}; 1778};
1779 1779
1780static struct omap_hwmod_dma_info omap34xx_mmc2_sdma_reqs[] = { 1780static struct omap_hwmod_dma_info omap34xx_mmc2_sdma_reqs[] = {
@@ -1834,8 +1834,8 @@ static struct omap_hwmod omap3xxx_es3plus_mmc2_hwmod = {
1834/* MMC/SD/SDIO3 */ 1834/* MMC/SD/SDIO3 */
1835 1835
1836static struct omap_hwmod_irq_info omap34xx_mmc3_mpu_irqs[] = { 1836static struct omap_hwmod_irq_info omap34xx_mmc3_mpu_irqs[] = {
1837 { .irq = 94, }, 1837 { .irq = 94 + OMAP_INTC_START, },
1838 { .irq = -1 } 1838 { .irq = -1 },
1839}; 1839};
1840 1840
1841static struct omap_hwmod_dma_info omap34xx_mmc3_sdma_reqs[] = { 1841static struct omap_hwmod_dma_info omap34xx_mmc3_sdma_reqs[] = {
@@ -1893,9 +1893,9 @@ static struct omap_hwmod_opt_clk omap3xxx_usb_host_hs_opt_clks[] = {
1893}; 1893};
1894 1894
1895static struct omap_hwmod_irq_info omap3xxx_usb_host_hs_irqs[] = { 1895static struct omap_hwmod_irq_info omap3xxx_usb_host_hs_irqs[] = {
1896 { .name = "ohci-irq", .irq = 76 }, 1896 { .name = "ohci-irq", .irq = 76 + OMAP_INTC_START, },
1897 { .name = "ehci-irq", .irq = 77 }, 1897 { .name = "ehci-irq", .irq = 77 + OMAP_INTC_START, },
1898 { .irq = -1 } 1898 { .irq = -1 },
1899}; 1899};
1900 1900
1901static struct omap_hwmod omap3xxx_usb_host_hs_hwmod = { 1901static struct omap_hwmod omap3xxx_usb_host_hs_hwmod = {
@@ -1987,8 +1987,8 @@ static struct omap_hwmod_class omap3xxx_usb_tll_hs_hwmod_class = {
1987}; 1987};
1988 1988
1989static struct omap_hwmod_irq_info omap3xxx_usb_tll_hs_irqs[] = { 1989static struct omap_hwmod_irq_info omap3xxx_usb_tll_hs_irqs[] = {
1990 { .name = "tll-irq", .irq = 78 }, 1990 { .name = "tll-irq", .irq = 78 + OMAP_INTC_START, },
1991 { .irq = -1 } 1991 { .irq = -1 },
1992}; 1992};
1993 1993
1994static struct omap_hwmod omap3xxx_usb_tll_hs_hwmod = { 1994static struct omap_hwmod omap3xxx_usb_tll_hs_hwmod = {
@@ -3214,11 +3214,11 @@ static struct omap_hwmod_ocp_if am35xx_l4_core__mdio = {
3214}; 3214};
3215 3215
3216static struct omap_hwmod_irq_info am35xx_emac_mpu_irqs[] = { 3216static struct omap_hwmod_irq_info am35xx_emac_mpu_irqs[] = {
3217 { .name = "rxthresh", .irq = INT_35XX_EMAC_C0_RXTHRESH_IRQ }, 3217 { .name = "rxthresh", .irq = 67 + OMAP_INTC_START, },
3218 { .name = "rx_pulse", .irq = INT_35XX_EMAC_C0_RX_PULSE_IRQ }, 3218 { .name = "rx_pulse", .irq = 68 + OMAP_INTC_START, },
3219 { .name = "tx_pulse", .irq = INT_35XX_EMAC_C0_TX_PULSE_IRQ }, 3219 { .name = "tx_pulse", .irq = 69 + OMAP_INTC_START },
3220 { .name = "misc_pulse", .irq = INT_35XX_EMAC_C0_MISC_PULSE_IRQ }, 3220 { .name = "misc_pulse", .irq = 70 + OMAP_INTC_START },
3221 { .irq = -1 } 3221 { .irq = -1 },
3222}; 3222};
3223 3223
3224static struct omap_hwmod_class am35xx_emac_class = { 3224static struct omap_hwmod_class am35xx_emac_class = {
diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
index 242aee498ceb..b95244b76a15 100644
--- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
@@ -19,12 +19,11 @@
19 */ 19 */
20 20
21#include <linux/io.h> 21#include <linux/io.h>
22#include <linux/platform_data/gpio-omap.h>
22#include <linux/power/smartreflex.h> 23#include <linux/power/smartreflex.h>
23 24
24#include <plat/omap_hwmod.h> 25#include <plat/omap_hwmod.h>
25#include <plat/cpu.h>
26#include <plat/i2c.h> 26#include <plat/i2c.h>
27#include <plat/gpio.h>
28#include <plat/dma.h> 27#include <plat/dma.h>
29#include <plat/mcspi.h> 28#include <plat/mcspi.h>
30#include <plat/mcbsp.h> 29#include <plat/mcbsp.h>
diff --git a/arch/arm/mach-omap2/omap_hwmod_common_data.h b/arch/arm/mach-omap2/omap_hwmod_common_data.h
index e7e8eeae95e5..dddb677fed68 100644
--- a/arch/arm/mach-omap2/omap_hwmod_common_data.h
+++ b/arch/arm/mach-omap2/omap_hwmod_common_data.h
@@ -16,6 +16,7 @@
16 16
17#include <plat/omap_hwmod.h> 17#include <plat/omap_hwmod.h>
18 18
19#include "common.h"
19#include "display.h" 20#include "display.h"
20 21
21/* Common address space across OMAP2xxx */ 22/* Common address space across OMAP2xxx */
diff --git a/arch/arm/mach-omap2/omap_l3_noc.c b/arch/arm/mach-omap2/omap_l3_noc.c
index d15225ff5c49..f447e02102bb 100644
--- a/arch/arm/mach-omap2/omap_l3_noc.c
+++ b/arch/arm/mach-omap2/omap_l3_noc.c
@@ -28,6 +28,7 @@
28#include <linux/kernel.h> 28#include <linux/kernel.h>
29#include <linux/slab.h> 29#include <linux/slab.h>
30 30
31#include "soc.h"
31#include "omap_l3_noc.h" 32#include "omap_l3_noc.h"
32 33
33/* 34/*
@@ -190,7 +191,7 @@ static int __devinit omap4_l3_probe(struct platform_device *pdev)
190 IRQF_DISABLED, "l3-dbg-irq", l3); 191 IRQF_DISABLED, "l3-dbg-irq", l3);
191 if (ret) { 192 if (ret) {
192 pr_crit("L3: request_irq failed to register for 0x%x\n", 193 pr_crit("L3: request_irq failed to register for 0x%x\n",
193 OMAP44XX_IRQ_L3_DBG); 194 9 + OMAP44XX_IRQ_GIC_START);
194 goto err3; 195 goto err3;
195 } 196 }
196 197
@@ -200,7 +201,7 @@ static int __devinit omap4_l3_probe(struct platform_device *pdev)
200 IRQF_DISABLED, "l3-app-irq", l3); 201 IRQF_DISABLED, "l3-app-irq", l3);
201 if (ret) { 202 if (ret) {
202 pr_crit("L3: request_irq failed to register for 0x%x\n", 203 pr_crit("L3: request_irq failed to register for 0x%x\n",
203 OMAP44XX_IRQ_L3_APP); 204 10 + OMAP44XX_IRQ_GIC_START);
204 goto err4; 205 goto err4;
205 } 206 }
206 207
diff --git a/arch/arm/mach-omap2/omap_phy_internal.c b/arch/arm/mach-omap2/omap_phy_internal.c
index d52651a05daa..593eaea35cec 100644
--- a/arch/arm/mach-omap2/omap_phy_internal.c
+++ b/arch/arm/mach-omap2/omap_phy_internal.c
@@ -29,6 +29,8 @@
29#include <linux/usb.h> 29#include <linux/usb.h>
30 30
31#include <plat/usb.h> 31#include <plat/usb.h>
32
33#include "soc.h"
32#include "control.h" 34#include "control.h"
33 35
34/* OMAP control module register for UTMI PHY */ 36/* OMAP control module register for UTMI PHY */
diff --git a/arch/arm/mach-omap2/opp2420_data.c b/arch/arm/mach-omap2/opp2420_data.c
index 5037e76e4e23..a9e8cf21705d 100644
--- a/arch/arm/mach-omap2/opp2420_data.c
+++ b/arch/arm/mach-omap2/opp2420_data.c
@@ -28,7 +28,7 @@
28 * http://repository.maemo.org/pool/diablo/free/k/kernel-source-diablo/ 28 * http://repository.maemo.org/pool/diablo/free/k/kernel-source-diablo/
29 */ 29 */
30 30
31#include <plat/hardware.h> 31#include <linux/kernel.h>
32 32
33#include "opp2xxx.h" 33#include "opp2xxx.h"
34#include "sdrc.h" 34#include "sdrc.h"
diff --git a/arch/arm/mach-omap2/opp2430_data.c b/arch/arm/mach-omap2/opp2430_data.c
index 750805c528d8..0e75ec3e114b 100644
--- a/arch/arm/mach-omap2/opp2430_data.c
+++ b/arch/arm/mach-omap2/opp2430_data.c
@@ -26,7 +26,7 @@
26 * This is technically part of the OMAP2xxx clock code. 26 * This is technically part of the OMAP2xxx clock code.
27 */ 27 */
28 28
29#include <plat/hardware.h> 29#include <linux/kernel.h>
30 30
31#include "opp2xxx.h" 31#include "opp2xxx.h"
32#include "sdrc.h" 32#include "sdrc.h"
diff --git a/arch/arm/mach-omap2/opp3xxx_data.c b/arch/arm/mach-omap2/opp3xxx_data.c
index d95f3f945d4a..75cef5f67a8a 100644
--- a/arch/arm/mach-omap2/opp3xxx_data.c
+++ b/arch/arm/mach-omap2/opp3xxx_data.c
@@ -19,8 +19,6 @@
19 */ 19 */
20#include <linux/module.h> 20#include <linux/module.h>
21 21
22#include <plat/cpu.h>
23
24#include "control.h" 22#include "control.h"
25#include "omap_opp_data.h" 23#include "omap_opp_data.h"
26#include "pm.h" 24#include "pm.h"
diff --git a/arch/arm/mach-omap2/opp4xxx_data.c b/arch/arm/mach-omap2/opp4xxx_data.c
index c95415da23c2..a9fd6d5fe79e 100644
--- a/arch/arm/mach-omap2/opp4xxx_data.c
+++ b/arch/arm/mach-omap2/opp4xxx_data.c
@@ -20,8 +20,7 @@
20 */ 20 */
21#include <linux/module.h> 21#include <linux/module.h>
22 22
23#include <plat/cpu.h> 23#include "soc.h"
24
25#include "control.h" 24#include "control.h"
26#include "omap_opp_data.h" 25#include "omap_opp_data.h"
27#include "pm.h" 26#include "pm.h"
diff --git a/arch/arm/mach-omap2/pm-debug.c b/arch/arm/mach-omap2/pm-debug.c
index 814bcd901596..3e1345fc0713 100644
--- a/arch/arm/mach-omap2/pm-debug.c
+++ b/arch/arm/mach-omap2/pm-debug.c
@@ -28,7 +28,6 @@
28#include <linux/slab.h> 28#include <linux/slab.h>
29 29
30#include <plat/clock.h> 30#include <plat/clock.h>
31#include <plat/board.h>
32#include "powerdomain.h" 31#include "powerdomain.h"
33#include "clockdomain.h" 32#include "clockdomain.h"
34#include <plat/dmtimer.h> 33#include <plat/dmtimer.h>
diff --git a/arch/arm/mach-omap2/pm24xx.c b/arch/arm/mach-omap2/pm24xx.c
index 2edeffc923a6..8af6cd6ac331 100644
--- a/arch/arm/mach-omap2/pm24xx.c
+++ b/arch/arm/mach-omap2/pm24xx.c
@@ -29,6 +29,7 @@
29#include <linux/irq.h> 29#include <linux/irq.h>
30#include <linux/time.h> 30#include <linux/time.h>
31#include <linux/gpio.h> 31#include <linux/gpio.h>
32#include <linux/platform_data/gpio-omap.h>
32 33
33#include <asm/mach/time.h> 34#include <asm/mach/time.h>
34#include <asm/mach/irq.h> 35#include <asm/mach/irq.h>
@@ -38,9 +39,6 @@
38#include <plat/clock.h> 39#include <plat/clock.h>
39#include <plat/sram.h> 40#include <plat/sram.h>
40#include <plat/dma.h> 41#include <plat/dma.h>
41#include <plat/board.h>
42
43#include <mach/irqs.h>
44 42
45#include "common.h" 43#include "common.h"
46#include "prm2xxx_3xxx.h" 44#include "prm2xxx_3xxx.h"
@@ -352,16 +350,6 @@ int __init omap2_pm_init(void)
352 350
353 prcm_setup_regs(); 351 prcm_setup_regs();
354 352
355 /* Hack to prevent MPU retention when STI console is enabled. */
356 {
357 const struct omap_sti_console_config *sti;
358
359 sti = omap_get_config(OMAP_TAG_STI_CONSOLE,
360 struct omap_sti_console_config);
361 if (sti != NULL && sti->enable)
362 sti_console_enabled = 1;
363 }
364
365 /* 353 /*
366 * We copy the assembler sleep/wakeup routines to SRAM. 354 * We copy the assembler sleep/wakeup routines to SRAM.
367 * These routines need to be in SRAM as that's the only 355 * These routines need to be in SRAM as that's the only
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
index 05bd8f02723f..90480f759974 100644
--- a/arch/arm/mach-omap2/pm34xx.c
+++ b/arch/arm/mach-omap2/pm34xx.c
@@ -28,6 +28,8 @@
28#include <linux/clk.h> 28#include <linux/clk.h>
29#include <linux/delay.h> 29#include <linux/delay.h>
30#include <linux/slab.h> 30#include <linux/slab.h>
31#include <linux/platform_data/gpio-omap.h>
32
31#include <trace/events/power.h> 33#include <trace/events/power.h>
32 34
33#include <asm/suspend.h> 35#include <asm/suspend.h>
diff --git a/arch/arm/mach-omap2/powerdomain.c b/arch/arm/mach-omap2/powerdomain.c
index 69b36e185e9b..ca5be83d5019 100644
--- a/arch/arm/mach-omap2/powerdomain.c
+++ b/arch/arm/mach-omap2/powerdomain.c
@@ -28,11 +28,13 @@
28#include "prm44xx.h" 28#include "prm44xx.h"
29 29
30#include <asm/cpu.h> 30#include <asm/cpu.h>
31#include <plat/cpu.h> 31
32#include <plat/prcm.h>
33
32#include "powerdomain.h" 34#include "powerdomain.h"
33#include "clockdomain.h" 35#include "clockdomain.h"
34#include <plat/prcm.h>
35 36
37#include "soc.h"
36#include "pm.h" 38#include "pm.h"
37 39
38#define PWRDM_TRACE_STATES_FLAG (1<<31) 40#define PWRDM_TRACE_STATES_FLAG (1<<31)
diff --git a/arch/arm/mach-omap2/powerdomains3xxx_data.c b/arch/arm/mach-omap2/powerdomains3xxx_data.c
index bb883e463078..8b23d234fb55 100644
--- a/arch/arm/mach-omap2/powerdomains3xxx_data.c
+++ b/arch/arm/mach-omap2/powerdomains3xxx_data.c
@@ -15,11 +15,9 @@
15#include <linux/init.h> 15#include <linux/init.h>
16#include <linux/bug.h> 16#include <linux/bug.h>
17 17
18#include <plat/cpu.h> 18#include "soc.h"
19
20#include "powerdomain.h" 19#include "powerdomain.h"
21#include "powerdomains2xxx_3xxx_data.h" 20#include "powerdomains2xxx_3xxx_data.h"
22
23#include "prcm-common.h" 21#include "prcm-common.h"
24#include "prm2xxx_3xxx.h" 22#include "prm2xxx_3xxx.h"
25#include "prm-regbits-34xx.h" 23#include "prm-regbits-34xx.h"
diff --git a/arch/arm/mach-omap2/prcm.c b/arch/arm/mach-omap2/prcm.c
index 053e24ed3c48..9c9d23c10205 100644
--- a/arch/arm/mach-omap2/prcm.c
+++ b/arch/arm/mach-omap2/prcm.c
@@ -27,7 +27,6 @@
27 27
28#include "common.h" 28#include "common.h"
29#include <plat/prcm.h> 29#include <plat/prcm.h>
30#include <plat/irqs.h>
31 30
32#include "clock.h" 31#include "clock.h"
33#include "clock2xxx.h" 32#include "clock2xxx.h"
diff --git a/arch/arm/mach-omap2/prm2xxx_3xxx.c b/arch/arm/mach-omap2/prm2xxx_3xxx.c
index a0309dea6794..9529984d8d2b 100644
--- a/arch/arm/mach-omap2/prm2xxx_3xxx.c
+++ b/arch/arm/mach-omap2/prm2xxx_3xxx.c
@@ -17,11 +17,10 @@
17#include <linux/io.h> 17#include <linux/io.h>
18#include <linux/irq.h> 18#include <linux/irq.h>
19 19
20#include "common.h"
21#include <plat/cpu.h>
22#include <plat/prcm.h> 20#include <plat/prcm.h>
23#include <plat/irqs.h>
24 21
22#include "soc.h"
23#include "common.h"
25#include "vp.h" 24#include "vp.h"
26 25
27#include "prm2xxx_3xxx.h" 26#include "prm2xxx_3xxx.h"
@@ -40,7 +39,7 @@ static struct omap_prcm_irq_setup omap3_prcm_irq_setup = {
40 .nr_regs = 1, 39 .nr_regs = 1,
41 .irqs = omap3_prcm_irqs, 40 .irqs = omap3_prcm_irqs,
42 .nr_irqs = ARRAY_SIZE(omap3_prcm_irqs), 41 .nr_irqs = ARRAY_SIZE(omap3_prcm_irqs),
43 .irq = INT_34XX_PRCM_MPU_IRQ, 42 .irq = 11 + OMAP_INTC_START,
44 .read_pending_irqs = &omap3xxx_prm_read_pending_irqs, 43 .read_pending_irqs = &omap3xxx_prm_read_pending_irqs,
45 .ocp_barrier = &omap3xxx_prm_ocp_barrier, 44 .ocp_barrier = &omap3xxx_prm_ocp_barrier,
46 .save_and_clear_irqen = &omap3xxx_prm_save_and_clear_irqen, 45 .save_and_clear_irqen = &omap3xxx_prm_save_and_clear_irqen,
diff --git a/arch/arm/mach-omap2/prm44xx.c b/arch/arm/mach-omap2/prm44xx.c
index bb727c2d9337..f0c4d5f4a174 100644
--- a/arch/arm/mach-omap2/prm44xx.c
+++ b/arch/arm/mach-omap2/prm44xx.c
@@ -17,10 +17,9 @@
17#include <linux/err.h> 17#include <linux/err.h>
18#include <linux/io.h> 18#include <linux/io.h>
19 19
20#include <plat/cpu.h>
21#include <plat/irqs.h>
22#include <plat/prcm.h> 20#include <plat/prcm.h>
23 21
22#include "soc.h"
24#include "iomap.h" 23#include "iomap.h"
25#include "common.h" 24#include "common.h"
26#include "vp.h" 25#include "vp.h"
@@ -40,7 +39,7 @@ static struct omap_prcm_irq_setup omap4_prcm_irq_setup = {
40 .nr_regs = 2, 39 .nr_regs = 2,
41 .irqs = omap4_prcm_irqs, 40 .irqs = omap4_prcm_irqs,
42 .nr_irqs = ARRAY_SIZE(omap4_prcm_irqs), 41 .nr_irqs = ARRAY_SIZE(omap4_prcm_irqs),
43 .irq = OMAP44XX_IRQ_PRCM, 42 .irq = 11 + OMAP44XX_IRQ_GIC_START,
44 .read_pending_irqs = &omap44xx_prm_read_pending_irqs, 43 .read_pending_irqs = &omap44xx_prm_read_pending_irqs,
45 .ocp_barrier = &omap44xx_prm_ocp_barrier, 44 .ocp_barrier = &omap44xx_prm_ocp_barrier,
46 .save_and_clear_irqen = &omap44xx_prm_save_and_clear_irqen, 45 .save_and_clear_irqen = &omap44xx_prm_save_and_clear_irqen,
diff --git a/arch/arm/mach-omap2/prm_common.c b/arch/arm/mach-omap2/prm_common.c
index 03b126d9ad94..6b4d332be2f6 100644
--- a/arch/arm/mach-omap2/prm_common.c
+++ b/arch/arm/mach-omap2/prm_common.c
@@ -26,7 +26,6 @@
26 26
27#include <plat/common.h> 27#include <plat/common.h>
28#include <plat/prcm.h> 28#include <plat/prcm.h>
29#include <plat/irqs.h>
30 29
31#include "prm2xxx_3xxx.h" 30#include "prm2xxx_3xxx.h"
32#include "prm44xx.h" 31#include "prm44xx.h"
diff --git a/arch/arm/mach-omap2/sdrc2xxx.c b/arch/arm/mach-omap2/sdrc2xxx.c
index 1133bb2f632b..73e55e485329 100644
--- a/arch/arm/mach-omap2/sdrc2xxx.c
+++ b/arch/arm/mach-omap2/sdrc2xxx.c
@@ -24,11 +24,11 @@
24#include <linux/clk.h> 24#include <linux/clk.h>
25#include <linux/io.h> 25#include <linux/io.h>
26 26
27#include <plat/hardware.h>
28#include <plat/clock.h> 27#include <plat/clock.h>
29#include <plat/sram.h> 28#include <plat/sram.h>
30#include <plat/sdrc.h> 29#include <plat/sdrc.h>
31 30
31#include "soc.h"
32#include "iomap.h" 32#include "iomap.h"
33#include "common.h" 33#include "common.h"
34#include "prm2xxx_3xxx.h" 34#include "prm2xxx_3xxx.h"
diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
index c1b93c752d70..7ca266e987f6 100644
--- a/arch/arm/mach-omap2/serial.c
+++ b/arch/arm/mach-omap2/serial.c
@@ -29,11 +29,11 @@
29 29
30#include <plat/omap-serial.h> 30#include <plat/omap-serial.h>
31#include "common.h" 31#include "common.h"
32#include <plat/board.h>
33#include <plat/dma.h> 32#include <plat/dma.h>
34#include <plat/omap_hwmod.h> 33#include <plat/omap_hwmod.h>
35#include <plat/omap_device.h> 34#include <plat/omap_device.h>
36#include <plat/omap-pm.h> 35#include <plat/omap-pm.h>
36#include <plat/serial.h>
37 37
38#include "prm2xxx_3xxx.h" 38#include "prm2xxx_3xxx.h"
39#include "pm.h" 39#include "pm.h"
@@ -81,8 +81,9 @@ static struct omap_uart_port_info omap_serial_default_info[] __initdata = {
81}; 81};
82 82
83#ifdef CONFIG_PM 83#ifdef CONFIG_PM
84static void omap_uart_enable_wakeup(struct platform_device *pdev, bool enable) 84static void omap_uart_enable_wakeup(struct device *dev, bool enable)
85{ 85{
86 struct platform_device *pdev = to_platform_device(dev);
86 struct omap_device *od = to_omap_device(pdev); 87 struct omap_device *od = to_omap_device(pdev);
87 88
88 if (!od) 89 if (!od)
@@ -99,15 +100,17 @@ static void omap_uart_enable_wakeup(struct platform_device *pdev, bool enable)
99 * in Smartidle Mode When Configured for DMA Operations. 100 * in Smartidle Mode When Configured for DMA Operations.
100 * WA: configure uart in force idle mode. 101 * WA: configure uart in force idle mode.
101 */ 102 */
102static void omap_uart_set_noidle(struct platform_device *pdev) 103static void omap_uart_set_noidle(struct device *dev)
103{ 104{
105 struct platform_device *pdev = to_platform_device(dev);
104 struct omap_device *od = to_omap_device(pdev); 106 struct omap_device *od = to_omap_device(pdev);
105 107
106 omap_hwmod_set_slave_idlemode(od->hwmods[0], HWMOD_IDLEMODE_NO); 108 omap_hwmod_set_slave_idlemode(od->hwmods[0], HWMOD_IDLEMODE_NO);
107} 109}
108 110
109static void omap_uart_set_smartidle(struct platform_device *pdev) 111static void omap_uart_set_smartidle(struct device *dev)
110{ 112{
113 struct platform_device *pdev = to_platform_device(dev);
111 struct omap_device *od = to_omap_device(pdev); 114 struct omap_device *od = to_omap_device(pdev);
112 u8 idlemode; 115 u8 idlemode;
113 116
@@ -120,10 +123,10 @@ static void omap_uart_set_smartidle(struct platform_device *pdev)
120} 123}
121 124
122#else 125#else
123static void omap_uart_enable_wakeup(struct platform_device *pdev, bool enable) 126static void omap_uart_enable_wakeup(struct device *dev, bool enable)
124{} 127{}
125static void omap_uart_set_noidle(struct platform_device *pdev) {} 128static void omap_uart_set_noidle(struct device *dev) {}
126static void omap_uart_set_smartidle(struct platform_device *pdev) {} 129static void omap_uart_set_smartidle(struct device *dev) {}
127#endif /* CONFIG_PM */ 130#endif /* CONFIG_PM */
128 131
129#ifdef CONFIG_OMAP_MUX 132#ifdef CONFIG_OMAP_MUX
@@ -304,6 +307,9 @@ void __init omap_serial_init_port(struct omap_board_data *bdata,
304 omap_up.dma_rx_timeout = info->dma_rx_timeout; 307 omap_up.dma_rx_timeout = info->dma_rx_timeout;
305 omap_up.dma_rx_poll_rate = info->dma_rx_poll_rate; 308 omap_up.dma_rx_poll_rate = info->dma_rx_poll_rate;
306 omap_up.autosuspend_timeout = info->autosuspend_timeout; 309 omap_up.autosuspend_timeout = info->autosuspend_timeout;
310 omap_up.DTR_gpio = info->DTR_gpio;
311 omap_up.DTR_inverted = info->DTR_inverted;
312 omap_up.DTR_present = info->DTR_present;
307 313
308 pdata = &omap_up; 314 pdata = &omap_up;
309 pdata_size = sizeof(struct omap_uart_port_info); 315 pdata_size = sizeof(struct omap_uart_port_info);
diff --git a/arch/arm/mach-omap2/sleep24xx.S b/arch/arm/mach-omap2/sleep24xx.S
index d4bf904d84ab..ce0ccd26efbd 100644
--- a/arch/arm/mach-omap2/sleep24xx.S
+++ b/arch/arm/mach-omap2/sleep24xx.S
@@ -28,8 +28,7 @@
28#include <linux/linkage.h> 28#include <linux/linkage.h>
29#include <asm/assembler.h> 29#include <asm/assembler.h>
30 30
31#include <plat/omap24xx.h> 31#include "omap24xx.h"
32
33#include "sdrc.h" 32#include "sdrc.h"
34 33
35/* First address of reserved address space? apparently valid for OMAP2 & 3 */ 34/* First address of reserved address space? apparently valid for OMAP2 & 3 */
diff --git a/arch/arm/mach-omap2/sleep34xx.S b/arch/arm/mach-omap2/sleep34xx.S
index 1f62f23673fb..506987979c1c 100644
--- a/arch/arm/mach-omap2/sleep34xx.S
+++ b/arch/arm/mach-omap2/sleep34xx.S
@@ -26,9 +26,9 @@
26 26
27#include <asm/assembler.h> 27#include <asm/assembler.h>
28 28
29#include <plat/hardware.h>
30#include <plat/sram.h> 29#include <plat/sram.h>
31 30
31#include "omap34xx.h"
32#include "iomap.h" 32#include "iomap.h"
33#include "cm2xxx_3xxx.h" 33#include "cm2xxx_3xxx.h"
34#include "prm2xxx_3xxx.h" 34#include "prm2xxx_3xxx.h"
diff --git a/arch/arm/mach-omap2/sleep44xx.S b/arch/arm/mach-omap2/sleep44xx.S
index 91e71d8f46f0..b7d8ead4b86a 100644
--- a/arch/arm/mach-omap2/sleep44xx.S
+++ b/arch/arm/mach-omap2/sleep44xx.S
@@ -14,10 +14,10 @@
14#include <asm/memory.h> 14#include <asm/memory.h>
15#include <asm/hardware/cache-l2x0.h> 15#include <asm/hardware/cache-l2x0.h>
16 16
17#include <plat/omap44xx.h>
18#include <mach/omap-secure.h> 17#include <mach/omap-secure.h>
19 18
20#include "common.h" 19#include "common.h"
20#include "omap44xx.h"
21#include "omap4-sar-layout.h" 21#include "omap4-sar-layout.h"
22 22
23#if defined(CONFIG_SMP) && defined(CONFIG_PM) 23#if defined(CONFIG_SMP) && defined(CONFIG_PM)
diff --git a/arch/arm/mach-omap2/soc.h b/arch/arm/mach-omap2/soc.h
new file mode 100644
index 000000000000..fc9b96daf851
--- /dev/null
+++ b/arch/arm/mach-omap2/soc.h
@@ -0,0 +1,7 @@
1#include <plat/cpu.h>
2#include "omap24xx.h"
3#include "omap34xx.h"
4#include "omap44xx.h"
5#include "ti81xx.h"
6#include "am33xx.h"
7#include "omap54xx.h"
diff --git a/arch/arm/mach-omap2/sram242x.S b/arch/arm/mach-omap2/sram242x.S
index ee0bfcc1410f..8f7326cd435b 100644
--- a/arch/arm/mach-omap2/sram242x.S
+++ b/arch/arm/mach-omap2/sram242x.S
@@ -32,8 +32,7 @@
32 32
33#include <asm/assembler.h> 33#include <asm/assembler.h>
34 34
35#include <mach/hardware.h> 35#include "soc.h"
36
37#include "iomap.h" 36#include "iomap.h"
38#include "prm2xxx_3xxx.h" 37#include "prm2xxx_3xxx.h"
39#include "cm2xxx_3xxx.h" 38#include "cm2xxx_3xxx.h"
diff --git a/arch/arm/mach-omap2/sram243x.S b/arch/arm/mach-omap2/sram243x.S
index d4d39ef04769..b140d6578529 100644
--- a/arch/arm/mach-omap2/sram243x.S
+++ b/arch/arm/mach-omap2/sram243x.S
@@ -32,8 +32,7 @@
32 32
33#include <asm/assembler.h> 33#include <asm/assembler.h>
34 34
35#include <mach/hardware.h> 35#include "soc.h"
36
37#include "iomap.h" 36#include "iomap.h"
38#include "prm2xxx_3xxx.h" 37#include "prm2xxx_3xxx.h"
39#include "cm2xxx_3xxx.h" 38#include "cm2xxx_3xxx.h"
diff --git a/arch/arm/mach-omap2/sram34xx.S b/arch/arm/mach-omap2/sram34xx.S
index df5a21322b0a..2d0ceaa23fb8 100644
--- a/arch/arm/mach-omap2/sram34xx.S
+++ b/arch/arm/mach-omap2/sram34xx.S
@@ -29,8 +29,7 @@
29 29
30#include <asm/assembler.h> 30#include <asm/assembler.h>
31 31
32#include <mach/hardware.h> 32#include "soc.h"
33
34#include "iomap.h" 33#include "iomap.h"
35#include "sdrc.h" 34#include "sdrc.h"
36#include "cm2xxx_3xxx.h" 35#include "cm2xxx_3xxx.h"
diff --git a/arch/arm/mach-omap2/ti81xx.h b/arch/arm/mach-omap2/ti81xx.h
new file mode 100644
index 000000000000..8f9843f78422
--- /dev/null
+++ b/arch/arm/mach-omap2/ti81xx.h
@@ -0,0 +1,27 @@
1/*
2 * This file contains the address data for various TI81XX modules.
3 *
4 * Copyright (C) 2010 Texas Instruments, Inc. - http://www.ti.com/
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License as
8 * published by the Free Software Foundation version 2.
9 *
10 * This program is distributed "as is" WITHOUT ANY WARRANTY of any
11 * kind, whether express or implied; without even the implied warranty
12 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 */
15
16#ifndef __ASM_ARCH_TI81XX_H
17#define __ASM_ARCH_TI81XX_H
18
19#define L4_SLOW_TI81XX_BASE 0x48000000
20
21#define TI81XX_SCM_BASE 0x48140000
22#define TI81XX_CTRL_BASE TI81XX_SCM_BASE
23#define TI81XX_PRCM_BASE 0x48180000
24
25#define TI81XX_ARM_INTC_BASE 0x48200000
26
27#endif /* __ASM_ARCH_TI81XX_H */
diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
index 2ff6d41ec6c6..25cbe73b0cd7 100644
--- a/arch/arm/mach-omap2/timer.c
+++ b/arch/arm/mach-omap2/timer.c
@@ -38,14 +38,16 @@
38#include <linux/slab.h> 38#include <linux/slab.h>
39 39
40#include <asm/mach/time.h> 40#include <asm/mach/time.h>
41#include <plat/dmtimer.h>
42#include <asm/smp_twd.h> 41#include <asm/smp_twd.h>
43#include <asm/sched_clock.h> 42#include <asm/sched_clock.h>
44#include "common.h" 43
45#include <plat/omap_hwmod.h> 44#include <plat/omap_hwmod.h>
46#include <plat/omap_device.h> 45#include <plat/omap_device.h>
46#include <plat/dmtimer.h>
47#include <plat/omap-pm.h> 47#include <plat/omap-pm.h>
48 48
49#include "soc.h"
50#include "common.h"
49#include "powerdomain.h" 51#include "powerdomain.h"
50 52
51/* Parent clocks, eventually these will come from the clock framework */ 53/* Parent clocks, eventually these will come from the clock framework */
@@ -373,8 +375,7 @@ OMAP_SYS_TIMER(3_am33xx)
373#ifdef CONFIG_ARCH_OMAP4 375#ifdef CONFIG_ARCH_OMAP4
374#ifdef CONFIG_LOCAL_TIMERS 376#ifdef CONFIG_LOCAL_TIMERS
375static DEFINE_TWD_LOCAL_TIMER(twd_local_timer, 377static DEFINE_TWD_LOCAL_TIMER(twd_local_timer,
376 OMAP44XX_LOCAL_TWD_BASE, 378 OMAP44XX_LOCAL_TWD_BASE, 29 + OMAP_INTC_START);
377 OMAP44XX_IRQ_LOCALTIMER);
378#endif 379#endif
379 380
380static void __init omap4_timer_init(void) 381static void __init omap4_timer_init(void)
diff --git a/arch/arm/mach-omap2/twl-common.c b/arch/arm/mach-omap2/twl-common.c
index db5ff6642375..99be94e94547 100644
--- a/arch/arm/mach-omap2/twl-common.c
+++ b/arch/arm/mach-omap2/twl-common.c
@@ -29,6 +29,7 @@
29#include <plat/i2c.h> 29#include <plat/i2c.h>
30#include <plat/usb.h> 30#include <plat/usb.h>
31 31
32#include "soc.h"
32#include "twl-common.h" 33#include "twl-common.h"
33#include "pm.h" 34#include "pm.h"
34#include "voltage.h" 35#include "voltage.h"
@@ -84,7 +85,7 @@ void __init omap4_pmic_init(const char *pmic_type,
84 omap_mux_init_signal("sys_nirq1", OMAP_PIN_INPUT_PULLUP | OMAP_PIN_OFF_WAKEUPENABLE); 85 omap_mux_init_signal("sys_nirq1", OMAP_PIN_INPUT_PULLUP | OMAP_PIN_OFF_WAKEUPENABLE);
85 strncpy(omap4_i2c1_board_info[0].type, pmic_type, 86 strncpy(omap4_i2c1_board_info[0].type, pmic_type,
86 sizeof(omap4_i2c1_board_info[0].type)); 87 sizeof(omap4_i2c1_board_info[0].type));
87 omap4_i2c1_board_info[0].irq = OMAP44XX_IRQ_SYS_1N; 88 omap4_i2c1_board_info[0].irq = 7 + OMAP44XX_IRQ_GIC_START;
88 omap4_i2c1_board_info[0].platform_data = pmic_data; 89 omap4_i2c1_board_info[0].platform_data = pmic_data;
89 90
90 /* TWL6040 audio IC part */ 91 /* TWL6040 audio IC part */
diff --git a/arch/arm/mach-omap2/twl-common.h b/arch/arm/mach-omap2/twl-common.h
index 8fe71cfd002c..d109c09ef34b 100644
--- a/arch/arm/mach-omap2/twl-common.h
+++ b/arch/arm/mach-omap2/twl-common.h
@@ -1,7 +1,7 @@
1#ifndef __OMAP_PMIC_COMMON__ 1#ifndef __OMAP_PMIC_COMMON__
2#define __OMAP_PMIC_COMMON__ 2#define __OMAP_PMIC_COMMON__
3 3
4#include <plat/irqs.h> 4#include "common.h"
5 5
6#define TWL_COMMON_PDATA_USB (1 << 0) 6#define TWL_COMMON_PDATA_USB (1 << 0)
7#define TWL_COMMON_PDATA_BCI (1 << 1) 7#define TWL_COMMON_PDATA_BCI (1 << 1)
@@ -40,13 +40,13 @@ void omap_pmic_late_init(void);
40static inline void omap2_pmic_init(const char *pmic_type, 40static inline void omap2_pmic_init(const char *pmic_type,
41 struct twl4030_platform_data *pmic_data) 41 struct twl4030_platform_data *pmic_data)
42{ 42{
43 omap_pmic_init(2, 2600, pmic_type, INT_24XX_SYS_NIRQ, pmic_data); 43 omap_pmic_init(2, 2600, pmic_type, 7 + OMAP_INTC_START, pmic_data);
44} 44}
45 45
46static inline void omap3_pmic_init(const char *pmic_type, 46static inline void omap3_pmic_init(const char *pmic_type,
47 struct twl4030_platform_data *pmic_data) 47 struct twl4030_platform_data *pmic_data)
48{ 48{
49 omap_pmic_init(1, 2600, pmic_type, INT_34XX_SYS_NIRQ, pmic_data); 49 omap_pmic_init(1, 2600, pmic_type, 7 + OMAP_INTC_START, pmic_data);
50} 50}
51 51
52void omap4_pmic_init(const char *pmic_type, 52void omap4_pmic_init(const char *pmic_type,
diff --git a/arch/arm/mach-omap2/usb-host.c b/arch/arm/mach-omap2/usb-host.c
index dde8a11f47d5..ac95daaa4702 100644
--- a/arch/arm/mach-omap2/usb-host.c
+++ b/arch/arm/mach-omap2/usb-host.c
@@ -25,8 +25,6 @@
25 25
26#include <asm/io.h> 26#include <asm/io.h>
27 27
28#include <mach/hardware.h>
29#include <mach/irqs.h>
30#include <plat/usb.h> 28#include <plat/usb.h>
31#include <plat/omap_device.h> 29#include <plat/omap_device.h>
32 30
diff --git a/arch/arm/mach-omap2/usb-musb.c b/arch/arm/mach-omap2/usb-musb.c
index c4a576856661..89150b2435e5 100644
--- a/arch/arm/mach-omap2/usb-musb.c
+++ b/arch/arm/mach-omap2/usb-musb.c
@@ -23,14 +23,13 @@
23#include <linux/clk.h> 23#include <linux/clk.h>
24#include <linux/dma-mapping.h> 24#include <linux/dma-mapping.h>
25#include <linux/io.h> 25#include <linux/io.h>
26
27#include <linux/usb/musb.h> 26#include <linux/usb/musb.h>
28 27
29#include <mach/hardware.h>
30#include <mach/irqs.h>
31#include <mach/am35xx.h>
32#include <plat/usb.h> 28#include <plat/usb.h>
33#include <plat/omap_device.h> 29#include <plat/omap_device.h>
30
31#include <mach/am35xx.h>
32
34#include "mux.h" 33#include "mux.h"
35 34
36static struct musb_hdrc_config musb_config = { 35static struct musb_hdrc_config musb_config = {
diff --git a/arch/arm/mach-omap2/vc.c b/arch/arm/mach-omap2/vc.c
index 84da34f9a7cf..b451f3c13292 100644
--- a/arch/arm/mach-omap2/vc.c
+++ b/arch/arm/mach-omap2/vc.c
@@ -12,8 +12,7 @@
12#include <linux/init.h> 12#include <linux/init.h>
13#include <linux/bug.h> 13#include <linux/bug.h>
14 14
15#include <plat/cpu.h> 15#include "soc.h"
16
17#include "voltage.h" 16#include "voltage.h"
18#include "vc.h" 17#include "vc.h"
19#include "prm-regbits-34xx.h" 18#include "prm-regbits-34xx.h"
diff --git a/arch/arm/mach-omap2/voltagedomains3xxx_data.c b/arch/arm/mach-omap2/voltagedomains3xxx_data.c
index d0103c80d040..63afbfed3cbc 100644
--- a/arch/arm/mach-omap2/voltagedomains3xxx_data.c
+++ b/arch/arm/mach-omap2/voltagedomains3xxx_data.c
@@ -18,9 +18,8 @@
18#include <linux/err.h> 18#include <linux/err.h>
19#include <linux/init.h> 19#include <linux/init.h>
20 20
21#include "soc.h"
21#include "common.h" 22#include "common.h"
22#include <plat/cpu.h>
23
24#include "prm-regbits-34xx.h" 23#include "prm-regbits-34xx.h"
25#include "omap_opp_data.h" 24#include "omap_opp_data.h"
26#include "voltage.h" 25#include "voltage.h"