fsl-imx6.c (c221287f8ff4e46fffad11bb2a6bc99442e845be) | fsl-imx6.c (9bca0edb282de0007a4f068d9d20f3e3c3aadef7) |
---|---|
1/* 2 * Copyright (c) 2015 Jean-Christophe Dubois <jcd@tribudubois.net> 3 * 4 * i.MX6 SOC emulation. 5 * 6 * Based on hw/arm/fsl-imx31.c 7 * 8 * This program is free software; you can redistribute it and/or modify it --- 175 unchanged lines hidden (view full) --- 184 { FSL_IMX6_UART1_ADDR, FSL_IMX6_UART1_IRQ }, 185 { FSL_IMX6_UART2_ADDR, FSL_IMX6_UART2_IRQ }, 186 { FSL_IMX6_UART3_ADDR, FSL_IMX6_UART3_IRQ }, 187 { FSL_IMX6_UART4_ADDR, FSL_IMX6_UART4_IRQ }, 188 { FSL_IMX6_UART5_ADDR, FSL_IMX6_UART5_IRQ }, 189 }; 190 191 if (i < MAX_SERIAL_PORTS) { | 1/* 2 * Copyright (c) 2015 Jean-Christophe Dubois <jcd@tribudubois.net> 3 * 4 * i.MX6 SOC emulation. 5 * 6 * Based on hw/arm/fsl-imx31.c 7 * 8 * This program is free software; you can redistribute it and/or modify it --- 175 unchanged lines hidden (view full) --- 184 { FSL_IMX6_UART1_ADDR, FSL_IMX6_UART1_IRQ }, 185 { FSL_IMX6_UART2_ADDR, FSL_IMX6_UART2_IRQ }, 186 { FSL_IMX6_UART3_ADDR, FSL_IMX6_UART3_IRQ }, 187 { FSL_IMX6_UART4_ADDR, FSL_IMX6_UART4_IRQ }, 188 { FSL_IMX6_UART5_ADDR, FSL_IMX6_UART5_IRQ }, 189 }; 190 191 if (i < MAX_SERIAL_PORTS) { |
192 qdev_prop_set_chr(DEVICE(&s->uart[i]), "chardev", serial_hds[i]); | 192 qdev_prop_set_chr(DEVICE(&s->uart[i]), "chardev", serial_hd(i)); |
193 } 194 195 object_property_set_bool(OBJECT(&s->uart[i]), true, "realized", &err); 196 if (err) { 197 error_propagate(errp, err); 198 return; 199 } 200 --- 232 unchanged lines hidden (view full) --- 433} 434 435static void fsl_imx6_class_init(ObjectClass *oc, void *data) 436{ 437 DeviceClass *dc = DEVICE_CLASS(oc); 438 439 dc->realize = fsl_imx6_realize; 440 dc->desc = "i.MX6 SOC"; | 193 } 194 195 object_property_set_bool(OBJECT(&s->uart[i]), true, "realized", &err); 196 if (err) { 197 error_propagate(errp, err); 198 return; 199 } 200 --- 232 unchanged lines hidden (view full) --- 433} 434 435static void fsl_imx6_class_init(ObjectClass *oc, void *data) 436{ 437 DeviceClass *dc = DEVICE_CLASS(oc); 438 439 dc->realize = fsl_imx6_realize; 440 dc->desc = "i.MX6 SOC"; |
441 /* Reason: Uses serial_hds[] in the realize() function */ | 441 /* Reason: Uses serial_hd() in the realize() function */ |
442 dc->user_creatable = false; 443} 444 445static const TypeInfo fsl_imx6_type_info = { 446 .name = TYPE_FSL_IMX6, 447 .parent = TYPE_DEVICE, 448 .instance_size = sizeof(FslIMX6State), 449 .instance_init = fsl_imx6_init, 450 .class_init = fsl_imx6_class_init, 451}; 452 453static void fsl_imx6_register_types(void) 454{ 455 type_register_static(&fsl_imx6_type_info); 456} 457 458type_init(fsl_imx6_register_types) | 442 dc->user_creatable = false; 443} 444 445static const TypeInfo fsl_imx6_type_info = { 446 .name = TYPE_FSL_IMX6, 447 .parent = TYPE_DEVICE, 448 .instance_size = sizeof(FslIMX6State), 449 .instance_init = fsl_imx6_init, 450 .class_init = fsl_imx6_class_init, 451}; 452 453static void fsl_imx6_register_types(void) 454{ 455 type_register_static(&fsl_imx6_type_info); 456} 457 458type_init(fsl_imx6_register_types) |