blob: 28d16e744bfd49c11693a7c97743c1aeb5d1194d [file] [log] [blame]
Srinidhi Kasagarffae4e02009-11-28 08:10:40 +01001/*
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 Walleijd5608bb2011-12-15 11:41:09 +010013/*
14 * Macros to get at IO space when running virtually
Srinidhi Kasagarffae4e02009-11-28 08:10:40 +010015 * 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 Walleijbc71c092012-01-23 11:54:44 +010020/* This is where we map in the ROM to check ASIC IDs */
21#define UX500_VIRT_ROM 0xf0000000
Srinidhi Kasagarffae4e02009-11-28 08:10:40 +010022
Linus Walleijd5608bb2011-12-15 11:41:09 +010023/* This macro is used in assembly, so no cast */
Srinidhi Kasagarffae4e02009-11-28 08:10:40 +010024#define IO_ADDRESS(x) \
25 (((x) & 0x0fffffff) + (((x) >> 4) & 0x0f000000) + U8500_IO_VIRTUAL)
26
27/* typesafe io address */
Rob Herringa2a47ca2012-03-09 17:16:40 -060028#define __io_address(n) IOMEM(IO_ADDRESS(n))
Linus Walleijbc71c092012-01-23 11:54:44 +010029
Linus Walleijd5608bb2011-12-15 11:41:09 +010030/* Used by some plat-nomadik code */
Rabin Vincent94bdc0e2010-03-03 04:54:37 +010031#define io_p2v(n) __io_address(n)
Srinidhi Kasagarffae4e02009-11-28 08:10:40 +010032
Rabin Vincentc9c09572010-05-03 07:34:53 +010033#include <mach/db8500-regs.h>
Srinidhi Kasagarffae4e02009-11-28 08:10:40 +010034
Ola Liljaf629a7a2012-01-30 15:18:22 +010035#define MSP_TX_RX_REG_OFFSET 0
Andreas Westin585d1882012-05-10 10:14:06 +020036#define CRYP1_RX_REG_OFFSET 0x10
37#define CRYP1_TX_REG_OFFSET 0x8
38#define HASH1_TX_REG_OFFSET 0x4
Ola Liljaf629a7a2012-01-30 15:18:22 +010039
Rabin Vincent75a36ee2010-03-01 05:05:56 +010040#ifndef __ASSEMBLY__
41
Rabin Vincentabf12d72010-12-08 11:07:59 +053042#include <mach/id.h>
Linus Walleij11871892011-03-29 16:53:29 +020043extern void __iomem *_PRCMU_BASE;
Rabin Vincent591d8dd2010-05-03 08:46:51 +010044
Rabin Vincent01afdd12010-12-08 11:07:55 +053045#define ARRAY_AND_SIZE(x) (x), ARRAY_SIZE(x)
46
Linus Walleijd5608bb2011-12-15 11:41:09 +010047#endif /* __ASSEMBLY__ */
Srinidhi Kasagarffae4e02009-11-28 08:10:40 +010048#endif /* __MACH_HARDWARE_H */