Lines Matching defs:bw
2068 usb4_usb3_port_max_bandwidth(const struct tb_port *port, unsigned int bw)
2072 return min(bw, port->max_bw);
2073 return bw;
2147 static unsigned int usb3_bw_to_mbps(u32 bw, u8 scale)
2151 uframes = bw * 512UL << scale;
2168 u32 val, bw, scale;
2183 bw = val & ADP_USB3_CS_2_AUBW_MASK;
2184 *upstream_bw = usb3_bw_to_mbps(bw, scale);
2186 bw = (val & ADP_USB3_CS_2_ADBW_MASK) >> ADP_USB3_CS_2_ADBW_SHIFT;
2187 *downstream_bw = usb3_bw_to_mbps(bw, scale);
2222 u32 val, bw, scale;
2237 bw = val & ADP_USB3_CS_1_CUBW_MASK;
2238 *upstream_bw = usb3_bw_to_mbps(bw, scale);
2240 bw = (val & ADP_USB3_CS_1_CDBW_MASK) >> ADP_USB3_CS_1_CDBW_SHIFT;
2241 *downstream_bw = usb3_bw_to_mbps(bw, scale);
2757 * @bw: Estimated bandwidth in Mb/s.
2759 * Sets the estimated bandwidth to @bw. Set the granularity by calling
2760 * usb4_dp_port_set_granularity() before calling this. The @bw is round
2765 int usb4_dp_port_set_estimated_bandwidth(struct tb_port *port, int bw)
2784 val |= (bw / granularity) << ADP_DP_CS_2_ESTIMATED_BW_SHIFT;
2888 * @bw: New allocated bandwidth in Mb/s
2894 int usb4_dp_port_allocate_bandwidth(struct tb_port *port, int bw)
2913 val |= (bw / granularity) << DP_STATUS_ALLOCATED_BW_SHIFT;