| /u-boot/drivers/power/pmic/ |
| A D | i2c_pmic_emul.c | 33 struct sandbox_i2c_pmic_plat_data *plat = dev_get_plat(emul); in sandbox_i2c_pmic_read_data() 53 struct sandbox_i2c_pmic_plat_data *plat = dev_get_plat(emul); in sandbox_i2c_pmic_write_data() 91 ret = sandbox_i2c_pmic_read_data(emul, msg->addr, in sandbox_i2c_pmic_xfer() 94 ret = sandbox_i2c_pmic_write_data(emul, msg->addr, in sandbox_i2c_pmic_xfer() 106 static int sandbox_i2c_pmic_of_to_plat(struct udevice *emul) in sandbox_i2c_pmic_of_to_plat() argument 108 struct sandbox_i2c_pmic_plat_data *plat = dev_get_plat(emul); in sandbox_i2c_pmic_of_to_plat() 109 struct udevice *pmic_dev = i2c_emul_get_device(emul); in sandbox_i2c_pmic_of_to_plat() 117 static int sandbox_i2c_pmic_probe(struct udevice *emul) in sandbox_i2c_pmic_probe() argument 120 struct udevice *pmic_dev = i2c_emul_get_device(emul); in sandbox_i2c_pmic_probe() 134 reg_defaults = dev_read_u8_array_ptr(emul, "reg-defaults", in sandbox_i2c_pmic_probe() [all …]
|
| /u-boot/drivers/i2c/ |
| A D | i2c-emul-uclass.c | 29 struct udevice *i2c_emul_get_device(struct udevice *emul) in i2c_emul_get_device() argument 31 struct i2c_emul_uc_plat *uc_plat = dev_get_uclass_plat(emul); in i2c_emul_get_device() 46 struct udevice *emul; in i2c_emul_find() local 51 "sandbox,emul", &emul); in i2c_emul_find() 55 ret = device_get_by_ofplat_idx(plat->emul_idx, &emul); in i2c_emul_find() 61 uc_plat = dev_get_uclass_plat(emul); in i2c_emul_find() 63 *emulp = emul; in i2c_emul_find() 65 return device_probe(emul); in i2c_emul_find()
|
| A D | sandbox_i2c.c | 28 if (!plat->emul) { in get_emul() 29 ret = i2c_emul_find(dev, &plat->emul); in get_emul() 33 *devp = plat->emul; in get_emul() 34 *opsp = i2c_get_ops(plat->emul); in get_emul() 52 struct udevice *emul, *dev; in sandbox_i2c_xfer() local 64 ret = get_emul(dev, &emul, &ops); in sandbox_i2c_xfer() 81 return ops->xfer(emul, msg, nmsgs); in sandbox_i2c_xfer()
|
| /u-boot/drivers/axi/ |
| A D | axi_sandbox.c | 28 struct udevice *emul; in axi_sandbox_read() local 32 ret = axi_sandbox_get_emul(bus, address, size, &emul); in axi_sandbox_read() 36 ops = axi_emul_get_ops(emul); in axi_sandbox_read() 40 return ops->read(emul, address, data, size); in axi_sandbox_read() 47 struct udevice *emul; in axi_sandbox_write() local 51 ret = axi_sandbox_get_emul(bus, address, size, &emul); in axi_sandbox_write() 55 ops = axi_emul_get_ops(emul); in axi_sandbox_write() 59 return ops->write(emul, address, data, size); in axi_sandbox_write()
|
| A D | Makefile | 9 obj-$(CONFIG_SANDBOX) += axi-emul-uclass.o
|
| /u-boot/drivers/usb/host/ |
| A D | usb-sandbox.c | 25 struct devrequest *setup, struct udevice *emul) in usbmon_trace() argument 41 debug(" %s", emul ? emul->name : "(no emul found)"); in usbmon_trace() 53 struct udevice *emul; in sandbox_submit_control() local 58 ret = usb_emul_find(bus, pipe, udev->portnr, &emul); in sandbox_submit_control() 59 usbmon_trace(bus, pipe, setup, emul); in sandbox_submit_control() 86 struct udevice *emul; in sandbox_submit_bulk() local 91 ret = usb_emul_find(bus, pipe, udev->portnr, &emul); in sandbox_submit_bulk() 92 usbmon_trace(bus, pipe, NULL, emul); in sandbox_submit_bulk() 112 struct udevice *emul; in sandbox_submit_int() local 117 ret = usb_emul_find(bus, pipe, udev->portnr, &emul); in sandbox_submit_int() [all …]
|
| /u-boot/test/dm/ |
| A D | rtc.c | 62 struct udevice *dev, *emul; in dm_test_rtc_set_get() local 68 ut_assertok(i2c_emul_find(dev, &emul)); in dm_test_rtc_set_get() 69 ut_assertnonnull(emul); in dm_test_rtc_set_get() 126 sandbox_i2c_rtc_set_offset(emul, false, 0); in dm_test_rtc_set_get() 142 sandbox_i2c_rtc_set_offset(emul, true, 0); in dm_test_rtc_set_get() 151 struct udevice *dev, *emul; in dm_test_rtc_read_write() local 175 ut_assertok(i2c_emul_find(dev, &emul)); in dm_test_rtc_read_write() 176 ut_assertnonnull(emul); in dm_test_rtc_read_write() 253 struct udevice *dev, *emul; in dm_test_rtc_reset() local 260 ut_assertok(i2c_emul_find(dev, &emul)); in dm_test_rtc_reset() [all …]
|
| A D | sf.c | 24 struct udevice *dev, *emul; in dm_test_spi_flash() local 55 ut_assertok(uclass_first_device_err(UCLASS_SPI_EMUL, &emul)); in dm_test_spi_flash() 57 sandbox_sf_set_block_protect(emul, 1); in dm_test_spi_flash() 59 sandbox_sf_set_block_protect(emul, 0); in dm_test_spi_flash()
|
| /u-boot/drivers/usb/emul/ |
| A D | usb-emul-uclass.c | 182 struct dm_usb_ops *ops = usb_get_emul_ops(emul); in usb_emul_control() 187 plat = dev_get_parent_plat(emul); in usb_emul_control() 190 debug("%s: dev=%s\n", __func__, emul->name); in usb_emul_control() 198 ret = device_probe(emul); in usb_emul_control() 207 debug(" ** set address %s %d\n", emul->name, in usb_emul_control() 221 ret = device_probe(emul); in usb_emul_control() 236 struct dm_usb_ops *ops = usb_get_emul_ops(emul); in usb_emul_bulk() 242 debug("%s: dev=%s\n", __func__, emul->name); in usb_emul_bulk() 243 ret = device_probe(emul); in usb_emul_bulk() 253 struct dm_usb_ops *ops = usb_get_emul_ops(emul); in usb_emul_int() [all …]
|
| A D | Makefile | 9 obj-$(CONFIG_USB_EMUL) += usb-emul-uclass.o
|
| /u-boot/arch/mips/ |
| A D | config.mk | 7 32bit-emul := elf32btsmip 8 64bit-emul := elf64btsmip 16 32bit-emul := elf32ltsmip 17 64bit-emul := elf64ltsmip 26 KBUILD_LDFLAGS += -m $(32bit-emul) 32 KBUILD_LDFLAGS += -m$(64bit-emul)
|
| /u-boot/drivers/pci/ |
| A D | pci_sandbox.c | 30 struct udevice *container, *emul; in sandbox_pci_write_config() local 33 ret = sandbox_pci_get_emul(bus, devfn, &container, &emul); in sandbox_pci_write_config() 36 ops = pci_get_emul_ops(emul); in sandbox_pci_write_config() 40 return ops->write_config(emul, offset, value, size); in sandbox_pci_write_config() 48 struct udevice *container, *emul; in sandbox_pci_read_config() local 54 ret = sandbox_pci_get_emul(bus, devfn, &container, &emul); in sandbox_pci_read_config() 73 ops = pci_get_emul_ops(emul); in sandbox_pci_read_config() 77 return ops->read_config(emul, offset, valuep, size); in sandbox_pci_read_config()
|
| A D | pci-emul-uclass.c | 52 int sandbox_pci_get_client(struct udevice *emul, struct udevice **devp) in sandbox_pci_get_client() argument 54 struct pci_emul_uc_priv *upriv = dev_get_uclass_priv(emul); in sandbox_pci_get_client()
|
| /u-boot/arch/riscv/ |
| A D | config.mk | 13 32bit-emul := elf32lriscv 14 64bit-emul := elf64lriscv 17 KBUILD_LDFLAGS += -m $(32bit-emul) 23 KBUILD_LDFLAGS += -m $(64bit-emul)
|
| /u-boot/drivers/rtc/ |
| A D | i2c_rtc_emul.c | 106 static int sandbox_i2c_rtc_prepare_read(struct udevice *emul) in sandbox_i2c_rtc_prepare_read() argument 108 struct sandbox_i2c_rtc_plat_data *plat = dev_get_plat(emul); in sandbox_i2c_rtc_prepare_read() 112 ret = sandbox_i2c_rtc_get(emul, &time); in sandbox_i2c_rtc_prepare_read() 127 static int sandbox_i2c_rtc_complete_write(struct udevice *emul) in sandbox_i2c_rtc_complete_write() argument 129 struct sandbox_i2c_rtc_plat_data *plat = dev_get_plat(emul); in sandbox_i2c_rtc_complete_write() 141 ret = sandbox_i2c_rtc_set(emul, &time); in sandbox_i2c_rtc_complete_write() 148 static int sandbox_i2c_rtc_xfer(struct udevice *emul, struct i2c_msg *msg, in sandbox_i2c_rtc_xfer() argument 151 struct sandbox_i2c_rtc_plat_data *plat = dev_get_plat(emul); in sandbox_i2c_rtc_xfer() 156 ret = sandbox_i2c_rtc_prepare_read(emul); in sandbox_i2c_rtc_xfer() 185 reset_time(emul); in sandbox_i2c_rtc_xfer() [all …]
|
| /u-boot/drivers/misc/ |
| A D | p2sb_emul.c | 51 static int sandbox_p2sb_emul_read_config(const struct udevice *emul, in sandbox_p2sb_emul_read_config() argument 55 struct p2sb_emul_plat *plat = dev_get_plat(emul); in sandbox_p2sb_emul_read_config() 105 static int sandbox_p2sb_emul_write_config(struct udevice *emul, uint offset, in sandbox_p2sb_emul_write_config() argument 108 struct p2sb_emul_plat *plat = dev_get_plat(emul); in sandbox_p2sb_emul_write_config() 133 static int sandbox_p2sb_emul_find_bar(struct udevice *emul, unsigned int addr, in sandbox_p2sb_emul_find_bar() argument 136 struct p2sb_emul_plat *plat = dev_get_plat(emul); in sandbox_p2sb_emul_find_bar() 187 static int find_p2sb_channel(struct udevice *emul, uint offset, in find_p2sb_channel() argument 194 ret = sandbox_pci_get_client(emul, &p2sb); in find_p2sb_channel()
|
| A D | swap_case.c | 86 static int sandbox_swap_case_read_ea(const struct udevice *emul, uint offset, in sandbox_swap_case_read_ea() argument 99 static int sandbox_swap_case_read_config(const struct udevice *emul, in sandbox_swap_case_read_config() argument 103 struct swap_case_plat *plat = dev_get_plat(emul); in sandbox_swap_case_read_config() 111 return sandbox_swap_case_read_ea(emul, offset, valuep, size); in sandbox_swap_case_read_config() 172 if (sandbox_swap_case_use_ea(emul)) in sandbox_swap_case_read_config() 178 if (sandbox_swap_case_use_ea(emul)) in sandbox_swap_case_read_config() 203 static int sandbox_swap_case_write_config(struct udevice *emul, uint offset, in sandbox_swap_case_write_config() argument 206 struct swap_case_plat *plat = dev_get_plat(emul); in sandbox_swap_case_write_config() 231 static int sandbox_swap_case_find_bar(struct udevice *emul, unsigned int addr, in sandbox_swap_case_find_bar() argument 234 struct swap_case_plat *plat = dev_get_plat(emul); in sandbox_swap_case_find_bar()
|
| A D | i2c_eeprom_emul.c | 73 static int sandbox_i2c_eeprom_xfer(struct udevice *emul, struct i2c_msg *msg, in sandbox_i2c_eeprom_xfer() argument 76 struct sandbox_i2c_flash *priv = dev_get_priv(emul); in sandbox_i2c_eeprom_xfer() 77 struct sandbox_i2c_flash_plat_data *plat = dev_get_plat(emul); in sandbox_i2c_eeprom_xfer()
|
| /u-boot/arch/sandbox/dts/ |
| A D | sandbox.dtsi | 111 sandbox,emul = <&emul_eeprom>; 117 sandbox,emul = <&emul0>; 128 i2c_emul: emul { 132 emul_eeprom: emul-eeprom { 136 #emul-cells = <0>; 141 #emul-cells = <0>; 190 sandbox,emul = <&pmc_emul>; 205 emul { 207 pmc_emul: emul@1e,0 { 210 swap_case_emul: emul@1f,0 { [all …]
|
| A D | test.dts | 808 sandbox,emul = <&emul0>; 818 sandbox,emul = <&emul1>; 821 i2c_emul: emul { 824 emul_eeprom: emul-eeprom { 839 sandbox,emul = <&emul_pmic0>; 844 sandbox,emul = <&emul_pmic1>; 1076 sandbox,emul = <&p2sb_emul>; 1114 p2sb_emul: emul@2,0 { 1117 pmc_emul1e: emul@1e,0 { 1338 compatible = "mux-emul"; [all …]
|
| /u-boot/drivers/spi/ |
| A D | sandbox_spi.c | 71 struct udevice *emul; in sandbox_spi_xfer() local 94 ret = sandbox_spi_get_emul(state, bus, slave, &emul); in sandbox_spi_xfer() 100 ret = device_probe(emul); in sandbox_spi_xfer() 104 ops = spi_emul_get_ops(emul); in sandbox_spi_xfer() 105 ret = ops->xfer(emul, bitlen, dout, din, flags); in sandbox_spi_xfer()
|
| /u-boot/drivers/power/acpi_pmc/ |
| A D | pmc_emul.c | 47 static int sandbox_pmc_emul_read_config(const struct udevice *emul, uint offset, in sandbox_pmc_emul_read_config() argument 50 struct pmc_emul_plat *plat = dev_get_plat(emul); in sandbox_pmc_emul_read_config() 100 static int sandbox_pmc_emul_write_config(struct udevice *emul, uint offset, in sandbox_pmc_emul_write_config() argument 103 struct pmc_emul_plat *plat = dev_get_plat(emul); in sandbox_pmc_emul_write_config() 128 static int sandbox_pmc_emul_find_bar(struct udevice *emul, unsigned int addr, in sandbox_pmc_emul_find_bar() argument 131 struct pmc_emul_plat *plat = dev_get_plat(emul); in sandbox_pmc_emul_find_bar()
|
| /u-boot/drivers/mtd/spi/ |
| A D | sandbox.c | 130 struct udevice *emul; in sandbox_sf_probe() local 135 ret = sandbox_spi_get_emul(state, bus, dev, &emul); in sandbox_sf_probe() 525 struct udevice *emul; in sandbox_sf_bind_emul() local 542 ret = device_bind(bus, drv, str, NULL, node, &emul); in sandbox_sf_bind_emul() 549 state->spi[busnum][cs].emul = emul; in sandbox_sf_bind_emul() 558 dev = state->spi[busnum][cs].emul; in sandbox_sf_unbind_emul() 561 state->spi[busnum][cs].emul = NULL; in sandbox_sf_unbind_emul() 574 if (!info->emul) { in sandbox_spi_get_emul() 586 *emulp = info->emul; in sandbox_spi_get_emul()
|
| /u-boot/doc/device-tree-bindings/pmic/ |
| A D | sandbox.txt | 16 Required PMIC's "emul" subnode, with property: 32 emul {
|
| /u-boot/doc/develop/driver-model/ |
| A D | pci-info.rst | 122 sandbox,emul = <&emul_1f>; 124 pci-emul { 125 compatible = "sandbox,pci-emul-parent"; 126 emul_1f: emul@1f,0 { 128 #emul-cells = <0>; 137 The pci-emul node should go outside the pci bus node, since otherwise it will 144 `- emul@1f,0 @ 05c662c8
|