|
@@ -92,8 +92,17 @@ u16 qixis_read_minor(void);
|
|
char *qixis_read_time(char *result);
|
|
char *qixis_read_time(char *result);
|
|
char *qixis_read_tag(char *buf);
|
|
char *qixis_read_tag(char *buf);
|
|
const char *byte_to_binary_mask(u8 val, u8 mask, char *buf);
|
|
const char *byte_to_binary_mask(u8 val, u8 mask, char *buf);
|
|
|
|
+#ifdef CONFIG_SYS_I2C_FPGA_ADDR
|
|
|
|
+u8 qixis_read_i2c(unsigned int reg);
|
|
|
|
+void qixis_write_i2c(unsigned int reg, u8 value);
|
|
|
|
+#endif
|
|
|
|
|
|
#define QIXIS_READ(reg) qixis_read(offsetof(struct qixis, reg))
|
|
#define QIXIS_READ(reg) qixis_read(offsetof(struct qixis, reg))
|
|
#define QIXIS_WRITE(reg, value) qixis_write(offsetof(struct qixis, reg), value)
|
|
#define QIXIS_WRITE(reg, value) qixis_write(offsetof(struct qixis, reg), value)
|
|
|
|
+#ifdef CONFIG_SYS_I2C_FPGA_ADDR
|
|
|
|
+#define QIXIS_READ_I2C(reg) qixis_read_i2c(offsetof(struct qixis, reg))
|
|
|
|
+#define QIXIS_WRITE_I2C(reg, value) \
|
|
|
|
+ qixis_write_i2c(offsetof(struct qixis, reg), value)
|
|
|
|
+#endif
|
|
|
|
|
|
#endif
|
|
#endif
|