Revision 7426aa72 hw/block/nand.c
b/hw/block/nand.c | ||
---|---|---|
21 | 21 |
# include "hw/hw.h" |
22 | 22 |
# include "hw/block/flash.h" |
23 | 23 |
# include "sysemu/blockdev.h" |
24 |
# include "hw/sysbus.h"
|
|
24 |
#include "hw/qdev.h"
|
|
25 | 25 |
#include "qemu/error-report.h" |
26 | 26 |
|
27 | 27 |
# define NAND_CMD_READ0 0x00 |
... | ... | |
54 | 54 |
|
55 | 55 |
typedef struct NANDFlashState NANDFlashState; |
56 | 56 |
struct NANDFlashState { |
57 |
SysBusDevice busdev; |
|
57 |
DeviceState parent_obj; |
|
58 |
|
|
58 | 59 |
uint8_t manf_id, chip_id; |
59 | 60 |
uint8_t buswidth; /* in BYTES */ |
60 | 61 |
int size, pages; |
... | ... | |
440 | 441 |
|
441 | 442 |
static const TypeInfo nand_info = { |
442 | 443 |
.name = TYPE_NAND, |
443 |
.parent = TYPE_SYS_BUS_DEVICE,
|
|
444 |
.parent = TYPE_DEVICE, |
|
444 | 445 |
.instance_size = sizeof(NANDFlashState), |
445 | 446 |
.class_init = nand_class_init, |
446 | 447 |
}; |
Also available in: Unified diff