Skip to content

Commit

Permalink
Merge branch 'omap-clks3' into devel
Browse files Browse the repository at this point in the history
Conflicts:

	arch/arm/mach-omap2/clock.c
  • Loading branch information
Russell King authored and Russell King committed Mar 19, 2009
2 parents 05d9881 + 4da3782 commit 14b6848
Show file tree
Hide file tree
Showing 60 changed files with 3,143 additions and 2,598 deletions.
407 changes: 238 additions & 169 deletions arch/arm/mach-omap1/clock.c

Large diffs are not rendered by default.

412 changes: 128 additions & 284 deletions arch/arm/mach-omap1/clock.h

Large diffs are not rendered by default.

52 changes: 32 additions & 20 deletions arch/arm/mach-omap1/mcbsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
#define DPS_RSTCT2_PER_EN (1 << 0)
#define DSP_RSTCT2_WD_PER_EN (1 << 1)

#if defined(CONFIG_ARCH_OMAP15XX) || defined(CONFIG_ARCH_OMAP16XX)
const char *clk_names[] = { "dsp_ck", "api_ck", "dspxor_ck" };
#endif
static int dsp_use;
static struct clk *api_clk;
static struct clk *dsp_clk;

static void omap1_mcbsp_request(unsigned int id)
{
Expand All @@ -39,20 +39,40 @@ static void omap1_mcbsp_request(unsigned int id)
* are DSP public peripherals.
*/
if (id == OMAP_MCBSP1 || id == OMAP_MCBSP3) {
omap_dsp_request_mem();
/*
* DSP external peripheral reset
* FIXME: This should be moved to dsp code
*/
__raw_writew(__raw_readw(DSP_RSTCT2) | DPS_RSTCT2_PER_EN |
DSP_RSTCT2_WD_PER_EN, DSP_RSTCT2);
if (dsp_use++ == 0) {
api_clk = clk_get(NULL, "api_clk");
dsp_clk = clk_get(NULL, "dsp_clk");
if (!IS_ERR(api_clk) && !IS_ERR(dsp_clk)) {
clk_enable(api_clk);
clk_enable(dsp_clk);

omap_dsp_request_mem();
/*
* DSP external peripheral reset
* FIXME: This should be moved to dsp code
*/
__raw_writew(__raw_readw(DSP_RSTCT2) | DPS_RSTCT2_PER_EN |
DSP_RSTCT2_WD_PER_EN, DSP_RSTCT2);
}
}
}
}

static void omap1_mcbsp_free(unsigned int id)
{
if (id == OMAP_MCBSP1 || id == OMAP_MCBSP3)
omap_dsp_release_mem();
if (id == OMAP_MCBSP1 || id == OMAP_MCBSP3) {
if (--dsp_use == 0) {
omap_dsp_release_mem();
if (!IS_ERR(api_clk)) {
clk_disable(api_clk);
clk_put(api_clk);
}
if (!IS_ERR(dsp_clk)) {
clk_disable(dsp_clk);
clk_put(dsp_clk);
}
}
}
}

static struct omap_mcbsp_ops omap1_mcbsp_ops = {
Expand Down Expand Up @@ -94,8 +114,6 @@ static struct omap_mcbsp_platform_data omap15xx_mcbsp_pdata[] = {
.rx_irq = INT_McBSP1RX,
.tx_irq = INT_McBSP1TX,
.ops = &omap1_mcbsp_ops,
.clk_names = clk_names,
.num_clks = 3,
},
{
.phys_base = OMAP1510_MCBSP2_BASE,
Expand All @@ -112,8 +130,6 @@ static struct omap_mcbsp_platform_data omap15xx_mcbsp_pdata[] = {
.rx_irq = INT_McBSP3RX,
.tx_irq = INT_McBSP3TX,
.ops = &omap1_mcbsp_ops,
.clk_names = clk_names,
.num_clks = 3,
},
};
#define OMAP15XX_MCBSP_PDATA_SZ ARRAY_SIZE(omap15xx_mcbsp_pdata)
Expand All @@ -131,8 +147,6 @@ static struct omap_mcbsp_platform_data omap16xx_mcbsp_pdata[] = {
.rx_irq = INT_McBSP1RX,
.tx_irq = INT_McBSP1TX,
.ops = &omap1_mcbsp_ops,
.clk_names = clk_names,
.num_clks = 3,
},
{
.phys_base = OMAP1610_MCBSP2_BASE,
Expand All @@ -149,8 +163,6 @@ static struct omap_mcbsp_platform_data omap16xx_mcbsp_pdata[] = {
.rx_irq = INT_McBSP3RX,
.tx_irq = INT_McBSP3TX,
.ops = &omap1_mcbsp_ops,
.clk_names = clk_names,
.num_clks = 3,
},
};
#define OMAP16XX_MCBSP_PDATA_SZ ARRAY_SIZE(omap16xx_mcbsp_pdata)
Expand Down
6 changes: 5 additions & 1 deletion arch/arm/mach-omap2/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#

# Common support
obj-y := irq.o id.o io.o memory.o control.o prcm.o clock.o mux.o \
obj-y := irq.o id.o io.o sdrc.o control.o prcm.o clock.o mux.o \
devices.o serial.o gpmc.o timer-gp.o powerdomain.o \
clockdomain.o

Expand All @@ -14,6 +14,10 @@ obj-$(CONFIG_ARCH_OMAP2420) += sram242x.o
obj-$(CONFIG_ARCH_OMAP2430) += sram243x.o
obj-$(CONFIG_ARCH_OMAP3) += sram34xx.o

# SMS/SDRC
obj-$(CONFIG_ARCH_OMAP2) += sdrc2xxx.o
# obj-$(CONFIG_ARCH_OMAP3) += sdrc3xxx.o

# Power Management
ifeq ($(CONFIG_PM),y)
obj-y += pm.o
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-omap2/board-2430sdp.c
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ static inline void __init sdp2430_init_smc91x(void)

static void __init omap_2430sdp_init_irq(void)
{
omap2_init_common_hw();
omap2_init_common_hw(NULL);
omap_init_irq();
omap_gpio_init();
sdp2430_init_smc91x();
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-omap2/board-apollon.c
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ static inline void __init apollon_init_smc91x(void)

static void __init omap_apollon_init_irq(void)
{
omap2_init_common_hw();
omap2_init_common_hw(NULL);
omap_init_irq();
omap_gpio_init();
apollon_init_smc91x();
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-omap2/board-generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

static void __init omap_generic_init_irq(void)
{
omap2_init_common_hw();
omap2_init_common_hw(NULL);
omap_init_irq();
}

Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-omap2/board-h4.c
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ static void __init h4_init_flash(void)

static void __init omap_h4_init_irq(void)
{
omap2_init_common_hw();
omap2_init_common_hw(NULL);
omap_init_irq();
omap_gpio_init();
h4_init_flash();
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-omap2/board-ldp.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ static inline void __init ldp_init_smc911x(void)

static void __init omap_ldp_init_irq(void)
{
omap2_init_common_hw();
omap2_init_common_hw(NULL);
omap_init_irq();
omap_gpio_init();
ldp_init_smc911x();
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-omap2/board-omap3beagle.c
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ static int __init omap3_beagle_i2c_init(void)

static void __init omap3_beagle_init_irq(void)
{
omap2_init_common_hw();
omap2_init_common_hw(NULL);
omap_init_irq();
omap_gpio_init();
}
Expand Down
Loading

0 comments on commit 14b6848

Please sign in to comment.