net: dsa: felix: Add PCS operations for PHYLINK
[linux-2.6-microblaze.git] / drivers / net / dsa / ocelot / felix.h
index 204296e..3a75800 100644 (file)
@@ -10,6 +10,7 @@
 struct felix_info {
        struct resource                 *target_io_res;
        struct resource                 *port_io_res;
+       struct resource                 *imdio_res;
        const struct reg_field          *regfields;
        const u32 *const                *map;
        const struct ocelot_ops         *ops;
@@ -17,7 +18,18 @@ struct felix_info {
        const struct ocelot_stat_layout *stats_layout;
        unsigned int                    num_stats;
        int                             num_ports;
-       int                             pci_bar;
+       int                             switch_pci_bar;
+       int                             imdio_pci_bar;
+       int     (*mdio_bus_alloc)(struct ocelot *ocelot);
+       void    (*mdio_bus_free)(struct ocelot *ocelot);
+       void    (*pcs_init)(struct ocelot *ocelot, int port,
+                           unsigned int link_an_mode,
+                           const struct phylink_link_state *state);
+       void    (*pcs_an_restart)(struct ocelot *ocelot, int port);
+       void    (*pcs_link_state)(struct ocelot *ocelot, int port,
+                                 struct phylink_link_state *state);
+       int     (*prevalidate_phy_mode)(struct ocelot *ocelot, int port,
+                                       phy_interface_t phy_mode);
 };
 
 extern struct felix_info               felix_info_vsc9959;
@@ -32,6 +44,8 @@ struct felix {
        struct pci_dev                  *pdev;
        struct felix_info               *info;
        struct ocelot                   ocelot;
+       struct mii_bus                  *imdio;
+       struct phy_device               **pcs;
 };
 
 #endif