treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157
[sfrench/cifs-2.6.git] / arch / arm / mach-lpc32xx / include / mach / hardware.h
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /*
3  * arch/arm/mach-lpc32xx/include/mach/hardware.h
4  *
5  * Copyright (c) 2005 MontaVista Software, Inc. <source@mvista.com>
6  */
7
8 #ifndef __ASM_ARCH_HARDWARE_H
9 #define __ASM_ARCH_HARDWARE_H
10
11 /*
12  * Start of virtual addresses for IO devices
13  */
14 #define IO_BASE         0xF0000000
15
16 /*
17  * This macro relies on fact that for all HW i/o addresses bits 20-23 are 0
18  */
19 #define IO_ADDRESS(x)   IOMEM(((((x) & 0xff000000) >> 4) | ((x) & 0xfffff)) |\
20                          IO_BASE)
21
22 #define io_p2v(x)       ((void __iomem *) (unsigned long) IO_ADDRESS(x))
23 #define io_v2p(x)       ((((x) & 0x0ff00000) << 4) | ((x) & 0x000fffff))
24
25 #endif