bcm2835_spi.c (4f2fdb10b5f78ba95300648fce74c42d3e4511c7) | bcm2835_spi.c (e3d0814368d00e7985c31edf5d0cfce45972d4be) |
---|---|
1/* 2 * BCM2835 SPI Master Controller 3 * 4 * Copyright (c) 2024 Rayhan Faizel <rayhan.faizel@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 --- 254 unchanged lines hidden (view full) --- 263 VMSTATE_END_OF_LIST() 264 } 265}; 266 267static void bcm2835_spi_class_init(ObjectClass *klass, void *data) 268{ 269 DeviceClass *dc = DEVICE_CLASS(klass); 270 | 1/* 2 * BCM2835 SPI Master Controller 3 * 4 * Copyright (c) 2024 Rayhan Faizel <rayhan.faizel@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 --- 254 unchanged lines hidden (view full) --- 263 VMSTATE_END_OF_LIST() 264 } 265}; 266 267static void bcm2835_spi_class_init(ObjectClass *klass, void *data) 268{ 269 DeviceClass *dc = DEVICE_CLASS(klass); 270 |
271 dc->reset = bcm2835_spi_reset; | 271 device_class_set_legacy_reset(dc, bcm2835_spi_reset); |
272 dc->realize = bcm2835_spi_realize; 273 dc->vmsd = &vmstate_bcm2835_spi; 274} 275 276static const TypeInfo bcm2835_spi_info = { 277 .name = TYPE_BCM2835_SPI, 278 .parent = TYPE_SYS_BUS_DEVICE, 279 .instance_size = sizeof(BCM2835SPIState), 280 .class_init = bcm2835_spi_class_init, 281}; 282 283static void bcm2835_spi_register_types(void) 284{ 285 type_register_static(&bcm2835_spi_info); 286} 287 288type_init(bcm2835_spi_register_types) | 272 dc->realize = bcm2835_spi_realize; 273 dc->vmsd = &vmstate_bcm2835_spi; 274} 275 276static const TypeInfo bcm2835_spi_info = { 277 .name = TYPE_BCM2835_SPI, 278 .parent = TYPE_SYS_BUS_DEVICE, 279 .instance_size = sizeof(BCM2835SPIState), 280 .class_init = bcm2835_spi_class_init, 281}; 282 283static void bcm2835_spi_register_types(void) 284{ 285 type_register_static(&bcm2835_spi_info); 286} 287 288type_init(bcm2835_spi_register_types) |