Skip to content

Commit

Permalink
OMAP7XX: IO: Remove duplicate omap850 code
Browse files Browse the repository at this point in the history
This patch is part of a series which unifies all duplicated code between
omap730 and omap850. All cpu checks are converted to cpu_is_omap7xx() and
CONFIG_ARCH_OMAP850 is added to all CONFIG_ARCH_OMAP730 checks.

Signed-off-by: Alistair Buxton <a.j.buxton@gmail.com>
Reviewed-by: Zebediah C. McClure <zmc@lurian.net>
  • Loading branch information
Alistair Buxton committed Oct 7, 2009
1 parent b718aa8 commit ab49df7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 27 deletions.
29 changes: 3 additions & 26 deletions arch/arm/mach-omap1/io.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ static struct map_desc omap_io_desc[] __initdata = {
}
};

#ifdef CONFIG_ARCH_OMAP730
#if defined (CONFIG_ARCH_OMAP730) || defined (CONFIG_ARCH_OMAP850)
static struct map_desc omap730_io_desc[] __initdata = {
{
.virtual = OMAP730_DSP_BASE,
Expand All @@ -52,22 +52,6 @@ static struct map_desc omap730_io_desc[] __initdata = {
};
#endif

#ifdef CONFIG_ARCH_OMAP850
static struct map_desc omap850_io_desc[] __initdata = {
{
.virtual = OMAP850_DSP_BASE,
.pfn = __phys_to_pfn(OMAP850_DSP_START),
.length = OMAP850_DSP_SIZE,
.type = MT_DEVICE
}, {
.virtual = OMAP850_DSPREG_BASE,
.pfn = __phys_to_pfn(OMAP850_DSPREG_START),
.length = OMAP850_DSPREG_SIZE,
.type = MT_DEVICE
}
};
#endif

#ifdef CONFIG_ARCH_OMAP15XX
static struct map_desc omap1510_io_desc[] __initdata = {
{
Expand Down Expand Up @@ -120,18 +104,11 @@ void __init omap1_map_common_io(void)
*/
omap_check_revision();

#ifdef CONFIG_ARCH_OMAP730
if (cpu_is_omap730()) {
#if defined (CONFIG_ARCH_OMAP730) || defined (CONFIG_ARCH_OMAP850)
if (cpu_is_omap7xx()) {
iotable_init(omap730_io_desc, ARRAY_SIZE(omap730_io_desc));
}
#endif

#ifdef CONFIG_ARCH_OMAP850
if (cpu_is_omap850()) {
iotable_init(omap850_io_desc, ARRAY_SIZE(omap850_io_desc));
}
#endif

#ifdef CONFIG_ARCH_OMAP15XX
if (cpu_is_omap15xx()) {
iotable_init(omap1510_io_desc, ARRAY_SIZE(omap1510_io_desc));
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/plat-omap/io.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ void __iomem *omap_ioremap(unsigned long p, size_t size, unsigned int type)
if (BETWEEN(p, OMAP1_IO_PHYS, OMAP1_IO_SIZE))
return XLATE(p, OMAP1_IO_PHYS, OMAP1_IO_VIRT);
}
if (cpu_is_omap730()) {
if (cpu_is_omap7xx()) {
if (BETWEEN(p, OMAP730_DSP_BASE, OMAP730_DSP_SIZE))
return XLATE(p, OMAP730_DSP_BASE, OMAP730_DSP_START);

Expand Down

0 comments on commit ab49df7

Please sign in to comment.