]> git.sur5r.net Git - u-boot/blobdiff - include/tsec.h
Blackfin: bfin_sdh: convert to portmux framework
[u-boot] / include / tsec.h
index 92bd028f0ead30ea6136b7b5c83259b85c610339..1e903659ebacfd63157812122837e0ee96add75b 100644 (file)
 #define MIIM_BCM54xx_AUXSTATUS_LINKMODE_MASK   0x0700
 #define MIIM_BCM54xx_AUXSTATUS_LINKMODE_SHIFT  8
 
+#define MIIM_BCM54XX_SHD       0x1c    /* 0x1c shadow registers */
+#define MIIM_BCM54XX_SHD_WRITE 0x8000
+#define MIIM_BCM54XX_SHD_VAL(x)        ((x & 0x1f) << 10)
+#define MIIM_BCM54XX_SHD_DATA(x)       ((x & 0x3ff) << 0)
+#define MIIM_BCM54XX_SHD_WR_ENCODE(val, data)  \
+       (MIIM_BCM54XX_SHD_WRITE | MIIM_BCM54XX_SHD_VAL(val) | \
+        MIIM_BCM54XX_SHD_DATA(data))
+
+#define MIIM_BCM54XX_EXP_DATA  0x15    /* Expansion register data */
+#define MIIM_BCM54XX_EXP_SEL   0x17    /* Expansion register select */
+#define MIIM_BCM54XX_EXP_SEL_SSD       0x0e00  /* Secondary SerDes select */
+#define MIIM_BCM54XX_EXP_SEL_ER        0x0f00  /* Expansion register select */
+
 /* Cicada Auxiliary Control/Status Register */
 #define MIIM_CIS8201_AUX_CONSTAT       0x1c
 #define MIIM_CIS8201_AUXCONSTAT_INIT   0x0004
@@ -457,12 +470,19 @@ typedef struct tsec_hash_regs
 } tsec_hash_t;
 
 typedef struct tsec_mdio {
+       uint    res1[4];
+       uint    ieventm;
+       uint    imaskm;
+       uint    res2;
+       uint    emapm;
+       uint    res3[320];
        uint    miimcfg;        /* MII Management: Configuration */
        uint    miimcom;        /* MII Management: Command */
        uint    miimadd;        /* MII Management: Address */
        uint    miimcon;        /* MII Management: Control */
        uint    miimstat;       /* MII Management: Status */
        uint    miimind;        /* MII Management: Indicators */
+       uint    res4[690];
 } tsec_mdio_t;
 
 typedef struct tsec
@@ -564,9 +584,9 @@ typedef struct tsec
 
 /* This flag currently only has
  * meaning if we're using the eTSEC */
-#define TSEC_REDUCED   (1 << 1)
-
-#define TSEC_SGMII     (1 << 2)
+#define TSEC_REDUCED   (1 << 1)        /* MAC-PHY interface uses RGMII */
+#define TSEC_SGMII     (1 << 2)        /* MAC-PHY interface uses SGMII */
+#define TSEC_FIBER     (1 << 3)        /* PHY uses fiber, eg 1000 Base-X */
 
 struct tsec_private {
        volatile tsec_t *regs;
@@ -637,7 +657,6 @@ struct tsec_info_struct {
        u32 flags;
 };
 
-int tsec_initialize(bd_t * bis, struct tsec_info_struct *tsec_info);
 int tsec_standard_init(bd_t *bis);
 int tsec_eth_init(bd_t *bis, struct tsec_info_struct *tsec_info, int num);