Path: blob/master/arch/arm/mach-lpc32xx/include/mach/hardware.h
10820 views
/*1* arch/arm/mach-lpc32xx/include/mach/hardware.h2*3* Copyright (c) 2005 MontaVista Software, Inc. <[email protected]>4*5* This program is free software; you can redistribute it and/or modify6* it under the terms of the GNU General Public License as published by7* the Free Software Foundation; either version 2 of the License, or8* (at your option) any later version.9*10* This program is distributed in the hope that it will be useful,11* but WITHOUT ANY WARRANTY; without even the implied warranty of12* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the13* GNU General Public License for more details.14*/1516#ifndef __ASM_ARCH_HARDWARE_H17#define __ASM_ARCH_HARDWARE_H1819/*20* Start of virtual addresses for IO devices21*/22#define IO_BASE 0xF00000002324/*25* This macro relies on fact that for all HW i/o addresses bits 20-23 are 026*/27#define IO_ADDRESS(x) (((((x) & 0xff000000) >> 4) | ((x) & 0xfffff)) |\28IO_BASE)2930#define io_p2v(x) ((void __iomem *) (unsigned long) IO_ADDRESS(x))31#define io_v2p(x) ((((x) & 0x0ff00000) << 4) | ((x) & 0x000fffff))3233#endif343536