Lines Matching +full:1 +full:- +full:lane
2 * Copyright (C) 2015-2016 Marvell International Ltd.
4 * SPDX-License-Identifier: GPL-2.0+
16 * is valid for specific lane. If the type is not valid,
17 * the function update the struct and set the type of the lane as
24 int lane, opt, valid; in comphy_mux_check_config() local
28 for (lane = 0; lane < comphy_max_lanes; in comphy_mux_check_config()
29 lane++, comphy_map_data++, mux_data++) { in comphy_mux_check_config()
31 if (comphy_map_data->type == PHY_TYPE_IGNORE) in comphy_mux_check_config()
34 mux_opt = mux_data->mux_values; in comphy_mux_check_config()
35 for (opt = 0, valid = 0; opt < mux_data->max_lane_values; in comphy_mux_check_config()
37 if (mux_opt->type == comphy_map_data->type) { in comphy_mux_check_config()
38 valid = 1; in comphy_mux_check_config()
43 debug("lane number %d, had invalid type %d\n", in comphy_mux_check_config()
44 lane, comphy_map_data->type); in comphy_mux_check_config()
45 debug("set lane %d as type %d\n", lane, in comphy_mux_check_config()
47 comphy_map_data->type = PHY_TYPE_UNCONNECTED; in comphy_mux_check_config()
49 debug("lane number %d, has type %d\n", in comphy_mux_check_config()
50 lane, comphy_map_data->type); in comphy_mux_check_config()
58 u32 type, int lane) in comphy_mux_get_mux_value() argument
66 mux_opt = mux_data->mux_values; in comphy_mux_get_mux_value()
67 for (opt = 0 ; opt < mux_data->max_lane_values; opt++, mux_opt++) { in comphy_mux_get_mux_value()
68 if (mux_opt->type == type) { in comphy_mux_get_mux_value()
69 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()
93 offset = lane * bitcount; in comphy_mux_reg_write()
94 mask = (((1 << bitcount) - 1) << offset); in comphy_mux_reg_write()
96 comphy_map_data->type, in comphy_mux_reg_write()
97 lane) << offset); in comphy_mux_reg_write()
114 comphy_max_lanes = chip_cfg->comphy_lanes_count; in comphy_mux_init()
115 mux_data = chip_cfg->mux_data; in comphy_mux_init()
116 mux_bitcount = chip_cfg->comphy_mux_bitcount; in comphy_mux_init()