Path: blob/master/arch/arm/mach-footbridge/include/mach/memory.h
17628 views
/*1* arch/arm/mach-footbridge/include/mach/memory.h2*3* Copyright (C) 1996-1999 Russell King.4*5* This program is free software; you can redistribute it and/or modify6* it under the terms of the GNU General Public License version 2 as7* published by the Free Software Foundation.8*9* Changelog:10* 20-Oct-1996 RMK Created11* 31-Dec-1997 RMK Fixed definitions to reduce warnings.12* 17-May-1998 DAG Added __virt_to_bus and __bus_to_virt functions.13* 21-Nov-1998 RMK Changed __virt_to_bus and __bus_to_virt to macros.14* 21-Mar-1999 RMK Added PAGE_OFFSET for co285 architecture.15* Renamed to memory.h16* Moved PAGE_OFFSET and TASK_SIZE here17*/18#ifndef __ASM_ARCH_MEMORY_H19#define __ASM_ARCH_MEMORY_H202122#if defined(CONFIG_FOOTBRIDGE_ADDIN)23/*24* If we may be using add-in footbridge mode, then we must25* use the out-of-line translation that makes use of the26* PCI BAR27*/28#ifndef __ASSEMBLY__29extern unsigned long __virt_to_bus(unsigned long);30extern unsigned long __bus_to_virt(unsigned long);31extern unsigned long __pfn_to_bus(unsigned long);32extern unsigned long __bus_to_pfn(unsigned long);33#endif34#define __virt_to_bus __virt_to_bus35#define __bus_to_virt __bus_to_virt3637#elif defined(CONFIG_FOOTBRIDGE_HOST)3839/*40* The footbridge is programmed to expose the system RAM at 0xe0000000.41* The requirement is that the RAM isn't placed at bus address 0, which42* would clash with VGA cards.43*/44#define BUS_OFFSET 0xe000000045#define __virt_to_bus(x) ((x) + (BUS_OFFSET - PAGE_OFFSET))46#define __bus_to_virt(x) ((x) - (BUS_OFFSET - PAGE_OFFSET))47#define __pfn_to_bus(x) (__pfn_to_phys(x) + (BUS_OFFSET - PHYS_OFFSET))48#define __bus_to_pfn(x) __phys_to_pfn((x) - (BUS_OFFSET - PHYS_OFFSET))4950#else5152#error "Undefined footbridge mode"5354#endif5556/*57* Cache flushing area.58*/59#define FLUSH_BASE 0xf90000006061/*62* Physical DRAM offset.63*/64#define PLAT_PHYS_OFFSET UL(0x00000000)6566#define FLUSH_BASE_PHYS 0x500000006768#endif697071