[U-Boot] [u-boot] [PATCH][1/2] mx27: Add necessary defines and helper functions to support I2C in i.MX27.
Heiko Schocher
hs at denx.de
Mon Nov 2 08:07:01 CET 2009
Hello Javier,
Javier Martin wrote:
> Add proper register definitions, macros and clock functions required
> for I2C driver to be developed.
>
>
>
> Signed-off-by: Javier Martin <javier.martin at vista-silicon.com>
> --
> diff --git a/cpu/arm926ejs/mx27/generic.c b/cpu/arm926ejs/mx27/generic.c
> index 808371f..540ef0c 100644
[...]
> diff --git a/include/asm-arm/arch-mx27/imx-regs.h b/include/asm-arm/arch-mx27/imx-regs.h
> index d36a6da..2b89b4e 100644
> --- a/include/asm-arm/arch-mx27/imx-regs.h
> +++ b/include/asm-arm/arch-mx27/imx-regs.h
> @@ -206,6 +206,10 @@ struct iim_regs {
> };
> #endif
>
> +#define __REG(x) (*((volatile u32 *)(x)))
> +#define __REG16(x) (*((volatile u16 *)(x)))
> +#define __REG8(x) (*((volatile u8 *)(x)))
> +
Why you need this? Couldn;t you use io accessor from asm/io.h?
bye,
Heiko
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
More information about the U-Boot
mailing list