Lines Matching +full:valid +full:- +full:mask
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,
24 int lane, opt, valid; in comphy_mux_check_config() local
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()
42 if (valid == 0) { in comphy_mux_check_config()
44 lane, comphy_map_data->type); in comphy_mux_check_config()
47 comphy_map_data->type = PHY_TYPE_UNCONNECTED; in comphy_mux_check_config()
50 lane, comphy_map_data->type); in comphy_mux_check_config()
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
90 if (comphy_map_data->type == PHY_TYPE_IGNORE) 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()
98 reg_set(selector_base, value, mask); 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()
118 /* check if the configuration is valid */ in comphy_mux_init()