aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/Kconfig2
-rw-r--r--arch/arm/mach-mmp/Makefile5
-rw-r--r--arch/arm/mach-mmp/include/mach/addr-map.h12
-rw-r--r--arch/arm/mach-mmp/include/mach/pm-mmp2.h61
-rw-r--r--arch/arm/mach-mmp/include/mach/pm-pxa910.h77
-rw-r--r--arch/arm/mach-mmp/include/mach/regs-apbc.h3
-rw-r--r--arch/arm/mach-mmp/include/mach/regs-apmu.h3
-rw-r--r--arch/arm/mach-mmp/irq.c13
-rw-r--r--arch/arm/mach-mmp/pm-mmp2.c264
-rw-r--r--arch/arm/mach-mmp/pm-pxa910.c285
-rw-r--r--arch/arm/mach-mmp/ttc_dkb.c11
-rw-r--r--arch/arm/mach-omap2/Makefile13
-rw-r--r--arch/arm/mach-omap2/clock.c2
-rw-r--r--arch/arm/mach-omap2/clock3xxx_data.c25
-rw-r--r--arch/arm/mach-omap2/clock44xx_data.c11
-rw-r--r--arch/arm/mach-omap2/clockdomain.c7
-rw-r--r--arch/arm/mach-omap2/clockdomain44xx.c6
-rw-r--r--arch/arm/mach-omap2/clockdomains2xxx_3xxx_data.c10
-rw-r--r--arch/arm/mach-omap2/clockdomains3xxx_data.c6
-rw-r--r--arch/arm/mach-omap2/clockdomains44xx_data.c2
-rw-r--r--arch/arm/mach-omap2/clockdomains_common_data.c24
-rw-r--r--arch/arm/mach-omap2/cm-regbits-34xx.h4
-rw-r--r--arch/arm/mach-omap2/cminst44xx.c28
-rw-r--r--arch/arm/mach-omap2/common.c1
-rw-r--r--arch/arm/mach-omap2/common.h1
-rw-r--r--arch/arm/mach-omap2/dpll3xxx.c23
-rw-r--r--arch/arm/mach-omap2/hdq1w.c72
-rw-r--r--arch/arm/mach-omap2/io.c18
-rw-r--r--arch/arm/mach-omap2/msdi.c88
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_2420_data.c112
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_2430_data.c47
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_interconnect_data.c9
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c22
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c23
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_3xxx_data.c94
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_44xx_data.c1428
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_common_data.h5
-rw-r--r--arch/arm/mach-omap2/powerdomain.c10
-rw-r--r--arch/arm/mach-omap2/powerdomain.h1
-rw-r--r--arch/arm/mach-omap2/prcm-common.h17
-rw-r--r--arch/arm/mach-omap2/prcm.c8
-rw-r--r--arch/arm/mach-omap2/prminst44xx.c27
-rw-r--r--arch/arm/mach-omap2/timer.c7
-rw-r--r--arch/arm/mach-omap2/twl-common.c147
-rw-r--r--arch/arm/mach-omap2/vc3xxx_data.c1
-rw-r--r--arch/arm/mach-omap2/voltage.c21
-rw-r--r--arch/arm/mach-omap2/wd_timer.c45
-rw-r--r--arch/arm/mach-omap2/wd_timer.h1
-rw-r--r--arch/arm/mach-ux500/Makefile1
-rw-r--r--arch/arm/mach-ux500/cpuidle.c171
-rw-r--r--arch/arm/mm/cache-tauros2.c24
-rw-r--r--arch/arm/mm/proc-mohawk.S35
-rw-r--r--arch/arm/plat-omap/include/plat/clkdev_omap.h4
-rw-r--r--arch/arm/plat-omap/include/plat/dmtimer.h2
-rw-r--r--arch/arm/plat-omap/include/plat/hdq1w.h36
-rw-r--r--arch/arm/plat-omap/include/plat/mmc.h4
-rw-r--r--arch/arm/plat-omap/include/plat/omap_hwmod.h1
57 files changed, 3204 insertions, 176 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 58e2f7865f54..0a2fc01891a9 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -2261,7 +2261,7 @@ source "kernel/power/Kconfig"
2261config ARCH_SUSPEND_POSSIBLE 2261config ARCH_SUSPEND_POSSIBLE
2262 depends on !ARCH_S5PC100 && !ARCH_TEGRA 2262 depends on !ARCH_S5PC100 && !ARCH_TEGRA
2263 depends on CPU_ARM920T || CPU_ARM926T || CPU_SA1100 || \ 2263 depends on CPU_ARM920T || CPU_ARM926T || CPU_SA1100 || \
2264 CPU_V6 || CPU_V6K || CPU_V7 || CPU_XSC3 || CPU_XSCALE 2264 CPU_V6 || CPU_V6K || CPU_V7 || CPU_XSC3 || CPU_XSCALE || CPU_MOHAWK
2265 def_bool y 2265 def_bool y
2266 2266
2267config ARM_CPU_SUSPEND 2267config ARM_CPU_SUSPEND
diff --git a/arch/arm/mach-mmp/Makefile b/arch/arm/mach-mmp/Makefile
index b920b9bfbdb6..b786f7e6cd1f 100644
--- a/arch/arm/mach-mmp/Makefile
+++ b/arch/arm/mach-mmp/Makefile
@@ -9,6 +9,11 @@ obj-$(CONFIG_CPU_PXA168) += pxa168.o
9obj-$(CONFIG_CPU_PXA910) += pxa910.o 9obj-$(CONFIG_CPU_PXA910) += pxa910.o
10obj-$(CONFIG_CPU_MMP2) += mmp2.o sram.o 10obj-$(CONFIG_CPU_MMP2) += mmp2.o sram.o
11 11
12ifeq ($(CONFIG_PM),y)
13obj-$(CONFIG_CPU_PXA910) += pm-pxa910.o
14obj-$(CONFIG_CPU_MMP2) += pm-mmp2.o
15endif
16
12# board support 17# board support
13obj-$(CONFIG_MACH_ASPENITE) += aspenite.o 18obj-$(CONFIG_MACH_ASPENITE) += aspenite.o
14obj-$(CONFIG_MACH_ZYLONITE2) += aspenite.o 19obj-$(CONFIG_MACH_ZYLONITE2) += aspenite.o
diff --git a/arch/arm/mach-mmp/include/mach/addr-map.h b/arch/arm/mach-mmp/include/mach/addr-map.h
index b1ece08174e8..f88a44c0ef91 100644
--- a/arch/arm/mach-mmp/include/mach/addr-map.h
+++ b/arch/arm/mach-mmp/include/mach/addr-map.h
@@ -31,4 +31,16 @@
31#define SMC_CS1_PHYS_BASE 0x90000000 31#define SMC_CS1_PHYS_BASE 0x90000000
32#define SMC_CS1_PHYS_SIZE 0x10000000 32#define SMC_CS1_PHYS_SIZE 0x10000000
33 33
34#define APMU_VIRT_BASE (AXI_VIRT_BASE + 0x82800)
35#define APMU_REG(x) (APMU_VIRT_BASE + (x))
36
37#define APBC_VIRT_BASE (APB_VIRT_BASE + 0x015000)
38#define APBC_REG(x) (APBC_VIRT_BASE + (x))
39
40#define MPMU_VIRT_BASE (APB_VIRT_BASE + 0x50000)
41#define MPMU_REG(x) (MPMU_VIRT_BASE + (x))
42
43#define CIU_VIRT_BASE (AXI_VIRT_BASE + 0x82c00)
44#define CIU_REG(x) (CIU_VIRT_BASE + (x))
45
34#endif /* __ASM_MACH_ADDR_MAP_H */ 46#endif /* __ASM_MACH_ADDR_MAP_H */
diff --git a/arch/arm/mach-mmp/include/mach/pm-mmp2.h b/arch/arm/mach-mmp/include/mach/pm-mmp2.h
new file mode 100644
index 000000000000..98bd66ce8006
--- /dev/null
+++ b/arch/arm/mach-mmp/include/mach/pm-mmp2.h
@@ -0,0 +1,61 @@
1/*
2 * MMP2 Power Management Routines
3 *
4 * This software program is licensed subject to the GNU General Public License
5 * (GPL).Version 2,June 1991, available at http://www.fsf.org/copyleft/gpl.html
6 *
7 * (C) Copyright 2010 Marvell International Ltd.
8 * All Rights Reserved
9 */
10
11#ifndef __MMP2_PM_H__
12#define __MMP2_PM_H__
13
14#include <mach/addr-map.h>
15
16#define APMU_PJ_IDLE_CFG APMU_REG(0x018)
17#define APMU_PJ_IDLE_CFG_PJ_IDLE (1 << 1)
18#define APMU_PJ_IDLE_CFG_PJ_PWRDWN (1 << 5)
19#define APMU_PJ_IDLE_CFG_PWR_SW(x) ((x) << 16)
20#define APMU_PJ_IDLE_CFG_L2_PWR_SW (1 << 19)
21#define APMU_PJ_IDLE_CFG_ISO_MODE_CNTRL_MASK (3 << 28)
22
23#define APMU_SRAM_PWR_DWN APMU_REG(0x08c)
24
25#define MPMU_SCCR MPMU_REG(0x038)
26#define MPMU_PCR_PJ MPMU_REG(0x1000)
27#define MPMU_PCR_PJ_AXISD (1 << 31)
28#define MPMU_PCR_PJ_SLPEN (1 << 29)
29#define MPMU_PCR_PJ_SPSD (1 << 28)
30#define MPMU_PCR_PJ_DDRCORSD (1 << 27)
31#define MPMU_PCR_PJ_APBSD (1 << 26)
32#define MPMU_PCR_PJ_INTCLR (1 << 24)
33#define MPMU_PCR_PJ_SLPWP0 (1 << 23)
34#define MPMU_PCR_PJ_SLPWP1 (1 << 22)
35#define MPMU_PCR_PJ_SLPWP2 (1 << 21)
36#define MPMU_PCR_PJ_SLPWP3 (1 << 20)
37#define MPMU_PCR_PJ_VCTCXOSD (1 << 19)
38#define MPMU_PCR_PJ_SLPWP4 (1 << 18)
39#define MPMU_PCR_PJ_SLPWP5 (1 << 17)
40#define MPMU_PCR_PJ_SLPWP6 (1 << 16)
41#define MPMU_PCR_PJ_SLPWP7 (1 << 15)
42
43#define MPMU_PLL2_CTRL1 MPMU_REG(0x0414)
44#define MPMU_CGR_PJ MPMU_REG(0x1024)
45#define MPMU_WUCRM_PJ MPMU_REG(0x104c)
46#define MPMU_WUCRM_PJ_WAKEUP(x) (1 << (x))
47#define MPMU_WUCRM_PJ_RTC_ALARM (1 << 17)
48
49enum {
50 POWER_MODE_ACTIVE = 0,
51 POWER_MODE_CORE_INTIDLE,
52 POWER_MODE_CORE_EXTIDLE,
53 POWER_MODE_APPS_IDLE,
54 POWER_MODE_APPS_SLEEP,
55 POWER_MODE_CHIP_SLEEP,
56 POWER_MODE_SYS_SLEEP,
57};
58
59extern void mmp2_pm_enter_lowpower_mode(int state);
60extern int mmp2_set_wake(struct irq_data *d, unsigned int on);
61#endif
diff --git a/arch/arm/mach-mmp/include/mach/pm-pxa910.h b/arch/arm/mach-mmp/include/mach/pm-pxa910.h
new file mode 100644
index 000000000000..8cac8ab5253d
--- /dev/null
+++ b/arch/arm/mach-mmp/include/mach/pm-pxa910.h
@@ -0,0 +1,77 @@
1/*
2 * PXA910 Power Management Routines
3 *
4 * This software program is licensed subject to the GNU General Public License
5 * (GPL).Version 2,June 1991, available at http://www.fsf.org/copyleft/gpl.html
6 *
7 * (C) Copyright 2009 Marvell International Ltd.
8 * All Rights Reserved
9 */
10
11#ifndef __PXA910_PM_H__
12#define __PXA910_PM_H__
13
14#define APMU_MOH_IDLE_CFG APMU_REG(0x0018)
15#define APMU_MOH_IDLE_CFG_MOH_IDLE (1 << 1)
16#define APMU_MOH_IDLE_CFG_MOH_PWRDWN (1 << 5)
17#define APMU_MOH_IDLE_CFG_MOH_SRAM_PWRDWN (1 << 6)
18#define APMU_MOH_IDLE_CFG_MOH_PWR_SW(x) (((x) & 0x3) << 16)
19#define APMU_MOH_IDLE_CFG_MOH_L2_PWR_SW(x) (((x) & 0x3) << 18)
20#define APMU_MOH_IDLE_CFG_MOH_DIS_MC_SW_REQ (1 << 21)
21#define APMU_MOH_IDLE_CFG_MOH_MC_WAKE_EN (1 << 20)
22
23#define APMU_SQU_CLK_GATE_CTRL APMU_REG(0x001c)
24#define APMU_MC_HW_SLP_TYPE APMU_REG(0x00b0)
25
26#define MPMU_FCCR MPMU_REG(0x0008)
27#define MPMU_APCR MPMU_REG(0x1000)
28#define MPMU_APCR_AXISD (1 << 31)
29#define MPMU_APCR_DSPSD (1 << 30)
30#define MPMU_APCR_SLPEN (1 << 29)
31#define MPMU_APCR_DTCMSD (1 << 28)
32#define MPMU_APCR_DDRCORSD (1 << 27)
33#define MPMU_APCR_APBSD (1 << 26)
34#define MPMU_APCR_BBSD (1 << 25)
35#define MPMU_APCR_SLPWP0 (1 << 23)
36#define MPMU_APCR_SLPWP1 (1 << 22)
37#define MPMU_APCR_SLPWP2 (1 << 21)
38#define MPMU_APCR_SLPWP3 (1 << 20)
39#define MPMU_APCR_VCTCXOSD (1 << 19)
40#define MPMU_APCR_SLPWP4 (1 << 18)
41#define MPMU_APCR_SLPWP5 (1 << 17)
42#define MPMU_APCR_SLPWP6 (1 << 16)
43#define MPMU_APCR_SLPWP7 (1 << 15)
44#define MPMU_APCR_MSASLPEN (1 << 14)
45#define MPMU_APCR_STBYEN (1 << 13)
46
47#define MPMU_AWUCRM MPMU_REG(0x104c)
48#define MPMU_AWUCRM_AP_ASYNC_INT (1 << 25)
49#define MPMU_AWUCRM_AP_FULL_IDLE (1 << 24)
50#define MPMU_AWUCRM_SDH1 (1 << 23)
51#define MPMU_AWUCRM_SDH2 (1 << 22)
52#define MPMU_AWUCRM_KEYPRESS (1 << 21)
53#define MPMU_AWUCRM_TRACKBALL (1 << 20)
54#define MPMU_AWUCRM_NEWROTARY (1 << 19)
55#define MPMU_AWUCRM_RTC_ALARM (1 << 17)
56#define MPMU_AWUCRM_AP2_TIMER_3 (1 << 13)
57#define MPMU_AWUCRM_AP2_TIMER_2 (1 << 12)
58#define MPMU_AWUCRM_AP2_TIMER_1 (1 << 11)
59#define MPMU_AWUCRM_AP1_TIMER_3 (1 << 10)
60#define MPMU_AWUCRM_AP1_TIMER_2 (1 << 9)
61#define MPMU_AWUCRM_AP1_TIMER_1 (1 << 8)
62#define MPMU_AWUCRM_WAKEUP(x) (1 << ((x) & 0x7))
63
64enum {
65 POWER_MODE_ACTIVE = 0,
66 POWER_MODE_CORE_INTIDLE,
67 POWER_MODE_CORE_EXTIDLE,
68 POWER_MODE_APPS_IDLE,
69 POWER_MODE_APPS_SLEEP,
70 POWER_MODE_SYS_SLEEP,
71 POWER_MODE_HIBERNATE,
72 POWER_MODE_UDR,
73};
74
75extern int pxa910_set_wake(struct irq_data *data, unsigned int on);
76
77#endif
diff --git a/arch/arm/mach-mmp/include/mach/regs-apbc.h b/arch/arm/mach-mmp/include/mach/regs-apbc.h
index 8a37fb003655..68b0c93ec6a1 100644
--- a/arch/arm/mach-mmp/include/mach/regs-apbc.h
+++ b/arch/arm/mach-mmp/include/mach/regs-apbc.h
@@ -13,9 +13,6 @@
13 13
14#include <mach/addr-map.h> 14#include <mach/addr-map.h>
15 15
16#define APBC_VIRT_BASE (APB_VIRT_BASE + 0x015000)
17#define APBC_REG(x) (APBC_VIRT_BASE + (x))
18
19/* 16/*
20 * APB clock register offsets for PXA168 17 * APB clock register offsets for PXA168
21 */ 18 */
diff --git a/arch/arm/mach-mmp/include/mach/regs-apmu.h b/arch/arm/mach-mmp/include/mach/regs-apmu.h
index 8447ac63e28f..7af8deb63e83 100644
--- a/arch/arm/mach-mmp/include/mach/regs-apmu.h
+++ b/arch/arm/mach-mmp/include/mach/regs-apmu.h
@@ -13,9 +13,6 @@
13 13
14#include <mach/addr-map.h> 14#include <mach/addr-map.h>
15 15
16#define APMU_VIRT_BASE (AXI_VIRT_BASE + 0x82800)
17#define APMU_REG(x) (APMU_VIRT_BASE + (x))
18
19/* Clock Reset Control */ 16/* Clock Reset Control */
20#define APMU_IRE APMU_REG(0x048) 17#define APMU_IRE APMU_REG(0x048)
21#define APMU_LCD APMU_REG(0x04c) 18#define APMU_LCD APMU_REG(0x04c)
diff --git a/arch/arm/mach-mmp/irq.c b/arch/arm/mach-mmp/irq.c
index 3705470c9f1e..fcfe0e3bd701 100644
--- a/arch/arm/mach-mmp/irq.c
+++ b/arch/arm/mach-mmp/irq.c
@@ -23,6 +23,13 @@
23 23
24#include <mach/irqs.h> 24#include <mach/irqs.h>
25 25
26#ifdef CONFIG_CPU_MMP2
27#include <mach/pm-mmp2.h>
28#endif
29#ifdef CONFIG_CPU_PXA910
30#include <mach/pm-pxa910.h>
31#endif
32
26#include "common.h" 33#include "common.h"
27 34
28#define MAX_ICU_NR 16 35#define MAX_ICU_NR 16
@@ -209,6 +216,9 @@ void __init icu_init_irq(void)
209 set_irq_flags(irq, IRQF_VALID); 216 set_irq_flags(irq, IRQF_VALID);
210 } 217 }
211 irq_set_default_host(icu_data[0].domain); 218 irq_set_default_host(icu_data[0].domain);
219#ifdef CONFIG_CPU_PXA910
220 icu_irq_chip.irq_set_wake = pxa910_set_wake;
221#endif
212} 222}
213 223
214/* MMP2 (ARMv7) */ 224/* MMP2 (ARMv7) */
@@ -305,6 +315,9 @@ void __init mmp2_init_icu(void)
305 set_irq_flags(irq, IRQF_VALID); 315 set_irq_flags(irq, IRQF_VALID);
306 } 316 }
307 irq_set_default_host(icu_data[0].domain); 317 irq_set_default_host(icu_data[0].domain);
318#ifdef CONFIG_CPU_MMP2
319 icu_irq_chip.irq_set_wake = mmp2_set_wake;
320#endif
308} 321}
309 322
310#ifdef CONFIG_OF 323#ifdef CONFIG_OF
diff --git a/arch/arm/mach-mmp/pm-mmp2.c b/arch/arm/mach-mmp/pm-mmp2.c
new file mode 100644
index 000000000000..461a191a32d2
--- /dev/null
+++ b/arch/arm/mach-mmp/pm-mmp2.c
@@ -0,0 +1,264 @@
1/*
2 * MMP2 Power Management Routines
3 *
4 * This software program is licensed subject to the GNU General Public License
5 * (GPL).Version 2,June 1991, available at http://www.fsf.org/copyleft/gpl.html
6 *
7 * (C) Copyright 2012 Marvell International Ltd.
8 * All Rights Reserved
9 */
10
11#include <linux/kernel.h>
12#include <linux/errno.h>
13#include <linux/err.h>
14#include <linux/time.h>
15#include <linux/delay.h>
16#include <linux/suspend.h>
17#include <linux/irq.h>
18#include <linux/io.h>
19#include <linux/interrupt.h>
20#include <asm/mach-types.h>
21#include <mach/hardware.h>
22#include <mach/cputype.h>
23#include <mach/addr-map.h>
24#include <mach/pm-mmp2.h>
25#include <mach/regs-icu.h>
26#include <mach/irqs.h>
27
28int mmp2_set_wake(struct irq_data *d, unsigned int on)
29{
30 int irq = d->irq;
31 struct irq_desc *desc = irq_to_desc(irq);
32 unsigned long data = 0;
33
34 if (unlikely(irq >= nr_irqs)) {
35 pr_err("IRQ nubmers are out of boundary!\n");
36 return -EINVAL;
37 }
38
39 if (on) {
40 if (desc->action)
41 desc->action->flags |= IRQF_NO_SUSPEND;
42 } else {
43 if (desc->action)
44 desc->action->flags &= ~IRQF_NO_SUSPEND;
45 }
46
47 /* enable wakeup sources */
48 switch (irq) {
49 case IRQ_MMP2_RTC:
50 case IRQ_MMP2_RTC_ALARM:
51 data = MPMU_WUCRM_PJ_WAKEUP(4) | MPMU_WUCRM_PJ_RTC_ALARM;
52 break;
53 case IRQ_MMP2_PMIC:
54 data = MPMU_WUCRM_PJ_WAKEUP(7);
55 break;
56 case IRQ_MMP2_MMC2:
57 /* mmc use WAKEUP2, same as GPIO wakeup source */
58 data = MPMU_WUCRM_PJ_WAKEUP(2);
59 break;
60 }
61 if (on) {
62 if (data) {
63 data |= __raw_readl(MPMU_WUCRM_PJ);
64 __raw_writel(data, MPMU_WUCRM_PJ);
65 }
66 } else {
67 if (data) {
68 data = ~data & __raw_readl(MPMU_WUCRM_PJ);
69 __raw_writel(data, MPMU_WUCRM_PJ);
70 }
71 }
72 return 0;
73}
74
75static void pm_scu_clk_disable(void)
76{
77 unsigned int val;
78
79 /* close AXI fabric clock gate */
80 __raw_writel(0x0, CIU_REG(0x64));
81 __raw_writel(0x0, CIU_REG(0x68));
82
83 /* close MCB master clock gate */
84 val = __raw_readl(CIU_REG(0x1c));
85 val |= 0xf0;
86 __raw_writel(val, CIU_REG(0x1c));
87
88 return ;
89}
90
91static void pm_scu_clk_enable(void)
92{
93 unsigned int val;
94
95 /* open AXI fabric clock gate */
96 __raw_writel(0x03003003, CIU_REG(0x64));
97 __raw_writel(0x00303030, CIU_REG(0x68));
98
99 /* open MCB master clock gate */
100 val = __raw_readl(CIU_REG(0x1c));
101 val &= ~(0xf0);
102 __raw_writel(val, CIU_REG(0x1c));
103
104 return ;
105}
106
107static void pm_mpmu_clk_disable(void)
108{
109 /*
110 * disable clocks in MPMU_CGR_PJ register
111 * except clock for APMU_PLL1, APMU_PLL1_2 and AP_26M
112 */
113 __raw_writel(0x0000a010, MPMU_CGR_PJ);
114}
115
116static void pm_mpmu_clk_enable(void)
117{
118 unsigned int val;
119
120 __raw_writel(0xdffefffe, MPMU_CGR_PJ);
121 val = __raw_readl(MPMU_PLL2_CTRL1);
122 val |= (1 << 29);
123 __raw_writel(val, MPMU_PLL2_CTRL1);
124
125 return ;
126}
127
128void mmp2_pm_enter_lowpower_mode(int state)
129{
130 uint32_t idle_cfg, apcr;
131
132 idle_cfg = __raw_readl(APMU_PJ_IDLE_CFG);
133 apcr = __raw_readl(MPMU_PCR_PJ);
134 apcr &= ~(MPMU_PCR_PJ_SLPEN | MPMU_PCR_PJ_DDRCORSD | MPMU_PCR_PJ_APBSD
135 | MPMU_PCR_PJ_AXISD | MPMU_PCR_PJ_VCTCXOSD | (1 << 13));
136 idle_cfg &= ~APMU_PJ_IDLE_CFG_PJ_IDLE;
137
138 switch (state) {
139 case POWER_MODE_SYS_SLEEP:
140 apcr |= MPMU_PCR_PJ_SLPEN; /* set the SLPEN bit */
141 apcr |= MPMU_PCR_PJ_VCTCXOSD; /* set VCTCXOSD */
142 /* fall through */
143 case POWER_MODE_CHIP_SLEEP:
144 apcr |= MPMU_PCR_PJ_SLPEN;
145 /* fall through */
146 case POWER_MODE_APPS_SLEEP:
147 apcr |= MPMU_PCR_PJ_APBSD; /* set APBSD */
148 /* fall through */
149 case POWER_MODE_APPS_IDLE:
150 apcr |= MPMU_PCR_PJ_AXISD; /* set AXISDD bit */
151 apcr |= MPMU_PCR_PJ_DDRCORSD; /* set DDRCORSD bit */
152 idle_cfg |= APMU_PJ_IDLE_CFG_PJ_PWRDWN; /* PJ power down */
153 apcr |= MPMU_PCR_PJ_SPSD;
154 /* fall through */
155 case POWER_MODE_CORE_EXTIDLE:
156 idle_cfg |= APMU_PJ_IDLE_CFG_PJ_IDLE; /* set the IDLE bit */
157 idle_cfg &= ~APMU_PJ_IDLE_CFG_ISO_MODE_CNTRL_MASK;
158 idle_cfg |= APMU_PJ_IDLE_CFG_PWR_SW(3)
159 | APMU_PJ_IDLE_CFG_L2_PWR_SW;
160 break;
161 case POWER_MODE_CORE_INTIDLE:
162 apcr &= ~MPMU_PCR_PJ_SPSD;
163 break;
164 }
165
166 /* set reserve bits */
167 apcr |= (1 << 30) | (1 << 25);
168
169 /* finally write the registers back */
170 __raw_writel(idle_cfg, APMU_PJ_IDLE_CFG);
171 __raw_writel(apcr, MPMU_PCR_PJ); /* 0xfe086000 */
172}
173
174static int mmp2_pm_enter(suspend_state_t state)
175{
176 int temp;
177
178 temp = __raw_readl(MMP2_ICU_INT4_MASK);
179 if (temp & (1 << 1)) {
180 printk(KERN_ERR "%s: PMIC interrupt is handling\n", __func__);
181 return -EAGAIN;
182 }
183
184 temp = __raw_readl(APMU_SRAM_PWR_DWN);
185 temp |= ((1 << 19) | (1 << 18));
186 __raw_writel(temp, APMU_SRAM_PWR_DWN);
187 pm_mpmu_clk_disable();
188 pm_scu_clk_disable();
189
190 printk(KERN_INFO "%s: before suspend\n", __func__);
191 cpu_do_idle();
192 printk(KERN_INFO "%s: after suspend\n", __func__);
193
194 pm_mpmu_clk_enable(); /* enable clocks in MPMU */
195 pm_scu_clk_enable(); /* enable clocks in SCU */
196
197 return 0;
198}
199
200/*
201 * Called after processes are frozen, but before we shut down devices.
202 */
203static int mmp2_pm_prepare(void)
204{
205 mmp2_pm_enter_lowpower_mode(POWER_MODE_SYS_SLEEP);
206
207 return 0;
208}
209
210/*
211 * Called after devices are re-setup, but before processes are thawed.
212 */
213static void mmp2_pm_finish(void)
214{
215 mmp2_pm_enter_lowpower_mode(POWER_MODE_CORE_INTIDLE);
216}
217
218static int mmp2_pm_valid(suspend_state_t state)
219{
220 return ((state == PM_SUSPEND_STANDBY) || (state == PM_SUSPEND_MEM));
221}
222
223/*
224 * Set to PM_DISK_FIRMWARE so we can quickly veto suspend-to-disk.
225 */
226static const struct platform_suspend_ops mmp2_pm_ops = {
227 .valid = mmp2_pm_valid,
228 .prepare = mmp2_pm_prepare,
229 .enter = mmp2_pm_enter,
230 .finish = mmp2_pm_finish,
231};
232
233static int __init mmp2_pm_init(void)
234{
235 uint32_t apcr;
236
237 if (!cpu_is_mmp2())
238 return -EIO;
239
240 suspend_set_ops(&mmp2_pm_ops);
241
242 /*
243 * Set bit 0, Slow clock Select 32K clock input instead of VCXO
244 * VCXO is chosen by default, which would be disabled in suspend
245 */
246 __raw_writel(0x5, MPMU_SCCR);
247
248 /*
249 * Clear bit 23 of CIU_CPU_CONF
250 * direct PJ4 to DDR access through Memory Controller slow queue
251 * fast queue has issue and cause lcd will flick
252 */
253 __raw_writel(__raw_readl(CIU_REG(0x8)) & ~(0x1 << 23), CIU_REG(0x8));
254
255 /* Clear default low power control bit */
256 apcr = __raw_readl(MPMU_PCR_PJ);
257 apcr &= ~(MPMU_PCR_PJ_SLPEN | MPMU_PCR_PJ_DDRCORSD
258 | MPMU_PCR_PJ_APBSD | MPMU_PCR_PJ_AXISD | 1 << 13);
259 __raw_writel(apcr, MPMU_PCR_PJ);
260
261 return 0;
262}
263
264late_initcall(mmp2_pm_init);
diff --git a/arch/arm/mach-mmp/pm-pxa910.c b/arch/arm/mach-mmp/pm-pxa910.c
new file mode 100644
index 000000000000..48981ca801a5
--- /dev/null
+++ b/arch/arm/mach-mmp/pm-pxa910.c
@@ -0,0 +1,285 @@
1/*
2 * PXA910 Power Management Routines
3 *
4 * This software program is licensed subject to the GNU General Public License
5 * (GPL).Version 2,June 1991, available at http://www.fsf.org/copyleft/gpl.html
6 *
7 * (C) Copyright 2009 Marvell International Ltd.
8 * All Rights Reserved
9 */
10
11#include <linux/kernel.h>
12#include <linux/errno.h>
13#include <linux/err.h>
14#include <linux/time.h>
15#include <linux/delay.h>
16#include <linux/suspend.h>
17#include <linux/interrupt.h>
18#include <linux/io.h>
19#include <linux/irq.h>
20#include <asm/mach-types.h>
21#include <mach/hardware.h>
22#include <mach/cputype.h>
23#include <mach/addr-map.h>
24#include <mach/pm-pxa910.h>
25#include <mach/regs-icu.h>
26#include <mach/irqs.h>
27
28int pxa910_set_wake(struct irq_data *data, unsigned int on)
29{
30 int irq = data->irq;
31 struct irq_desc *desc = irq_to_desc(data->irq);
32 uint32_t awucrm = 0, apcr = 0;
33
34 if (unlikely(irq >= nr_irqs)) {
35 pr_err("IRQ nubmers are out of boundary!\n");
36 return -EINVAL;
37 }
38
39 if (on) {
40 if (desc->action)
41 desc->action->flags |= IRQF_NO_SUSPEND;
42 } else {
43 if (desc->action)
44 desc->action->flags &= ~IRQF_NO_SUSPEND;
45 }
46
47 /* setting wakeup sources */
48 switch (irq) {
49 /* wakeup line 2 */
50 case IRQ_PXA910_AP_GPIO:
51 awucrm = MPMU_AWUCRM_WAKEUP(2);
52 apcr |= MPMU_APCR_SLPWP2;
53 break;
54 /* wakeup line 3 */
55 case IRQ_PXA910_KEYPAD:
56 awucrm = MPMU_AWUCRM_WAKEUP(3) | MPMU_AWUCRM_KEYPRESS;
57 apcr |= MPMU_APCR_SLPWP3;
58 break;
59 case IRQ_PXA910_ROTARY:
60 awucrm = MPMU_AWUCRM_WAKEUP(3) | MPMU_AWUCRM_NEWROTARY;
61 apcr |= MPMU_APCR_SLPWP3;
62 break;
63 case IRQ_PXA910_TRACKBALL:
64 awucrm = MPMU_AWUCRM_WAKEUP(3) | MPMU_AWUCRM_TRACKBALL;
65 apcr |= MPMU_APCR_SLPWP3;
66 break;
67 /* wakeup line 4 */
68 case IRQ_PXA910_AP1_TIMER1:
69 awucrm = MPMU_AWUCRM_WAKEUP(4) | MPMU_AWUCRM_AP1_TIMER_1;
70 apcr |= MPMU_APCR_SLPWP4;
71 break;
72 case IRQ_PXA910_AP1_TIMER2:
73 awucrm = MPMU_AWUCRM_WAKEUP(4) | MPMU_AWUCRM_AP1_TIMER_2;
74 apcr |= MPMU_APCR_SLPWP4;
75 break;
76 case IRQ_PXA910_AP1_TIMER3:
77 awucrm = MPMU_AWUCRM_WAKEUP(4) | MPMU_AWUCRM_AP1_TIMER_3;
78 apcr |= MPMU_APCR_SLPWP4;
79 break;
80 case IRQ_PXA910_AP2_TIMER1:
81 awucrm = MPMU_AWUCRM_WAKEUP(4) | MPMU_AWUCRM_AP2_TIMER_1;
82 apcr |= MPMU_APCR_SLPWP4;
83 break;
84 case IRQ_PXA910_AP2_TIMER2:
85 awucrm = MPMU_AWUCRM_WAKEUP(4) | MPMU_AWUCRM_AP2_TIMER_2;
86 apcr |= MPMU_APCR_SLPWP4;
87 break;
88 case IRQ_PXA910_AP2_TIMER3:
89 awucrm = MPMU_AWUCRM_WAKEUP(4) | MPMU_AWUCRM_AP2_TIMER_3;
90 apcr |= MPMU_APCR_SLPWP4;
91 break;
92 case IRQ_PXA910_RTC_ALARM:
93 awucrm = MPMU_AWUCRM_WAKEUP(4) | MPMU_AWUCRM_RTC_ALARM;
94 apcr |= MPMU_APCR_SLPWP4;
95 break;
96 /* wakeup line 5 */
97 case IRQ_PXA910_USB1:
98 case IRQ_PXA910_USB2:
99 awucrm = MPMU_AWUCRM_WAKEUP(5);
100 apcr |= MPMU_APCR_SLPWP5;
101 break;
102 /* wakeup line 6 */
103 case IRQ_PXA910_MMC:
104 awucrm = MPMU_AWUCRM_WAKEUP(6)
105 | MPMU_AWUCRM_SDH1
106 | MPMU_AWUCRM_SDH2;
107 apcr |= MPMU_APCR_SLPWP6;
108 break;
109 /* wakeup line 7 */
110 case IRQ_PXA910_PMIC_INT:
111 awucrm = MPMU_AWUCRM_WAKEUP(7);
112 apcr |= MPMU_APCR_SLPWP7;
113 break;
114 default:
115 if (irq >= IRQ_GPIO_START && irq < IRQ_BOARD_START) {
116 awucrm = MPMU_AWUCRM_WAKEUP(2);
117 apcr |= MPMU_APCR_SLPWP2;
118 } else
119 printk(KERN_ERR "Error: no defined wake up source irq: %d\n",
120 irq);
121 }
122
123 if (on) {
124 if (awucrm) {
125 awucrm |= __raw_readl(MPMU_AWUCRM);
126 __raw_writel(awucrm, MPMU_AWUCRM);
127 }
128 if (apcr) {
129 apcr = ~apcr & __raw_readl(MPMU_APCR);
130 __raw_writel(apcr, MPMU_APCR);
131 }
132 } else {
133 if (awucrm) {
134 awucrm = ~awucrm & __raw_readl(MPMU_AWUCRM);
135 __raw_writel(awucrm, MPMU_AWUCRM);
136 }
137 if (apcr) {
138 apcr |= __raw_readl(MPMU_APCR);
139 __raw_writel(apcr, MPMU_APCR);
140 }
141 }
142 return 0;
143}
144
145void pxa910_pm_enter_lowpower_mode(int state)
146{
147 uint32_t idle_cfg, apcr;
148
149 idle_cfg = __raw_readl(APMU_MOH_IDLE_CFG);
150 apcr = __raw_readl(MPMU_APCR);
151
152 apcr &= ~(MPMU_APCR_DDRCORSD | MPMU_APCR_APBSD | MPMU_APCR_AXISD
153 | MPMU_APCR_VCTCXOSD | MPMU_APCR_STBYEN);
154 idle_cfg &= ~(APMU_MOH_IDLE_CFG_MOH_IDLE
155 | APMU_MOH_IDLE_CFG_MOH_PWRDWN);
156
157 switch (state) {
158 case POWER_MODE_UDR:
159 /* only shutdown APB in UDR */
160 apcr |= MPMU_APCR_STBYEN | MPMU_APCR_APBSD;
161 /* fall through */
162 case POWER_MODE_SYS_SLEEP:
163 apcr |= MPMU_APCR_SLPEN; /* set the SLPEN bit */
164 apcr |= MPMU_APCR_VCTCXOSD; /* set VCTCXOSD */
165 /* fall through */
166 case POWER_MODE_APPS_SLEEP:
167 apcr |= MPMU_APCR_DDRCORSD; /* set DDRCORSD */
168 /* fall through */
169 case POWER_MODE_APPS_IDLE:
170 apcr |= MPMU_APCR_AXISD; /* set AXISDD bit */
171 /* fall through */
172 case POWER_MODE_CORE_EXTIDLE:
173 idle_cfg |= APMU_MOH_IDLE_CFG_MOH_IDLE;
174 idle_cfg |= APMU_MOH_IDLE_CFG_MOH_PWRDWN;
175 idle_cfg |= APMU_MOH_IDLE_CFG_MOH_PWR_SW(3)
176 | APMU_MOH_IDLE_CFG_MOH_L2_PWR_SW(3);
177 /* fall through */
178 case POWER_MODE_CORE_INTIDLE:
179 break;
180 }
181
182 /* program the memory controller hardware sleep type and auto wakeup */
183 idle_cfg |= APMU_MOH_IDLE_CFG_MOH_DIS_MC_SW_REQ;
184 idle_cfg |= APMU_MOH_IDLE_CFG_MOH_MC_WAKE_EN;
185 __raw_writel(0x0, APMU_MC_HW_SLP_TYPE); /* auto refresh */
186
187 /* set DSPSD, DTCMSD, BBSD, MSASLPEN */
188 apcr |= MPMU_APCR_DSPSD | MPMU_APCR_DTCMSD | MPMU_APCR_BBSD
189 | MPMU_APCR_MSASLPEN;
190
191 /*always set SLEPEN bit mainly for MSA*/
192 apcr |= MPMU_APCR_SLPEN;
193
194 /* finally write the registers back */
195 __raw_writel(idle_cfg, APMU_MOH_IDLE_CFG);
196 __raw_writel(apcr, MPMU_APCR);
197
198}
199
200static int pxa910_pm_enter(suspend_state_t state)
201{
202 unsigned int idle_cfg, reg = 0;
203
204 /*pmic thread not completed,exit;otherwise system can't be waked up*/
205 reg = __raw_readl(ICU_INT_CONF(IRQ_PXA910_PMIC_INT));
206 if ((reg & 0x3) == 0)
207 return -EAGAIN;
208
209 idle_cfg = __raw_readl(APMU_MOH_IDLE_CFG);
210 idle_cfg |= APMU_MOH_IDLE_CFG_MOH_PWRDWN
211 | APMU_MOH_IDLE_CFG_MOH_SRAM_PWRDWN;
212 __raw_writel(idle_cfg, APMU_MOH_IDLE_CFG);
213
214 /* disable L2 */
215 outer_disable();
216 /* wait for l2 idle */
217 while (!(readl(CIU_REG(0x8)) & (1 << 16)))
218 udelay(1);
219
220 cpu_do_idle();
221
222 /* enable L2 */
223 outer_resume();
224 /* wait for l2 idle */
225 while (!(readl(CIU_REG(0x8)) & (1 << 16)))
226 udelay(1);
227
228 idle_cfg = __raw_readl(APMU_MOH_IDLE_CFG);
229 idle_cfg &= ~(APMU_MOH_IDLE_CFG_MOH_PWRDWN
230 | APMU_MOH_IDLE_CFG_MOH_SRAM_PWRDWN);
231 __raw_writel(idle_cfg, APMU_MOH_IDLE_CFG);
232
233 return 0;
234}
235
236/*
237 * Called after processes are frozen, but before we shut down devices.
238 */
239static int pxa910_pm_prepare(void)
240{
241 pxa910_pm_enter_lowpower_mode(POWER_MODE_UDR);
242 return 0;
243}
244
245/*
246 * Called after devices are re-setup, but before processes are thawed.
247 */
248static void pxa910_pm_finish(void)
249{
250 pxa910_pm_enter_lowpower_mode(POWER_MODE_CORE_INTIDLE);
251}
252
253static int pxa910_pm_valid(suspend_state_t state)
254{
255 return ((state == PM_SUSPEND_STANDBY) || (state == PM_SUSPEND_MEM));
256}
257
258static const struct platform_suspend_ops pxa910_pm_ops = {
259 .valid = pxa910_pm_valid,
260 .prepare = pxa910_pm_prepare,
261 .enter = pxa910_pm_enter,
262 .finish = pxa910_pm_finish,
263};
264
265static int __init pxa910_pm_init(void)
266{
267 uint32_t awucrm = 0;
268
269 if (!cpu_is_pxa910())
270 return -EIO;
271
272 suspend_set_ops(&pxa910_pm_ops);
273
274 /* Set the following bits for MMP3 playback with VCTXO on */
275 __raw_writel(__raw_readl(APMU_SQU_CLK_GATE_CTRL) | (1 << 30),
276 APMU_SQU_CLK_GATE_CTRL);
277 __raw_writel(__raw_readl(MPMU_FCCR) | (1 << 28), MPMU_FCCR);
278
279 awucrm |= MPMU_AWUCRM_AP_ASYNC_INT | MPMU_AWUCRM_AP_FULL_IDLE;
280 __raw_writel(awucrm, MPMU_AWUCRM);
281
282 return 0;
283}
284
285late_initcall(pxa910_pm_init);
diff --git a/arch/arm/mach-mmp/ttc_dkb.c b/arch/arm/mach-mmp/ttc_dkb.c
index 3fc9ed21f97d..e8cf5ea15263 100644
--- a/arch/arm/mach-mmp/ttc_dkb.c
+++ b/arch/arm/mach-mmp/ttc_dkb.c
@@ -17,6 +17,7 @@
17#include <linux/interrupt.h> 17#include <linux/interrupt.h>
18#include <linux/i2c/pca953x.h> 18#include <linux/i2c/pca953x.h>
19#include <linux/gpio.h> 19#include <linux/gpio.h>
20#include <linux/mfd/88pm860x.h>
20 21
21#include <asm/mach-types.h> 22#include <asm/mach-types.h>
22#include <asm/mach/arch.h> 23#include <asm/mach/arch.h>
@@ -135,8 +136,18 @@ static struct pca953x_platform_data max7312_data[] = {
135 }, 136 },
136}; 137};
137 138
139static struct pm860x_platform_data ttc_dkb_pm8607_info = {
140 .irq_base = IRQ_BOARD_START,
141};
142
138static struct i2c_board_info ttc_dkb_i2c_info[] = { 143static struct i2c_board_info ttc_dkb_i2c_info[] = {
139 { 144 {
145 .type = "88PM860x",
146 .addr = 0x34,
147 .platform_data = &ttc_dkb_pm8607_info,
148 .irq = IRQ_PXA910_PMIC_INT,
149 },
150 {
140 .type = "max7312", 151 .type = "max7312",
141 .addr = 0x23, 152 .addr = 0x23,
142 .irq = MMP_GPIO_TO_IRQ(80), 153 .irq = MMP_GPIO_TO_IRQ(80),
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 49f92bc1c311..385c083d24b2 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -4,7 +4,7 @@
4 4
5# Common support 5# Common support
6obj-y := id.o io.o control.o mux.o devices.o serial.o gpmc.o timer.o pm.o \ 6obj-y := id.o io.o control.o mux.o devices.o serial.o gpmc.o timer.o pm.o \
7 common.o gpio.o dma.o wd_timer.o display.o i2c.o 7 common.o gpio.o dma.o wd_timer.o display.o i2c.o hdq1w.o
8 8
9omap-2-3-common = irq.o sdrc.o 9omap-2-3-common = irq.o sdrc.o
10hwmod-common = omap_hwmod.o \ 10hwmod-common = omap_hwmod.o \
@@ -118,16 +118,18 @@ obj-$(CONFIG_ARCH_OMAP4) += $(powerdomain-common) \
118 powerdomains44xx_data.o 118 powerdomains44xx_data.o
119 119
120# PRCM clockdomain control 120# PRCM clockdomain control
121obj-$(CONFIG_ARCH_OMAP2) += clockdomain.o \ 121clockdomain-common += clockdomain.o \
122 clockdomains_common_data.o
123obj-$(CONFIG_ARCH_OMAP2) += $(clockdomain-common) \
122 clockdomain2xxx_3xxx.o \ 124 clockdomain2xxx_3xxx.o \
123 clockdomains2xxx_3xxx_data.o 125 clockdomains2xxx_3xxx_data.o
124obj-$(CONFIG_SOC_OMAP2420) += clockdomains2420_data.o 126obj-$(CONFIG_SOC_OMAP2420) += clockdomains2420_data.o
125obj-$(CONFIG_SOC_OMAP2430) += clockdomains2430_data.o 127obj-$(CONFIG_SOC_OMAP2430) += clockdomains2430_data.o
126obj-$(CONFIG_ARCH_OMAP3) += clockdomain.o \ 128obj-$(CONFIG_ARCH_OMAP3) += $(clockdomain-common) \
127 clockdomain2xxx_3xxx.o \ 129 clockdomain2xxx_3xxx.o \
128 clockdomains2xxx_3xxx_data.o \ 130 clockdomains2xxx_3xxx_data.o \
129 clockdomains3xxx_data.o 131 clockdomains3xxx_data.o
130obj-$(CONFIG_ARCH_OMAP4) += clockdomain.o \ 132obj-$(CONFIG_ARCH_OMAP4) += $(clockdomain-common) \
131 clockdomain44xx.o \ 133 clockdomain44xx.o \
132 clockdomains44xx_data.o 134 clockdomains44xx_data.o
133 135
@@ -187,6 +189,9 @@ ifneq ($(CONFIG_TIDSPBRIDGE),)
187obj-y += dsp.o 189obj-y += dsp.o
188endif 190endif
189 191
192# OMAP2420 MSDI controller integration support ("MMC")
193obj-$(CONFIG_SOC_OMAP2420) += msdi.o
194
190# Specific board support 195# Specific board support
191obj-$(CONFIG_MACH_OMAP_GENERIC) += board-generic.o 196obj-$(CONFIG_MACH_OMAP_GENERIC) += board-generic.o
192obj-$(CONFIG_MACH_OMAP_H4) += board-h4.o 197obj-$(CONFIG_MACH_OMAP_H4) += board-h4.o
diff --git a/arch/arm/mach-omap2/clock.c b/arch/arm/mach-omap2/clock.c
index d9f4931513f9..5c4e66542169 100644
--- a/arch/arm/mach-omap2/clock.c
+++ b/arch/arm/mach-omap2/clock.c
@@ -439,7 +439,7 @@ void omap2_clk_disable_unused(struct clk *clk)
439 clk->ops->disable(clk); 439 clk->ops->disable(clk);
440 } 440 }
441 if (clk->clkdm != NULL) 441 if (clk->clkdm != NULL)
442 pwrdm_clkdm_state_switch(clk->clkdm); 442 pwrdm_state_switch(clk->clkdm->pwrdm.ptr);
443} 443}
444#endif 444#endif
445 445
diff --git a/arch/arm/mach-omap2/clock3xxx_data.c b/arch/arm/mach-omap2/clock3xxx_data.c
index f4a626f7c79e..4e1a3b0e8cc8 100644
--- a/arch/arm/mach-omap2/clock3xxx_data.c
+++ b/arch/arm/mach-omap2/clock3xxx_data.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * OMAP3 clock data 2 * OMAP3 clock data
3 * 3 *
4 * Copyright (C) 2007-2010 Texas Instruments, Inc. 4 * Copyright (C) 2007-2010, 2012 Texas Instruments, Inc.
5 * Copyright (C) 2007-2011 Nokia Corporation 5 * Copyright (C) 2007-2011 Nokia Corporation
6 * 6 *
7 * Written by Paul Walmsley 7 * Written by Paul Walmsley
@@ -1640,6 +1640,7 @@ static struct clk hdq_fck = {
1640 .name = "hdq_fck", 1640 .name = "hdq_fck",
1641 .ops = &clkops_omap2_dflt_wait, 1641 .ops = &clkops_omap2_dflt_wait,
1642 .parent = &core_12m_fck, 1642 .parent = &core_12m_fck,
1643 .clkdm_name = "core_l4_clkdm",
1643 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), 1644 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1644 .enable_bit = OMAP3430_EN_HDQ_SHIFT, 1645 .enable_bit = OMAP3430_EN_HDQ_SHIFT,
1645 .recalc = &followparent_recalc, 1646 .recalc = &followparent_recalc,
@@ -3294,8 +3295,8 @@ static struct omap_clk omap3xxx_clks[] = {
3294 CLK(NULL, "gfx_l3_ick", &gfx_l3_ick, CK_3430ES1), 3295 CLK(NULL, "gfx_l3_ick", &gfx_l3_ick, CK_3430ES1),
3295 CLK(NULL, "gfx_cg1_ck", &gfx_cg1_ck, CK_3430ES1), 3296 CLK(NULL, "gfx_cg1_ck", &gfx_cg1_ck, CK_3430ES1),
3296 CLK(NULL, "gfx_cg2_ck", &gfx_cg2_ck, CK_3430ES1), 3297 CLK(NULL, "gfx_cg2_ck", &gfx_cg2_ck, CK_3430ES1),
3297 CLK(NULL, "sgx_fck", &sgx_fck, CK_3430ES2PLUS | CK_3517 | CK_36XX), 3298 CLK(NULL, "sgx_fck", &sgx_fck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
3298 CLK(NULL, "sgx_ick", &sgx_ick, CK_3430ES2PLUS | CK_3517 | CK_36XX), 3299 CLK(NULL, "sgx_ick", &sgx_ick, CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
3299 CLK(NULL, "d2d_26m_fck", &d2d_26m_fck, CK_3430ES1), 3300 CLK(NULL, "d2d_26m_fck", &d2d_26m_fck, CK_3430ES1),
3300 CLK(NULL, "modem_fck", &modem_fck, CK_34XX | CK_36XX), 3301 CLK(NULL, "modem_fck", &modem_fck, CK_34XX | CK_36XX),
3301 CLK(NULL, "sad2d_ick", &sad2d_ick, CK_34XX | CK_36XX), 3302 CLK(NULL, "sad2d_ick", &sad2d_ick, CK_34XX | CK_36XX),
@@ -3419,7 +3420,7 @@ static struct omap_clk omap3xxx_clks[] = {
3419 CLK(NULL, "per_48m_fck", &per_48m_fck, CK_3XXX), 3420 CLK(NULL, "per_48m_fck", &per_48m_fck, CK_3XXX),
3420 CLK(NULL, "uart3_fck", &uart3_fck, CK_3XXX), 3421 CLK(NULL, "uart3_fck", &uart3_fck, CK_3XXX),
3421 CLK(NULL, "uart4_fck", &uart4_fck, CK_36XX), 3422 CLK(NULL, "uart4_fck", &uart4_fck, CK_36XX),
3422 CLK(NULL, "uart4_fck", &uart4_fck_am35xx, CK_3505 | CK_3517), 3423 CLK(NULL, "uart4_fck", &uart4_fck_am35xx, CK_AM35XX),
3423 CLK(NULL, "gpt2_fck", &gpt2_fck, CK_3XXX), 3424 CLK(NULL, "gpt2_fck", &gpt2_fck, CK_3XXX),
3424 CLK(NULL, "gpt3_fck", &gpt3_fck, CK_3XXX), 3425 CLK(NULL, "gpt3_fck", &gpt3_fck, CK_3XXX),
3425 CLK(NULL, "gpt4_fck", &gpt4_fck, CK_3XXX), 3426 CLK(NULL, "gpt4_fck", &gpt4_fck, CK_3XXX),
@@ -3513,21 +3514,9 @@ int __init omap3xxx_clk_init(void)
3513 struct omap_clk *c; 3514 struct omap_clk *c;
3514 u32 cpu_clkflg = 0; 3515 u32 cpu_clkflg = 0;
3515 3516
3516 /* 3517 if (cpu_is_omap3517()) {
3517 * 3505 must be tested before 3517, since 3517 returns true
3518 * for both AM3517 chips and AM3517 family chips, which
3519 * includes 3505. Unfortunately there's no obvious family
3520 * test for 3517/3505 :-(
3521 */
3522 if (cpu_is_omap3505()) {
3523 cpu_mask = RATE_IN_34XX;
3524 cpu_clkflg = CK_3505;
3525 } else if (cpu_is_omap3517()) {
3526 cpu_mask = RATE_IN_34XX;
3527 cpu_clkflg = CK_3517;
3528 } else if (cpu_is_omap3505()) {
3529 cpu_mask = RATE_IN_34XX; 3518 cpu_mask = RATE_IN_34XX;
3530 cpu_clkflg = CK_3505; 3519 cpu_clkflg = CK_AM35XX;
3531 } else if (cpu_is_omap3630()) { 3520 } else if (cpu_is_omap3630()) {
3532 cpu_mask = (RATE_IN_34XX | RATE_IN_36XX); 3521 cpu_mask = (RATE_IN_34XX | RATE_IN_36XX);
3533 cpu_clkflg = CK_36XX; 3522 cpu_clkflg = CK_36XX;
diff --git a/arch/arm/mach-omap2/clock44xx_data.c b/arch/arm/mach-omap2/clock44xx_data.c
index fa6ea65ad44b..2172f6603848 100644
--- a/arch/arm/mach-omap2/clock44xx_data.c
+++ b/arch/arm/mach-omap2/clock44xx_data.c
@@ -3355,17 +3355,6 @@ static struct omap_clk omap44xx_clks[] = {
3355 CLK(NULL, "auxclk5_ck", &auxclk5_ck, CK_443X), 3355 CLK(NULL, "auxclk5_ck", &auxclk5_ck, CK_443X),
3356 CLK(NULL, "auxclkreq5_ck", &auxclkreq5_ck, CK_443X), 3356 CLK(NULL, "auxclkreq5_ck", &auxclkreq5_ck, CK_443X),
3357 CLK(NULL, "gpmc_ck", &dummy_ck, CK_443X), 3357 CLK(NULL, "gpmc_ck", &dummy_ck, CK_443X),
3358 CLK(NULL, "gpt1_ick", &dummy_ck, CK_443X),
3359 CLK(NULL, "gpt2_ick", &dummy_ck, CK_443X),
3360 CLK(NULL, "gpt3_ick", &dummy_ck, CK_443X),
3361 CLK(NULL, "gpt4_ick", &dummy_ck, CK_443X),
3362 CLK(NULL, "gpt5_ick", &dummy_ck, CK_443X),
3363 CLK(NULL, "gpt6_ick", &dummy_ck, CK_443X),
3364 CLK(NULL, "gpt7_ick", &dummy_ck, CK_443X),
3365 CLK(NULL, "gpt8_ick", &dummy_ck, CK_443X),
3366 CLK(NULL, "gpt9_ick", &dummy_ck, CK_443X),
3367 CLK(NULL, "gpt10_ick", &dummy_ck, CK_443X),
3368 CLK(NULL, "gpt11_ick", &dummy_ck, CK_443X),
3369 CLK("omap_i2c.1", "ick", &dummy_ck, CK_443X), 3358 CLK("omap_i2c.1", "ick", &dummy_ck, CK_443X),
3370 CLK("omap_i2c.2", "ick", &dummy_ck, CK_443X), 3359 CLK("omap_i2c.2", "ick", &dummy_ck, CK_443X),
3371 CLK("omap_i2c.3", "ick", &dummy_ck, CK_443X), 3360 CLK("omap_i2c.3", "ick", &dummy_ck, CK_443X),
diff --git a/arch/arm/mach-omap2/clockdomain.c b/arch/arm/mach-omap2/clockdomain.c
index ad07689e1563..8664f5a8bfb6 100644
--- a/arch/arm/mach-omap2/clockdomain.c
+++ b/arch/arm/mach-omap2/clockdomain.c
@@ -840,7 +840,7 @@ void clkdm_allow_idle(struct clockdomain *clkdm)
840 spin_lock_irqsave(&clkdm->lock, flags); 840 spin_lock_irqsave(&clkdm->lock, flags);
841 clkdm->_flags |= _CLKDM_FLAG_HWSUP_ENABLED; 841 clkdm->_flags |= _CLKDM_FLAG_HWSUP_ENABLED;
842 arch_clkdm->clkdm_allow_idle(clkdm); 842 arch_clkdm->clkdm_allow_idle(clkdm);
843 pwrdm_clkdm_state_switch(clkdm); 843 pwrdm_state_switch(clkdm->pwrdm.ptr);
844 spin_unlock_irqrestore(&clkdm->lock, flags); 844 spin_unlock_irqrestore(&clkdm->lock, flags);
845} 845}
846 846
@@ -924,8 +924,7 @@ static int _clkdm_clk_hwmod_enable(struct clockdomain *clkdm)
924 924
925 spin_lock_irqsave(&clkdm->lock, flags); 925 spin_lock_irqsave(&clkdm->lock, flags);
926 arch_clkdm->clkdm_clk_enable(clkdm); 926 arch_clkdm->clkdm_clk_enable(clkdm);
927 pwrdm_wait_transition(clkdm->pwrdm.ptr); 927 pwrdm_state_switch(clkdm->pwrdm.ptr);
928 pwrdm_clkdm_state_switch(clkdm);
929 spin_unlock_irqrestore(&clkdm->lock, flags); 928 spin_unlock_irqrestore(&clkdm->lock, flags);
930 929
931 pr_debug("clockdomain: clkdm %s: enabled\n", clkdm->name); 930 pr_debug("clockdomain: clkdm %s: enabled\n", clkdm->name);
@@ -950,7 +949,7 @@ static int _clkdm_clk_hwmod_disable(struct clockdomain *clkdm)
950 949
951 spin_lock_irqsave(&clkdm->lock, flags); 950 spin_lock_irqsave(&clkdm->lock, flags);
952 arch_clkdm->clkdm_clk_disable(clkdm); 951 arch_clkdm->clkdm_clk_disable(clkdm);
953 pwrdm_clkdm_state_switch(clkdm); 952 pwrdm_state_switch(clkdm->pwrdm.ptr);
954 spin_unlock_irqrestore(&clkdm->lock, flags); 953 spin_unlock_irqrestore(&clkdm->lock, flags);
955 954
956 pr_debug("clockdomain: clkdm %s: disabled\n", clkdm->name); 955 pr_debug("clockdomain: clkdm %s: disabled\n", clkdm->name);
diff --git a/arch/arm/mach-omap2/clockdomain44xx.c b/arch/arm/mach-omap2/clockdomain44xx.c
index 935c7f03dab9..4f04dd11d655 100644
--- a/arch/arm/mach-omap2/clockdomain44xx.c
+++ b/arch/arm/mach-omap2/clockdomain44xx.c
@@ -51,6 +51,9 @@ static int omap4_clkdm_clear_all_wkup_sleep_deps(struct clockdomain *clkdm)
51 struct clkdm_dep *cd; 51 struct clkdm_dep *cd;
52 u32 mask = 0; 52 u32 mask = 0;
53 53
54 if (!clkdm->prcm_partition)
55 return 0;
56
54 for (cd = clkdm->wkdep_srcs; cd && cd->clkdm_name; cd++) { 57 for (cd = clkdm->wkdep_srcs; cd && cd->clkdm_name; cd++) {
55 if (!cd->clkdm) 58 if (!cd->clkdm)
56 continue; /* only happens if data is erroneous */ 59 continue; /* only happens if data is erroneous */
@@ -103,6 +106,9 @@ static int omap4_clkdm_clk_disable(struct clockdomain *clkdm)
103{ 106{
104 bool hwsup = false; 107 bool hwsup = false;
105 108
109 if (!clkdm->prcm_partition)
110 return 0;
111
106 hwsup = omap4_cminst_is_clkdm_in_hwsup(clkdm->prcm_partition, 112 hwsup = omap4_cminst_is_clkdm_in_hwsup(clkdm->prcm_partition,
107 clkdm->cm_inst, clkdm->clkdm_offs); 113 clkdm->cm_inst, clkdm->clkdm_offs);
108 114
diff --git a/arch/arm/mach-omap2/clockdomains2xxx_3xxx_data.c b/arch/arm/mach-omap2/clockdomains2xxx_3xxx_data.c
index 0a6a04897d89..839145e1cfbe 100644
--- a/arch/arm/mach-omap2/clockdomains2xxx_3xxx_data.c
+++ b/arch/arm/mach-omap2/clockdomains2xxx_3xxx_data.c
@@ -89,13 +89,3 @@ struct clockdomain wkup_common_clkdm = {
89 .pwrdm = { .name = "wkup_pwrdm" }, 89 .pwrdm = { .name = "wkup_pwrdm" },
90 .dep_bit = OMAP_EN_WKUP_SHIFT, 90 .dep_bit = OMAP_EN_WKUP_SHIFT,
91}; 91};
92
93struct clockdomain prm_common_clkdm = {
94 .name = "prm_clkdm",
95 .pwrdm = { .name = "wkup_pwrdm" },
96};
97
98struct clockdomain cm_common_clkdm = {
99 .name = "cm_clkdm",
100 .pwrdm = { .name = "core_pwrdm" },
101};
diff --git a/arch/arm/mach-omap2/clockdomains3xxx_data.c b/arch/arm/mach-omap2/clockdomains3xxx_data.c
index b84e138d99c8..6038adb97710 100644
--- a/arch/arm/mach-omap2/clockdomains3xxx_data.c
+++ b/arch/arm/mach-omap2/clockdomains3xxx_data.c
@@ -53,9 +53,9 @@
53 * 3430ES2 PM_WKDEP_SGX: adds IVA2, removes CORE 53 * 3430ES2 PM_WKDEP_SGX: adds IVA2, removes CORE
54 */ 54 */
55static struct clkdm_dep gfx_sgx_3xxx_wkdeps[] = { 55static struct clkdm_dep gfx_sgx_3xxx_wkdeps[] = {
56 { .clkdm_name = "iva2_clkdm", }, 56 { .clkdm_name = "iva2_clkdm" },
57 { .clkdm_name = "mpu_clkdm", }, 57 { .clkdm_name = "mpu_clkdm" },
58 { .clkdm_name = "wkup_clkdm", }, 58 { .clkdm_name = "wkup_clkdm" },
59 { NULL }, 59 { NULL },
60}; 60};
61 61
diff --git a/arch/arm/mach-omap2/clockdomains44xx_data.c b/arch/arm/mach-omap2/clockdomains44xx_data.c
index bd7ed13515cc..c53425847493 100644
--- a/arch/arm/mach-omap2/clockdomains44xx_data.c
+++ b/arch/arm/mach-omap2/clockdomains44xx_data.c
@@ -430,6 +430,8 @@ static struct clockdomain *clockdomains_omap44xx[] __initdata = {
430 &l4_wkup_44xx_clkdm, 430 &l4_wkup_44xx_clkdm,
431 &emu_sys_44xx_clkdm, 431 &emu_sys_44xx_clkdm,
432 &l3_dma_44xx_clkdm, 432 &l3_dma_44xx_clkdm,
433 &prm_common_clkdm,
434 &cm_common_clkdm,
433 NULL 435 NULL
434}; 436};
435 437
diff --git a/arch/arm/mach-omap2/clockdomains_common_data.c b/arch/arm/mach-omap2/clockdomains_common_data.c
new file mode 100644
index 000000000000..615b1f04967d
--- /dev/null
+++ b/arch/arm/mach-omap2/clockdomains_common_data.c
@@ -0,0 +1,24 @@
1/*
2 * OMAP2+-common clockdomain data
3 *
4 * Copyright (C) 2008-2012 Texas Instruments, Inc.
5 * Copyright (C) 2008-2010 Nokia Corporation
6 *
7 * Paul Walmsley, Jouni Högander
8 */
9
10#include <linux/kernel.h>
11#include <linux/io.h>
12
13#include "clockdomain.h"
14
15/* These are implicit clockdomains - they are never defined as such in TRM */
16struct clockdomain prm_common_clkdm = {
17 .name = "prm_clkdm",
18 .pwrdm = { .name = "wkup_pwrdm" },
19};
20
21struct clockdomain cm_common_clkdm = {
22 .name = "cm_clkdm",
23 .pwrdm = { .name = "core_pwrdm" },
24};
diff --git a/arch/arm/mach-omap2/cm-regbits-34xx.h b/arch/arm/mach-omap2/cm-regbits-34xx.h
index b91275908f33..8083a8cdc55f 100644
--- a/arch/arm/mach-omap2/cm-regbits-34xx.h
+++ b/arch/arm/mach-omap2/cm-regbits-34xx.h
@@ -79,7 +79,7 @@
79 79
80/* CM_CLKSEL1_PLL_IVA2 */ 80/* CM_CLKSEL1_PLL_IVA2 */
81#define OMAP3430_IVA2_CLK_SRC_SHIFT 19 81#define OMAP3430_IVA2_CLK_SRC_SHIFT 19
82#define OMAP3430_IVA2_CLK_SRC_MASK (0x3 << 19) 82#define OMAP3430_IVA2_CLK_SRC_MASK (0x7 << 19)
83#define OMAP3430_IVA2_DPLL_MULT_SHIFT 8 83#define OMAP3430_IVA2_DPLL_MULT_SHIFT 8
84#define OMAP3430_IVA2_DPLL_MULT_MASK (0x7ff << 8) 84#define OMAP3430_IVA2_DPLL_MULT_MASK (0x7ff << 8)
85#define OMAP3430_IVA2_DPLL_DIV_SHIFT 0 85#define OMAP3430_IVA2_DPLL_DIV_SHIFT 0
@@ -124,7 +124,7 @@
124 124
125/* CM_CLKSEL1_PLL_MPU */ 125/* CM_CLKSEL1_PLL_MPU */
126#define OMAP3430_MPU_CLK_SRC_SHIFT 19 126#define OMAP3430_MPU_CLK_SRC_SHIFT 19
127#define OMAP3430_MPU_CLK_SRC_MASK (0x3 << 19) 127#define OMAP3430_MPU_CLK_SRC_MASK (0x7 << 19)
128#define OMAP3430_MPU_DPLL_MULT_SHIFT 8 128#define OMAP3430_MPU_DPLL_MULT_SHIFT 8
129#define OMAP3430_MPU_DPLL_MULT_MASK (0x7ff << 8) 129#define OMAP3430_MPU_DPLL_MULT_MASK (0x7ff << 8)
130#define OMAP3430_MPU_DPLL_DIV_SHIFT 0 130#define OMAP3430_MPU_DPLL_DIV_SHIFT 0
diff --git a/arch/arm/mach-omap2/cminst44xx.c b/arch/arm/mach-omap2/cminst44xx.c
index bd8810c3753f..8c86d294b1a3 100644
--- a/arch/arm/mach-omap2/cminst44xx.c
+++ b/arch/arm/mach-omap2/cminst44xx.c
@@ -32,6 +32,7 @@
32#include "prcm44xx.h" 32#include "prcm44xx.h"
33#include "prm44xx.h" 33#include "prm44xx.h"
34#include "prcm_mpu44xx.h" 34#include "prcm_mpu44xx.h"
35#include "prcm-common.h"
35 36
36/* 37/*
37 * CLKCTRL_IDLEST_*: possible values for the CM_*_CLKCTRL.IDLEST bitfield: 38 * CLKCTRL_IDLEST_*: possible values for the CM_*_CLKCTRL.IDLEST bitfield:
@@ -49,14 +50,21 @@
49#define CLKCTRL_IDLEST_INTERFACE_IDLE 0x2 50#define CLKCTRL_IDLEST_INTERFACE_IDLE 0x2
50#define CLKCTRL_IDLEST_DISABLED 0x3 51#define CLKCTRL_IDLEST_DISABLED 0x3
51 52
52static u32 _cm_bases[OMAP4_MAX_PRCM_PARTITIONS] = { 53static void __iomem *_cm_bases[OMAP4_MAX_PRCM_PARTITIONS];
53 [OMAP4430_INVALID_PRCM_PARTITION] = 0, 54
54 [OMAP4430_PRM_PARTITION] = OMAP4430_PRM_BASE, 55/**
55 [OMAP4430_CM1_PARTITION] = OMAP4430_CM1_BASE, 56 * omap_cm_base_init - Populates the cm partitions
56 [OMAP4430_CM2_PARTITION] = OMAP4430_CM2_BASE, 57 *
57 [OMAP4430_SCRM_PARTITION] = 0, 58 * Populates the base addresses of the _cm_bases
58 [OMAP4430_PRCM_MPU_PARTITION] = OMAP4430_PRCM_MPU_BASE, 59 * array used for read/write of cm module registers.
59}; 60 */
61void omap_cm_base_init(void)
62{
63 _cm_bases[OMAP4430_PRM_PARTITION] = prm_base;
64 _cm_bases[OMAP4430_CM1_PARTITION] = cm_base;
65 _cm_bases[OMAP4430_CM2_PARTITION] = cm2_base;
66 _cm_bases[OMAP4430_PRCM_MPU_PARTITION] = prcm_mpu_base;
67}
60 68
61/* Private functions */ 69/* Private functions */
62 70
@@ -106,7 +114,7 @@ u32 omap4_cminst_read_inst_reg(u8 part, s16 inst, u16 idx)
106 BUG_ON(part >= OMAP4_MAX_PRCM_PARTITIONS || 114 BUG_ON(part >= OMAP4_MAX_PRCM_PARTITIONS ||
107 part == OMAP4430_INVALID_PRCM_PARTITION || 115 part == OMAP4430_INVALID_PRCM_PARTITION ||
108 !_cm_bases[part]); 116 !_cm_bases[part]);
109 return __raw_readl(OMAP2_L4_IO_ADDRESS(_cm_bases[part] + inst + idx)); 117 return __raw_readl(_cm_bases[part] + inst + idx);
110} 118}
111 119
112/* Write into a register in a CM instance */ 120/* Write into a register in a CM instance */
@@ -115,7 +123,7 @@ void omap4_cminst_write_inst_reg(u32 val, u8 part, s16 inst, u16 idx)
115 BUG_ON(part >= OMAP4_MAX_PRCM_PARTITIONS || 123 BUG_ON(part >= OMAP4_MAX_PRCM_PARTITIONS ||
116 part == OMAP4430_INVALID_PRCM_PARTITION || 124 part == OMAP4430_INVALID_PRCM_PARTITION ||
117 !_cm_bases[part]); 125 !_cm_bases[part]);
118 __raw_writel(val, OMAP2_L4_IO_ADDRESS(_cm_bases[part] + inst + idx)); 126 __raw_writel(val, _cm_bases[part] + inst + idx);
119} 127}
120 128
121/* Read-modify-write a register in CM1. Caller must lock */ 129/* Read-modify-write a register in CM1. Caller must lock */
diff --git a/arch/arm/mach-omap2/common.c b/arch/arm/mach-omap2/common.c
index 1549c11000d3..8a6953a34fe2 100644
--- a/arch/arm/mach-omap2/common.c
+++ b/arch/arm/mach-omap2/common.c
@@ -166,6 +166,7 @@ static struct omap_globals omap4_globals = {
166 .prm = OMAP2_L4_IO_ADDRESS(OMAP4430_PRM_BASE), 166 .prm = OMAP2_L4_IO_ADDRESS(OMAP4430_PRM_BASE),
167 .cm = OMAP2_L4_IO_ADDRESS(OMAP4430_CM_BASE), 167 .cm = OMAP2_L4_IO_ADDRESS(OMAP4430_CM_BASE),
168 .cm2 = OMAP2_L4_IO_ADDRESS(OMAP4430_CM2_BASE), 168 .cm2 = OMAP2_L4_IO_ADDRESS(OMAP4430_CM2_BASE),
169 .prcm_mpu = OMAP2_L4_IO_ADDRESS(OMAP4430_PRCM_MPU_BASE),
169}; 170};
170 171
171void __init omap2_set_globals_443x(void) 172void __init omap2_set_globals_443x(void)
diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h
index f14b3aec58cc..d6c9e6180318 100644
--- a/arch/arm/mach-omap2/common.h
+++ b/arch/arm/mach-omap2/common.h
@@ -112,6 +112,7 @@ struct omap_globals {
112 void __iomem *prm; /* Power and Reset Management */ 112 void __iomem *prm; /* Power and Reset Management */
113 void __iomem *cm; /* Clock Management */ 113 void __iomem *cm; /* Clock Management */
114 void __iomem *cm2; 114 void __iomem *cm2;
115 void __iomem *prcm_mpu;
115}; 116};
116 117
117void omap2_set_globals_242x(void); 118void omap2_set_globals_242x(void);
diff --git a/arch/arm/mach-omap2/dpll3xxx.c b/arch/arm/mach-omap2/dpll3xxx.c
index fc56745676fa..f0f10beeffe8 100644
--- a/arch/arm/mach-omap2/dpll3xxx.c
+++ b/arch/arm/mach-omap2/dpll3xxx.c
@@ -142,7 +142,8 @@ static int _omap3_noncore_dpll_lock(struct clk *clk)
142 142
143 ai = omap3_dpll_autoidle_read(clk); 143 ai = omap3_dpll_autoidle_read(clk);
144 144
145 omap3_dpll_deny_idle(clk); 145 if (ai)
146 omap3_dpll_deny_idle(clk);
146 147
147 _omap3_dpll_write_clken(clk, DPLL_LOCKED); 148 _omap3_dpll_write_clken(clk, DPLL_LOCKED);
148 149
@@ -186,8 +187,6 @@ static int _omap3_noncore_dpll_bypass(struct clk *clk)
186 187
187 if (ai) 188 if (ai)
188 omap3_dpll_allow_idle(clk); 189 omap3_dpll_allow_idle(clk);
189 else
190 omap3_dpll_deny_idle(clk);
191 190
192 return r; 191 return r;
193} 192}
@@ -216,8 +215,6 @@ static int _omap3_noncore_dpll_stop(struct clk *clk)
216 215
217 if (ai) 216 if (ai)
218 omap3_dpll_allow_idle(clk); 217 omap3_dpll_allow_idle(clk);
219 else
220 omap3_dpll_deny_idle(clk);
221 218
222 return 0; 219 return 0;
223} 220}
@@ -519,6 +516,9 @@ u32 omap3_dpll_autoidle_read(struct clk *clk)
519 516
520 dd = clk->dpll_data; 517 dd = clk->dpll_data;
521 518
519 if (!dd->autoidle_reg)
520 return -EINVAL;
521
522 v = __raw_readl(dd->autoidle_reg); 522 v = __raw_readl(dd->autoidle_reg);
523 v &= dd->autoidle_mask; 523 v &= dd->autoidle_mask;
524 v >>= __ffs(dd->autoidle_mask); 524 v >>= __ffs(dd->autoidle_mask);
@@ -545,6 +545,12 @@ void omap3_dpll_allow_idle(struct clk *clk)
545 545
546 dd = clk->dpll_data; 546 dd = clk->dpll_data;
547 547
548 if (!dd->autoidle_reg) {
549 pr_debug("clock: DPLL %s: autoidle not supported\n",
550 clk->name);
551 return;
552 }
553
548 /* 554 /*
549 * REVISIT: CORE DPLL can optionally enter low-power bypass 555 * REVISIT: CORE DPLL can optionally enter low-power bypass
550 * by writing 0x5 instead of 0x1. Add some mechanism to 556 * by writing 0x5 instead of 0x1. Add some mechanism to
@@ -554,6 +560,7 @@ void omap3_dpll_allow_idle(struct clk *clk)
554 v &= ~dd->autoidle_mask; 560 v &= ~dd->autoidle_mask;
555 v |= DPLL_AUTOIDLE_LOW_POWER_STOP << __ffs(dd->autoidle_mask); 561 v |= DPLL_AUTOIDLE_LOW_POWER_STOP << __ffs(dd->autoidle_mask);
556 __raw_writel(v, dd->autoidle_reg); 562 __raw_writel(v, dd->autoidle_reg);
563
557} 564}
558 565
559/** 566/**
@@ -572,6 +579,12 @@ void omap3_dpll_deny_idle(struct clk *clk)
572 579
573 dd = clk->dpll_data; 580 dd = clk->dpll_data;
574 581
582 if (!dd->autoidle_reg) {
583 pr_debug("clock: DPLL %s: autoidle not supported\n",
584 clk->name);
585 return;
586 }
587
575 v = __raw_readl(dd->autoidle_reg); 588 v = __raw_readl(dd->autoidle_reg);
576 v &= ~dd->autoidle_mask; 589 v &= ~dd->autoidle_mask;
577 v |= DPLL_AUTOIDLE_DISABLE << __ffs(dd->autoidle_mask); 590 v |= DPLL_AUTOIDLE_DISABLE << __ffs(dd->autoidle_mask);
diff --git a/arch/arm/mach-omap2/hdq1w.c b/arch/arm/mach-omap2/hdq1w.c
new file mode 100644
index 000000000000..297ebe03f09c
--- /dev/null
+++ b/arch/arm/mach-omap2/hdq1w.c
@@ -0,0 +1,72 @@
1/*
2 * IP block integration code for the HDQ1W/1-wire IP block
3 *
4 * Copyright (C) 2012 Texas Instruments, Inc.
5 * Paul Walmsley
6 *
7 * Based on the I2C reset code in arch/arm/mach-omap2/i2c.c by
8 * Avinash.H.M <avinashhm@ti.com>
9 *
10 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License
12 * version 2 as published by the Free Software Foundation.
13 *
14 * This program is distributed in the hope that it will be useful, but
15 * WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
22 * 02110-1301 USA
23 */
24
25#include <plat/omap_hwmod.h>
26#include <plat/hdq1w.h>
27
28#include "common.h"
29
30/* Maximum microseconds to wait for OMAP module to softreset */
31#define MAX_MODULE_SOFTRESET_WAIT 10000
32
33/**
34 * omap_hdq1w_reset - reset the OMAP HDQ1W module
35 * @oh: struct omap_hwmod *
36 *
37 * OCP soft reset the HDQ1W IP block. Section 20.6.1.4 "HDQ1W/1-Wire
38 * Software Reset" of the OMAP34xx Technical Reference Manual Revision
39 * ZR (SWPU223R) does not include the rather important fact that, for
40 * the reset to succeed, the HDQ1W module's internal clock gate must be
41 * programmed to allow the clock to propagate to the rest of the
42 * module. In this sense, it's rather similar to the I2C custom reset
43 * function. Returns 0.
44 */
45int omap_hdq1w_reset(struct omap_hwmod *oh)
46{
47 u32 v;
48 int c = 0;
49
50 /* Write to the SOFTRESET bit */
51 omap_hwmod_softreset(oh);
52
53 /* Enable the module's internal clocks */
54 v = omap_hwmod_read(oh, HDQ_CTRL_STATUS_OFFSET);
55 v |= 1 << HDQ_CTRL_STATUS_CLOCKENABLE_SHIFT;
56 omap_hwmod_write(v, oh, HDQ_CTRL_STATUS_OFFSET);
57
58 /* Poll on RESETDONE bit */
59 omap_test_timeout((omap_hwmod_read(oh,
60 oh->class->sysc->syss_offs)
61 & SYSS_RESETDONE_MASK),
62 MAX_MODULE_SOFTRESET_WAIT, c);
63
64 if (c == MAX_MODULE_SOFTRESET_WAIT)
65 pr_warning("%s: %s: softreset failed (waited %d usec)\n",
66 __func__, oh->name, MAX_MODULE_SOFTRESET_WAIT);
67 else
68 pr_debug("%s: %s: softreset in %d usec\n", __func__,
69 oh->name, c);
70
71 return 0;
72}
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c
index 2d5a57669a79..4b9491aa36fa 100644
--- a/arch/arm/mach-omap2/io.c
+++ b/arch/arm/mach-omap2/io.c
@@ -364,24 +364,6 @@ static void __init omap_hwmod_init_postsetup(void)
364#endif 364#endif
365 omap_hwmod_for_each(_set_hwmod_postsetup_state, &postsetup_state); 365 omap_hwmod_for_each(_set_hwmod_postsetup_state, &postsetup_state);
366 366
367 /*
368 * Set the default postsetup state for unusual modules (like
369 * MPU WDT).
370 *
371 * The postsetup_state is not actually used until
372 * omap_hwmod_late_init(), so boards that desire full watchdog
373 * coverage of kernel initialization can reprogram the
374 * postsetup_state between the calls to
375 * omap2_init_common_infra() and omap_sdrc_init().
376 *
377 * XXX ideally we could detect whether the MPU WDT was currently
378 * enabled here and make this conditional
379 */
380 postsetup_state = _HWMOD_STATE_DISABLED;
381 omap_hwmod_for_each_by_class("wd_timer",
382 _set_hwmod_postsetup_state,
383 &postsetup_state);
384
385 omap_pm_if_early_init(); 367 omap_pm_if_early_init();
386} 368}
387 369
diff --git a/arch/arm/mach-omap2/msdi.c b/arch/arm/mach-omap2/msdi.c
new file mode 100644
index 000000000000..ef2a6924731a
--- /dev/null
+++ b/arch/arm/mach-omap2/msdi.c
@@ -0,0 +1,88 @@
1/*
2 * MSDI IP block reset
3 *
4 * Copyright (C) 2012 Texas Instruments, Inc.
5 * Paul Walmsley
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * version 2 as published by the Free Software Foundation.
10 *
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
19 * 02110-1301 USA
20 *
21 * XXX What about pad muxing?
22 */
23
24#include <linux/kernel.h>
25
26#include <plat/omap_hwmod.h>
27#include <plat/mmc.h>
28
29#include "common.h"
30
31/*
32 * MSDI_CON_OFFSET: offset in bytes of the MSDI IP block's CON register
33 * from the IP block's base address
34 */
35#define MSDI_CON_OFFSET 0x0c
36
37/* Register bitfields in the CON register */
38#define MSDI_CON_POW_MASK BIT(11)
39#define MSDI_CON_CLKD_MASK (0x3f << 0)
40#define MSDI_CON_CLKD_SHIFT 0
41
42/* Maximum microseconds to wait for OMAP module to softreset */
43#define MAX_MODULE_SOFTRESET_WAIT 10000
44
45/* MSDI_TARGET_RESET_CLKD: clock divisor to use throughout the reset */
46#define MSDI_TARGET_RESET_CLKD 0x3ff
47
48/**
49 * omap_msdi_reset - reset the MSDI IP block
50 * @oh: struct omap_hwmod *
51 *
52 * The MSDI IP block on OMAP2420 has to have both the POW and CLKD
53 * fields set inside its CON register for a reset to complete
54 * successfully. This is not documented in the TRM. For CLKD, we use
55 * the value that results in the lowest possible clock rate, to attempt
56 * to avoid disturbing any cards.
57 */
58int omap_msdi_reset(struct omap_hwmod *oh)
59{
60 u16 v = 0;
61 int c = 0;
62
63 /* Write to the SOFTRESET bit */
64 omap_hwmod_softreset(oh);
65
66 /* Enable the MSDI core and internal clock */
67 v |= MSDI_CON_POW_MASK;
68 v |= MSDI_TARGET_RESET_CLKD << MSDI_CON_CLKD_SHIFT;
69 omap_hwmod_write(v, oh, MSDI_CON_OFFSET);
70
71 /* Poll on RESETDONE bit */
72 omap_test_timeout((omap_hwmod_read(oh, oh->class->sysc->syss_offs)
73 & SYSS_RESETDONE_MASK),
74 MAX_MODULE_SOFTRESET_WAIT, c);
75
76 if (c == MAX_MODULE_SOFTRESET_WAIT)
77 pr_warning("%s: %s: softreset failed (waited %d usec)\n",
78 __func__, oh->name, MAX_MODULE_SOFTRESET_WAIT);
79 else
80 pr_debug("%s: %s: softreset in %d usec\n", __func__,
81 oh->name, c);
82
83 /* Disable the MSDI internal clock */
84 v &= ~MSDI_CON_CLKD_MASK;
85 omap_hwmod_write(v, oh, MSDI_CON_OFFSET);
86
87 return 0;
88}
diff --git a/arch/arm/mach-omap2/omap_hwmod_2420_data.c b/arch/arm/mach-omap2/omap_hwmod_2420_data.c
index 2c087ffc6a92..a7640d1b215e 100644
--- a/arch/arm/mach-omap2/omap_hwmod_2420_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_2420_data.c
@@ -23,6 +23,7 @@
23#include <plat/dmtimer.h> 23#include <plat/dmtimer.h>
24#include <plat/l3_2xxx.h> 24#include <plat/l3_2xxx.h>
25#include <plat/l4_2xxx.h> 25#include <plat/l4_2xxx.h>
26#include <plat/mmc.h>
26 27
27#include "omap_hwmod_common_data.h" 28#include "omap_hwmod_common_data.h"
28 29
@@ -239,6 +240,67 @@ static struct omap_hwmod omap2420_mcbsp2_hwmod = {
239 }, 240 },
240}; 241};
241 242
243static struct omap_hwmod_class_sysconfig omap2420_msdi_sysc = {
244 .rev_offs = 0x3c,
245 .sysc_offs = 0x64,
246 .syss_offs = 0x68,
247 .sysc_flags = (SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
248 .sysc_fields = &omap_hwmod_sysc_type1,
249};
250
251static struct omap_hwmod_class omap2420_msdi_hwmod_class = {
252 .name = "msdi",
253 .sysc = &omap2420_msdi_sysc,
254 .reset = &omap_msdi_reset,
255};
256
257/* msdi1 */
258static struct omap_hwmod_irq_info omap2420_msdi1_irqs[] = {
259 { .irq = 83 },
260 { .irq = -1 }
261};
262
263static struct omap_hwmod_dma_info omap2420_msdi1_sdma_reqs[] = {
264 { .name = "tx", .dma_req = 61 }, /* OMAP24XX_DMA_MMC1_TX */
265 { .name = "rx", .dma_req = 62 }, /* OMAP24XX_DMA_MMC1_RX */
266 { .dma_req = -1 }
267};
268
269static struct omap_hwmod omap2420_msdi1_hwmod = {
270 .name = "msdi1",
271 .class = &omap2420_msdi_hwmod_class,
272 .mpu_irqs = omap2420_msdi1_irqs,
273 .sdma_reqs = omap2420_msdi1_sdma_reqs,
274 .main_clk = "mmc_fck",
275 .prcm = {
276 .omap2 = {
277 .prcm_reg_id = 1,
278 .module_bit = OMAP2420_EN_MMC_SHIFT,
279 .module_offs = CORE_MOD,
280 .idlest_reg_id = 1,
281 .idlest_idle_bit = OMAP2420_ST_MMC_SHIFT,
282 },
283 },
284 .flags = HWMOD_16BIT_REG,
285};
286
287/* HDQ1W/1-wire */
288static struct omap_hwmod omap2420_hdq1w_hwmod = {
289 .name = "hdq1w",
290 .mpu_irqs = omap2_hdq1w_mpu_irqs,
291 .main_clk = "hdq_fck",
292 .prcm = {
293 .omap2 = {
294 .module_offs = CORE_MOD,
295 .prcm_reg_id = 1,
296 .module_bit = OMAP24XX_EN_HDQ_SHIFT,
297 .idlest_reg_id = 1,
298 .idlest_idle_bit = OMAP24XX_ST_HDQ_SHIFT,
299 },
300 },
301 .class = &omap2_hdq1w_class,
302};
303
242/* 304/*
243 * interfaces 305 * interfaces
244 */ 306 */
@@ -428,6 +490,53 @@ static struct omap_hwmod_ocp_if omap2420_l4_core__mcbsp2 = {
428 .user = OCP_USER_MPU | OCP_USER_SDMA, 490 .user = OCP_USER_MPU | OCP_USER_SDMA,
429}; 491};
430 492
493static struct omap_hwmod_addr_space omap2420_msdi1_addrs[] = {
494 {
495 .pa_start = 0x4809c000,
496 .pa_end = 0x4809c000 + SZ_128 - 1,
497 .flags = ADDR_TYPE_RT,
498 },
499 { }
500};
501
502/* l4_core -> msdi1 */
503static struct omap_hwmod_ocp_if omap2420_l4_core__msdi1 = {
504 .master = &omap2xxx_l4_core_hwmod,
505 .slave = &omap2420_msdi1_hwmod,
506 .clk = "mmc_ick",
507 .addr = omap2420_msdi1_addrs,
508 .user = OCP_USER_MPU | OCP_USER_SDMA,
509};
510
511/* l4_core -> hdq1w interface */
512static struct omap_hwmod_ocp_if omap2420_l4_core__hdq1w = {
513 .master = &omap2xxx_l4_core_hwmod,
514 .slave = &omap2420_hdq1w_hwmod,
515 .clk = "hdq_ick",
516 .addr = omap2_hdq1w_addr_space,
517 .user = OCP_USER_MPU | OCP_USER_SDMA,
518 .flags = OMAP_FIREWALL_L4 | OCPIF_SWSUP_IDLE,
519};
520
521
522/* l4_wkup -> 32ksync_counter */
523static struct omap_hwmod_addr_space omap2420_counter_32k_addrs[] = {
524 {
525 .pa_start = 0x48004000,
526 .pa_end = 0x4800401f,
527 .flags = ADDR_TYPE_RT
528 },
529 { }
530};
531
532static struct omap_hwmod_ocp_if omap2420_l4_wkup__counter_32k = {
533 .master = &omap2xxx_l4_wkup_hwmod,
534 .slave = &omap2xxx_counter_32k_hwmod,
535 .clk = "sync_32k_ick",
536 .addr = omap2420_counter_32k_addrs,
537 .user = OCP_USER_MPU | OCP_USER_SDMA,
538};
539
431static struct omap_hwmod_ocp_if *omap2420_hwmod_ocp_ifs[] __initdata = { 540static struct omap_hwmod_ocp_if *omap2420_hwmod_ocp_ifs[] __initdata = {
432 &omap2xxx_l3_main__l4_core, 541 &omap2xxx_l3_main__l4_core,
433 &omap2xxx_mpu__l3_main, 542 &omap2xxx_mpu__l3_main,
@@ -468,6 +577,9 @@ static struct omap_hwmod_ocp_if *omap2420_hwmod_ocp_ifs[] __initdata = {
468 &omap2420_l4_core__mailbox, 577 &omap2420_l4_core__mailbox,
469 &omap2420_l4_core__mcbsp1, 578 &omap2420_l4_core__mcbsp1,
470 &omap2420_l4_core__mcbsp2, 579 &omap2420_l4_core__mcbsp2,
580 &omap2420_l4_core__msdi1,
581 &omap2420_l4_core__hdq1w,
582 &omap2420_l4_wkup__counter_32k,
471 NULL, 583 NULL,
472}; 584};
473 585
diff --git a/arch/arm/mach-omap2/omap_hwmod_2430_data.c b/arch/arm/mach-omap2/omap_hwmod_2430_data.c
index 71d9f8824f9d..4d7264981230 100644
--- a/arch/arm/mach-omap2/omap_hwmod_2430_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_2430_data.c
@@ -528,6 +528,23 @@ static struct omap_hwmod omap2430_mmc2_hwmod = {
528 .class = &omap2430_mmc_class, 528 .class = &omap2430_mmc_class,
529}; 529};
530 530
531/* HDQ1W/1-wire */
532static struct omap_hwmod omap2430_hdq1w_hwmod = {
533 .name = "hdq1w",
534 .mpu_irqs = omap2_hdq1w_mpu_irqs,
535 .main_clk = "hdq_fck",
536 .prcm = {
537 .omap2 = {
538 .module_offs = CORE_MOD,
539 .prcm_reg_id = 1,
540 .module_bit = OMAP24XX_EN_HDQ_SHIFT,
541 .idlest_reg_id = 1,
542 .idlest_idle_bit = OMAP24XX_ST_HDQ_SHIFT,
543 },
544 },
545 .class = &omap2_hdq1w_class,
546};
547
531/* 548/*
532 * interfaces 549 * interfaces
533 */ 550 */
@@ -838,6 +855,34 @@ static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp5 = {
838 .user = OCP_USER_MPU | OCP_USER_SDMA, 855 .user = OCP_USER_MPU | OCP_USER_SDMA,
839}; 856};
840 857
858/* l4_core -> hdq1w */
859static struct omap_hwmod_ocp_if omap2430_l4_core__hdq1w = {
860 .master = &omap2xxx_l4_core_hwmod,
861 .slave = &omap2430_hdq1w_hwmod,
862 .clk = "hdq_ick",
863 .addr = omap2_hdq1w_addr_space,
864 .user = OCP_USER_MPU | OCP_USER_SDMA,
865 .flags = OMAP_FIREWALL_L4 | OCPIF_SWSUP_IDLE,
866};
867
868/* l4_wkup -> 32ksync_counter */
869static struct omap_hwmod_addr_space omap2430_counter_32k_addrs[] = {
870 {
871 .pa_start = 0x49020000,
872 .pa_end = 0x4902001f,
873 .flags = ADDR_TYPE_RT
874 },
875 { }
876};
877
878static struct omap_hwmod_ocp_if omap2430_l4_wkup__counter_32k = {
879 .master = &omap2xxx_l4_wkup_hwmod,
880 .slave = &omap2xxx_counter_32k_hwmod,
881 .clk = "sync_32k_ick",
882 .addr = omap2430_counter_32k_addrs,
883 .user = OCP_USER_MPU | OCP_USER_SDMA,
884};
885
841static struct omap_hwmod_ocp_if *omap2430_hwmod_ocp_ifs[] __initdata = { 886static struct omap_hwmod_ocp_if *omap2430_hwmod_ocp_ifs[] __initdata = {
842 &omap2xxx_l3_main__l4_core, 887 &omap2xxx_l3_main__l4_core,
843 &omap2xxx_mpu__l3_main, 888 &omap2xxx_mpu__l3_main,
@@ -886,6 +931,8 @@ static struct omap_hwmod_ocp_if *omap2430_hwmod_ocp_ifs[] __initdata = {
886 &omap2430_l4_core__mcbsp3, 931 &omap2430_l4_core__mcbsp3,
887 &omap2430_l4_core__mcbsp4, 932 &omap2430_l4_core__mcbsp4,
888 &omap2430_l4_core__mcbsp5, 933 &omap2430_l4_core__mcbsp5,
934 &omap2430_l4_core__hdq1w,
935 &omap2430_l4_wkup__counter_32k,
889 NULL, 936 NULL,
890}; 937};
891 938
diff --git a/arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_interconnect_data.c b/arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_interconnect_data.c
index 04637fabadd2..cbb4ef6544ad 100644
--- a/arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_interconnect_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_interconnect_data.c
@@ -171,3 +171,12 @@ struct omap_hwmod_addr_space omap2_mcbsp1_addrs[] = {
171 }, 171 },
172 { } 172 { }
173}; 173};
174
175struct omap_hwmod_addr_space omap2_hdq1w_addr_space[] = {
176 {
177 .pa_start = 0x480b2000,
178 .pa_end = 0x480b2fff,
179 .flags = ADDR_TYPE_RT,
180 },
181 { }
182};
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 f08e442af397..102d76e9e9ea 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
@@ -2,6 +2,7 @@
2 * omap_hwmod_2xxx_3xxx_ipblock_data.c - common IP block data for OMAP2/3 2 * omap_hwmod_2xxx_3xxx_ipblock_data.c - common IP block data for OMAP2/3
3 * 3 *
4 * Copyright (C) 2011 Nokia Corporation 4 * Copyright (C) 2011 Nokia Corporation
5 * Copyright (C) 2012 Texas Instruments, Inc.
5 * Paul Walmsley 6 * Paul Walmsley
6 * 7 *
7 * This program is free software; you can redistribute it and/or modify 8 * This program is free software; you can redistribute it and/or modify
@@ -12,6 +13,7 @@
12#include <plat/serial.h> 13#include <plat/serial.h>
13#include <plat/dma.h> 14#include <plat/dma.h>
14#include <plat/common.h> 15#include <plat/common.h>
16#include <plat/hdq1w.h>
15 17
16#include <mach/irqs.h> 18#include <mach/irqs.h>
17 19
@@ -302,3 +304,23 @@ struct omap_hwmod_irq_info omap2_mcspi2_mpu_irqs[] = {
302 { .irq = -1 } 304 { .irq = -1 }
303}; 305};
304 306
307struct omap_hwmod_class_sysconfig omap2_hdq1w_sysc = {
308 .rev_offs = 0x0,
309 .sysc_offs = 0x14,
310 .syss_offs = 0x18,
311 .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
312 SYSS_HAS_RESET_STATUS),
313 .sysc_fields = &omap_hwmod_sysc_type1,
314};
315
316struct omap_hwmod_class omap2_hdq1w_class = {
317 .name = "hdq1w",
318 .sysc = &omap2_hdq1w_sysc,
319 .reset = &omap_hdq1w_reset,
320};
321
322struct omap_hwmod_irq_info omap2_hdq1w_mpu_irqs[] = {
323 { .irq = 58, },
324 { .irq = -1 }
325};
326
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 45aaa07e3025..83eafd96ecaa 100644
--- a/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c
@@ -89,7 +89,8 @@ static struct omap_hwmod_class_sysconfig omap2xxx_wd_timer_sysc = {
89struct omap_hwmod_class omap2xxx_wd_timer_hwmod_class = { 89struct omap_hwmod_class omap2xxx_wd_timer_hwmod_class = {
90 .name = "wd_timer", 90 .name = "wd_timer",
91 .sysc = &omap2xxx_wd_timer_sysc, 91 .sysc = &omap2xxx_wd_timer_sysc,
92 .pre_shutdown = &omap2_wd_timer_disable 92 .pre_shutdown = &omap2_wd_timer_disable,
93 .reset = &omap2_wd_timer_reset,
93}; 94};
94 95
95/* 96/*
@@ -732,3 +733,23 @@ struct omap_hwmod omap2xxx_mcspi2_hwmod = {
732 .class = &omap2xxx_mcspi_class, 733 .class = &omap2xxx_mcspi_class,
733 .dev_attr = &omap_mcspi2_dev_attr, 734 .dev_attr = &omap_mcspi2_dev_attr,
734}; 735};
736
737
738static struct omap_hwmod_class omap2xxx_counter_hwmod_class = {
739 .name = "counter",
740};
741
742struct omap_hwmod omap2xxx_counter_32k_hwmod = {
743 .name = "counter_32k",
744 .main_clk = "func_32k_ck",
745 .prcm = {
746 .omap2 = {
747 .module_offs = WKUP_MOD,
748 .prcm_reg_id = 1,
749 .module_bit = OMAP24XX_ST_32KSYNC_SHIFT,
750 .idlest_reg_id = 1,
751 .idlest_idle_bit = OMAP24XX_ST_32KSYNC_SHIFT,
752 },
753 },
754 .class = &omap2xxx_counter_hwmod_class,
755};
diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
index 0c65079c2b69..fd48797fa95a 100644
--- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
@@ -418,7 +418,8 @@ static struct omap_hwmod_class_sysconfig i2c_sysc = {
418static struct omap_hwmod_class omap3xxx_wd_timer_hwmod_class = { 418static struct omap_hwmod_class omap3xxx_wd_timer_hwmod_class = {
419 .name = "wd_timer", 419 .name = "wd_timer",
420 .sysc = &omap3xxx_wd_timer_sysc, 420 .sysc = &omap3xxx_wd_timer_sysc,
421 .pre_shutdown = &omap2_wd_timer_disable 421 .pre_shutdown = &omap2_wd_timer_disable,
422 .reset = &omap2_wd_timer_reset,
422}; 423};
423 424
424static struct omap_hwmod omap3xxx_wd_timer2_hwmod = { 425static struct omap_hwmod omap3xxx_wd_timer2_hwmod = {
@@ -1075,7 +1076,7 @@ static struct omap_hwmod_class omap3xxx_mcbsp_hwmod_class = {
1075 1076
1076/* mcbsp1 */ 1077/* mcbsp1 */
1077static struct omap_hwmod_irq_info omap3xxx_mcbsp1_irqs[] = { 1078static struct omap_hwmod_irq_info omap3xxx_mcbsp1_irqs[] = {
1078 { .name = "irq", .irq = 16 }, 1079 { .name = "common", .irq = 16 },
1079 { .name = "tx", .irq = 59 }, 1080 { .name = "tx", .irq = 59 },
1080 { .name = "rx", .irq = 60 }, 1081 { .name = "rx", .irq = 60 },
1081 { .irq = -1 } 1082 { .irq = -1 }
@@ -1100,7 +1101,7 @@ static struct omap_hwmod omap3xxx_mcbsp1_hwmod = {
1100 1101
1101/* mcbsp2 */ 1102/* mcbsp2 */
1102static struct omap_hwmod_irq_info omap3xxx_mcbsp2_irqs[] = { 1103static struct omap_hwmod_irq_info omap3xxx_mcbsp2_irqs[] = {
1103 { .name = "irq", .irq = 17 }, 1104 { .name = "common", .irq = 17 },
1104 { .name = "tx", .irq = 62 }, 1105 { .name = "tx", .irq = 62 },
1105 { .name = "rx", .irq = 63 }, 1106 { .name = "rx", .irq = 63 },
1106 { .irq = -1 } 1107 { .irq = -1 }
@@ -1130,7 +1131,7 @@ static struct omap_hwmod omap3xxx_mcbsp2_hwmod = {
1130 1131
1131/* mcbsp3 */ 1132/* mcbsp3 */
1132static struct omap_hwmod_irq_info omap3xxx_mcbsp3_irqs[] = { 1133static struct omap_hwmod_irq_info omap3xxx_mcbsp3_irqs[] = {
1133 { .name = "irq", .irq = 22 }, 1134 { .name = "common", .irq = 22 },
1134 { .name = "tx", .irq = 89 }, 1135 { .name = "tx", .irq = 89 },
1135 { .name = "rx", .irq = 90 }, 1136 { .name = "rx", .irq = 90 },
1136 { .irq = -1 } 1137 { .irq = -1 }
@@ -1160,7 +1161,7 @@ static struct omap_hwmod omap3xxx_mcbsp3_hwmod = {
1160 1161
1161/* mcbsp4 */ 1162/* mcbsp4 */
1162static struct omap_hwmod_irq_info omap3xxx_mcbsp4_irqs[] = { 1163static struct omap_hwmod_irq_info omap3xxx_mcbsp4_irqs[] = {
1163 { .name = "irq", .irq = 23 }, 1164 { .name = "common", .irq = 23 },
1164 { .name = "tx", .irq = 54 }, 1165 { .name = "tx", .irq = 54 },
1165 { .name = "rx", .irq = 55 }, 1166 { .name = "rx", .irq = 55 },
1166 { .irq = -1 } 1167 { .irq = -1 }
@@ -1191,7 +1192,7 @@ static struct omap_hwmod omap3xxx_mcbsp4_hwmod = {
1191 1192
1192/* mcbsp5 */ 1193/* mcbsp5 */
1193static struct omap_hwmod_irq_info omap3xxx_mcbsp5_irqs[] = { 1194static struct omap_hwmod_irq_info omap3xxx_mcbsp5_irqs[] = {
1194 { .name = "irq", .irq = 27 }, 1195 { .name = "common", .irq = 27 },
1195 { .name = "tx", .irq = 81 }, 1196 { .name = "tx", .irq = 81 },
1196 { .name = "rx", .irq = 82 }, 1197 { .name = "rx", .irq = 82 },
1197 { .irq = -1 } 1198 { .irq = -1 }
@@ -1980,6 +1981,56 @@ static struct omap_hwmod omap3xxx_usb_tll_hs_hwmod = {
1980 }, 1981 },
1981}; 1982};
1982 1983
1984static struct omap_hwmod omap3xxx_hdq1w_hwmod = {
1985 .name = "hdq1w",
1986 .mpu_irqs = omap2_hdq1w_mpu_irqs,
1987 .main_clk = "hdq_fck",
1988 .prcm = {
1989 .omap2 = {
1990 .module_offs = CORE_MOD,
1991 .prcm_reg_id = 1,
1992 .module_bit = OMAP3430_EN_HDQ_SHIFT,
1993 .idlest_reg_id = 1,
1994 .idlest_idle_bit = OMAP3430_ST_HDQ_SHIFT,
1995 },
1996 },
1997 .class = &omap2_hdq1w_class,
1998};
1999
2000/*
2001 * '32K sync counter' class
2002 * 32-bit ordinary counter, clocked by the falling edge of the 32 khz clock
2003 */
2004static struct omap_hwmod_class_sysconfig omap3xxx_counter_sysc = {
2005 .rev_offs = 0x0000,
2006 .sysc_offs = 0x0004,
2007 .sysc_flags = SYSC_HAS_SIDLEMODE,
2008 .idlemodes = (SIDLE_FORCE | SIDLE_NO),
2009 .sysc_fields = &omap_hwmod_sysc_type1,
2010};
2011
2012static struct omap_hwmod_class omap3xxx_counter_hwmod_class = {
2013 .name = "counter",
2014 .sysc = &omap3xxx_counter_sysc,
2015};
2016
2017static struct omap_hwmod omap3xxx_counter_32k_hwmod = {
2018 .name = "counter_32k",
2019 .class = &omap3xxx_counter_hwmod_class,
2020 .clkdm_name = "wkup_clkdm",
2021 .flags = HWMOD_SWSUP_SIDLE,
2022 .main_clk = "wkup_32k_fck",
2023 .prcm = {
2024 .omap2 = {
2025 .module_offs = WKUP_MOD,
2026 .prcm_reg_id = 1,
2027 .module_bit = OMAP3430_ST_32KSYNC_SHIFT,
2028 .idlest_reg_id = 1,
2029 .idlest_idle_bit = OMAP3430_ST_32KSYNC_SHIFT,
2030 },
2031 },
2032};
2033
1983/* 2034/*
1984 * interfaces 2035 * interfaces
1985 */ 2036 */
@@ -3059,6 +3110,34 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_core__usb_tll_hs = {
3059 .user = OCP_USER_MPU | OCP_USER_SDMA, 3110 .user = OCP_USER_MPU | OCP_USER_SDMA,
3060}; 3111};
3061 3112
3113/* l4_core -> hdq1w interface */
3114static struct omap_hwmod_ocp_if omap3xxx_l4_core__hdq1w = {
3115 .master = &omap3xxx_l4_core_hwmod,
3116 .slave = &omap3xxx_hdq1w_hwmod,
3117 .clk = "hdq_ick",
3118 .addr = omap2_hdq1w_addr_space,
3119 .user = OCP_USER_MPU | OCP_USER_SDMA,
3120 .flags = OMAP_FIREWALL_L4 | OCPIF_SWSUP_IDLE,
3121};
3122
3123/* l4_wkup -> 32ksync_counter */
3124static struct omap_hwmod_addr_space omap3xxx_counter_32k_addrs[] = {
3125 {
3126 .pa_start = 0x48320000,
3127 .pa_end = 0x4832001f,
3128 .flags = ADDR_TYPE_RT
3129 },
3130 { }
3131};
3132
3133static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__counter_32k = {
3134 .master = &omap3xxx_l4_wkup_hwmod,
3135 .slave = &omap3xxx_counter_32k_hwmod,
3136 .clk = "omap_32ksync_ick",
3137 .addr = omap3xxx_counter_32k_addrs,
3138 .user = OCP_USER_MPU | OCP_USER_SDMA,
3139};
3140
3062static struct omap_hwmod_ocp_if *omap3xxx_hwmod_ocp_ifs[] __initdata = { 3141static struct omap_hwmod_ocp_if *omap3xxx_hwmod_ocp_ifs[] __initdata = {
3063 &omap3xxx_l3_main__l4_core, 3142 &omap3xxx_l3_main__l4_core,
3064 &omap3xxx_l3_main__l4_per, 3143 &omap3xxx_l3_main__l4_per,
@@ -3103,6 +3182,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_hwmod_ocp_ifs[] __initdata = {
3103 &omap34xx_l4_core__mcspi2, 3182 &omap34xx_l4_core__mcspi2,
3104 &omap34xx_l4_core__mcspi3, 3183 &omap34xx_l4_core__mcspi3,
3105 &omap34xx_l4_core__mcspi4, 3184 &omap34xx_l4_core__mcspi4,
3185 &omap3xxx_l4_wkup__counter_32k,
3106 NULL, 3186 NULL,
3107}; 3187};
3108 3188
@@ -3151,6 +3231,7 @@ static struct omap_hwmod_ocp_if *omap34xx_hwmod_ocp_ifs[] __initdata = {
3151 &omap34xx_l4_core__sr1, 3231 &omap34xx_l4_core__sr1,
3152 &omap34xx_l4_core__sr2, 3232 &omap34xx_l4_core__sr2,
3153 &omap3xxx_l4_core__mailbox, 3233 &omap3xxx_l4_core__mailbox,
3234 &omap3xxx_l4_core__hdq1w,
3154 NULL 3235 NULL
3155}; 3236};
3156 3237
@@ -3170,6 +3251,7 @@ static struct omap_hwmod_ocp_if *omap36xx_hwmod_ocp_ifs[] __initdata = {
3170 &omap3xxx_l4_core__usb_tll_hs, 3251 &omap3xxx_l4_core__usb_tll_hs,
3171 &omap3xxx_l4_core__es3plus_mmc1, 3252 &omap3xxx_l4_core__es3plus_mmc1,
3172 &omap3xxx_l4_core__es3plus_mmc2, 3253 &omap3xxx_l4_core__es3plus_mmc2,
3254 &omap3xxx_l4_core__hdq1w,
3173 NULL 3255 NULL
3174}; 3256};
3175 3257
diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
index 0d91dec5b4bc..950454a3fa31 100644
--- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
@@ -51,6 +51,27 @@
51 */ 51 */
52 52
53/* 53/*
54 * 'c2c_target_fw' class
55 * instance(s): c2c_target_fw
56 */
57static struct omap_hwmod_class omap44xx_c2c_target_fw_hwmod_class = {
58 .name = "c2c_target_fw",
59};
60
61/* c2c_target_fw */
62static struct omap_hwmod omap44xx_c2c_target_fw_hwmod = {
63 .name = "c2c_target_fw",
64 .class = &omap44xx_c2c_target_fw_hwmod_class,
65 .clkdm_name = "d2d_clkdm",
66 .prcm = {
67 .omap4 = {
68 .clkctrl_offs = OMAP4_CM_D2D_SAD2D_FW_CLKCTRL_OFFSET,
69 .context_offs = OMAP4_RM_D2D_SAD2D_FW_CONTEXT_OFFSET,
70 },
71 },
72};
73
74/*
54 * 'dmm' class 75 * 'dmm' class
55 * instance(s): dmm 76 * instance(s): dmm
56 */ 77 */
@@ -242,6 +263,28 @@ static struct omap_hwmod omap44xx_mpu_private_hwmod = {
242}; 263};
243 264
244/* 265/*
266 * 'ocp_wp_noc' class
267 * instance(s): ocp_wp_noc
268 */
269static struct omap_hwmod_class omap44xx_ocp_wp_noc_hwmod_class = {
270 .name = "ocp_wp_noc",
271};
272
273/* ocp_wp_noc */
274static struct omap_hwmod omap44xx_ocp_wp_noc_hwmod = {
275 .name = "ocp_wp_noc",
276 .class = &omap44xx_ocp_wp_noc_hwmod_class,
277 .clkdm_name = "l3_instr_clkdm",
278 .prcm = {
279 .omap4 = {
280 .clkctrl_offs = OMAP4_CM_L3INSTR_OCP_WP1_CLKCTRL_OFFSET,
281 .context_offs = OMAP4_RM_L3INSTR_OCP_WP1_CONTEXT_OFFSET,
282 .modulemode = MODULEMODE_HWCTRL,
283 },
284 },
285};
286
287/*
245 * Modules omap_hwmod structures 288 * Modules omap_hwmod structures
246 * 289 *
247 * The following IPs are excluded for the moment because: 290 * The following IPs are excluded for the moment because:
@@ -249,41 +292,7 @@ static struct omap_hwmod omap44xx_mpu_private_hwmod = {
249 * - They still need to be validated with the driver 292 * - They still need to be validated with the driver
250 * properly adapted to omap_hwmod / omap_device 293 * properly adapted to omap_hwmod / omap_device
251 * 294 *
252 * c2c 295 * usim
253 * c2c_target_fw
254 * cm_core
255 * cm_core_aon
256 * ctrl_module_core
257 * ctrl_module_pad_core
258 * ctrl_module_pad_wkup
259 * ctrl_module_wkup
260 * debugss
261 * efuse_ctrl_cust
262 * efuse_ctrl_std
263 * elm
264 * emif1
265 * emif2
266 * fdif
267 * gpmc
268 * gpu
269 * hdq1w
270 * mcasp
271 * mpu_c0
272 * mpu_c1
273 * ocmc_ram
274 * ocp2scp_usb_phy
275 * ocp_wp_noc
276 * prcm_mpu
277 * prm
278 * scrm
279 * sl2if
280 * slimbus1
281 * slimbus2
282 * usb_host_fs
283 * usb_host_hs
284 * usb_phy_cm
285 * usb_tll_hs
286 * usim
287 */ 296 */
288 297
289/* 298/*
@@ -341,6 +350,41 @@ static struct omap_hwmod omap44xx_aess_hwmod = {
341}; 350};
342 351
343/* 352/*
353 * 'c2c' class
354 * chip 2 chip interface used to plug the ape soc (omap) with an external modem
355 * soc
356 */
357
358static struct omap_hwmod_class omap44xx_c2c_hwmod_class = {
359 .name = "c2c",
360};
361
362/* c2c */
363static struct omap_hwmod_irq_info omap44xx_c2c_irqs[] = {
364 { .irq = 88 + OMAP44XX_IRQ_GIC_START },
365 { .irq = -1 }
366};
367
368static struct omap_hwmod_dma_info omap44xx_c2c_sdma_reqs[] = {
369 { .dma_req = 68 + OMAP44XX_DMA_REQ_START },
370 { .dma_req = -1 }
371};
372
373static struct omap_hwmod omap44xx_c2c_hwmod = {
374 .name = "c2c",
375 .class = &omap44xx_c2c_hwmod_class,
376 .clkdm_name = "d2d_clkdm",
377 .mpu_irqs = omap44xx_c2c_irqs,
378 .sdma_reqs = omap44xx_c2c_sdma_reqs,
379 .prcm = {
380 .omap4 = {
381 .clkctrl_offs = OMAP4_CM_D2D_SAD2D_CLKCTRL_OFFSET,
382 .context_offs = OMAP4_RM_D2D_SAD2D_CONTEXT_OFFSET,
383 },
384 },
385};
386
387/*
344 * 'counter' class 388 * 'counter' class
345 * 32-bit ordinary counter, clocked by the falling edge of the 32 khz clock 389 * 32-bit ordinary counter, clocked by the falling edge of the 32 khz clock
346 */ 390 */
@@ -375,6 +419,83 @@ static struct omap_hwmod omap44xx_counter_32k_hwmod = {
375}; 419};
376 420
377/* 421/*
422 * 'ctrl_module' class
423 * attila core control module + core pad control module + wkup pad control
424 * module + attila wkup control module
425 */
426
427static struct omap_hwmod_class_sysconfig omap44xx_ctrl_module_sysc = {
428 .rev_offs = 0x0000,
429 .sysc_offs = 0x0010,
430 .sysc_flags = SYSC_HAS_SIDLEMODE,
431 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
432 SIDLE_SMART_WKUP),
433 .sysc_fields = &omap_hwmod_sysc_type2,
434};
435
436static struct omap_hwmod_class omap44xx_ctrl_module_hwmod_class = {
437 .name = "ctrl_module",
438 .sysc = &omap44xx_ctrl_module_sysc,
439};
440
441/* ctrl_module_core */
442static struct omap_hwmod_irq_info omap44xx_ctrl_module_core_irqs[] = {
443 { .irq = 8 + OMAP44XX_IRQ_GIC_START },
444 { .irq = -1 }
445};
446
447static struct omap_hwmod omap44xx_ctrl_module_core_hwmod = {
448 .name = "ctrl_module_core",
449 .class = &omap44xx_ctrl_module_hwmod_class,
450 .clkdm_name = "l4_cfg_clkdm",
451 .mpu_irqs = omap44xx_ctrl_module_core_irqs,
452};
453
454/* ctrl_module_pad_core */
455static struct omap_hwmod omap44xx_ctrl_module_pad_core_hwmod = {
456 .name = "ctrl_module_pad_core",
457 .class = &omap44xx_ctrl_module_hwmod_class,
458 .clkdm_name = "l4_cfg_clkdm",
459};
460
461/* ctrl_module_wkup */
462static struct omap_hwmod omap44xx_ctrl_module_wkup_hwmod = {
463 .name = "ctrl_module_wkup",
464 .class = &omap44xx_ctrl_module_hwmod_class,
465 .clkdm_name = "l4_wkup_clkdm",
466};
467
468/* ctrl_module_pad_wkup */
469static struct omap_hwmod omap44xx_ctrl_module_pad_wkup_hwmod = {
470 .name = "ctrl_module_pad_wkup",
471 .class = &omap44xx_ctrl_module_hwmod_class,
472 .clkdm_name = "l4_wkup_clkdm",
473};
474
475/*
476 * 'debugss' class
477 * debug and emulation sub system
478 */
479
480static struct omap_hwmod_class omap44xx_debugss_hwmod_class = {
481 .name = "debugss",
482};
483
484/* debugss */
485static struct omap_hwmod omap44xx_debugss_hwmod = {
486 .name = "debugss",
487 .class = &omap44xx_debugss_hwmod_class,
488 .clkdm_name = "emu_sys_clkdm",
489 .main_clk = "trace_clk_div_ck",
490 .prcm = {
491 .omap4 = {
492 .clkctrl_offs = OMAP4_CM_EMU_DEBUGSS_CLKCTRL_OFFSET,
493 .context_offs = OMAP4_RM_EMU_DEBUGSS_CONTEXT_OFFSET,
494 },
495 },
496};
497
498/*
378 * 'dma' class 499 * 'dma' class
379 * dma controller for data exchange between memory to memory (i.e. internal or 500 * dma controller for data exchange between memory to memory (i.e. internal or
380 * external memory) and gp peripherals to memory or memory to gp peripherals 501 * external memory) and gp peripherals to memory or memory to gp peripherals
@@ -816,6 +937,154 @@ static struct omap_hwmod omap44xx_dss_venc_hwmod = {
816}; 937};
817 938
818/* 939/*
940 * 'elm' class
941 * bch error location module
942 */
943
944static struct omap_hwmod_class_sysconfig omap44xx_elm_sysc = {
945 .rev_offs = 0x0000,
946 .sysc_offs = 0x0010,
947 .syss_offs = 0x0014,
948 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
949 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
950 SYSS_HAS_RESET_STATUS),
951 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
952 .sysc_fields = &omap_hwmod_sysc_type1,
953};
954
955static struct omap_hwmod_class omap44xx_elm_hwmod_class = {
956 .name = "elm",
957 .sysc = &omap44xx_elm_sysc,
958};
959
960/* elm */
961static struct omap_hwmod_irq_info omap44xx_elm_irqs[] = {
962 { .irq = 4 + OMAP44XX_IRQ_GIC_START },
963 { .irq = -1 }
964};
965
966static struct omap_hwmod omap44xx_elm_hwmod = {
967 .name = "elm",
968 .class = &omap44xx_elm_hwmod_class,
969 .clkdm_name = "l4_per_clkdm",
970 .mpu_irqs = omap44xx_elm_irqs,
971 .prcm = {
972 .omap4 = {
973 .clkctrl_offs = OMAP4_CM_L4PER_ELM_CLKCTRL_OFFSET,
974 .context_offs = OMAP4_RM_L4PER_ELM_CONTEXT_OFFSET,
975 },
976 },
977};
978
979/*
980 * 'emif' class
981 * external memory interface no1
982 */
983
984static struct omap_hwmod_class_sysconfig omap44xx_emif_sysc = {
985 .rev_offs = 0x0000,
986};
987
988static struct omap_hwmod_class omap44xx_emif_hwmod_class = {
989 .name = "emif",
990 .sysc = &omap44xx_emif_sysc,
991};
992
993/* emif1 */
994static struct omap_hwmod_irq_info omap44xx_emif1_irqs[] = {
995 { .irq = 110 + OMAP44XX_IRQ_GIC_START },
996 { .irq = -1 }
997};
998
999static struct omap_hwmod omap44xx_emif1_hwmod = {
1000 .name = "emif1",
1001 .class = &omap44xx_emif_hwmod_class,
1002 .clkdm_name = "l3_emif_clkdm",
1003 .flags = HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET,
1004 .mpu_irqs = omap44xx_emif1_irqs,
1005 .main_clk = "ddrphy_ck",
1006 .prcm = {
1007 .omap4 = {
1008 .clkctrl_offs = OMAP4_CM_MEMIF_EMIF_1_CLKCTRL_OFFSET,
1009 .context_offs = OMAP4_RM_MEMIF_EMIF_1_CONTEXT_OFFSET,
1010 .modulemode = MODULEMODE_HWCTRL,
1011 },
1012 },
1013};
1014
1015/* emif2 */
1016static struct omap_hwmod_irq_info omap44xx_emif2_irqs[] = {
1017 { .irq = 111 + OMAP44XX_IRQ_GIC_START },
1018 { .irq = -1 }
1019};
1020
1021static struct omap_hwmod omap44xx_emif2_hwmod = {
1022 .name = "emif2",
1023 .class = &omap44xx_emif_hwmod_class,
1024 .clkdm_name = "l3_emif_clkdm",
1025 .flags = HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET,
1026 .mpu_irqs = omap44xx_emif2_irqs,
1027 .main_clk = "ddrphy_ck",
1028 .prcm = {
1029 .omap4 = {
1030 .clkctrl_offs = OMAP4_CM_MEMIF_EMIF_2_CLKCTRL_OFFSET,
1031 .context_offs = OMAP4_RM_MEMIF_EMIF_2_CONTEXT_OFFSET,
1032 .modulemode = MODULEMODE_HWCTRL,
1033 },
1034 },
1035};
1036
1037/*
1038 * 'fdif' class
1039 * face detection hw accelerator module
1040 */
1041
1042static struct omap_hwmod_class_sysconfig omap44xx_fdif_sysc = {
1043 .rev_offs = 0x0000,
1044 .sysc_offs = 0x0010,
1045 /*
1046 * FDIF needs 100 OCP clk cycles delay after a softreset before
1047 * accessing sysconfig again.
1048 * The lowest frequency at the moment for L3 bus is 100 MHz, so
1049 * 1usec delay is needed. Add an x2 margin to be safe (2 usecs).
1050 *
1051 * TODO: Indicate errata when available.
1052 */
1053 .srst_udelay = 2,
1054 .sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_RESET_STATUS |
1055 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
1056 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1057 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
1058 .sysc_fields = &omap_hwmod_sysc_type2,
1059};
1060
1061static struct omap_hwmod_class omap44xx_fdif_hwmod_class = {
1062 .name = "fdif",
1063 .sysc = &omap44xx_fdif_sysc,
1064};
1065
1066/* fdif */
1067static struct omap_hwmod_irq_info omap44xx_fdif_irqs[] = {
1068 { .irq = 69 + OMAP44XX_IRQ_GIC_START },
1069 { .irq = -1 }
1070};
1071
1072static struct omap_hwmod omap44xx_fdif_hwmod = {
1073 .name = "fdif",
1074 .class = &omap44xx_fdif_hwmod_class,
1075 .clkdm_name = "iss_clkdm",
1076 .mpu_irqs = omap44xx_fdif_irqs,
1077 .main_clk = "fdif_fck",
1078 .prcm = {
1079 .omap4 = {
1080 .clkctrl_offs = OMAP4_CM_CAM_FDIF_CLKCTRL_OFFSET,
1081 .context_offs = OMAP4_RM_CAM_FDIF_CONTEXT_OFFSET,
1082 .modulemode = MODULEMODE_SWCTRL,
1083 },
1084 },
1085};
1086
1087/*
819 * 'gpio' class 1088 * 'gpio' class
820 * general purpose io module 1089 * general purpose io module
821 */ 1090 */
@@ -1018,6 +1287,135 @@ static struct omap_hwmod omap44xx_gpio6_hwmod = {
1018}; 1287};
1019 1288
1020/* 1289/*
1290 * 'gpmc' class
1291 * general purpose memory controller
1292 */
1293
1294static struct omap_hwmod_class_sysconfig omap44xx_gpmc_sysc = {
1295 .rev_offs = 0x0000,
1296 .sysc_offs = 0x0010,
1297 .syss_offs = 0x0014,
1298 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE |
1299 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
1300 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1301 .sysc_fields = &omap_hwmod_sysc_type1,
1302};
1303
1304static struct omap_hwmod_class omap44xx_gpmc_hwmod_class = {
1305 .name = "gpmc",
1306 .sysc = &omap44xx_gpmc_sysc,
1307};
1308
1309/* gpmc */
1310static struct omap_hwmod_irq_info omap44xx_gpmc_irqs[] = {
1311 { .irq = 20 + OMAP44XX_IRQ_GIC_START },
1312 { .irq = -1 }
1313};
1314
1315static struct omap_hwmod_dma_info omap44xx_gpmc_sdma_reqs[] = {
1316 { .dma_req = 3 + OMAP44XX_DMA_REQ_START },
1317 { .dma_req = -1 }
1318};
1319
1320static struct omap_hwmod omap44xx_gpmc_hwmod = {
1321 .name = "gpmc",
1322 .class = &omap44xx_gpmc_hwmod_class,
1323 .clkdm_name = "l3_2_clkdm",
1324 .flags = HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET,
1325 .mpu_irqs = omap44xx_gpmc_irqs,
1326 .sdma_reqs = omap44xx_gpmc_sdma_reqs,
1327 .prcm = {
1328 .omap4 = {
1329 .clkctrl_offs = OMAP4_CM_L3_2_GPMC_CLKCTRL_OFFSET,
1330 .context_offs = OMAP4_RM_L3_2_GPMC_CONTEXT_OFFSET,
1331 .modulemode = MODULEMODE_HWCTRL,
1332 },
1333 },
1334};
1335
1336/*
1337 * 'gpu' class
1338 * 2d/3d graphics accelerator
1339 */
1340
1341static struct omap_hwmod_class_sysconfig omap44xx_gpu_sysc = {
1342 .rev_offs = 0x1fc00,
1343 .sysc_offs = 0x1fc10,
1344 .sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_SIDLEMODE),
1345 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1346 SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
1347 MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
1348 .sysc_fields = &omap_hwmod_sysc_type2,
1349};
1350
1351static struct omap_hwmod_class omap44xx_gpu_hwmod_class = {
1352 .name = "gpu",
1353 .sysc = &omap44xx_gpu_sysc,
1354};
1355
1356/* gpu */
1357static struct omap_hwmod_irq_info omap44xx_gpu_irqs[] = {
1358 { .irq = 21 + OMAP44XX_IRQ_GIC_START },
1359 { .irq = -1 }
1360};
1361
1362static struct omap_hwmod omap44xx_gpu_hwmod = {
1363 .name = "gpu",
1364 .class = &omap44xx_gpu_hwmod_class,
1365 .clkdm_name = "l3_gfx_clkdm",
1366 .mpu_irqs = omap44xx_gpu_irqs,
1367 .main_clk = "gpu_fck",
1368 .prcm = {
1369 .omap4 = {
1370 .clkctrl_offs = OMAP4_CM_GFX_GFX_CLKCTRL_OFFSET,
1371 .context_offs = OMAP4_RM_GFX_GFX_CONTEXT_OFFSET,
1372 .modulemode = MODULEMODE_SWCTRL,
1373 },
1374 },
1375};
1376
1377/*
1378 * 'hdq1w' class
1379 * hdq / 1-wire serial interface controller
1380 */
1381
1382static struct omap_hwmod_class_sysconfig omap44xx_hdq1w_sysc = {
1383 .rev_offs = 0x0000,
1384 .sysc_offs = 0x0014,
1385 .syss_offs = 0x0018,
1386 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_SOFTRESET |
1387 SYSS_HAS_RESET_STATUS),
1388 .sysc_fields = &omap_hwmod_sysc_type1,
1389};
1390
1391static struct omap_hwmod_class omap44xx_hdq1w_hwmod_class = {
1392 .name = "hdq1w",
1393 .sysc = &omap44xx_hdq1w_sysc,
1394};
1395
1396/* hdq1w */
1397static struct omap_hwmod_irq_info omap44xx_hdq1w_irqs[] = {
1398 { .irq = 58 + OMAP44XX_IRQ_GIC_START },
1399 { .irq = -1 }
1400};
1401
1402static struct omap_hwmod omap44xx_hdq1w_hwmod = {
1403 .name = "hdq1w",
1404 .class = &omap44xx_hdq1w_hwmod_class,
1405 .clkdm_name = "l4_per_clkdm",
1406 .flags = HWMOD_INIT_NO_RESET, /* XXX temporary */
1407 .mpu_irqs = omap44xx_hdq1w_irqs,
1408 .main_clk = "hdq1w_fck",
1409 .prcm = {
1410 .omap4 = {
1411 .clkctrl_offs = OMAP4_CM_L4PER_HDQ1W_CLKCTRL_OFFSET,
1412 .context_offs = OMAP4_RM_L4PER_HDQ1W_CONTEXT_OFFSET,
1413 .modulemode = MODULEMODE_SWCTRL,
1414 },
1415 },
1416};
1417
1418/*
1021 * 'hsi' class 1419 * 'hsi' class
1022 * mipi high-speed synchronous serial interface (multichannel and full-duplex 1420 * mipi high-speed synchronous serial interface (multichannel and full-duplex
1023 * serial if) 1421 * serial if)
@@ -1089,7 +1487,8 @@ static struct omap_hwmod_class omap44xx_i2c_hwmod_class = {
1089}; 1487};
1090 1488
1091static struct omap_i2c_dev_attr i2c_dev_attr = { 1489static struct omap_i2c_dev_attr i2c_dev_attr = {
1092 .flags = OMAP_I2C_FLAG_BUS_SHIFT_NONE, 1490 .flags = OMAP_I2C_FLAG_BUS_SHIFT_NONE |
1491 OMAP_I2C_FLAG_RESET_REGS_POSTIDLE,
1093}; 1492};
1094 1493
1095/* i2c1 */ 1494/* i2c1 */
@@ -1441,6 +1840,58 @@ static struct omap_hwmod omap44xx_mailbox_hwmod = {
1441}; 1840};
1442 1841
1443/* 1842/*
1843 * 'mcasp' class
1844 * multi-channel audio serial port controller
1845 */
1846
1847/* The IP is not compliant to type1 / type2 scheme */
1848static struct omap_hwmod_sysc_fields omap_hwmod_sysc_type_mcasp = {
1849 .sidle_shift = 0,
1850};
1851
1852static struct omap_hwmod_class_sysconfig omap44xx_mcasp_sysc = {
1853 .sysc_offs = 0x0004,
1854 .sysc_flags = SYSC_HAS_SIDLEMODE,
1855 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1856 SIDLE_SMART_WKUP),
1857 .sysc_fields = &omap_hwmod_sysc_type_mcasp,
1858};
1859
1860static struct omap_hwmod_class omap44xx_mcasp_hwmod_class = {
1861 .name = "mcasp",
1862 .sysc = &omap44xx_mcasp_sysc,
1863};
1864
1865/* mcasp */
1866static struct omap_hwmod_irq_info omap44xx_mcasp_irqs[] = {
1867 { .name = "arevt", .irq = 108 + OMAP44XX_IRQ_GIC_START },
1868 { .name = "axevt", .irq = 109 + OMAP44XX_IRQ_GIC_START },
1869 { .irq = -1 }
1870};
1871
1872static struct omap_hwmod_dma_info omap44xx_mcasp_sdma_reqs[] = {
1873 { .name = "axevt", .dma_req = 7 + OMAP44XX_DMA_REQ_START },
1874 { .name = "arevt", .dma_req = 10 + OMAP44XX_DMA_REQ_START },
1875 { .dma_req = -1 }
1876};
1877
1878static struct omap_hwmod omap44xx_mcasp_hwmod = {
1879 .name = "mcasp",
1880 .class = &omap44xx_mcasp_hwmod_class,
1881 .clkdm_name = "abe_clkdm",
1882 .mpu_irqs = omap44xx_mcasp_irqs,
1883 .sdma_reqs = omap44xx_mcasp_sdma_reqs,
1884 .main_clk = "mcasp_fck",
1885 .prcm = {
1886 .omap4 = {
1887 .clkctrl_offs = OMAP4_CM1_ABE_MCASP_CLKCTRL_OFFSET,
1888 .context_offs = OMAP4_RM_ABE_MCASP_CONTEXT_OFFSET,
1889 .modulemode = MODULEMODE_SWCTRL,
1890 },
1891 },
1892};
1893
1894/*
1444 * 'mcbsp' class 1895 * 'mcbsp' class
1445 * multi channel buffered serial port controller 1896 * multi channel buffered serial port controller
1446 */ 1897 */
@@ -1461,7 +1912,7 @@ static struct omap_hwmod_class omap44xx_mcbsp_hwmod_class = {
1461 1912
1462/* mcbsp1 */ 1913/* mcbsp1 */
1463static struct omap_hwmod_irq_info omap44xx_mcbsp1_irqs[] = { 1914static struct omap_hwmod_irq_info omap44xx_mcbsp1_irqs[] = {
1464 { .irq = 17 + OMAP44XX_IRQ_GIC_START }, 1915 { .name = "common", .irq = 17 + OMAP44XX_IRQ_GIC_START },
1465 { .irq = -1 } 1916 { .irq = -1 }
1466}; 1917};
1467 1918
@@ -1496,7 +1947,7 @@ static struct omap_hwmod omap44xx_mcbsp1_hwmod = {
1496 1947
1497/* mcbsp2 */ 1948/* mcbsp2 */
1498static struct omap_hwmod_irq_info omap44xx_mcbsp2_irqs[] = { 1949static struct omap_hwmod_irq_info omap44xx_mcbsp2_irqs[] = {
1499 { .irq = 22 + OMAP44XX_IRQ_GIC_START }, 1950 { .name = "common", .irq = 22 + OMAP44XX_IRQ_GIC_START },
1500 { .irq = -1 } 1951 { .irq = -1 }
1501}; 1952};
1502 1953
@@ -1531,7 +1982,7 @@ static struct omap_hwmod omap44xx_mcbsp2_hwmod = {
1531 1982
1532/* mcbsp3 */ 1983/* mcbsp3 */
1533static struct omap_hwmod_irq_info omap44xx_mcbsp3_irqs[] = { 1984static struct omap_hwmod_irq_info omap44xx_mcbsp3_irqs[] = {
1534 { .irq = 23 + OMAP44XX_IRQ_GIC_START }, 1985 { .name = "common", .irq = 23 + OMAP44XX_IRQ_GIC_START },
1535 { .irq = -1 } 1986 { .irq = -1 }
1536}; 1987};
1537 1988
@@ -1566,7 +2017,7 @@ static struct omap_hwmod omap44xx_mcbsp3_hwmod = {
1566 2017
1567/* mcbsp4 */ 2018/* mcbsp4 */
1568static struct omap_hwmod_irq_info omap44xx_mcbsp4_irqs[] = { 2019static struct omap_hwmod_irq_info omap44xx_mcbsp4_irqs[] = {
1569 { .irq = 16 + OMAP44XX_IRQ_GIC_START }, 2020 { .name = "common", .irq = 16 + OMAP44XX_IRQ_GIC_START },
1570 { .irq = -1 } 2021 { .irq = -1 }
1571}; 2022};
1572 2023
@@ -2017,6 +2468,252 @@ static struct omap_hwmod omap44xx_mpu_hwmod = {
2017}; 2468};
2018 2469
2019/* 2470/*
2471 * 'ocmc_ram' class
2472 * top-level core on-chip ram
2473 */
2474
2475static struct omap_hwmod_class omap44xx_ocmc_ram_hwmod_class = {
2476 .name = "ocmc_ram",
2477};
2478
2479/* ocmc_ram */
2480static struct omap_hwmod omap44xx_ocmc_ram_hwmod = {
2481 .name = "ocmc_ram",
2482 .class = &omap44xx_ocmc_ram_hwmod_class,
2483 .clkdm_name = "l3_2_clkdm",
2484 .prcm = {
2485 .omap4 = {
2486 .clkctrl_offs = OMAP4_CM_L3_2_OCMC_RAM_CLKCTRL_OFFSET,
2487 .context_offs = OMAP4_RM_L3_2_OCMC_RAM_CONTEXT_OFFSET,
2488 },
2489 },
2490};
2491
2492/*
2493 * 'ocp2scp' class
2494 * bridge to transform ocp interface protocol to scp (serial control port)
2495 * protocol
2496 */
2497
2498static struct omap_hwmod_class omap44xx_ocp2scp_hwmod_class = {
2499 .name = "ocp2scp",
2500};
2501
2502/* ocp2scp_usb_phy */
2503static struct omap_hwmod_opt_clk ocp2scp_usb_phy_opt_clks[] = {
2504 { .role = "phy_48m", .clk = "ocp2scp_usb_phy_phy_48m" },
2505};
2506
2507static struct omap_hwmod omap44xx_ocp2scp_usb_phy_hwmod = {
2508 .name = "ocp2scp_usb_phy",
2509 .class = &omap44xx_ocp2scp_hwmod_class,
2510 .clkdm_name = "l3_init_clkdm",
2511 .prcm = {
2512 .omap4 = {
2513 .clkctrl_offs = OMAP4_CM_L3INIT_USBPHYOCP2SCP_CLKCTRL_OFFSET,
2514 .context_offs = OMAP4_RM_L3INIT_USBPHYOCP2SCP_CONTEXT_OFFSET,
2515 .modulemode = MODULEMODE_HWCTRL,
2516 },
2517 },
2518 .opt_clks = ocp2scp_usb_phy_opt_clks,
2519 .opt_clks_cnt = ARRAY_SIZE(ocp2scp_usb_phy_opt_clks),
2520};
2521
2522/*
2523 * 'prcm' class
2524 * power and reset manager (part of the prcm infrastructure) + clock manager 2
2525 * + clock manager 1 (in always on power domain) + local prm in mpu
2526 */
2527
2528static struct omap_hwmod_class omap44xx_prcm_hwmod_class = {
2529 .name = "prcm",
2530};
2531
2532/* prcm_mpu */
2533static struct omap_hwmod omap44xx_prcm_mpu_hwmod = {
2534 .name = "prcm_mpu",
2535 .class = &omap44xx_prcm_hwmod_class,
2536 .clkdm_name = "l4_wkup_clkdm",
2537};
2538
2539/* cm_core_aon */
2540static struct omap_hwmod omap44xx_cm_core_aon_hwmod = {
2541 .name = "cm_core_aon",
2542 .class = &omap44xx_prcm_hwmod_class,
2543 .clkdm_name = "cm_clkdm",
2544};
2545
2546/* cm_core */
2547static struct omap_hwmod omap44xx_cm_core_hwmod = {
2548 .name = "cm_core",
2549 .class = &omap44xx_prcm_hwmod_class,
2550 .clkdm_name = "cm_clkdm",
2551};
2552
2553/* prm */
2554static struct omap_hwmod_irq_info omap44xx_prm_irqs[] = {
2555 { .irq = 11 + OMAP44XX_IRQ_GIC_START },
2556 { .irq = -1 }
2557};
2558
2559static struct omap_hwmod_rst_info omap44xx_prm_resets[] = {
2560 { .name = "rst_global_warm_sw", .rst_shift = 0 },
2561 { .name = "rst_global_cold_sw", .rst_shift = 1 },
2562};
2563
2564static struct omap_hwmod omap44xx_prm_hwmod = {
2565 .name = "prm",
2566 .class = &omap44xx_prcm_hwmod_class,
2567 .clkdm_name = "prm_clkdm",
2568 .mpu_irqs = omap44xx_prm_irqs,
2569 .rst_lines = omap44xx_prm_resets,
2570 .rst_lines_cnt = ARRAY_SIZE(omap44xx_prm_resets),
2571};
2572
2573/*
2574 * 'scrm' class
2575 * system clock and reset manager
2576 */
2577
2578static struct omap_hwmod_class omap44xx_scrm_hwmod_class = {
2579 .name = "scrm",
2580};
2581
2582/* scrm */
2583static struct omap_hwmod omap44xx_scrm_hwmod = {
2584 .name = "scrm",
2585 .class = &omap44xx_scrm_hwmod_class,
2586 .clkdm_name = "l4_wkup_clkdm",
2587};
2588
2589/*
2590 * 'sl2if' class
2591 * shared level 2 memory interface
2592 */
2593
2594static struct omap_hwmod_class omap44xx_sl2if_hwmod_class = {
2595 .name = "sl2if",
2596};
2597
2598/* sl2if */
2599static struct omap_hwmod omap44xx_sl2if_hwmod = {
2600 .name = "sl2if",
2601 .class = &omap44xx_sl2if_hwmod_class,
2602 .clkdm_name = "ivahd_clkdm",
2603 .prcm = {
2604 .omap4 = {
2605 .clkctrl_offs = OMAP4_CM_IVAHD_SL2_CLKCTRL_OFFSET,
2606 .context_offs = OMAP4_RM_IVAHD_SL2_CONTEXT_OFFSET,
2607 .modulemode = MODULEMODE_HWCTRL,
2608 },
2609 },
2610};
2611
2612/*
2613 * 'slimbus' class
2614 * bidirectional, multi-drop, multi-channel two-line serial interface between
2615 * the device and external components
2616 */
2617
2618static struct omap_hwmod_class_sysconfig omap44xx_slimbus_sysc = {
2619 .rev_offs = 0x0000,
2620 .sysc_offs = 0x0010,
2621 .sysc_flags = (SYSC_HAS_RESET_STATUS | SYSC_HAS_SIDLEMODE |
2622 SYSC_HAS_SOFTRESET),
2623 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
2624 SIDLE_SMART_WKUP),
2625 .sysc_fields = &omap_hwmod_sysc_type2,
2626};
2627
2628static struct omap_hwmod_class omap44xx_slimbus_hwmod_class = {
2629 .name = "slimbus",
2630 .sysc = &omap44xx_slimbus_sysc,
2631};
2632
2633/* slimbus1 */
2634static struct omap_hwmod_irq_info omap44xx_slimbus1_irqs[] = {
2635 { .irq = 97 + OMAP44XX_IRQ_GIC_START },
2636 { .irq = -1 }
2637};
2638
2639static struct omap_hwmod_dma_info omap44xx_slimbus1_sdma_reqs[] = {
2640 { .name = "tx0", .dma_req = 84 + OMAP44XX_DMA_REQ_START },
2641 { .name = "tx1", .dma_req = 85 + OMAP44XX_DMA_REQ_START },
2642 { .name = "tx2", .dma_req = 86 + OMAP44XX_DMA_REQ_START },
2643 { .name = "tx3", .dma_req = 87 + OMAP44XX_DMA_REQ_START },
2644 { .name = "rx0", .dma_req = 88 + OMAP44XX_DMA_REQ_START },
2645 { .name = "rx1", .dma_req = 89 + OMAP44XX_DMA_REQ_START },
2646 { .name = "rx2", .dma_req = 90 + OMAP44XX_DMA_REQ_START },
2647 { .name = "rx3", .dma_req = 91 + OMAP44XX_DMA_REQ_START },
2648 { .dma_req = -1 }
2649};
2650
2651static struct omap_hwmod_opt_clk slimbus1_opt_clks[] = {
2652 { .role = "fclk_1", .clk = "slimbus1_fclk_1" },
2653 { .role = "fclk_0", .clk = "slimbus1_fclk_0" },
2654 { .role = "fclk_2", .clk = "slimbus1_fclk_2" },
2655 { .role = "slimbus_clk", .clk = "slimbus1_slimbus_clk" },
2656};
2657
2658static struct omap_hwmod omap44xx_slimbus1_hwmod = {
2659 .name = "slimbus1",
2660 .class = &omap44xx_slimbus_hwmod_class,
2661 .clkdm_name = "abe_clkdm",
2662 .mpu_irqs = omap44xx_slimbus1_irqs,
2663 .sdma_reqs = omap44xx_slimbus1_sdma_reqs,
2664 .prcm = {
2665 .omap4 = {
2666 .clkctrl_offs = OMAP4_CM1_ABE_SLIMBUS_CLKCTRL_OFFSET,
2667 .context_offs = OMAP4_RM_ABE_SLIMBUS_CONTEXT_OFFSET,
2668 .modulemode = MODULEMODE_SWCTRL,
2669 },
2670 },
2671 .opt_clks = slimbus1_opt_clks,
2672 .opt_clks_cnt = ARRAY_SIZE(slimbus1_opt_clks),
2673};
2674
2675/* slimbus2 */
2676static struct omap_hwmod_irq_info omap44xx_slimbus2_irqs[] = {
2677 { .irq = 98 + OMAP44XX_IRQ_GIC_START },
2678 { .irq = -1 }
2679};
2680
2681static struct omap_hwmod_dma_info omap44xx_slimbus2_sdma_reqs[] = {
2682 { .name = "tx0", .dma_req = 92 + OMAP44XX_DMA_REQ_START },
2683 { .name = "tx1", .dma_req = 93 + OMAP44XX_DMA_REQ_START },
2684 { .name = "tx2", .dma_req = 94 + OMAP44XX_DMA_REQ_START },
2685 { .name = "tx3", .dma_req = 95 + OMAP44XX_DMA_REQ_START },
2686 { .name = "rx0", .dma_req = 96 + OMAP44XX_DMA_REQ_START },
2687 { .name = "rx1", .dma_req = 97 + OMAP44XX_DMA_REQ_START },
2688 { .name = "rx2", .dma_req = 98 + OMAP44XX_DMA_REQ_START },
2689 { .name = "rx3", .dma_req = 99 + OMAP44XX_DMA_REQ_START },
2690 { .dma_req = -1 }
2691};
2692
2693static struct omap_hwmod_opt_clk slimbus2_opt_clks[] = {
2694 { .role = "fclk_1", .clk = "slimbus2_fclk_1" },
2695 { .role = "fclk_0", .clk = "slimbus2_fclk_0" },
2696 { .role = "slimbus_clk", .clk = "slimbus2_slimbus_clk" },
2697};
2698
2699static struct omap_hwmod omap44xx_slimbus2_hwmod = {
2700 .name = "slimbus2",
2701 .class = &omap44xx_slimbus_hwmod_class,
2702 .clkdm_name = "l4_per_clkdm",
2703 .mpu_irqs = omap44xx_slimbus2_irqs,
2704 .sdma_reqs = omap44xx_slimbus2_sdma_reqs,
2705 .prcm = {
2706 .omap4 = {
2707 .clkctrl_offs = OMAP4_CM_L4PER_SLIMBUS2_CLKCTRL_OFFSET,
2708 .context_offs = OMAP4_RM_L4PER_SLIMBUS2_CONTEXT_OFFSET,
2709 .modulemode = MODULEMODE_SWCTRL,
2710 },
2711 },
2712 .opt_clks = slimbus2_opt_clks,
2713 .opt_clks_cnt = ARRAY_SIZE(slimbus2_opt_clks),
2714};
2715
2716/*
2020 * 'smartreflex' class 2717 * 'smartreflex' class
2021 * smartreflex module (monitor silicon performance and outputs a measure of 2718 * smartreflex module (monitor silicon performance and outputs a measure of
2022 * performance error) 2719 * performance error)
@@ -2584,6 +3281,55 @@ static struct omap_hwmod omap44xx_uart4_hwmod = {
2584}; 3281};
2585 3282
2586/* 3283/*
3284 * 'usb_host_fs' class
3285 * full-speed usb host controller
3286 */
3287
3288/* The IP is not compliant to type1 / type2 scheme */
3289static struct omap_hwmod_sysc_fields omap_hwmod_sysc_type_usb_host_fs = {
3290 .midle_shift = 4,
3291 .sidle_shift = 2,
3292 .srst_shift = 1,
3293};
3294
3295static struct omap_hwmod_class_sysconfig omap44xx_usb_host_fs_sysc = {
3296 .rev_offs = 0x0000,
3297 .sysc_offs = 0x0210,
3298 .sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_SIDLEMODE |
3299 SYSC_HAS_SOFTRESET),
3300 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
3301 SIDLE_SMART_WKUP),
3302 .sysc_fields = &omap_hwmod_sysc_type_usb_host_fs,
3303};
3304
3305static struct omap_hwmod_class omap44xx_usb_host_fs_hwmod_class = {
3306 .name = "usb_host_fs",
3307 .sysc = &omap44xx_usb_host_fs_sysc,
3308};
3309
3310/* usb_host_fs */
3311static struct omap_hwmod_irq_info omap44xx_usb_host_fs_irqs[] = {
3312 { .name = "std", .irq = 89 + OMAP44XX_IRQ_GIC_START },
3313 { .name = "smi", .irq = 90 + OMAP44XX_IRQ_GIC_START },
3314 { .irq = -1 }
3315};
3316
3317static struct omap_hwmod omap44xx_usb_host_fs_hwmod = {
3318 .name = "usb_host_fs",
3319 .class = &omap44xx_usb_host_fs_hwmod_class,
3320 .clkdm_name = "l3_init_clkdm",
3321 .mpu_irqs = omap44xx_usb_host_fs_irqs,
3322 .main_clk = "usb_host_fs_fck",
3323 .prcm = {
3324 .omap4 = {
3325 .clkctrl_offs = OMAP4_CM_L3INIT_USB_HOST_FS_CLKCTRL_OFFSET,
3326 .context_offs = OMAP4_RM_L3INIT_USB_HOST_FS_CONTEXT_OFFSET,
3327 .modulemode = MODULEMODE_SWCTRL,
3328 },
3329 },
3330};
3331
3332/*
2587 * 'usb_host_hs' class 3333 * 'usb_host_hs' class
2588 * high-speed multi-port usb host controller 3334 * high-speed multi-port usb host controller
2589 */ 3335 */
@@ -2789,6 +3535,7 @@ static struct omap_hwmod_class omap44xx_wd_timer_hwmod_class = {
2789 .name = "wd_timer", 3535 .name = "wd_timer",
2790 .sysc = &omap44xx_wd_timer_sysc, 3536 .sysc = &omap44xx_wd_timer_sysc,
2791 .pre_shutdown = &omap2_wd_timer_disable, 3537 .pre_shutdown = &omap2_wd_timer_disable,
3538 .reset = &omap2_wd_timer_reset,
2792}; 3539};
2793 3540
2794/* wd_timer2 */ 3541/* wd_timer2 */
@@ -2838,6 +3585,32 @@ static struct omap_hwmod omap44xx_wd_timer3_hwmod = {
2838 * interfaces 3585 * interfaces
2839 */ 3586 */
2840 3587
3588static struct omap_hwmod_addr_space omap44xx_c2c_target_fw_addrs[] = {
3589 {
3590 .pa_start = 0x4a204000,
3591 .pa_end = 0x4a2040ff,
3592 .flags = ADDR_TYPE_RT
3593 },
3594 { }
3595};
3596
3597/* c2c -> c2c_target_fw */
3598static struct omap_hwmod_ocp_if omap44xx_c2c__c2c_target_fw = {
3599 .master = &omap44xx_c2c_hwmod,
3600 .slave = &omap44xx_c2c_target_fw_hwmod,
3601 .clk = "div_core_ck",
3602 .addr = omap44xx_c2c_target_fw_addrs,
3603 .user = OCP_USER_MPU,
3604};
3605
3606/* l4_cfg -> c2c_target_fw */
3607static struct omap_hwmod_ocp_if omap44xx_l4_cfg__c2c_target_fw = {
3608 .master = &omap44xx_l4_cfg_hwmod,
3609 .slave = &omap44xx_c2c_target_fw_hwmod,
3610 .clk = "l4_div_ck",
3611 .user = OCP_USER_MPU | OCP_USER_SDMA,
3612};
3613
2841/* l3_main_1 -> dmm */ 3614/* l3_main_1 -> dmm */
2842static struct omap_hwmod_ocp_if omap44xx_l3_main_1__dmm = { 3615static struct omap_hwmod_ocp_if omap44xx_l3_main_1__dmm = {
2843 .master = &omap44xx_l3_main_1_hwmod, 3616 .master = &omap44xx_l3_main_1_hwmod,
@@ -2864,6 +3637,14 @@ static struct omap_hwmod_ocp_if omap44xx_mpu__dmm = {
2864 .user = OCP_USER_MPU, 3637 .user = OCP_USER_MPU,
2865}; 3638};
2866 3639
3640/* c2c -> emif_fw */
3641static struct omap_hwmod_ocp_if omap44xx_c2c__emif_fw = {
3642 .master = &omap44xx_c2c_hwmod,
3643 .slave = &omap44xx_emif_fw_hwmod,
3644 .clk = "div_core_ck",
3645 .user = OCP_USER_MPU | OCP_USER_SDMA,
3646};
3647
2867/* dmm -> emif_fw */ 3648/* dmm -> emif_fw */
2868static struct omap_hwmod_ocp_if omap44xx_dmm__emif_fw = { 3649static struct omap_hwmod_ocp_if omap44xx_dmm__emif_fw = {
2869 .master = &omap44xx_dmm_hwmod, 3650 .master = &omap44xx_dmm_hwmod,
@@ -2906,6 +3687,14 @@ static struct omap_hwmod_ocp_if omap44xx_l3_main_3__l3_instr = {
2906 .user = OCP_USER_MPU | OCP_USER_SDMA, 3687 .user = OCP_USER_MPU | OCP_USER_SDMA,
2907}; 3688};
2908 3689
3690/* ocp_wp_noc -> l3_instr */
3691static struct omap_hwmod_ocp_if omap44xx_ocp_wp_noc__l3_instr = {
3692 .master = &omap44xx_ocp_wp_noc_hwmod,
3693 .slave = &omap44xx_l3_instr_hwmod,
3694 .clk = "l3_div_ck",
3695 .user = OCP_USER_MPU | OCP_USER_SDMA,
3696};
3697
2909/* dsp -> l3_main_1 */ 3698/* dsp -> l3_main_1 */
2910static struct omap_hwmod_ocp_if omap44xx_dsp__l3_main_1 = { 3699static struct omap_hwmod_ocp_if omap44xx_dsp__l3_main_1 = {
2911 .master = &omap44xx_dsp_hwmod, 3700 .master = &omap44xx_dsp_hwmod,
@@ -2972,6 +3761,22 @@ static struct omap_hwmod_ocp_if omap44xx_mpu__l3_main_1 = {
2972 .user = OCP_USER_MPU, 3761 .user = OCP_USER_MPU,
2973}; 3762};
2974 3763
3764/* c2c_target_fw -> l3_main_2 */
3765static struct omap_hwmod_ocp_if omap44xx_c2c_target_fw__l3_main_2 = {
3766 .master = &omap44xx_c2c_target_fw_hwmod,
3767 .slave = &omap44xx_l3_main_2_hwmod,
3768 .clk = "l3_div_ck",
3769 .user = OCP_USER_MPU | OCP_USER_SDMA,
3770};
3771
3772/* debugss -> l3_main_2 */
3773static struct omap_hwmod_ocp_if omap44xx_debugss__l3_main_2 = {
3774 .master = &omap44xx_debugss_hwmod,
3775 .slave = &omap44xx_l3_main_2_hwmod,
3776 .clk = "dbgclk_mux_ck",
3777 .user = OCP_USER_MPU | OCP_USER_SDMA,
3778};
3779
2975/* dma_system -> l3_main_2 */ 3780/* dma_system -> l3_main_2 */
2976static struct omap_hwmod_ocp_if omap44xx_dma_system__l3_main_2 = { 3781static struct omap_hwmod_ocp_if omap44xx_dma_system__l3_main_2 = {
2977 .master = &omap44xx_dma_system_hwmod, 3782 .master = &omap44xx_dma_system_hwmod,
@@ -2980,6 +3785,22 @@ static struct omap_hwmod_ocp_if omap44xx_dma_system__l3_main_2 = {
2980 .user = OCP_USER_MPU | OCP_USER_SDMA, 3785 .user = OCP_USER_MPU | OCP_USER_SDMA,
2981}; 3786};
2982 3787
3788/* fdif -> l3_main_2 */
3789static struct omap_hwmod_ocp_if omap44xx_fdif__l3_main_2 = {
3790 .master = &omap44xx_fdif_hwmod,
3791 .slave = &omap44xx_l3_main_2_hwmod,
3792 .clk = "l3_div_ck",
3793 .user = OCP_USER_MPU | OCP_USER_SDMA,
3794};
3795
3796/* gpu -> l3_main_2 */
3797static struct omap_hwmod_ocp_if omap44xx_gpu__l3_main_2 = {
3798 .master = &omap44xx_gpu_hwmod,
3799 .slave = &omap44xx_l3_main_2_hwmod,
3800 .clk = "l3_div_ck",
3801 .user = OCP_USER_MPU | OCP_USER_SDMA,
3802};
3803
2983/* hsi -> l3_main_2 */ 3804/* hsi -> l3_main_2 */
2984static struct omap_hwmod_ocp_if omap44xx_hsi__l3_main_2 = { 3805static struct omap_hwmod_ocp_if omap44xx_hsi__l3_main_2 = {
2985 .master = &omap44xx_hsi_hwmod, 3806 .master = &omap44xx_hsi_hwmod,
@@ -3038,6 +3859,14 @@ static struct omap_hwmod_ocp_if omap44xx_l4_cfg__l3_main_2 = {
3038 .user = OCP_USER_MPU | OCP_USER_SDMA, 3859 .user = OCP_USER_MPU | OCP_USER_SDMA,
3039}; 3860};
3040 3861
3862/* usb_host_fs -> l3_main_2 */
3863static struct omap_hwmod_ocp_if omap44xx_usb_host_fs__l3_main_2 = {
3864 .master = &omap44xx_usb_host_fs_hwmod,
3865 .slave = &omap44xx_l3_main_2_hwmod,
3866 .clk = "l3_div_ck",
3867 .user = OCP_USER_MPU | OCP_USER_SDMA,
3868};
3869
3041/* usb_host_hs -> l3_main_2 */ 3870/* usb_host_hs -> l3_main_2 */
3042static struct omap_hwmod_ocp_if omap44xx_usb_host_hs__l3_main_2 = { 3871static struct omap_hwmod_ocp_if omap44xx_usb_host_hs__l3_main_2 = {
3043 .master = &omap44xx_usb_host_hs_hwmod, 3872 .master = &omap44xx_usb_host_hs_hwmod,
@@ -3152,6 +3981,24 @@ static struct omap_hwmod_ocp_if omap44xx_mpu__mpu_private = {
3152 .user = OCP_USER_MPU | OCP_USER_SDMA, 3981 .user = OCP_USER_MPU | OCP_USER_SDMA,
3153}; 3982};
3154 3983
3984static struct omap_hwmod_addr_space omap44xx_ocp_wp_noc_addrs[] = {
3985 {
3986 .pa_start = 0x4a102000,
3987 .pa_end = 0x4a10207f,
3988 .flags = ADDR_TYPE_RT
3989 },
3990 { }
3991};
3992
3993/* l4_cfg -> ocp_wp_noc */
3994static struct omap_hwmod_ocp_if omap44xx_l4_cfg__ocp_wp_noc = {
3995 .master = &omap44xx_l4_cfg_hwmod,
3996 .slave = &omap44xx_ocp_wp_noc_hwmod,
3997 .clk = "l4_div_ck",
3998 .addr = omap44xx_ocp_wp_noc_addrs,
3999 .user = OCP_USER_MPU | OCP_USER_SDMA,
4000};
4001
3155static struct omap_hwmod_addr_space omap44xx_aess_addrs[] = { 4002static struct omap_hwmod_addr_space omap44xx_aess_addrs[] = {
3156 { 4003 {
3157 .pa_start = 0x401f1000, 4004 .pa_start = 0x401f1000,
@@ -3188,6 +4035,14 @@ static struct omap_hwmod_ocp_if omap44xx_l4_abe__aess_dma = {
3188 .user = OCP_USER_SDMA, 4035 .user = OCP_USER_SDMA,
3189}; 4036};
3190 4037
4038/* l3_main_2 -> c2c */
4039static struct omap_hwmod_ocp_if omap44xx_l3_main_2__c2c = {
4040 .master = &omap44xx_l3_main_2_hwmod,
4041 .slave = &omap44xx_c2c_hwmod,
4042 .clk = "l3_div_ck",
4043 .user = OCP_USER_MPU | OCP_USER_SDMA,
4044};
4045
3191static struct omap_hwmod_addr_space omap44xx_counter_32k_addrs[] = { 4046static struct omap_hwmod_addr_space omap44xx_counter_32k_addrs[] = {
3192 { 4047 {
3193 .pa_start = 0x4a304000, 4048 .pa_start = 0x4a304000,
@@ -3206,6 +4061,96 @@ static struct omap_hwmod_ocp_if omap44xx_l4_wkup__counter_32k = {
3206 .user = OCP_USER_MPU | OCP_USER_SDMA, 4061 .user = OCP_USER_MPU | OCP_USER_SDMA,
3207}; 4062};
3208 4063
4064static struct omap_hwmod_addr_space omap44xx_ctrl_module_core_addrs[] = {
4065 {
4066 .pa_start = 0x4a002000,
4067 .pa_end = 0x4a0027ff,
4068 .flags = ADDR_TYPE_RT
4069 },
4070 { }
4071};
4072
4073/* l4_cfg -> ctrl_module_core */
4074static struct omap_hwmod_ocp_if omap44xx_l4_cfg__ctrl_module_core = {
4075 .master = &omap44xx_l4_cfg_hwmod,
4076 .slave = &omap44xx_ctrl_module_core_hwmod,
4077 .clk = "l4_div_ck",
4078 .addr = omap44xx_ctrl_module_core_addrs,
4079 .user = OCP_USER_MPU | OCP_USER_SDMA,
4080};
4081
4082static struct omap_hwmod_addr_space omap44xx_ctrl_module_pad_core_addrs[] = {
4083 {
4084 .pa_start = 0x4a100000,
4085 .pa_end = 0x4a1007ff,
4086 .flags = ADDR_TYPE_RT
4087 },
4088 { }
4089};
4090
4091/* l4_cfg -> ctrl_module_pad_core */
4092static struct omap_hwmod_ocp_if omap44xx_l4_cfg__ctrl_module_pad_core = {
4093 .master = &omap44xx_l4_cfg_hwmod,
4094 .slave = &omap44xx_ctrl_module_pad_core_hwmod,
4095 .clk = "l4_div_ck",
4096 .addr = omap44xx_ctrl_module_pad_core_addrs,
4097 .user = OCP_USER_MPU | OCP_USER_SDMA,
4098};
4099
4100static struct omap_hwmod_addr_space omap44xx_ctrl_module_wkup_addrs[] = {
4101 {
4102 .pa_start = 0x4a30c000,
4103 .pa_end = 0x4a30c7ff,
4104 .flags = ADDR_TYPE_RT
4105 },
4106 { }
4107};
4108
4109/* l4_wkup -> ctrl_module_wkup */
4110static struct omap_hwmod_ocp_if omap44xx_l4_wkup__ctrl_module_wkup = {
4111 .master = &omap44xx_l4_wkup_hwmod,
4112 .slave = &omap44xx_ctrl_module_wkup_hwmod,
4113 .clk = "l4_wkup_clk_mux_ck",
4114 .addr = omap44xx_ctrl_module_wkup_addrs,
4115 .user = OCP_USER_MPU | OCP_USER_SDMA,
4116};
4117
4118static struct omap_hwmod_addr_space omap44xx_ctrl_module_pad_wkup_addrs[] = {
4119 {
4120 .pa_start = 0x4a31e000,
4121 .pa_end = 0x4a31e7ff,
4122 .flags = ADDR_TYPE_RT
4123 },
4124 { }
4125};
4126
4127/* l4_wkup -> ctrl_module_pad_wkup */
4128static struct omap_hwmod_ocp_if omap44xx_l4_wkup__ctrl_module_pad_wkup = {
4129 .master = &omap44xx_l4_wkup_hwmod,
4130 .slave = &omap44xx_ctrl_module_pad_wkup_hwmod,
4131 .clk = "l4_wkup_clk_mux_ck",
4132 .addr = omap44xx_ctrl_module_pad_wkup_addrs,
4133 .user = OCP_USER_MPU | OCP_USER_SDMA,
4134};
4135
4136static struct omap_hwmod_addr_space omap44xx_debugss_addrs[] = {
4137 {
4138 .pa_start = 0x54160000,
4139 .pa_end = 0x54167fff,
4140 .flags = ADDR_TYPE_RT
4141 },
4142 { }
4143};
4144
4145/* l3_instr -> debugss */
4146static struct omap_hwmod_ocp_if omap44xx_l3_instr__debugss = {
4147 .master = &omap44xx_l3_instr_hwmod,
4148 .slave = &omap44xx_debugss_hwmod,
4149 .clk = "l3_div_ck",
4150 .addr = omap44xx_debugss_addrs,
4151 .user = OCP_USER_MPU | OCP_USER_SDMA,
4152};
4153
3209static struct omap_hwmod_addr_space omap44xx_dma_system_addrs[] = { 4154static struct omap_hwmod_addr_space omap44xx_dma_system_addrs[] = {
3210 { 4155 {
3211 .pa_start = 0x4a056000, 4156 .pa_start = 0x4a056000,
@@ -3270,6 +4215,14 @@ static struct omap_hwmod_ocp_if omap44xx_dsp__iva = {
3270 .user = OCP_USER_DSP, 4215 .user = OCP_USER_DSP,
3271}; 4216};
3272 4217
4218/* dsp -> sl2if */
4219static struct omap_hwmod_ocp_if omap44xx_dsp__sl2if = {
4220 .master = &omap44xx_dsp_hwmod,
4221 .slave = &omap44xx_sl2if_hwmod,
4222 .clk = "dpll_iva_m5x2_ck",
4223 .user = OCP_USER_DSP,
4224};
4225
3273/* l4_cfg -> dsp */ 4226/* l4_cfg -> dsp */
3274static struct omap_hwmod_ocp_if omap44xx_l4_cfg__dsp = { 4227static struct omap_hwmod_ocp_if omap44xx_l4_cfg__dsp = {
3275 .master = &omap44xx_l4_cfg_hwmod, 4228 .master = &omap44xx_l4_cfg_hwmod,
@@ -3530,6 +4483,78 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_venc = {
3530 .user = OCP_USER_MPU, 4483 .user = OCP_USER_MPU,
3531}; 4484};
3532 4485
4486static struct omap_hwmod_addr_space omap44xx_elm_addrs[] = {
4487 {
4488 .pa_start = 0x48078000,
4489 .pa_end = 0x48078fff,
4490 .flags = ADDR_TYPE_RT
4491 },
4492 { }
4493};
4494
4495/* l4_per -> elm */
4496static struct omap_hwmod_ocp_if omap44xx_l4_per__elm = {
4497 .master = &omap44xx_l4_per_hwmod,
4498 .slave = &omap44xx_elm_hwmod,
4499 .clk = "l4_div_ck",
4500 .addr = omap44xx_elm_addrs,
4501 .user = OCP_USER_MPU | OCP_USER_SDMA,
4502};
4503
4504static struct omap_hwmod_addr_space omap44xx_emif1_addrs[] = {
4505 {
4506 .pa_start = 0x4c000000,
4507 .pa_end = 0x4c0000ff,
4508 .flags = ADDR_TYPE_RT
4509 },
4510 { }
4511};
4512
4513/* emif_fw -> emif1 */
4514static struct omap_hwmod_ocp_if omap44xx_emif_fw__emif1 = {
4515 .master = &omap44xx_emif_fw_hwmod,
4516 .slave = &omap44xx_emif1_hwmod,
4517 .clk = "l3_div_ck",
4518 .addr = omap44xx_emif1_addrs,
4519 .user = OCP_USER_MPU | OCP_USER_SDMA,
4520};
4521
4522static struct omap_hwmod_addr_space omap44xx_emif2_addrs[] = {
4523 {
4524 .pa_start = 0x4d000000,
4525 .pa_end = 0x4d0000ff,
4526 .flags = ADDR_TYPE_RT
4527 },
4528 { }
4529};
4530
4531/* emif_fw -> emif2 */
4532static struct omap_hwmod_ocp_if omap44xx_emif_fw__emif2 = {
4533 .master = &omap44xx_emif_fw_hwmod,
4534 .slave = &omap44xx_emif2_hwmod,
4535 .clk = "l3_div_ck",
4536 .addr = omap44xx_emif2_addrs,
4537 .user = OCP_USER_MPU | OCP_USER_SDMA,
4538};
4539
4540static struct omap_hwmod_addr_space omap44xx_fdif_addrs[] = {
4541 {
4542 .pa_start = 0x4a10a000,
4543 .pa_end = 0x4a10a1ff,
4544 .flags = ADDR_TYPE_RT
4545 },
4546 { }
4547};
4548
4549/* l4_cfg -> fdif */
4550static struct omap_hwmod_ocp_if omap44xx_l4_cfg__fdif = {
4551 .master = &omap44xx_l4_cfg_hwmod,
4552 .slave = &omap44xx_fdif_hwmod,
4553 .clk = "l4_div_ck",
4554 .addr = omap44xx_fdif_addrs,
4555 .user = OCP_USER_MPU | OCP_USER_SDMA,
4556};
4557
3533static struct omap_hwmod_addr_space omap44xx_gpio1_addrs[] = { 4558static struct omap_hwmod_addr_space omap44xx_gpio1_addrs[] = {
3534 { 4559 {
3535 .pa_start = 0x4a310000, 4560 .pa_start = 0x4a310000,
@@ -3638,6 +4663,60 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio6 = {
3638 .user = OCP_USER_MPU | OCP_USER_SDMA, 4663 .user = OCP_USER_MPU | OCP_USER_SDMA,
3639}; 4664};
3640 4665
4666static struct omap_hwmod_addr_space omap44xx_gpmc_addrs[] = {
4667 {
4668 .pa_start = 0x50000000,
4669 .pa_end = 0x500003ff,
4670 .flags = ADDR_TYPE_RT
4671 },
4672 { }
4673};
4674
4675/* l3_main_2 -> gpmc */
4676static struct omap_hwmod_ocp_if omap44xx_l3_main_2__gpmc = {
4677 .master = &omap44xx_l3_main_2_hwmod,
4678 .slave = &omap44xx_gpmc_hwmod,
4679 .clk = "l3_div_ck",
4680 .addr = omap44xx_gpmc_addrs,
4681 .user = OCP_USER_MPU | OCP_USER_SDMA,
4682};
4683
4684static struct omap_hwmod_addr_space omap44xx_gpu_addrs[] = {
4685 {
4686 .pa_start = 0x56000000,
4687 .pa_end = 0x5600ffff,
4688 .flags = ADDR_TYPE_RT
4689 },
4690 { }
4691};
4692
4693/* l3_main_2 -> gpu */
4694static struct omap_hwmod_ocp_if omap44xx_l3_main_2__gpu = {
4695 .master = &omap44xx_l3_main_2_hwmod,
4696 .slave = &omap44xx_gpu_hwmod,
4697 .clk = "l3_div_ck",
4698 .addr = omap44xx_gpu_addrs,
4699 .user = OCP_USER_MPU | OCP_USER_SDMA,
4700};
4701
4702static struct omap_hwmod_addr_space omap44xx_hdq1w_addrs[] = {
4703 {
4704 .pa_start = 0x480b2000,
4705 .pa_end = 0x480b201f,
4706 .flags = ADDR_TYPE_RT
4707 },
4708 { }
4709};
4710
4711/* l4_per -> hdq1w */
4712static struct omap_hwmod_ocp_if omap44xx_l4_per__hdq1w = {
4713 .master = &omap44xx_l4_per_hwmod,
4714 .slave = &omap44xx_hdq1w_hwmod,
4715 .clk = "l4_div_ck",
4716 .addr = omap44xx_hdq1w_addrs,
4717 .user = OCP_USER_MPU | OCP_USER_SDMA,
4718};
4719
3641static struct omap_hwmod_addr_space omap44xx_hsi_addrs[] = { 4720static struct omap_hwmod_addr_space omap44xx_hsi_addrs[] = {
3642 { 4721 {
3643 .pa_start = 0x4a058000, 4722 .pa_start = 0x4a058000,
@@ -3754,6 +4833,14 @@ static struct omap_hwmod_ocp_if omap44xx_l3_main_2__iss = {
3754 .user = OCP_USER_MPU | OCP_USER_SDMA, 4833 .user = OCP_USER_MPU | OCP_USER_SDMA,
3755}; 4834};
3756 4835
4836/* iva -> sl2if */
4837static struct omap_hwmod_ocp_if omap44xx_iva__sl2if = {
4838 .master = &omap44xx_iva_hwmod,
4839 .slave = &omap44xx_sl2if_hwmod,
4840 .clk = "dpll_iva_m5x2_ck",
4841 .user = OCP_USER_IVA,
4842};
4843
3757static struct omap_hwmod_addr_space omap44xx_iva_addrs[] = { 4844static struct omap_hwmod_addr_space omap44xx_iva_addrs[] = {
3758 { 4845 {
3759 .pa_start = 0x5a000000, 4846 .pa_start = 0x5a000000,
@@ -3808,6 +4895,42 @@ static struct omap_hwmod_ocp_if omap44xx_l4_cfg__mailbox = {
3808 .user = OCP_USER_MPU | OCP_USER_SDMA, 4895 .user = OCP_USER_MPU | OCP_USER_SDMA,
3809}; 4896};
3810 4897
4898static struct omap_hwmod_addr_space omap44xx_mcasp_addrs[] = {
4899 {
4900 .pa_start = 0x40128000,
4901 .pa_end = 0x401283ff,
4902 .flags = ADDR_TYPE_RT
4903 },
4904 { }
4905};
4906
4907/* l4_abe -> mcasp */
4908static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcasp = {
4909 .master = &omap44xx_l4_abe_hwmod,
4910 .slave = &omap44xx_mcasp_hwmod,
4911 .clk = "ocp_abe_iclk",
4912 .addr = omap44xx_mcasp_addrs,
4913 .user = OCP_USER_MPU,
4914};
4915
4916static struct omap_hwmod_addr_space omap44xx_mcasp_dma_addrs[] = {
4917 {
4918 .pa_start = 0x49028000,
4919 .pa_end = 0x490283ff,
4920 .flags = ADDR_TYPE_RT
4921 },
4922 { }
4923};
4924
4925/* l4_abe -> mcasp (dma) */
4926static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcasp_dma = {
4927 .master = &omap44xx_l4_abe_hwmod,
4928 .slave = &omap44xx_mcasp_hwmod,
4929 .clk = "ocp_abe_iclk",
4930 .addr = omap44xx_mcasp_dma_addrs,
4931 .user = OCP_USER_SDMA,
4932};
4933
3811static struct omap_hwmod_addr_space omap44xx_mcbsp1_addrs[] = { 4934static struct omap_hwmod_addr_space omap44xx_mcbsp1_addrs[] = {
3812 { 4935 {
3813 .name = "mpu", 4936 .name = "mpu",
@@ -4138,6 +5261,174 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc5 = {
4138 .user = OCP_USER_MPU | OCP_USER_SDMA, 5261 .user = OCP_USER_MPU | OCP_USER_SDMA,
4139}; 5262};
4140 5263
5264/* l3_main_2 -> ocmc_ram */
5265static struct omap_hwmod_ocp_if omap44xx_l3_main_2__ocmc_ram = {
5266 .master = &omap44xx_l3_main_2_hwmod,
5267 .slave = &omap44xx_ocmc_ram_hwmod,
5268 .clk = "l3_div_ck",
5269 .user = OCP_USER_MPU | OCP_USER_SDMA,
5270};
5271
5272/* l4_cfg -> ocp2scp_usb_phy */
5273static struct omap_hwmod_ocp_if omap44xx_l4_cfg__ocp2scp_usb_phy = {
5274 .master = &omap44xx_l4_cfg_hwmod,
5275 .slave = &omap44xx_ocp2scp_usb_phy_hwmod,
5276 .clk = "l4_div_ck",
5277 .user = OCP_USER_MPU | OCP_USER_SDMA,
5278};
5279
5280static struct omap_hwmod_addr_space omap44xx_prcm_mpu_addrs[] = {
5281 {
5282 .pa_start = 0x48243000,
5283 .pa_end = 0x48243fff,
5284 .flags = ADDR_TYPE_RT
5285 },
5286 { }
5287};
5288
5289/* mpu_private -> prcm_mpu */
5290static struct omap_hwmod_ocp_if omap44xx_mpu_private__prcm_mpu = {
5291 .master = &omap44xx_mpu_private_hwmod,
5292 .slave = &omap44xx_prcm_mpu_hwmod,
5293 .clk = "l3_div_ck",
5294 .addr = omap44xx_prcm_mpu_addrs,
5295 .user = OCP_USER_MPU | OCP_USER_SDMA,
5296};
5297
5298static struct omap_hwmod_addr_space omap44xx_cm_core_aon_addrs[] = {
5299 {
5300 .pa_start = 0x4a004000,
5301 .pa_end = 0x4a004fff,
5302 .flags = ADDR_TYPE_RT
5303 },
5304 { }
5305};
5306
5307/* l4_wkup -> cm_core_aon */
5308static struct omap_hwmod_ocp_if omap44xx_l4_wkup__cm_core_aon = {
5309 .master = &omap44xx_l4_wkup_hwmod,
5310 .slave = &omap44xx_cm_core_aon_hwmod,
5311 .clk = "l4_wkup_clk_mux_ck",
5312 .addr = omap44xx_cm_core_aon_addrs,
5313 .user = OCP_USER_MPU | OCP_USER_SDMA,
5314};
5315
5316static struct omap_hwmod_addr_space omap44xx_cm_core_addrs[] = {
5317 {
5318 .pa_start = 0x4a008000,
5319 .pa_end = 0x4a009fff,
5320 .flags = ADDR_TYPE_RT
5321 },
5322 { }
5323};
5324
5325/* l4_cfg -> cm_core */
5326static struct omap_hwmod_ocp_if omap44xx_l4_cfg__cm_core = {
5327 .master = &omap44xx_l4_cfg_hwmod,
5328 .slave = &omap44xx_cm_core_hwmod,
5329 .clk = "l4_div_ck",
5330 .addr = omap44xx_cm_core_addrs,
5331 .user = OCP_USER_MPU | OCP_USER_SDMA,
5332};
5333
5334static struct omap_hwmod_addr_space omap44xx_prm_addrs[] = {
5335 {
5336 .pa_start = 0x4a306000,
5337 .pa_end = 0x4a307fff,
5338 .flags = ADDR_TYPE_RT
5339 },
5340 { }
5341};
5342
5343/* l4_wkup -> prm */
5344static struct omap_hwmod_ocp_if omap44xx_l4_wkup__prm = {
5345 .master = &omap44xx_l4_wkup_hwmod,
5346 .slave = &omap44xx_prm_hwmod,
5347 .clk = "l4_wkup_clk_mux_ck",
5348 .addr = omap44xx_prm_addrs,
5349 .user = OCP_USER_MPU | OCP_USER_SDMA,
5350};
5351
5352static struct omap_hwmod_addr_space omap44xx_scrm_addrs[] = {
5353 {
5354 .pa_start = 0x4a30a000,
5355 .pa_end = 0x4a30a7ff,
5356 .flags = ADDR_TYPE_RT
5357 },
5358 { }
5359};
5360
5361/* l4_wkup -> scrm */
5362static struct omap_hwmod_ocp_if omap44xx_l4_wkup__scrm = {
5363 .master = &omap44xx_l4_wkup_hwmod,
5364 .slave = &omap44xx_scrm_hwmod,
5365 .clk = "l4_wkup_clk_mux_ck",
5366 .addr = omap44xx_scrm_addrs,
5367 .user = OCP_USER_MPU | OCP_USER_SDMA,
5368};
5369
5370/* l3_main_2 -> sl2if */
5371static struct omap_hwmod_ocp_if omap44xx_l3_main_2__sl2if = {
5372 .master = &omap44xx_l3_main_2_hwmod,
5373 .slave = &omap44xx_sl2if_hwmod,
5374 .clk = "l3_div_ck",
5375 .user = OCP_USER_MPU | OCP_USER_SDMA,
5376};
5377
5378static struct omap_hwmod_addr_space omap44xx_slimbus1_addrs[] = {
5379 {
5380 .pa_start = 0x4012c000,
5381 .pa_end = 0x4012c3ff,
5382 .flags = ADDR_TYPE_RT
5383 },
5384 { }
5385};
5386
5387/* l4_abe -> slimbus1 */
5388static struct omap_hwmod_ocp_if omap44xx_l4_abe__slimbus1 = {
5389 .master = &omap44xx_l4_abe_hwmod,
5390 .slave = &omap44xx_slimbus1_hwmod,
5391 .clk = "ocp_abe_iclk",
5392 .addr = omap44xx_slimbus1_addrs,
5393 .user = OCP_USER_MPU,
5394};
5395
5396static struct omap_hwmod_addr_space omap44xx_slimbus1_dma_addrs[] = {
5397 {
5398 .pa_start = 0x4902c000,
5399 .pa_end = 0x4902c3ff,
5400 .flags = ADDR_TYPE_RT
5401 },
5402 { }
5403};
5404
5405/* l4_abe -> slimbus1 (dma) */
5406static struct omap_hwmod_ocp_if omap44xx_l4_abe__slimbus1_dma = {
5407 .master = &omap44xx_l4_abe_hwmod,
5408 .slave = &omap44xx_slimbus1_hwmod,
5409 .clk = "ocp_abe_iclk",
5410 .addr = omap44xx_slimbus1_dma_addrs,
5411 .user = OCP_USER_SDMA,
5412};
5413
5414static struct omap_hwmod_addr_space omap44xx_slimbus2_addrs[] = {
5415 {
5416 .pa_start = 0x48076000,
5417 .pa_end = 0x480763ff,
5418 .flags = ADDR_TYPE_RT
5419 },
5420 { }
5421};
5422
5423/* l4_per -> slimbus2 */
5424static struct omap_hwmod_ocp_if omap44xx_l4_per__slimbus2 = {
5425 .master = &omap44xx_l4_per_hwmod,
5426 .slave = &omap44xx_slimbus2_hwmod,
5427 .clk = "l4_div_ck",
5428 .addr = omap44xx_slimbus2_addrs,
5429 .user = OCP_USER_MPU | OCP_USER_SDMA,
5430};
5431
4141static struct omap_hwmod_addr_space omap44xx_smartreflex_core_addrs[] = { 5432static struct omap_hwmod_addr_space omap44xx_smartreflex_core_addrs[] = {
4142 { 5433 {
4143 .pa_start = 0x4a0dd000, 5434 .pa_start = 0x4a0dd000,
@@ -4552,6 +5843,24 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__uart4 = {
4552 .user = OCP_USER_MPU | OCP_USER_SDMA, 5843 .user = OCP_USER_MPU | OCP_USER_SDMA,
4553}; 5844};
4554 5845
5846static struct omap_hwmod_addr_space omap44xx_usb_host_fs_addrs[] = {
5847 {
5848 .pa_start = 0x4a0a9000,
5849 .pa_end = 0x4a0a93ff,
5850 .flags = ADDR_TYPE_RT
5851 },
5852 { }
5853};
5854
5855/* l4_cfg -> usb_host_fs */
5856static struct omap_hwmod_ocp_if omap44xx_l4_cfg__usb_host_fs = {
5857 .master = &omap44xx_l4_cfg_hwmod,
5858 .slave = &omap44xx_usb_host_fs_hwmod,
5859 .clk = "l4_div_ck",
5860 .addr = omap44xx_usb_host_fs_addrs,
5861 .user = OCP_USER_MPU | OCP_USER_SDMA,
5862};
5863
4555static struct omap_hwmod_addr_space omap44xx_usb_host_hs_addrs[] = { 5864static struct omap_hwmod_addr_space omap44xx_usb_host_hs_addrs[] = {
4556 { 5865 {
4557 .name = "uhh", 5866 .name = "uhh",
@@ -4673,12 +5982,16 @@ static struct omap_hwmod_ocp_if omap44xx_l4_abe__wd_timer3_dma = {
4673}; 5982};
4674 5983
4675static struct omap_hwmod_ocp_if *omap44xx_hwmod_ocp_ifs[] __initdata = { 5984static struct omap_hwmod_ocp_if *omap44xx_hwmod_ocp_ifs[] __initdata = {
5985 &omap44xx_c2c__c2c_target_fw,
5986 &omap44xx_l4_cfg__c2c_target_fw,
4676 &omap44xx_l3_main_1__dmm, 5987 &omap44xx_l3_main_1__dmm,
4677 &omap44xx_mpu__dmm, 5988 &omap44xx_mpu__dmm,
5989 &omap44xx_c2c__emif_fw,
4678 &omap44xx_dmm__emif_fw, 5990 &omap44xx_dmm__emif_fw,
4679 &omap44xx_l4_cfg__emif_fw, 5991 &omap44xx_l4_cfg__emif_fw,
4680 &omap44xx_iva__l3_instr, 5992 &omap44xx_iva__l3_instr,
4681 &omap44xx_l3_main_3__l3_instr, 5993 &omap44xx_l3_main_3__l3_instr,
5994 &omap44xx_ocp_wp_noc__l3_instr,
4682 &omap44xx_dsp__l3_main_1, 5995 &omap44xx_dsp__l3_main_1,
4683 &omap44xx_dss__l3_main_1, 5996 &omap44xx_dss__l3_main_1,
4684 &omap44xx_l3_main_2__l3_main_1, 5997 &omap44xx_l3_main_2__l3_main_1,
@@ -4686,13 +5999,18 @@ static struct omap_hwmod_ocp_if *omap44xx_hwmod_ocp_ifs[] __initdata = {
4686 &omap44xx_mmc1__l3_main_1, 5999 &omap44xx_mmc1__l3_main_1,
4687 &omap44xx_mmc2__l3_main_1, 6000 &omap44xx_mmc2__l3_main_1,
4688 &omap44xx_mpu__l3_main_1, 6001 &omap44xx_mpu__l3_main_1,
6002 &omap44xx_c2c_target_fw__l3_main_2,
6003 &omap44xx_debugss__l3_main_2,
4689 &omap44xx_dma_system__l3_main_2, 6004 &omap44xx_dma_system__l3_main_2,
6005 &omap44xx_fdif__l3_main_2,
6006 &omap44xx_gpu__l3_main_2,
4690 &omap44xx_hsi__l3_main_2, 6007 &omap44xx_hsi__l3_main_2,
4691 &omap44xx_ipu__l3_main_2, 6008 &omap44xx_ipu__l3_main_2,
4692 &omap44xx_iss__l3_main_2, 6009 &omap44xx_iss__l3_main_2,
4693 &omap44xx_iva__l3_main_2, 6010 &omap44xx_iva__l3_main_2,
4694 &omap44xx_l3_main_1__l3_main_2, 6011 &omap44xx_l3_main_1__l3_main_2,
4695 &omap44xx_l4_cfg__l3_main_2, 6012 &omap44xx_l4_cfg__l3_main_2,
6013 &omap44xx_usb_host_fs__l3_main_2,
4696 &omap44xx_usb_host_hs__l3_main_2, 6014 &omap44xx_usb_host_hs__l3_main_2,
4697 &omap44xx_usb_otg_hs__l3_main_2, 6015 &omap44xx_usb_otg_hs__l3_main_2,
4698 &omap44xx_l3_main_1__l3_main_3, 6016 &omap44xx_l3_main_1__l3_main_3,
@@ -4706,13 +6024,21 @@ static struct omap_hwmod_ocp_if *omap44xx_hwmod_ocp_ifs[] __initdata = {
4706 &omap44xx_l3_main_2__l4_per, 6024 &omap44xx_l3_main_2__l4_per,
4707 &omap44xx_l4_cfg__l4_wkup, 6025 &omap44xx_l4_cfg__l4_wkup,
4708 &omap44xx_mpu__mpu_private, 6026 &omap44xx_mpu__mpu_private,
6027 &omap44xx_l4_cfg__ocp_wp_noc,
4709 &omap44xx_l4_abe__aess, 6028 &omap44xx_l4_abe__aess,
4710 &omap44xx_l4_abe__aess_dma, 6029 &omap44xx_l4_abe__aess_dma,
6030 &omap44xx_l3_main_2__c2c,
4711 &omap44xx_l4_wkup__counter_32k, 6031 &omap44xx_l4_wkup__counter_32k,
6032 &omap44xx_l4_cfg__ctrl_module_core,
6033 &omap44xx_l4_cfg__ctrl_module_pad_core,
6034 &omap44xx_l4_wkup__ctrl_module_wkup,
6035 &omap44xx_l4_wkup__ctrl_module_pad_wkup,
6036 &omap44xx_l3_instr__debugss,
4712 &omap44xx_l4_cfg__dma_system, 6037 &omap44xx_l4_cfg__dma_system,
4713 &omap44xx_l4_abe__dmic, 6038 &omap44xx_l4_abe__dmic,
4714 &omap44xx_l4_abe__dmic_dma, 6039 &omap44xx_l4_abe__dmic_dma,
4715 &omap44xx_dsp__iva, 6040 &omap44xx_dsp__iva,
6041 &omap44xx_dsp__sl2if,
4716 &omap44xx_l4_cfg__dsp, 6042 &omap44xx_l4_cfg__dsp,
4717 &omap44xx_l3_main_2__dss, 6043 &omap44xx_l3_main_2__dss,
4718 &omap44xx_l4_per__dss, 6044 &omap44xx_l4_per__dss,
@@ -4728,12 +6054,19 @@ static struct omap_hwmod_ocp_if *omap44xx_hwmod_ocp_ifs[] __initdata = {
4728 &omap44xx_l4_per__dss_rfbi, 6054 &omap44xx_l4_per__dss_rfbi,
4729 &omap44xx_l3_main_2__dss_venc, 6055 &omap44xx_l3_main_2__dss_venc,
4730 &omap44xx_l4_per__dss_venc, 6056 &omap44xx_l4_per__dss_venc,
6057 &omap44xx_l4_per__elm,
6058 &omap44xx_emif_fw__emif1,
6059 &omap44xx_emif_fw__emif2,
6060 &omap44xx_l4_cfg__fdif,
4731 &omap44xx_l4_wkup__gpio1, 6061 &omap44xx_l4_wkup__gpio1,
4732 &omap44xx_l4_per__gpio2, 6062 &omap44xx_l4_per__gpio2,
4733 &omap44xx_l4_per__gpio3, 6063 &omap44xx_l4_per__gpio3,
4734 &omap44xx_l4_per__gpio4, 6064 &omap44xx_l4_per__gpio4,
4735 &omap44xx_l4_per__gpio5, 6065 &omap44xx_l4_per__gpio5,
4736 &omap44xx_l4_per__gpio6, 6066 &omap44xx_l4_per__gpio6,
6067 &omap44xx_l3_main_2__gpmc,
6068 &omap44xx_l3_main_2__gpu,
6069 &omap44xx_l4_per__hdq1w,
4737 &omap44xx_l4_cfg__hsi, 6070 &omap44xx_l4_cfg__hsi,
4738 &omap44xx_l4_per__i2c1, 6071 &omap44xx_l4_per__i2c1,
4739 &omap44xx_l4_per__i2c2, 6072 &omap44xx_l4_per__i2c2,
@@ -4741,9 +6074,12 @@ static struct omap_hwmod_ocp_if *omap44xx_hwmod_ocp_ifs[] __initdata = {
4741 &omap44xx_l4_per__i2c4, 6074 &omap44xx_l4_per__i2c4,
4742 &omap44xx_l3_main_2__ipu, 6075 &omap44xx_l3_main_2__ipu,
4743 &omap44xx_l3_main_2__iss, 6076 &omap44xx_l3_main_2__iss,
6077 &omap44xx_iva__sl2if,
4744 &omap44xx_l3_main_2__iva, 6078 &omap44xx_l3_main_2__iva,
4745 &omap44xx_l4_wkup__kbd, 6079 &omap44xx_l4_wkup__kbd,
4746 &omap44xx_l4_cfg__mailbox, 6080 &omap44xx_l4_cfg__mailbox,
6081 &omap44xx_l4_abe__mcasp,
6082 &omap44xx_l4_abe__mcasp_dma,
4747 &omap44xx_l4_abe__mcbsp1, 6083 &omap44xx_l4_abe__mcbsp1,
4748 &omap44xx_l4_abe__mcbsp1_dma, 6084 &omap44xx_l4_abe__mcbsp1_dma,
4749 &omap44xx_l4_abe__mcbsp2, 6085 &omap44xx_l4_abe__mcbsp2,
@@ -4762,6 +6098,17 @@ static struct omap_hwmod_ocp_if *omap44xx_hwmod_ocp_ifs[] __initdata = {
4762 &omap44xx_l4_per__mmc3, 6098 &omap44xx_l4_per__mmc3,
4763 &omap44xx_l4_per__mmc4, 6099 &omap44xx_l4_per__mmc4,
4764 &omap44xx_l4_per__mmc5, 6100 &omap44xx_l4_per__mmc5,
6101 &omap44xx_l3_main_2__ocmc_ram,
6102 &omap44xx_l4_cfg__ocp2scp_usb_phy,
6103 &omap44xx_mpu_private__prcm_mpu,
6104 &omap44xx_l4_wkup__cm_core_aon,
6105 &omap44xx_l4_cfg__cm_core,
6106 &omap44xx_l4_wkup__prm,
6107 &omap44xx_l4_wkup__scrm,
6108 &omap44xx_l3_main_2__sl2if,
6109 &omap44xx_l4_abe__slimbus1,
6110 &omap44xx_l4_abe__slimbus1_dma,
6111 &omap44xx_l4_per__slimbus2,
4765 &omap44xx_l4_cfg__smartreflex_core, 6112 &omap44xx_l4_cfg__smartreflex_core,
4766 &omap44xx_l4_cfg__smartreflex_iva, 6113 &omap44xx_l4_cfg__smartreflex_iva,
4767 &omap44xx_l4_cfg__smartreflex_mpu, 6114 &omap44xx_l4_cfg__smartreflex_mpu,
@@ -4785,6 +6132,7 @@ static struct omap_hwmod_ocp_if *omap44xx_hwmod_ocp_ifs[] __initdata = {
4785 &omap44xx_l4_per__uart2, 6132 &omap44xx_l4_per__uart2,
4786 &omap44xx_l4_per__uart3, 6133 &omap44xx_l4_per__uart3,
4787 &omap44xx_l4_per__uart4, 6134 &omap44xx_l4_per__uart4,
6135 &omap44xx_l4_cfg__usb_host_fs,
4788 &omap44xx_l4_cfg__usb_host_hs, 6136 &omap44xx_l4_cfg__usb_host_hs,
4789 &omap44xx_l4_cfg__usb_otg_hs, 6137 &omap44xx_l4_cfg__usb_otg_hs,
4790 &omap44xx_l4_cfg__usb_tll_hs, 6138 &omap44xx_l4_cfg__usb_tll_hs,
diff --git a/arch/arm/mach-omap2/omap_hwmod_common_data.h b/arch/arm/mach-omap2/omap_hwmod_common_data.h
index 7aa9156d50ab..e7e8eeae95e5 100644
--- a/arch/arm/mach-omap2/omap_hwmod_common_data.h
+++ b/arch/arm/mach-omap2/omap_hwmod_common_data.h
@@ -38,6 +38,7 @@ extern struct omap_hwmod_addr_space omap2430_mcspi3_addr_space[];
38extern struct omap_hwmod_addr_space omap2_dma_system_addrs[]; 38extern struct omap_hwmod_addr_space omap2_dma_system_addrs[];
39extern struct omap_hwmod_addr_space omap2_mailbox_addrs[]; 39extern struct omap_hwmod_addr_space omap2_mailbox_addrs[];
40extern struct omap_hwmod_addr_space omap2_mcbsp1_addrs[]; 40extern struct omap_hwmod_addr_space omap2_mcbsp1_addrs[];
41extern struct omap_hwmod_addr_space omap2_hdq1w_addr_space[];
41 42
42/* Common IP block data across OMAP2xxx */ 43/* Common IP block data across OMAP2xxx */
43extern struct omap_hwmod_irq_info omap2xxx_timer12_mpu_irqs[]; 44extern struct omap_hwmod_irq_info omap2xxx_timer12_mpu_irqs[];
@@ -74,6 +75,7 @@ extern struct omap_hwmod omap2xxx_gpio3_hwmod;
74extern struct omap_hwmod omap2xxx_gpio4_hwmod; 75extern struct omap_hwmod omap2xxx_gpio4_hwmod;
75extern struct omap_hwmod omap2xxx_mcspi1_hwmod; 76extern struct omap_hwmod omap2xxx_mcspi1_hwmod;
76extern struct omap_hwmod omap2xxx_mcspi2_hwmod; 77extern struct omap_hwmod omap2xxx_mcspi2_hwmod;
78extern struct omap_hwmod omap2xxx_counter_32k_hwmod;
77 79
78/* Common interface data across OMAP2xxx */ 80/* Common interface data across OMAP2xxx */
79extern struct omap_hwmod_ocp_if omap2xxx_l3_main__l4_core; 81extern struct omap_hwmod_ocp_if omap2xxx_l3_main__l4_core;
@@ -141,6 +143,7 @@ extern struct omap_hwmod_irq_info omap2_dma_system_irqs[];
141extern struct omap_hwmod_irq_info omap2_mcspi1_mpu_irqs[]; 143extern struct omap_hwmod_irq_info omap2_mcspi1_mpu_irqs[];
142extern struct omap_hwmod_irq_info omap2_mcspi2_mpu_irqs[]; 144extern struct omap_hwmod_irq_info omap2_mcspi2_mpu_irqs[];
143extern struct omap_hwmod_addr_space omap2xxx_timer12_addrs[]; 145extern struct omap_hwmod_addr_space omap2xxx_timer12_addrs[];
146extern struct omap_hwmod_irq_info omap2_hdq1w_mpu_irqs[];
144 147
145/* OMAP hwmod classes - forward declarations */ 148/* OMAP hwmod classes - forward declarations */
146extern struct omap_hwmod_class l3_hwmod_class; 149extern struct omap_hwmod_class l3_hwmod_class;
@@ -152,6 +155,8 @@ extern struct omap_hwmod_class omap2_dss_hwmod_class;
152extern struct omap_hwmod_class omap2_dispc_hwmod_class; 155extern struct omap_hwmod_class omap2_dispc_hwmod_class;
153extern struct omap_hwmod_class omap2_rfbi_hwmod_class; 156extern struct omap_hwmod_class omap2_rfbi_hwmod_class;
154extern struct omap_hwmod_class omap2_venc_hwmod_class; 157extern struct omap_hwmod_class omap2_venc_hwmod_class;
158extern struct omap_hwmod_class_sysconfig omap2_hdq1w_sysc;
159extern struct omap_hwmod_class omap2_hdq1w_class;
155 160
156extern struct omap_hwmod_class omap2xxx_timer_hwmod_class; 161extern struct omap_hwmod_class omap2xxx_timer_hwmod_class;
157extern struct omap_hwmod_class omap2xxx_wd_timer_hwmod_class; 162extern struct omap_hwmod_class omap2xxx_wd_timer_hwmod_class;
diff --git a/arch/arm/mach-omap2/powerdomain.c b/arch/arm/mach-omap2/powerdomain.c
index 96ad3dbeac34..96114901b932 100644
--- a/arch/arm/mach-omap2/powerdomain.c
+++ b/arch/arm/mach-omap2/powerdomain.c
@@ -981,16 +981,6 @@ int pwrdm_state_switch(struct powerdomain *pwrdm)
981 return ret; 981 return ret;
982} 982}
983 983
984int pwrdm_clkdm_state_switch(struct clockdomain *clkdm)
985{
986 if (clkdm != NULL && clkdm->pwrdm.ptr != NULL) {
987 pwrdm_wait_transition(clkdm->pwrdm.ptr);
988 return pwrdm_state_switch(clkdm->pwrdm.ptr);
989 }
990
991 return -EINVAL;
992}
993
994int pwrdm_pre_transition(void) 984int pwrdm_pre_transition(void)
995{ 985{
996 pwrdm_for_each(_pwrdm_pre_transition_cb, NULL); 986 pwrdm_for_each(_pwrdm_pre_transition_cb, NULL);
diff --git a/arch/arm/mach-omap2/powerdomain.h b/arch/arm/mach-omap2/powerdomain.h
index 0d72a8a8ce4d..8f88d65c46ea 100644
--- a/arch/arm/mach-omap2/powerdomain.h
+++ b/arch/arm/mach-omap2/powerdomain.h
@@ -213,7 +213,6 @@ bool pwrdm_has_hdwr_sar(struct powerdomain *pwrdm);
213int pwrdm_wait_transition(struct powerdomain *pwrdm); 213int pwrdm_wait_transition(struct powerdomain *pwrdm);
214 214
215int pwrdm_state_switch(struct powerdomain *pwrdm); 215int pwrdm_state_switch(struct powerdomain *pwrdm);
216int pwrdm_clkdm_state_switch(struct clockdomain *clkdm);
217int pwrdm_pre_transition(void); 216int pwrdm_pre_transition(void);
218int pwrdm_post_transition(void); 217int pwrdm_post_transition(void);
219int pwrdm_set_lowpwrstchange(struct powerdomain *pwrdm); 218int pwrdm_set_lowpwrstchange(struct powerdomain *pwrdm);
diff --git a/arch/arm/mach-omap2/prcm-common.h b/arch/arm/mach-omap2/prcm-common.h
index 5aa5435e3ff1..6da3ba483ad1 100644
--- a/arch/arm/mach-omap2/prcm-common.h
+++ b/arch/arm/mach-omap2/prcm-common.h
@@ -177,6 +177,8 @@
177/* PM_WKST_WKUP, CM_IDLEST_WKUP shared bits */ 177/* PM_WKST_WKUP, CM_IDLEST_WKUP shared bits */
178#define OMAP24XX_ST_GPIOS_SHIFT 2 178#define OMAP24XX_ST_GPIOS_SHIFT 2
179#define OMAP24XX_ST_GPIOS_MASK (1 << 2) 179#define OMAP24XX_ST_GPIOS_MASK (1 << 2)
180#define OMAP24XX_ST_32KSYNC_SHIFT 1
181#define OMAP24XX_ST_32KSYNC_MASK (1 << 1)
180#define OMAP24XX_ST_GPT1_SHIFT 0 182#define OMAP24XX_ST_GPT1_SHIFT 0
181#define OMAP24XX_ST_GPT1_MASK (1 << 0) 183#define OMAP24XX_ST_GPT1_MASK (1 << 0)
182 184
@@ -307,6 +309,8 @@
307#define OMAP3430_ST_SR1_MASK (1 << 6) 309#define OMAP3430_ST_SR1_MASK (1 << 6)
308#define OMAP3430_ST_GPIO1_SHIFT 3 310#define OMAP3430_ST_GPIO1_SHIFT 3
309#define OMAP3430_ST_GPIO1_MASK (1 << 3) 311#define OMAP3430_ST_GPIO1_MASK (1 << 3)
312#define OMAP3430_ST_32KSYNC_SHIFT 2
313#define OMAP3430_ST_32KSYNC_MASK (1 << 2)
310#define OMAP3430_ST_GPT12_SHIFT 1 314#define OMAP3430_ST_GPT12_SHIFT 1
311#define OMAP3430_ST_GPT12_MASK (1 << 1) 315#define OMAP3430_ST_GPT12_MASK (1 << 1)
312#define OMAP3430_ST_GPT1_SHIFT 0 316#define OMAP3430_ST_GPT1_SHIFT 0
@@ -410,6 +414,19 @@
410extern void __iomem *prm_base; 414extern void __iomem *prm_base;
411extern void __iomem *cm_base; 415extern void __iomem *cm_base;
412extern void __iomem *cm2_base; 416extern void __iomem *cm2_base;
417extern void __iomem *prcm_mpu_base;
418
419#if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_ARCH_OMAP5)
420extern void omap_prm_base_init(void);
421extern void omap_cm_base_init(void);
422#else
423static inline void omap_prm_base_init(void)
424{
425}
426static inline void omap_cm_base_init(void)
427{
428}
429#endif
413 430
414/** 431/**
415 * struct omap_prcm_irq - describes a PRCM interrupt bit 432 * struct omap_prcm_irq - describes a PRCM interrupt bit
diff --git a/arch/arm/mach-omap2/prcm.c b/arch/arm/mach-omap2/prcm.c
index 626acfad7190..480f40a5ee42 100644
--- a/arch/arm/mach-omap2/prcm.c
+++ b/arch/arm/mach-omap2/prcm.c
@@ -42,6 +42,7 @@
42void __iomem *prm_base; 42void __iomem *prm_base;
43void __iomem *cm_base; 43void __iomem *cm_base;
44void __iomem *cm2_base; 44void __iomem *cm2_base;
45void __iomem *prcm_mpu_base;
45 46
46#define MAX_MODULE_ENABLE_WAIT 100000 47#define MAX_MODULE_ENABLE_WAIT 100000
47 48
@@ -155,4 +156,11 @@ void __init omap2_set_globals_prcm(struct omap_globals *omap2_globals)
155 cm_base = omap2_globals->cm; 156 cm_base = omap2_globals->cm;
156 if (omap2_globals->cm2) 157 if (omap2_globals->cm2)
157 cm2_base = omap2_globals->cm2; 158 cm2_base = omap2_globals->cm2;
159 if (omap2_globals->prcm_mpu)
160 prcm_mpu_base = omap2_globals->prcm_mpu;
161
162 if (cpu_is_omap44xx()) {
163 omap_prm_base_init();
164 omap_cm_base_init();
165 }
158} 166}
diff --git a/arch/arm/mach-omap2/prminst44xx.c b/arch/arm/mach-omap2/prminst44xx.c
index 9b3898a3ac9b..c12320c0ae95 100644
--- a/arch/arm/mach-omap2/prminst44xx.c
+++ b/arch/arm/mach-omap2/prminst44xx.c
@@ -18,20 +18,26 @@
18 18
19#include "iomap.h" 19#include "iomap.h"
20#include "common.h" 20#include "common.h"
21#include "prcm-common.h"
21#include "prm44xx.h" 22#include "prm44xx.h"
22#include "prminst44xx.h" 23#include "prminst44xx.h"
23#include "prm-regbits-44xx.h" 24#include "prm-regbits-44xx.h"
24#include "prcm44xx.h" 25#include "prcm44xx.h"
25#include "prcm_mpu44xx.h" 26#include "prcm_mpu44xx.h"
26 27
27static u32 _prm_bases[OMAP4_MAX_PRCM_PARTITIONS] = { 28static void __iomem *_prm_bases[OMAP4_MAX_PRCM_PARTITIONS];
28 [OMAP4430_INVALID_PRCM_PARTITION] = 0, 29
29 [OMAP4430_PRM_PARTITION] = OMAP4430_PRM_BASE, 30/**
30 [OMAP4430_CM1_PARTITION] = 0, 31 * omap_prm_base_init - Populates the prm partitions
31 [OMAP4430_CM2_PARTITION] = 0, 32 *
32 [OMAP4430_SCRM_PARTITION] = 0, 33 * Populates the base addresses of the _prm_bases
33 [OMAP4430_PRCM_MPU_PARTITION] = OMAP4430_PRCM_MPU_BASE, 34 * array used for read/write of prm module registers.
34}; 35 */
36void omap_prm_base_init(void)
37{
38 _prm_bases[OMAP4430_PRM_PARTITION] = prm_base;
39 _prm_bases[OMAP4430_PRCM_MPU_PARTITION] = prcm_mpu_base;
40}
35 41
36/* Read a register in a PRM instance */ 42/* Read a register in a PRM instance */
37u32 omap4_prminst_read_inst_reg(u8 part, s16 inst, u16 idx) 43u32 omap4_prminst_read_inst_reg(u8 part, s16 inst, u16 idx)
@@ -39,8 +45,7 @@ u32 omap4_prminst_read_inst_reg(u8 part, s16 inst, u16 idx)
39 BUG_ON(part >= OMAP4_MAX_PRCM_PARTITIONS || 45 BUG_ON(part >= OMAP4_MAX_PRCM_PARTITIONS ||
40 part == OMAP4430_INVALID_PRCM_PARTITION || 46 part == OMAP4430_INVALID_PRCM_PARTITION ||
41 !_prm_bases[part]); 47 !_prm_bases[part]);
42 return __raw_readl(OMAP2_L4_IO_ADDRESS(_prm_bases[part] + inst + 48 return __raw_readl(_prm_bases[part] + inst + idx);
43 idx));
44} 49}
45 50
46/* Write into a register in a PRM instance */ 51/* Write into a register in a PRM instance */
@@ -49,7 +54,7 @@ void omap4_prminst_write_inst_reg(u32 val, u8 part, s16 inst, u16 idx)
49 BUG_ON(part >= OMAP4_MAX_PRCM_PARTITIONS || 54 BUG_ON(part >= OMAP4_MAX_PRCM_PARTITIONS ||
50 part == OMAP4430_INVALID_PRCM_PARTITION || 55 part == OMAP4430_INVALID_PRCM_PARTITION ||
51 !_prm_bases[part]); 56 !_prm_bases[part]);
52 __raw_writel(val, OMAP2_L4_IO_ADDRESS(_prm_bases[part] + inst + idx)); 57 __raw_writel(val, _prm_bases[part] + inst + idx);
53} 58}
54 59
55/* Read-modify-write a register in PRM. Caller must lock */ 60/* Read-modify-write a register in PRM. Caller must lock */
diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
index ecec873e78cd..1b7835865c83 100644
--- a/arch/arm/mach-omap2/timer.c
+++ b/arch/arm/mach-omap2/timer.c
@@ -178,13 +178,6 @@ static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer,
178 if (IS_ERR(timer->fclk)) 178 if (IS_ERR(timer->fclk))
179 return -ENODEV; 179 return -ENODEV;
180 180
181 sprintf(name, "gpt%d_ick", gptimer_id);
182 timer->iclk = clk_get(NULL, name);
183 if (IS_ERR(timer->iclk)) {
184 clk_put(timer->fclk);
185 return -ENODEV;
186 }
187
188 omap_hwmod_enable(oh); 181 omap_hwmod_enable(oh);
189 182
190 sys_timer_reserved |= (1 << (gptimer_id - 1)); 183 sys_timer_reserved |= (1 << (gptimer_id - 1));
diff --git a/arch/arm/mach-omap2/twl-common.c b/arch/arm/mach-omap2/twl-common.c
index 7a7b89304c48..ee6596b45214 100644
--- a/arch/arm/mach-omap2/twl-common.c
+++ b/arch/arm/mach-omap2/twl-common.c
@@ -31,6 +31,7 @@
31 31
32#include "twl-common.h" 32#include "twl-common.h"
33#include "pm.h" 33#include "pm.h"
34#include "voltage.h"
34 35
35static struct i2c_board_info __initdata pmic_i2c_board_info = { 36static struct i2c_board_info __initdata pmic_i2c_board_info = {
36 .addr = 0x48, 37 .addr = 0x48,
@@ -47,6 +48,18 @@ static struct i2c_board_info __initdata omap4_i2c1_board_info[] = {
47 }, 48 },
48}; 49};
49 50
51static int twl_set_voltage(void *data, int target_uV)
52{
53 struct voltagedomain *voltdm = (struct voltagedomain *)data;
54 return voltdm_scale(voltdm, target_uV);
55}
56
57static int twl_get_voltage(void *data)
58{
59 struct voltagedomain *voltdm = (struct voltagedomain *)data;
60 return voltdm_get_voltage(voltdm);
61}
62
50void __init omap_pmic_init(int bus, u32 clkrate, 63void __init omap_pmic_init(int bus, u32 clkrate,
51 const char *pmic_type, int pmic_irq, 64 const char *pmic_type, int pmic_irq,
52 struct twl4030_platform_data *pmic_data) 65 struct twl4030_platform_data *pmic_data)
@@ -153,6 +166,48 @@ static struct regulator_init_data omap3_vpll2_idata = {
153 .consumer_supplies = omap3_vpll2_supplies, 166 .consumer_supplies = omap3_vpll2_supplies,
154}; 167};
155 168
169static struct regulator_consumer_supply omap3_vdd1_supply[] = {
170 REGULATOR_SUPPLY("vcc", "mpu.0"),
171};
172
173static struct regulator_consumer_supply omap3_vdd2_supply[] = {
174 REGULATOR_SUPPLY("vcc", "l3_main.0"),
175};
176
177static struct regulator_init_data omap3_vdd1 = {
178 .constraints = {
179 .name = "vdd_mpu_iva",
180 .min_uV = 600000,
181 .max_uV = 1450000,
182 .valid_modes_mask = REGULATOR_MODE_NORMAL,
183 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE,
184 },
185 .num_consumer_supplies = ARRAY_SIZE(omap3_vdd1_supply),
186 .consumer_supplies = omap3_vdd1_supply,
187};
188
189static struct regulator_init_data omap3_vdd2 = {
190 .constraints = {
191 .name = "vdd_core",
192 .min_uV = 600000,
193 .max_uV = 1450000,
194 .valid_modes_mask = REGULATOR_MODE_NORMAL,
195 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE,
196 },
197 .num_consumer_supplies = ARRAY_SIZE(omap3_vdd2_supply),
198 .consumer_supplies = omap3_vdd2_supply,
199};
200
201static struct twl_regulator_driver_data omap3_vdd1_drvdata = {
202 .get_voltage = twl_get_voltage,
203 .set_voltage = twl_set_voltage,
204};
205
206static struct twl_regulator_driver_data omap3_vdd2_drvdata = {
207 .get_voltage = twl_get_voltage,
208 .set_voltage = twl_set_voltage,
209};
210
156void __init omap3_pmic_get_config(struct twl4030_platform_data *pmic_data, 211void __init omap3_pmic_get_config(struct twl4030_platform_data *pmic_data,
157 u32 pdata_flags, u32 regulators_flags) 212 u32 pdata_flags, u32 regulators_flags)
158{ 213{
@@ -160,6 +215,16 @@ void __init omap3_pmic_get_config(struct twl4030_platform_data *pmic_data,
160 pmic_data->irq_base = TWL4030_IRQ_BASE; 215 pmic_data->irq_base = TWL4030_IRQ_BASE;
161 if (!pmic_data->irq_end) 216 if (!pmic_data->irq_end)
162 pmic_data->irq_end = TWL4030_IRQ_END; 217 pmic_data->irq_end = TWL4030_IRQ_END;
218 if (!pmic_data->vdd1) {
219 omap3_vdd1.driver_data = &omap3_vdd1_drvdata;
220 omap3_vdd1_drvdata.data = voltdm_lookup("mpu_iva");
221 pmic_data->vdd1 = &omap3_vdd1;
222 }
223 if (!pmic_data->vdd2) {
224 omap3_vdd2.driver_data = &omap3_vdd2_drvdata;
225 omap3_vdd2_drvdata.data = voltdm_lookup("core");
226 pmic_data->vdd2 = &omap3_vdd2;
227 }
163 228
164 /* Common platform data configurations */ 229 /* Common platform data configurations */
165 if (pdata_flags & TWL_COMMON_PDATA_USB && !pmic_data->usb) 230 if (pdata_flags & TWL_COMMON_PDATA_USB && !pmic_data->usb)
@@ -310,6 +375,70 @@ static struct regulator_init_data omap4_clk32kg_idata = {
310 }, 375 },
311}; 376};
312 377
378static struct regulator_consumer_supply omap4_vdd1_supply[] = {
379 REGULATOR_SUPPLY("vcc", "mpu.0"),
380};
381
382static struct regulator_consumer_supply omap4_vdd2_supply[] = {
383 REGULATOR_SUPPLY("vcc", "iva.0"),
384};
385
386static struct regulator_consumer_supply omap4_vdd3_supply[] = {
387 REGULATOR_SUPPLY("vcc", "l3_main.0"),
388};
389
390static struct regulator_init_data omap4_vdd1 = {
391 .constraints = {
392 .name = "vdd_mpu",
393 .min_uV = 500000,
394 .max_uV = 1500000,
395 .valid_modes_mask = REGULATOR_MODE_NORMAL,
396 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE,
397 },
398 .num_consumer_supplies = ARRAY_SIZE(omap4_vdd1_supply),
399 .consumer_supplies = omap4_vdd1_supply,
400};
401
402static struct regulator_init_data omap4_vdd2 = {
403 .constraints = {
404 .name = "vdd_iva",
405 .min_uV = 500000,
406 .max_uV = 1500000,
407 .valid_modes_mask = REGULATOR_MODE_NORMAL,
408 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE,
409 },
410 .num_consumer_supplies = ARRAY_SIZE(omap4_vdd2_supply),
411 .consumer_supplies = omap4_vdd2_supply,
412};
413
414static struct regulator_init_data omap4_vdd3 = {
415 .constraints = {
416 .name = "vdd_core",
417 .min_uV = 500000,
418 .max_uV = 1500000,
419 .valid_modes_mask = REGULATOR_MODE_NORMAL,
420 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE,
421 },
422 .num_consumer_supplies = ARRAY_SIZE(omap4_vdd3_supply),
423 .consumer_supplies = omap4_vdd3_supply,
424};
425
426
427static struct twl_regulator_driver_data omap4_vdd1_drvdata = {
428 .get_voltage = twl_get_voltage,
429 .set_voltage = twl_set_voltage,
430};
431
432static struct twl_regulator_driver_data omap4_vdd2_drvdata = {
433 .get_voltage = twl_get_voltage,
434 .set_voltage = twl_set_voltage,
435};
436
437static struct twl_regulator_driver_data omap4_vdd3_drvdata = {
438 .get_voltage = twl_get_voltage,
439 .set_voltage = twl_set_voltage,
440};
441
313void __init omap4_pmic_get_config(struct twl4030_platform_data *pmic_data, 442void __init omap4_pmic_get_config(struct twl4030_platform_data *pmic_data,
314 u32 pdata_flags, u32 regulators_flags) 443 u32 pdata_flags, u32 regulators_flags)
315{ 444{
@@ -318,6 +447,24 @@ void __init omap4_pmic_get_config(struct twl4030_platform_data *pmic_data,
318 if (!pmic_data->irq_end) 447 if (!pmic_data->irq_end)
319 pmic_data->irq_end = TWL6030_IRQ_END; 448 pmic_data->irq_end = TWL6030_IRQ_END;
320 449
450 if (!pmic_data->vdd1) {
451 omap4_vdd1.driver_data = &omap4_vdd1_drvdata;
452 omap4_vdd1_drvdata.data = voltdm_lookup("mpu");
453 pmic_data->vdd1 = &omap4_vdd1;
454 }
455
456 if (!pmic_data->vdd2) {
457 omap4_vdd2.driver_data = &omap4_vdd2_drvdata;
458 omap4_vdd2_drvdata.data = voltdm_lookup("iva");
459 pmic_data->vdd2 = &omap4_vdd2;
460 }
461
462 if (!pmic_data->vdd3) {
463 omap4_vdd3.driver_data = &omap4_vdd3_drvdata;
464 omap4_vdd3_drvdata.data = voltdm_lookup("core");
465 pmic_data->vdd3 = &omap4_vdd3;
466 }
467
321 /* Common platform data configurations */ 468 /* Common platform data configurations */
322 if (pdata_flags & TWL_COMMON_PDATA_USB && !pmic_data->usb) 469 if (pdata_flags & TWL_COMMON_PDATA_USB && !pmic_data->usb)
323 pmic_data->usb = &omap4_usb_pdata; 470 pmic_data->usb = &omap4_usb_pdata;
diff --git a/arch/arm/mach-omap2/vc3xxx_data.c b/arch/arm/mach-omap2/vc3xxx_data.c
index a5ec7f8f2ea8..5d8eaf31569c 100644
--- a/arch/arm/mach-omap2/vc3xxx_data.c
+++ b/arch/arm/mach-omap2/vc3xxx_data.c
@@ -46,6 +46,7 @@ static struct omap_vc_common omap3_vc_common = {
46}; 46};
47 47
48struct omap_vc_channel omap3_vc_mpu = { 48struct omap_vc_channel omap3_vc_mpu = {
49 .flags = OMAP_VC_CHANNEL_DEFAULT,
49 .common = &omap3_vc_common, 50 .common = &omap3_vc_common,
50 .smps_sa_reg = OMAP3_PRM_VC_SMPS_SA_OFFSET, 51 .smps_sa_reg = OMAP3_PRM_VC_SMPS_SA_OFFSET,
51 .smps_volra_reg = OMAP3_PRM_VC_SMPS_VOL_RA_OFFSET, 52 .smps_volra_reg = OMAP3_PRM_VC_SMPS_VOL_RA_OFFSET,
diff --git a/arch/arm/mach-omap2/voltage.c b/arch/arm/mach-omap2/voltage.c
index 8a36342e60d2..4dc60e83e00d 100644
--- a/arch/arm/mach-omap2/voltage.c
+++ b/arch/arm/mach-omap2/voltage.c
@@ -73,7 +73,8 @@ unsigned long voltdm_get_voltage(struct voltagedomain *voltdm)
73int voltdm_scale(struct voltagedomain *voltdm, 73int voltdm_scale(struct voltagedomain *voltdm,
74 unsigned long target_volt) 74 unsigned long target_volt)
75{ 75{
76 int ret; 76 int ret, i;
77 unsigned long volt = 0;
77 78
78 if (!voltdm || IS_ERR(voltdm)) { 79 if (!voltdm || IS_ERR(voltdm)) {
79 pr_warning("%s: VDD specified does not exist!\n", __func__); 80 pr_warning("%s: VDD specified does not exist!\n", __func__);
@@ -86,9 +87,23 @@ int voltdm_scale(struct voltagedomain *voltdm,
86 return -ENODATA; 87 return -ENODATA;
87 } 88 }
88 89
89 ret = voltdm->scale(voltdm, target_volt); 90 /* Adjust voltage to the exact voltage from the OPP table */
91 for (i = 0; voltdm->volt_data[i].volt_nominal != 0; i++) {
92 if (voltdm->volt_data[i].volt_nominal >= target_volt) {
93 volt = voltdm->volt_data[i].volt_nominal;
94 break;
95 }
96 }
97
98 if (!volt) {
99 pr_warning("%s: not scaling. OPP voltage for %lu, not found.\n",
100 __func__, target_volt);
101 return -EINVAL;
102 }
103
104 ret = voltdm->scale(voltdm, volt);
90 if (!ret) 105 if (!ret)
91 voltdm->nominal_volt = target_volt; 106 voltdm->nominal_volt = volt;
92 107
93 return ret; 108 return ret;
94} 109}
diff --git a/arch/arm/mach-omap2/wd_timer.c b/arch/arm/mach-omap2/wd_timer.c
index 4067669d96c4..b2f1c67043a2 100644
--- a/arch/arm/mach-omap2/wd_timer.c
+++ b/arch/arm/mach-omap2/wd_timer.c
@@ -14,6 +14,7 @@
14#include <plat/omap_hwmod.h> 14#include <plat/omap_hwmod.h>
15 15
16#include "wd_timer.h" 16#include "wd_timer.h"
17#include "common.h"
17 18
18/* 19/*
19 * In order to avoid any assumptions from bootloader regarding WDT 20 * In order to avoid any assumptions from bootloader regarding WDT
@@ -25,6 +26,8 @@
25#define OMAP_WDT_WPS 0x34 26#define OMAP_WDT_WPS 0x34
26#define OMAP_WDT_SPR 0x48 27#define OMAP_WDT_SPR 0x48
27 28
29/* Maximum microseconds to wait for OMAP module to softreset */
30#define MAX_MODULE_SOFTRESET_WAIT 10000
28 31
29int omap2_wd_timer_disable(struct omap_hwmod *oh) 32int omap2_wd_timer_disable(struct omap_hwmod *oh)
30{ 33{
@@ -54,3 +57,45 @@ int omap2_wd_timer_disable(struct omap_hwmod *oh)
54 return 0; 57 return 0;
55} 58}
56 59
60/**
61 * omap2_wdtimer_reset - reset and disable the WDTIMER IP block
62 * @oh: struct omap_hwmod *
63 *
64 * After the WDTIMER IP blocks are reset on OMAP2/3, we must also take
65 * care to execute the special watchdog disable sequence. This is
66 * because the watchdog is re-armed upon OCP softreset. (On OMAP4,
67 * this behavior was apparently changed and the watchdog is no longer
68 * re-armed after an OCP soft-reset.) Returns -ETIMEDOUT if the reset
69 * did not complete, or 0 upon success.
70 *
71 * XXX Most of this code should be moved to the omap_hwmod.c layer
72 * during a normal merge window. omap_hwmod_softreset() should be
73 * renamed to omap_hwmod_set_ocp_softreset(), and omap_hwmod_softreset()
74 * should call the hwmod _ocp_softreset() code.
75 */
76int omap2_wd_timer_reset(struct omap_hwmod *oh)
77{
78 int c = 0;
79
80 /* Write to the SOFTRESET bit */
81 omap_hwmod_softreset(oh);
82
83 /* Poll on RESETDONE bit */
84 omap_test_timeout((omap_hwmod_read(oh,
85 oh->class->sysc->syss_offs)
86 & SYSS_RESETDONE_MASK),
87 MAX_MODULE_SOFTRESET_WAIT, c);
88
89 if (oh->class->sysc->srst_udelay)
90 udelay(oh->class->sysc->srst_udelay);
91
92 if (c == MAX_MODULE_SOFTRESET_WAIT)
93 pr_warning("%s: %s: softreset failed (waited %d usec)\n",
94 __func__, oh->name, MAX_MODULE_SOFTRESET_WAIT);
95 else
96 pr_debug("%s: %s: softreset in %d usec\n", __func__,
97 oh->name, c);
98
99 return (c == MAX_MODULE_SOFTRESET_WAIT) ? -ETIMEDOUT :
100 omap2_wd_timer_disable(oh);
101}
diff --git a/arch/arm/mach-omap2/wd_timer.h b/arch/arm/mach-omap2/wd_timer.h
index e0054a2d5505..f6bbba73b535 100644
--- a/arch/arm/mach-omap2/wd_timer.h
+++ b/arch/arm/mach-omap2/wd_timer.h
@@ -13,5 +13,6 @@
13#include <plat/omap_hwmod.h> 13#include <plat/omap_hwmod.h>
14 14
15extern int omap2_wd_timer_disable(struct omap_hwmod *oh); 15extern int omap2_wd_timer_disable(struct omap_hwmod *oh);
16extern int omap2_wd_timer_reset(struct omap_hwmod *oh);
16 17
17#endif 18#endif
diff --git a/arch/arm/mach-ux500/Makefile b/arch/arm/mach-ux500/Makefile
index 041c35885981..026086ff9e6c 100644
--- a/arch/arm/mach-ux500/Makefile
+++ b/arch/arm/mach-ux500/Makefile
@@ -4,6 +4,7 @@
4 4
5obj-y := clock.o cpu.o devices.o devices-common.o \ 5obj-y := clock.o cpu.o devices.o devices-common.o \
6 id.o usb.o timer.o 6 id.o usb.o timer.o
7obj-$(CONFIG_CPU_IDLE) += cpuidle.o
7obj-$(CONFIG_CACHE_L2X0) += cache-l2x0.o 8obj-$(CONFIG_CACHE_L2X0) += cache-l2x0.o
8obj-$(CONFIG_UX500_SOC_DB8500) += cpu-db8500.o devices-db8500.o 9obj-$(CONFIG_UX500_SOC_DB8500) += cpu-db8500.o devices-db8500.o
9obj-$(CONFIG_MACH_MOP500) += board-mop500.o board-mop500-sdi.o \ 10obj-$(CONFIG_MACH_MOP500) += board-mop500.o board-mop500-sdi.o \
diff --git a/arch/arm/mach-ux500/cpuidle.c b/arch/arm/mach-ux500/cpuidle.c
new file mode 100644
index 000000000000..b54884bd2549
--- /dev/null
+++ b/arch/arm/mach-ux500/cpuidle.c
@@ -0,0 +1,171 @@
1/*
2 * Copyright (c) 2012 Linaro : Daniel Lezcano <daniel.lezcano@linaro.org> (IBM)
3 *
4 * Based on the work of Rickard Andersson <rickard.andersson@stericsson.com>
5 * and Jonas Aaberg <jonas.aberg@stericsson.com>.
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 version 2 as
9 * published by the Free Software Foundation.
10 */
11
12#include <linux/module.h>
13#include <linux/cpuidle.h>
14#include <linux/clockchips.h>
15#include <linux/spinlock.h>
16#include <linux/atomic.h>
17#include <linux/smp.h>
18#include <linux/mfd/dbx500-prcmu.h>
19
20#include <asm/cpuidle.h>
21#include <asm/proc-fns.h>
22
23static atomic_t master = ATOMIC_INIT(0);
24static DEFINE_SPINLOCK(master_lock);
25static DEFINE_PER_CPU(struct cpuidle_device, ux500_cpuidle_device);
26
27static inline int ux500_enter_idle(struct cpuidle_device *dev,
28 struct cpuidle_driver *drv, int index)
29{
30 int this_cpu = smp_processor_id();
31 bool recouple = false;
32
33 clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER, &this_cpu);
34
35 if (atomic_inc_return(&master) == num_online_cpus()) {
36
37 /* With this lock, we prevent the other cpu to exit and enter
38 * this function again and become the master */
39 if (!spin_trylock(&master_lock))
40 goto wfi;
41
42 /* decouple the gic from the A9 cores */
43 if (prcmu_gic_decouple())
44 goto out;
45
46 /* If an error occur, we will have to recouple the gic
47 * manually */
48 recouple = true;
49
50 /* At this state, as the gic is decoupled, if the other
51 * cpu is in WFI, we have the guarantee it won't be wake
52 * up, so we can safely go to retention */
53 if (!prcmu_is_cpu_in_wfi(this_cpu ? 0 : 1))
54 goto out;
55
56 /* The prcmu will be in charge of watching the interrupts
57 * and wake up the cpus */
58 if (prcmu_copy_gic_settings())
59 goto out;
60
61 /* Check in the meantime an interrupt did
62 * not occur on the gic ... */
63 if (prcmu_gic_pending_irq())
64 goto out;
65
66 /* ... and the prcmu */
67 if (prcmu_pending_irq())
68 goto out;
69
70 /* Go to the retention state, the prcmu will wait for the
71 * cpu to go WFI and this is what happens after exiting this
72 * 'master' critical section */
73 if (prcmu_set_power_state(PRCMU_AP_IDLE, true, true))
74 goto out;
75
76 /* When we switch to retention, the prcmu is in charge
77 * of recoupling the gic automatically */
78 recouple = false;
79
80 spin_unlock(&master_lock);
81 }
82wfi:
83 cpu_do_idle();
84out:
85 atomic_dec(&master);
86
87 if (recouple) {
88 prcmu_gic_recouple();
89 spin_unlock(&master_lock);
90 }
91
92 clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_EXIT, &this_cpu);
93
94 return index;
95}
96
97static struct cpuidle_driver ux500_idle_driver = {
98 .name = "ux500_idle",
99 .owner = THIS_MODULE,
100 .en_core_tk_irqen = 1,
101 .states = {
102 ARM_CPUIDLE_WFI_STATE,
103 {
104 .enter = ux500_enter_idle,
105 .exit_latency = 70,
106 .target_residency = 260,
107 .flags = CPUIDLE_FLAG_TIME_VALID,
108 .name = "ApIdle",
109 .desc = "ARM Retention",
110 },
111 },
112 .safe_state_index = 0,
113 .state_count = 2,
114};
115
116/*
117 * For each cpu, setup the broadcast timer because we will
118 * need to migrate the timers for the states >= ApIdle.
119 */
120static void ux500_setup_broadcast_timer(void *arg)
121{
122 int cpu = smp_processor_id();
123 clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ON, &cpu);
124}
125
126int __init ux500_idle_init(void)
127{
128 int ret, cpu;
129 struct cpuidle_device *device;
130
131 /* Configure wake up reasons */
132 prcmu_enable_wakeups(PRCMU_WAKEUP(ARM) | PRCMU_WAKEUP(RTC) |
133 PRCMU_WAKEUP(ABB));
134
135 /*
136 * Configure the timer broadcast for each cpu, that must
137 * be done from the cpu context, so we use a smp cross
138 * call with 'on_each_cpu'.
139 */
140 on_each_cpu(ux500_setup_broadcast_timer, NULL, 1);
141
142 ret = cpuidle_register_driver(&ux500_idle_driver);
143 if (ret) {
144 printk(KERN_ERR "failed to register ux500 idle driver\n");
145 return ret;
146 }
147
148 for_each_online_cpu(cpu) {
149 device = &per_cpu(ux500_cpuidle_device, cpu);
150 device->cpu = cpu;
151 ret = cpuidle_register_device(device);
152 if (ret) {
153 printk(KERN_ERR "Failed to register cpuidle "
154 "device for cpu%d\n", cpu);
155 goto out_unregister;
156 }
157 }
158out:
159 return ret;
160
161out_unregister:
162 for_each_online_cpu(cpu) {
163 device = &per_cpu(ux500_cpuidle_device, cpu);
164 cpuidle_unregister_device(device);
165 }
166
167 cpuidle_unregister_driver(&ux500_idle_driver);
168 goto out;
169}
170
171device_initcall(ux500_idle_init);
diff --git a/arch/arm/mm/cache-tauros2.c b/arch/arm/mm/cache-tauros2.c
index 1fbca05fe906..23a7643e9a87 100644
--- a/arch/arm/mm/cache-tauros2.c
+++ b/arch/arm/mm/cache-tauros2.c
@@ -108,6 +108,26 @@ static void tauros2_flush_range(unsigned long start, unsigned long end)
108 108
109 dsb(); 109 dsb();
110} 110}
111
112static void tauros2_disable(void)
113{
114 __asm__ __volatile__ (
115 "mcr p15, 1, %0, c7, c11, 0 @L2 Cache Clean All\n\t"
116 "mrc p15, 0, %0, c1, c0, 0\n\t"
117 "bic %0, %0, #(1 << 26)\n\t"
118 "mcr p15, 0, %0, c1, c0, 0 @Disable L2 Cache\n\t"
119 : : "r" (0x0));
120}
121
122static void tauros2_resume(void)
123{
124 __asm__ __volatile__ (
125 "mcr p15, 1, %0, c7, c7, 0 @L2 Cache Invalidate All\n\t"
126 "mrc p15, 0, %0, c1, c0, 0\n\t"
127 "orr %0, %0, #(1 << 26)\n\t"
128 "mcr p15, 0, %0, c1, c0, 0 @Enable L2 Cache\n\t"
129 : : "r" (0x0));
130}
111#endif 131#endif
112 132
113static inline u32 __init read_extra_features(void) 133static inline u32 __init read_extra_features(void)
@@ -194,6 +214,8 @@ void __init tauros2_init(void)
194 outer_cache.inv_range = tauros2_inv_range; 214 outer_cache.inv_range = tauros2_inv_range;
195 outer_cache.clean_range = tauros2_clean_range; 215 outer_cache.clean_range = tauros2_clean_range;
196 outer_cache.flush_range = tauros2_flush_range; 216 outer_cache.flush_range = tauros2_flush_range;
217 outer_cache.disable = tauros2_disable;
218 outer_cache.resume = tauros2_resume;
197 } 219 }
198#endif 220#endif
199 221
@@ -219,6 +241,8 @@ void __init tauros2_init(void)
219 outer_cache.inv_range = tauros2_inv_range; 241 outer_cache.inv_range = tauros2_inv_range;
220 outer_cache.clean_range = tauros2_clean_range; 242 outer_cache.clean_range = tauros2_clean_range;
221 outer_cache.flush_range = tauros2_flush_range; 243 outer_cache.flush_range = tauros2_flush_range;
244 outer_cache.disable = tauros2_disable;
245 outer_cache.resume = tauros2_resume;
222 } 246 }
223#endif 247#endif
224 248
diff --git a/arch/arm/mm/proc-mohawk.S b/arch/arm/mm/proc-mohawk.S
index b0475468c711..fbb2124a547d 100644
--- a/arch/arm/mm/proc-mohawk.S
+++ b/arch/arm/mm/proc-mohawk.S
@@ -345,6 +345,41 @@ ENTRY(cpu_mohawk_set_pte_ext)
345 mcr p15, 0, r0, c7, c10, 4 @ drain WB 345 mcr p15, 0, r0, c7, c10, 4 @ drain WB
346 mov pc, lr 346 mov pc, lr
347 347
348.globl cpu_mohawk_suspend_size
349.equ cpu_mohawk_suspend_size, 4 * 6
350#ifdef CONFIG_PM_SLEEP
351ENTRY(cpu_mohawk_do_suspend)
352 stmfd sp!, {r4 - r9, lr}
353 mrc p14, 0, r4, c6, c0, 0 @ clock configuration, for turbo mode
354 mrc p15, 0, r5, c15, c1, 0 @ CP access reg
355 mrc p15, 0, r6, c13, c0, 0 @ PID
356 mrc p15, 0, r7, c3, c0, 0 @ domain ID
357 mrc p15, 0, r8, c1, c0, 1 @ auxiliary control reg
358 mrc p15, 0, r9, c1, c0, 0 @ control reg
359 bic r4, r4, #2 @ clear frequency change bit
360 stmia r0, {r4 - r9} @ store cp regs
361 ldmia sp!, {r4 - r9, pc}
362ENDPROC(cpu_mohawk_do_suspend)
363
364ENTRY(cpu_mohawk_do_resume)
365 ldmia r0, {r4 - r9} @ load cp regs
366 mov ip, #0
367 mcr p15, 0, ip, c7, c7, 0 @ invalidate I & D caches, BTB
368 mcr p15, 0, ip, c7, c10, 4 @ drain write (&fill) buffer
369 mcr p15, 0, ip, c7, c5, 4 @ flush prefetch buffer
370 mcr p15, 0, ip, c8, c7, 0 @ invalidate I & D TLBs
371 mcr p14, 0, r4, c6, c0, 0 @ clock configuration, turbo mode.
372 mcr p15, 0, r5, c15, c1, 0 @ CP access reg
373 mcr p15, 0, r6, c13, c0, 0 @ PID
374 mcr p15, 0, r7, c3, c0, 0 @ domain ID
375 orr r1, r1, #0x18 @ cache the page table in L2
376 mcr p15, 0, r1, c2, c0, 0 @ translation table base addr
377 mcr p15, 0, r8, c1, c0, 1 @ auxiliary control reg
378 mov r0, r9 @ control register
379 b cpu_resume_mmu
380ENDPROC(cpu_mohawk_do_resume)
381#endif
382
348 __CPUINIT 383 __CPUINIT
349 384
350 .type __mohawk_setup, #function 385 .type __mohawk_setup, #function
diff --git a/arch/arm/plat-omap/include/plat/clkdev_omap.h b/arch/arm/plat-omap/include/plat/clkdev_omap.h
index b299b8d201c8..d0ed8c443a63 100644
--- a/arch/arm/plat-omap/include/plat/clkdev_omap.h
+++ b/arch/arm/plat-omap/include/plat/clkdev_omap.h
@@ -34,8 +34,7 @@ struct omap_clk {
34#define CK_243X (1 << 5) /* 243x, 253x */ 34#define CK_243X (1 << 5) /* 243x, 253x */
35#define CK_3430ES1 (1 << 6) /* 34xxES1 only */ 35#define CK_3430ES1 (1 << 6) /* 34xxES1 only */
36#define CK_3430ES2PLUS (1 << 7) /* 34xxES2, ES3, non-Sitara 35xx only */ 36#define CK_3430ES2PLUS (1 << 7) /* 34xxES2, ES3, non-Sitara 35xx only */
37#define CK_3505 (1 << 8) 37#define CK_AM35XX (1 << 9) /* Sitara AM35xx */
38#define CK_3517 (1 << 9)
39#define CK_36XX (1 << 10) /* 36xx/37xx-specific clocks */ 38#define CK_36XX (1 << 10) /* 36xx/37xx-specific clocks */
40#define CK_443X (1 << 11) 39#define CK_443X (1 << 11)
41#define CK_TI816X (1 << 12) 40#define CK_TI816X (1 << 12)
@@ -44,7 +43,6 @@ struct omap_clk {
44 43
45 44
46#define CK_34XX (CK_3430ES1 | CK_3430ES2PLUS) 45#define CK_34XX (CK_3430ES1 | CK_3430ES2PLUS)
47#define CK_AM35XX (CK_3505 | CK_3517) /* all Sitara AM35xx */
48#define CK_3XXX (CK_34XX | CK_AM35XX | CK_36XX) 46#define CK_3XXX (CK_34XX | CK_AM35XX | CK_36XX)
49 47
50 48
diff --git a/arch/arm/plat-omap/include/plat/dmtimer.h b/arch/arm/plat-omap/include/plat/dmtimer.h
index 230ff91be491..bdf871a84d62 100644
--- a/arch/arm/plat-omap/include/plat/dmtimer.h
+++ b/arch/arm/plat-omap/include/plat/dmtimer.h
@@ -259,7 +259,7 @@ struct omap_dm_timer {
259 unsigned long phys_base; 259 unsigned long phys_base;
260 int id; 260 int id;
261 int irq; 261 int irq;
262 struct clk *iclk, *fclk; 262 struct clk *fclk;
263 263
264 void __iomem *io_base; 264 void __iomem *io_base;
265 void __iomem *sys_stat; /* TISTAT timer status */ 265 void __iomem *sys_stat; /* TISTAT timer status */
diff --git a/arch/arm/plat-omap/include/plat/hdq1w.h b/arch/arm/plat-omap/include/plat/hdq1w.h
new file mode 100644
index 000000000000..0c1efc846d8d
--- /dev/null
+++ b/arch/arm/plat-omap/include/plat/hdq1w.h
@@ -0,0 +1,36 @@
1/*
2 * Shared macros and function prototypes for the HDQ1W/1-wire IP block
3 *
4 * Copyright (C) 2012 Texas Instruments, Inc.
5 * Paul Walmsley
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * version 2 as published by the Free Software Foundation.
10 *
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
19 * 02110-1301 USA
20 */
21#ifndef ARCH_ARM_MACH_OMAP2_HDQ1W_H
22#define ARCH_ARM_MACH_OMAP2_HDQ1W_H
23
24#include <plat/omap_hwmod.h>
25
26/*
27 * XXX A future cleanup patch should modify
28 * drivers/w1/masters/omap_hdq.c to use these macros
29 */
30#define HDQ_CTRL_STATUS_OFFSET 0x0c
31#define HDQ_CTRL_STATUS_CLOCKENABLE_SHIFT 5
32
33
34extern int omap_hdq1w_reset(struct omap_hwmod *oh);
35
36#endif
diff --git a/arch/arm/plat-omap/include/plat/mmc.h b/arch/arm/plat-omap/include/plat/mmc.h
index 7a38750c0079..3e7ae0f0215f 100644
--- a/arch/arm/plat-omap/include/plat/mmc.h
+++ b/arch/arm/plat-omap/include/plat/mmc.h
@@ -16,6 +16,7 @@
16#include <linux/mmc/host.h> 16#include <linux/mmc/host.h>
17 17
18#include <plat/board.h> 18#include <plat/board.h>
19#include <plat/omap_hwmod.h>
19 20
20#define OMAP15XX_NR_MMC 1 21#define OMAP15XX_NR_MMC 1
21#define OMAP16XX_NR_MMC 2 22#define OMAP16XX_NR_MMC 2
@@ -195,4 +196,7 @@ static inline int omap_mmc_add(const char *name, int id, unsigned long base,
195} 196}
196 197
197#endif 198#endif
199
200extern int omap_msdi_reset(struct omap_hwmod *oh);
201
198#endif 202#endif
diff --git a/arch/arm/plat-omap/include/plat/omap_hwmod.h b/arch/arm/plat-omap/include/plat/omap_hwmod.h
index 14dde32cd406..c835b7194ff5 100644
--- a/arch/arm/plat-omap/include/plat/omap_hwmod.h
+++ b/arch/arm/plat-omap/include/plat/omap_hwmod.h
@@ -214,6 +214,7 @@ struct omap_hwmod_addr_space {
214#define OCP_USER_MPU (1 << 0) 214#define OCP_USER_MPU (1 << 0)
215#define OCP_USER_SDMA (1 << 1) 215#define OCP_USER_SDMA (1 << 1)
216#define OCP_USER_DSP (1 << 2) 216#define OCP_USER_DSP (1 << 2)
217#define OCP_USER_IVA (1 << 3)
217 218
218/* omap_hwmod_ocp_if.flags bits */ 219/* omap_hwmod_ocp_if.flags bits */
219#define OCPIF_SWSUP_IDLE (1 << 0) 220#define OCPIF_SWSUP_IDLE (1 << 0)