Lines Matching +full:1 +full:- +full:lane
1 // SPDX-License-Identifier: GPL-2.0+
3 * Copyright (C) 2015-2016 Marvell International Ltd.
15 * is valid for specific lane. If the type is not valid,
16 * the function update the struct and set the type of the lane as
23 int lane, opt, valid; in comphy_mux_check_config() local
27 for (lane = 0; lane < comphy_max_lanes; in comphy_mux_check_config()
28 lane++, comphy_map_data++, mux_data++) { in comphy_mux_check_config()
30 if (comphy_map_data->type == PHY_TYPE_IGNORE) in comphy_mux_check_config()
33 mux_opt = mux_data->mux_values; in comphy_mux_check_config()
34 for (opt = 0, valid = 0; opt < mux_data->max_lane_values; in comphy_mux_check_config()
36 if (mux_opt->type == comphy_map_data->type) { in comphy_mux_check_config()
37 valid = 1; in comphy_mux_check_config()
42 debug("lane number %d, had invalid type %d\n", in comphy_mux_check_config()
43 lane, comphy_map_data->type); in comphy_mux_check_config()
44 debug("set lane %d as type %d\n", lane, in comphy_mux_check_config()
46 comphy_map_data->type = PHY_TYPE_UNCONNECTED; in comphy_mux_check_config()
48 debug("lane number %d, has type %d\n", in comphy_mux_check_config()
49 lane, comphy_map_data->type); in comphy_mux_check_config()
57 u32 type, int lane) in comphy_mux_get_mux_value() argument
65 mux_opt = mux_data->mux_values; in comphy_mux_get_mux_value()
66 for (opt = 0 ; opt < mux_data->max_lane_values; opt++, mux_opt++) { in comphy_mux_get_mux_value()
67 if (mux_opt->type == type) { in comphy_mux_get_mux_value()
68 value = mux_opt->mux_value; in comphy_mux_get_mux_value()
84 u32 lane, value, offset, mask; in comphy_mux_reg_write() local
88 for (lane = 0; lane < comphy_max_lanes; in comphy_mux_reg_write()
89 lane++, comphy_map_data++, mux_data++) { in comphy_mux_reg_write()
90 if (comphy_map_data->type == PHY_TYPE_IGNORE) in comphy_mux_reg_write()
98 offset = fdt32_to_cpu(mux_lane_order[lane]) * bitcount; in comphy_mux_reg_write()
100 offset = lane * bitcount; in comphy_mux_reg_write()
102 mask = (((1 << bitcount) - 1) << offset); in comphy_mux_reg_write()
104 comphy_map_data->type, in comphy_mux_reg_write()
105 lane) << offset); in comphy_mux_reg_write()
123 comphy_max_lanes = chip_cfg->comphy_lanes_count; in comphy_mux_init()
124 mux_data = chip_cfg->mux_data; in comphy_mux_init()
125 mux_lane_order = chip_cfg->comphy_mux_lane_order; in comphy_mux_init()
126 mux_bitcount = chip_cfg->comphy_mux_bitcount; in comphy_mux_init()