bcm2835_peripherals.c (bec9c64ef7be8063f1192608b83877bc5c9ea217) | bcm2835_peripherals.c (9bca0edb282de0007a4f068d9d20f3e3c3aadef7) |
---|---|
1/* 2 * Raspberry Pi emulation (c) 2012 Gregory Estrade 3 * Upstreaming code cleanup [including bcm2835_*] (c) 2013 Jan Petrous 4 * 5 * Rasperry Pi 2 emulation and refactoring Copyright (c) 2015, Microsoft 6 * Written by Andrew Baumann 7 * 8 * This code is licensed under the GNU GPLv2 and later. --- 152 unchanged lines hidden (view full) --- 161 return; 162 } 163 164 memory_region_add_subregion(&s->peri_mr, ARMCTRL_IC_OFFSET, 165 sysbus_mmio_get_region(SYS_BUS_DEVICE(&s->ic), 0)); 166 sysbus_pass_irq(SYS_BUS_DEVICE(s), SYS_BUS_DEVICE(&s->ic)); 167 168 /* UART0 */ | 1/* 2 * Raspberry Pi emulation (c) 2012 Gregory Estrade 3 * Upstreaming code cleanup [including bcm2835_*] (c) 2013 Jan Petrous 4 * 5 * Rasperry Pi 2 emulation and refactoring Copyright (c) 2015, Microsoft 6 * Written by Andrew Baumann 7 * 8 * This code is licensed under the GNU GPLv2 and later. --- 152 unchanged lines hidden (view full) --- 161 return; 162 } 163 164 memory_region_add_subregion(&s->peri_mr, ARMCTRL_IC_OFFSET, 165 sysbus_mmio_get_region(SYS_BUS_DEVICE(&s->ic), 0)); 166 sysbus_pass_irq(SYS_BUS_DEVICE(s), SYS_BUS_DEVICE(&s->ic)); 167 168 /* UART0 */ |
169 qdev_prop_set_chr(DEVICE(s->uart0), "chardev", serial_hds[0]); | 169 qdev_prop_set_chr(DEVICE(s->uart0), "chardev", serial_hd(0)); |
170 object_property_set_bool(OBJECT(s->uart0), true, "realized", &err); 171 if (err) { 172 error_propagate(errp, err); 173 return; 174 } 175 176 memory_region_add_subregion(&s->peri_mr, UART0_OFFSET, 177 sysbus_mmio_get_region(s->uart0, 0)); 178 sysbus_connect_irq(s->uart0, 0, 179 qdev_get_gpio_in_named(DEVICE(&s->ic), BCM2835_IC_GPU_IRQ, 180 INTERRUPT_UART)); 181 /* AUX / UART1 */ | 170 object_property_set_bool(OBJECT(s->uart0), true, "realized", &err); 171 if (err) { 172 error_propagate(errp, err); 173 return; 174 } 175 176 memory_region_add_subregion(&s->peri_mr, UART0_OFFSET, 177 sysbus_mmio_get_region(s->uart0, 0)); 178 sysbus_connect_irq(s->uart0, 0, 179 qdev_get_gpio_in_named(DEVICE(&s->ic), BCM2835_IC_GPU_IRQ, 180 INTERRUPT_UART)); 181 /* AUX / UART1 */ |
182 qdev_prop_set_chr(DEVICE(&s->aux), "chardev", serial_hds[1]); | 182 qdev_prop_set_chr(DEVICE(&s->aux), "chardev", serial_hd(1)); |
183 184 object_property_set_bool(OBJECT(&s->aux), true, "realized", &err); 185 if (err) { 186 error_propagate(errp, err); 187 return; 188 } 189 190 memory_region_add_subregion(&s->peri_mr, UART1_OFFSET, --- 169 unchanged lines hidden --- | 183 184 object_property_set_bool(OBJECT(&s->aux), true, "realized", &err); 185 if (err) { 186 error_propagate(errp, err); 187 return; 188 } 189 190 memory_region_add_subregion(&s->peri_mr, UART1_OFFSET, --- 169 unchanged lines hidden --- |