aboutsummaryrefslogtreecommitdiff
path: root/hw/spitz.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/spitz.c')
-rw-r--r--hw/spitz.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/spitz.c b/hw/spitz.c
index 006f7a97e3..78e9c34592 100644
--- a/hw/spitz.c
+++ b/hw/spitz.c
@@ -169,11 +169,13 @@ static void sl_flash_register(PXA2xxState *cpu, int size)
static int sl_nand_init(SysBusDevice *dev) {
int iomemtype;
SLNANDState *s;
+ DriveInfo *nand;
s = FROM_SYSBUS(SLNANDState, dev);
s->ctl = 0;
- s->nand = nand_init(s->manf_id, s->chip_id);
+ nand = drive_get(IF_MTD, 0, 0);
+ s->nand = nand_init(nand ? nand->bdrv : NULL, s->manf_id, s->chip_id);
iomemtype = cpu_register_io_memory(sl_readfn,
sl_writefn, s, DEVICE_NATIVE_ENDIAN);