Path: blob/master/arch/arm/mach-ixp23xx/include/mach/memory.h
15157 views
/*1* arch/arm/mach-ixp23xx/include/mach/memory.h2*3* Copyright (c) 2003-2004 Intel Corp.4*5* This program is free software; you can redistribute it and/or modify it6* under the terms of the GNU General Public License as published by the7* Free Software Foundation; either version 2 of the License, or (at your8* option) any later version.9*/1011#ifndef __ASM_ARCH_MEMORY_H12#define __ASM_ARCH_MEMORY_H1314#include <mach/hardware.h>1516/*17* Physical DRAM offset.18*/19#define PLAT_PHYS_OFFSET (0x00000000)2021#define IXP23XX_PCI_SDRAM_OFFSET (*((volatile int *)IXP23XX_PCI_SDRAM_BAR) & 0xfffffff0)2223#define __phys_to_bus(x) ((x) + (IXP23XX_PCI_SDRAM_OFFSET - PHYS_OFFSET))24#define __bus_to_phys(x) ((x) - (IXP23XX_PCI_SDRAM_OFFSET - PHYS_OFFSET))2526#define __virt_to_bus(v) __phys_to_bus(__virt_to_phys(v))27#define __bus_to_virt(b) __phys_to_virt(__bus_to_phys(b))28#define __pfn_to_bus(p) __phys_to_bus(__pfn_to_phys(p))29#define __bus_to_pfn(b) __phys_to_pfn(__bus_to_phys(b))3031#define arch_is_coherent() 13233#endif343536