msf2-soc.c (3788c7b6e56fa34ee2a73e41706eb2a2447ba75a) | msf2-soc.c (9bca0edb282de0007a4f068d9d20f3e3c3aadef7) |
---|---|
1/* 2 * SmartFusion2 SoC emulation. 3 * 4 * Copyright (c) 2017 Subbaraya Sundeep <sundeep.lkml@gmail.com> 5 * 6 * Permission is hereby granted, free of charge, to any person obtaining a copy 7 * of this software and associated documentation files (the "Software"), to deal 8 * in the Software without restriction, including without limitation the rights --- 124 unchanged lines hidden (view full) --- 133 } 134 135 qdev_connect_gpio_out_named(DEVICE(&s->armv7m.nvic), "SYSRESETREQ", 0, 136 qemu_allocate_irq(&do_sys_reset, NULL, 0)); 137 138 system_clock_scale = NANOSECONDS_PER_SECOND / s->m3clk; 139 140 for (i = 0; i < MSF2_NUM_UARTS; i++) { | 1/* 2 * SmartFusion2 SoC emulation. 3 * 4 * Copyright (c) 2017 Subbaraya Sundeep <sundeep.lkml@gmail.com> 5 * 6 * Permission is hereby granted, free of charge, to any person obtaining a copy 7 * of this software and associated documentation files (the "Software"), to deal 8 * in the Software without restriction, including without limitation the rights --- 124 unchanged lines hidden (view full) --- 133 } 134 135 qdev_connect_gpio_out_named(DEVICE(&s->armv7m.nvic), "SYSRESETREQ", 0, 136 qemu_allocate_irq(&do_sys_reset, NULL, 0)); 137 138 system_clock_scale = NANOSECONDS_PER_SECOND / s->m3clk; 139 140 for (i = 0; i < MSF2_NUM_UARTS; i++) { |
141 if (serial_hds[i]) { | 141 if (serial_hd(i)) { |
142 serial_mm_init(get_system_memory(), uart_addr[i], 2, 143 qdev_get_gpio_in(armv7m, uart_irq[i]), | 142 serial_mm_init(get_system_memory(), uart_addr[i], 2, 143 qdev_get_gpio_in(armv7m, uart_irq[i]), |
144 115200, serial_hds[i], DEVICE_NATIVE_ENDIAN); | 144 115200, serial_hd(i), DEVICE_NATIVE_ENDIAN); |
145 } 146 } 147 148 dev = DEVICE(&s->timer); 149 /* APB0 clock is the timer input clock */ 150 qdev_prop_set_uint32(dev, "clock-frequency", s->m3clk / s->apb0div); 151 object_property_set_bool(OBJECT(&s->timer), true, "realized", &err); 152 if (err != NULL) { --- 96 unchanged lines hidden --- | 145 } 146 } 147 148 dev = DEVICE(&s->timer); 149 /* APB0 clock is the timer input clock */ 150 qdev_prop_set_uint32(dev, "clock-frequency", s->m3clk / s->apb0div); 151 object_property_set_bool(OBJECT(&s->timer), true, "realized", &err); 152 if (err != NULL) { --- 96 unchanged lines hidden --- |