[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 2/2] pflash: Bury disabled code to limit device sizes
From: |
Markus Armbruster |
Subject: |
[Qemu-devel] [PULL 2/2] pflash: Bury disabled code to limit device sizes |
Date: |
Tue, 26 Mar 2019 10:05:01 +0100 |
From: Alex Bennée <address@hidden>
We disabled code to limit device sizes to 8, 16, 32 or 64MiB more than
a decade ago in commit 95d1f3edd5e and c8b153d7949, v0.9.1. Bury.
Signed-off-by: Alex Bennée <address@hidden>
Reviewed-by: Laszlo Ersek <address@hidden>
[Extracted from a larger patch, extended to pflash_cfi02.c]
Signed-off-by: Markus Armbruster <address@hidden>
Message-Id: <address@hidden>
---
hw/block/pflash_cfi01.c | 7 -------
hw/block/pflash_cfi02.c | 6 ------
2 files changed, 13 deletions(-)
diff --git a/hw/block/pflash_cfi01.c b/hw/block/pflash_cfi01.c
index 9937739a82..16dfae14b8 100644
--- a/hw/block/pflash_cfi01.c
+++ b/hw/block/pflash_cfi01.c
@@ -731,13 +731,6 @@ static void pflash_cfi01_realize(DeviceState *dev, Error
**errp)
}
device_len = sector_len_per_device * blocks_per_device;
- /* XXX: to be fixed */
-#if 0
- if (total_len != (8 * 1024 * 1024) && total_len != (16 * 1024 * 1024) &&
- total_len != (32 * 1024 * 1024) && total_len != (64 * 1024 * 1024))
- return NULL;
-#endif
-
memory_region_init_rom_device(
&pfl->mem, OBJECT(dev),
&pflash_cfi01_ops,
diff --git a/hw/block/pflash_cfi02.c b/hw/block/pflash_cfi02.c
index 9b934305fa..f2c6201f81 100644
--- a/hw/block/pflash_cfi02.c
+++ b/hw/block/pflash_cfi02.c
@@ -551,12 +551,6 @@ static void pflash_cfi02_realize(DeviceState *dev, Error
**errp)
}
chip_len = pfl->sector_len * pfl->nb_blocs;
- /* XXX: to be fixed */
-#if 0
- if (total_len != (8 * 1024 * 1024) && total_len != (16 * 1024 * 1024) &&
- total_len != (32 * 1024 * 1024) && total_len != (64 * 1024 * 1024))
- return NULL;
-#endif
memory_region_init_rom_device(&pfl->orig_mem, OBJECT(pfl), pfl->be ?
&pflash_cfi02_ops_be : &pflash_cfi02_ops_le,
--
2.17.2