Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 281494
b: refs/heads/master
c: ddf536d
h: refs/heads/master
v: v3
  • Loading branch information
Paul Walmsley authored and Tony Lindgren committed Dec 17, 2011
1 parent be9bde4 commit 3bcad58
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 28 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 53bf82ce766b17436a6e9c672f9fa29702f3731e
refs/heads/master: ddf536d0d7e1f0b63a681c970888730a4437414d
40 changes: 34 additions & 6 deletions trunk/arch/arm/mach-omap2/voltagedomains3xxx_data.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,14 @@
* VDD data
*/

/* OMAP3-common voltagedomain data */

static struct voltagedomain omap3_voltdm_wkup = {
.name = "wakeup",
};

/* 34xx/36xx voltagedomain data */

static const struct omap_vfsm_instance omap3_vdd1_vfsm = {
.voltsetup_reg = OMAP3_PRM_VOLTSETUP1_OFFSET,
.voltsetup_mask = OMAP3430_SETUP_TIME1_MASK,
Expand Down Expand Up @@ -63,22 +71,37 @@ static struct voltagedomain omap3_voltdm_core = {
.vp = &omap3_vp_core,
};

static struct voltagedomain omap3_voltdm_wkup = {
.name = "wakeup",
};

static struct voltagedomain *voltagedomains_omap3[] __initdata = {
&omap3_voltdm_mpu,
&omap3_voltdm_core,
&omap3_voltdm_wkup,
NULL,
};

/* AM35xx voltagedomain data */

static struct voltagedomain am35xx_voltdm_mpu = {
.name = "mpu_iva",
};

static struct voltagedomain am35xx_voltdm_core = {
.name = "core",
};

static struct voltagedomain *voltagedomains_am35xx[] __initdata = {
&am35xx_voltdm_mpu,
&am35xx_voltdm_core,
&omap3_voltdm_wkup,
NULL,
};


static const char *sys_clk_name __initdata = "sys_ck";

void __init omap3xxx_voltagedomains_init(void)
{
struct voltagedomain *voltdm;
struct voltagedomain **voltdms;
int i;

/*
Expand All @@ -93,8 +116,13 @@ void __init omap3xxx_voltagedomains_init(void)
omap3_voltdm_core.volt_data = omap34xx_vddcore_volt_data;
}

for (i = 0; voltdm = voltagedomains_omap3[i], voltdm; i++)
if (cpu_is_omap3517() || cpu_is_omap3505())
voltdms = voltagedomains_am35xx;
else
voltdms = voltagedomains_omap3;

for (i = 0; voltdm = voltdms[i], voltdm; i++)
voltdm->sys_clk.name = sys_clk_name;

voltdm_init(voltagedomains_omap3);
voltdm_init(voltdms);
};
22 changes: 1 addition & 21 deletions trunk/arch/arm/plat-omap/dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -1034,18 +1034,6 @@ dma_addr_t omap_get_dma_src_pos(int lch)
if (IS_DMA_ERRATA(DMA_ERRATA_3_3) && offset == 0)
offset = p->dma_read(CSAC, lch);

if (!cpu_is_omap15xx()) {
/*
* CDAC == 0 indicates that the DMA transfer on the channel has
* not been started (no data has been transferred so far).
* Return the programmed source start address in this case.
*/
if (likely(p->dma_read(CDAC, lch)))
offset = p->dma_read(CSAC, lch);
else
offset = p->dma_read(CSSA, lch);
}

if (cpu_class_is_omap1())
offset |= (p->dma_read(CSSA, lch) & 0xFFFF0000);

Expand Down Expand Up @@ -1074,16 +1062,8 @@ dma_addr_t omap_get_dma_dst_pos(int lch)
* omap 3.2/3.3 erratum: sometimes 0 is returned if CSAC/CDAC is
* read before the DMA controller finished disabling the channel.
*/
if (!cpu_is_omap15xx() && offset == 0) {
if (!cpu_is_omap15xx() && offset == 0)
offset = p->dma_read(CDAC, lch);
/*
* CDAC == 0 indicates that the DMA transfer on the channel has
* not been started (no data has been transferred so far).
* Return the programmed destination start address in this case.
*/
if (unlikely(!offset))
offset = p->dma_read(CDSA, lch);
}

if (cpu_class_is_omap1())
offset |= (p->dma_read(CDSA, lch) & 0xFFFF0000);
Expand Down

0 comments on commit 3bcad58

Please sign in to comment.