diff options
author | Tony Lindgren <tony@atomide.com> | 2013-06-07 18:06:18 -0400 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2013-06-07 18:06:18 -0400 |
commit | 03c0d27119296bb32ef4a075b9fb8bb0aeaa19c0 (patch) | |
tree | 64abef0947a1f29260948adc040f284e0f7bb482 /arch/arm/mach-omap2 | |
parent | 17f545ca1769e268e0190d88ab94dc2a117df280 (diff) | |
parent | a93d8a1cea0899982993e9a93404c6f78b123697 (diff) |
Merge tag 'omap-fixes-b-for-3.10-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/pjw/omap-pending into omap-for-v3.10/fixes
More OMAP hwmod and clock fixes for v3.10-rc. Fixes the AM33xx UART2.
Also fixes some CCF-related breakage on OMAP36xx/37xx, affecting DSS
at the very least.
Basic test logs for this branch are here:
http://www.pwsan.com/omap/testlogs/fixes_b_v3.10-rc/20130606093449/
Diffstat (limited to 'arch/arm/mach-omap2')
-rw-r--r-- | arch/arm/mach-omap2/clock36xx.c | 18 | ||||
-rw-r--r-- | arch/arm/mach-omap2/omap_hwmod_33xx_data.c | 9 |
2 files changed, 17 insertions, 10 deletions
diff --git a/arch/arm/mach-omap2/clock36xx.c b/arch/arm/mach-omap2/clock36xx.c index 8f3bf4e50908..bbd6a3f717e6 100644 --- a/arch/arm/mach-omap2/clock36xx.c +++ b/arch/arm/mach-omap2/clock36xx.c | |||
@@ -20,11 +20,12 @@ | |||
20 | 20 | ||
21 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
22 | #include <linux/clk.h> | 22 | #include <linux/clk.h> |
23 | #include <linux/clk-provider.h> | ||
23 | #include <linux/io.h> | 24 | #include <linux/io.h> |
24 | 25 | ||
25 | #include "clock.h" | 26 | #include "clock.h" |
26 | #include "clock36xx.h" | 27 | #include "clock36xx.h" |
27 | 28 | #define to_clk_divider(_hw) container_of(_hw, struct clk_divider, hw) | |
28 | 29 | ||
29 | /** | 30 | /** |
30 | * omap36xx_pwrdn_clk_enable_with_hsdiv_restore - enable clocks suffering | 31 | * omap36xx_pwrdn_clk_enable_with_hsdiv_restore - enable clocks suffering |
@@ -39,29 +40,28 @@ | |||
39 | */ | 40 | */ |
40 | int omap36xx_pwrdn_clk_enable_with_hsdiv_restore(struct clk_hw *clk) | 41 | int omap36xx_pwrdn_clk_enable_with_hsdiv_restore(struct clk_hw *clk) |
41 | { | 42 | { |
42 | struct clk_hw_omap *parent; | 43 | struct clk_divider *parent; |
43 | struct clk_hw *parent_hw; | 44 | struct clk_hw *parent_hw; |
44 | u32 dummy_v, orig_v, clksel_shift; | 45 | u32 dummy_v, orig_v; |
45 | int ret; | 46 | int ret; |
46 | 47 | ||
47 | /* Clear PWRDN bit of HSDIVIDER */ | 48 | /* Clear PWRDN bit of HSDIVIDER */ |
48 | ret = omap2_dflt_clk_enable(clk); | 49 | ret = omap2_dflt_clk_enable(clk); |
49 | 50 | ||
50 | parent_hw = __clk_get_hw(__clk_get_parent(clk->clk)); | 51 | parent_hw = __clk_get_hw(__clk_get_parent(clk->clk)); |
51 | parent = to_clk_hw_omap(parent_hw); | 52 | parent = to_clk_divider(parent_hw); |
52 | 53 | ||
53 | /* Restore the dividers */ | 54 | /* Restore the dividers */ |
54 | if (!ret) { | 55 | if (!ret) { |
55 | clksel_shift = __ffs(parent->clksel_mask); | 56 | orig_v = __raw_readl(parent->reg); |
56 | orig_v = __raw_readl(parent->clksel_reg); | ||
57 | dummy_v = orig_v; | 57 | dummy_v = orig_v; |
58 | 58 | ||
59 | /* Write any other value different from the Read value */ | 59 | /* Write any other value different from the Read value */ |
60 | dummy_v ^= (1 << clksel_shift); | 60 | dummy_v ^= (1 << parent->shift); |
61 | __raw_writel(dummy_v, parent->clksel_reg); | 61 | __raw_writel(dummy_v, parent->reg); |
62 | 62 | ||
63 | /* Write the original divider */ | 63 | /* Write the original divider */ |
64 | __raw_writel(orig_v, parent->clksel_reg); | 64 | __raw_writel(orig_v, parent->reg); |
65 | } | 65 | } |
66 | 66 | ||
67 | return ret; | 67 | return ret; |
diff --git a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c index 075f7cc51026..69337af748cc 100644 --- a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c | |||
@@ -2007,6 +2007,13 @@ static struct omap_hwmod am33xx_uart1_hwmod = { | |||
2007 | }, | 2007 | }, |
2008 | }; | 2008 | }; |
2009 | 2009 | ||
2010 | /* uart2 */ | ||
2011 | static struct omap_hwmod_dma_info uart2_edma_reqs[] = { | ||
2012 | { .name = "tx", .dma_req = 28, }, | ||
2013 | { .name = "rx", .dma_req = 29, }, | ||
2014 | { .dma_req = -1 } | ||
2015 | }; | ||
2016 | |||
2010 | static struct omap_hwmod_irq_info am33xx_uart2_irqs[] = { | 2017 | static struct omap_hwmod_irq_info am33xx_uart2_irqs[] = { |
2011 | { .irq = 73 + OMAP_INTC_START, }, | 2018 | { .irq = 73 + OMAP_INTC_START, }, |
2012 | { .irq = -1 }, | 2019 | { .irq = -1 }, |
@@ -2018,7 +2025,7 @@ static struct omap_hwmod am33xx_uart2_hwmod = { | |||
2018 | .clkdm_name = "l4ls_clkdm", | 2025 | .clkdm_name = "l4ls_clkdm", |
2019 | .flags = HWMOD_SWSUP_SIDLE_ACT, | 2026 | .flags = HWMOD_SWSUP_SIDLE_ACT, |
2020 | .mpu_irqs = am33xx_uart2_irqs, | 2027 | .mpu_irqs = am33xx_uart2_irqs, |
2021 | .sdma_reqs = uart1_edma_reqs, | 2028 | .sdma_reqs = uart2_edma_reqs, |
2022 | .main_clk = "dpll_per_m2_div4_ck", | 2029 | .main_clk = "dpll_per_m2_div4_ck", |
2023 | .prcm = { | 2030 | .prcm = { |
2024 | .omap4 = { | 2031 | .omap4 = { |