summaryrefslogtreecommitdiff
path: root/arch/powerpc/include/asm/mpc52xx_psc.h
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2015-07-14 12:19:56 +0300
committerMark Brown <broonie@kernel.org>2015-07-17 21:27:32 +0300
commit8bf960985dfc9fcb231a07dc3102ed828f66fe81 (patch)
tree4837b8b172d88b3c55fdb5ec4014db49258f7878 /arch/powerpc/include/asm/mpc52xx_psc.h
parentbc0195aad0daa2ad5b0d76cce22b167bc3435590 (diff)
downloadlinux-8bf960985dfc9fcb231a07dc3102ed828f66fe81.tar.xz
spi: mpc512x-psc: add support for Freescale MPC5125
The register layout of the PSC devices differ between MPC5121 and MPC5125, but the registers are named nearly identical and their purpose is similar enough ("freescale identical") such that substituting mpc52xx_psc by mpc5125_psc is nearly enough to make the driver work on MPC5125. To keep supporting MPC5121 this patch introduces a cpp macro to select the right struct that defines the register layout. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'arch/powerpc/include/asm/mpc52xx_psc.h')
-rw-r--r--arch/powerpc/include/asm/mpc52xx_psc.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/powerpc/include/asm/mpc52xx_psc.h b/arch/powerpc/include/asm/mpc52xx_psc.h
index d0ece257d310..04c7e8fc24c2 100644
--- a/arch/powerpc/include/asm/mpc52xx_psc.h
+++ b/arch/powerpc/include/asm/mpc52xx_psc.h
@@ -150,7 +150,10 @@
/* Structure of the hardware registers */
struct mpc52xx_psc {
- u8 mode; /* PSC + 0x00 */
+ union {
+ u8 mode; /* PSC + 0x00 */
+ u8 mr2;
+ };
u8 reserved0[3];
union { /* PSC + 0x04 */
u16 status;