Skip to content

Commit 03c0d27

Browse files
committed
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/
2 parents 17f545c + a93d8a1 commit 03c0d27

File tree

2 files changed

+17
-10
lines changed

2 files changed

+17
-10
lines changed

arch/arm/mach-omap2/clock36xx.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,12 @@
2020

2121
#include <linux/kernel.h>
2222
#include <linux/clk.h>
23+
#include <linux/clk-provider.h>
2324
#include <linux/io.h>
2425

2526
#include "clock.h"
2627
#include "clock36xx.h"
27-
28+
#define to_clk_divider(_hw) container_of(_hw, struct clk_divider, hw)
2829

2930
/**
3031
* omap36xx_pwrdn_clk_enable_with_hsdiv_restore - enable clocks suffering
@@ -39,29 +40,28 @@
3940
*/
4041
int omap36xx_pwrdn_clk_enable_with_hsdiv_restore(struct clk_hw *clk)
4142
{
42-
struct clk_hw_omap *parent;
43+
struct clk_divider *parent;
4344
struct clk_hw *parent_hw;
44-
u32 dummy_v, orig_v, clksel_shift;
45+
u32 dummy_v, orig_v;
4546
int ret;
4647

4748
/* Clear PWRDN bit of HSDIVIDER */
4849
ret = omap2_dflt_clk_enable(clk);
4950

5051
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);
5253

5354
/* Restore the dividers */
5455
if (!ret) {
55-
clksel_shift = __ffs(parent->clksel_mask);
56-
orig_v = __raw_readl(parent->clksel_reg);
56+
orig_v = __raw_readl(parent->reg);
5757
dummy_v = orig_v;
5858

5959
/* Write any other value different from the Read value */
60-
dummy_v ^= (1 << clksel_shift);
61-
__raw_writel(dummy_v, parent->clksel_reg);
60+
dummy_v ^= (1 << parent->shift);
61+
__raw_writel(dummy_v, parent->reg);
6262

6363
/* Write the original divider */
64-
__raw_writel(orig_v, parent->clksel_reg);
64+
__raw_writel(orig_v, parent->reg);
6565
}
6666

6767
return ret;

arch/arm/mach-omap2/omap_hwmod_33xx_data.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2007,6 +2007,13 @@ static struct omap_hwmod am33xx_uart1_hwmod = {
20072007
},
20082008
};
20092009

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+
20102017
static struct omap_hwmod_irq_info am33xx_uart2_irqs[] = {
20112018
{ .irq = 73 + OMAP_INTC_START, },
20122019
{ .irq = -1 },
@@ -2018,7 +2025,7 @@ static struct omap_hwmod am33xx_uart2_hwmod = {
20182025
.clkdm_name= "l4ls_clkdm",
20192026
.flags= HWMOD_SWSUP_SIDLE_ACT,
20202027
.mpu_irqs= am33xx_uart2_irqs,
2021-
.sdma_reqs= uart1_edma_reqs,
2028+
.sdma_reqs= uart2_edma_reqs,
20222029
.main_clk= "dpll_per_m2_div4_ck",
20232030
.prcm= {
20242031
.omap4= {

0 commit comments

Comments
 (0)