mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-02 03:44:36 +08:00
a2a47ca366
Several platforms incorrectly use __io() for casting to 'void __iomem *'. This converts all of those uses to use the common IOMEM macro. Reported-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Rob Herring <rob.herring@calxeda.com> Acked-by: Anton Vorontsov <cbouatmailru@gmail.com> Cc: Russell King <linux@arm.linux.org.uk> Cc: Paul Mundt <lethal@linux-sh.org> Cc: Magnus Damm <magnus.damm@gmail.com> Cc: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Cc: linux-sh@vger.kernel.org Acked-by: Arnd Bergmann <arnd@arndb.de>
42 lines
1.1 KiB
C
42 lines
1.1 KiB
C
/*
|
|
* Copyright (C) 2009 ST-Ericsson.
|
|
*
|
|
* U8500 hardware definitions
|
|
*
|
|
* This file is licensed under the terms of the GNU General Public
|
|
* License version 2. This program is licensed "as is" without any
|
|
* warranty of any kind, whether express or implied.
|
|
*/
|
|
#ifndef __MACH_HARDWARE_H
|
|
#define __MACH_HARDWARE_H
|
|
|
|
/*
|
|
* Macros to get at IO space when running virtually
|
|
* We dont map all the peripherals, let ioremap do
|
|
* this for us. We map only very basic peripherals here.
|
|
*/
|
|
#define U8500_IO_VIRTUAL 0xf0000000
|
|
#define U8500_IO_PHYSICAL 0xa0000000
|
|
|
|
/* This macro is used in assembly, so no cast */
|
|
#define IO_ADDRESS(x) \
|
|
(((x) & 0x0fffffff) + (((x) >> 4) & 0x0f000000) + U8500_IO_VIRTUAL)
|
|
|
|
/* typesafe io address */
|
|
#define __io_address(n) IOMEM(IO_ADDRESS(n))
|
|
/* Used by some plat-nomadik code */
|
|
#define io_p2v(n) __io_address(n)
|
|
|
|
#include <mach/db8500-regs.h>
|
|
#include <mach/db5500-regs.h>
|
|
|
|
#ifndef __ASSEMBLY__
|
|
|
|
#include <mach/id.h>
|
|
extern void __iomem *_PRCMU_BASE;
|
|
|
|
#define ARRAY_AND_SIZE(x) (x), ARRAY_SIZE(x)
|
|
|
|
#endif /* __ASSEMBLY__ */
|
|
#endif /* __MACH_HARDWARE_H */
|