Skip to content

Commit

Permalink
ARM: OMAP: Remove cpu_is_omap usage from plat-omap/dma.c
Browse files Browse the repository at this point in the history
This code will be eventually in drivers, and for the
code in the drivers we don't want to have any cpu_is_omap
usage. Those macros should be private to arch/arm/mach-omap1
and arch/arm/mach-omap2.

To fix this, let's move the define for dma_omap2plus()
to dma-omap.h, and use the existing dma_attr passed in
the platform_data as the revision registers are what they
are.

Note that we can now also remove the relative includes
introduced by the recent clean-up patches.

Cc: Russell King <linux@arm.linux.org.uk>
Cc: Vinod Koul <vinod.koul@intel.com>
Cc: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
  • Loading branch information
Tony Lindgren committed Oct 31, 2012
1 parent 32dee01 commit 8280960
Show file tree
Hide file tree
Showing 5 changed files with 73 additions and 66 deletions.
3 changes: 3 additions & 0 deletions arch/arm/mach-omap1/dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,9 @@ static int __init omap1_system_dma_init(void)
d->dev_caps = ENABLE_1510_MODE;
enable_1510_mode = d->dev_caps & ENABLE_1510_MODE;

if (cpu_is_omap16xx())
d->dev_caps = ENABLE_16XX_MODE;

d->dev_caps |= SRC_PORT;
d->dev_caps |= DST_PORT;
d->dev_caps |= SRC_INDEX;
Expand Down
3 changes: 3 additions & 0 deletions arch/arm/mach-omap2/dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,9 @@ static int __init omap2_system_dma_init_dev(struct omap_hwmod *oh, void *unused)
return -ENOMEM;
}

if (cpu_is_omap34xx() && (omap_type() != OMAP2_DEVICE_TYPE_GP))
d->dev_caps |= HS_CHANNELS_RESERVED;

/* Check the capabilities register for descriptor loading feature */
if (dma_read(CAPS_0, 0) & DMA_HAS_DESCRIPTOR_CAPS)
dma_common_ch_end = CCDN;
Expand Down
Loading

0 comments on commit 8280960

Please sign in to comment.