diff options
author | Olof Johansson <olof@lixom.net> | 2012-03-13 19:08:06 -0400 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2012-03-13 19:08:06 -0400 |
commit | e3643b77de143c5548ec93abd8aa68f4123295ea (patch) | |
tree | 41981957bc93e8211fe55cd04b7cac47e74bc770 /arch/arm/mach-omap2 | |
parent | 86ca5b6fef2bf1aa77a62f29d844400e4fed8dde (diff) | |
parent | 44b2cef5ae6da48523fa634230ca66107110a7dd (diff) |
Merge branch 'next/cleanup-exynos-clock' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into next/cleanup
* 'next/cleanup-exynos-clock' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung:
ARM: EXYNOS: Add clock register addresses for EXYNOS4X12 bus devfreq driver
ARM: EXYNOS: add clock registers for exynos4x12-cpufreq
PM / devfreq: update the name of EXYNOS clock registers that were omitted
PM / devfreq: update the name of EXYNOS clock register
ARM: EXYNOS: change the prefix S5P_ to EXYNOS4_ for clock
ARM: EXYNOS: use static declaration on regarding clock
ARM: EXYNOS: replace clock.c for other new EXYNOS SoCs
(includes an update to v3.3-rc6)
Diffstat (limited to 'arch/arm/mach-omap2')
-rw-r--r-- | arch/arm/mach-omap2/Kconfig | 4 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-omap3evm.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap2/common.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-omap2/cpuidle44xx.c | 5 | ||||
-rw-r--r-- | arch/arm/mach-omap2/gpmc-smsc911x.c | 52 | ||||
-rw-r--r-- | arch/arm/mach-omap2/io.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-omap2/mailbox.c | 13 | ||||
-rw-r--r-- | arch/arm/mach-omap2/omap4-common.c | 25 | ||||
-rw-r--r-- | arch/arm/mach-omap2/pm.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-omap2/usb-host.c | 6 |
10 files changed, 92 insertions, 20 deletions
diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig index d965da45160e..e20c8ab80b0e 100644 --- a/arch/arm/mach-omap2/Kconfig +++ b/arch/arm/mach-omap2/Kconfig | |||
@@ -364,8 +364,8 @@ config OMAP3_SDRC_AC_TIMING | |||
364 | going on could result in system crashes; | 364 | going on could result in system crashes; |
365 | 365 | ||
366 | config OMAP4_ERRATA_I688 | 366 | config OMAP4_ERRATA_I688 |
367 | bool "OMAP4 errata: Async Bridge Corruption (BROKEN)" | 367 | bool "OMAP4 errata: Async Bridge Corruption" |
368 | depends on ARCH_OMAP4 && BROKEN | 368 | depends on ARCH_OMAP4 |
369 | select ARCH_HAS_BARRIERS | 369 | select ARCH_HAS_BARRIERS |
370 | help | 370 | help |
371 | If a data is stalled inside asynchronous bridge because of back | 371 | If a data is stalled inside asynchronous bridge because of back |
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c index 6b77ad95981d..a659e198892b 100644 --- a/arch/arm/mach-omap2/board-omap3evm.c +++ b/arch/arm/mach-omap2/board-omap3evm.c | |||
@@ -381,7 +381,7 @@ static int omap3evm_twl_gpio_setup(struct device *dev, | |||
381 | gpio_request_one(gpio + 7, GPIOF_OUT_INIT_LOW, "EN_DVI"); | 381 | gpio_request_one(gpio + 7, GPIOF_OUT_INIT_LOW, "EN_DVI"); |
382 | 382 | ||
383 | /* TWL4030_GPIO_MAX + 1 == ledB (out, active low LED) */ | 383 | /* TWL4030_GPIO_MAX + 1 == ledB (out, active low LED) */ |
384 | gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1; | 384 | gpio_leds[0].gpio = gpio + TWL4030_GPIO_MAX + 1; |
385 | 385 | ||
386 | platform_device_register(&leds_gpio); | 386 | platform_device_register(&leds_gpio); |
387 | 387 | ||
diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h index f78ec4e6a5c7..4897ec02e798 100644 --- a/arch/arm/mach-omap2/common.h +++ b/arch/arm/mach-omap2/common.h | |||
@@ -132,6 +132,7 @@ void omap3_map_io(void); | |||
132 | void am33xx_map_io(void); | 132 | void am33xx_map_io(void); |
133 | void omap4_map_io(void); | 133 | void omap4_map_io(void); |
134 | void ti81xx_map_io(void); | 134 | void ti81xx_map_io(void); |
135 | void omap_barriers_init(void); | ||
135 | 136 | ||
136 | extern void __init omap_init_consistent_dma_size(void); | 137 | extern void __init omap_init_consistent_dma_size(void); |
137 | 138 | ||
diff --git a/arch/arm/mach-omap2/cpuidle44xx.c b/arch/arm/mach-omap2/cpuidle44xx.c index cfdbb86bc84e..72e018b9b260 100644 --- a/arch/arm/mach-omap2/cpuidle44xx.c +++ b/arch/arm/mach-omap2/cpuidle44xx.c | |||
@@ -65,7 +65,6 @@ static int omap4_enter_idle(struct cpuidle_device *dev, | |||
65 | struct timespec ts_preidle, ts_postidle, ts_idle; | 65 | struct timespec ts_preidle, ts_postidle, ts_idle; |
66 | u32 cpu1_state; | 66 | u32 cpu1_state; |
67 | int idle_time; | 67 | int idle_time; |
68 | int new_state_idx; | ||
69 | int cpu_id = smp_processor_id(); | 68 | int cpu_id = smp_processor_id(); |
70 | 69 | ||
71 | /* Used to keep track of the total time in idle */ | 70 | /* Used to keep track of the total time in idle */ |
@@ -84,8 +83,8 @@ static int omap4_enter_idle(struct cpuidle_device *dev, | |||
84 | */ | 83 | */ |
85 | cpu1_state = pwrdm_read_pwrst(cpu1_pd); | 84 | cpu1_state = pwrdm_read_pwrst(cpu1_pd); |
86 | if (cpu1_state != PWRDM_POWER_OFF) { | 85 | if (cpu1_state != PWRDM_POWER_OFF) { |
87 | new_state_idx = drv->safe_state_index; | 86 | index = drv->safe_state_index; |
88 | cx = cpuidle_get_statedata(&dev->states_usage[new_state_idx]); | 87 | cx = cpuidle_get_statedata(&dev->states_usage[index]); |
89 | } | 88 | } |
90 | 89 | ||
91 | if (index > 0) | 90 | if (index > 0) |
diff --git a/arch/arm/mach-omap2/gpmc-smsc911x.c b/arch/arm/mach-omap2/gpmc-smsc911x.c index 997033129d26..bbb870c04a5e 100644 --- a/arch/arm/mach-omap2/gpmc-smsc911x.c +++ b/arch/arm/mach-omap2/gpmc-smsc911x.c | |||
@@ -19,6 +19,8 @@ | |||
19 | #include <linux/interrupt.h> | 19 | #include <linux/interrupt.h> |
20 | #include <linux/io.h> | 20 | #include <linux/io.h> |
21 | #include <linux/smsc911x.h> | 21 | #include <linux/smsc911x.h> |
22 | #include <linux/regulator/fixed.h> | ||
23 | #include <linux/regulator/machine.h> | ||
22 | 24 | ||
23 | #include <plat/board.h> | 25 | #include <plat/board.h> |
24 | #include <plat/gpmc.h> | 26 | #include <plat/gpmc.h> |
@@ -42,6 +44,50 @@ static struct smsc911x_platform_config gpmc_smsc911x_config = { | |||
42 | .flags = SMSC911X_USE_16BIT, | 44 | .flags = SMSC911X_USE_16BIT, |
43 | }; | 45 | }; |
44 | 46 | ||
47 | static struct regulator_consumer_supply gpmc_smsc911x_supply[] = { | ||
48 | REGULATOR_SUPPLY("vddvario", "smsc911x.0"), | ||
49 | REGULATOR_SUPPLY("vdd33a", "smsc911x.0"), | ||
50 | }; | ||
51 | |||
52 | /* Generic regulator definition to satisfy smsc911x */ | ||
53 | static struct regulator_init_data gpmc_smsc911x_reg_init_data = { | ||
54 | .constraints = { | ||
55 | .min_uV = 3300000, | ||
56 | .max_uV = 3300000, | ||
57 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
58 | | REGULATOR_MODE_STANDBY, | ||
59 | .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
60 | | REGULATOR_CHANGE_STATUS, | ||
61 | }, | ||
62 | .num_consumer_supplies = ARRAY_SIZE(gpmc_smsc911x_supply), | ||
63 | .consumer_supplies = gpmc_smsc911x_supply, | ||
64 | }; | ||
65 | |||
66 | static struct fixed_voltage_config gpmc_smsc911x_fixed_reg_data = { | ||
67 | .supply_name = "gpmc_smsc911x", | ||
68 | .microvolts = 3300000, | ||
69 | .gpio = -EINVAL, | ||
70 | .startup_delay = 0, | ||
71 | .enable_high = 0, | ||
72 | .enabled_at_boot = 1, | ||
73 | .init_data = &gpmc_smsc911x_reg_init_data, | ||
74 | }; | ||
75 | |||
76 | /* | ||
77 | * Platform device id of 42 is a temporary fix to avoid conflicts | ||
78 | * with other reg-fixed-voltage devices. The real fix should | ||
79 | * involve the driver core providing a way of dynamically | ||
80 | * assigning a unique id on registration for platform devices | ||
81 | * in the same name space. | ||
82 | */ | ||
83 | static struct platform_device gpmc_smsc911x_regulator = { | ||
84 | .name = "reg-fixed-voltage", | ||
85 | .id = 42, | ||
86 | .dev = { | ||
87 | .platform_data = &gpmc_smsc911x_fixed_reg_data, | ||
88 | }, | ||
89 | }; | ||
90 | |||
45 | /* | 91 | /* |
46 | * Initialize smsc911x device connected to the GPMC. Note that we | 92 | * Initialize smsc911x device connected to the GPMC. Note that we |
47 | * assume that pin multiplexing is done in the board-*.c file, | 93 | * assume that pin multiplexing is done in the board-*.c file, |
@@ -55,6 +101,12 @@ void __init gpmc_smsc911x_init(struct omap_smsc911x_platform_data *board_data) | |||
55 | 101 | ||
56 | gpmc_cfg = board_data; | 102 | gpmc_cfg = board_data; |
57 | 103 | ||
104 | ret = platform_device_register(&gpmc_smsc911x_regulator); | ||
105 | if (ret < 0) { | ||
106 | pr_err("Unable to register smsc911x regulators: %d\n", ret); | ||
107 | return; | ||
108 | } | ||
109 | |||
58 | if (gpmc_cs_request(gpmc_cfg->cs, SZ_16M, &cs_mem_base) < 0) { | 110 | if (gpmc_cs_request(gpmc_cfg->cs, SZ_16M, &cs_mem_base) < 0) { |
59 | pr_err("Failed to request GPMC mem region\n"); | 111 | pr_err("Failed to request GPMC mem region\n"); |
60 | return; | 112 | return; |
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c index 3203128eef7d..0b73d3153604 100644 --- a/arch/arm/mach-omap2/io.c +++ b/arch/arm/mach-omap2/io.c | |||
@@ -304,6 +304,7 @@ void __init omapam33xx_map_common_io(void) | |||
304 | void __init omap44xx_map_common_io(void) | 304 | void __init omap44xx_map_common_io(void) |
305 | { | 305 | { |
306 | iotable_init(omap44xx_io_desc, ARRAY_SIZE(omap44xx_io_desc)); | 306 | iotable_init(omap44xx_io_desc, ARRAY_SIZE(omap44xx_io_desc)); |
307 | omap_barriers_init(); | ||
307 | } | 308 | } |
308 | #endif | 309 | #endif |
309 | 310 | ||
diff --git a/arch/arm/mach-omap2/mailbox.c b/arch/arm/mach-omap2/mailbox.c index 609ea2ded7e3..2cc1aa004b94 100644 --- a/arch/arm/mach-omap2/mailbox.c +++ b/arch/arm/mach-omap2/mailbox.c | |||
@@ -281,8 +281,16 @@ static struct omap_mbox mbox_iva_info = { | |||
281 | .ops = &omap2_mbox_ops, | 281 | .ops = &omap2_mbox_ops, |
282 | .priv = &omap2_mbox_iva_priv, | 282 | .priv = &omap2_mbox_iva_priv, |
283 | }; | 283 | }; |
284 | #endif | ||
284 | 285 | ||
285 | struct omap_mbox *omap2_mboxes[] = { &mbox_dsp_info, &mbox_iva_info, NULL }; | 286 | #ifdef CONFIG_ARCH_OMAP2 |
287 | struct omap_mbox *omap2_mboxes[] = { | ||
288 | &mbox_dsp_info, | ||
289 | #ifdef CONFIG_SOC_OMAP2420 | ||
290 | &mbox_iva_info, | ||
291 | #endif | ||
292 | NULL | ||
293 | }; | ||
286 | #endif | 294 | #endif |
287 | 295 | ||
288 | #if defined(CONFIG_ARCH_OMAP4) | 296 | #if defined(CONFIG_ARCH_OMAP4) |
@@ -412,7 +420,8 @@ static void __exit omap2_mbox_exit(void) | |||
412 | platform_driver_unregister(&omap2_mbox_driver); | 420 | platform_driver_unregister(&omap2_mbox_driver); |
413 | } | 421 | } |
414 | 422 | ||
415 | module_init(omap2_mbox_init); | 423 | /* must be ready before omap3isp is probed */ |
424 | subsys_initcall(omap2_mbox_init); | ||
416 | module_exit(omap2_mbox_exit); | 425 | module_exit(omap2_mbox_exit); |
417 | 426 | ||
418 | MODULE_LICENSE("GPL v2"); | 427 | MODULE_LICENSE("GPL v2"); |
diff --git a/arch/arm/mach-omap2/omap4-common.c b/arch/arm/mach-omap2/omap4-common.c index 40a8fbc07e4b..ebc595091312 100644 --- a/arch/arm/mach-omap2/omap4-common.c +++ b/arch/arm/mach-omap2/omap4-common.c | |||
@@ -24,6 +24,7 @@ | |||
24 | 24 | ||
25 | #include <plat/irqs.h> | 25 | #include <plat/irqs.h> |
26 | #include <plat/sram.h> | 26 | #include <plat/sram.h> |
27 | #include <plat/omap-secure.h> | ||
27 | 28 | ||
28 | #include <mach/hardware.h> | 29 | #include <mach/hardware.h> |
29 | #include <mach/omap-wakeupgen.h> | 30 | #include <mach/omap-wakeupgen.h> |
@@ -43,6 +44,9 @@ static void __iomem *sar_ram_base; | |||
43 | 44 | ||
44 | void __iomem *dram_sync, *sram_sync; | 45 | void __iomem *dram_sync, *sram_sync; |
45 | 46 | ||
47 | static phys_addr_t paddr; | ||
48 | static u32 size; | ||
49 | |||
46 | void omap_bus_sync(void) | 50 | void omap_bus_sync(void) |
47 | { | 51 | { |
48 | if (dram_sync && sram_sync) { | 52 | if (dram_sync && sram_sync) { |
@@ -52,18 +56,20 @@ void omap_bus_sync(void) | |||
52 | } | 56 | } |
53 | } | 57 | } |
54 | 58 | ||
55 | static int __init omap_barriers_init(void) | 59 | /* Steal one page physical memory for barrier implementation */ |
60 | int __init omap_barrier_reserve_memblock(void) | ||
56 | { | 61 | { |
57 | struct map_desc dram_io_desc[1]; | ||
58 | phys_addr_t paddr; | ||
59 | u32 size; | ||
60 | |||
61 | if (!cpu_is_omap44xx()) | ||
62 | return -ENODEV; | ||
63 | 62 | ||
64 | size = ALIGN(PAGE_SIZE, SZ_1M); | 63 | size = ALIGN(PAGE_SIZE, SZ_1M); |
65 | paddr = arm_memblock_steal(size, SZ_1M); | 64 | paddr = arm_memblock_steal(size, SZ_1M); |
66 | 65 | ||
66 | return 0; | ||
67 | } | ||
68 | |||
69 | void __init omap_barriers_init(void) | ||
70 | { | ||
71 | struct map_desc dram_io_desc[1]; | ||
72 | |||
67 | dram_io_desc[0].virtual = OMAP4_DRAM_BARRIER_VA; | 73 | dram_io_desc[0].virtual = OMAP4_DRAM_BARRIER_VA; |
68 | dram_io_desc[0].pfn = __phys_to_pfn(paddr); | 74 | dram_io_desc[0].pfn = __phys_to_pfn(paddr); |
69 | dram_io_desc[0].length = size; | 75 | dram_io_desc[0].length = size; |
@@ -75,9 +81,10 @@ static int __init omap_barriers_init(void) | |||
75 | pr_info("OMAP4: Map 0x%08llx to 0x%08lx for dram barrier\n", | 81 | pr_info("OMAP4: Map 0x%08llx to 0x%08lx for dram barrier\n", |
76 | (long long) paddr, dram_io_desc[0].virtual); | 82 | (long long) paddr, dram_io_desc[0].virtual); |
77 | 83 | ||
78 | return 0; | ||
79 | } | 84 | } |
80 | core_initcall(omap_barriers_init); | 85 | #else |
86 | void __init omap_barriers_init(void) | ||
87 | {} | ||
81 | #endif | 88 | #endif |
82 | 89 | ||
83 | void __init gic_init_irq(void) | 90 | void __init gic_init_irq(void) |
diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c index 28706696a341..d383f71b4867 100644 --- a/arch/arm/mach-omap2/pm.c +++ b/arch/arm/mach-omap2/pm.c | |||
@@ -189,14 +189,17 @@ static int __init omap2_set_init_voltage(char *vdd_name, char *clk_name, | |||
189 | freq = clk->rate; | 189 | freq = clk->rate; |
190 | clk_put(clk); | 190 | clk_put(clk); |
191 | 191 | ||
192 | rcu_read_lock(); | ||
192 | opp = opp_find_freq_ceil(dev, &freq); | 193 | opp = opp_find_freq_ceil(dev, &freq); |
193 | if (IS_ERR(opp)) { | 194 | if (IS_ERR(opp)) { |
195 | rcu_read_unlock(); | ||
194 | pr_err("%s: unable to find boot up OPP for vdd_%s\n", | 196 | pr_err("%s: unable to find boot up OPP for vdd_%s\n", |
195 | __func__, vdd_name); | 197 | __func__, vdd_name); |
196 | goto exit; | 198 | goto exit; |
197 | } | 199 | } |
198 | 200 | ||
199 | bootup_volt = opp_get_voltage(opp); | 201 | bootup_volt = opp_get_voltage(opp); |
202 | rcu_read_unlock(); | ||
200 | if (!bootup_volt) { | 203 | if (!bootup_volt) { |
201 | pr_err("%s: unable to find voltage corresponding " | 204 | pr_err("%s: unable to find voltage corresponding " |
202 | "to the bootup OPP for vdd_%s\n", __func__, vdd_name); | 205 | "to the bootup OPP for vdd_%s\n", __func__, vdd_name); |
diff --git a/arch/arm/mach-omap2/usb-host.c b/arch/arm/mach-omap2/usb-host.c index 771dc781b746..f51348dafafd 100644 --- a/arch/arm/mach-omap2/usb-host.c +++ b/arch/arm/mach-omap2/usb-host.c | |||
@@ -486,7 +486,7 @@ static void setup_4430ohci_io_mux(const enum usbhs_omap_port_mode *port_mode) | |||
486 | void __init usbhs_init(const struct usbhs_omap_board_data *pdata) | 486 | void __init usbhs_init(const struct usbhs_omap_board_data *pdata) |
487 | { | 487 | { |
488 | struct omap_hwmod *oh[2]; | 488 | struct omap_hwmod *oh[2]; |
489 | struct omap_device *od; | 489 | struct platform_device *pdev; |
490 | int bus_id = -1; | 490 | int bus_id = -1; |
491 | int i; | 491 | int i; |
492 | 492 | ||
@@ -522,11 +522,11 @@ void __init usbhs_init(const struct usbhs_omap_board_data *pdata) | |||
522 | return; | 522 | return; |
523 | } | 523 | } |
524 | 524 | ||
525 | od = omap_device_build_ss(OMAP_USBHS_DEVICE, bus_id, oh, 2, | 525 | pdev = omap_device_build_ss(OMAP_USBHS_DEVICE, bus_id, oh, 2, |
526 | (void *)&usbhs_data, sizeof(usbhs_data), | 526 | (void *)&usbhs_data, sizeof(usbhs_data), |
527 | omap_uhhtll_latency, | 527 | omap_uhhtll_latency, |
528 | ARRAY_SIZE(omap_uhhtll_latency), false); | 528 | ARRAY_SIZE(omap_uhhtll_latency), false); |
529 | if (IS_ERR(od)) { | 529 | if (IS_ERR(pdev)) { |
530 | pr_err("Could not build hwmod devices %s,%s\n", | 530 | pr_err("Could not build hwmod devices %s,%s\n", |
531 | USBHS_UHH_HWMODNAME, USBHS_TLL_HWMODNAME); | 531 | USBHS_UHH_HWMODNAME, USBHS_TLL_HWMODNAME); |
532 | return; | 532 | return; |