net: stmmac: RX queue routing configuration
[linux-2.6-block.git] / drivers / net / ethernet / stmicro / stmmac / common.h
index e0b31e759c0eefb0baa6807d3e1427f02272f883..572cf8b617070367c73c9d279f5de1b825ac6e63 100644 (file)
@@ -246,6 +246,15 @@ struct stmmac_extra_stats {
 #define STMMAC_TX_MAX_FRAMES   256
 #define STMMAC_TX_FRAMES       64
 
+/* Packets types */
+enum packets_types {
+       PACKET_AVCPQ = 0x1, /* AV Untagged Control packets */
+       PACKET_PTPQ = 0x2, /* PTP Packets */
+       PACKET_DCBCPQ = 0x3, /* DCB Control Packets */
+       PACKET_UPQ = 0x4, /* Untagged Packets */
+       PACKET_MCBCQ = 0x5, /* Multicast & Broadcast Packets */
+};
+
 /* Rx IPC status */
 enum rx_frame_status {
        good_frame = 0x0,
@@ -473,6 +482,9 @@ struct stmmac_ops {
        void (*rx_queue_prio)(struct mac_device_info *hw, u32 prio, u32 queue);
        /* TX Queues Priority */
        void (*tx_queue_prio)(struct mac_device_info *hw, u32 prio, u32 queue);
+       /* RX Queues Routing */
+       void (*rx_queue_routing)(struct mac_device_info *hw, u8 packet,
+                                u32 queue);
        /* Program RX Algorithms */
        void (*prog_mtl_rx_algorithms)(struct mac_device_info *hw, u32 rx_alg);
        /* Program TX Algorithms */
@@ -581,6 +593,11 @@ struct mac_device_info {
        unsigned int ps;
 };
 
+struct stmmac_rx_routing {
+       u32 reg_mask;
+       u32 reg_shift;
+};
+
 struct mac_device_info *dwmac1000_setup(void __iomem *ioaddr, int mcbins,
                                        int perfect_uc_entries,
                                        int *synopsys_id);