| /OK3568_Linux_fs/kernel/drivers/thunderbolt/ |
| H A D | switch.c | 42 static struct nvm_auth_status *__nvm_get_auth_status(const struct tb_switch *sw) in __nvm_get_auth_status() argument 47 if (uuid_equal(&st->uuid, sw->uuid)) in __nvm_get_auth_status() 54 static void nvm_get_auth_status(const struct tb_switch *sw, u32 *status) in nvm_get_auth_status() argument 59 st = __nvm_get_auth_status(sw); in nvm_get_auth_status() 65 static void nvm_set_auth_status(const struct tb_switch *sw, u32 status) in nvm_set_auth_status() argument 69 if (WARN_ON(!sw->uuid)) in nvm_set_auth_status() 73 st = __nvm_get_auth_status(sw); in nvm_set_auth_status() 80 memcpy(&st->uuid, sw->uuid, sizeof(st->uuid)); in nvm_set_auth_status() 90 static void nvm_clear_auth_status(const struct tb_switch *sw) in nvm_clear_auth_status() argument 95 st = __nvm_get_auth_status(sw); in nvm_clear_auth_status() [all …]
|
| H A D | eeprom.c | 18 static int tb_eeprom_ctl_write(struct tb_switch *sw, struct tb_eeprom_ctl *ctl) in tb_eeprom_ctl_write() argument 20 return tb_sw_write(sw, ctl, TB_CFG_SWITCH, sw->cap_plug_events + 4, 1); in tb_eeprom_ctl_write() 26 static int tb_eeprom_ctl_read(struct tb_switch *sw, struct tb_eeprom_ctl *ctl) in tb_eeprom_ctl_read() argument 28 return tb_sw_read(sw, ctl, TB_CFG_SWITCH, sw->cap_plug_events + 4, 1); in tb_eeprom_ctl_read() 42 static int tb_eeprom_active(struct tb_switch *sw, bool enable) in tb_eeprom_active() argument 45 int res = tb_eeprom_ctl_read(sw, &ctl); in tb_eeprom_active() 50 res = tb_eeprom_ctl_write(sw, &ctl); in tb_eeprom_active() 54 return tb_eeprom_ctl_write(sw, &ctl); in tb_eeprom_active() 57 res = tb_eeprom_ctl_write(sw, &ctl); in tb_eeprom_active() 61 return tb_eeprom_ctl_write(sw, &ctl); in tb_eeprom_active() [all …]
|
| H A D | tmu.c | 14 static const char *tb_switch_tmu_mode_name(const struct tb_switch *sw) in tb_switch_tmu_mode_name() argument 16 bool root_switch = !tb_route(sw); in tb_switch_tmu_mode_name() 18 switch (sw->tmu.rate) { in tb_switch_tmu_mode_name() 26 if (sw->tmu.unidirectional) in tb_switch_tmu_mode_name() 40 static bool tb_switch_tmu_ucap_supported(struct tb_switch *sw) in tb_switch_tmu_ucap_supported() argument 45 ret = tb_sw_read(sw, &val, TB_CFG_SWITCH, in tb_switch_tmu_ucap_supported() 46 sw->tmu.cap + TMU_RTR_CS_0, 1); in tb_switch_tmu_ucap_supported() 53 static int tb_switch_tmu_rate_read(struct tb_switch *sw) in tb_switch_tmu_rate_read() argument 58 ret = tb_sw_read(sw, &val, TB_CFG_SWITCH, in tb_switch_tmu_rate_read() 59 sw->tmu.cap + TMU_RTR_CS_3, 1); in tb_switch_tmu_rate_read() [all …]
|
| H A D | lc.c | 13 * @sw: Switch whose UUID is read 16 int tb_lc_read_uuid(struct tb_switch *sw, u32 *uuid) in tb_lc_read_uuid() argument 18 if (!sw->cap_lc) in tb_lc_read_uuid() 20 return tb_sw_read(sw, uuid, TB_CFG_SWITCH, sw->cap_lc + TB_LC_FUSE, 4); in tb_lc_read_uuid() 23 static int read_lc_desc(struct tb_switch *sw, u32 *desc) in read_lc_desc() argument 25 if (!sw->cap_lc) in read_lc_desc() 27 return tb_sw_read(sw, desc, TB_CFG_SWITCH, sw->cap_lc + TB_LC_DESC, 1); in read_lc_desc() 32 struct tb_switch *sw = port->sw; in find_port_lc_cap() local 36 ret = read_lc_desc(sw, &desc); in find_port_lc_cap() 45 return sw->cap_lc + start + phys * size; in find_port_lc_cap() [all …]
|
| H A D | tb.h | 183 * @sw: Switch the port belongs to 202 struct tb_switch *sw; member 383 int (*runtime_suspend_switch)(struct tb_switch *sw); 384 int (*runtime_resume_switch)(struct tb_switch *sw); 389 int (*approve_switch)(struct tb *tb, struct tb_switch *sw); 390 int (*add_switch_key)(struct tb *tb, struct tb_switch *sw); 391 int (*challenge_switch_key)(struct tb *tb, struct tb_switch *sw, 417 static inline struct tb_port *tb_upstream_port(struct tb_switch *sw) in tb_upstream_port() argument 419 return &sw->ports[sw->config.upstream_port_number]; in tb_upstream_port() 431 const struct tb_port *upstream_port = tb_upstream_port(port->sw); in tb_is_upstream_port() [all …]
|
| H A D | tb.c | 69 static void tb_add_dp_resources(struct tb_switch *sw) in tb_add_dp_resources() argument 71 struct tb_cm *tcm = tb_priv(sw->tb); in tb_add_dp_resources() 74 tb_switch_for_each_port(sw, port) { in tb_add_dp_resources() 78 if (!tb_switch_query_dp_resource(sw, port)) in tb_add_dp_resources() 86 static void tb_remove_dp_resources(struct tb_switch *sw) in tb_remove_dp_resources() argument 88 struct tb_cm *tcm = tb_priv(sw->tb); in tb_remove_dp_resources() 92 tb_switch_for_each_port(sw, port) { in tb_remove_dp_resources() 94 tb_remove_dp_resources(port->remote->sw); in tb_remove_dp_resources() 98 if (port->sw == sw) { in tb_remove_dp_resources() 105 static void tb_discover_tunnels(struct tb_switch *sw) in tb_discover_tunnels() argument [all …]
|
| H A D | test.c | 39 struct tb_switch *sw; in alloc_switch() local 43 sw = kunit_kzalloc(test, sizeof(*sw), GFP_KERNEL); in alloc_switch() 44 if (!sw) in alloc_switch() 47 sw->config.upstream_port_number = upstream_port; in alloc_switch() 48 sw->config.depth = tb_route_length(route); in alloc_switch() 49 sw->config.route_hi = upper_32_bits(route); in alloc_switch() 50 sw->config.route_lo = lower_32_bits(route); in alloc_switch() 51 sw->config.enabled = 0; in alloc_switch() 52 sw->config.max_port_number = max_port_number; in alloc_switch() 54 size = (sw->config.max_port_number + 1) * sizeof(*sw->ports); in alloc_switch() [all …]
|
| H A D | icm.c | 384 struct icm_fr_pkg_get_topology_response *switches, *sw; in icm_fr_get_route() local 401 sw = &switches[0]; in icm_fr_get_route() 402 index = icm_fr_get_switch_index(sw->ports[link]); in icm_fr_get_route() 408 sw = &switches[index]; in icm_fr_get_route() 412 if (!(sw->first_data & ICM_SWITCH_USED)) { in icm_fr_get_route() 417 for (j = 0; j < ARRAY_SIZE(sw->ports); j++) { in icm_fr_get_route() 418 index = icm_fr_get_switch_index(sw->ports[j]); in icm_fr_get_route() 419 if (index > sw->switch_index) { in icm_fr_get_route() 420 sw = &switches[index]; in icm_fr_get_route() 426 *route = get_route(sw->route_hi, sw->route_lo); in icm_fr_get_route() [all …]
|
| H A D | debugfs.c | 123 static ssize_t regs_write(struct tb_switch *sw, struct tb_port *port, in regs_write() argument 127 struct tb *tb = sw->tb; in regs_write() 136 pm_runtime_get_sync(&sw->dev); in regs_write() 151 ret = tb_sw_write(sw, &val, TB_CFG_SWITCH, offset, 1); in regs_write() 159 pm_runtime_mark_last_busy(&sw->dev); in regs_write() 160 pm_runtime_put_autosuspend(&sw->dev); in regs_write() 172 return regs_write(port->sw, port, user_buf, count, ppos); in port_regs_write() 179 struct tb_switch *sw = s->private; in switch_regs_write() local 181 return regs_write(sw, NULL, user_buf, count, ppos); in switch_regs_write() 212 struct tb_switch *sw = port->sw; in counters_write() local [all …]
|
| H A D | usb4.c | 55 static int usb4_switch_wait_for_bit(struct tb_switch *sw, u32 offset, u32 bit, in usb4_switch_wait_for_bit() argument 64 ret = tb_sw_read(sw, &val, TB_CFG_SWITCH, offset, 1); in usb4_switch_wait_for_bit() 77 static int usb4_switch_op_read_data(struct tb_switch *sw, void *data, in usb4_switch_op_read_data() argument 83 return tb_sw_read(sw, data, TB_CFG_SWITCH, ROUTER_CS_9, dwords); in usb4_switch_op_read_data() 86 static int usb4_switch_op_write_data(struct tb_switch *sw, const void *data, in usb4_switch_op_write_data() argument 92 return tb_sw_write(sw, data, TB_CFG_SWITCH, ROUTER_CS_9, dwords); in usb4_switch_op_write_data() 95 static int usb4_switch_op_read_metadata(struct tb_switch *sw, u32 *metadata) in usb4_switch_op_read_metadata() argument 97 return tb_sw_read(sw, metadata, TB_CFG_SWITCH, ROUTER_CS_25, 1); in usb4_switch_op_read_metadata() 100 static int usb4_switch_op_write_metadata(struct tb_switch *sw, u32 metadata) in usb4_switch_op_write_metadata() argument 102 return tb_sw_write(sw, &metadata, TB_CFG_SWITCH, ROUTER_CS_25, 1); in usb4_switch_op_write_metadata() [all …]
|
| /OK3568_Linux_fs/u-boot/board/dbau1x00/ |
| H A D | lowlevel_init.S | 29 sw t1, 0(t0) 33 sw t1, 0(t0) 37 sw t1, 0(t0) 41 sw t1, 0(t0) 45 sw t1, 0(t0) 49 sw t1, 0(t0) 62 sw t1, sys_endian(t0) 193 sw t1, 0(t0) 206 sw t1, 0(t0) /* aux pll */ 230 sw t1, 0(t0) [all …]
|
| /OK3568_Linux_fs/kernel/drivers/usb/roles/ |
| H A D | class.c | 37 * @sw: USB role switch 40 * Set USB role @role for @sw. 42 int usb_role_switch_set_role(struct usb_role_switch *sw, enum usb_role role) in usb_role_switch_set_role() argument 46 if (IS_ERR_OR_NULL(sw)) in usb_role_switch_set_role() 49 mutex_lock(&sw->lock); in usb_role_switch_set_role() 51 ret = sw->set(sw, role); in usb_role_switch_set_role() 53 sw->role = role; in usb_role_switch_set_role() 54 kobject_uevent(&sw->dev.kobj, KOBJ_CHANGE); in usb_role_switch_set_role() 57 mutex_unlock(&sw->lock); in usb_role_switch_set_role() 65 * @sw: USB role switch [all …]
|
| /OK3568_Linux_fs/u-boot/board/pb1x00/ |
| H A D | lowlevel_init.S | 29 sw t1, 0(t0) 33 sw t1, 0(t0) 37 sw t1, 0(t0) 43 sw t2, 0(t1) 57 sw t1, sys_endian(t0) 114 sw t1, 0(t0) 127 sw t1, 0(t0) /* aux pll */ 135 sw t1, 0(t0) 139 sw t1, 0(t0) 143 sw t1, 0(t0) [all …]
|
| /OK3568_Linux_fs/u-boot/board/imgtec/malta/ |
| H A D | lowlevel_init.S | 68 sw t0, GT_ISD_OFS(t1) 75 sw t0, GT_PCI0IOLD_OFS(t1) 77 sw t0, GT_PCI0IOHD_OFS(t1) 81 sw t0, GT_PCI0M0LD_OFS(t1) 83 sw t0, GT_PCI0M0HD_OFS(t1) 86 sw t0, GT_PCI0M1LD_OFS(t1) 88 sw t0, GT_PCI0M1HD_OFS(t1) 100 sw t1, MSC01_PBC_CLKCFG_OFS(t0) 105 sw t1, MSC01_PBC_CS0TIM_OFS(t0) 110 sw t1, MSC01_PBC_CS0RW_OFS(t0) [all …]
|
| /OK3568_Linux_fs/kernel/drivers/net/ethernet/marvell/prestera/ |
| H A D | prestera_main.c | 50 struct prestera_port *prestera_port_find_by_hwid(struct prestera_switch *sw, in prestera_port_find_by_hwid() argument 55 read_lock(&sw->port_list_lock); in prestera_port_find_by_hwid() 56 list_for_each_entry(tmp, &sw->port_list, list) { in prestera_port_find_by_hwid() 62 read_unlock(&sw->port_list_lock); in prestera_port_find_by_hwid() 67 struct prestera_port *prestera_find_port(struct prestera_switch *sw, u32 id) in prestera_find_port() argument 71 read_lock(&sw->port_list_lock); in prestera_find_port() 72 list_for_each_entry(tmp, &sw->port_list, list) { in prestera_find_port() 78 read_unlock(&sw->port_list_lock); in prestera_find_port() 125 if (memcmp(port->sw->base_mac, addr, ETH_ALEN - 1)) in prestera_is_valid_mac_addr() 267 write_lock(&port->sw->port_list_lock); in prestera_port_list_add() [all …]
|
| H A D | prestera_hw.c | 323 static int __prestera_cmd_ret(struct prestera_switch *sw, in __prestera_cmd_ret() argument 329 struct prestera_device *dev = sw->dev; in __prestera_cmd_ret() 346 static int prestera_cmd_ret(struct prestera_switch *sw, in prestera_cmd_ret() argument 351 return __prestera_cmd_ret(sw, type, cmd, clen, ret, rlen, 0); in prestera_cmd_ret() 354 static int prestera_cmd_ret_wait(struct prestera_switch *sw, in prestera_cmd_ret_wait() argument 360 return __prestera_cmd_ret(sw, type, cmd, clen, ret, rlen, waitms); in prestera_cmd_ret_wait() 363 static int prestera_cmd(struct prestera_switch *sw, in prestera_cmd() argument 369 return prestera_cmd_ret(sw, type, cmd, clen, &resp.ret, sizeof(resp)); in prestera_cmd() 405 __find_event_handler(const struct prestera_switch *sw, in __find_event_handler() argument 410 list_for_each_entry_rcu(eh, &sw->event_handlers, list) { in __find_event_handler() [all …]
|
| H A D | prestera_devlink.c | 12 struct prestera_switch *sw = devlink_priv(dl); in prestera_dl_info_get() local 21 sw->dev->fw_rev.maj, in prestera_dl_info_get() 22 sw->dev->fw_rev.min, in prestera_dl_info_get() 23 sw->dev->fw_rev.sub); in prestera_dl_info_get() 43 void prestera_devlink_free(struct prestera_switch *sw) in prestera_devlink_free() argument 45 struct devlink *dl = priv_to_devlink(sw); in prestera_devlink_free() 50 int prestera_devlink_register(struct prestera_switch *sw) in prestera_devlink_register() argument 52 struct devlink *dl = priv_to_devlink(sw); in prestera_devlink_register() 55 err = devlink_register(dl, sw->dev->dev); in prestera_devlink_register() 57 dev_err(prestera_dev(sw), "devlink_register failed: %d\n", err); in prestera_devlink_register() [all …]
|
| /OK3568_Linux_fs/kernel/arch/ia64/kernel/ |
| H A D | entry.h | 25 #define SW(f) (IA64_SWITCH_STACK_##f##_OFFSET) macro 43 .savesp ar.unat,SW(CALLER_UNAT)+16+(off); \ 44 .savesp ar.fpsr,SW(AR_FPSR)+16+(off); \ 45 .spillsp f2,SW(F2)+16+(off); .spillsp f3,SW(F3)+16+(off); \ 46 .spillsp f4,SW(F4)+16+(off); .spillsp f5,SW(F5)+16+(off); \ 47 .spillsp f16,SW(F16)+16+(off); .spillsp f17,SW(F17)+16+(off); \ 48 .spillsp f18,SW(F18)+16+(off); .spillsp f19,SW(F19)+16+(off); \ 49 .spillsp f20,SW(F20)+16+(off); .spillsp f21,SW(F21)+16+(off); \ 50 .spillsp f22,SW(F22)+16+(off); .spillsp f23,SW(F23)+16+(off); \ 51 .spillsp f24,SW(F24)+16+(off); .spillsp f25,SW(F25)+16+(off); \ [all …]
|
| /OK3568_Linux_fs/kernel/drivers/input/misc/ |
| H A D | ad714x.c | 216 struct ad714x_button_drv *sw = &ad714x->sw->button[idx]; in ad714x_button_state_machine() local 218 switch (sw->state) { in ad714x_button_state_machine() 223 input_report_key(sw->input, hw->keycode, 1); in ad714x_button_state_machine() 224 input_sync(sw->input); in ad714x_button_state_machine() 225 sw->state = ACTIVE; in ad714x_button_state_machine() 233 input_report_key(sw->input, hw->keycode, 0); in ad714x_button_state_machine() 234 input_sync(sw->input); in ad714x_button_state_machine() 235 sw->state = IDLE; in ad714x_button_state_machine() 269 struct ad714x_slider_drv *sw = &ad714x->sw->slider[idx]; in ad714x_slider_cal_highest_stage() local 271 sw->highest_stage = ad714x_cal_highest_stage(ad714x, hw->start_stage, in ad714x_slider_cal_highest_stage() [all …]
|
| /OK3568_Linux_fs/kernel/arch/mips/alchemy/common/ |
| H A D | sleeper.S | 25 sw $1, PT_R1(sp) 26 sw $2, PT_R2(sp) 27 sw $3, PT_R3(sp) 28 sw $4, PT_R4(sp) 29 sw $5, PT_R5(sp) 30 sw $6, PT_R6(sp) 31 sw $7, PT_R7(sp) 32 sw $16, PT_R16(sp) 33 sw $17, PT_R17(sp) 34 sw $18, PT_R18(sp) [all …]
|
| /OK3568_Linux_fs/u-boot/board/freescale/common/ |
| H A D | mc34vr500.c | 21 int mc34vr500_get_sw_volt(uint8_t sw) in mc34vr500_get_sw_volt() argument 29 debug("%s: Get SW%u volt from swxvolt_addr = 0x%x\n", in mc34vr500_get_sw_volt() 30 __func__, sw + 1, swxvolt_addr[sw]); in mc34vr500_get_sw_volt() 31 if (sw > SW4) { in mc34vr500_get_sw_volt() 32 printf("%s: Unsupported SW(sw%d)\n", __func__, sw + 1); in mc34vr500_get_sw_volt() 46 ret = pmic_reg_read(p, swxvolt_addr[sw], &swxvolt); in mc34vr500_get_sw_volt() 48 printf("%s: Failed to get SW%u volt\n", __func__, sw + 1); in mc34vr500_get_sw_volt() 52 debug("%s: SW%d step point swxvolt = %u\n", __func__, sw + 1, swxvolt); in mc34vr500_get_sw_volt() 53 spb = swx_set_point_base[sw]; in mc34vr500_get_sw_volt() 54 /* The base of SW volt is 625mV and increase by step 25mV */ in mc34vr500_get_sw_volt() [all …]
|
| /OK3568_Linux_fs/kernel/drivers/gpu/arm/midgard/ |
| H A D | mali_kbase_trace_timeline_defs.h | 29 * - 'SW' and 'HW' as the first part will be used to determine whether a 74 * SW Events 77 …KBASE_TIMELINE_TRACE_CODE(SW_SET_GPU_SLOT_ACTIVE, "SW: GPU slot active", "%d,%… 78 …KBASE_TIMELINE_TRACE_CODE(SW_SET_GPU_SLOT_NEXT, "SW: GPU atom in NEXT", "%d,%… 79 …KBASE_TIMELINE_TRACE_CODE(SW_SET_GPU_SLOT_HEAD, "SW: GPU atom in HEAD", "%d,%… 80 …KBASE_TIMELINE_TRACE_CODE(SW_SET_GPU_SLOT_STOPPING, "SW: Try Soft-Stop on GPU slot", "%d,%… 83 …KBASE_TIMELINE_TRACE_CODE(SW_SET_GPU_POWER_ACTIVE, "SW: GPU power active", "%d,%… 84 …KBASE_TIMELINE_TRACE_CODE(SW_SET_GPU_POWER_TILER_ACTIVE, "SW: GPU tiler powered", "%d,%… 85 …KBASE_TIMELINE_TRACE_CODE(SW_SET_GPU_POWER_SHADER_ACTIVE, "SW: GPU shaders powered", "%d,%… 86 …KBASE_TIMELINE_TRACE_CODE(SW_SET_GPU_POWER_L2_ACTIVE, "SW: GPU L2 powered", "%d,%… [all …]
|
| /OK3568_Linux_fs/kernel/drivers/input/joystick/ |
| H A D | sidewinder.c | 98 struct sw { struct 199 #define GB(pos,num) sw_get_bits(buf, pos, num, sw->bits) 285 static int sw_parse(unsigned char *buf, struct sw *sw) in sw_parse() argument 290 switch (sw->type) { in sw_parse() 297 dev = sw->dev[0]; in sw_parse() 319 for (i = 0; i < sw->number; i ++) { in sw_parse() 324 input_report_abs(sw->dev[i], ABS_X, GB(i*15+3,1) - GB(i*15+2,1)); in sw_parse() 325 input_report_abs(sw->dev[i], ABS_Y, GB(i*15+0,1) - GB(i*15+1,1)); in sw_parse() 328 input_report_key(sw->dev[i], sw_btn[SW_ID_GP][j], !GB(i*15+j+4,1)); in sw_parse() 330 input_sync(sw->dev[i]); in sw_parse() [all …]
|
| /OK3568_Linux_fs/kernel/drivers/usb/typec/ |
| H A D | mux.c | 62 struct typec_switch *sw; in fwnode_typec_switch_get() local 64 sw = fwnode_connection_find_match(fwnode, "orientation-switch", NULL, in fwnode_typec_switch_get() 66 if (!IS_ERR_OR_NULL(sw)) in fwnode_typec_switch_get() 67 WARN_ON(!try_module_get(sw->dev.parent->driver->owner)); in fwnode_typec_switch_get() 69 return sw; in fwnode_typec_switch_get() 75 * @sw: USB Type-C orientation switch 77 * Decrement reference count for @sw. 79 void typec_switch_put(struct typec_switch *sw) in typec_switch_put() argument 81 if (!IS_ERR_OR_NULL(sw)) { in typec_switch_put() 82 module_put(sw->dev.parent->driver->owner); in typec_switch_put() [all …]
|
| /OK3568_Linux_fs/kernel/arch/openrisc/kernel/ |
| H A D | entry.S | 46 l.sw -8(r1),r2 /* store frame pointer */ ;\ 47 l.sw -4(r1),r9 /* store return address */ ;\ 59 l.sw -12(r1),t1 /* save extra reg */ ;\ 60 l.sw -8(r1),r2 /* store frame pointer */ ;\ 61 l.sw -4(r1),r9 /* store return address */ ;\ 147 l.sw PT_GPR2(r1),r2 ;\ 148 l.sw PT_GPR3(r1),r3 ;\ 150 l.sw PT_GPR5(r1),r5 ;\ 151 l.sw PT_GPR6(r1),r6 ;\ 152 l.sw PT_GPR7(r1),r7 ;\ [all …]
|