Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'pm' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull arm-soc power management changes from Olof Johansson:
"Power management changes here are mostly for the omap platform, but
also include cpuidle changes for ux500 and suspend/resume code for
mmp."

* tag 'pm' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (48 commits)
ARM: OMAP2+: WDTIMER integration: fix !PM boot crash, disarm timer after hwmod reset
ARM: OMAP2/3: hwmod data: Add 32k-sync timer data to hwmod database
ARM: OMAP4: hwmod_data: Name the common irq for McBSP ports
ARM: OMAP4: hwmod data: I2C: add flag for context restore
ARM: OMAP3: hwmod_data: Rename the common irq for McBSP ports
ARM: OMAP2xxx: hwmod data: add HDQ/1-wire hwmod
ARM: OMAP3: hwmod data: add HDQ/1-wire hwmod
ARM: OMAP2+: hwmod data: add HDQ/1-wire hwmod shared data
ARM: OMAP2+: HDQ1W: add custom reset function
ARM: OMAP2420: hwmod data: Add MMC hwmod data for 2420
arm: omap3: clockdomain data: Remove superfluous commas from gfx_sgx_3xxx_wkdeps[]
ARM: OMAP2+: powerdomain: Get rid off duplicate pwrdm_clkdm_state_switch() API
ARM: OMAP3: clock data: add clockdomain for HDQ functional clock
ARM: OMAP3+: dpll: Configure autoidle mode only if it's supported
ARM: OMAP2+: dmtimer: cleanup iclk usage
ARM: OMAP4+: Add prm and cm base init function.
ARM: OMAP2/3: Add idle_st bits for ST_32KSYNC timer to prcm-common header
ARM: OMAP3: Fix CM register bit masks
ARM: OMAP: clock: convert AM3517/3505 detection/flags to AM35xx
ARM: OMAP3: clock data: treat all AM35x devices the same
...

+3204 -176
+1 -1
arch/arm/Kconfig
··· 2261 2261 config ARCH_SUSPEND_POSSIBLE 2262 2262 depends on !ARCH_S5PC100 && !ARCH_TEGRA 2263 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 2265 def_bool y 2266 2266 2267 2267 config ARM_CPU_SUSPEND
+5
arch/arm/mach-mmp/Makefile
··· 9 9 obj-$(CONFIG_CPU_PXA910) += pxa910.o 10 10 obj-$(CONFIG_CPU_MMP2) += mmp2.o sram.o 11 11 12 + ifeq ($(CONFIG_PM),y) 13 + obj-$(CONFIG_CPU_PXA910) += pm-pxa910.o 14 + obj-$(CONFIG_CPU_MMP2) += pm-mmp2.o 15 + endif 16 + 12 17 # board support 13 18 obj-$(CONFIG_MACH_ASPENITE) += aspenite.o 14 19 obj-$(CONFIG_MACH_ZYLONITE2) += aspenite.o
+12
arch/arm/mach-mmp/include/mach/addr-map.h
··· 31 31 #define SMC_CS1_PHYS_BASE 0x90000000 32 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 46 #endif /* __ASM_MACH_ADDR_MAP_H */
+61
arch/arm/mach-mmp/include/mach/pm-mmp2.h
··· 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 + 49 + enum { 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 + 59 + extern void mmp2_pm_enter_lowpower_mode(int state); 60 + extern int mmp2_set_wake(struct irq_data *d, unsigned int on); 61 + #endif
+77
arch/arm/mach-mmp/include/mach/pm-pxa910.h
··· 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 + 64 + enum { 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 + 75 + extern int pxa910_set_wake(struct irq_data *data, unsigned int on); 76 + 77 + #endif
-3
arch/arm/mach-mmp/include/mach/regs-apbc.h
··· 13 13 14 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 17 * APB clock register offsets for PXA168 21 18 */
-3
arch/arm/mach-mmp/include/mach/regs-apmu.h
··· 13 13 14 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 16 /* Clock Reset Control */ 20 17 #define APMU_IRE APMU_REG(0x048) 21 18 #define APMU_LCD APMU_REG(0x04c)
+13
arch/arm/mach-mmp/irq.c
··· 23 23 24 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 33 #include "common.h" 27 34 28 35 #define MAX_ICU_NR 16 ··· 216 209 set_irq_flags(irq, IRQF_VALID); 217 210 } 218 211 irq_set_default_host(icu_data[0].domain); 212 + #ifdef CONFIG_CPU_PXA910 213 + icu_irq_chip.irq_set_wake = pxa910_set_wake; 214 + #endif 219 215 } 220 216 221 217 /* MMP2 (ARMv7) */ ··· 315 305 set_irq_flags(irq, IRQF_VALID); 316 306 } 317 307 irq_set_default_host(icu_data[0].domain); 308 + #ifdef CONFIG_CPU_MMP2 309 + icu_irq_chip.irq_set_wake = mmp2_set_wake; 310 + #endif 318 311 } 319 312 320 313 #ifdef CONFIG_OF
+264
arch/arm/mach-mmp/pm-mmp2.c
··· 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 + 28 + int 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 + 75 + static 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 + 91 + static 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 + 107 + static 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 + 116 + static 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 + 128 + void 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 + 174 + static 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 + */ 203 + static 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 + */ 213 + static void mmp2_pm_finish(void) 214 + { 215 + mmp2_pm_enter_lowpower_mode(POWER_MODE_CORE_INTIDLE); 216 + } 217 + 218 + static 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 + */ 226 + static 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 + 233 + static 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 + 264 + late_initcall(mmp2_pm_init);
+285
arch/arm/mach-mmp/pm-pxa910.c
··· 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 + 28 + int 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 + 145 + void 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 + 200 + static 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 + */ 239 + static 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 + */ 248 + static void pxa910_pm_finish(void) 249 + { 250 + pxa910_pm_enter_lowpower_mode(POWER_MODE_CORE_INTIDLE); 251 + } 252 + 253 + static int pxa910_pm_valid(suspend_state_t state) 254 + { 255 + return ((state == PM_SUSPEND_STANDBY) || (state == PM_SUSPEND_MEM)); 256 + } 257 + 258 + static 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 + 265 + static 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 + 285 + late_initcall(pxa910_pm_init);
+11
arch/arm/mach-mmp/ttc_dkb.c
··· 17 17 #include <linux/interrupt.h> 18 18 #include <linux/i2c/pca953x.h> 19 19 #include <linux/gpio.h> 20 + #include <linux/mfd/88pm860x.h> 20 21 21 22 #include <asm/mach-types.h> 22 23 #include <asm/mach/arch.h> ··· 136 135 }, 137 136 }; 138 137 138 + static struct pm860x_platform_data ttc_dkb_pm8607_info = { 139 + .irq_base = IRQ_BOARD_START, 140 + }; 141 + 139 142 static struct i2c_board_info ttc_dkb_i2c_info[] = { 143 + { 144 + .type = "88PM860x", 145 + .addr = 0x34, 146 + .platform_data = &ttc_dkb_pm8607_info, 147 + .irq = IRQ_PXA910_PMIC_INT, 148 + }, 140 149 { 141 150 .type = "max7312", 142 151 .addr = 0x23,
+9 -4
arch/arm/mach-omap2/Makefile
··· 4 4 5 5 # Common support 6 6 obj-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 9 9 omap-2-3-common = irq.o sdrc.o 10 10 hwmod-common = omap_hwmod.o \ ··· 118 118 powerdomains44xx_data.o 119 119 120 120 # PRCM clockdomain control 121 - obj-$(CONFIG_ARCH_OMAP2) += clockdomain.o \ 121 + clockdomain-common += clockdomain.o \ 122 + clockdomains_common_data.o 123 + obj-$(CONFIG_ARCH_OMAP2) += $(clockdomain-common) \ 122 124 clockdomain2xxx_3xxx.o \ 123 125 clockdomains2xxx_3xxx_data.o 124 126 obj-$(CONFIG_SOC_OMAP2420) += clockdomains2420_data.o 125 127 obj-$(CONFIG_SOC_OMAP2430) += clockdomains2430_data.o 126 - obj-$(CONFIG_ARCH_OMAP3) += clockdomain.o \ 128 + obj-$(CONFIG_ARCH_OMAP3) += $(clockdomain-common) \ 127 129 clockdomain2xxx_3xxx.o \ 128 130 clockdomains2xxx_3xxx_data.o \ 129 131 clockdomains3xxx_data.o 130 - obj-$(CONFIG_ARCH_OMAP4) += clockdomain.o \ 132 + obj-$(CONFIG_ARCH_OMAP4) += $(clockdomain-common) \ 131 133 clockdomain44xx.o \ 132 134 clockdomains44xx_data.o 133 135 ··· 188 186 ifneq ($(CONFIG_TIDSPBRIDGE),) 189 187 obj-y += dsp.o 190 188 endif 189 + 190 + # OMAP2420 MSDI controller integration support ("MMC") 191 + obj-$(CONFIG_SOC_OMAP2420) += msdi.o 191 192 192 193 # Specific board support 193 194 obj-$(CONFIG_MACH_OMAP_GENERIC) += board-generic.o
+1 -1
arch/arm/mach-omap2/clock.c
··· 439 439 clk->ops->disable(clk); 440 440 } 441 441 if (clk->clkdm != NULL) 442 - pwrdm_clkdm_state_switch(clk->clkdm); 442 + pwrdm_state_switch(clk->clkdm->pwrdm.ptr); 443 443 } 444 444 #endif 445 445
+7 -18
arch/arm/mach-omap2/clock3xxx_data.c
··· 1 1 /* 2 2 * OMAP3 clock data 3 3 * 4 - * Copyright (C) 2007-2010 Texas Instruments, Inc. 4 + * Copyright (C) 2007-2010, 2012 Texas Instruments, Inc. 5 5 * Copyright (C) 2007-2011 Nokia Corporation 6 6 * 7 7 * Written by Paul Walmsley ··· 1640 1640 .name = "hdq_fck", 1641 1641 .ops = &clkops_omap2_dflt_wait, 1642 1642 .parent = &core_12m_fck, 1643 + .clkdm_name = "core_l4_clkdm", 1643 1644 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), 1644 1645 .enable_bit = OMAP3430_EN_HDQ_SHIFT, 1645 1646 .recalc = &followparent_recalc, ··· 3295 3294 CLK(NULL, "gfx_l3_ick", &gfx_l3_ick, CK_3430ES1), 3296 3295 CLK(NULL, "gfx_cg1_ck", &gfx_cg1_ck, CK_3430ES1), 3297 3296 CLK(NULL, "gfx_cg2_ck", &gfx_cg2_ck, CK_3430ES1), 3298 - CLK(NULL, "sgx_fck", &sgx_fck, CK_3430ES2PLUS | CK_3517 | CK_36XX), 3299 - CLK(NULL, "sgx_ick", &sgx_ick, CK_3430ES2PLUS | CK_3517 | CK_36XX), 3297 + CLK(NULL, "sgx_fck", &sgx_fck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX), 3298 + CLK(NULL, "sgx_ick", &sgx_ick, CK_3430ES2PLUS | CK_AM35XX | CK_36XX), 3300 3299 CLK(NULL, "d2d_26m_fck", &d2d_26m_fck, CK_3430ES1), 3301 3300 CLK(NULL, "modem_fck", &modem_fck, CK_34XX | CK_36XX), 3302 3301 CLK(NULL, "sad2d_ick", &sad2d_ick, CK_34XX | CK_36XX), ··· 3420 3419 CLK(NULL, "per_48m_fck", &per_48m_fck, CK_3XXX), 3421 3420 CLK(NULL, "uart3_fck", &uart3_fck, CK_3XXX), 3422 3421 CLK(NULL, "uart4_fck", &uart4_fck, CK_36XX), 3423 - CLK(NULL, "uart4_fck", &uart4_fck_am35xx, CK_3505 | CK_3517), 3422 + CLK(NULL, "uart4_fck", &uart4_fck_am35xx, CK_AM35XX), 3424 3423 CLK(NULL, "gpt2_fck", &gpt2_fck, CK_3XXX), 3425 3424 CLK(NULL, "gpt3_fck", &gpt3_fck, CK_3XXX), 3426 3425 CLK(NULL, "gpt4_fck", &gpt4_fck, CK_3XXX), ··· 3514 3513 struct omap_clk *c; 3515 3514 u32 cpu_clkflg = 0; 3516 3515 3517 - /* 3518 - * 3505 must be tested before 3517, since 3517 returns true 3519 - * for both AM3517 chips and AM3517 family chips, which 3520 - * includes 3505. Unfortunately there's no obvious family 3521 - * test for 3517/3505 :-( 3522 - */ 3523 - if (cpu_is_omap3505()) { 3516 + if (cpu_is_omap3517()) { 3524 3517 cpu_mask = RATE_IN_34XX; 3525 - cpu_clkflg = CK_3505; 3526 - } else if (cpu_is_omap3517()) { 3527 - cpu_mask = RATE_IN_34XX; 3528 - cpu_clkflg = CK_3517; 3529 - } else if (cpu_is_omap3505()) { 3530 - cpu_mask = RATE_IN_34XX; 3531 - cpu_clkflg = CK_3505; 3518 + cpu_clkflg = CK_AM35XX; 3532 3519 } else if (cpu_is_omap3630()) { 3533 3520 cpu_mask = (RATE_IN_34XX | RATE_IN_36XX); 3534 3521 cpu_clkflg = CK_36XX;
-11
arch/arm/mach-omap2/clock44xx_data.c
··· 3355 3355 CLK(NULL, "auxclk5_ck", &auxclk5_ck, CK_443X), 3356 3356 CLK(NULL, "auxclkreq5_ck", &auxclkreq5_ck, CK_443X), 3357 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 3358 CLK("omap_i2c.1", "ick", &dummy_ck, CK_443X), 3370 3359 CLK("omap_i2c.2", "ick", &dummy_ck, CK_443X), 3371 3360 CLK("omap_i2c.3", "ick", &dummy_ck, CK_443X),
+3 -4
arch/arm/mach-omap2/clockdomain.c
··· 840 840 spin_lock_irqsave(&clkdm->lock, flags); 841 841 clkdm->_flags |= _CLKDM_FLAG_HWSUP_ENABLED; 842 842 arch_clkdm->clkdm_allow_idle(clkdm); 843 - pwrdm_clkdm_state_switch(clkdm); 843 + pwrdm_state_switch(clkdm->pwrdm.ptr); 844 844 spin_unlock_irqrestore(&clkdm->lock, flags); 845 845 } 846 846 ··· 924 924 925 925 spin_lock_irqsave(&clkdm->lock, flags); 926 926 arch_clkdm->clkdm_clk_enable(clkdm); 927 - pwrdm_wait_transition(clkdm->pwrdm.ptr); 928 - pwrdm_clkdm_state_switch(clkdm); 927 + pwrdm_state_switch(clkdm->pwrdm.ptr); 929 928 spin_unlock_irqrestore(&clkdm->lock, flags); 930 929 931 930 pr_debug("clockdomain: clkdm %s: enabled\n", clkdm->name); ··· 949 950 950 951 spin_lock_irqsave(&clkdm->lock, flags); 951 952 arch_clkdm->clkdm_clk_disable(clkdm); 952 - pwrdm_clkdm_state_switch(clkdm); 953 + pwrdm_state_switch(clkdm->pwrdm.ptr); 953 954 spin_unlock_irqrestore(&clkdm->lock, flags); 954 955 955 956 pr_debug("clockdomain: clkdm %s: disabled\n", clkdm->name);
+6
arch/arm/mach-omap2/clockdomain44xx.c
··· 51 51 struct clkdm_dep *cd; 52 52 u32 mask = 0; 53 53 54 + if (!clkdm->prcm_partition) 55 + return 0; 56 + 54 57 for (cd = clkdm->wkdep_srcs; cd && cd->clkdm_name; cd++) { 55 58 if (!cd->clkdm) 56 59 continue; /* only happens if data is erroneous */ ··· 105 102 static int omap4_clkdm_clk_disable(struct clockdomain *clkdm) 106 103 { 107 104 bool hwsup = false; 105 + 106 + if (!clkdm->prcm_partition) 107 + return 0; 108 108 109 109 hwsup = omap4_cminst_is_clkdm_in_hwsup(clkdm->prcm_partition, 110 110 clkdm->cm_inst, clkdm->clkdm_offs);
-10
arch/arm/mach-omap2/clockdomains2xxx_3xxx_data.c
··· 89 89 .pwrdm = { .name = "wkup_pwrdm" }, 90 90 .dep_bit = OMAP_EN_WKUP_SHIFT, 91 91 }; 92 - 93 - struct clockdomain prm_common_clkdm = { 94 - .name = "prm_clkdm", 95 - .pwrdm = { .name = "wkup_pwrdm" }, 96 - }; 97 - 98 - struct clockdomain cm_common_clkdm = { 99 - .name = "cm_clkdm", 100 - .pwrdm = { .name = "core_pwrdm" }, 101 - };
+3 -3
arch/arm/mach-omap2/clockdomains3xxx_data.c
··· 53 53 * 3430ES2 PM_WKDEP_SGX: adds IVA2, removes CORE 54 54 */ 55 55 static struct clkdm_dep gfx_sgx_3xxx_wkdeps[] = { 56 - { .clkdm_name = "iva2_clkdm", }, 57 - { .clkdm_name = "mpu_clkdm", }, 58 - { .clkdm_name = "wkup_clkdm", }, 56 + { .clkdm_name = "iva2_clkdm" }, 57 + { .clkdm_name = "mpu_clkdm" }, 58 + { .clkdm_name = "wkup_clkdm" }, 59 59 { NULL }, 60 60 }; 61 61
+2
arch/arm/mach-omap2/clockdomains44xx_data.c
··· 430 430 &l4_wkup_44xx_clkdm, 431 431 &emu_sys_44xx_clkdm, 432 432 &l3_dma_44xx_clkdm, 433 + &prm_common_clkdm, 434 + &cm_common_clkdm, 433 435 NULL 434 436 }; 435 437
+24
arch/arm/mach-omap2/clockdomains_common_data.c
··· 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 */ 16 + struct clockdomain prm_common_clkdm = { 17 + .name = "prm_clkdm", 18 + .pwrdm = { .name = "wkup_pwrdm" }, 19 + }; 20 + 21 + struct clockdomain cm_common_clkdm = { 22 + .name = "cm_clkdm", 23 + .pwrdm = { .name = "core_pwrdm" }, 24 + };
+2 -2
arch/arm/mach-omap2/cm-regbits-34xx.h
··· 79 79 80 80 /* CM_CLKSEL1_PLL_IVA2 */ 81 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 83 #define OMAP3430_IVA2_DPLL_MULT_SHIFT 8 84 84 #define OMAP3430_IVA2_DPLL_MULT_MASK (0x7ff << 8) 85 85 #define OMAP3430_IVA2_DPLL_DIV_SHIFT 0 ··· 124 124 125 125 /* CM_CLKSEL1_PLL_MPU */ 126 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 128 #define OMAP3430_MPU_DPLL_MULT_SHIFT 8 129 129 #define OMAP3430_MPU_DPLL_MULT_MASK (0x7ff << 8) 130 130 #define OMAP3430_MPU_DPLL_DIV_SHIFT 0
+18 -10
arch/arm/mach-omap2/cminst44xx.c
··· 32 32 #include "prcm44xx.h" 33 33 #include "prm44xx.h" 34 34 #include "prcm_mpu44xx.h" 35 + #include "prcm-common.h" 35 36 36 37 /* 37 38 * CLKCTRL_IDLEST_*: possible values for the CM_*_CLKCTRL.IDLEST bitfield: ··· 50 49 #define CLKCTRL_IDLEST_INTERFACE_IDLE 0x2 51 50 #define CLKCTRL_IDLEST_DISABLED 0x3 52 51 53 - static u32 _cm_bases[OMAP4_MAX_PRCM_PARTITIONS] = { 54 - [OMAP4430_INVALID_PRCM_PARTITION] = 0, 55 - [OMAP4430_PRM_PARTITION] = OMAP4430_PRM_BASE, 56 - [OMAP4430_CM1_PARTITION] = OMAP4430_CM1_BASE, 57 - [OMAP4430_CM2_PARTITION] = OMAP4430_CM2_BASE, 58 - [OMAP4430_SCRM_PARTITION] = 0, 59 - [OMAP4430_PRCM_MPU_PARTITION] = OMAP4430_PRCM_MPU_BASE, 60 - }; 52 + static void __iomem *_cm_bases[OMAP4_MAX_PRCM_PARTITIONS]; 53 + 54 + /** 55 + * omap_cm_base_init - Populates the cm partitions 56 + * 57 + * Populates the base addresses of the _cm_bases 58 + * array used for read/write of cm module registers. 59 + */ 60 + void omap_cm_base_init(void) 61 + { 62 + _cm_bases[OMAP4430_PRM_PARTITION] = prm_base; 63 + _cm_bases[OMAP4430_CM1_PARTITION] = cm_base; 64 + _cm_bases[OMAP4430_CM2_PARTITION] = cm2_base; 65 + _cm_bases[OMAP4430_PRCM_MPU_PARTITION] = prcm_mpu_base; 66 + } 61 67 62 68 /* Private functions */ 63 69 ··· 114 106 BUG_ON(part >= OMAP4_MAX_PRCM_PARTITIONS || 115 107 part == OMAP4430_INVALID_PRCM_PARTITION || 116 108 !_cm_bases[part]); 117 - return __raw_readl(OMAP2_L4_IO_ADDRESS(_cm_bases[part] + inst + idx)); 109 + return __raw_readl(_cm_bases[part] + inst + idx); 118 110 } 119 111 120 112 /* Write into a register in a CM instance */ ··· 123 115 BUG_ON(part >= OMAP4_MAX_PRCM_PARTITIONS || 124 116 part == OMAP4430_INVALID_PRCM_PARTITION || 125 117 !_cm_bases[part]); 126 - __raw_writel(val, OMAP2_L4_IO_ADDRESS(_cm_bases[part] + inst + idx)); 118 + __raw_writel(val, _cm_bases[part] + inst + idx); 127 119 } 128 120 129 121 /* Read-modify-write a register in CM1. Caller must lock */
+1
arch/arm/mach-omap2/common.c
··· 166 166 .prm = OMAP2_L4_IO_ADDRESS(OMAP4430_PRM_BASE), 167 167 .cm = OMAP2_L4_IO_ADDRESS(OMAP4430_CM_BASE), 168 168 .cm2 = OMAP2_L4_IO_ADDRESS(OMAP4430_CM2_BASE), 169 + .prcm_mpu = OMAP2_L4_IO_ADDRESS(OMAP4430_PRCM_MPU_BASE), 169 170 }; 170 171 171 172 void __init omap2_set_globals_443x(void)
+1
arch/arm/mach-omap2/common.h
··· 112 112 void __iomem *prm; /* Power and Reset Management */ 113 113 void __iomem *cm; /* Clock Management */ 114 114 void __iomem *cm2; 115 + void __iomem *prcm_mpu; 115 116 }; 116 117 117 118 void omap2_set_globals_242x(void);
+18 -5
arch/arm/mach-omap2/dpll3xxx.c
··· 142 142 143 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 148 _omap3_dpll_write_clken(clk, DPLL_LOCKED); 148 149 ··· 187 186 188 187 if (ai) 189 188 omap3_dpll_allow_idle(clk); 190 - else 191 - omap3_dpll_deny_idle(clk); 192 189 193 190 return r; 194 191 } ··· 215 216 216 217 if (ai) 217 218 omap3_dpll_allow_idle(clk); 218 - else 219 - omap3_dpll_deny_idle(clk); 220 219 221 220 return 0; 222 221 } ··· 516 519 517 520 dd = clk->dpll_data; 518 521 522 + if (!dd->autoidle_reg) 523 + return -EINVAL; 524 + 519 525 v = __raw_readl(dd->autoidle_reg); 520 526 v &= dd->autoidle_mask; 521 527 v >>= __ffs(dd->autoidle_mask); ··· 545 545 546 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 555 * REVISIT: CORE DPLL can optionally enter low-power bypass 550 556 * by writing 0x5 instead of 0x1. Add some mechanism to ··· 560 554 v &= ~dd->autoidle_mask; 561 555 v |= DPLL_AUTOIDLE_LOW_POWER_STOP << __ffs(dd->autoidle_mask); 562 556 __raw_writel(v, dd->autoidle_reg); 557 + 563 558 } 564 559 565 560 /** ··· 578 571 return; 579 572 580 573 dd = clk->dpll_data; 574 + 575 + if (!dd->autoidle_reg) { 576 + pr_debug("clock: DPLL %s: autoidle not supported\n", 577 + clk->name); 578 + return; 579 + } 581 580 582 581 v = __raw_readl(dd->autoidle_reg); 583 582 v &= ~dd->autoidle_mask;
+72
arch/arm/mach-omap2/hdq1w.c
··· 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 + */ 45 + int 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 + }
-18
arch/arm/mach-omap2/io.c
··· 364 364 #endif 365 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 367 omap_pm_if_early_init(); 386 368 } 387 369
+88
arch/arm/mach-omap2/msdi.c
··· 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 + */ 58 + int 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 + }
+112
arch/arm/mach-omap2/omap_hwmod_2420_data.c
··· 23 23 #include <plat/dmtimer.h> 24 24 #include <plat/l3_2xxx.h> 25 25 #include <plat/l4_2xxx.h> 26 + #include <plat/mmc.h> 26 27 27 28 #include "omap_hwmod_common_data.h" 28 29 ··· 240 239 }, 241 240 }; 242 241 242 + static struct omap_hwmod_class_sysconfig omap2420_msdi_sysc = { 243 + .rev_offs = 0x3c, 244 + .sysc_offs = 0x64, 245 + .syss_offs = 0x68, 246 + .sysc_flags = (SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS), 247 + .sysc_fields = &omap_hwmod_sysc_type1, 248 + }; 249 + 250 + static struct omap_hwmod_class omap2420_msdi_hwmod_class = { 251 + .name = "msdi", 252 + .sysc = &omap2420_msdi_sysc, 253 + .reset = &omap_msdi_reset, 254 + }; 255 + 256 + /* msdi1 */ 257 + static struct omap_hwmod_irq_info omap2420_msdi1_irqs[] = { 258 + { .irq = 83 }, 259 + { .irq = -1 } 260 + }; 261 + 262 + static struct omap_hwmod_dma_info omap2420_msdi1_sdma_reqs[] = { 263 + { .name = "tx", .dma_req = 61 }, /* OMAP24XX_DMA_MMC1_TX */ 264 + { .name = "rx", .dma_req = 62 }, /* OMAP24XX_DMA_MMC1_RX */ 265 + { .dma_req = -1 } 266 + }; 267 + 268 + static struct omap_hwmod omap2420_msdi1_hwmod = { 269 + .name = "msdi1", 270 + .class = &omap2420_msdi_hwmod_class, 271 + .mpu_irqs = omap2420_msdi1_irqs, 272 + .sdma_reqs = omap2420_msdi1_sdma_reqs, 273 + .main_clk = "mmc_fck", 274 + .prcm = { 275 + .omap2 = { 276 + .prcm_reg_id = 1, 277 + .module_bit = OMAP2420_EN_MMC_SHIFT, 278 + .module_offs = CORE_MOD, 279 + .idlest_reg_id = 1, 280 + .idlest_idle_bit = OMAP2420_ST_MMC_SHIFT, 281 + }, 282 + }, 283 + .flags = HWMOD_16BIT_REG, 284 + }; 285 + 286 + /* HDQ1W/1-wire */ 287 + static struct omap_hwmod omap2420_hdq1w_hwmod = { 288 + .name = "hdq1w", 289 + .mpu_irqs = omap2_hdq1w_mpu_irqs, 290 + .main_clk = "hdq_fck", 291 + .prcm = { 292 + .omap2 = { 293 + .module_offs = CORE_MOD, 294 + .prcm_reg_id = 1, 295 + .module_bit = OMAP24XX_EN_HDQ_SHIFT, 296 + .idlest_reg_id = 1, 297 + .idlest_idle_bit = OMAP24XX_ST_HDQ_SHIFT, 298 + }, 299 + }, 300 + .class = &omap2_hdq1w_class, 301 + }; 302 + 243 303 /* 244 304 * interfaces 245 305 */ ··· 490 428 .user = OCP_USER_MPU | OCP_USER_SDMA, 491 429 }; 492 430 431 + static struct omap_hwmod_addr_space omap2420_msdi1_addrs[] = { 432 + { 433 + .pa_start = 0x4809c000, 434 + .pa_end = 0x4809c000 + SZ_128 - 1, 435 + .flags = ADDR_TYPE_RT, 436 + }, 437 + { } 438 + }; 439 + 440 + /* l4_core -> msdi1 */ 441 + static struct omap_hwmod_ocp_if omap2420_l4_core__msdi1 = { 442 + .master = &omap2xxx_l4_core_hwmod, 443 + .slave = &omap2420_msdi1_hwmod, 444 + .clk = "mmc_ick", 445 + .addr = omap2420_msdi1_addrs, 446 + .user = OCP_USER_MPU | OCP_USER_SDMA, 447 + }; 448 + 449 + /* l4_core -> hdq1w interface */ 450 + static struct omap_hwmod_ocp_if omap2420_l4_core__hdq1w = { 451 + .master = &omap2xxx_l4_core_hwmod, 452 + .slave = &omap2420_hdq1w_hwmod, 453 + .clk = "hdq_ick", 454 + .addr = omap2_hdq1w_addr_space, 455 + .user = OCP_USER_MPU | OCP_USER_SDMA, 456 + .flags = OMAP_FIREWALL_L4 | OCPIF_SWSUP_IDLE, 457 + }; 458 + 459 + 460 + /* l4_wkup -> 32ksync_counter */ 461 + static struct omap_hwmod_addr_space omap2420_counter_32k_addrs[] = { 462 + { 463 + .pa_start = 0x48004000, 464 + .pa_end = 0x4800401f, 465 + .flags = ADDR_TYPE_RT 466 + }, 467 + { } 468 + }; 469 + 470 + static struct omap_hwmod_ocp_if omap2420_l4_wkup__counter_32k = { 471 + .master = &omap2xxx_l4_wkup_hwmod, 472 + .slave = &omap2xxx_counter_32k_hwmod, 473 + .clk = "sync_32k_ick", 474 + .addr = omap2420_counter_32k_addrs, 475 + .user = OCP_USER_MPU | OCP_USER_SDMA, 476 + }; 477 + 493 478 static struct omap_hwmod_ocp_if *omap2420_hwmod_ocp_ifs[] __initdata = { 494 479 &omap2xxx_l3_main__l4_core, 495 480 &omap2xxx_mpu__l3_main, ··· 577 468 &omap2420_l4_core__mailbox, 578 469 &omap2420_l4_core__mcbsp1, 579 470 &omap2420_l4_core__mcbsp2, 471 + &omap2420_l4_core__msdi1, 472 + &omap2420_l4_core__hdq1w, 473 + &omap2420_l4_wkup__counter_32k, 580 474 NULL, 581 475 }; 582 476
+47
arch/arm/mach-omap2/omap_hwmod_2430_data.c
··· 528 528 .class = &omap2430_mmc_class, 529 529 }; 530 530 531 + /* HDQ1W/1-wire */ 532 + static 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 549 * interfaces 533 550 */ ··· 855 838 .user = OCP_USER_MPU | OCP_USER_SDMA, 856 839 }; 857 840 841 + /* l4_core -> hdq1w */ 842 + static struct omap_hwmod_ocp_if omap2430_l4_core__hdq1w = { 843 + .master = &omap2xxx_l4_core_hwmod, 844 + .slave = &omap2430_hdq1w_hwmod, 845 + .clk = "hdq_ick", 846 + .addr = omap2_hdq1w_addr_space, 847 + .user = OCP_USER_MPU | OCP_USER_SDMA, 848 + .flags = OMAP_FIREWALL_L4 | OCPIF_SWSUP_IDLE, 849 + }; 850 + 851 + /* l4_wkup -> 32ksync_counter */ 852 + static struct omap_hwmod_addr_space omap2430_counter_32k_addrs[] = { 853 + { 854 + .pa_start = 0x49020000, 855 + .pa_end = 0x4902001f, 856 + .flags = ADDR_TYPE_RT 857 + }, 858 + { } 859 + }; 860 + 861 + static struct omap_hwmod_ocp_if omap2430_l4_wkup__counter_32k = { 862 + .master = &omap2xxx_l4_wkup_hwmod, 863 + .slave = &omap2xxx_counter_32k_hwmod, 864 + .clk = "sync_32k_ick", 865 + .addr = omap2430_counter_32k_addrs, 866 + .user = OCP_USER_MPU | OCP_USER_SDMA, 867 + }; 868 + 858 869 static struct omap_hwmod_ocp_if *omap2430_hwmod_ocp_ifs[] __initdata = { 859 870 &omap2xxx_l3_main__l4_core, 860 871 &omap2xxx_mpu__l3_main, ··· 931 886 &omap2430_l4_core__mcbsp3, 932 887 &omap2430_l4_core__mcbsp4, 933 888 &omap2430_l4_core__mcbsp5, 889 + &omap2430_l4_core__hdq1w, 890 + &omap2430_l4_wkup__counter_32k, 934 891 NULL, 935 892 }; 936 893
+9
arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_interconnect_data.c
··· 171 171 }, 172 172 { } 173 173 }; 174 + 175 + struct 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 + };
+22
arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c
··· 2 2 * omap_hwmod_2xxx_3xxx_ipblock_data.c - common IP block data for OMAP2/3 3 3 * 4 4 * Copyright (C) 2011 Nokia Corporation 5 + * Copyright (C) 2012 Texas Instruments, Inc. 5 6 * Paul Walmsley 6 7 * 7 8 * This program is free software; you can redistribute it and/or modify ··· 13 12 #include <plat/serial.h> 14 13 #include <plat/dma.h> 15 14 #include <plat/common.h> 15 + #include <plat/hdq1w.h> 16 16 17 17 #include <mach/irqs.h> 18 18 ··· 301 299 302 300 struct omap_hwmod_irq_info omap2_mcspi2_mpu_irqs[] = { 303 301 { .irq = 66 }, 302 + { .irq = -1 } 303 + }; 304 + 305 + struct omap_hwmod_class_sysconfig omap2_hdq1w_sysc = { 306 + .rev_offs = 0x0, 307 + .sysc_offs = 0x14, 308 + .syss_offs = 0x18, 309 + .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE | 310 + SYSS_HAS_RESET_STATUS), 311 + .sysc_fields = &omap_hwmod_sysc_type1, 312 + }; 313 + 314 + struct omap_hwmod_class omap2_hdq1w_class = { 315 + .name = "hdq1w", 316 + .sysc = &omap2_hdq1w_sysc, 317 + .reset = &omap_hdq1w_reset, 318 + }; 319 + 320 + struct omap_hwmod_irq_info omap2_hdq1w_mpu_irqs[] = { 321 + { .irq = 58, }, 304 322 { .irq = -1 } 305 323 }; 306 324
+22 -1
arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c
··· 89 89 struct omap_hwmod_class omap2xxx_wd_timer_hwmod_class = { 90 90 .name = "wd_timer", 91 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 731 }, 733 732 .class = &omap2xxx_mcspi_class, 734 733 .dev_attr = &omap_mcspi2_dev_attr, 734 + }; 735 + 736 + 737 + static struct omap_hwmod_class omap2xxx_counter_hwmod_class = { 738 + .name = "counter", 739 + }; 740 + 741 + struct omap_hwmod omap2xxx_counter_32k_hwmod = { 742 + .name = "counter_32k", 743 + .main_clk = "func_32k_ck", 744 + .prcm = { 745 + .omap2 = { 746 + .module_offs = WKUP_MOD, 747 + .prcm_reg_id = 1, 748 + .module_bit = OMAP24XX_ST_32KSYNC_SHIFT, 749 + .idlest_reg_id = 1, 750 + .idlest_idle_bit = OMAP24XX_ST_32KSYNC_SHIFT, 751 + }, 752 + }, 753 + .class = &omap2xxx_counter_hwmod_class, 735 754 };
+88 -6
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
··· 418 418 static struct omap_hwmod_class omap3xxx_wd_timer_hwmod_class = { 419 419 .name = "wd_timer", 420 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 424 425 static struct omap_hwmod omap3xxx_wd_timer2_hwmod = { ··· 1076 1075 1077 1076 /* mcbsp1 */ 1078 1077 static struct omap_hwmod_irq_info omap3xxx_mcbsp1_irqs[] = { 1079 - { .name = "irq", .irq = 16 }, 1078 + { .name = "common", .irq = 16 }, 1080 1079 { .name = "tx", .irq = 59 }, 1081 1080 { .name = "rx", .irq = 60 }, 1082 1081 { .irq = -1 } ··· 1101 1100 1102 1101 /* mcbsp2 */ 1103 1102 static struct omap_hwmod_irq_info omap3xxx_mcbsp2_irqs[] = { 1104 - { .name = "irq", .irq = 17 }, 1103 + { .name = "common", .irq = 17 }, 1105 1104 { .name = "tx", .irq = 62 }, 1106 1105 { .name = "rx", .irq = 63 }, 1107 1106 { .irq = -1 } ··· 1131 1130 1132 1131 /* mcbsp3 */ 1133 1132 static struct omap_hwmod_irq_info omap3xxx_mcbsp3_irqs[] = { 1134 - { .name = "irq", .irq = 22 }, 1133 + { .name = "common", .irq = 22 }, 1135 1134 { .name = "tx", .irq = 89 }, 1136 1135 { .name = "rx", .irq = 90 }, 1137 1136 { .irq = -1 } ··· 1161 1160 1162 1161 /* mcbsp4 */ 1163 1162 static struct omap_hwmod_irq_info omap3xxx_mcbsp4_irqs[] = { 1164 - { .name = "irq", .irq = 23 }, 1163 + { .name = "common", .irq = 23 }, 1165 1164 { .name = "tx", .irq = 54 }, 1166 1165 { .name = "rx", .irq = 55 }, 1167 1166 { .irq = -1 } ··· 1192 1191 1193 1192 /* mcbsp5 */ 1194 1193 static struct omap_hwmod_irq_info omap3xxx_mcbsp5_irqs[] = { 1195 - { .name = "irq", .irq = 27 }, 1194 + { .name = "common", .irq = 27 }, 1196 1195 { .name = "tx", .irq = 81 }, 1197 1196 { .name = "rx", .irq = 82 }, 1198 1197 { .irq = -1 } ··· 1977 1976 .module_bit = OMAP3430ES2_EN_USBTLL_SHIFT, 1978 1977 .idlest_reg_id = 3, 1979 1978 .idlest_idle_bit = OMAP3430ES2_ST_USBTLL_SHIFT, 1979 + }, 1980 + }, 1981 + }; 1982 + 1983 + static struct omap_hwmod omap3xxx_hdq1w_hwmod = { 1984 + .name = "hdq1w", 1985 + .mpu_irqs = omap2_hdq1w_mpu_irqs, 1986 + .main_clk = "hdq_fck", 1987 + .prcm = { 1988 + .omap2 = { 1989 + .module_offs = CORE_MOD, 1990 + .prcm_reg_id = 1, 1991 + .module_bit = OMAP3430_EN_HDQ_SHIFT, 1992 + .idlest_reg_id = 1, 1993 + .idlest_idle_bit = OMAP3430_ST_HDQ_SHIFT, 1994 + }, 1995 + }, 1996 + .class = &omap2_hdq1w_class, 1997 + }; 1998 + 1999 + /* 2000 + * '32K sync counter' class 2001 + * 32-bit ordinary counter, clocked by the falling edge of the 32 khz clock 2002 + */ 2003 + static struct omap_hwmod_class_sysconfig omap3xxx_counter_sysc = { 2004 + .rev_offs = 0x0000, 2005 + .sysc_offs = 0x0004, 2006 + .sysc_flags = SYSC_HAS_SIDLEMODE, 2007 + .idlemodes = (SIDLE_FORCE | SIDLE_NO), 2008 + .sysc_fields = &omap_hwmod_sysc_type1, 2009 + }; 2010 + 2011 + static struct omap_hwmod_class omap3xxx_counter_hwmod_class = { 2012 + .name = "counter", 2013 + .sysc = &omap3xxx_counter_sysc, 2014 + }; 2015 + 2016 + static struct omap_hwmod omap3xxx_counter_32k_hwmod = { 2017 + .name = "counter_32k", 2018 + .class = &omap3xxx_counter_hwmod_class, 2019 + .clkdm_name = "wkup_clkdm", 2020 + .flags = HWMOD_SWSUP_SIDLE, 2021 + .main_clk = "wkup_32k_fck", 2022 + .prcm = { 2023 + .omap2 = { 2024 + .module_offs = WKUP_MOD, 2025 + .prcm_reg_id = 1, 2026 + .module_bit = OMAP3430_ST_32KSYNC_SHIFT, 2027 + .idlest_reg_id = 1, 2028 + .idlest_idle_bit = OMAP3430_ST_32KSYNC_SHIFT, 1980 2029 }, 1981 2030 }, 1982 2031 }; ··· 3110 3059 .user = OCP_USER_MPU | OCP_USER_SDMA, 3111 3060 }; 3112 3061 3062 + /* l4_core -> hdq1w interface */ 3063 + static struct omap_hwmod_ocp_if omap3xxx_l4_core__hdq1w = { 3064 + .master = &omap3xxx_l4_core_hwmod, 3065 + .slave = &omap3xxx_hdq1w_hwmod, 3066 + .clk = "hdq_ick", 3067 + .addr = omap2_hdq1w_addr_space, 3068 + .user = OCP_USER_MPU | OCP_USER_SDMA, 3069 + .flags = OMAP_FIREWALL_L4 | OCPIF_SWSUP_IDLE, 3070 + }; 3071 + 3072 + /* l4_wkup -> 32ksync_counter */ 3073 + static struct omap_hwmod_addr_space omap3xxx_counter_32k_addrs[] = { 3074 + { 3075 + .pa_start = 0x48320000, 3076 + .pa_end = 0x4832001f, 3077 + .flags = ADDR_TYPE_RT 3078 + }, 3079 + { } 3080 + }; 3081 + 3082 + static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__counter_32k = { 3083 + .master = &omap3xxx_l4_wkup_hwmod, 3084 + .slave = &omap3xxx_counter_32k_hwmod, 3085 + .clk = "omap_32ksync_ick", 3086 + .addr = omap3xxx_counter_32k_addrs, 3087 + .user = OCP_USER_MPU | OCP_USER_SDMA, 3088 + }; 3089 + 3113 3090 static struct omap_hwmod_ocp_if *omap3xxx_hwmod_ocp_ifs[] __initdata = { 3114 3091 &omap3xxx_l3_main__l4_core, 3115 3092 &omap3xxx_l3_main__l4_per, ··· 3182 3103 &omap34xx_l4_core__mcspi2, 3183 3104 &omap34xx_l4_core__mcspi3, 3184 3105 &omap34xx_l4_core__mcspi4, 3106 + &omap3xxx_l4_wkup__counter_32k, 3185 3107 NULL, 3186 3108 }; 3187 3109 ··· 3231 3151 &omap34xx_l4_core__sr1, 3232 3152 &omap34xx_l4_core__sr2, 3233 3153 &omap3xxx_l4_core__mailbox, 3154 + &omap3xxx_l4_core__hdq1w, 3234 3155 NULL 3235 3156 }; 3236 3157 ··· 3251 3170 &omap3xxx_l4_core__usb_tll_hs, 3252 3171 &omap3xxx_l4_core__es3plus_mmc1, 3253 3172 &omap3xxx_l4_core__es3plus_mmc2, 3173 + &omap3xxx_l4_core__hdq1w, 3254 3174 NULL 3255 3175 }; 3256 3176
+1388 -40
arch/arm/mach-omap2/omap_hwmod_44xx_data.c
··· 51 51 */ 52 52 53 53 /* 54 + * 'c2c_target_fw' class 55 + * instance(s): c2c_target_fw 56 + */ 57 + static struct omap_hwmod_class omap44xx_c2c_target_fw_hwmod_class = { 58 + .name = "c2c_target_fw", 59 + }; 60 + 61 + /* c2c_target_fw */ 62 + static 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 75 * 'dmm' class 55 76 * instance(s): dmm 56 77 */ ··· 263 242 }; 264 243 265 244 /* 245 + * 'ocp_wp_noc' class 246 + * instance(s): ocp_wp_noc 247 + */ 248 + static struct omap_hwmod_class omap44xx_ocp_wp_noc_hwmod_class = { 249 + .name = "ocp_wp_noc", 250 + }; 251 + 252 + /* ocp_wp_noc */ 253 + static struct omap_hwmod omap44xx_ocp_wp_noc_hwmod = { 254 + .name = "ocp_wp_noc", 255 + .class = &omap44xx_ocp_wp_noc_hwmod_class, 256 + .clkdm_name = "l3_instr_clkdm", 257 + .prcm = { 258 + .omap4 = { 259 + .clkctrl_offs = OMAP4_CM_L3INSTR_OCP_WP1_CLKCTRL_OFFSET, 260 + .context_offs = OMAP4_RM_L3INSTR_OCP_WP1_CONTEXT_OFFSET, 261 + .modulemode = MODULEMODE_HWCTRL, 262 + }, 263 + }, 264 + }; 265 + 266 + /* 266 267 * Modules omap_hwmod structures 267 268 * 268 269 * The following IPs are excluded for the moment because: ··· 292 249 * - They still need to be validated with the driver 293 250 * properly adapted to omap_hwmod / omap_device 294 251 * 295 - * c2c 296 - * c2c_target_fw 297 - * cm_core 298 - * cm_core_aon 299 - * ctrl_module_core 300 - * ctrl_module_pad_core 301 - * ctrl_module_pad_wkup 302 - * ctrl_module_wkup 303 - * debugss 304 - * efuse_ctrl_cust 305 - * efuse_ctrl_std 306 - * elm 307 - * emif1 308 - * emif2 309 - * fdif 310 - * gpmc 311 - * gpu 312 - * hdq1w 313 - * mcasp 314 - * mpu_c0 315 - * mpu_c1 316 - * ocmc_ram 317 - * ocp2scp_usb_phy 318 - * ocp_wp_noc 319 - * prcm_mpu 320 - * prm 321 - * scrm 322 - * sl2if 323 - * slimbus1 324 - * slimbus2 325 - * usb_host_fs 326 - * usb_host_hs 327 - * usb_phy_cm 328 - * usb_tll_hs 329 - * usim 252 + * usim 330 253 */ 331 254 332 255 /* ··· 350 341 }; 351 342 352 343 /* 344 + * 'c2c' class 345 + * chip 2 chip interface used to plug the ape soc (omap) with an external modem 346 + * soc 347 + */ 348 + 349 + static struct omap_hwmod_class omap44xx_c2c_hwmod_class = { 350 + .name = "c2c", 351 + }; 352 + 353 + /* c2c */ 354 + static struct omap_hwmod_irq_info omap44xx_c2c_irqs[] = { 355 + { .irq = 88 + OMAP44XX_IRQ_GIC_START }, 356 + { .irq = -1 } 357 + }; 358 + 359 + static struct omap_hwmod_dma_info omap44xx_c2c_sdma_reqs[] = { 360 + { .dma_req = 68 + OMAP44XX_DMA_REQ_START }, 361 + { .dma_req = -1 } 362 + }; 363 + 364 + static struct omap_hwmod omap44xx_c2c_hwmod = { 365 + .name = "c2c", 366 + .class = &omap44xx_c2c_hwmod_class, 367 + .clkdm_name = "d2d_clkdm", 368 + .mpu_irqs = omap44xx_c2c_irqs, 369 + .sdma_reqs = omap44xx_c2c_sdma_reqs, 370 + .prcm = { 371 + .omap4 = { 372 + .clkctrl_offs = OMAP4_CM_D2D_SAD2D_CLKCTRL_OFFSET, 373 + .context_offs = OMAP4_RM_D2D_SAD2D_CONTEXT_OFFSET, 374 + }, 375 + }, 376 + }; 377 + 378 + /* 353 379 * 'counter' class 354 380 * 32-bit ordinary counter, clocked by the falling edge of the 32 khz clock 355 381 */ ··· 414 370 .omap4 = { 415 371 .clkctrl_offs = OMAP4_CM_WKUP_SYNCTIMER_CLKCTRL_OFFSET, 416 372 .context_offs = OMAP4_RM_WKUP_SYNCTIMER_CONTEXT_OFFSET, 373 + }, 374 + }, 375 + }; 376 + 377 + /* 378 + * 'ctrl_module' class 379 + * attila core control module + core pad control module + wkup pad control 380 + * module + attila wkup control module 381 + */ 382 + 383 + static struct omap_hwmod_class_sysconfig omap44xx_ctrl_module_sysc = { 384 + .rev_offs = 0x0000, 385 + .sysc_offs = 0x0010, 386 + .sysc_flags = SYSC_HAS_SIDLEMODE, 387 + .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | 388 + SIDLE_SMART_WKUP), 389 + .sysc_fields = &omap_hwmod_sysc_type2, 390 + }; 391 + 392 + static struct omap_hwmod_class omap44xx_ctrl_module_hwmod_class = { 393 + .name = "ctrl_module", 394 + .sysc = &omap44xx_ctrl_module_sysc, 395 + }; 396 + 397 + /* ctrl_module_core */ 398 + static struct omap_hwmod_irq_info omap44xx_ctrl_module_core_irqs[] = { 399 + { .irq = 8 + OMAP44XX_IRQ_GIC_START }, 400 + { .irq = -1 } 401 + }; 402 + 403 + static struct omap_hwmod omap44xx_ctrl_module_core_hwmod = { 404 + .name = "ctrl_module_core", 405 + .class = &omap44xx_ctrl_module_hwmod_class, 406 + .clkdm_name = "l4_cfg_clkdm", 407 + .mpu_irqs = omap44xx_ctrl_module_core_irqs, 408 + }; 409 + 410 + /* ctrl_module_pad_core */ 411 + static struct omap_hwmod omap44xx_ctrl_module_pad_core_hwmod = { 412 + .name = "ctrl_module_pad_core", 413 + .class = &omap44xx_ctrl_module_hwmod_class, 414 + .clkdm_name = "l4_cfg_clkdm", 415 + }; 416 + 417 + /* ctrl_module_wkup */ 418 + static struct omap_hwmod omap44xx_ctrl_module_wkup_hwmod = { 419 + .name = "ctrl_module_wkup", 420 + .class = &omap44xx_ctrl_module_hwmod_class, 421 + .clkdm_name = "l4_wkup_clkdm", 422 + }; 423 + 424 + /* ctrl_module_pad_wkup */ 425 + static struct omap_hwmod omap44xx_ctrl_module_pad_wkup_hwmod = { 426 + .name = "ctrl_module_pad_wkup", 427 + .class = &omap44xx_ctrl_module_hwmod_class, 428 + .clkdm_name = "l4_wkup_clkdm", 429 + }; 430 + 431 + /* 432 + * 'debugss' class 433 + * debug and emulation sub system 434 + */ 435 + 436 + static struct omap_hwmod_class omap44xx_debugss_hwmod_class = { 437 + .name = "debugss", 438 + }; 439 + 440 + /* debugss */ 441 + static struct omap_hwmod omap44xx_debugss_hwmod = { 442 + .name = "debugss", 443 + .class = &omap44xx_debugss_hwmod_class, 444 + .clkdm_name = "emu_sys_clkdm", 445 + .main_clk = "trace_clk_div_ck", 446 + .prcm = { 447 + .omap4 = { 448 + .clkctrl_offs = OMAP4_CM_EMU_DEBUGSS_CLKCTRL_OFFSET, 449 + .context_offs = OMAP4_RM_EMU_DEBUGSS_CONTEXT_OFFSET, 417 450 }, 418 451 }, 419 452 }; ··· 937 816 }; 938 817 939 818 /* 819 + * 'elm' class 820 + * bch error location module 821 + */ 822 + 823 + static struct omap_hwmod_class_sysconfig omap44xx_elm_sysc = { 824 + .rev_offs = 0x0000, 825 + .sysc_offs = 0x0010, 826 + .syss_offs = 0x0014, 827 + .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY | 828 + SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET | 829 + SYSS_HAS_RESET_STATUS), 830 + .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), 831 + .sysc_fields = &omap_hwmod_sysc_type1, 832 + }; 833 + 834 + static struct omap_hwmod_class omap44xx_elm_hwmod_class = { 835 + .name = "elm", 836 + .sysc = &omap44xx_elm_sysc, 837 + }; 838 + 839 + /* elm */ 840 + static struct omap_hwmod_irq_info omap44xx_elm_irqs[] = { 841 + { .irq = 4 + OMAP44XX_IRQ_GIC_START }, 842 + { .irq = -1 } 843 + }; 844 + 845 + static struct omap_hwmod omap44xx_elm_hwmod = { 846 + .name = "elm", 847 + .class = &omap44xx_elm_hwmod_class, 848 + .clkdm_name = "l4_per_clkdm", 849 + .mpu_irqs = omap44xx_elm_irqs, 850 + .prcm = { 851 + .omap4 = { 852 + .clkctrl_offs = OMAP4_CM_L4PER_ELM_CLKCTRL_OFFSET, 853 + .context_offs = OMAP4_RM_L4PER_ELM_CONTEXT_OFFSET, 854 + }, 855 + }, 856 + }; 857 + 858 + /* 859 + * 'emif' class 860 + * external memory interface no1 861 + */ 862 + 863 + static struct omap_hwmod_class_sysconfig omap44xx_emif_sysc = { 864 + .rev_offs = 0x0000, 865 + }; 866 + 867 + static struct omap_hwmod_class omap44xx_emif_hwmod_class = { 868 + .name = "emif", 869 + .sysc = &omap44xx_emif_sysc, 870 + }; 871 + 872 + /* emif1 */ 873 + static struct omap_hwmod_irq_info omap44xx_emif1_irqs[] = { 874 + { .irq = 110 + OMAP44XX_IRQ_GIC_START }, 875 + { .irq = -1 } 876 + }; 877 + 878 + static struct omap_hwmod omap44xx_emif1_hwmod = { 879 + .name = "emif1", 880 + .class = &omap44xx_emif_hwmod_class, 881 + .clkdm_name = "l3_emif_clkdm", 882 + .flags = HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET, 883 + .mpu_irqs = omap44xx_emif1_irqs, 884 + .main_clk = "ddrphy_ck", 885 + .prcm = { 886 + .omap4 = { 887 + .clkctrl_offs = OMAP4_CM_MEMIF_EMIF_1_CLKCTRL_OFFSET, 888 + .context_offs = OMAP4_RM_MEMIF_EMIF_1_CONTEXT_OFFSET, 889 + .modulemode = MODULEMODE_HWCTRL, 890 + }, 891 + }, 892 + }; 893 + 894 + /* emif2 */ 895 + static struct omap_hwmod_irq_info omap44xx_emif2_irqs[] = { 896 + { .irq = 111 + OMAP44XX_IRQ_GIC_START }, 897 + { .irq = -1 } 898 + }; 899 + 900 + static struct omap_hwmod omap44xx_emif2_hwmod = { 901 + .name = "emif2", 902 + .class = &omap44xx_emif_hwmod_class, 903 + .clkdm_name = "l3_emif_clkdm", 904 + .flags = HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET, 905 + .mpu_irqs = omap44xx_emif2_irqs, 906 + .main_clk = "ddrphy_ck", 907 + .prcm = { 908 + .omap4 = { 909 + .clkctrl_offs = OMAP4_CM_MEMIF_EMIF_2_CLKCTRL_OFFSET, 910 + .context_offs = OMAP4_RM_MEMIF_EMIF_2_CONTEXT_OFFSET, 911 + .modulemode = MODULEMODE_HWCTRL, 912 + }, 913 + }, 914 + }; 915 + 916 + /* 917 + * 'fdif' class 918 + * face detection hw accelerator module 919 + */ 920 + 921 + static struct omap_hwmod_class_sysconfig omap44xx_fdif_sysc = { 922 + .rev_offs = 0x0000, 923 + .sysc_offs = 0x0010, 924 + /* 925 + * FDIF needs 100 OCP clk cycles delay after a softreset before 926 + * accessing sysconfig again. 927 + * The lowest frequency at the moment for L3 bus is 100 MHz, so 928 + * 1usec delay is needed. Add an x2 margin to be safe (2 usecs). 929 + * 930 + * TODO: Indicate errata when available. 931 + */ 932 + .srst_udelay = 2, 933 + .sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_RESET_STATUS | 934 + SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET), 935 + .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | 936 + MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART), 937 + .sysc_fields = &omap_hwmod_sysc_type2, 938 + }; 939 + 940 + static struct omap_hwmod_class omap44xx_fdif_hwmod_class = { 941 + .name = "fdif", 942 + .sysc = &omap44xx_fdif_sysc, 943 + }; 944 + 945 + /* fdif */ 946 + static struct omap_hwmod_irq_info omap44xx_fdif_irqs[] = { 947 + { .irq = 69 + OMAP44XX_IRQ_GIC_START }, 948 + { .irq = -1 } 949 + }; 950 + 951 + static struct omap_hwmod omap44xx_fdif_hwmod = { 952 + .name = "fdif", 953 + .class = &omap44xx_fdif_hwmod_class, 954 + .clkdm_name = "iss_clkdm", 955 + .mpu_irqs = omap44xx_fdif_irqs, 956 + .main_clk = "fdif_fck", 957 + .prcm = { 958 + .omap4 = { 959 + .clkctrl_offs = OMAP4_CM_CAM_FDIF_CLKCTRL_OFFSET, 960 + .context_offs = OMAP4_RM_CAM_FDIF_CONTEXT_OFFSET, 961 + .modulemode = MODULEMODE_SWCTRL, 962 + }, 963 + }, 964 + }; 965 + 966 + /* 940 967 * 'gpio' class 941 968 * general purpose io module 942 969 */ ··· 1287 1018 }; 1288 1019 1289 1020 /* 1021 + * 'gpmc' class 1022 + * general purpose memory controller 1023 + */ 1024 + 1025 + static struct omap_hwmod_class_sysconfig omap44xx_gpmc_sysc = { 1026 + .rev_offs = 0x0000, 1027 + .sysc_offs = 0x0010, 1028 + .syss_offs = 0x0014, 1029 + .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE | 1030 + SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS), 1031 + .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), 1032 + .sysc_fields = &omap_hwmod_sysc_type1, 1033 + }; 1034 + 1035 + static struct omap_hwmod_class omap44xx_gpmc_hwmod_class = { 1036 + .name = "gpmc", 1037 + .sysc = &omap44xx_gpmc_sysc, 1038 + }; 1039 + 1040 + /* gpmc */ 1041 + static struct omap_hwmod_irq_info omap44xx_gpmc_irqs[] = { 1042 + { .irq = 20 + OMAP44XX_IRQ_GIC_START }, 1043 + { .irq = -1 } 1044 + }; 1045 + 1046 + static struct omap_hwmod_dma_info omap44xx_gpmc_sdma_reqs[] = { 1047 + { .dma_req = 3 + OMAP44XX_DMA_REQ_START }, 1048 + { .dma_req = -1 } 1049 + }; 1050 + 1051 + static struct omap_hwmod omap44xx_gpmc_hwmod = { 1052 + .name = "gpmc", 1053 + .class = &omap44xx_gpmc_hwmod_class, 1054 + .clkdm_name = "l3_2_clkdm", 1055 + .flags = HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET, 1056 + .mpu_irqs = omap44xx_gpmc_irqs, 1057 + .sdma_reqs = omap44xx_gpmc_sdma_reqs, 1058 + .prcm = { 1059 + .omap4 = { 1060 + .clkctrl_offs = OMAP4_CM_L3_2_GPMC_CLKCTRL_OFFSET, 1061 + .context_offs = OMAP4_RM_L3_2_GPMC_CONTEXT_OFFSET, 1062 + .modulemode = MODULEMODE_HWCTRL, 1063 + }, 1064 + }, 1065 + }; 1066 + 1067 + /* 1068 + * 'gpu' class 1069 + * 2d/3d graphics accelerator 1070 + */ 1071 + 1072 + static struct omap_hwmod_class_sysconfig omap44xx_gpu_sysc = { 1073 + .rev_offs = 0x1fc00, 1074 + .sysc_offs = 0x1fc10, 1075 + .sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_SIDLEMODE), 1076 + .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | 1077 + SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO | 1078 + MSTANDBY_SMART | MSTANDBY_SMART_WKUP), 1079 + .sysc_fields = &omap_hwmod_sysc_type2, 1080 + }; 1081 + 1082 + static struct omap_hwmod_class omap44xx_gpu_hwmod_class = { 1083 + .name = "gpu", 1084 + .sysc = &omap44xx_gpu_sysc, 1085 + }; 1086 + 1087 + /* gpu */ 1088 + static struct omap_hwmod_irq_info omap44xx_gpu_irqs[] = { 1089 + { .irq = 21 + OMAP44XX_IRQ_GIC_START }, 1090 + { .irq = -1 } 1091 + }; 1092 + 1093 + static struct omap_hwmod omap44xx_gpu_hwmod = { 1094 + .name = "gpu", 1095 + .class = &omap44xx_gpu_hwmod_class, 1096 + .clkdm_name = "l3_gfx_clkdm", 1097 + .mpu_irqs = omap44xx_gpu_irqs, 1098 + .main_clk = "gpu_fck", 1099 + .prcm = { 1100 + .omap4 = { 1101 + .clkctrl_offs = OMAP4_CM_GFX_GFX_CLKCTRL_OFFSET, 1102 + .context_offs = OMAP4_RM_GFX_GFX_CONTEXT_OFFSET, 1103 + .modulemode = MODULEMODE_SWCTRL, 1104 + }, 1105 + }, 1106 + }; 1107 + 1108 + /* 1109 + * 'hdq1w' class 1110 + * hdq / 1-wire serial interface controller 1111 + */ 1112 + 1113 + static struct omap_hwmod_class_sysconfig omap44xx_hdq1w_sysc = { 1114 + .rev_offs = 0x0000, 1115 + .sysc_offs = 0x0014, 1116 + .syss_offs = 0x0018, 1117 + .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_SOFTRESET | 1118 + SYSS_HAS_RESET_STATUS), 1119 + .sysc_fields = &omap_hwmod_sysc_type1, 1120 + }; 1121 + 1122 + static struct omap_hwmod_class omap44xx_hdq1w_hwmod_class = { 1123 + .name = "hdq1w", 1124 + .sysc = &omap44xx_hdq1w_sysc, 1125 + }; 1126 + 1127 + /* hdq1w */ 1128 + static struct omap_hwmod_irq_info omap44xx_hdq1w_irqs[] = { 1129 + { .irq = 58 + OMAP44XX_IRQ_GIC_START }, 1130 + { .irq = -1 } 1131 + }; 1132 + 1133 + static struct omap_hwmod omap44xx_hdq1w_hwmod = { 1134 + .name = "hdq1w", 1135 + .class = &omap44xx_hdq1w_hwmod_class, 1136 + .clkdm_name = "l4_per_clkdm", 1137 + .flags = HWMOD_INIT_NO_RESET, /* XXX temporary */ 1138 + .mpu_irqs = omap44xx_hdq1w_irqs, 1139 + .main_clk = "hdq1w_fck", 1140 + .prcm = { 1141 + .omap4 = { 1142 + .clkctrl_offs = OMAP4_CM_L4PER_HDQ1W_CLKCTRL_OFFSET, 1143 + .context_offs = OMAP4_RM_L4PER_HDQ1W_CONTEXT_OFFSET, 1144 + .modulemode = MODULEMODE_SWCTRL, 1145 + }, 1146 + }, 1147 + }; 1148 + 1149 + /* 1290 1150 * 'hsi' class 1291 1151 * mipi high-speed synchronous serial interface (multichannel and full-duplex 1292 1152 * serial if) ··· 1487 1089 }; 1488 1090 1489 1091 static struct omap_i2c_dev_attr i2c_dev_attr = { 1490 - .flags = OMAP_I2C_FLAG_BUS_SHIFT_NONE, 1092 + .flags = OMAP_I2C_FLAG_BUS_SHIFT_NONE | 1093 + OMAP_I2C_FLAG_RESET_REGS_POSTIDLE, 1491 1094 }; 1492 1095 1493 1096 /* i2c1 */ ··· 1840 1441 }; 1841 1442 1842 1443 /* 1444 + * 'mcasp' class 1445 + * multi-channel audio serial port controller 1446 + */ 1447 + 1448 + /* The IP is not compliant to type1 / type2 scheme */ 1449 + static struct omap_hwmod_sysc_fields omap_hwmod_sysc_type_mcasp = { 1450 + .sidle_shift = 0, 1451 + }; 1452 + 1453 + static struct omap_hwmod_class_sysconfig omap44xx_mcasp_sysc = { 1454 + .sysc_offs = 0x0004, 1455 + .sysc_flags = SYSC_HAS_SIDLEMODE, 1456 + .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | 1457 + SIDLE_SMART_WKUP), 1458 + .sysc_fields = &omap_hwmod_sysc_type_mcasp, 1459 + }; 1460 + 1461 + static struct omap_hwmod_class omap44xx_mcasp_hwmod_class = { 1462 + .name = "mcasp", 1463 + .sysc = &omap44xx_mcasp_sysc, 1464 + }; 1465 + 1466 + /* mcasp */ 1467 + static struct omap_hwmod_irq_info omap44xx_mcasp_irqs[] = { 1468 + { .name = "arevt", .irq = 108 + OMAP44XX_IRQ_GIC_START }, 1469 + { .name = "axevt", .irq = 109 + OMAP44XX_IRQ_GIC_START }, 1470 + { .irq = -1 } 1471 + }; 1472 + 1473 + static struct omap_hwmod_dma_info omap44xx_mcasp_sdma_reqs[] = { 1474 + { .name = "axevt", .dma_req = 7 + OMAP44XX_DMA_REQ_START }, 1475 + { .name = "arevt", .dma_req = 10 + OMAP44XX_DMA_REQ_START }, 1476 + { .dma_req = -1 } 1477 + }; 1478 + 1479 + static struct omap_hwmod omap44xx_mcasp_hwmod = { 1480 + .name = "mcasp", 1481 + .class = &omap44xx_mcasp_hwmod_class, 1482 + .clkdm_name = "abe_clkdm", 1483 + .mpu_irqs = omap44xx_mcasp_irqs, 1484 + .sdma_reqs = omap44xx_mcasp_sdma_reqs, 1485 + .main_clk = "mcasp_fck", 1486 + .prcm = { 1487 + .omap4 = { 1488 + .clkctrl_offs = OMAP4_CM1_ABE_MCASP_CLKCTRL_OFFSET, 1489 + .context_offs = OMAP4_RM_ABE_MCASP_CONTEXT_OFFSET, 1490 + .modulemode = MODULEMODE_SWCTRL, 1491 + }, 1492 + }, 1493 + }; 1494 + 1495 + /* 1843 1496 * 'mcbsp' class 1844 1497 * multi channel buffered serial port controller 1845 1498 */ ··· 1912 1461 1913 1462 /* mcbsp1 */ 1914 1463 static struct omap_hwmod_irq_info omap44xx_mcbsp1_irqs[] = { 1915 - { .irq = 17 + OMAP44XX_IRQ_GIC_START }, 1464 + { .name = "common", .irq = 17 + OMAP44XX_IRQ_GIC_START }, 1916 1465 { .irq = -1 } 1917 1466 }; 1918 1467 ··· 1947 1496 1948 1497 /* mcbsp2 */ 1949 1498 static struct omap_hwmod_irq_info omap44xx_mcbsp2_irqs[] = { 1950 - { .irq = 22 + OMAP44XX_IRQ_GIC_START }, 1499 + { .name = "common", .irq = 22 + OMAP44XX_IRQ_GIC_START }, 1951 1500 { .irq = -1 } 1952 1501 }; 1953 1502 ··· 1982 1531 1983 1532 /* mcbsp3 */ 1984 1533 static struct omap_hwmod_irq_info omap44xx_mcbsp3_irqs[] = { 1985 - { .irq = 23 + OMAP44XX_IRQ_GIC_START }, 1534 + { .name = "common", .irq = 23 + OMAP44XX_IRQ_GIC_START }, 1986 1535 { .irq = -1 } 1987 1536 }; 1988 1537 ··· 2017 1566 2018 1567 /* mcbsp4 */ 2019 1568 static struct omap_hwmod_irq_info omap44xx_mcbsp4_irqs[] = { 2020 - { .irq = 16 + OMAP44XX_IRQ_GIC_START }, 1569 + { .name = "common", .irq = 16 + OMAP44XX_IRQ_GIC_START }, 2021 1570 { .irq = -1 } 2022 1571 }; 2023 1572 ··· 2465 2014 .context_offs = OMAP4_RM_MPU_MPU_CONTEXT_OFFSET, 2466 2015 }, 2467 2016 }, 2017 + }; 2018 + 2019 + /* 2020 + * 'ocmc_ram' class 2021 + * top-level core on-chip ram 2022 + */ 2023 + 2024 + static struct omap_hwmod_class omap44xx_ocmc_ram_hwmod_class = { 2025 + .name = "ocmc_ram", 2026 + }; 2027 + 2028 + /* ocmc_ram */ 2029 + static struct omap_hwmod omap44xx_ocmc_ram_hwmod = { 2030 + .name = "ocmc_ram", 2031 + .class = &omap44xx_ocmc_ram_hwmod_class, 2032 + .clkdm_name = "l3_2_clkdm", 2033 + .prcm = { 2034 + .omap4 = { 2035 + .clkctrl_offs = OMAP4_CM_L3_2_OCMC_RAM_CLKCTRL_OFFSET, 2036 + .context_offs = OMAP4_RM_L3_2_OCMC_RAM_CONTEXT_OFFSET, 2037 + }, 2038 + }, 2039 + }; 2040 + 2041 + /* 2042 + * 'ocp2scp' class 2043 + * bridge to transform ocp interface protocol to scp (serial control port) 2044 + * protocol 2045 + */ 2046 + 2047 + static struct omap_hwmod_class omap44xx_ocp2scp_hwmod_class = { 2048 + .name = "ocp2scp", 2049 + }; 2050 + 2051 + /* ocp2scp_usb_phy */ 2052 + static struct omap_hwmod_opt_clk ocp2scp_usb_phy_opt_clks[] = { 2053 + { .role = "phy_48m", .clk = "ocp2scp_usb_phy_phy_48m" }, 2054 + }; 2055 + 2056 + static struct omap_hwmod omap44xx_ocp2scp_usb_phy_hwmod = { 2057 + .name = "ocp2scp_usb_phy", 2058 + .class = &omap44xx_ocp2scp_hwmod_class, 2059 + .clkdm_name = "l3_init_clkdm", 2060 + .prcm = { 2061 + .omap4 = { 2062 + .clkctrl_offs = OMAP4_CM_L3INIT_USBPHYOCP2SCP_CLKCTRL_OFFSET, 2063 + .context_offs = OMAP4_RM_L3INIT_USBPHYOCP2SCP_CONTEXT_OFFSET, 2064 + .modulemode = MODULEMODE_HWCTRL, 2065 + }, 2066 + }, 2067 + .opt_clks = ocp2scp_usb_phy_opt_clks, 2068 + .opt_clks_cnt = ARRAY_SIZE(ocp2scp_usb_phy_opt_clks), 2069 + }; 2070 + 2071 + /* 2072 + * 'prcm' class 2073 + * power and reset manager (part of the prcm infrastructure) + clock manager 2 2074 + * + clock manager 1 (in always on power domain) + local prm in mpu 2075 + */ 2076 + 2077 + static struct omap_hwmod_class omap44xx_prcm_hwmod_class = { 2078 + .name = "prcm", 2079 + }; 2080 + 2081 + /* prcm_mpu */ 2082 + static struct omap_hwmod omap44xx_prcm_mpu_hwmod = { 2083 + .name = "prcm_mpu", 2084 + .class = &omap44xx_prcm_hwmod_class, 2085 + .clkdm_name = "l4_wkup_clkdm", 2086 + }; 2087 + 2088 + /* cm_core_aon */ 2089 + static struct omap_hwmod omap44xx_cm_core_aon_hwmod = { 2090 + .name = "cm_core_aon", 2091 + .class = &omap44xx_prcm_hwmod_class, 2092 + .clkdm_name = "cm_clkdm", 2093 + }; 2094 + 2095 + /* cm_core */ 2096 + static struct omap_hwmod omap44xx_cm_core_hwmod = { 2097 + .name = "cm_core", 2098 + .class = &omap44xx_prcm_hwmod_class, 2099 + .clkdm_name = "cm_clkdm", 2100 + }; 2101 + 2102 + /* prm */ 2103 + static struct omap_hwmod_irq_info omap44xx_prm_irqs[] = { 2104 + { .irq = 11 + OMAP44XX_IRQ_GIC_START }, 2105 + { .irq = -1 } 2106 + }; 2107 + 2108 + static struct omap_hwmod_rst_info omap44xx_prm_resets[] = { 2109 + { .name = "rst_global_warm_sw", .rst_shift = 0 }, 2110 + { .name = "rst_global_cold_sw", .rst_shift = 1 }, 2111 + }; 2112 + 2113 + static struct omap_hwmod omap44xx_prm_hwmod = { 2114 + .name = "prm", 2115 + .class = &omap44xx_prcm_hwmod_class, 2116 + .clkdm_name = "prm_clkdm", 2117 + .mpu_irqs = omap44xx_prm_irqs, 2118 + .rst_lines = omap44xx_prm_resets, 2119 + .rst_lines_cnt = ARRAY_SIZE(omap44xx_prm_resets), 2120 + }; 2121 + 2122 + /* 2123 + * 'scrm' class 2124 + * system clock and reset manager 2125 + */ 2126 + 2127 + static struct omap_hwmod_class omap44xx_scrm_hwmod_class = { 2128 + .name = "scrm", 2129 + }; 2130 + 2131 + /* scrm */ 2132 + static struct omap_hwmod omap44xx_scrm_hwmod = { 2133 + .name = "scrm", 2134 + .class = &omap44xx_scrm_hwmod_class, 2135 + .clkdm_name = "l4_wkup_clkdm", 2136 + }; 2137 + 2138 + /* 2139 + * 'sl2if' class 2140 + * shared level 2 memory interface 2141 + */ 2142 + 2143 + static struct omap_hwmod_class omap44xx_sl2if_hwmod_class = { 2144 + .name = "sl2if", 2145 + }; 2146 + 2147 + /* sl2if */ 2148 + static struct omap_hwmod omap44xx_sl2if_hwmod = { 2149 + .name = "sl2if", 2150 + .class = &omap44xx_sl2if_hwmod_class, 2151 + .clkdm_name = "ivahd_clkdm", 2152 + .prcm = { 2153 + .omap4 = { 2154 + .clkctrl_offs = OMAP4_CM_IVAHD_SL2_CLKCTRL_OFFSET, 2155 + .context_offs = OMAP4_RM_IVAHD_SL2_CONTEXT_OFFSET, 2156 + .modulemode = MODULEMODE_HWCTRL, 2157 + }, 2158 + }, 2159 + }; 2160 + 2161 + /* 2162 + * 'slimbus' class 2163 + * bidirectional, multi-drop, multi-channel two-line serial interface between 2164 + * the device and external components 2165 + */ 2166 + 2167 + static struct omap_hwmod_class_sysconfig omap44xx_slimbus_sysc = { 2168 + .rev_offs = 0x0000, 2169 + .sysc_offs = 0x0010, 2170 + .sysc_flags = (SYSC_HAS_RESET_STATUS | SYSC_HAS_SIDLEMODE | 2171 + SYSC_HAS_SOFTRESET), 2172 + .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | 2173 + SIDLE_SMART_WKUP), 2174 + .sysc_fields = &omap_hwmod_sysc_type2, 2175 + }; 2176 + 2177 + static struct omap_hwmod_class omap44xx_slimbus_hwmod_class = { 2178 + .name = "slimbus", 2179 + .sysc = &omap44xx_slimbus_sysc, 2180 + }; 2181 + 2182 + /* slimbus1 */ 2183 + static struct omap_hwmod_irq_info omap44xx_slimbus1_irqs[] = { 2184 + { .irq = 97 + OMAP44XX_IRQ_GIC_START }, 2185 + { .irq = -1 } 2186 + }; 2187 + 2188 + static struct omap_hwmod_dma_info omap44xx_slimbus1_sdma_reqs[] = { 2189 + { .name = "tx0", .dma_req = 84 + OMAP44XX_DMA_REQ_START }, 2190 + { .name = "tx1", .dma_req = 85 + OMAP44XX_DMA_REQ_START }, 2191 + { .name = "tx2", .dma_req = 86 + OMAP44XX_DMA_REQ_START }, 2192 + { .name = "tx3", .dma_req = 87 + OMAP44XX_DMA_REQ_START }, 2193 + { .name = "rx0", .dma_req = 88 + OMAP44XX_DMA_REQ_START }, 2194 + { .name = "rx1", .dma_req = 89 + OMAP44XX_DMA_REQ_START }, 2195 + { .name = "rx2", .dma_req = 90 + OMAP44XX_DMA_REQ_START }, 2196 + { .name = "rx3", .dma_req = 91 + OMAP44XX_DMA_REQ_START }, 2197 + { .dma_req = -1 } 2198 + }; 2199 + 2200 + static struct omap_hwmod_opt_clk slimbus1_opt_clks[] = { 2201 + { .role = "fclk_1", .clk = "slimbus1_fclk_1" }, 2202 + { .role = "fclk_0", .clk = "slimbus1_fclk_0" }, 2203 + { .role = "fclk_2", .clk = "slimbus1_fclk_2" }, 2204 + { .role = "slimbus_clk", .clk = "slimbus1_slimbus_clk" }, 2205 + }; 2206 + 2207 + static struct omap_hwmod omap44xx_slimbus1_hwmod = { 2208 + .name = "slimbus1", 2209 + .class = &omap44xx_slimbus_hwmod_class, 2210 + .clkdm_name = "abe_clkdm", 2211 + .mpu_irqs = omap44xx_slimbus1_irqs, 2212 + .sdma_reqs = omap44xx_slimbus1_sdma_reqs, 2213 + .prcm = { 2214 + .omap4 = { 2215 + .clkctrl_offs = OMAP4_CM1_ABE_SLIMBUS_CLKCTRL_OFFSET, 2216 + .context_offs = OMAP4_RM_ABE_SLIMBUS_CONTEXT_OFFSET, 2217 + .modulemode = MODULEMODE_SWCTRL, 2218 + }, 2219 + }, 2220 + .opt_clks = slimbus1_opt_clks, 2221 + .opt_clks_cnt = ARRAY_SIZE(slimbus1_opt_clks), 2222 + }; 2223 + 2224 + /* slimbus2 */ 2225 + static struct omap_hwmod_irq_info omap44xx_slimbus2_irqs[] = { 2226 + { .irq = 98 + OMAP44XX_IRQ_GIC_START }, 2227 + { .irq = -1 } 2228 + }; 2229 + 2230 + static struct omap_hwmod_dma_info omap44xx_slimbus2_sdma_reqs[] = { 2231 + { .name = "tx0", .dma_req = 92 + OMAP44XX_DMA_REQ_START }, 2232 + { .name = "tx1", .dma_req = 93 + OMAP44XX_DMA_REQ_START }, 2233 + { .name = "tx2", .dma_req = 94 + OMAP44XX_DMA_REQ_START }, 2234 + { .name = "tx3", .dma_req = 95 + OMAP44XX_DMA_REQ_START }, 2235 + { .name = "rx0", .dma_req = 96 + OMAP44XX_DMA_REQ_START }, 2236 + { .name = "rx1", .dma_req = 97 + OMAP44XX_DMA_REQ_START }, 2237 + { .name = "rx2", .dma_req = 98 + OMAP44XX_DMA_REQ_START }, 2238 + { .name = "rx3", .dma_req = 99 + OMAP44XX_DMA_REQ_START }, 2239 + { .dma_req = -1 } 2240 + }; 2241 + 2242 + static struct omap_hwmod_opt_clk slimbus2_opt_clks[] = { 2243 + { .role = "fclk_1", .clk = "slimbus2_fclk_1" }, 2244 + { .role = "fclk_0", .clk = "slimbus2_fclk_0" }, 2245 + { .role = "slimbus_clk", .clk = "slimbus2_slimbus_clk" }, 2246 + }; 2247 + 2248 + static struct omap_hwmod omap44xx_slimbus2_hwmod = { 2249 + .name = "slimbus2", 2250 + .class = &omap44xx_slimbus_hwmod_class, 2251 + .clkdm_name = "l4_per_clkdm", 2252 + .mpu_irqs = omap44xx_slimbus2_irqs, 2253 + .sdma_reqs = omap44xx_slimbus2_sdma_reqs, 2254 + .prcm = { 2255 + .omap4 = { 2256 + .clkctrl_offs = OMAP4_CM_L4PER_SLIMBUS2_CLKCTRL_OFFSET, 2257 + .context_offs = OMAP4_RM_L4PER_SLIMBUS2_CONTEXT_OFFSET, 2258 + .modulemode = MODULEMODE_SWCTRL, 2259 + }, 2260 + }, 2261 + .opt_clks = slimbus2_opt_clks, 2262 + .opt_clks_cnt = ARRAY_SIZE(slimbus2_opt_clks), 2468 2263 }; 2469 2264 2470 2265 /* ··· 3281 2584 }; 3282 2585 3283 2586 /* 2587 + * 'usb_host_fs' class 2588 + * full-speed usb host controller 2589 + */ 2590 + 2591 + /* The IP is not compliant to type1 / type2 scheme */ 2592 + static struct omap_hwmod_sysc_fields omap_hwmod_sysc_type_usb_host_fs = { 2593 + .midle_shift = 4, 2594 + .sidle_shift = 2, 2595 + .srst_shift = 1, 2596 + }; 2597 + 2598 + static struct omap_hwmod_class_sysconfig omap44xx_usb_host_fs_sysc = { 2599 + .rev_offs = 0x0000, 2600 + .sysc_offs = 0x0210, 2601 + .sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_SIDLEMODE | 2602 + SYSC_HAS_SOFTRESET), 2603 + .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | 2604 + SIDLE_SMART_WKUP), 2605 + .sysc_fields = &omap_hwmod_sysc_type_usb_host_fs, 2606 + }; 2607 + 2608 + static struct omap_hwmod_class omap44xx_usb_host_fs_hwmod_class = { 2609 + .name = "usb_host_fs", 2610 + .sysc = &omap44xx_usb_host_fs_sysc, 2611 + }; 2612 + 2613 + /* usb_host_fs */ 2614 + static struct omap_hwmod_irq_info omap44xx_usb_host_fs_irqs[] = { 2615 + { .name = "std", .irq = 89 + OMAP44XX_IRQ_GIC_START }, 2616 + { .name = "smi", .irq = 90 + OMAP44XX_IRQ_GIC_START }, 2617 + { .irq = -1 } 2618 + }; 2619 + 2620 + static struct omap_hwmod omap44xx_usb_host_fs_hwmod = { 2621 + .name = "usb_host_fs", 2622 + .class = &omap44xx_usb_host_fs_hwmod_class, 2623 + .clkdm_name = "l3_init_clkdm", 2624 + .mpu_irqs = omap44xx_usb_host_fs_irqs, 2625 + .main_clk = "usb_host_fs_fck", 2626 + .prcm = { 2627 + .omap4 = { 2628 + .clkctrl_offs = OMAP4_CM_L3INIT_USB_HOST_FS_CLKCTRL_OFFSET, 2629 + .context_offs = OMAP4_RM_L3INIT_USB_HOST_FS_CONTEXT_OFFSET, 2630 + .modulemode = MODULEMODE_SWCTRL, 2631 + }, 2632 + }, 2633 + }; 2634 + 2635 + /* 3284 2636 * 'usb_host_hs' class 3285 2637 * high-speed multi-port usb host controller 3286 2638 */ ··· 3535 2789 .name = "wd_timer", 3536 2790 .sysc = &omap44xx_wd_timer_sysc, 3537 2791 .pre_shutdown = &omap2_wd_timer_disable, 2792 + .reset = &omap2_wd_timer_reset, 3538 2793 }; 3539 2794 3540 2795 /* wd_timer2 */ ··· 3585 2838 * interfaces 3586 2839 */ 3587 2840 2841 + static struct omap_hwmod_addr_space omap44xx_c2c_target_fw_addrs[] = { 2842 + { 2843 + .pa_start = 0x4a204000, 2844 + .pa_end = 0x4a2040ff, 2845 + .flags = ADDR_TYPE_RT 2846 + }, 2847 + { } 2848 + }; 2849 + 2850 + /* c2c -> c2c_target_fw */ 2851 + static struct omap_hwmod_ocp_if omap44xx_c2c__c2c_target_fw = { 2852 + .master = &omap44xx_c2c_hwmod, 2853 + .slave = &omap44xx_c2c_target_fw_hwmod, 2854 + .clk = "div_core_ck", 2855 + .addr = omap44xx_c2c_target_fw_addrs, 2856 + .user = OCP_USER_MPU, 2857 + }; 2858 + 2859 + /* l4_cfg -> c2c_target_fw */ 2860 + static struct omap_hwmod_ocp_if omap44xx_l4_cfg__c2c_target_fw = { 2861 + .master = &omap44xx_l4_cfg_hwmod, 2862 + .slave = &omap44xx_c2c_target_fw_hwmod, 2863 + .clk = "l4_div_ck", 2864 + .user = OCP_USER_MPU | OCP_USER_SDMA, 2865 + }; 2866 + 3588 2867 /* l3_main_1 -> dmm */ 3589 2868 static struct omap_hwmod_ocp_if omap44xx_l3_main_1__dmm = { 3590 2869 .master = &omap44xx_l3_main_1_hwmod, ··· 3635 2862 .clk = "l3_div_ck", 3636 2863 .addr = omap44xx_dmm_addrs, 3637 2864 .user = OCP_USER_MPU, 2865 + }; 2866 + 2867 + /* c2c -> emif_fw */ 2868 + static struct omap_hwmod_ocp_if omap44xx_c2c__emif_fw = { 2869 + .master = &omap44xx_c2c_hwmod, 2870 + .slave = &omap44xx_emif_fw_hwmod, 2871 + .clk = "div_core_ck", 2872 + .user = OCP_USER_MPU | OCP_USER_SDMA, 3638 2873 }; 3639 2874 3640 2875 /* dmm -> emif_fw */ ··· 3682 2901 /* l3_main_3 -> l3_instr */ 3683 2902 static struct omap_hwmod_ocp_if omap44xx_l3_main_3__l3_instr = { 3684 2903 .master = &omap44xx_l3_main_3_hwmod, 2904 + .slave = &omap44xx_l3_instr_hwmod, 2905 + .clk = "l3_div_ck", 2906 + .user = OCP_USER_MPU | OCP_USER_SDMA, 2907 + }; 2908 + 2909 + /* ocp_wp_noc -> l3_instr */ 2910 + static struct omap_hwmod_ocp_if omap44xx_ocp_wp_noc__l3_instr = { 2911 + .master = &omap44xx_ocp_wp_noc_hwmod, 3685 2912 .slave = &omap44xx_l3_instr_hwmod, 3686 2913 .clk = "l3_div_ck", 3687 2914 .user = OCP_USER_MPU | OCP_USER_SDMA, ··· 3761 2972 .user = OCP_USER_MPU, 3762 2973 }; 3763 2974 2975 + /* c2c_target_fw -> l3_main_2 */ 2976 + static struct omap_hwmod_ocp_if omap44xx_c2c_target_fw__l3_main_2 = { 2977 + .master = &omap44xx_c2c_target_fw_hwmod, 2978 + .slave = &omap44xx_l3_main_2_hwmod, 2979 + .clk = "l3_div_ck", 2980 + .user = OCP_USER_MPU | OCP_USER_SDMA, 2981 + }; 2982 + 2983 + /* debugss -> l3_main_2 */ 2984 + static struct omap_hwmod_ocp_if omap44xx_debugss__l3_main_2 = { 2985 + .master = &omap44xx_debugss_hwmod, 2986 + .slave = &omap44xx_l3_main_2_hwmod, 2987 + .clk = "dbgclk_mux_ck", 2988 + .user = OCP_USER_MPU | OCP_USER_SDMA, 2989 + }; 2990 + 3764 2991 /* dma_system -> l3_main_2 */ 3765 2992 static struct omap_hwmod_ocp_if omap44xx_dma_system__l3_main_2 = { 3766 2993 .master = &omap44xx_dma_system_hwmod, 2994 + .slave = &omap44xx_l3_main_2_hwmod, 2995 + .clk = "l3_div_ck", 2996 + .user = OCP_USER_MPU | OCP_USER_SDMA, 2997 + }; 2998 + 2999 + /* fdif -> l3_main_2 */ 3000 + static struct omap_hwmod_ocp_if omap44xx_fdif__l3_main_2 = { 3001 + .master = &omap44xx_fdif_hwmod, 3002 + .slave = &omap44xx_l3_main_2_hwmod, 3003 + .clk = "l3_div_ck", 3004 + .user = OCP_USER_MPU | OCP_USER_SDMA, 3005 + }; 3006 + 3007 + /* gpu -> l3_main_2 */ 3008 + static struct omap_hwmod_ocp_if omap44xx_gpu__l3_main_2 = { 3009 + .master = &omap44xx_gpu_hwmod, 3767 3010 .slave = &omap44xx_l3_main_2_hwmod, 3768 3011 .clk = "l3_div_ck", 3769 3012 .user = OCP_USER_MPU | OCP_USER_SDMA, ··· 3856 3035 .master = &omap44xx_l4_cfg_hwmod, 3857 3036 .slave = &omap44xx_l3_main_2_hwmod, 3858 3037 .clk = "l4_div_ck", 3038 + .user = OCP_USER_MPU | OCP_USER_SDMA, 3039 + }; 3040 + 3041 + /* usb_host_fs -> l3_main_2 */ 3042 + static struct omap_hwmod_ocp_if omap44xx_usb_host_fs__l3_main_2 = { 3043 + .master = &omap44xx_usb_host_fs_hwmod, 3044 + .slave = &omap44xx_l3_main_2_hwmod, 3045 + .clk = "l3_div_ck", 3859 3046 .user = OCP_USER_MPU | OCP_USER_SDMA, 3860 3047 }; 3861 3048 ··· 3981 3152 .user = OCP_USER_MPU | OCP_USER_SDMA, 3982 3153 }; 3983 3154 3155 + static struct omap_hwmod_addr_space omap44xx_ocp_wp_noc_addrs[] = { 3156 + { 3157 + .pa_start = 0x4a102000, 3158 + .pa_end = 0x4a10207f, 3159 + .flags = ADDR_TYPE_RT 3160 + }, 3161 + { } 3162 + }; 3163 + 3164 + /* l4_cfg -> ocp_wp_noc */ 3165 + static struct omap_hwmod_ocp_if omap44xx_l4_cfg__ocp_wp_noc = { 3166 + .master = &omap44xx_l4_cfg_hwmod, 3167 + .slave = &omap44xx_ocp_wp_noc_hwmod, 3168 + .clk = "l4_div_ck", 3169 + .addr = omap44xx_ocp_wp_noc_addrs, 3170 + .user = OCP_USER_MPU | OCP_USER_SDMA, 3171 + }; 3172 + 3984 3173 static struct omap_hwmod_addr_space omap44xx_aess_addrs[] = { 3985 3174 { 3986 3175 .pa_start = 0x401f1000, ··· 4035 3188 .user = OCP_USER_SDMA, 4036 3189 }; 4037 3190 3191 + /* l3_main_2 -> c2c */ 3192 + static struct omap_hwmod_ocp_if omap44xx_l3_main_2__c2c = { 3193 + .master = &omap44xx_l3_main_2_hwmod, 3194 + .slave = &omap44xx_c2c_hwmod, 3195 + .clk = "l3_div_ck", 3196 + .user = OCP_USER_MPU | OCP_USER_SDMA, 3197 + }; 3198 + 4038 3199 static struct omap_hwmod_addr_space omap44xx_counter_32k_addrs[] = { 4039 3200 { 4040 3201 .pa_start = 0x4a304000, ··· 4058 3203 .slave = &omap44xx_counter_32k_hwmod, 4059 3204 .clk = "l4_wkup_clk_mux_ck", 4060 3205 .addr = omap44xx_counter_32k_addrs, 3206 + .user = OCP_USER_MPU | OCP_USER_SDMA, 3207 + }; 3208 + 3209 + static struct omap_hwmod_addr_space omap44xx_ctrl_module_core_addrs[] = { 3210 + { 3211 + .pa_start = 0x4a002000, 3212 + .pa_end = 0x4a0027ff, 3213 + .flags = ADDR_TYPE_RT 3214 + }, 3215 + { } 3216 + }; 3217 + 3218 + /* l4_cfg -> ctrl_module_core */ 3219 + static struct omap_hwmod_ocp_if omap44xx_l4_cfg__ctrl_module_core = { 3220 + .master = &omap44xx_l4_cfg_hwmod, 3221 + .slave = &omap44xx_ctrl_module_core_hwmod, 3222 + .clk = "l4_div_ck", 3223 + .addr = omap44xx_ctrl_module_core_addrs, 3224 + .user = OCP_USER_MPU | OCP_USER_SDMA, 3225 + }; 3226 + 3227 + static struct omap_hwmod_addr_space omap44xx_ctrl_module_pad_core_addrs[] = { 3228 + { 3229 + .pa_start = 0x4a100000, 3230 + .pa_end = 0x4a1007ff, 3231 + .flags = ADDR_TYPE_RT 3232 + }, 3233 + { } 3234 + }; 3235 + 3236 + /* l4_cfg -> ctrl_module_pad_core */ 3237 + static struct omap_hwmod_ocp_if omap44xx_l4_cfg__ctrl_module_pad_core = { 3238 + .master = &omap44xx_l4_cfg_hwmod, 3239 + .slave = &omap44xx_ctrl_module_pad_core_hwmod, 3240 + .clk = "l4_div_ck", 3241 + .addr = omap44xx_ctrl_module_pad_core_addrs, 3242 + .user = OCP_USER_MPU | OCP_USER_SDMA, 3243 + }; 3244 + 3245 + static struct omap_hwmod_addr_space omap44xx_ctrl_module_wkup_addrs[] = { 3246 + { 3247 + .pa_start = 0x4a30c000, 3248 + .pa_end = 0x4a30c7ff, 3249 + .flags = ADDR_TYPE_RT 3250 + }, 3251 + { } 3252 + }; 3253 + 3254 + /* l4_wkup -> ctrl_module_wkup */ 3255 + static struct omap_hwmod_ocp_if omap44xx_l4_wkup__ctrl_module_wkup = { 3256 + .master = &omap44xx_l4_wkup_hwmod, 3257 + .slave = &omap44xx_ctrl_module_wkup_hwmod, 3258 + .clk = "l4_wkup_clk_mux_ck", 3259 + .addr = omap44xx_ctrl_module_wkup_addrs, 3260 + .user = OCP_USER_MPU | OCP_USER_SDMA, 3261 + }; 3262 + 3263 + static struct omap_hwmod_addr_space omap44xx_ctrl_module_pad_wkup_addrs[] = { 3264 + { 3265 + .pa_start = 0x4a31e000, 3266 + .pa_end = 0x4a31e7ff, 3267 + .flags = ADDR_TYPE_RT 3268 + }, 3269 + { } 3270 + }; 3271 + 3272 + /* l4_wkup -> ctrl_module_pad_wkup */ 3273 + static struct omap_hwmod_ocp_if omap44xx_l4_wkup__ctrl_module_pad_wkup = { 3274 + .master = &omap44xx_l4_wkup_hwmod, 3275 + .slave = &omap44xx_ctrl_module_pad_wkup_hwmod, 3276 + .clk = "l4_wkup_clk_mux_ck", 3277 + .addr = omap44xx_ctrl_module_pad_wkup_addrs, 3278 + .user = OCP_USER_MPU | OCP_USER_SDMA, 3279 + }; 3280 + 3281 + static struct omap_hwmod_addr_space omap44xx_debugss_addrs[] = { 3282 + { 3283 + .pa_start = 0x54160000, 3284 + .pa_end = 0x54167fff, 3285 + .flags = ADDR_TYPE_RT 3286 + }, 3287 + { } 3288 + }; 3289 + 3290 + /* l3_instr -> debugss */ 3291 + static struct omap_hwmod_ocp_if omap44xx_l3_instr__debugss = { 3292 + .master = &omap44xx_l3_instr_hwmod, 3293 + .slave = &omap44xx_debugss_hwmod, 3294 + .clk = "l3_div_ck", 3295 + .addr = omap44xx_debugss_addrs, 4061 3296 .user = OCP_USER_MPU | OCP_USER_SDMA, 4062 3297 }; 4063 3298 ··· 4211 3266 static struct omap_hwmod_ocp_if omap44xx_dsp__iva = { 4212 3267 .master = &omap44xx_dsp_hwmod, 4213 3268 .slave = &omap44xx_iva_hwmod, 3269 + .clk = "dpll_iva_m5x2_ck", 3270 + .user = OCP_USER_DSP, 3271 + }; 3272 + 3273 + /* dsp -> sl2if */ 3274 + static struct omap_hwmod_ocp_if omap44xx_dsp__sl2if = { 3275 + .master = &omap44xx_dsp_hwmod, 3276 + .slave = &omap44xx_sl2if_hwmod, 4214 3277 .clk = "dpll_iva_m5x2_ck", 4215 3278 .user = OCP_USER_DSP, 4216 3279 }; ··· 4483 3530 .user = OCP_USER_MPU, 4484 3531 }; 4485 3532 3533 + static struct omap_hwmod_addr_space omap44xx_elm_addrs[] = { 3534 + { 3535 + .pa_start = 0x48078000, 3536 + .pa_end = 0x48078fff, 3537 + .flags = ADDR_TYPE_RT 3538 + }, 3539 + { } 3540 + }; 3541 + 3542 + /* l4_per -> elm */ 3543 + static struct omap_hwmod_ocp_if omap44xx_l4_per__elm = { 3544 + .master = &omap44xx_l4_per_hwmod, 3545 + .slave = &omap44xx_elm_hwmod, 3546 + .clk = "l4_div_ck", 3547 + .addr = omap44xx_elm_addrs, 3548 + .user = OCP_USER_MPU | OCP_USER_SDMA, 3549 + }; 3550 + 3551 + static struct omap_hwmod_addr_space omap44xx_emif1_addrs[] = { 3552 + { 3553 + .pa_start = 0x4c000000, 3554 + .pa_end = 0x4c0000ff, 3555 + .flags = ADDR_TYPE_RT 3556 + }, 3557 + { } 3558 + }; 3559 + 3560 + /* emif_fw -> emif1 */ 3561 + static struct omap_hwmod_ocp_if omap44xx_emif_fw__emif1 = { 3562 + .master = &omap44xx_emif_fw_hwmod, 3563 + .slave = &omap44xx_emif1_hwmod, 3564 + .clk = "l3_div_ck", 3565 + .addr = omap44xx_emif1_addrs, 3566 + .user = OCP_USER_MPU | OCP_USER_SDMA, 3567 + }; 3568 + 3569 + static struct omap_hwmod_addr_space omap44xx_emif2_addrs[] = { 3570 + { 3571 + .pa_start = 0x4d000000, 3572 + .pa_end = 0x4d0000ff, 3573 + .flags = ADDR_TYPE_RT 3574 + }, 3575 + { } 3576 + }; 3577 + 3578 + /* emif_fw -> emif2 */ 3579 + static struct omap_hwmod_ocp_if omap44xx_emif_fw__emif2 = { 3580 + .master = &omap44xx_emif_fw_hwmod, 3581 + .slave = &omap44xx_emif2_hwmod, 3582 + .clk = "l3_div_ck", 3583 + .addr = omap44xx_emif2_addrs, 3584 + .user = OCP_USER_MPU | OCP_USER_SDMA, 3585 + }; 3586 + 3587 + static struct omap_hwmod_addr_space omap44xx_fdif_addrs[] = { 3588 + { 3589 + .pa_start = 0x4a10a000, 3590 + .pa_end = 0x4a10a1ff, 3591 + .flags = ADDR_TYPE_RT 3592 + }, 3593 + { } 3594 + }; 3595 + 3596 + /* l4_cfg -> fdif */ 3597 + static struct omap_hwmod_ocp_if omap44xx_l4_cfg__fdif = { 3598 + .master = &omap44xx_l4_cfg_hwmod, 3599 + .slave = &omap44xx_fdif_hwmod, 3600 + .clk = "l4_div_ck", 3601 + .addr = omap44xx_fdif_addrs, 3602 + .user = OCP_USER_MPU | OCP_USER_SDMA, 3603 + }; 3604 + 4486 3605 static struct omap_hwmod_addr_space omap44xx_gpio1_addrs[] = { 4487 3606 { 4488 3607 .pa_start = 0x4a310000, ··· 4660 3635 .slave = &omap44xx_gpio6_hwmod, 4661 3636 .clk = "l4_div_ck", 4662 3637 .addr = omap44xx_gpio6_addrs, 3638 + .user = OCP_USER_MPU | OCP_USER_SDMA, 3639 + }; 3640 + 3641 + static struct omap_hwmod_addr_space omap44xx_gpmc_addrs[] = { 3642 + { 3643 + .pa_start = 0x50000000, 3644 + .pa_end = 0x500003ff, 3645 + .flags = ADDR_TYPE_RT 3646 + }, 3647 + { } 3648 + }; 3649 + 3650 + /* l3_main_2 -> gpmc */ 3651 + static struct omap_hwmod_ocp_if omap44xx_l3_main_2__gpmc = { 3652 + .master = &omap44xx_l3_main_2_hwmod, 3653 + .slave = &omap44xx_gpmc_hwmod, 3654 + .clk = "l3_div_ck", 3655 + .addr = omap44xx_gpmc_addrs, 3656 + .user = OCP_USER_MPU | OCP_USER_SDMA, 3657 + }; 3658 + 3659 + static struct omap_hwmod_addr_space omap44xx_gpu_addrs[] = { 3660 + { 3661 + .pa_start = 0x56000000, 3662 + .pa_end = 0x5600ffff, 3663 + .flags = ADDR_TYPE_RT 3664 + }, 3665 + { } 3666 + }; 3667 + 3668 + /* l3_main_2 -> gpu */ 3669 + static struct omap_hwmod_ocp_if omap44xx_l3_main_2__gpu = { 3670 + .master = &omap44xx_l3_main_2_hwmod, 3671 + .slave = &omap44xx_gpu_hwmod, 3672 + .clk = "l3_div_ck", 3673 + .addr = omap44xx_gpu_addrs, 3674 + .user = OCP_USER_MPU | OCP_USER_SDMA, 3675 + }; 3676 + 3677 + static struct omap_hwmod_addr_space omap44xx_hdq1w_addrs[] = { 3678 + { 3679 + .pa_start = 0x480b2000, 3680 + .pa_end = 0x480b201f, 3681 + .flags = ADDR_TYPE_RT 3682 + }, 3683 + { } 3684 + }; 3685 + 3686 + /* l4_per -> hdq1w */ 3687 + static struct omap_hwmod_ocp_if omap44xx_l4_per__hdq1w = { 3688 + .master = &omap44xx_l4_per_hwmod, 3689 + .slave = &omap44xx_hdq1w_hwmod, 3690 + .clk = "l4_div_ck", 3691 + .addr = omap44xx_hdq1w_addrs, 4663 3692 .user = OCP_USER_MPU | OCP_USER_SDMA, 4664 3693 }; 4665 3694 ··· 4833 3754 .user = OCP_USER_MPU | OCP_USER_SDMA, 4834 3755 }; 4835 3756 3757 + /* iva -> sl2if */ 3758 + static struct omap_hwmod_ocp_if omap44xx_iva__sl2if = { 3759 + .master = &omap44xx_iva_hwmod, 3760 + .slave = &omap44xx_sl2if_hwmod, 3761 + .clk = "dpll_iva_m5x2_ck", 3762 + .user = OCP_USER_IVA, 3763 + }; 3764 + 4836 3765 static struct omap_hwmod_addr_space omap44xx_iva_addrs[] = { 4837 3766 { 4838 3767 .pa_start = 0x5a000000, ··· 4893 3806 .clk = "l4_div_ck", 4894 3807 .addr = omap44xx_mailbox_addrs, 4895 3808 .user = OCP_USER_MPU | OCP_USER_SDMA, 3809 + }; 3810 + 3811 + static struct omap_hwmod_addr_space omap44xx_mcasp_addrs[] = { 3812 + { 3813 + .pa_start = 0x40128000, 3814 + .pa_end = 0x401283ff, 3815 + .flags = ADDR_TYPE_RT 3816 + }, 3817 + { } 3818 + }; 3819 + 3820 + /* l4_abe -> mcasp */ 3821 + static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcasp = { 3822 + .master = &omap44xx_l4_abe_hwmod, 3823 + .slave = &omap44xx_mcasp_hwmod, 3824 + .clk = "ocp_abe_iclk", 3825 + .addr = omap44xx_mcasp_addrs, 3826 + .user = OCP_USER_MPU, 3827 + }; 3828 + 3829 + static struct omap_hwmod_addr_space omap44xx_mcasp_dma_addrs[] = { 3830 + { 3831 + .pa_start = 0x49028000, 3832 + .pa_end = 0x490283ff, 3833 + .flags = ADDR_TYPE_RT 3834 + }, 3835 + { } 3836 + }; 3837 + 3838 + /* l4_abe -> mcasp (dma) */ 3839 + static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcasp_dma = { 3840 + .master = &omap44xx_l4_abe_hwmod, 3841 + .slave = &omap44xx_mcasp_hwmod, 3842 + .clk = "ocp_abe_iclk", 3843 + .addr = omap44xx_mcasp_dma_addrs, 3844 + .user = OCP_USER_SDMA, 4896 3845 }; 4897 3846 4898 3847 static struct omap_hwmod_addr_space omap44xx_mcbsp1_addrs[] = { ··· 5258 4135 .slave = &omap44xx_mmc5_hwmod, 5259 4136 .clk = "l4_div_ck", 5260 4137 .addr = omap44xx_mmc5_addrs, 4138 + .user = OCP_USER_MPU | OCP_USER_SDMA, 4139 + }; 4140 + 4141 + /* l3_main_2 -> ocmc_ram */ 4142 + static struct omap_hwmod_ocp_if omap44xx_l3_main_2__ocmc_ram = { 4143 + .master = &omap44xx_l3_main_2_hwmod, 4144 + .slave = &omap44xx_ocmc_ram_hwmod, 4145 + .clk = "l3_div_ck", 4146 + .user = OCP_USER_MPU | OCP_USER_SDMA, 4147 + }; 4148 + 4149 + /* l4_cfg -> ocp2scp_usb_phy */ 4150 + static struct omap_hwmod_ocp_if omap44xx_l4_cfg__ocp2scp_usb_phy = { 4151 + .master = &omap44xx_l4_cfg_hwmod, 4152 + .slave = &omap44xx_ocp2scp_usb_phy_hwmod, 4153 + .clk = "l4_div_ck", 4154 + .user = OCP_USER_MPU | OCP_USER_SDMA, 4155 + }; 4156 + 4157 + static struct omap_hwmod_addr_space omap44xx_prcm_mpu_addrs[] = { 4158 + { 4159 + .pa_start = 0x48243000, 4160 + .pa_end = 0x48243fff, 4161 + .flags = ADDR_TYPE_RT 4162 + }, 4163 + { } 4164 + }; 4165 + 4166 + /* mpu_private -> prcm_mpu */ 4167 + static struct omap_hwmod_ocp_if omap44xx_mpu_private__prcm_mpu = { 4168 + .master = &omap44xx_mpu_private_hwmod, 4169 + .slave = &omap44xx_prcm_mpu_hwmod, 4170 + .clk = "l3_div_ck", 4171 + .addr = omap44xx_prcm_mpu_addrs, 4172 + .user = OCP_USER_MPU | OCP_USER_SDMA, 4173 + }; 4174 + 4175 + static struct omap_hwmod_addr_space omap44xx_cm_core_aon_addrs[] = { 4176 + { 4177 + .pa_start = 0x4a004000, 4178 + .pa_end = 0x4a004fff, 4179 + .flags = ADDR_TYPE_RT 4180 + }, 4181 + { } 4182 + }; 4183 + 4184 + /* l4_wkup -> cm_core_aon */ 4185 + static struct omap_hwmod_ocp_if omap44xx_l4_wkup__cm_core_aon = { 4186 + .master = &omap44xx_l4_wkup_hwmod, 4187 + .slave = &omap44xx_cm_core_aon_hwmod, 4188 + .clk = "l4_wkup_clk_mux_ck", 4189 + .addr = omap44xx_cm_core_aon_addrs, 4190 + .user = OCP_USER_MPU | OCP_USER_SDMA, 4191 + }; 4192 + 4193 + static struct omap_hwmod_addr_space omap44xx_cm_core_addrs[] = { 4194 + { 4195 + .pa_start = 0x4a008000, 4196 + .pa_end = 0x4a009fff, 4197 + .flags = ADDR_TYPE_RT 4198 + }, 4199 + { } 4200 + }; 4201 + 4202 + /* l4_cfg -> cm_core */ 4203 + static struct omap_hwmod_ocp_if omap44xx_l4_cfg__cm_core = { 4204 + .master = &omap44xx_l4_cfg_hwmod, 4205 + .slave = &omap44xx_cm_core_hwmod, 4206 + .clk = "l4_div_ck", 4207 + .addr = omap44xx_cm_core_addrs, 4208 + .user = OCP_USER_MPU | OCP_USER_SDMA, 4209 + }; 4210 + 4211 + static struct omap_hwmod_addr_space omap44xx_prm_addrs[] = { 4212 + { 4213 + .pa_start = 0x4a306000, 4214 + .pa_end = 0x4a307fff, 4215 + .flags = ADDR_TYPE_RT 4216 + }, 4217 + { } 4218 + }; 4219 + 4220 + /* l4_wkup -> prm */ 4221 + static struct omap_hwmod_ocp_if omap44xx_l4_wkup__prm = { 4222 + .master = &omap44xx_l4_wkup_hwmod, 4223 + .slave = &omap44xx_prm_hwmod, 4224 + .clk = "l4_wkup_clk_mux_ck", 4225 + .addr = omap44xx_prm_addrs, 4226 + .user = OCP_USER_MPU | OCP_USER_SDMA, 4227 + }; 4228 + 4229 + static struct omap_hwmod_addr_space omap44xx_scrm_addrs[] = { 4230 + { 4231 + .pa_start = 0x4a30a000, 4232 + .pa_end = 0x4a30a7ff, 4233 + .flags = ADDR_TYPE_RT 4234 + }, 4235 + { } 4236 + }; 4237 + 4238 + /* l4_wkup -> scrm */ 4239 + static struct omap_hwmod_ocp_if omap44xx_l4_wkup__scrm = { 4240 + .master = &omap44xx_l4_wkup_hwmod, 4241 + .slave = &omap44xx_scrm_hwmod, 4242 + .clk = "l4_wkup_clk_mux_ck", 4243 + .addr = omap44xx_scrm_addrs, 4244 + .user = OCP_USER_MPU | OCP_USER_SDMA, 4245 + }; 4246 + 4247 + /* l3_main_2 -> sl2if */ 4248 + static struct omap_hwmod_ocp_if omap44xx_l3_main_2__sl2if = { 4249 + .master = &omap44xx_l3_main_2_hwmod, 4250 + .slave = &omap44xx_sl2if_hwmod, 4251 + .clk = "l3_div_ck", 4252 + .user = OCP_USER_MPU | OCP_USER_SDMA, 4253 + }; 4254 + 4255 + static struct omap_hwmod_addr_space omap44xx_slimbus1_addrs[] = { 4256 + { 4257 + .pa_start = 0x4012c000, 4258 + .pa_end = 0x4012c3ff, 4259 + .flags = ADDR_TYPE_RT 4260 + }, 4261 + { } 4262 + }; 4263 + 4264 + /* l4_abe -> slimbus1 */ 4265 + static struct omap_hwmod_ocp_if omap44xx_l4_abe__slimbus1 = { 4266 + .master = &omap44xx_l4_abe_hwmod, 4267 + .slave = &omap44xx_slimbus1_hwmod, 4268 + .clk = "ocp_abe_iclk", 4269 + .addr = omap44xx_slimbus1_addrs, 4270 + .user = OCP_USER_MPU, 4271 + }; 4272 + 4273 + static struct omap_hwmod_addr_space omap44xx_slimbus1_dma_addrs[] = { 4274 + { 4275 + .pa_start = 0x4902c000, 4276 + .pa_end = 0x4902c3ff, 4277 + .flags = ADDR_TYPE_RT 4278 + }, 4279 + { } 4280 + }; 4281 + 4282 + /* l4_abe -> slimbus1 (dma) */ 4283 + static struct omap_hwmod_ocp_if omap44xx_l4_abe__slimbus1_dma = { 4284 + .master = &omap44xx_l4_abe_hwmod, 4285 + .slave = &omap44xx_slimbus1_hwmod, 4286 + .clk = "ocp_abe_iclk", 4287 + .addr = omap44xx_slimbus1_dma_addrs, 4288 + .user = OCP_USER_SDMA, 4289 + }; 4290 + 4291 + static struct omap_hwmod_addr_space omap44xx_slimbus2_addrs[] = { 4292 + { 4293 + .pa_start = 0x48076000, 4294 + .pa_end = 0x480763ff, 4295 + .flags = ADDR_TYPE_RT 4296 + }, 4297 + { } 4298 + }; 4299 + 4300 + /* l4_per -> slimbus2 */ 4301 + static struct omap_hwmod_ocp_if omap44xx_l4_per__slimbus2 = { 4302 + .master = &omap44xx_l4_per_hwmod, 4303 + .slave = &omap44xx_slimbus2_hwmod, 4304 + .clk = "l4_div_ck", 4305 + .addr = omap44xx_slimbus2_addrs, 5261 4306 .user = OCP_USER_MPU | OCP_USER_SDMA, 5262 4307 }; 5263 4308 ··· 5843 4552 .user = OCP_USER_MPU | OCP_USER_SDMA, 5844 4553 }; 5845 4554 4555 + static struct omap_hwmod_addr_space omap44xx_usb_host_fs_addrs[] = { 4556 + { 4557 + .pa_start = 0x4a0a9000, 4558 + .pa_end = 0x4a0a93ff, 4559 + .flags = ADDR_TYPE_RT 4560 + }, 4561 + { } 4562 + }; 4563 + 4564 + /* l4_cfg -> usb_host_fs */ 4565 + static struct omap_hwmod_ocp_if omap44xx_l4_cfg__usb_host_fs = { 4566 + .master = &omap44xx_l4_cfg_hwmod, 4567 + .slave = &omap44xx_usb_host_fs_hwmod, 4568 + .clk = "l4_div_ck", 4569 + .addr = omap44xx_usb_host_fs_addrs, 4570 + .user = OCP_USER_MPU | OCP_USER_SDMA, 4571 + }; 4572 + 5846 4573 static struct omap_hwmod_addr_space omap44xx_usb_host_hs_addrs[] = { 5847 4574 { 5848 4575 .name = "uhh", ··· 5982 4673 }; 5983 4674 5984 4675 static struct omap_hwmod_ocp_if *omap44xx_hwmod_ocp_ifs[] __initdata = { 4676 + &omap44xx_c2c__c2c_target_fw, 4677 + &omap44xx_l4_cfg__c2c_target_fw, 5985 4678 &omap44xx_l3_main_1__dmm, 5986 4679 &omap44xx_mpu__dmm, 4680 + &omap44xx_c2c__emif_fw, 5987 4681 &omap44xx_dmm__emif_fw, 5988 4682 &omap44xx_l4_cfg__emif_fw, 5989 4683 &omap44xx_iva__l3_instr, 5990 4684 &omap44xx_l3_main_3__l3_instr, 4685 + &omap44xx_ocp_wp_noc__l3_instr, 5991 4686 &omap44xx_dsp__l3_main_1, 5992 4687 &omap44xx_dss__l3_main_1, 5993 4688 &omap44xx_l3_main_2__l3_main_1, ··· 5999 4686 &omap44xx_mmc1__l3_main_1, 6000 4687 &omap44xx_mmc2__l3_main_1, 6001 4688 &omap44xx_mpu__l3_main_1, 4689 + &omap44xx_c2c_target_fw__l3_main_2, 4690 + &omap44xx_debugss__l3_main_2, 6002 4691 &omap44xx_dma_system__l3_main_2, 4692 + &omap44xx_fdif__l3_main_2, 4693 + &omap44xx_gpu__l3_main_2, 6003 4694 &omap44xx_hsi__l3_main_2, 6004 4695 &omap44xx_ipu__l3_main_2, 6005 4696 &omap44xx_iss__l3_main_2, 6006 4697 &omap44xx_iva__l3_main_2, 6007 4698 &omap44xx_l3_main_1__l3_main_2, 6008 4699 &omap44xx_l4_cfg__l3_main_2, 4700 + &omap44xx_usb_host_fs__l3_main_2, 6009 4701 &omap44xx_usb_host_hs__l3_main_2, 6010 4702 &omap44xx_usb_otg_hs__l3_main_2, 6011 4703 &omap44xx_l3_main_1__l3_main_3, ··· 6024 4706 &omap44xx_l3_main_2__l4_per, 6025 4707 &omap44xx_l4_cfg__l4_wkup, 6026 4708 &omap44xx_mpu__mpu_private, 4709 + &omap44xx_l4_cfg__ocp_wp_noc, 6027 4710 &omap44xx_l4_abe__aess, 6028 4711 &omap44xx_l4_abe__aess_dma, 4712 + &omap44xx_l3_main_2__c2c, 6029 4713 &omap44xx_l4_wkup__counter_32k, 4714 + &omap44xx_l4_cfg__ctrl_module_core, 4715 + &omap44xx_l4_cfg__ctrl_module_pad_core, 4716 + &omap44xx_l4_wkup__ctrl_module_wkup, 4717 + &omap44xx_l4_wkup__ctrl_module_pad_wkup, 4718 + &omap44xx_l3_instr__debugss, 6030 4719 &omap44xx_l4_cfg__dma_system, 6031 4720 &omap44xx_l4_abe__dmic, 6032 4721 &omap44xx_l4_abe__dmic_dma, 6033 4722 &omap44xx_dsp__iva, 4723 + &omap44xx_dsp__sl2if, 6034 4724 &omap44xx_l4_cfg__dsp, 6035 4725 &omap44xx_l3_main_2__dss, 6036 4726 &omap44xx_l4_per__dss, ··· 6054 4728 &omap44xx_l4_per__dss_rfbi, 6055 4729 &omap44xx_l3_main_2__dss_venc, 6056 4730 &omap44xx_l4_per__dss_venc, 4731 + &omap44xx_l4_per__elm, 4732 + &omap44xx_emif_fw__emif1, 4733 + &omap44xx_emif_fw__emif2, 4734 + &omap44xx_l4_cfg__fdif, 6057 4735 &omap44xx_l4_wkup__gpio1, 6058 4736 &omap44xx_l4_per__gpio2, 6059 4737 &omap44xx_l4_per__gpio3, 6060 4738 &omap44xx_l4_per__gpio4, 6061 4739 &omap44xx_l4_per__gpio5, 6062 4740 &omap44xx_l4_per__gpio6, 4741 + &omap44xx_l3_main_2__gpmc, 4742 + &omap44xx_l3_main_2__gpu, 4743 + &omap44xx_l4_per__hdq1w, 6063 4744 &omap44xx_l4_cfg__hsi, 6064 4745 &omap44xx_l4_per__i2c1, 6065 4746 &omap44xx_l4_per__i2c2, ··· 6074 4741 &omap44xx_l4_per__i2c4, 6075 4742 &omap44xx_l3_main_2__ipu, 6076 4743 &omap44xx_l3_main_2__iss, 4744 + &omap44xx_iva__sl2if, 6077 4745 &omap44xx_l3_main_2__iva, 6078 4746 &omap44xx_l4_wkup__kbd, 6079 4747 &omap44xx_l4_cfg__mailbox, 4748 + &omap44xx_l4_abe__mcasp, 4749 + &omap44xx_l4_abe__mcasp_dma, 6080 4750 &omap44xx_l4_abe__mcbsp1, 6081 4751 &omap44xx_l4_abe__mcbsp1_dma, 6082 4752 &omap44xx_l4_abe__mcbsp2, ··· 6098 4762 &omap44xx_l4_per__mmc3, 6099 4763 &omap44xx_l4_per__mmc4, 6100 4764 &omap44xx_l4_per__mmc5, 4765 + &omap44xx_l3_main_2__ocmc_ram, 4766 + &omap44xx_l4_cfg__ocp2scp_usb_phy, 4767 + &omap44xx_mpu_private__prcm_mpu, 4768 + &omap44xx_l4_wkup__cm_core_aon, 4769 + &omap44xx_l4_cfg__cm_core, 4770 + &omap44xx_l4_wkup__prm, 4771 + &omap44xx_l4_wkup__scrm, 4772 + &omap44xx_l3_main_2__sl2if, 4773 + &omap44xx_l4_abe__slimbus1, 4774 + &omap44xx_l4_abe__slimbus1_dma, 4775 + &omap44xx_l4_per__slimbus2, 6101 4776 &omap44xx_l4_cfg__smartreflex_core, 6102 4777 &omap44xx_l4_cfg__smartreflex_iva, 6103 4778 &omap44xx_l4_cfg__smartreflex_mpu, ··· 6132 4785 &omap44xx_l4_per__uart2, 6133 4786 &omap44xx_l4_per__uart3, 6134 4787 &omap44xx_l4_per__uart4, 4788 + &omap44xx_l4_cfg__usb_host_fs, 6135 4789 &omap44xx_l4_cfg__usb_host_hs, 6136 4790 &omap44xx_l4_cfg__usb_otg_hs, 6137 4791 &omap44xx_l4_cfg__usb_tll_hs,
+5
arch/arm/mach-omap2/omap_hwmod_common_data.h
··· 38 38 extern struct omap_hwmod_addr_space omap2_dma_system_addrs[]; 39 39 extern struct omap_hwmod_addr_space omap2_mailbox_addrs[]; 40 40 extern struct omap_hwmod_addr_space omap2_mcbsp1_addrs[]; 41 + extern struct omap_hwmod_addr_space omap2_hdq1w_addr_space[]; 41 42 42 43 /* Common IP block data across OMAP2xxx */ 43 44 extern struct omap_hwmod_irq_info omap2xxx_timer12_mpu_irqs[]; ··· 75 74 extern struct omap_hwmod omap2xxx_gpio4_hwmod; 76 75 extern struct omap_hwmod omap2xxx_mcspi1_hwmod; 77 76 extern struct omap_hwmod omap2xxx_mcspi2_hwmod; 77 + extern struct omap_hwmod omap2xxx_counter_32k_hwmod; 78 78 79 79 /* Common interface data across OMAP2xxx */ 80 80 extern struct omap_hwmod_ocp_if omap2xxx_l3_main__l4_core; ··· 143 141 extern struct omap_hwmod_irq_info omap2_mcspi1_mpu_irqs[]; 144 142 extern struct omap_hwmod_irq_info omap2_mcspi2_mpu_irqs[]; 145 143 extern struct omap_hwmod_addr_space omap2xxx_timer12_addrs[]; 144 + extern struct omap_hwmod_irq_info omap2_hdq1w_mpu_irqs[]; 146 145 147 146 /* OMAP hwmod classes - forward declarations */ 148 147 extern struct omap_hwmod_class l3_hwmod_class; ··· 155 152 extern struct omap_hwmod_class omap2_dispc_hwmod_class; 156 153 extern struct omap_hwmod_class omap2_rfbi_hwmod_class; 157 154 extern struct omap_hwmod_class omap2_venc_hwmod_class; 155 + extern struct omap_hwmod_class_sysconfig omap2_hdq1w_sysc; 156 + extern struct omap_hwmod_class omap2_hdq1w_class; 158 157 159 158 extern struct omap_hwmod_class omap2xxx_timer_hwmod_class; 160 159 extern struct omap_hwmod_class omap2xxx_wd_timer_hwmod_class;
-10
arch/arm/mach-omap2/powerdomain.c
··· 981 981 return ret; 982 982 } 983 983 984 - int 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 - 994 984 int pwrdm_pre_transition(void) 995 985 { 996 986 pwrdm_for_each(_pwrdm_pre_transition_cb, NULL);
-1
arch/arm/mach-omap2/powerdomain.h
··· 213 213 int pwrdm_wait_transition(struct powerdomain *pwrdm); 214 214 215 215 int pwrdm_state_switch(struct powerdomain *pwrdm); 216 - int pwrdm_clkdm_state_switch(struct clockdomain *clkdm); 217 216 int pwrdm_pre_transition(void); 218 217 int pwrdm_post_transition(void); 219 218 int pwrdm_set_lowpwrstchange(struct powerdomain *pwrdm);
+17
arch/arm/mach-omap2/prcm-common.h
··· 177 177 /* PM_WKST_WKUP, CM_IDLEST_WKUP shared bits */ 178 178 #define OMAP24XX_ST_GPIOS_SHIFT 2 179 179 #define OMAP24XX_ST_GPIOS_MASK (1 << 2) 180 + #define OMAP24XX_ST_32KSYNC_SHIFT 1 181 + #define OMAP24XX_ST_32KSYNC_MASK (1 << 1) 180 182 #define OMAP24XX_ST_GPT1_SHIFT 0 181 183 #define OMAP24XX_ST_GPT1_MASK (1 << 0) 182 184 ··· 309 307 #define OMAP3430_ST_SR1_MASK (1 << 6) 310 308 #define OMAP3430_ST_GPIO1_SHIFT 3 311 309 #define OMAP3430_ST_GPIO1_MASK (1 << 3) 310 + #define OMAP3430_ST_32KSYNC_SHIFT 2 311 + #define OMAP3430_ST_32KSYNC_MASK (1 << 2) 312 312 #define OMAP3430_ST_GPT12_SHIFT 1 313 313 #define OMAP3430_ST_GPT12_MASK (1 << 1) 314 314 #define OMAP3430_ST_GPT1_SHIFT 0 ··· 414 410 extern void __iomem *prm_base; 415 411 extern void __iomem *cm_base; 416 412 extern void __iomem *cm2_base; 413 + extern void __iomem *prcm_mpu_base; 414 + 415 + #if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_ARCH_OMAP5) 416 + extern void omap_prm_base_init(void); 417 + extern void omap_cm_base_init(void); 418 + #else 419 + static inline void omap_prm_base_init(void) 420 + { 421 + } 422 + static inline void omap_cm_base_init(void) 423 + { 424 + } 425 + #endif 417 426 418 427 /** 419 428 * struct omap_prcm_irq - describes a PRCM interrupt bit
+8
arch/arm/mach-omap2/prcm.c
··· 42 42 void __iomem *prm_base; 43 43 void __iomem *cm_base; 44 44 void __iomem *cm2_base; 45 + void __iomem *prcm_mpu_base; 45 46 46 47 #define MAX_MODULE_ENABLE_WAIT 100000 47 48 ··· 156 155 cm_base = omap2_globals->cm; 157 156 if (omap2_globals->cm2) 158 157 cm2_base = omap2_globals->cm2; 158 + if (omap2_globals->prcm_mpu) 159 + prcm_mpu_base = omap2_globals->prcm_mpu; 160 + 161 + if (cpu_is_omap44xx()) { 162 + omap_prm_base_init(); 163 + omap_cm_base_init(); 164 + } 159 165 }
+16 -11
arch/arm/mach-omap2/prminst44xx.c
··· 18 18 19 19 #include "iomap.h" 20 20 #include "common.h" 21 + #include "prcm-common.h" 21 22 #include "prm44xx.h" 22 23 #include "prminst44xx.h" 23 24 #include "prm-regbits-44xx.h" 24 25 #include "prcm44xx.h" 25 26 #include "prcm_mpu44xx.h" 26 27 27 - static u32 _prm_bases[OMAP4_MAX_PRCM_PARTITIONS] = { 28 - [OMAP4430_INVALID_PRCM_PARTITION] = 0, 29 - [OMAP4430_PRM_PARTITION] = OMAP4430_PRM_BASE, 30 - [OMAP4430_CM1_PARTITION] = 0, 31 - [OMAP4430_CM2_PARTITION] = 0, 32 - [OMAP4430_SCRM_PARTITION] = 0, 33 - [OMAP4430_PRCM_MPU_PARTITION] = OMAP4430_PRCM_MPU_BASE, 34 - }; 28 + static void __iomem *_prm_bases[OMAP4_MAX_PRCM_PARTITIONS]; 29 + 30 + /** 31 + * omap_prm_base_init - Populates the prm partitions 32 + * 33 + * Populates the base addresses of the _prm_bases 34 + * array used for read/write of prm module registers. 35 + */ 36 + void 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 42 /* Read a register in a PRM instance */ 37 43 u32 omap4_prminst_read_inst_reg(u8 part, s16 inst, u16 idx) ··· 45 39 BUG_ON(part >= OMAP4_MAX_PRCM_PARTITIONS || 46 40 part == OMAP4430_INVALID_PRCM_PARTITION || 47 41 !_prm_bases[part]); 48 - return __raw_readl(OMAP2_L4_IO_ADDRESS(_prm_bases[part] + inst + 49 - idx)); 42 + return __raw_readl(_prm_bases[part] + inst + idx); 50 43 } 51 44 52 45 /* Write into a register in a PRM instance */ ··· 54 49 BUG_ON(part >= OMAP4_MAX_PRCM_PARTITIONS || 55 50 part == OMAP4430_INVALID_PRCM_PARTITION || 56 51 !_prm_bases[part]); 57 - __raw_writel(val, OMAP2_L4_IO_ADDRESS(_prm_bases[part] + inst + idx)); 52 + __raw_writel(val, _prm_bases[part] + inst + idx); 58 53 } 59 54 60 55 /* Read-modify-write a register in PRM. Caller must lock */
-7
arch/arm/mach-omap2/timer.c
··· 178 178 if (IS_ERR(timer->fclk)) 179 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 181 omap_hwmod_enable(oh); 189 182 190 183 sys_timer_reserved |= (1 << (gptimer_id - 1));
+147
arch/arm/mach-omap2/twl-common.c
··· 31 31 32 32 #include "twl-common.h" 33 33 #include "pm.h" 34 + #include "voltage.h" 34 35 35 36 static struct i2c_board_info __initdata pmic_i2c_board_info = { 36 37 .addr = 0x48, ··· 47 46 I2C_BOARD_INFO("twl6040", 0x4b), 48 47 }, 49 48 }; 49 + 50 + static int twl_set_voltage(void *data, int target_uV) 51 + { 52 + struct voltagedomain *voltdm = (struct voltagedomain *)data; 53 + return voltdm_scale(voltdm, target_uV); 54 + } 55 + 56 + static int twl_get_voltage(void *data) 57 + { 58 + struct voltagedomain *voltdm = (struct voltagedomain *)data; 59 + return voltdm_get_voltage(voltdm); 60 + } 50 61 51 62 void __init omap_pmic_init(int bus, u32 clkrate, 52 63 const char *pmic_type, int pmic_irq, ··· 166 153 .consumer_supplies = omap3_vpll2_supplies, 167 154 }; 168 155 156 + static struct regulator_consumer_supply omap3_vdd1_supply[] = { 157 + REGULATOR_SUPPLY("vcc", "mpu.0"), 158 + }; 159 + 160 + static struct regulator_consumer_supply omap3_vdd2_supply[] = { 161 + REGULATOR_SUPPLY("vcc", "l3_main.0"), 162 + }; 163 + 164 + static struct regulator_init_data omap3_vdd1 = { 165 + .constraints = { 166 + .name = "vdd_mpu_iva", 167 + .min_uV = 600000, 168 + .max_uV = 1450000, 169 + .valid_modes_mask = REGULATOR_MODE_NORMAL, 170 + .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE, 171 + }, 172 + .num_consumer_supplies = ARRAY_SIZE(omap3_vdd1_supply), 173 + .consumer_supplies = omap3_vdd1_supply, 174 + }; 175 + 176 + static struct regulator_init_data omap3_vdd2 = { 177 + .constraints = { 178 + .name = "vdd_core", 179 + .min_uV = 600000, 180 + .max_uV = 1450000, 181 + .valid_modes_mask = REGULATOR_MODE_NORMAL, 182 + .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE, 183 + }, 184 + .num_consumer_supplies = ARRAY_SIZE(omap3_vdd2_supply), 185 + .consumer_supplies = omap3_vdd2_supply, 186 + }; 187 + 188 + static struct twl_regulator_driver_data omap3_vdd1_drvdata = { 189 + .get_voltage = twl_get_voltage, 190 + .set_voltage = twl_set_voltage, 191 + }; 192 + 193 + static struct twl_regulator_driver_data omap3_vdd2_drvdata = { 194 + .get_voltage = twl_get_voltage, 195 + .set_voltage = twl_set_voltage, 196 + }; 197 + 169 198 void __init omap3_pmic_get_config(struct twl4030_platform_data *pmic_data, 170 199 u32 pdata_flags, u32 regulators_flags) 171 200 { ··· 215 160 pmic_data->irq_base = TWL4030_IRQ_BASE; 216 161 if (!pmic_data->irq_end) 217 162 pmic_data->irq_end = TWL4030_IRQ_END; 163 + if (!pmic_data->vdd1) { 164 + omap3_vdd1.driver_data = &omap3_vdd1_drvdata; 165 + omap3_vdd1_drvdata.data = voltdm_lookup("mpu_iva"); 166 + pmic_data->vdd1 = &omap3_vdd1; 167 + } 168 + if (!pmic_data->vdd2) { 169 + omap3_vdd2.driver_data = &omap3_vdd2_drvdata; 170 + omap3_vdd2_drvdata.data = voltdm_lookup("core"); 171 + pmic_data->vdd2 = &omap3_vdd2; 172 + } 218 173 219 174 /* Common platform data configurations */ 220 175 if (pdata_flags & TWL_COMMON_PDATA_USB && !pmic_data->usb) ··· 375 310 }, 376 311 }; 377 312 313 + static struct regulator_consumer_supply omap4_vdd1_supply[] = { 314 + REGULATOR_SUPPLY("vcc", "mpu.0"), 315 + }; 316 + 317 + static struct regulator_consumer_supply omap4_vdd2_supply[] = { 318 + REGULATOR_SUPPLY("vcc", "iva.0"), 319 + }; 320 + 321 + static struct regulator_consumer_supply omap4_vdd3_supply[] = { 322 + REGULATOR_SUPPLY("vcc", "l3_main.0"), 323 + }; 324 + 325 + static struct regulator_init_data omap4_vdd1 = { 326 + .constraints = { 327 + .name = "vdd_mpu", 328 + .min_uV = 500000, 329 + .max_uV = 1500000, 330 + .valid_modes_mask = REGULATOR_MODE_NORMAL, 331 + .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE, 332 + }, 333 + .num_consumer_supplies = ARRAY_SIZE(omap4_vdd1_supply), 334 + .consumer_supplies = omap4_vdd1_supply, 335 + }; 336 + 337 + static struct regulator_init_data omap4_vdd2 = { 338 + .constraints = { 339 + .name = "vdd_iva", 340 + .min_uV = 500000, 341 + .max_uV = 1500000, 342 + .valid_modes_mask = REGULATOR_MODE_NORMAL, 343 + .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE, 344 + }, 345 + .num_consumer_supplies = ARRAY_SIZE(omap4_vdd2_supply), 346 + .consumer_supplies = omap4_vdd2_supply, 347 + }; 348 + 349 + static struct regulator_init_data omap4_vdd3 = { 350 + .constraints = { 351 + .name = "vdd_core", 352 + .min_uV = 500000, 353 + .max_uV = 1500000, 354 + .valid_modes_mask = REGULATOR_MODE_NORMAL, 355 + .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE, 356 + }, 357 + .num_consumer_supplies = ARRAY_SIZE(omap4_vdd3_supply), 358 + .consumer_supplies = omap4_vdd3_supply, 359 + }; 360 + 361 + 362 + static struct twl_regulator_driver_data omap4_vdd1_drvdata = { 363 + .get_voltage = twl_get_voltage, 364 + .set_voltage = twl_set_voltage, 365 + }; 366 + 367 + static struct twl_regulator_driver_data omap4_vdd2_drvdata = { 368 + .get_voltage = twl_get_voltage, 369 + .set_voltage = twl_set_voltage, 370 + }; 371 + 372 + static struct twl_regulator_driver_data omap4_vdd3_drvdata = { 373 + .get_voltage = twl_get_voltage, 374 + .set_voltage = twl_set_voltage, 375 + }; 376 + 378 377 void __init omap4_pmic_get_config(struct twl4030_platform_data *pmic_data, 379 378 u32 pdata_flags, u32 regulators_flags) 380 379 { ··· 446 317 pmic_data->irq_base = TWL6030_IRQ_BASE; 447 318 if (!pmic_data->irq_end) 448 319 pmic_data->irq_end = TWL6030_IRQ_END; 320 + 321 + if (!pmic_data->vdd1) { 322 + omap4_vdd1.driver_data = &omap4_vdd1_drvdata; 323 + omap4_vdd1_drvdata.data = voltdm_lookup("mpu"); 324 + pmic_data->vdd1 = &omap4_vdd1; 325 + } 326 + 327 + if (!pmic_data->vdd2) { 328 + omap4_vdd2.driver_data = &omap4_vdd2_drvdata; 329 + omap4_vdd2_drvdata.data = voltdm_lookup("iva"); 330 + pmic_data->vdd2 = &omap4_vdd2; 331 + } 332 + 333 + if (!pmic_data->vdd3) { 334 + omap4_vdd3.driver_data = &omap4_vdd3_drvdata; 335 + omap4_vdd3_drvdata.data = voltdm_lookup("core"); 336 + pmic_data->vdd3 = &omap4_vdd3; 337 + } 449 338 450 339 /* Common platform data configurations */ 451 340 if (pdata_flags & TWL_COMMON_PDATA_USB && !pmic_data->usb)
+1
arch/arm/mach-omap2/vc3xxx_data.c
··· 46 46 }; 47 47 48 48 struct omap_vc_channel omap3_vc_mpu = { 49 + .flags = OMAP_VC_CHANNEL_DEFAULT, 49 50 .common = &omap3_vc_common, 50 51 .smps_sa_reg = OMAP3_PRM_VC_SMPS_SA_OFFSET, 51 52 .smps_volra_reg = OMAP3_PRM_VC_SMPS_VOL_RA_OFFSET,
+18 -3
arch/arm/mach-omap2/voltage.c
··· 73 73 int voltdm_scale(struct voltagedomain *voltdm, 74 74 unsigned long target_volt) 75 75 { 76 - int ret; 76 + int ret, i; 77 + unsigned long volt = 0; 77 78 78 79 if (!voltdm || IS_ERR(voltdm)) { 79 80 pr_warning("%s: VDD specified does not exist!\n", __func__); ··· 87 86 return -ENODATA; 88 87 } 89 88 90 - ret = voltdm->scale(voltdm, target_volt); 89 + /* Adjust voltage to the exact voltage from the OPP table */ 90 + for (i = 0; voltdm->volt_data[i].volt_nominal != 0; i++) { 91 + if (voltdm->volt_data[i].volt_nominal >= target_volt) { 92 + volt = voltdm->volt_data[i].volt_nominal; 93 + break; 94 + } 95 + } 96 + 97 + if (!volt) { 98 + pr_warning("%s: not scaling. OPP voltage for %lu, not found.\n", 99 + __func__, target_volt); 100 + return -EINVAL; 101 + } 102 + 103 + ret = voltdm->scale(voltdm, volt); 91 104 if (!ret) 92 - voltdm->nominal_volt = target_volt; 105 + voltdm->nominal_volt = volt; 93 106 94 107 return ret; 95 108 }
+45
arch/arm/mach-omap2/wd_timer.c
··· 14 14 #include <plat/omap_hwmod.h> 15 15 16 16 #include "wd_timer.h" 17 + #include "common.h" 17 18 18 19 /* 19 20 * In order to avoid any assumptions from bootloader regarding WDT ··· 26 25 #define OMAP_WDT_WPS 0x34 27 26 #define OMAP_WDT_SPR 0x48 28 27 28 + /* Maximum microseconds to wait for OMAP module to softreset */ 29 + #define MAX_MODULE_SOFTRESET_WAIT 10000 29 30 30 31 int omap2_wd_timer_disable(struct omap_hwmod *oh) 31 32 { ··· 57 54 return 0; 58 55 } 59 56 57 + /** 58 + * omap2_wdtimer_reset - reset and disable the WDTIMER IP block 59 + * @oh: struct omap_hwmod * 60 + * 61 + * After the WDTIMER IP blocks are reset on OMAP2/3, we must also take 62 + * care to execute the special watchdog disable sequence. This is 63 + * because the watchdog is re-armed upon OCP softreset. (On OMAP4, 64 + * this behavior was apparently changed and the watchdog is no longer 65 + * re-armed after an OCP soft-reset.) Returns -ETIMEDOUT if the reset 66 + * did not complete, or 0 upon success. 67 + * 68 + * XXX Most of this code should be moved to the omap_hwmod.c layer 69 + * during a normal merge window. omap_hwmod_softreset() should be 70 + * renamed to omap_hwmod_set_ocp_softreset(), and omap_hwmod_softreset() 71 + * should call the hwmod _ocp_softreset() code. 72 + */ 73 + int omap2_wd_timer_reset(struct omap_hwmod *oh) 74 + { 75 + int c = 0; 76 + 77 + /* Write to the SOFTRESET bit */ 78 + omap_hwmod_softreset(oh); 79 + 80 + /* Poll on RESETDONE bit */ 81 + omap_test_timeout((omap_hwmod_read(oh, 82 + oh->class->sysc->syss_offs) 83 + & SYSS_RESETDONE_MASK), 84 + MAX_MODULE_SOFTRESET_WAIT, c); 85 + 86 + if (oh->class->sysc->srst_udelay) 87 + udelay(oh->class->sysc->srst_udelay); 88 + 89 + if (c == MAX_MODULE_SOFTRESET_WAIT) 90 + pr_warning("%s: %s: softreset failed (waited %d usec)\n", 91 + __func__, oh->name, MAX_MODULE_SOFTRESET_WAIT); 92 + else 93 + pr_debug("%s: %s: softreset in %d usec\n", __func__, 94 + oh->name, c); 95 + 96 + return (c == MAX_MODULE_SOFTRESET_WAIT) ? -ETIMEDOUT : 97 + omap2_wd_timer_disable(oh); 98 + }
+1
arch/arm/mach-omap2/wd_timer.h
··· 13 13 #include <plat/omap_hwmod.h> 14 14 15 15 extern int omap2_wd_timer_disable(struct omap_hwmod *oh); 16 + extern int omap2_wd_timer_reset(struct omap_hwmod *oh); 16 17 17 18 #endif
+1
arch/arm/mach-ux500/Makefile
··· 4 4 5 5 obj-y := clock.o cpu.o devices.o devices-common.o \ 6 6 id.o usb.o timer.o 7 + obj-$(CONFIG_CPU_IDLE) += cpuidle.o 7 8 obj-$(CONFIG_CACHE_L2X0) += cache-l2x0.o 8 9 obj-$(CONFIG_UX500_SOC_DB8500) += cpu-db8500.o devices-db8500.o 9 10 obj-$(CONFIG_MACH_MOP500) += board-mop500.o board-mop500-sdi.o \
+171
arch/arm/mach-ux500/cpuidle.c
··· 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 + 23 + static atomic_t master = ATOMIC_INIT(0); 24 + static DEFINE_SPINLOCK(master_lock); 25 + static DEFINE_PER_CPU(struct cpuidle_device, ux500_cpuidle_device); 26 + 27 + static 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 + } 82 + wfi: 83 + cpu_do_idle(); 84 + out: 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 + 97 + static 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 + */ 120 + static 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 + 126 + int __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 + } 158 + out: 159 + return ret; 160 + 161 + out_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 + 171 + device_initcall(ux500_idle_init);
+24
arch/arm/mm/cache-tauros2.c
··· 108 108 109 109 dsb(); 110 110 } 111 + 112 + static 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 + 122 + static 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 131 #endif 112 132 113 133 static inline u32 __init read_extra_features(void) ··· 214 194 outer_cache.inv_range = tauros2_inv_range; 215 195 outer_cache.clean_range = tauros2_clean_range; 216 196 outer_cache.flush_range = tauros2_flush_range; 197 + outer_cache.disable = tauros2_disable; 198 + outer_cache.resume = tauros2_resume; 217 199 } 218 200 #endif 219 201 ··· 241 219 outer_cache.inv_range = tauros2_inv_range; 242 220 outer_cache.clean_range = tauros2_clean_range; 243 221 outer_cache.flush_range = tauros2_flush_range; 222 + outer_cache.disable = tauros2_disable; 223 + outer_cache.resume = tauros2_resume; 244 224 } 245 225 #endif 246 226
+35
arch/arm/mm/proc-mohawk.S
··· 345 345 mcr p15, 0, r0, c7, c10, 4 @ drain WB 346 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 351 + ENTRY(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} 362 + ENDPROC(cpu_mohawk_do_suspend) 363 + 364 + ENTRY(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 380 + ENDPROC(cpu_mohawk_do_resume) 381 + #endif 382 + 348 383 __CPUINIT 349 384 350 385 .type __mohawk_setup, #function
+1 -3
arch/arm/plat-omap/include/plat/clkdev_omap.h
··· 34 34 #define CK_243X (1 << 5) /* 243x, 253x */ 35 35 #define CK_3430ES1 (1 << 6) /* 34xxES1 only */ 36 36 #define CK_3430ES2PLUS (1 << 7) /* 34xxES2, ES3, non-Sitara 35xx only */ 37 - #define CK_3505 (1 << 8) 38 - #define CK_3517 (1 << 9) 37 + #define CK_AM35XX (1 << 9) /* Sitara AM35xx */ 39 38 #define CK_36XX (1 << 10) /* 36xx/37xx-specific clocks */ 40 39 #define CK_443X (1 << 11) 41 40 #define CK_TI816X (1 << 12) ··· 43 44 44 45 45 46 #define CK_34XX (CK_3430ES1 | CK_3430ES2PLUS) 46 - #define CK_AM35XX (CK_3505 | CK_3517) /* all Sitara AM35xx */ 47 47 #define CK_3XXX (CK_34XX | CK_AM35XX | CK_36XX) 48 48 49 49
+1 -1
arch/arm/plat-omap/include/plat/dmtimer.h
··· 259 259 unsigned long phys_base; 260 260 int id; 261 261 int irq; 262 - struct clk *iclk, *fclk; 262 + struct clk *fclk; 263 263 264 264 void __iomem *io_base; 265 265 void __iomem *sys_stat; /* TISTAT timer status */
+36
arch/arm/plat-omap/include/plat/hdq1w.h
··· 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 + 34 + extern int omap_hdq1w_reset(struct omap_hwmod *oh); 35 + 36 + #endif
+4
arch/arm/plat-omap/include/plat/mmc.h
··· 16 16 #include <linux/mmc/host.h> 17 17 18 18 #include <plat/board.h> 19 + #include <plat/omap_hwmod.h> 19 20 20 21 #define OMAP15XX_NR_MMC 1 21 22 #define OMAP16XX_NR_MMC 2 ··· 196 195 } 197 196 198 197 #endif 198 + 199 + extern int omap_msdi_reset(struct omap_hwmod *oh); 200 + 199 201 #endif
+1
arch/arm/plat-omap/include/plat/omap_hwmod.h
··· 214 214 #define OCP_USER_MPU (1 << 0) 215 215 #define OCP_USER_SDMA (1 << 1) 216 216 #define OCP_USER_DSP (1 << 2) 217 + #define OCP_USER_IVA (1 << 3) 217 218 218 219 /* omap_hwmod_ocp_if.flags bits */ 219 220 #define OCPIF_SWSUP_IDLE (1 << 0)