Blackfin: bfin_spi.h: add MMR peripheral layout
authorMike Frysinger <vapier@gentoo.org>
Fri, 22 Oct 2010 05:11:08 +0000 (05:11 +0000)
committerMike Frysinger <vapier@gentoo.org>
Fri, 22 Oct 2010 20:30:03 +0000 (16:30 -0400)
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
arch/blackfin/include/asm/bfin5xx_spi.h

index 4223cf0..0b5136e 100644 (file)
 #define BIT_STU_SENDOVER    0x0001
 #define BIT_STU_RECVFULL    0x0020
 
+/*
+ * All Blackfin system MMRs are padded to 32bits even if the register
+ * itself is only 16bits.  So use a helper macro to streamline this.
+ */
+#define __BFP(m) u16 m; u16 __pad_##m
+
+/*
+ * bfin spi registers layout
+ */
+struct bfin_spi_regs {
+       __BFP(ctl);
+       __BFP(flg);
+       __BFP(stat);
+       __BFP(tdbr);
+       __BFP(rdbr);
+       __BFP(baud);
+       __BFP(shadow);
+};
+
 #define MAX_CTRL_CS          8  /* cs in spi controller */
 
 /* device.platform_data for SSP controller devices */