blob: de208d2cca4ee4485a2afd53153cdc4cf9dbc89d [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
Lennert Buytenhek3f7e5812006-09-18 23:10:26 +01002 * linux/include/asm-arm/arch-iop33x/memory.h
Linus Torvalds1da177e2005-04-16 15:20:36 -07003 */
4
5#ifndef __ASM_ARCH_MEMORY_H
6#define __ASM_ARCH_MEMORY_H
7
Linus Torvalds1da177e2005-04-16 15:20:36 -07008#include <asm/hardware.h>
9
10/*
11 * Physical DRAM offset.
12 */
Nicolas Pitref09b9972005-10-29 21:44:55 +010013#define PHYS_OFFSET UL(0x00000000)
Linus Torvalds1da177e2005-04-16 15:20:36 -070014
15/*
16 * Virtual view <-> PCI DMA view memory address translations
17 * virt_to_bus: Used to translate the virtual address to an
18 * address suitable to be passed to set_dma_addr
19 * bus_to_virt: Used to convert an address for DMA operations
20 * to an address that the kernel can use.
21 */
Lennert Buytenhek7e9740b2006-09-18 23:17:36 +010022#define __virt_to_bus(x) (((__virt_to_phys(x)) & ~(*IOP3XX_IATVR2)) | ((*IOP3XX_IABAR2) & 0xfffffff0))
23#define __bus_to_virt(x) (__phys_to_virt(((x) & ~(*IOP3XX_IALR2)) | ( *IOP3XX_IATVR2)))
Linus Torvalds1da177e2005-04-16 15:20:36 -070024
Linus Torvalds1da177e2005-04-16 15:20:36 -070025
Linus Torvalds1da177e2005-04-16 15:20:36 -070026#endif