Add GPL-2.0+ SPDX-License-Identifier to source files
[platform/kernel/u-boot.git] / board / freescale / common / qixis.h
index 7a0268a..26e2eeb 100644 (file)
@@ -2,10 +2,7 @@
  * Copyright 2011 Freescale Semiconductor
  * Author: Shengzhou Liu <Shengzhou.Liu@freescale.com>
  *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
- * any later version.
+ * SPDX-License-Identifier:    GPL-2.0+
  *
  * This file provides support for the QIXIS of some Freescale reference boards.
  */
@@ -26,7 +23,7 @@ struct qixis {
        u8 stat_sys;
        u8 stat_alrm;
        u8 present;
-       u8 ctl_sys2;
+       u8 present2;    /* Presence Status Register 2,0x0c */
        u8 rcw_ctl;
        u8 ctl_led;
        u8 i2cblk;
@@ -78,7 +75,11 @@ struct qixis {
        u8 trig_stat;
        u8 res12[3];
        u8 trig_ctr[4];
-       u8 res13[48];
+       u8 res13[16];
+       u8 clk_freq[6]; /* Clock Measurement Registers */
+       u8 res_c6[8];
+       u8 clk_base[2]; /* Clock Frequency Base Reg */
+       u8 res_d0[16];
        u8 aux2[4];     /* Auxiliary Registers,0xE0 */
        u8 res14[10];
        u8 aux_ad;
@@ -86,16 +87,23 @@ struct qixis {
        u8 res15[16];
 };
 
-#define QIXIS_BASE             0xffdf0000
-#define QIXIS_LBMAP_SWITCH     7
-#define QIXIS_LBMAP_MASK       0x0f
-#define QIXIS_LBMAP_SHIFT      0
-#define QIXIS_LBMAP_ALTBANK    0x04
-
 u8 qixis_read(unsigned int reg);
 void qixis_write(unsigned int reg, u8 value);
+u16 qixis_read_minor(void);
+char *qixis_read_time(char *result);
+char *qixis_read_tag(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_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