[PATCH V4 06/62] ST SPEAr13XX: Adding machine specific header files
Russell King - ARM Linux
linux at arm.linux.org.uk
Tue Jan 18 11:00:37 EST 2011
On Tue, Jan 18, 2011 at 12:41:34PM +0530, Viresh Kumar wrote:
> +#define MISC_BASE VA_SPEAR13XX_MISC_BASE
> +
> +/* General Configuration */
> +#define SOC_CFG ((unsigned int *)(MISC_BASE + 0x000))
> +#define BOOTSTRAP_CFG ((unsigned int *)(MISC_BASE + 0x004))
You could really do with an IOMEM() macro, thus:
#ifndef __ASSEMBLY__
#define IOMEM(x) ((void __iomem __force *)(x))
#else
#define IOMEM(x) (x)
#endif
You can then use that for stuff like VA_SPEAR13XX_MISC_BASE, and all
these definitions then become:
#define SOC_CFG (MISC_BASE + 0x000)
because GCC allows void pointer arithmetic (treats it as char).
More information about the linux-arm-kernel
mailing list