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 | |
Linus Walleij | d5608bb | 2011-12-15 11:41:09 +0100 | [diff] [blame] | 13 | /* |
| 14 | * Macros to get at IO space when running virtually |
Srinidhi Kasagar | ffae4e0 | 2009-11-28 08:10:40 +0100 | [diff] [blame] | 15 | * We dont map all the peripherals, let ioremap do |
| 16 | * this for us. We map only very basic peripherals here. |
| 17 | */ |
| 18 | #define U8500_IO_VIRTUAL 0xf0000000 |
| 19 | #define U8500_IO_PHYSICAL 0xa0000000 |
Linus Walleij | bc71c09 | 2012-01-23 11:54:44 +0100 | [diff] [blame] | 20 | /* This is where we map in the ROM to check ASIC IDs */ |
| 21 | #define UX500_VIRT_ROM 0xf0000000 |
Srinidhi Kasagar | ffae4e0 | 2009-11-28 08:10:40 +0100 | [diff] [blame] | 22 | |
Linus Walleij | d5608bb | 2011-12-15 11:41:09 +0100 | [diff] [blame] | 23 | /* This macro is used in assembly, so no cast */ |
Srinidhi Kasagar | ffae4e0 | 2009-11-28 08:10:40 +0100 | [diff] [blame] | 24 | #define IO_ADDRESS(x) \ |
| 25 | (((x) & 0x0fffffff) + (((x) >> 4) & 0x0f000000) + U8500_IO_VIRTUAL) |
| 26 | |
| 27 | /* typesafe io address */ |
Rob Herring | a2a47ca | 2012-03-09 17:16:40 -0600 | [diff] [blame] | 28 | #define __io_address(n) IOMEM(IO_ADDRESS(n)) |
Linus Walleij | bc71c09 | 2012-01-23 11:54:44 +0100 | [diff] [blame] | 29 | |
Linus Walleij | d5608bb | 2011-12-15 11:41:09 +0100 | [diff] [blame] | 30 | /* Used by some plat-nomadik code */ |
Rabin Vincent | 94bdc0e | 2010-03-03 04:54:37 +0100 | [diff] [blame] | 31 | #define io_p2v(n) __io_address(n) |
Srinidhi Kasagar | ffae4e0 | 2009-11-28 08:10:40 +0100 | [diff] [blame] | 32 | |
Rabin Vincent | c9c0957 | 2010-05-03 07:34:53 +0100 | [diff] [blame] | 33 | #include <mach/db8500-regs.h> |
Srinidhi Kasagar | ffae4e0 | 2009-11-28 08:10:40 +0100 | [diff] [blame] | 34 | |
Ola Lilja | f629a7a | 2012-01-30 15:18:22 +0100 | [diff] [blame] | 35 | #define MSP_TX_RX_REG_OFFSET 0 |
Andreas Westin | 585d188 | 2012-05-10 10:14:06 +0200 | [diff] [blame] | 36 | #define CRYP1_RX_REG_OFFSET 0x10 |
| 37 | #define CRYP1_TX_REG_OFFSET 0x8 |
| 38 | #define HASH1_TX_REG_OFFSET 0x4 |
Ola Lilja | f629a7a | 2012-01-30 15:18:22 +0100 | [diff] [blame] | 39 | |
Rabin Vincent | 75a36ee | 2010-03-01 05:05:56 +0100 | [diff] [blame] | 40 | #ifndef __ASSEMBLY__ |
| 41 | |
Rabin Vincent | abf12d7 | 2010-12-08 11:07:59 +0530 | [diff] [blame] | 42 | #include <mach/id.h> |
Linus Walleij | 1187189 | 2011-03-29 16:53:29 +0200 | [diff] [blame] | 43 | extern void __iomem *_PRCMU_BASE; |
Rabin Vincent | 591d8dd | 2010-05-03 08:46:51 +0100 | [diff] [blame] | 44 | |
Rabin Vincent | 01afdd1 | 2010-12-08 11:07:55 +0530 | [diff] [blame] | 45 | #define ARRAY_AND_SIZE(x) (x), ARRAY_SIZE(x) |
| 46 | |
Linus Walleij | d5608bb | 2011-12-15 11:41:09 +0100 | [diff] [blame] | 47 | #endif /* __ASSEMBLY__ */ |
Srinidhi Kasagar | ffae4e0 | 2009-11-28 08:10:40 +0100 | [diff] [blame] | 48 | #endif /* __MACH_HARDWARE_H */ |