diff options
Diffstat (limited to 'arch/arm/mach-omap2')
-rw-r--r-- | arch/arm/mach-omap2/board-devkit8000.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-omap2/include/mach/vmalloc.h | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap2/omap-hotplug.c | 14 | ||||
-rw-r--r-- | arch/arm/mach-omap2/omap-smp.c | 66 | ||||
-rw-r--r-- | arch/arm/mach-omap2/pm24xx.c | 7 | ||||
-rw-r--r-- | arch/arm/mach-omap2/pm34xx.c | 10 | ||||
-rw-r--r-- | arch/arm/mach-omap2/serial.c | 7 |
7 files changed, 40 insertions, 69 deletions
diff --git a/arch/arm/mach-omap2/board-devkit8000.c b/arch/arm/mach-omap2/board-devkit8000.c index 067f4379c87f..53ac762518bd 100644 --- a/arch/arm/mach-omap2/board-devkit8000.c +++ b/arch/arm/mach-omap2/board-devkit8000.c | |||
@@ -242,9 +242,6 @@ static int devkit8000_twl_gpio_setup(struct device *dev, | |||
242 | mmc[0].gpio_cd = gpio + 0; | 242 | mmc[0].gpio_cd = gpio + 0; |
243 | omap2_hsmmc_init(mmc); | 243 | omap2_hsmmc_init(mmc); |
244 | 244 | ||
245 | /* link regulators to MMC adapters */ | ||
246 | devkit8000_vmmc1_supply.dev = mmc[0].dev; | ||
247 | |||
248 | /* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */ | 245 | /* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */ |
249 | gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1; | 246 | gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1; |
250 | 247 | ||
diff --git a/arch/arm/mach-omap2/include/mach/vmalloc.h b/arch/arm/mach-omap2/include/mach/vmalloc.h index 4da31e997efe..866319947760 100644 --- a/arch/arm/mach-omap2/include/mach/vmalloc.h +++ b/arch/arm/mach-omap2/include/mach/vmalloc.h | |||
@@ -17,4 +17,4 @@ | |||
17 | * along with this program; if not, write to the Free Software | 17 | * along with this program; if not, write to the Free Software |
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
19 | */ | 19 | */ |
20 | #define VMALLOC_END 0xf8000000 | 20 | #define VMALLOC_END 0xf8000000UL |
diff --git a/arch/arm/mach-omap2/omap-hotplug.c b/arch/arm/mach-omap2/omap-hotplug.c index 6cee456ca542..4976b9393e49 100644 --- a/arch/arm/mach-omap2/omap-hotplug.c +++ b/arch/arm/mach-omap2/omap-hotplug.c | |||
@@ -17,16 +17,13 @@ | |||
17 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
18 | #include <linux/errno.h> | 18 | #include <linux/errno.h> |
19 | #include <linux/smp.h> | 19 | #include <linux/smp.h> |
20 | #include <linux/completion.h> | ||
21 | 20 | ||
22 | #include <asm/cacheflush.h> | 21 | #include <asm/cacheflush.h> |
23 | #include <mach/omap4-common.h> | 22 | #include <mach/omap4-common.h> |
24 | 23 | ||
25 | static DECLARE_COMPLETION(cpu_killed); | ||
26 | |||
27 | int platform_cpu_kill(unsigned int cpu) | 24 | int platform_cpu_kill(unsigned int cpu) |
28 | { | 25 | { |
29 | return wait_for_completion_timeout(&cpu_killed, 5000); | 26 | return 1; |
30 | } | 27 | } |
31 | 28 | ||
32 | /* | 29 | /* |
@@ -35,15 +32,6 @@ int platform_cpu_kill(unsigned int cpu) | |||
35 | */ | 32 | */ |
36 | void platform_cpu_die(unsigned int cpu) | 33 | void platform_cpu_die(unsigned int cpu) |
37 | { | 34 | { |
38 | unsigned int this_cpu = hard_smp_processor_id(); | ||
39 | |||
40 | if (cpu != this_cpu) { | ||
41 | pr_crit("platform_cpu_die running on %u, should be %u\n", | ||
42 | this_cpu, cpu); | ||
43 | BUG(); | ||
44 | } | ||
45 | pr_notice("CPU%u: shutdown\n", cpu); | ||
46 | complete(&cpu_killed); | ||
47 | flush_cache_all(); | 35 | flush_cache_all(); |
48 | dsb(); | 36 | dsb(); |
49 | 37 | ||
diff --git a/arch/arm/mach-omap2/omap-smp.c b/arch/arm/mach-omap2/omap-smp.c index 9e9f70e18e3c..9fed631ba046 100644 --- a/arch/arm/mach-omap2/omap-smp.c +++ b/arch/arm/mach-omap2/omap-smp.c | |||
@@ -21,7 +21,6 @@ | |||
21 | #include <linux/io.h> | 21 | #include <linux/io.h> |
22 | 22 | ||
23 | #include <asm/cacheflush.h> | 23 | #include <asm/cacheflush.h> |
24 | #include <asm/localtimer.h> | ||
25 | #include <asm/smp_scu.h> | 24 | #include <asm/smp_scu.h> |
26 | #include <mach/hardware.h> | 25 | #include <mach/hardware.h> |
27 | #include <mach/omap4-common.h> | 26 | #include <mach/omap4-common.h> |
@@ -29,22 +28,10 @@ | |||
29 | /* SCU base address */ | 28 | /* SCU base address */ |
30 | static void __iomem *scu_base; | 29 | static void __iomem *scu_base; |
31 | 30 | ||
32 | /* | ||
33 | * Use SCU config register to count number of cores | ||
34 | */ | ||
35 | static inline unsigned int get_core_count(void) | ||
36 | { | ||
37 | if (scu_base) | ||
38 | return scu_get_core_count(scu_base); | ||
39 | return 1; | ||
40 | } | ||
41 | |||
42 | static DEFINE_SPINLOCK(boot_lock); | 31 | static DEFINE_SPINLOCK(boot_lock); |
43 | 32 | ||
44 | void __cpuinit platform_secondary_init(unsigned int cpu) | 33 | void __cpuinit platform_secondary_init(unsigned int cpu) |
45 | { | 34 | { |
46 | trace_hardirqs_off(); | ||
47 | |||
48 | /* | 35 | /* |
49 | * If any interrupts are already enabled for the primary | 36 | * If any interrupts are already enabled for the primary |
50 | * core (e.g. timer irq), then they will not have been enabled | 37 | * core (e.g. timer irq), then they will not have been enabled |
@@ -76,7 +63,7 @@ int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle) | |||
76 | omap_modify_auxcoreboot0(0x200, 0xfffffdff); | 63 | omap_modify_auxcoreboot0(0x200, 0xfffffdff); |
77 | flush_cache_all(); | 64 | flush_cache_all(); |
78 | smp_wmb(); | 65 | smp_wmb(); |
79 | smp_cross_call(cpumask_of(cpu)); | 66 | smp_cross_call(cpumask_of(cpu), 1); |
80 | 67 | ||
81 | /* | 68 | /* |
82 | * Now the secondary core is starting up let it run its | 69 | * Now the secondary core is starting up let it run its |
@@ -118,25 +105,9 @@ void __init smp_init_cpus(void) | |||
118 | scu_base = ioremap(OMAP44XX_SCU_BASE, SZ_256); | 105 | scu_base = ioremap(OMAP44XX_SCU_BASE, SZ_256); |
119 | BUG_ON(!scu_base); | 106 | BUG_ON(!scu_base); |
120 | 107 | ||
121 | ncores = get_core_count(); | 108 | ncores = scu_get_core_count(scu_base); |
122 | |||
123 | for (i = 0; i < ncores; i++) | ||
124 | set_cpu_possible(i, true); | ||
125 | } | ||
126 | |||
127 | void __init smp_prepare_cpus(unsigned int max_cpus) | ||
128 | { | ||
129 | unsigned int ncores = get_core_count(); | ||
130 | unsigned int cpu = smp_processor_id(); | ||
131 | int i; | ||
132 | 109 | ||
133 | /* sanity check */ | 110 | /* sanity check */ |
134 | if (ncores == 0) { | ||
135 | printk(KERN_ERR | ||
136 | "OMAP4: strange core count of 0? Default to 1\n"); | ||
137 | ncores = 1; | ||
138 | } | ||
139 | |||
140 | if (ncores > NR_CPUS) { | 111 | if (ncores > NR_CPUS) { |
141 | printk(KERN_WARNING | 112 | printk(KERN_WARNING |
142 | "OMAP4: no. of cores (%d) greater than configured " | 113 | "OMAP4: no. of cores (%d) greater than configured " |
@@ -144,13 +115,14 @@ void __init smp_prepare_cpus(unsigned int max_cpus) | |||
144 | ncores, NR_CPUS); | 115 | ncores, NR_CPUS); |
145 | ncores = NR_CPUS; | 116 | ncores = NR_CPUS; |
146 | } | 117 | } |
147 | smp_store_cpu_info(cpu); | ||
148 | 118 | ||
149 | /* | 119 | for (i = 0; i < ncores; i++) |
150 | * are we trying to boot more cores than exist? | 120 | set_cpu_possible(i, true); |
151 | */ | 121 | } |
152 | if (max_cpus > ncores) | 122 | |
153 | max_cpus = ncores; | 123 | void __init platform_smp_prepare_cpus(unsigned int max_cpus) |
124 | { | ||
125 | int i; | ||
154 | 126 | ||
155 | /* | 127 | /* |
156 | * Initialise the present map, which describes the set of CPUs | 128 | * Initialise the present map, which describes the set of CPUs |
@@ -159,18 +131,10 @@ void __init smp_prepare_cpus(unsigned int max_cpus) | |||
159 | for (i = 0; i < max_cpus; i++) | 131 | for (i = 0; i < max_cpus; i++) |
160 | set_cpu_present(i, true); | 132 | set_cpu_present(i, true); |
161 | 133 | ||
162 | if (max_cpus > 1) { | 134 | /* |
163 | /* | 135 | * Initialise the SCU and wake up the secondary core using |
164 | * Enable the local timer or broadcast device for the | 136 | * wakeup_secondary(). |
165 | * boot CPU, but only if we have more than one CPU. | 137 | */ |
166 | */ | 138 | scu_enable(scu_base); |
167 | percpu_timer_setup(); | 139 | wakeup_secondary(); |
168 | |||
169 | /* | ||
170 | * Initialise the SCU and wake up the secondary core using | ||
171 | * wakeup_secondary(). | ||
172 | */ | ||
173 | scu_enable(scu_base); | ||
174 | wakeup_secondary(); | ||
175 | } | ||
176 | } | 140 | } |
diff --git a/arch/arm/mach-omap2/pm24xx.c b/arch/arm/mach-omap2/pm24xx.c index a40457d81927..c85923e56b85 100644 --- a/arch/arm/mach-omap2/pm24xx.c +++ b/arch/arm/mach-omap2/pm24xx.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/irq.h> | 30 | #include <linux/irq.h> |
31 | #include <linux/time.h> | 31 | #include <linux/time.h> |
32 | #include <linux/gpio.h> | 32 | #include <linux/gpio.h> |
33 | #include <linux/console.h> | ||
33 | 34 | ||
34 | #include <asm/mach/time.h> | 35 | #include <asm/mach/time.h> |
35 | #include <asm/mach/irq.h> | 36 | #include <asm/mach/irq.h> |
@@ -118,6 +119,10 @@ static void omap2_enter_full_retention(void) | |||
118 | if (omap_irq_pending()) | 119 | if (omap_irq_pending()) |
119 | goto no_sleep; | 120 | goto no_sleep; |
120 | 121 | ||
122 | /* Block console output in case it is on one of the OMAP UARTs */ | ||
123 | if (try_acquire_console_sem()) | ||
124 | goto no_sleep; | ||
125 | |||
121 | omap_uart_prepare_idle(0); | 126 | omap_uart_prepare_idle(0); |
122 | omap_uart_prepare_idle(1); | 127 | omap_uart_prepare_idle(1); |
123 | omap_uart_prepare_idle(2); | 128 | omap_uart_prepare_idle(2); |
@@ -131,6 +136,8 @@ static void omap2_enter_full_retention(void) | |||
131 | omap_uart_resume_idle(1); | 136 | omap_uart_resume_idle(1); |
132 | omap_uart_resume_idle(0); | 137 | omap_uart_resume_idle(0); |
133 | 138 | ||
139 | release_console_sem(); | ||
140 | |||
134 | no_sleep: | 141 | no_sleep: |
135 | if (omap2_pm_debug) { | 142 | if (omap2_pm_debug) { |
136 | unsigned long long tmp; | 143 | unsigned long long tmp; |
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c index 75c0cd13ad8e..0ec8a04b7473 100644 --- a/arch/arm/mach-omap2/pm34xx.c +++ b/arch/arm/mach-omap2/pm34xx.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/clk.h> | 28 | #include <linux/clk.h> |
29 | #include <linux/delay.h> | 29 | #include <linux/delay.h> |
30 | #include <linux/slab.h> | 30 | #include <linux/slab.h> |
31 | #include <linux/console.h> | ||
31 | 32 | ||
32 | #include <plat/sram.h> | 33 | #include <plat/sram.h> |
33 | #include <plat/clockdomain.h> | 34 | #include <plat/clockdomain.h> |
@@ -385,6 +386,12 @@ void omap_sram_idle(void) | |||
385 | omap3_enable_io_chain(); | 386 | omap3_enable_io_chain(); |
386 | } | 387 | } |
387 | 388 | ||
389 | /* Block console output in case it is on one of the OMAP UARTs */ | ||
390 | if (per_next_state < PWRDM_POWER_ON || | ||
391 | core_next_state < PWRDM_POWER_ON) | ||
392 | if (try_acquire_console_sem()) | ||
393 | goto console_still_active; | ||
394 | |||
388 | /* PER */ | 395 | /* PER */ |
389 | if (per_next_state < PWRDM_POWER_ON) { | 396 | if (per_next_state < PWRDM_POWER_ON) { |
390 | omap_uart_prepare_idle(2); | 397 | omap_uart_prepare_idle(2); |
@@ -463,6 +470,9 @@ void omap_sram_idle(void) | |||
463 | omap_uart_resume_idle(3); | 470 | omap_uart_resume_idle(3); |
464 | } | 471 | } |
465 | 472 | ||
473 | release_console_sem(); | ||
474 | |||
475 | console_still_active: | ||
466 | /* Disable IO-PAD and IO-CHAIN wakeup */ | 476 | /* Disable IO-PAD and IO-CHAIN wakeup */ |
467 | if (omap3_has_io_wakeup() && | 477 | if (omap3_has_io_wakeup() && |
468 | (per_next_state < PWRDM_POWER_ON || | 478 | (per_next_state < PWRDM_POWER_ON || |
diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c index becf0e38ef7e..d17960a1be25 100644 --- a/arch/arm/mach-omap2/serial.c +++ b/arch/arm/mach-omap2/serial.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/slab.h> | 27 | #include <linux/slab.h> |
28 | #include <linux/serial_8250.h> | 28 | #include <linux/serial_8250.h> |
29 | #include <linux/pm_runtime.h> | 29 | #include <linux/pm_runtime.h> |
30 | #include <linux/console.h> | ||
30 | 31 | ||
31 | #ifdef CONFIG_SERIAL_OMAP | 32 | #ifdef CONFIG_SERIAL_OMAP |
32 | #include <plat/omap-serial.h> | 33 | #include <plat/omap-serial.h> |
@@ -406,7 +407,7 @@ void omap_uart_resume_idle(int num) | |||
406 | struct omap_uart_state *uart; | 407 | struct omap_uart_state *uart; |
407 | 408 | ||
408 | list_for_each_entry(uart, &uart_list, node) { | 409 | list_for_each_entry(uart, &uart_list, node) { |
409 | if (num == uart->num) { | 410 | if (num == uart->num && uart->can_sleep) { |
410 | omap_uart_enable_clocks(uart); | 411 | omap_uart_enable_clocks(uart); |
411 | 412 | ||
412 | /* Check for IO pad wakeup */ | 413 | /* Check for IO pad wakeup */ |
@@ -807,6 +808,8 @@ void __init omap_serial_init_port(int port) | |||
807 | 808 | ||
808 | oh->dev_attr = uart; | 809 | oh->dev_attr = uart; |
809 | 810 | ||
811 | acquire_console_sem(); /* in case the earlycon is on the UART */ | ||
812 | |||
810 | /* | 813 | /* |
811 | * Because of early UART probing, UART did not get idled | 814 | * Because of early UART probing, UART did not get idled |
812 | * on init. Now that omap_device is ready, ensure full idle | 815 | * on init. Now that omap_device is ready, ensure full idle |
@@ -831,6 +834,8 @@ void __init omap_serial_init_port(int port) | |||
831 | omap_uart_block_sleep(uart); | 834 | omap_uart_block_sleep(uart); |
832 | uart->timeout = DEFAULT_TIMEOUT; | 835 | uart->timeout = DEFAULT_TIMEOUT; |
833 | 836 | ||
837 | release_console_sem(); | ||
838 | |||
834 | if ((cpu_is_omap34xx() && uart->padconf) || | 839 | if ((cpu_is_omap34xx() && uart->padconf) || |
835 | (uart->wk_en && uart->wk_mask)) { | 840 | (uart->wk_en && uart->wk_mask)) { |
836 | device_init_wakeup(&od->pdev.dev, true); | 841 | device_init_wakeup(&od->pdev.dev, true); |