Skip to content

Commit

Permalink
nommu: Add MMU-less support for Integrator platforms
Browse files Browse the repository at this point in the history
This patch redefines the IO_ADDRESS macro in
include/asm-arm/hardware.h.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
  • Loading branch information
Catalin Marinas committed Jul 24, 2009
1 parent 9a45f02 commit 365f7a4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
4 changes: 4 additions & 0 deletions arch/arm/mach-integrator/include/mach/hardware.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,12 @@
#define PCIO_BASE PCI_IO_VADDR
#define PCIMEM_BASE PCI_MEMORY_VADDR

#ifdef CONFIG_MMU
/* macro to get at IO space when running virtually */
#define IO_ADDRESS(x) (((x) >> 4) + IO_BASE)
#else
#define IO_ADDRESS(x) (x)
#endif

#define pcibios_assign_all_busses() 1

Expand Down
16 changes: 8 additions & 8 deletions arch/arm/mach-integrator/integrator_cp.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@

#define INTCP_PA_CLCD_BASE 0xc0000000

#define INTCP_VA_CIC_BASE 0xf1000040
#define INTCP_VA_PIC_BASE 0xf1400000
#define INTCP_VA_SIC_BASE 0xfca00000
#define INTCP_VA_CIC_BASE IO_ADDRESS(INTEGRATOR_HDR_BASE) + 0x40
#define INTCP_VA_PIC_BASE IO_ADDRESS(INTEGRATOR_IC_BASE)
#define INTCP_VA_SIC_BASE IO_ADDRESS(0xca000000)

#define INTCP_PA_ETH_BASE 0xc8000000
#define INTCP_ETH_SIZE 0x10

#define INTCP_VA_CTRL_BASE 0xfcb00000
#define INTCP_VA_CTRL_BASE IO_ADDRESS(0xcb000000)
#define INTCP_FLASHPROG 0x04
#define CINTEGRATOR_FLASHPROG_FLVPPEN (1 << 0)
#define CINTEGRATOR_FLASHPROG_FLWREN (1 << 1)
Expand Down Expand Up @@ -121,12 +121,12 @@ static struct map_desc intcp_io_desc[] __initdata = {
.length = SZ_4K,
.type = MT_DEVICE
}, {
.virtual = 0xfca00000,
.virtual = IO_ADDRESS(0xca000000),
.pfn = __phys_to_pfn(0xca000000),
.length = SZ_4K,
.type = MT_DEVICE
}, {
.virtual = 0xfcb00000,
.virtual = IO_ADDRESS(0xcb000000),
.pfn = __phys_to_pfn(0xcb000000),
.length = SZ_4K,
.type = MT_DEVICE
Expand Down Expand Up @@ -394,8 +394,8 @@ static struct platform_device *intcp_devs[] __initdata = {
*/
static unsigned int mmc_status(struct device *dev)
{
unsigned int status = readl(0xfca00004);
writel(8, 0xfcb00008);
unsigned int status = readl(IO_ADDRESS(0xca000000) + 4);
writel(8, IO_ADDRESS(0xcb000000) + 8);

return status & 8;
}
Expand Down

0 comments on commit 365f7a4

Please sign in to comment.