[PATCH 1/3] mxs: ssp move to common register layout

Sascha Hauer s.hauer at pengutronix.de
Tue Feb 5 04:10:11 EST 2013


The commit log looks a bit sparse. Subject should include

"ARM mxs:"

Also, why are you doing this? (The next patch makes this clear, but this
one should contain an explanation)

On Mon, Feb 04, 2013 at 06:26:19PM +0100, Michael Grzeschik wrote:
> Signed-off-by: Michael Grzeschik <m.grzeschik at pengutronix.de>
> ---
>  arch/arm/mach-mxs/include/mach/imx23-regs.h |   16 ++++
>  arch/arm/mach-mxs/include/mach/imx28-regs.h |   21 +++++
>  arch/arm/mach-mxs/include/mach/ssp.h        |   77 +++++++++++++++++
>  drivers/mci/mxs.c                           |  118 +--------------------------
>  4 files changed, 115 insertions(+), 117 deletions(-)
>  create mode 100644 arch/arm/mach-mxs/include/mach/ssp.h
> 
> diff --git a/arch/arm/mach-mxs/include/mach/imx23-regs.h b/arch/arm/mach-mxs/include/mach/imx23-regs.h
> index 7fb664b..9e8e86c 100644
> --- a/arch/arm/mach-mxs/include/mach/imx23-regs.h
> +++ b/arch/arm/mach-mxs/include/mach/imx23-regs.h
> @@ -36,4 +36,20 @@
>  #define IMX_DIGCTL_BASE		0x8001c000
>  #define IMX_USB_BASE		0x80080000
>  
> +#define HW_SSP_CTRL0		0x000
> +#define HW_SSP_CMD0		0x010
> +#define HW_SSP_CMD1		0x020
> +#define HW_SSP_COMPREF		0x030
> +#define HW_SSP_COMPMASK		0x040
> +#define HW_SSP_TIMING		0x050
> +#define HW_SSP_CTRL1		0x060
> +#define HW_SSP_DATA		0x070
> +#define HW_SSP_SDRESP0		0x080
> +#define HW_SSP_SDRESP1		0x090
> +#define HW_SSP_SDRESP2		0x0A0
> +#define HW_SSP_SDRESP3		0x0B0
> +#define HW_SSP_STATUS		0x0C0
> +#define HW_SSP_DEBUG		0x100
> +#define HW_SSP_VERSION		0x110
> +
>  #endif /* __ASM_ARCH_MX23_REGS_H */
> diff --git a/arch/arm/mach-mxs/include/mach/imx28-regs.h b/arch/arm/mach-mxs/include/mach/imx28-regs.h
> index fa8edd7..bbe1848 100644
> --- a/arch/arm/mach-mxs/include/mach/imx28-regs.h
> +++ b/arch/arm/mach-mxs/include/mach/imx28-regs.h
> @@ -45,4 +45,25 @@
>  #define IMX_FEC0_BASE		0x800F0000
>  #define IMX_FEC1_BASE		0x800F4000
>  
> +#define HW_SSP_CTRL0		0x000
> +#define HW_SSP_CMD0		0x010
> +#define HW_SSP_CMD1		0x020
> +#define HW_SSP_XFER_COUNT	0x030
> +#define HW_SSP_BLOCK_SIZE	0x040
> +#define HW_SSP_COMPREF		0x050
> +#define HW_SSP_COMPMASK		0x060
> +#define HW_SSP_TIMING		0x070
> +#define HW_SSP_CTRL1		0x080
> +#define HW_SSP_DATA		0x090
> +#define HW_SSP_SDRESP0		0x0A0
> +#define HW_SSP_SDRESP1		0x0B0
> +#define HW_SSP_SDRESP2		0x0C0
> +#define HW_SSP_SDRESP3		0x0D0
> +#define HW_SSP_DDR_CTRL		0x0E0
> +#define HW_SSP_DLL_CTRL		0x0F0
> +#define HW_SSP_STATUS		0x100
> +#define HW_SSP_DLL_STS		0x110
> +#define HW_SSP_DEBUG		0x120
> +#define HW_SSP_VERSION		0x130

I prefer having these in mach/ssp.h. include files should not have
conflicting defines. Ideally some code working on i.MX23 and i.MX28
should be able to include both files without errors.

In an even better world there wouldn't be #ifdefs in include files
at all, but ok, there must remain something to improve for the future...

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



More information about the barebox mailing list