summaryrefslogtreecommitdiff
path: root/arch/arm/include/asm/arch-lpc32xx
diff options
context:
space:
mode:
authorLiam Beguin <lbeguin@tycoint.com>2017-03-14 15:24:44 (GMT)
committerHeiko Schocher <hs@denx.de>2017-03-28 04:27:14 (GMT)
commitfb057880138447019945a6ab3b88038220226017 (patch)
treeaad89817dfc04d907613a019b13e0a5d0c461ebf /arch/arm/include/asm/arch-lpc32xx
parentddfd0821691d230b00f9690766aa6197ff628fd7 (diff)
downloadu-boot-fb057880138447019945a6ab3b88038220226017.tar.xz
i2c: lpc32xx: Move definitions to header file
Since the lpc32xx i2c driver does not yet support the devicetree bindings, this structure is also needed by the board file as the hardware description is done there. Signed-off-by: Liam Beguin <lbeguin@tycoint.com> Signed-off-by: Sylvain Lemieux <slemieux@tycoint.com>
Diffstat (limited to 'arch/arm/include/asm/arch-lpc32xx')
-rw-r--r--arch/arm/include/asm/arch-lpc32xx/i2c.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/arch/arm/include/asm/arch-lpc32xx/i2c.h b/arch/arm/include/asm/arch-lpc32xx/i2c.h
new file mode 100644
index 0000000..5301d4c
--- /dev/null
+++ b/arch/arm/include/asm/arch-lpc32xx/i2c.h
@@ -0,0 +1,37 @@
+#ifndef _LPC32XX_I2C_H
+#define _LPC32XX_I2C_H
+
+#include <common.h>
+#include <asm/types.h>
+
+/* i2c register set */
+struct lpc32xx_i2c_base {
+ union {
+ u32 rx;
+ u32 tx;
+ };
+ u32 stat;
+ u32 ctrl;
+ u32 clk_hi;
+ u32 clk_lo;
+ u32 adr;
+ u32 rxfl;
+ u32 txfl;
+ u32 rxb;
+ u32 txb;
+ u32 stx;
+ u32 stxfl;
+};
+
+#ifdef CONFIG_DM_I2C
+enum {
+ I2C_0, I2C_1, I2C_2,
+};
+
+struct lpc32xx_i2c_dev {
+ struct lpc32xx_i2c_base *base;
+ int index;
+ uint speed;
+};
+#endif /* CONFIG_DM_I2C */
+#endif /* _LPC32XX_I2C_H */