Lines Matching refs:fifo
806 static void cpsw_fifo_shp_on(struct cpsw_priv *priv, int fifo, int on) in cpsw_fifo_shp_on() argument
816 mask = (1 << --fifo) << shift; in cpsw_fifo_shp_on()
822 static int cpsw_set_fifo_bw(struct cpsw_priv *priv, int fifo, int bw) in cpsw_set_fifo_bw() argument
839 if (i >= fifo || !priv->fifo_bw[i]) in cpsw_set_fifo_bw()
846 if (!priv->fifo_bw[i] && i > fifo) { in cpsw_set_fifo_bw()
852 if (i == fifo) { in cpsw_set_fifo_bw()
871 priv->fifo_bw[fifo] = bw; in cpsw_set_fifo_bw()
873 dev_warn(priv->dev, "set FIFO%d bw = %d\n", fifo, in cpsw_set_fifo_bw()
882 static int cpsw_set_fifo_rlimit(struct cpsw_priv *priv, int fifo, int bw) in cpsw_set_fifo_rlimit() argument
889 ret = cpsw_set_fifo_bw(priv, fifo, bw); in cpsw_set_fifo_rlimit()
898 cpsw_fifo_shp_on(priv, fifo, bw); in cpsw_set_fifo_rlimit()
917 val |= BIT(fifo + CPSW_FIFO_RATE_EN_SHIFT); in cpsw_set_fifo_rlimit()
919 val &= ~BIT(fifo + CPSW_FIFO_RATE_EN_SHIFT); in cpsw_set_fifo_rlimit()
923 cpsw_fifo_shp_on(priv, fifo, bw); in cpsw_set_fifo_rlimit()
939 int tc, ret, fifo; in cpsw_set_cbs() local
948 fifo = cpsw_tc_to_fifo(tc, ndev->num_tc); in cpsw_set_cbs()
949 if (!fifo) { in cpsw_set_cbs()
955 if (!qopt->enable && !priv->fifo_bw[fifo]) in cpsw_set_cbs()
978 ret = cpsw_set_fifo_rlimit(priv, fifo, bw); in cpsw_set_cbs()
997 int fifo, num_tc, count, offset; in cpsw_set_mqprio() local
1016 fifo = cpsw_tc_to_fifo(tc, num_tc); in cpsw_set_mqprio()
1017 tx_prio_map |= fifo << (4 * i); in cpsw_set_mqprio()
1069 int fifo, bw; in cpsw_cbs_resume() local
1071 for (fifo = CPSW_FIFO_SHAPERS_NUM; fifo > 0; fifo--) { in cpsw_cbs_resume()
1072 bw = priv->fifo_bw[fifo]; in cpsw_cbs_resume()
1076 cpsw_set_fifo_rlimit(priv, fifo, bw); in cpsw_cbs_resume()
1084 int i, tc, fifo; in cpsw_mqprio_resume() local
1092 fifo = CPSW_FIFO_SHAPERS_NUM - tc; in cpsw_mqprio_resume()
1093 tx_prio_map |= fifo << (4 * i); in cpsw_mqprio_resume()