diff options
author | Juha Riihimäki <juha.riihimaki@nokia.com> | 2011-07-29 16:35:26 +0100 |
---|---|---|
committer | Andrzej Zaborowski <andrew.zaborowski@intel.com> | 2011-07-30 06:42:16 +0200 |
commit | cb9e8538c047c62157f313e4d4489a905c445452 (patch) | |
tree | 1edf879ac432e8a72e29c33a22225fa9e5673a84 /hw/nseries.c | |
parent | 18b6543df38b4a0c2eb8d8ee90b21ecaed3476ad (diff) | |
download | qemu-cb9e8538c047c62157f313e4d4489a905c445452.tar.gz qemu-cb9e8538c047c62157f313e4d4489a905c445452.tar.bz2 qemu-cb9e8538c047c62157f313e4d4489a905c445452.zip |
onenand: Handle various ID fields separately
Handle the manufacturer, device and version IDs separately rather than
smooshing them all together into a single uint32_t. Note that the ID
registers are actually 16 bit, even though typically the top bits are 0
and the Read Identification Data command only returns the bottom 8 bits.
Signed-off-by: Juha Riihimäki <juha.riihimaki@nokia.com>
[Riku Voipio: Fixes and restructuring patchset]
Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
[Peter Maydell: More fixes and cleanups for upstream submission]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
Diffstat (limited to 'hw/nseries.c')
-rw-r--r-- | hw/nseries.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/hw/nseries.c b/hw/nseries.c index be50a5cfc6..6a5575e78e 100644 --- a/hw/nseries.c +++ b/hw/nseries.c @@ -167,8 +167,9 @@ static void n8x0_nand_setup(struct n800_s *s) DriveInfo *dinfo; dinfo = drive_get(IF_MTD, 0, 0); - /* Either ec40xx or ec48xx are OK for the ID */ - s->nand = onenand_init(dinfo ? dinfo->bdrv : 0, 0xec4800, 1, + /* Either 0x40 or 0x48 are OK for the device ID */ + s->nand = onenand_init(dinfo ? dinfo->bdrv : 0, + NAND_MFR_SAMSUNG, 0x48, 0, 1, qdev_get_gpio_in(s->cpu->gpio, N8X0_ONENAND_GPIO)); omap_gpmc_attach(s->cpu->gpmc, N8X0_ONENAND_CS, 0, onenand_base_update, onenand_base_unmap, s->nand); |