Lines Matching refs:i

36     int i;  in fsl_imx6ul_init()  local
70 for (i = 0; i < FSL_IMX6UL_NUM_GPIOS; i++) { in fsl_imx6ul_init()
71 snprintf(name, NAME_SIZE, "gpio%d", i); in fsl_imx6ul_init()
72 object_initialize_child(obj, name, &s->gpio[i], TYPE_IMX_GPIO); in fsl_imx6ul_init()
78 for (i = 0; i < FSL_IMX6UL_NUM_GPTS; i++) { in fsl_imx6ul_init()
79 snprintf(name, NAME_SIZE, "gpt%d", i); in fsl_imx6ul_init()
80 object_initialize_child(obj, name, &s->gpt[i], TYPE_IMX6UL_GPT); in fsl_imx6ul_init()
86 for (i = 0; i < FSL_IMX6UL_NUM_EPITS; i++) { in fsl_imx6ul_init()
87 snprintf(name, NAME_SIZE, "epit%d", i + 1); in fsl_imx6ul_init()
88 object_initialize_child(obj, name, &s->epit[i], TYPE_IMX_EPIT); in fsl_imx6ul_init()
94 for (i = 0; i < FSL_IMX6UL_NUM_ECSPIS; i++) { in fsl_imx6ul_init()
95 snprintf(name, NAME_SIZE, "spi%d", i + 1); in fsl_imx6ul_init()
96 object_initialize_child(obj, name, &s->spi[i], TYPE_IMX_SPI); in fsl_imx6ul_init()
102 for (i = 0; i < FSL_IMX6UL_NUM_I2CS; i++) { in fsl_imx6ul_init()
103 snprintf(name, NAME_SIZE, "i2c%d", i + 1); in fsl_imx6ul_init()
104 object_initialize_child(obj, name, &s->i2c[i], TYPE_IMX_I2C); in fsl_imx6ul_init()
110 for (i = 0; i < FSL_IMX6UL_NUM_UARTS; i++) { in fsl_imx6ul_init()
111 snprintf(name, NAME_SIZE, "uart%d", i); in fsl_imx6ul_init()
112 object_initialize_child(obj, name, &s->uart[i], TYPE_IMX_SERIAL); in fsl_imx6ul_init()
118 for (i = 0; i < FSL_IMX6UL_NUM_ETHS; i++) { in fsl_imx6ul_init()
119 snprintf(name, NAME_SIZE, "eth%d", i); in fsl_imx6ul_init()
120 object_initialize_child(obj, name, &s->eth[i], TYPE_IMX_ENET); in fsl_imx6ul_init()
126 for (i = 0; i < FSL_IMX6UL_NUM_USB_PHYS; i++) { in fsl_imx6ul_init()
127 snprintf(name, NAME_SIZE, "usbphy%d", i); in fsl_imx6ul_init()
128 object_initialize_child(obj, name, &s->usbphy[i], TYPE_IMX_USBPHY); in fsl_imx6ul_init()
134 for (i = 0; i < FSL_IMX6UL_NUM_USBS; i++) { in fsl_imx6ul_init()
135 snprintf(name, NAME_SIZE, "usb%d", i); in fsl_imx6ul_init()
136 object_initialize_child(obj, name, &s->usb[i], TYPE_CHIPIDEA); in fsl_imx6ul_init()
142 for (i = 0; i < FSL_IMX6UL_NUM_USDHCS; i++) { in fsl_imx6ul_init()
143 snprintf(name, NAME_SIZE, "usdhc%d", i); in fsl_imx6ul_init()
144 object_initialize_child(obj, name, &s->usdhc[i], TYPE_IMX_USDHC); in fsl_imx6ul_init()
150 for (i = 0; i < FSL_IMX6UL_NUM_WDTS; i++) { in fsl_imx6ul_init()
151 snprintf(name, NAME_SIZE, "wdt%d", i); in fsl_imx6ul_init()
152 object_initialize_child(obj, name, &s->wdt[i], TYPE_IMX2_WDT); in fsl_imx6ul_init()
160 int i; in fsl_imx6ul_realize() local
229 for (i = 0; i < FSL_IMX6UL_NUM_GPTS; i++) { in fsl_imx6ul_realize()
240 s->gpt[i].ccm = IMX_CCM(&s->ccm); in fsl_imx6ul_realize()
241 sysbus_realize(SYS_BUS_DEVICE(&s->gpt[i]), &error_abort); in fsl_imx6ul_realize()
243 sysbus_mmio_map(SYS_BUS_DEVICE(&s->gpt[i]), 0, in fsl_imx6ul_realize()
244 FSL_IMX6UL_GPTn_ADDR[i]); in fsl_imx6ul_realize()
246 sysbus_connect_irq(SYS_BUS_DEVICE(&s->gpt[i]), 0, in fsl_imx6ul_realize()
248 FSL_IMX6UL_GPTn_IRQ[i])); in fsl_imx6ul_realize()
254 for (i = 0; i < FSL_IMX6UL_NUM_EPITS; i++) { in fsl_imx6ul_realize()
265 s->epit[i].ccm = IMX_CCM(&s->ccm); in fsl_imx6ul_realize()
266 sysbus_realize(SYS_BUS_DEVICE(&s->epit[i]), &error_abort); in fsl_imx6ul_realize()
268 sysbus_mmio_map(SYS_BUS_DEVICE(&s->epit[i]), 0, in fsl_imx6ul_realize()
269 FSL_IMX6UL_EPITn_ADDR[i]); in fsl_imx6ul_realize()
271 sysbus_connect_irq(SYS_BUS_DEVICE(&s->epit[i]), 0, in fsl_imx6ul_realize()
273 FSL_IMX6UL_EPITn_IRQ[i])); in fsl_imx6ul_realize()
279 for (i = 0; i < FSL_IMX6UL_NUM_GPIOS; i++) { in fsl_imx6ul_realize()
304 sysbus_realize(SYS_BUS_DEVICE(&s->gpio[i]), &error_abort); in fsl_imx6ul_realize()
306 sysbus_mmio_map(SYS_BUS_DEVICE(&s->gpio[i]), 0, in fsl_imx6ul_realize()
307 FSL_IMX6UL_GPIOn_ADDR[i]); in fsl_imx6ul_realize()
309 sysbus_connect_irq(SYS_BUS_DEVICE(&s->gpio[i]), 0, in fsl_imx6ul_realize()
311 FSL_IMX6UL_GPIOn_LOW_IRQ[i])); in fsl_imx6ul_realize()
313 sysbus_connect_irq(SYS_BUS_DEVICE(&s->gpio[i]), 1, in fsl_imx6ul_realize()
315 FSL_IMX6UL_GPIOn_HIGH_IRQ[i])); in fsl_imx6ul_realize()
347 for (i = 0; i < FSL_IMX6UL_NUM_ECSPIS; i++) { in fsl_imx6ul_realize()
363 sysbus_realize(SYS_BUS_DEVICE(&s->spi[i]), &error_abort); in fsl_imx6ul_realize()
365 sysbus_mmio_map(SYS_BUS_DEVICE(&s->spi[i]), 0, in fsl_imx6ul_realize()
366 FSL_IMX6UL_SPIn_ADDR[i]); in fsl_imx6ul_realize()
368 sysbus_connect_irq(SYS_BUS_DEVICE(&s->spi[i]), 0, in fsl_imx6ul_realize()
370 FSL_IMX6UL_SPIn_IRQ[i])); in fsl_imx6ul_realize()
376 for (i = 0; i < FSL_IMX6UL_NUM_I2CS; i++) { in fsl_imx6ul_realize()
391 sysbus_realize(SYS_BUS_DEVICE(&s->i2c[i]), &error_abort); in fsl_imx6ul_realize()
392 sysbus_mmio_map(SYS_BUS_DEVICE(&s->i2c[i]), 0, FSL_IMX6UL_I2Cn_ADDR[i]); in fsl_imx6ul_realize()
394 sysbus_connect_irq(SYS_BUS_DEVICE(&s->i2c[i]), 0, in fsl_imx6ul_realize()
396 FSL_IMX6UL_I2Cn_IRQ[i])); in fsl_imx6ul_realize()
402 for (i = 0; i < FSL_IMX6UL_NUM_UARTS; i++) { in fsl_imx6ul_realize()
425 qdev_prop_set_chr(DEVICE(&s->uart[i]), "chardev", serial_hd(i)); in fsl_imx6ul_realize()
427 sysbus_realize(SYS_BUS_DEVICE(&s->uart[i]), &error_abort); in fsl_imx6ul_realize()
429 sysbus_mmio_map(SYS_BUS_DEVICE(&s->uart[i]), 0, in fsl_imx6ul_realize()
430 FSL_IMX6UL_UARTn_ADDR[i]); in fsl_imx6ul_realize()
432 sysbus_connect_irq(SYS_BUS_DEVICE(&s->uart[i]), 0, in fsl_imx6ul_realize()
434 FSL_IMX6UL_UARTn_IRQ[i])); in fsl_imx6ul_realize()
443 for (i = 0; i < FSL_IMX6UL_NUM_ETHS; i++) { in fsl_imx6ul_realize()
444 object_property_set_bool(OBJECT(&s->eth[i]), "phy-connected", in fsl_imx6ul_realize()
445 s->phy_connected[i], &error_abort); in fsl_imx6ul_realize()
450 if (!s->phy_connected[i]) { in fsl_imx6ul_realize()
451 object_property_set_link(OBJECT(&s->eth[1 - i]), "phy-consumer", in fsl_imx6ul_realize()
452 OBJECT(&s->eth[i]), &error_abort); in fsl_imx6ul_realize()
456 for (i = 0; i < FSL_IMX6UL_NUM_ETHS; i++) { in fsl_imx6ul_realize()
472 object_property_set_uint(OBJECT(&s->eth[i]), "phy-num", in fsl_imx6ul_realize()
473 s->phy_num[i], &error_abort); in fsl_imx6ul_realize()
474 object_property_set_uint(OBJECT(&s->eth[i]), "tx-ring-num", in fsl_imx6ul_realize()
476 qemu_configure_nic_device(DEVICE(&s->eth[i]), true, NULL); in fsl_imx6ul_realize()
477 sysbus_realize(SYS_BUS_DEVICE(&s->eth[i]), &error_abort); in fsl_imx6ul_realize()
479 sysbus_mmio_map(SYS_BUS_DEVICE(&s->eth[i]), 0, in fsl_imx6ul_realize()
480 FSL_IMX6UL_ENETn_ADDR[i]); in fsl_imx6ul_realize()
482 sysbus_connect_irq(SYS_BUS_DEVICE(&s->eth[i]), 0, in fsl_imx6ul_realize()
484 FSL_IMX6UL_ENETn_IRQ[i])); in fsl_imx6ul_realize()
486 sysbus_connect_irq(SYS_BUS_DEVICE(&s->eth[i]), 1, in fsl_imx6ul_realize()
488 FSL_IMX6UL_ENETn_TIMER_IRQ[i])); in fsl_imx6ul_realize()
494 for (i = 0; i < FSL_IMX6UL_NUM_USB_PHYS; i++) { in fsl_imx6ul_realize()
501 sysbus_realize(SYS_BUS_DEVICE(&s->usbphy[i]), &error_abort); in fsl_imx6ul_realize()
502 sysbus_mmio_map(SYS_BUS_DEVICE(&s->usbphy[i]), 0, in fsl_imx6ul_realize()
503 FSL_IMX6UL_USB_PHYn_ADDR[i]); in fsl_imx6ul_realize()
509 for (i = 0; i < FSL_IMX6UL_NUM_USBS; i++) { in fsl_imx6ul_realize()
520 sysbus_realize(SYS_BUS_DEVICE(&s->usb[i]), &error_abort); in fsl_imx6ul_realize()
521 sysbus_mmio_map(SYS_BUS_DEVICE(&s->usb[i]), 0, in fsl_imx6ul_realize()
522 FSL_IMX6UL_USB02_USBn_ADDR[i]); in fsl_imx6ul_realize()
523 sysbus_connect_irq(SYS_BUS_DEVICE(&s->usb[i]), 0, in fsl_imx6ul_realize()
525 FSL_IMX6UL_USBn_IRQ[i])); in fsl_imx6ul_realize()
531 for (i = 0; i < FSL_IMX6UL_NUM_USDHCS; i++) { in fsl_imx6ul_realize()
542 object_property_set_uint(OBJECT(&s->usdhc[i]), "vendor", in fsl_imx6ul_realize()
544 sysbus_realize(SYS_BUS_DEVICE(&s->usdhc[i]), &error_abort); in fsl_imx6ul_realize()
546 sysbus_mmio_map(SYS_BUS_DEVICE(&s->usdhc[i]), 0, in fsl_imx6ul_realize()
547 FSL_IMX6UL_USDHCn_ADDR[i]); in fsl_imx6ul_realize()
549 sysbus_connect_irq(SYS_BUS_DEVICE(&s->usdhc[i]), 0, in fsl_imx6ul_realize()
551 FSL_IMX6UL_USDHCn_IRQ[i])); in fsl_imx6ul_realize()
563 for (i = 0; i < FSL_IMX6UL_NUM_WDTS; i++) { in fsl_imx6ul_realize()
576 object_property_set_bool(OBJECT(&s->wdt[i]), "pretimeout-support", in fsl_imx6ul_realize()
578 sysbus_realize(SYS_BUS_DEVICE(&s->wdt[i]), &error_abort); in fsl_imx6ul_realize()
580 sysbus_mmio_map(SYS_BUS_DEVICE(&s->wdt[i]), 0, in fsl_imx6ul_realize()
581 FSL_IMX6UL_WDOGn_ADDR[i]); in fsl_imx6ul_realize()
582 sysbus_connect_irq(SYS_BUS_DEVICE(&s->wdt[i]), 0, in fsl_imx6ul_realize()
584 FSL_IMX6UL_WDOGn_IRQ[i])); in fsl_imx6ul_realize()
596 for (i = 0; i < FSL_IMX6UL_NUM_SAIS; i++) { in fsl_imx6ul_realize()
603 snprintf(name, NAME_SIZE, "sai%d", i); in fsl_imx6ul_realize()
604 create_unimplemented_device(name, FSL_IMX6UL_SAIn_ADDR[i], in fsl_imx6ul_realize()
611 for (i = 0; i < FSL_IMX6UL_NUM_PWMS; i++) { in fsl_imx6ul_realize()
623 snprintf(name, NAME_SIZE, "pwm%d", i); in fsl_imx6ul_realize()
624 create_unimplemented_device(name, FSL_IMX6UL_PWMn_ADDR[i], in fsl_imx6ul_realize()
637 for (i = 0; i < FSL_IMX6UL_NUM_CANS; i++) { in fsl_imx6ul_realize()
643 snprintf(name, NAME_SIZE, "can%d", i); in fsl_imx6ul_realize()
644 create_unimplemented_device(name, FSL_IMX6UL_CANn_ADDR[i], in fsl_imx6ul_realize()
657 for (i = 0; i < FSL_IMX6UL_NUM_ADCS; i++) { in fsl_imx6ul_realize()
663 snprintf(name, NAME_SIZE, "adc%d", i); in fsl_imx6ul_realize()
664 create_unimplemented_device(name, FSL_IMX6UL_ADCn_ADDR[i], in fsl_imx6ul_realize()