From ac87c17d344ede52d8d421addf92cbb2e271f73e Mon Sep 17 00:00:00 2001 From: Stefano Babic Date: Wed, 19 Jan 2011 22:46:33 +0000 Subject: SPI: mxc_spi: replace fixed offsets with structures This patch cleans driver code replacing all accesses to registers with fixed offsets with a corresponding structure. Signed-off-by: Stefano Babic --- arch/arm/include/asm/arch-mx31/mx31-regs.h | 11 +++++++++++ arch/arm/include/asm/arch-mx35/imx-regs.h | 12 ++++++++++++ arch/arm/include/asm/arch-mx5/imx-regs.h | 12 ++++++++++++ 3 files changed, 35 insertions(+) (limited to 'arch') diff --git a/arch/arm/include/asm/arch-mx31/mx31-regs.h b/arch/arm/include/asm/arch-mx31/mx31-regs.h index 46ed47c..105f7d8 100644 --- a/arch/arm/include/asm/arch-mx31/mx31-regs.h +++ b/arch/arm/include/asm/arch-mx31/mx31-regs.h @@ -64,6 +64,17 @@ struct gpio_regs { u32 gpio_psr; }; +struct cspi_regs { + u32 rxdata; + u32 txdata; + u32 ctrl; + u32 intr; + u32 dma; + u32 stat; + u32 period; + u32 test; +}; + #define IOMUX_PADNUM_MASK 0x1ff #define IOMUX_PIN(gpionum, padnum) ((padnum) & IOMUX_PADNUM_MASK) diff --git a/arch/arm/include/asm/arch-mx35/imx-regs.h b/arch/arm/include/asm/arch-mx35/imx-regs.h index 7978444..e741fb0 100644 --- a/arch/arm/include/asm/arch-mx35/imx-regs.h +++ b/arch/arm/include/asm/arch-mx35/imx-regs.h @@ -265,6 +265,18 @@ struct gpt_regs { u32 counter; /* counter */ }; +/* CSPI registers */ +struct cspi_regs { + u32 rxdata; + u32 txdata; + u32 ctrl; + u32 intr; + u32 dma; + u32 stat; + u32 period; + u32 test; +}; + /* Watchdog Timer (WDOG) registers */ struct wdog_regs { u16 wcr; /* Control */ diff --git a/arch/arm/include/asm/arch-mx5/imx-regs.h b/arch/arm/include/asm/arch-mx5/imx-regs.h index 09b69f6..a1849f8 100644 --- a/arch/arm/include/asm/arch-mx5/imx-regs.h +++ b/arch/arm/include/asm/arch-mx5/imx-regs.h @@ -256,6 +256,18 @@ struct src { u32 simr; }; +/* CSPI registers */ +struct cspi_regs { + u32 rxdata; + u32 txdata; + u32 ctrl; + u32 cfg; + u32 intr; + u32 dma; + u32 stat; + u32 period; +}; + struct iim_regs { u32 stat; u32 statm; -- cgit v1.1