|
@@ -700,42 +700,27 @@ struct txmac_regs { /* Location: */
|
|
|
/*
|
|
|
* structure for Wake On Lan Source Address Lo reg in rxmac address map
|
|
|
* located at address 0x4010
|
|
|
+ *
|
|
|
+ * 31-24: sa3
|
|
|
+ * 23-16: sa4
|
|
|
+ * 15-8: sa5
|
|
|
+ * 7-0: sa6
|
|
|
*/
|
|
|
-union RXMAC_WOL_SA_LO_t {
|
|
|
- u32 value;
|
|
|
- struct {
|
|
|
-#ifdef _BIT_FIELDS_HTOL
|
|
|
- u32 sa3:8; /* bits 24-31 */
|
|
|
- u32 sa4:8; /* bits 16-23 */
|
|
|
- u32 sa5:8; /* bits 8-15 */
|
|
|
- u32 sa6:8; /* bits 0-7 */
|
|
|
-#else
|
|
|
- u32 sa6:8; /* bits 0-7 */
|
|
|
- u32 sa5:8; /* bits 8-15 */
|
|
|
- u32 sa4:8; /* bits 16-23 */
|
|
|
- u32 sa3:8; /* bits 24-31 */
|
|
|
-#endif
|
|
|
- } bits;
|
|
|
-};
|
|
|
+
|
|
|
+#define ET_WOL_LO_SA3_SHIFT 24
|
|
|
+#define ET_WOL_LO_SA4_SHIFT 16
|
|
|
+#define ET_WOL_LO_SA5_SHIFT 8
|
|
|
|
|
|
/*
|
|
|
* structure for Wake On Lan Source Address Hi reg in rxmac address map
|
|
|
* located at address 0x4014
|
|
|
+ *
|
|
|
+ * 31-16: reserved
|
|
|
+ * 15-8: sa1
|
|
|
+ * 7-0: sa2
|
|
|
*/
|
|
|
-union RXMAC_WOL_SA_HI_t {
|
|
|
- u32 value;
|
|
|
- struct {
|
|
|
-#ifdef _BIT_FIELDS_HTOL
|
|
|
- u32 reserved:16; /* bits 16-31 */
|
|
|
- u32 sa1:8; /* bits 8-15 */
|
|
|
- u32 sa2:8; /* bits 0-7 */
|
|
|
-#else
|
|
|
- u32 sa2:8; /* bits 0-7 */
|
|
|
- u32 sa1:8; /* bits 8-15 */
|
|
|
- u32 reserved:16; /* bits 16-31 */
|
|
|
-#endif
|
|
|
- } bits;
|
|
|
-};
|
|
|
+
|
|
|
+#define ET_WOL_HI_SA1_SHIFT 8
|
|
|
|
|
|
/*
|
|
|
* structure for Wake On Lan mask reg in rxmac address map
|
|
@@ -746,65 +731,45 @@ union RXMAC_WOL_SA_HI_t {
|
|
|
/*
|
|
|
* structure for Unicast Paket Filter Address 1 reg in rxmac address map
|
|
|
* located at address 0x4068
|
|
|
+ *
|
|
|
+ * 31-24: addr1_3
|
|
|
+ * 23-16: addr1_4
|
|
|
+ * 15-8: addr1_5
|
|
|
+ * 7-0: addr1_6
|
|
|
*/
|
|
|
-union RXMAC_UNI_PF_ADDR1_t {
|
|
|
- u32 value;
|
|
|
- struct {
|
|
|
-#ifdef _BIT_FIELDS_HTOL
|
|
|
- u32 addr1_3:8; /* bits 24-31 */
|
|
|
- u32 addr1_4:8; /* bits 16-23 */
|
|
|
- u32 addr1_5:8; /* bits 8-15 */
|
|
|
- u32 addr1_6:8; /* bits 0-7 */
|
|
|
-#else
|
|
|
- u32 addr1_6:8; /* bits 0-7 */
|
|
|
- u32 addr1_5:8; /* bits 8-15 */
|
|
|
- u32 addr1_4:8; /* bits 16-23 */
|
|
|
- u32 addr1_3:8; /* bits 24-31 */
|
|
|
-#endif
|
|
|
- } bits;
|
|
|
-};
|
|
|
+
|
|
|
+#define ET_UNI_PF_ADDR1_3_SHIFT 24
|
|
|
+#define ET_UNI_PF_ADDR1_4_SHIFT 16
|
|
|
+#define ET_UNI_PF_ADDR1_5_SHIFT 8
|
|
|
|
|
|
/*
|
|
|
* structure for Unicast Paket Filter Address 2 reg in rxmac address map
|
|
|
* located at address 0x406C
|
|
|
+ *
|
|
|
+ * 31-24: addr2_3
|
|
|
+ * 23-16: addr2_4
|
|
|
+ * 15-8: addr2_5
|
|
|
+ * 7-0: addr2_6
|
|
|
*/
|
|
|
-union RXMAC_UNI_PF_ADDR2_t {
|
|
|
- u32 value;
|
|
|
- struct {
|
|
|
-#ifdef _BIT_FIELDS_HTOL
|
|
|
- u32 addr2_3:8; /* bits 24-31 */
|
|
|
- u32 addr2_4:8; /* bits 16-23 */
|
|
|
- u32 addr2_5:8; /* bits 8-15 */
|
|
|
- u32 addr2_6:8; /* bits 0-7 */
|
|
|
-#else
|
|
|
- u32 addr2_6:8; /* bits 0-7 */
|
|
|
- u32 addr2_5:8; /* bits 8-15 */
|
|
|
- u32 addr2_4:8; /* bits 16-23 */
|
|
|
- u32 addr2_3:8; /* bits 24-31 */
|
|
|
-#endif
|
|
|
- } bits;
|
|
|
-};
|
|
|
+
|
|
|
+#define ET_UNI_PF_ADDR2_3_SHIFT 24
|
|
|
+#define ET_UNI_PF_ADDR2_4_SHIFT 16
|
|
|
+#define ET_UNI_PF_ADDR2_5_SHIFT 8
|
|
|
|
|
|
/*
|
|
|
* structure for Unicast Paket Filter Address 1 & 2 reg in rxmac address map
|
|
|
* located at address 0x4070
|
|
|
+ *
|
|
|
+ * 31-24: addr2_1
|
|
|
+ * 23-16: addr2_2
|
|
|
+ * 15-8: addr1_1
|
|
|
+ * 7-0: addr1_2
|
|
|
*/
|
|
|
-union RXMAC_UNI_PF_ADDR3_t {
|
|
|
- u32 value;
|
|
|
- struct {
|
|
|
-#ifdef _BIT_FIELDS_HTOL
|
|
|
- u32 addr2_1:8; /* bits 24-31 */
|
|
|
- u32 addr2_2:8; /* bits 16-23 */
|
|
|
- u32 addr1_1:8; /* bits 8-15 */
|
|
|
- u32 addr1_2:8; /* bits 0-7 */
|
|
|
-#else
|
|
|
- u32 addr1_2:8; /* bits 0-7 */
|
|
|
- u32 addr1_1:8; /* bits 8-15 */
|
|
|
- u32 addr2_2:8; /* bits 16-23 */
|
|
|
- u32 addr2_1:8; /* bits 24-31 */
|
|
|
-#endif
|
|
|
- } bits;
|
|
|
-};
|
|
|
+
|
|
|
+#define ET_UNI_PF_ADDR2_1_SHIFT 24
|
|
|
+#define ET_UNI_PF_ADDR2_2_SHIFT 16
|
|
|
+#define ET_UNI_PF_ADDR1_1_SHIFT 8
|
|
|
+
|
|
|
|
|
|
/*
|
|
|
* structure for Multicast Hash reg in rxmac address map
|
|
@@ -888,13 +853,13 @@ union RXMAC_UNI_PF_ADDR3_t {
|
|
|
/*
|
|
|
* Rx MAC Module of JAGCore Address Mapping
|
|
|
*/
|
|
|
-struct RXMAC_t { /* Location: */
|
|
|
+struct rxmac_regs { /* Location: */
|
|
|
u32 ctrl; /* 0x4000 */
|
|
|
u32 crc0; /* 0x4004 */
|
|
|
u32 crc12; /* 0x4008 */
|
|
|
u32 crc34; /* 0x400C */
|
|
|
- union RXMAC_WOL_SA_LO_t sa_lo; /* 0x4010 */
|
|
|
- union RXMAC_WOL_SA_HI_t sa_hi; /* 0x4014 */
|
|
|
+ u32 sa_lo; /* 0x4010 */
|
|
|
+ u32 sa_hi; /* 0x4014 */
|
|
|
u32 mask0_word0; /* 0x4018 */
|
|
|
u32 mask0_word1; /* 0x401C */
|
|
|
u32 mask0_word2; /* 0x4020 */
|
|
@@ -915,9 +880,9 @@ struct RXMAC_t { /* Location: */
|
|
|
u32 mask4_word1; /* 0x405C */
|
|
|
u32 mask4_word2; /* 0x4060 */
|
|
|
u32 mask4_word3; /* 0x4064 */
|
|
|
- union RXMAC_UNI_PF_ADDR1_t uni_pf_addr1; /* 0x4068 */
|
|
|
- union RXMAC_UNI_PF_ADDR2_t uni_pf_addr2; /* 0x406C */
|
|
|
- union RXMAC_UNI_PF_ADDR3_t uni_pf_addr3; /* 0x4070 */
|
|
|
+ u32 uni_pf_addr1; /* 0x4068 */
|
|
|
+ u32 uni_pf_addr2; /* 0x406C */
|
|
|
+ u32 uni_pf_addr3; /* 0x4070 */
|
|
|
u32 multi_hash1; /* 0x4074 */
|
|
|
u32 multi_hash2; /* 0x4078 */
|
|
|
u32 multi_hash3; /* 0x407C */
|
|
@@ -1123,47 +1088,33 @@ struct RXMAC_t { /* Location: */
|
|
|
/*
|
|
|
* structure for Mac Station Address, Part 1 reg in mac address map.
|
|
|
* located at address 0x5040
|
|
|
+ *
|
|
|
+ * 31-24: Octet6
|
|
|
+ * 23-16: Octet5
|
|
|
+ * 15-8: Octet4
|
|
|
+ * 7-0: Octet3
|
|
|
*/
|
|
|
-union MAC_STATION_ADDR1_t {
|
|
|
- u32 value;
|
|
|
- struct {
|
|
|
-#ifdef _BIT_FIELDS_HTOL
|
|
|
- u32 Octet6:8; /* bits 24-31 */
|
|
|
- u32 Octet5:8; /* bits 16-23 */
|
|
|
- u32 Octet4:8; /* bits 8-15 */
|
|
|
- u32 Octet3:8; /* bits 0-7 */
|
|
|
-#else
|
|
|
- u32 Octet3:8; /* bits 0-7 */
|
|
|
- u32 Octet4:8; /* bits 8-15 */
|
|
|
- u32 Octet5:8; /* bits 16-23 */
|
|
|
- u32 Octet6:8; /* bits 24-31 */
|
|
|
-#endif
|
|
|
- } bits;
|
|
|
-};
|
|
|
+
|
|
|
+#define ET_MAC_STATION_ADDR1_OC6_SHIFT 24
|
|
|
+#define ET_MAC_STATION_ADDR1_OC5_SHIFT 16
|
|
|
+#define ET_MAC_STATION_ADDR1_OC4_SHIFT 8
|
|
|
|
|
|
/*
|
|
|
* structure for Mac Station Address, Part 2 reg in mac address map.
|
|
|
* located at address 0x5044
|
|
|
+ *
|
|
|
+ * 31-24: Octet2
|
|
|
+ * 23-16: Octet1
|
|
|
+ * 15-0: reserved
|
|
|
*/
|
|
|
-union MAC_STATION_ADDR2_t {
|
|
|
- u32 value;
|
|
|
- struct {
|
|
|
-#ifdef _BIT_FIELDS_HTOL
|
|
|
- u32 Octet2:8; /* bits 24-31 */
|
|
|
- u32 Octet1:8; /* bits 16-23 */
|
|
|
- u32 reserved:16; /* bits 0-15 */
|
|
|
-#else
|
|
|
- u32 reserved:16; /* bit 0-15 */
|
|
|
- u32 Octet1:8; /* bits 16-23 */
|
|
|
- u32 Octet2:8; /* bits 24-31 */
|
|
|
-#endif
|
|
|
- } bits;
|
|
|
-};
|
|
|
+
|
|
|
+#define ET_MAC_STATION_ADDR2_OC2_SHIFT 24
|
|
|
+#define ET_MAC_STATION_ADDR2_OC1_SHIFT 16
|
|
|
|
|
|
/*
|
|
|
* MAC Module of JAGCore Address Mapping
|
|
|
*/
|
|
|
-struct MAC_t { /* Location: */
|
|
|
+struct mac_regs { /* Location: */
|
|
|
u32 cfg1; /* 0x5000 */
|
|
|
u32 cfg2; /* 0x5004 */
|
|
|
u32 ipg; /* 0x5008 */
|
|
@@ -1180,8 +1131,8 @@ struct MAC_t { /* Location: */
|
|
|
u32 mii_mgmt_indicator; /* 0x5034 */
|
|
|
u32 if_ctrl; /* 0x5038 */
|
|
|
u32 if_stat; /* 0x503C */
|
|
|
- union MAC_STATION_ADDR1_t station_addr_1; /* 0x5040 */
|
|
|
- union MAC_STATION_ADDR2_t station_addr_2; /* 0x5044 */
|
|
|
+ u32 station_addr_1; /* 0x5040 */
|
|
|
+ u32 station_addr_2; /* 0x5044 */
|
|
|
};
|
|
|
|
|
|
/* END OF MAC REGISTER ADDRESS MAP */
|
|
@@ -1448,7 +1399,7 @@ struct mmc_regs { /* Location: */
|
|
|
/*
|
|
|
* JAGCore Address Mapping
|
|
|
*/
|
|
|
-struct ADDRESS_MAP_t {
|
|
|
+struct address_map {
|
|
|
struct global_regs global;
|
|
|
/* unused section of global address map */
|
|
|
u8 unused_global[4096 - sizeof(struct global_regs)];
|
|
@@ -1461,12 +1412,12 @@ struct ADDRESS_MAP_t {
|
|
|
struct txmac_regs txmac;
|
|
|
/* unused section of txmac address map */
|
|
|
u8 unused_txmac[4096 - sizeof(struct txmac_regs)];
|
|
|
- struct RXMAC_t rxmac;
|
|
|
+ struct rxmac_regs rxmac;
|
|
|
/* unused section of rxmac address map */
|
|
|
- u8 unused_rxmac[4096 - sizeof(struct RXMAC_t)];
|
|
|
- struct MAC_t mac;
|
|
|
+ u8 unused_rxmac[4096 - sizeof(struct rxmac_regs)];
|
|
|
+ struct mac_regs mac;
|
|
|
/* unused section of mac address map */
|
|
|
- u8 unused_mac[4096 - sizeof(struct MAC_t)];
|
|
|
+ u8 unused_mac[4096 - sizeof(struct mac_regs)];
|
|
|
struct macstat_regs macstat;
|
|
|
/* unused section of mac stat address map */
|
|
|
u8 unused_mac_stat[4096 - sizeof(struct macstat_regs)];
|