[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 14/17] omap_gpmc: Accept a zero mask field on omap36
From: |
Peter Maydell |
Subject: |
[Qemu-devel] [PATCH 14/17] omap_gpmc: Accept a zero mask field on omap3630 |
Date: |
Thu, 25 Aug 2011 21:05:08 +0100 |
From: Juha Riihimäki <address@hidden>
OMAP3630 adds an extra bit of address masking, so a mask of
0xb1111 is valid. Unfortunately the GPMC_REVISION is the same as
on the OMAP3430 which only has three bits of address masking, so
we have to derive this feature directly from the OMAP revision
rather than from the GPMC revision.
Signed-off-by: Juha Riihimäki <address@hidden>
[Riku Voipio: Fixes and restructuring patchset]
Signed-off-by: Riku Voipio <address@hidden>
[Peter Maydell: More fixes and cleanups for upstream submission]
Signed-off-by: Peter Maydell <address@hidden>
---
hw/omap_gpmc.c | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/hw/omap_gpmc.c b/hw/omap_gpmc.c
index d2de72f..0326d49 100644
--- a/hw/omap_gpmc.c
+++ b/hw/omap_gpmc.c
@@ -28,6 +28,7 @@
struct omap_gpmc_s {
qemu_irq irq;
MemoryRegion iomem;
+ int accept_256;
uint8_t revision;
uint8_t sysconfig;
@@ -198,11 +199,10 @@ static void omap_gpmc_cs_map(struct omap_gpmc_s *s, int
cs)
}
/* TODO: check for overlapping regions and report access errors */
- if ((mask != 0x8 && mask != 0xc && mask != 0xe && mask != 0xf) ||
- (base & 0x0f & ~mask)) {
- fprintf(stderr, "%s: wrong cs address mapping/decoding!\n",
- __FUNCTION__);
- return;
+ if (mask != 0x8 && mask != 0xc && mask != 0xe && mask != 0xf
+ && !(s->accept_256 && !mask)) {
+ fprintf(stderr, "%s: invalid chip-select mask address (0x%x)\n",
+ __func__, mask);
}
base <<= 24;
@@ -570,6 +570,7 @@ struct omap_gpmc_s *omap_gpmc_init(struct omap_mpu_state_s
*mpu,
memory_region_add_subregion(get_system_memory(), base, &s->iomem);
s->irq = irq;
+ s->accept_256 = cpu_is_omap3630(mpu);
s->revision = cpu_class_omap3(mpu) ? 0x50 : 0x20;
omap_gpmc_reset(s);
--
1.7.1
- [Qemu-devel] [PATCH 10/17] omap_gpmc: Calculate revision from OMAP model, (continued)
- [Qemu-devel] [PATCH 10/17] omap_gpmc: Calculate revision from OMAP model, Peter Maydell, 2011/08/25
- [Qemu-devel] [PATCH 17/17] omap_gpmc: Implement prefetch engine, Peter Maydell, 2011/08/25
- [Qemu-devel] [PATCH 15/17] omap_gpmc: Pull prefetch engine data into sub-struct, Peter Maydell, 2011/08/25
- [Qemu-devel] [PATCH 07/17] omap_gpmc: Wire up the GPMC IRQ correctly, Peter Maydell, 2011/08/25
- [Qemu-devel] [PATCH 12/17] omap_gpmc: Support NAND devices, Peter Maydell, 2011/08/25
- [Qemu-devel] [PATCH 05/17] omap_gpmc: Refactor omap_gpmc_cs_map and omap_gpmc_cs_unmap, Peter Maydell, 2011/08/25
- [Qemu-devel] [PATCH 11/17] omap_gpmc: Reindent misindented switch statements, Peter Maydell, 2011/08/25
- [Qemu-devel] [PATCH 06/17] omap_gpmc: GPMC_IRQSTATUS is write-one-to-clear, Peter Maydell, 2011/08/25
- [Qemu-devel] [PATCH 04/17] omap_gpmc: Clean up omap_gpmc_attach MemoryRegion conversion, Peter Maydell, 2011/08/25
- [Qemu-devel] [PATCH 03/17] hw/onenand: Minor spacing fixes, Peter Maydell, 2011/08/25
- [Qemu-devel] [PATCH 14/17] omap_gpmc: Accept a zero mask field on omap3630,
Peter Maydell <=
- [Qemu-devel] [PATCH 09/17] omap_gpmc: Take omap_mpu_state* in omap_gpmc_init, Peter Maydell, 2011/08/25
- [Qemu-devel] [PATCH 02/17] hw/onenand: Qdevify, Peter Maydell, 2011/08/25
- [Qemu-devel] [PATCH 16/17] omap: Wire up the DMA request line to the GPMC, Peter Maydell, 2011/08/25
- [Qemu-devel] [PATCH 08/17] omap_gpmc: Fix handling of FIFOTHRESHOLDSTATUS bit, Peter Maydell, 2011/08/25
- Re: [Qemu-devel] [PATCH 00/17] onenand, omap_gpmc fixes, features, Edgar E. Iglesias, 2011/08/26
- Re: [Qemu-devel] [PATCH 00/17] onenand, omap_gpmc fixes, features, Edgar E. Iglesias, 2011/08/28