| /openbmc/u-boot/drivers/input/ |
| H A D | keyboard-uclass.c | 10 static int keyboard_start(struct stdio_dev *sdev) in keyboard_start() argument 12 struct udevice *dev = sdev->priv; in keyboard_start() 21 static int keyboard_stop(struct stdio_dev *sdev) in keyboard_stop() argument 23 struct udevice *dev = sdev->priv; in keyboard_stop() 32 static int keyboard_tstc(struct stdio_dev *sdev) in keyboard_tstc() argument 34 struct udevice *dev = sdev->priv; in keyboard_tstc() 47 static int keyboard_getc(struct stdio_dev *sdev) in keyboard_getc() argument 49 struct udevice *dev = sdev->priv; in keyboard_getc() 65 struct stdio_dev *sdev = &priv->sdev; in keyboard_pre_probe() local 68 strlcpy(sdev->name, dev->name, sizeof(sdev->name)); in keyboard_pre_probe() [all …]
|
| H A D | cros_ec_keyb.c | 185 struct stdio_dev *sdev = &uc_priv->sdev; in cros_ec_kbd_probe() local 213 strcpy(sdev->name, "cros-ec-keyb"); in cros_ec_kbd_probe() 216 return input_stdio_register(sdev); in cros_ec_kbd_probe()
|
| H A D | i8042.c | 317 struct stdio_dev *sdev = &uc_priv->sdev; in i8042_kbd_probe() local 329 strcpy(sdev->name, "i8042-kbd"); in i8042_kbd_probe() 330 ret = input_stdio_register(sdev); in i8042_kbd_probe()
|
| H A D | tegra-kbc.c | 288 struct stdio_dev *sdev = &uc_priv->sdev; in tegra_kbd_probe() local 326 strcpy(sdev->name, "tegra-kbc"); in tegra_kbd_probe() 327 ret = input_stdio_register(sdev); in tegra_kbd_probe()
|
| /openbmc/qemu/hw/char/ |
| H A D | spapr_vty.c | 16 SpaprVioDevice sdev; member 39 spapr_vio_irq_pulse(&dev->sdev); in vty_receive() 55 static int vty_getchars(SpaprVioDevice *sdev, uint8_t *buf, int max) in vty_getchars() argument 57 SpaprVioVty *dev = VIO_SPAPR_VTY_DEVICE(sdev); in vty_getchars() 81 void vty_putchars(SpaprVioDevice *sdev, uint8_t *buf, int len) in vty_putchars() argument 83 SpaprVioVty *dev = VIO_SPAPR_VTY_DEVICE(sdev); in vty_putchars() 90 static void spapr_vty_realize(SpaprVioDevice *sdev, Error **errp) in spapr_vty_realize() argument 92 SpaprVioVty *dev = VIO_SPAPR_VTY_DEVICE(sdev); in spapr_vty_realize() 111 SpaprVioDevice *sdev; in h_put_term_char() local 114 sdev = vty_lookup(spapr, reg); in h_put_term_char() [all …]
|
| /openbmc/qemu/hw/net/ |
| H A D | spapr_llan.c | 99 SpaprVioDevice sdev; member 130 cnt = vio_ldq(&dev->sdev, dev->buf_list + 4096 - 8); in spapr_vlan_record_dropped_rx_frame() 131 vio_stq(&dev->sdev, dev->buf_list + 4096 - 8, cnt + 1); in spapr_vlan_record_dropped_rx_frame() 183 bd = vio_ldq(&dev->sdev, dev->buf_list + buf_ptr); in spapr_vlan_get_rx_bd_from_page() 196 vio_stq(&dev->sdev, dev->buf_list + dev->use_buf_ptr, 0); in spapr_vlan_get_rx_bd_from_page() 207 SpaprVioDevice *sdev = VIO_SPAPR_DEVICE(dev); in spapr_vlan_receive() local 208 vlan_bd_t rxq_bd = vio_ldq(sdev, dev->buf_list + VLAN_RXQ_BD_OFF); in spapr_vlan_receive() 213 trace_spapr_vlan_receive(sdev->qdev.id, dev->rx_bufs); in spapr_vlan_receive() 237 if (spapr_vio_dma_write(sdev, VLAN_BD_ADDR(bd) + 8, buf, size) < 0) { in spapr_vlan_receive() 249 handle = vio_ldq(sdev, VLAN_BD_ADDR(bd)); in spapr_vlan_receive() [all …]
|
| /openbmc/u-boot/drivers/serial/ |
| H A D | serial-uclass.c | 342 static void serial_stub_putc(struct stdio_dev *sdev, const char ch) in serial_stub_putc() argument 344 _serial_putc(sdev->priv, ch); in serial_stub_putc() 348 static void serial_stub_puts(struct stdio_dev *sdev, const char *str) in serial_stub_puts() argument 350 _serial_puts(sdev->priv, str); in serial_stub_puts() 353 static int serial_stub_getc(struct stdio_dev *sdev) in serial_stub_getc() argument 355 return _serial_getc(sdev->priv); in serial_stub_getc() 358 static int serial_stub_tstc(struct stdio_dev *sdev) in serial_stub_tstc() argument 360 return _serial_tstc(sdev->priv); in serial_stub_tstc() 431 struct stdio_dev sdev; in serial_post_probe() local 467 memset(&sdev, '\0', sizeof(sdev)); in serial_post_probe() [all …]
|
| H A D | serial.c | 184 static int serial_stub_start(struct stdio_dev *sdev) in serial_stub_start() argument 186 struct serial_device *dev = sdev->priv; in serial_stub_start() 191 static int serial_stub_stop(struct stdio_dev *sdev) in serial_stub_stop() argument 193 struct serial_device *dev = sdev->priv; in serial_stub_stop() 198 static void serial_stub_putc(struct stdio_dev *sdev, const char ch) in serial_stub_putc() argument 200 struct serial_device *dev = sdev->priv; in serial_stub_putc() 205 static void serial_stub_puts(struct stdio_dev *sdev, const char *str) in serial_stub_puts() argument 207 struct serial_device *dev = sdev->priv; in serial_stub_puts() 212 static int serial_stub_getc(struct stdio_dev *sdev) in serial_stub_getc() argument 214 struct serial_device *dev = sdev->priv; in serial_stub_getc() [all …]
|
| /openbmc/qemu/hw/virtio/ |
| H A D | virtio-iommu.c | 82 static bool virtio_iommu_device_bypassed(IOMMUDevice *sdev) in virtio_iommu_device_bypassed() argument 86 VirtIOIOMMU *s = sdev->viommu; in virtio_iommu_device_bypassed() 89 sid = virtio_iommu_get_bdf(sdev); in virtio_iommu_device_bypassed() 111 static bool virtio_iommu_switch_address_space(IOMMUDevice *sdev) in virtio_iommu_switch_address_space() argument 115 assert(sdev); in virtio_iommu_switch_address_space() 117 use_remapping = !virtio_iommu_device_bypassed(sdev); in virtio_iommu_switch_address_space() 119 trace_virtio_iommu_switch_address_space(pci_bus_num(sdev->bus), in virtio_iommu_switch_address_space() 120 PCI_SLOT(sdev->devfn), in virtio_iommu_switch_address_space() 121 PCI_FUNC(sdev->devfn), in virtio_iommu_switch_address_space() 126 memory_region_set_enabled(&sdev->bypass_mr, false); in virtio_iommu_switch_address_space() [all …]
|
| /openbmc/qemu/pc-bios/s390-ccw/ |
| H A D | virtio-scsi.c | 68 const ScsiDevice *sdev = vdev->scsi_device; in prepare_request() local 71 req.lun = make_lun(sdev->channel, sdev->target, sdev->lun); in prepare_request() 220 ScsiDevice *sdev = vdev->scsi_device; in virtio_scsi_locate_device() local 233 sdev->channel = vdev->selected_scsi_device.channel; in virtio_scsi_locate_device() 234 sdev->target = vdev->selected_scsi_device.target; in virtio_scsi_locate_device() 235 sdev->lun = vdev->selected_scsi_device.lun; in virtio_scsi_locate_device() 237 IPL_check(sdev->channel == 0, "non-zero channel requested"); in virtio_scsi_locate_device() 238 IPL_check(sdev->target <= vdev->config.scsi.max_target, "target# high"); in virtio_scsi_locate_device() 239 IPL_check(sdev->lun <= vdev->config.scsi.max_lun, "LUN# high"); in virtio_scsi_locate_device() 244 sdev->channel = channel; in virtio_scsi_locate_device() [all …]
|
| /openbmc/u-boot/common/ |
| H A D | stdio.c | 143 struct stdio_dev *sdev; in stdio_probe_device() local 160 sdev = list_empty(&devs.list) ? NULL : in stdio_probe_device() 162 if (!sdev || strcmp(sdev->name, name)) { in stdio_probe_device() 167 *sdevp = sdev; in stdio_probe_device() 176 struct stdio_dev *sdev; in stdio_get_by_name() local 182 sdev = list_entry(pos, struct stdio_dev, list); in stdio_get_by_name() 183 if (strcmp(sdev->name, name) == 0) in stdio_get_by_name() 184 return sdev; in stdio_get_by_name() 199 !stdio_probe_device(name, UCLASS_VIDEO, &sdev)) in stdio_get_by_name() 200 return sdev; in stdio_get_by_name()
|
| H A D | usb_kbd.c | 355 static int usb_kbd_testc(struct stdio_dev *sdev) argument 371 dev = stdio_get_by_name(sdev->name); 381 static int usb_kbd_getc(struct stdio_dev *sdev) argument 387 dev = stdio_get_by_name(sdev->name); 618 struct stdio_dev *sdev; local 621 sdev = stdio_get_by_name(DEVNAME); 622 if (!sdev) { 627 if (stdio_deregister_dev(sdev, true)) {
|
| /openbmc/u-boot/drivers/video/ |
| H A D | vidconsole-uclass.c | 455 static void vidconsole_putc(struct stdio_dev *sdev, const char ch) in vidconsole_putc() argument 457 struct udevice *dev = sdev->priv; in vidconsole_putc() 463 static void vidconsole_puts(struct stdio_dev *sdev, const char *s) in vidconsole_puts() argument 465 struct udevice *dev = sdev->priv; in vidconsole_puts() 488 struct stdio_dev *sdev = &priv->sdev; in vidconsole_post_probe() local 494 snprintf(sdev->name, sizeof(sdev->name), "vidconsole%d", in vidconsole_post_probe() 497 strcpy(sdev->name, "vidconsole"); in vidconsole_post_probe() 500 sdev->flags = DEV_FLAGS_OUTPUT; in vidconsole_post_probe() 501 sdev->putc = vidconsole_putc; in vidconsole_post_probe() 502 sdev->puts = vidconsole_puts; in vidconsole_post_probe() [all …]
|
| /openbmc/qemu/hw/arm/ |
| H A D | smmuv3.c | 827 SMMUDevice *sdev = container_of(mr, SMMUDevice, iommu); in smmuv3_decode_config() local 828 uint32_t sid = smmu_get_sid(sdev); in smmuv3_decode_config() 829 SMMUv3State *s = sdev->smmu; in smmuv3_decode_config() 871 static SMMUTransCfg *smmuv3_get_config(SMMUDevice *sdev, SMMUEventInfo *event) in smmuv3_get_config() argument 873 SMMUv3State *s = sdev->smmu; in smmuv3_get_config() 877 cfg = g_hash_table_lookup(bc->configs, sdev); in smmuv3_get_config() 879 sdev->cfg_cache_hits++; in smmuv3_get_config() 880 trace_smmuv3_config_cache_hit(smmu_get_sid(sdev), in smmuv3_get_config() 881 sdev->cfg_cache_hits, sdev->cfg_cache_misses, in smmuv3_get_config() 882 100 * sdev->cfg_cache_hits / in smmuv3_get_config() [all …]
|
| H A D | smmu-common.c | 231 SMMUDevice *sdev = (SMMUDevice *)key; in smmu_hash_remove_by_sid_range() local 232 uint32_t sid = smmu_get_sid(sdev); in smmu_hash_remove_by_sid_range() 853 SMMUDevice *sdev; in smmu_find_add_as() local 863 sdev = sbus->pbdev[devfn]; in smmu_find_add_as() 864 if (!sdev) { in smmu_find_add_as() 867 sdev = sbus->pbdev[devfn] = g_new0(SMMUDevice, 1); in smmu_find_add_as() 869 sdev->smmu = s; in smmu_find_add_as() 870 sdev->bus = bus; in smmu_find_add_as() 871 sdev->devfn = devfn; in smmu_find_add_as() 873 memory_region_init_iommu(&sdev->iommu, sizeof(sdev->iommu), in smmu_find_add_as() [all …]
|
| /openbmc/qemu/hw/scsi/ |
| H A D | megasas.c | 772 SCSIDevice *sdev = SCSI_DEVICE(kid->child); in megasas_ctrl_get_info() local 776 pd_id = ((sdev->id & 0xFF) << 8) | (sdev->lun & 0xFF); in megasas_ctrl_get_info() 1002 SCSIDevice *sdev = SCSI_DEVICE(kid->child); in megasas_dcmd_pd_get_list() local 1008 pd_id = ((sdev->id & 0xFF) << 8) | (sdev->lun & 0xFF); in megasas_dcmd_pd_get_list() 1012 info.addr[num_pd_disks].slot_number = sdev->id & 0xFF; in megasas_dcmd_pd_get_list() 1013 info.addr[num_pd_disks].scsi_dev_type = sdev->type; in megasas_dcmd_pd_get_list() 1047 static int megasas_pd_get_info_submit(SCSIDevice *sdev, int lun, in megasas_pd_get_info_submit() argument 1053 uint16_t pd_id = ((sdev->id & 0xFF) << 8) | (lun & 0xFF); in megasas_pd_get_info_submit() 1064 cmd->req = scsi_req_new(sdev, cmd->index, lun, cmdbuf, sizeof(cmdbuf), cmd); in megasas_pd_get_info_submit() 1082 cmd->req = scsi_req_new(sdev, cmd->index, lun, cmdbuf, sizeof(cmdbuf), cmd); in megasas_pd_get_info_submit() [all …]
|
| H A D | mptsas.c | 272 uint8_t *lun, SCSIDevice **sdev) in mptsas_scsi_device_find() argument 282 *sdev = scsi_device_find(&s->bus, bus, target, lun[1]); in mptsas_scsi_device_find() 283 if (!*sdev) { in mptsas_scsi_device_find() 296 SCSIDevice *sdev; in mptsas_process_scsi_io_request() local 305 scsi_io->LUN, &sdev); in mptsas_process_scsi_io_request() 326 req->sreq = scsi_req_new(sdev, scsi_io->MsgContext, in mptsas_process_scsi_io_request() 409 SCSIDevice *sdev; in mptsas_process_scsi_task_mgmt() local 431 req->LUN, &sdev); in mptsas_process_scsi_task_mgmt() 436 if (sdev->lun != req->LUN[1]) { in mptsas_process_scsi_task_mgmt() 441 QTAILQ_FOREACH_SAFE(r, &sdev->requests, next, next) { in mptsas_process_scsi_task_mgmt() [all …]
|
| H A D | scsi-bus.c | 1763 void scsi_device_set_ua(SCSIDevice *sdev, SCSISense sense) in scsi_device_set_ua() argument 1769 trace_scsi_device_set_ua(sdev->id, sdev->lun, sense.key, in scsi_device_set_ua() 1776 prec1 = scsi_ua_precedence(sdev->unit_attention); in scsi_device_set_ua() 1779 sdev->unit_attention = sense; in scsi_device_set_ua() 1791 void scsi_device_purge_requests(SCSIDevice *sdev, SCSISense sense) in scsi_device_purge_requests() argument 1793 scsi_device_for_each_req_async(sdev, scsi_device_purge_one_req, NULL); in scsi_device_purge_requests() 1800 blk_drain(sdev->conf.blk); in scsi_device_purge_requests() 1802 scsi_device_set_ua(sdev, sense); in scsi_device_purge_requests() 1805 void scsi_device_drained_begin(SCSIDevice *sdev) in scsi_device_drained_begin() argument 1807 SCSIBus *bus = DO_UPCAST(SCSIBus, qbus, sdev->qdev.parent_bus); in scsi_device_drained_begin() [all …]
|
| /openbmc/u-boot/include/configs/ |
| H A D | nokia_rx51.h | 168 int rx51_kp_tstc(struct stdio_dev *sdev); 169 int rx51_kp_getc(struct stdio_dev *sdev);
|
| /openbmc/qemu/include/hw/arm/ |
| H A D | smmu-common.h | 183 static inline uint16_t smmu_get_sid(SMMUDevice *sdev) in smmu_get_sid() argument 185 return PCI_BUILD_BDF(pci_bus_num(sdev->bus), sdev->devfn); in smmu_get_sid()
|
| /openbmc/qemu/include/hw/scsi/ |
| H A D | scsi.h | 231 void scsi_device_drained_begin(SCSIDevice *sdev); 232 void scsi_device_drained_end(SCSIDevice *sdev); 233 void scsi_device_purge_requests(SCSIDevice *sdev, SCSISense sense); 234 void scsi_device_set_ua(SCSIDevice *sdev, SCSISense sense);
|
| /openbmc/u-boot/include/ |
| H A D | keyboard.h | 14 struct stdio_dev sdev; member
|
| H A D | video_console.h | 64 struct stdio_dev sdev; member
|
| /openbmc/qemu/hw/s390x/ |
| H A D | event-facility.c | 391 DeviceState *sdev = DEVICE(obj); in init_event_facility() local 397 TYPE_SCLP_EVENTS_BUS, sdev, NULL); in init_event_facility() 425 SCLPEventFacility *sdev = EVENT_FACILITY(dev); in reset_event_facility() local 427 sdev->receive_mask = 0; in reset_event_facility()
|
| /openbmc/u-boot/board/nokia/rx51/ |
| H A D | rx51.c | 596 int rx51_kp_tstc(struct stdio_dev *sdev) in rx51_kp_tstc() argument 652 int rx51_kp_getc(struct stdio_dev *sdev) in rx51_kp_getc() argument 655 while (!rx51_kp_tstc(sdev)) in rx51_kp_getc()
|