diff options
| -rw-r--r-- | arch/arm/mach-davinci/board-da850-evm.c | 28 | ||||
| -rw-r--r-- | arch/arm/mach-davinci/include/mach/psc.h | 2 | ||||
| -rw-r--r-- | arch/arm/mach-davinci/sleep.S | 6 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/clock3xxx_data.c | 2 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/clock44xx_data.c | 10 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/clockdomain.c | 2 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/omap_hwmod_2430_data.c | 1 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/pm.c | 2 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/powerdomain.c | 25 |
9 files changed, 64 insertions, 14 deletions
diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c index bd5394537c88..008d51407cd7 100644 --- a/arch/arm/mach-davinci/board-da850-evm.c +++ b/arch/arm/mach-davinci/board-da850-evm.c | |||
| @@ -115,6 +115,32 @@ static struct spi_board_info da850evm_spi_info[] = { | |||
| 115 | }, | 115 | }, |
| 116 | }; | 116 | }; |
| 117 | 117 | ||
| 118 | #ifdef CONFIG_MTD | ||
| 119 | static void da850_evm_m25p80_notify_add(struct mtd_info *mtd) | ||
| 120 | { | ||
| 121 | char *mac_addr = davinci_soc_info.emac_pdata->mac_addr; | ||
| 122 | size_t retlen; | ||
| 123 | |||
| 124 | if (!strcmp(mtd->name, "MAC-Address")) { | ||
| 125 | mtd->read(mtd, 0, ETH_ALEN, &retlen, mac_addr); | ||
| 126 | if (retlen == ETH_ALEN) | ||
| 127 | pr_info("Read MAC addr from SPI Flash: %pM\n", | ||
| 128 | mac_addr); | ||
| 129 | } | ||
| 130 | } | ||
| 131 | |||
| 132 | static struct mtd_notifier da850evm_spi_notifier = { | ||
| 133 | .add = da850_evm_m25p80_notify_add, | ||
| 134 | }; | ||
| 135 | |||
| 136 | static void da850_evm_setup_mac_addr(void) | ||
| 137 | { | ||
| 138 | register_mtd_user(&da850evm_spi_notifier); | ||
| 139 | } | ||
| 140 | #else | ||
| 141 | static void da850_evm_setup_mac_addr(void) { } | ||
| 142 | #endif | ||
| 143 | |||
| 118 | static struct mtd_partition da850_evm_norflash_partition[] = { | 144 | static struct mtd_partition da850_evm_norflash_partition[] = { |
| 119 | { | 145 | { |
| 120 | .name = "bootloaders + env", | 146 | .name = "bootloaders + env", |
| @@ -1244,6 +1270,8 @@ static __init void da850_evm_init(void) | |||
| 1244 | if (ret) | 1270 | if (ret) |
| 1245 | pr_warning("da850_evm_init: sata registration failed: %d\n", | 1271 | pr_warning("da850_evm_init: sata registration failed: %d\n", |
| 1246 | ret); | 1272 | ret); |
| 1273 | |||
| 1274 | da850_evm_setup_mac_addr(); | ||
| 1247 | } | 1275 | } |
| 1248 | 1276 | ||
| 1249 | #ifdef CONFIG_SERIAL_8250_CONSOLE | 1277 | #ifdef CONFIG_SERIAL_8250_CONSOLE |
diff --git a/arch/arm/mach-davinci/include/mach/psc.h b/arch/arm/mach-davinci/include/mach/psc.h index 47fd0bc3d3e7..fa59c097223d 100644 --- a/arch/arm/mach-davinci/include/mach/psc.h +++ b/arch/arm/mach-davinci/include/mach/psc.h | |||
| @@ -243,7 +243,7 @@ | |||
| 243 | #define PSC_STATE_DISABLE 2 | 243 | #define PSC_STATE_DISABLE 2 |
| 244 | #define PSC_STATE_ENABLE 3 | 244 | #define PSC_STATE_ENABLE 3 |
| 245 | 245 | ||
| 246 | #define MDSTAT_STATE_MASK 0x1f | 246 | #define MDSTAT_STATE_MASK 0x3f |
| 247 | #define MDCTL_FORCE BIT(31) | 247 | #define MDCTL_FORCE BIT(31) |
| 248 | 248 | ||
| 249 | #ifndef __ASSEMBLER__ | 249 | #ifndef __ASSEMBLER__ |
diff --git a/arch/arm/mach-davinci/sleep.S b/arch/arm/mach-davinci/sleep.S index fb5e72b532b0..5f1e045a3ad1 100644 --- a/arch/arm/mach-davinci/sleep.S +++ b/arch/arm/mach-davinci/sleep.S | |||
| @@ -217,7 +217,11 @@ ddr2clk_stop_done: | |||
| 217 | ENDPROC(davinci_ddr_psc_config) | 217 | ENDPROC(davinci_ddr_psc_config) |
| 218 | 218 | ||
| 219 | CACHE_FLUSH: | 219 | CACHE_FLUSH: |
| 220 | .word arm926_flush_kern_cache_all | 220 | #ifdef CONFIG_CPU_V6 |
| 221 | .word v6_flush_kern_cache_all | ||
| 222 | #else | ||
| 223 | .word arm926_flush_kern_cache_all | ||
| 224 | #endif | ||
| 221 | 225 | ||
| 222 | ENTRY(davinci_cpu_suspend_sz) | 226 | ENTRY(davinci_cpu_suspend_sz) |
| 223 | .word . - davinci_cpu_suspend | 227 | .word . - davinci_cpu_suspend |
diff --git a/arch/arm/mach-omap2/clock3xxx_data.c b/arch/arm/mach-omap2/clock3xxx_data.c index ffd55b1c4396..b9b844683147 100644 --- a/arch/arm/mach-omap2/clock3xxx_data.c +++ b/arch/arm/mach-omap2/clock3xxx_data.c | |||
| @@ -3078,6 +3078,7 @@ static struct clk gpt12_fck = { | |||
| 3078 | .name = "gpt12_fck", | 3078 | .name = "gpt12_fck", |
| 3079 | .ops = &clkops_null, | 3079 | .ops = &clkops_null, |
| 3080 | .parent = &secure_32k_fck, | 3080 | .parent = &secure_32k_fck, |
| 3081 | .clkdm_name = "wkup_clkdm", | ||
| 3081 | .recalc = &followparent_recalc, | 3082 | .recalc = &followparent_recalc, |
| 3082 | }; | 3083 | }; |
| 3083 | 3084 | ||
| @@ -3085,6 +3086,7 @@ static struct clk wdt1_fck = { | |||
| 3085 | .name = "wdt1_fck", | 3086 | .name = "wdt1_fck", |
| 3086 | .ops = &clkops_null, | 3087 | .ops = &clkops_null, |
| 3087 | .parent = &secure_32k_fck, | 3088 | .parent = &secure_32k_fck, |
| 3089 | .clkdm_name = "wkup_clkdm", | ||
| 3088 | .recalc = &followparent_recalc, | 3090 | .recalc = &followparent_recalc, |
| 3089 | }; | 3091 | }; |
| 3090 | 3092 | ||
diff --git a/arch/arm/mach-omap2/clock44xx_data.c b/arch/arm/mach-omap2/clock44xx_data.c index 2af0e3f00ce1..c0b6fbda3408 100644 --- a/arch/arm/mach-omap2/clock44xx_data.c +++ b/arch/arm/mach-omap2/clock44xx_data.c | |||
| @@ -3376,10 +3376,18 @@ int __init omap4xxx_clk_init(void) | |||
| 3376 | } else if (cpu_is_omap446x()) { | 3376 | } else if (cpu_is_omap446x()) { |
| 3377 | cpu_mask = RATE_IN_4460; | 3377 | cpu_mask = RATE_IN_4460; |
| 3378 | cpu_clkflg = CK_446X; | 3378 | cpu_clkflg = CK_446X; |
| 3379 | } else { | ||
| 3380 | return 0; | ||
| 3379 | } | 3381 | } |
| 3380 | 3382 | ||
| 3381 | clk_init(&omap2_clk_functions); | 3383 | clk_init(&omap2_clk_functions); |
| 3382 | omap2_clk_disable_clkdm_control(); | 3384 | |
| 3385 | /* | ||
| 3386 | * Must stay commented until all OMAP SoC drivers are | ||
| 3387 | * converted to runtime PM, or drivers may start crashing | ||
| 3388 | * | ||
| 3389 | * omap2_clk_disable_clkdm_control(); | ||
| 3390 | */ | ||
| 3383 | 3391 | ||
| 3384 | for (c = omap44xx_clks; c < omap44xx_clks + ARRAY_SIZE(omap44xx_clks); | 3392 | for (c = omap44xx_clks; c < omap44xx_clks + ARRAY_SIZE(omap44xx_clks); |
| 3385 | c++) | 3393 | c++) |
diff --git a/arch/arm/mach-omap2/clockdomain.c b/arch/arm/mach-omap2/clockdomain.c index ab7db083f97f..8f0890685d7b 100644 --- a/arch/arm/mach-omap2/clockdomain.c +++ b/arch/arm/mach-omap2/clockdomain.c | |||
| @@ -747,6 +747,7 @@ int clkdm_wakeup(struct clockdomain *clkdm) | |||
| 747 | spin_lock_irqsave(&clkdm->lock, flags); | 747 | spin_lock_irqsave(&clkdm->lock, flags); |
| 748 | clkdm->_flags &= ~_CLKDM_FLAG_HWSUP_ENABLED; | 748 | clkdm->_flags &= ~_CLKDM_FLAG_HWSUP_ENABLED; |
| 749 | ret = arch_clkdm->clkdm_wakeup(clkdm); | 749 | ret = arch_clkdm->clkdm_wakeup(clkdm); |
| 750 | ret |= pwrdm_state_switch(clkdm->pwrdm.ptr); | ||
| 750 | spin_unlock_irqrestore(&clkdm->lock, flags); | 751 | spin_unlock_irqrestore(&clkdm->lock, flags); |
| 751 | return ret; | 752 | return ret; |
| 752 | } | 753 | } |
| @@ -818,6 +819,7 @@ void clkdm_deny_idle(struct clockdomain *clkdm) | |||
| 818 | spin_lock_irqsave(&clkdm->lock, flags); | 819 | spin_lock_irqsave(&clkdm->lock, flags); |
| 819 | clkdm->_flags &= ~_CLKDM_FLAG_HWSUP_ENABLED; | 820 | clkdm->_flags &= ~_CLKDM_FLAG_HWSUP_ENABLED; |
| 820 | arch_clkdm->clkdm_deny_idle(clkdm); | 821 | arch_clkdm->clkdm_deny_idle(clkdm); |
| 822 | pwrdm_state_switch(clkdm->pwrdm.ptr); | ||
| 821 | spin_unlock_irqrestore(&clkdm->lock, flags); | 823 | spin_unlock_irqrestore(&clkdm->lock, flags); |
| 822 | } | 824 | } |
| 823 | 825 | ||
diff --git a/arch/arm/mach-omap2/omap_hwmod_2430_data.c b/arch/arm/mach-omap2/omap_hwmod_2430_data.c index 16743c7d6e8e..408193d8e044 100644 --- a/arch/arm/mach-omap2/omap_hwmod_2430_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_2430_data.c | |||
| @@ -192,6 +192,7 @@ static struct omap_hwmod_addr_space omap2430_usbhsotg_addrs[] = { | |||
| 192 | .pa_end = OMAP243X_HS_BASE + SZ_4K - 1, | 192 | .pa_end = OMAP243X_HS_BASE + SZ_4K - 1, |
| 193 | .flags = ADDR_TYPE_RT | 193 | .flags = ADDR_TYPE_RT |
| 194 | }, | 194 | }, |
| 195 | { } | ||
| 195 | }; | 196 | }; |
| 196 | 197 | ||
| 197 | /* l4_core ->usbhsotg interface */ | 198 | /* l4_core ->usbhsotg interface */ |
diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c index 3feb35911a32..472bf22d5e84 100644 --- a/arch/arm/mach-omap2/pm.c +++ b/arch/arm/mach-omap2/pm.c | |||
| @@ -130,7 +130,6 @@ int omap_set_pwrdm_state(struct powerdomain *pwrdm, u32 state) | |||
| 130 | } else { | 130 | } else { |
| 131 | hwsup = clkdm_in_hwsup(pwrdm->pwrdm_clkdms[0]); | 131 | hwsup = clkdm_in_hwsup(pwrdm->pwrdm_clkdms[0]); |
| 132 | clkdm_wakeup(pwrdm->pwrdm_clkdms[0]); | 132 | clkdm_wakeup(pwrdm->pwrdm_clkdms[0]); |
| 133 | pwrdm_wait_transition(pwrdm); | ||
| 134 | sleep_switch = FORCEWAKEUP_SWITCH; | 133 | sleep_switch = FORCEWAKEUP_SWITCH; |
| 135 | } | 134 | } |
| 136 | } | 135 | } |
| @@ -156,7 +155,6 @@ int omap_set_pwrdm_state(struct powerdomain *pwrdm, u32 state) | |||
| 156 | return ret; | 155 | return ret; |
| 157 | } | 156 | } |
| 158 | 157 | ||
| 159 | pwrdm_wait_transition(pwrdm); | ||
| 160 | pwrdm_state_switch(pwrdm); | 158 | pwrdm_state_switch(pwrdm); |
| 161 | err: | 159 | err: |
| 162 | return ret; | 160 | return ret; |
diff --git a/arch/arm/mach-omap2/powerdomain.c b/arch/arm/mach-omap2/powerdomain.c index 9af08473bf10..ef71fdd40fc4 100644 --- a/arch/arm/mach-omap2/powerdomain.c +++ b/arch/arm/mach-omap2/powerdomain.c | |||
| @@ -195,28 +195,35 @@ static int _pwrdm_post_transition_cb(struct powerdomain *pwrdm, void *unused) | |||
| 195 | 195 | ||
| 196 | /** | 196 | /** |
| 197 | * pwrdm_init - set up the powerdomain layer | 197 | * pwrdm_init - set up the powerdomain layer |
| 198 | * @pwrdm_list: array of struct powerdomain pointers to register | 198 | * @pwrdms: array of struct powerdomain pointers to register |
| 199 | * @custom_funcs: func pointers for arch specific implementations | 199 | * @custom_funcs: func pointers for arch specific implementations |
| 200 | * | 200 | * |
| 201 | * Loop through the array of powerdomains @pwrdm_list, registering all | 201 | * Loop through the array of powerdomains @pwrdms, registering all |
| 202 | * that are available on the current CPU. If pwrdm_list is supplied | 202 | * that are available on the current CPU. Also, program all |
| 203 | * and not null, all of the referenced powerdomains will be | 203 | * powerdomain target state as ON; this is to prevent domains from |
| 204 | * registered. No return value. XXX pwrdm_list is not really a | 204 | * hitting low power states (if bootloader has target states set to |
| 205 | * "list"; it is an array. Rename appropriately. | 205 | * something other than ON) and potentially even losing context while |
| 206 | * PM is not fully initialized. The PM late init code can then program | ||
| 207 | * the desired target state for all the power domains. No return | ||
| 208 | * value. | ||
| 206 | */ | 209 | */ |
| 207 | void pwrdm_init(struct powerdomain **pwrdm_list, struct pwrdm_ops *custom_funcs) | 210 | void pwrdm_init(struct powerdomain **pwrdms, struct pwrdm_ops *custom_funcs) |
| 208 | { | 211 | { |
| 209 | struct powerdomain **p = NULL; | 212 | struct powerdomain **p = NULL; |
| 213 | struct powerdomain *temp_p; | ||
| 210 | 214 | ||
| 211 | if (!custom_funcs) | 215 | if (!custom_funcs) |
| 212 | WARN(1, "powerdomain: No custom pwrdm functions registered\n"); | 216 | WARN(1, "powerdomain: No custom pwrdm functions registered\n"); |
| 213 | else | 217 | else |
| 214 | arch_pwrdm = custom_funcs; | 218 | arch_pwrdm = custom_funcs; |
| 215 | 219 | ||
| 216 | if (pwrdm_list) { | 220 | if (pwrdms) { |
| 217 | for (p = pwrdm_list; *p; p++) | 221 | for (p = pwrdms; *p; p++) |
| 218 | _pwrdm_register(*p); | 222 | _pwrdm_register(*p); |
| 219 | } | 223 | } |
| 224 | |||
| 225 | list_for_each_entry(temp_p, &pwrdm_list, node) | ||
| 226 | pwrdm_set_next_pwrst(temp_p, PWRDM_POWER_ON); | ||
| 220 | } | 227 | } |
| 221 | 228 | ||
| 222 | /** | 229 | /** |
