Srinidhi Kasagar | ffae4e0 | 2009-11-28 08:10:40 +0100 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2009 ST-Ericsson. |
| 3 | * |
| 4 | * U8500 hardware definitions |
| 5 | * |
| 6 | * This file is licensed under the terms of the GNU General Public |
| 7 | * License version 2. This program is licensed "as is" without any |
| 8 | * warranty of any kind, whether express or implied. |
| 9 | */ |
| 10 | #ifndef __MACH_HARDWARE_H |
| 11 | #define __MACH_HARDWARE_H |
| 12 | |
| 13 | /* macros to get at IO space when running virtually |
| 14 | * We dont map all the peripherals, let ioremap do |
| 15 | * this for us. We map only very basic peripherals here. |
| 16 | */ |
| 17 | #define U8500_IO_VIRTUAL 0xf0000000 |
| 18 | #define U8500_IO_PHYSICAL 0xa0000000 |
| 19 | |
| 20 | /* this macro is used in assembly, so no cast */ |
| 21 | #define IO_ADDRESS(x) \ |
| 22 | (((x) & 0x0fffffff) + (((x) >> 4) & 0x0f000000) + U8500_IO_VIRTUAL) |
| 23 | |
| 24 | /* typesafe io address */ |
| 25 | #define __io_address(n) __io(IO_ADDRESS(n)) |
Rabin Vincent | 94bdc0e | 2010-03-03 04:54:37 +0100 | [diff] [blame] | 26 | /* used by some plat-nomadik code */ |
| 27 | #define io_p2v(n) __io_address(n) |
Srinidhi Kasagar | ffae4e0 | 2009-11-28 08:10:40 +0100 | [diff] [blame] | 28 | |
Rabin Vincent | c9c0957 | 2010-05-03 07:34:53 +0100 | [diff] [blame] | 29 | #include <mach/db8500-regs.h> |
| 30 | #include <mach/db5500-regs.h> |
Srinidhi Kasagar | ffae4e0 | 2009-11-28 08:10:40 +0100 | [diff] [blame] | 31 | |
Srinidhi Kasagar | ffae4e0 | 2009-11-28 08:10:40 +0100 | [diff] [blame] | 32 | /* ST-Ericsson modified pl022 id */ |
| 33 | #define SSP_PER_ID 0x01080022 |
| 34 | |
Rabin Vincent | 75a36ee | 2010-03-01 05:05:56 +0100 | [diff] [blame] | 35 | #ifndef __ASSEMBLY__ |
| 36 | |
Rabin Vincent | abf12d7 | 2010-12-08 11:07:59 +0530 | [diff] [blame] | 37 | #include <mach/id.h> |
Rabin Vincent | 591d8dd | 2010-05-03 08:46:51 +0100 | [diff] [blame] | 38 | |
Rabin Vincent | 01afdd1 | 2010-12-08 11:07:55 +0530 | [diff] [blame] | 39 | #define ARRAY_AND_SIZE(x) (x), ARRAY_SIZE(x) |
| 40 | |
Rabin Vincent | 75a36ee | 2010-03-01 05:05:56 +0100 | [diff] [blame] | 41 | #endif |
| 42 | |
Srinidhi Kasagar | ffae4e0 | 2009-11-28 08:10:40 +0100 | [diff] [blame] | 43 | #endif /* __MACH_HARDWARE_H */ |