summaryrefslogtreecommitdiffstats
path: root/hw/omap_gpmc.c
Commit message (Collapse)AuthorAgeFilesLines
* Rename target_phys_addr_t to hwaddrAvi Kivity2012-10-231-8/+8
| | | | | | | | | | | | | | | target_phys_addr_t is unwieldly, violates the C standard (_t suffixes are reserved) and its purpose doesn't match the name (most target_phys_addr_t addresses are not target specific). Replace it with a finger-friendly, standards conformant hwaddr. Outstanding patchsets can be fixed up with the command git rebase -i --exec 'find -name "*.[ch]" | xargs s/target_phys_addr_t/hwaddr/g' origin Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* hw/omap_gpmc: Fix region map/unmap when configuring prefetch enginePeter Maydell2012-01-041-9/+21
| | | | | | | | | | | | When configuring the prefetch engine (and also when resetting from a state where the prefetch engine was enabled) be careful to adhere to the "unmap/change config fields/map" ordering, to avoid trying to delete the wrong MemoryRegions. This fixes an assertion failure in some cases. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reported-by: Alexander Graf <agraf@suse.de> Tested-by: Alexander Graf <agraf@suse.de>
* hw/omap_gpmc.c: Add missing 'break's to fix 8 bit NAND writesPeter Maydell2011-11-091-0/+2
| | | | | | | | | Add missing 'break' statements which would have meant that writing to an 8 bit NAND device was broken. Spotted by Coverity (see bug 887883). Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* hw/omap_gpmc: Modify correct field when writing IRQSTATUS registerPeter Maydell2011-09-231-1/+1
| | | | | | | | Writing to IRQSTATUS should affect irqst, not irqen -- error spotted by Andrzej Zaborowski. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
* hw/omap_gpmc: Add comment about FIFOTHRESHOLDSTATUS bitPeter Maydell2011-09-231-0/+7
| | | | | | | | | Promote the remark about why we handle FIFOTHRESHOLDSTATUS the way we do from the commit message of de8af7fe0 to a comment in the code. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
* omap_gpmc: Implement prefetch enginePeter Maydell2011-08-281-10/+247
| | | | | | | | This commit implements the prefetch engine feature of the GPMC which can be used for NAND devices. This includes both interrupt driven and DMA-filling modes. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* omap: Wire up the DMA request line to the GPMCPeter Maydell2011-08-281-1/+4
| | | | Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* omap_gpmc: Pull prefetch engine data into sub-structPeter Maydell2011-08-281-24/+28
| | | | | | | | Refactor the gpmc state structure so items relating to the prefetch engine are in their own sub-struct and have more useful names. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* omap_gpmc: Accept a zero mask field on omap3630Juha Riihimäki2011-08-281-5/+6
| | | | | | | | | | | | | | 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 <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>
* omap_gpmc: Support NAND devicesPeter Maydell2011-08-281-12/+207
| | | | | | | | Support accesses to NAND devices, both by mapping them into the GPMC address space, and via the NAND_COMMAND, NAND_ADDRESS and NAND_DATA GPMC registers. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* omap_gpmc: Reindent misindented switch statementsPeter Maydell2011-08-281-48/+48
| | | | | | Whitespace-only change fixing indentation. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* omap_gpmc: Calculate revision from OMAP modelJuha Riihimäki2011-08-281-1/+3
| | | | | | | | 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>
* omap_gpmc: Take omap_mpu_state* in omap_gpmc_initJuha Riihimäki2011-08-281-1/+2
| | | | | | | | | | | | Take a pointer to the omap mpu state struct in omap_gpmc_init. Some details of GPMC behaviour depend on the OMAP version we are a part of. 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>
* omap_gpmc: Fix handling of FIFOTHRESHOLDSTATUS bitPeter Maydell2011-08-281-1/+1
| | | | | | | | | | The OMAP3 TRM is inconsistent about whether the GPMC FIFOTHRESHOLDSTATUS bit should be set when FIFOPOINTER > FIFOTHRESHOLD or when it is >= FIFOTHRESHOLD. Apparently the underlying functional spec from which the TRM was created states that the behaviour is ">=", and this also makes more conceptual sense. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* omap_gpmc: Wire up the GPMC IRQ correctlyPeter Maydell2011-08-281-0/+1
| | | | | | | | The omap_gpmc wasn't actually wiring up its IRQ, so anything that provoked an interrupt would be using uninitialised data for its IRQ number. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* omap_gpmc: GPMC_IRQSTATUS is write-one-to-clearPeter Maydell2011-08-281-1/+1
| | | | | | | Fix a bug in the handling of writes to GPMC_IRQSTATUS: it behaves as "write one to clear, writing zero is ignored". Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* omap_gpmc: Refactor omap_gpmc_cs_map and omap_gpmc_cs_unmapPeter Maydell2011-08-281-21/+35
| | | | | | | | | | | | Refactor the omap_gpmc_cs_map/unmap functions: * take the omap_gpmc_s* and a chipselect id rather than the omap_gpmc_cs_file_s*, so they have access to the general gpmc member fields * extract the base and mask from the config registers in the functions rather than at every callsite * check for CSVALID in the functions rather than at every callsite Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* omap_gpmc: Clean up omap_gpmc_attach MemoryRegion conversionPeter Maydell2011-08-281-37/+22
| | | | | | | | | | | | | Now that all callers of omap_gpmc_attach pass in a MemoryRegion*, we can remove the base_update and unmap function pointer arguments, and the opaque pointer that was passed into these callbacks. We can also remove the base and size fields from omap_gpmc_cs_file_s as these are no longer necessary (you don't need the base/size to unmap a MemoryRegion the way you did to undo a mapping made with cpu_register_physical_memory()). Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* hw/omap_gpmc: Don't try to map CS0 twice on resetPeter Maydell2011-08-231-1/+0
| | | | | | | | | | | Remove a spurious second map of the OMAP GPMC CS0 region on reset. This fixes an assertion failure when we try to add the region to its container when it was already added. (The old code did not complain about mismatched map/unmap calls, but the new MemoryRegion implementation does.) Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* omap_gpmc/nseries/tusb6010: convert to memory APIAvi Kivity2011-08-221-24/+36
| | | | | | | Somewhat clumsy since it needs a variable sized region. Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Use glib memory allocation and free functionsAnthony Liguori2011-08-201-1/+1
| | | | | | qemu_malloc/qemu_free no longer exist after this commit. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Add endianness as io mem parameterAlexander Graf2010-12-111-1/+1
| | | | | | | | | | | | | As stated before, devices can be little, big or native endian. The target endianness is not of their concern, so we need to push things down a level. This patch adds a parameter to cpu_register_io_memory that allows a device to choose its endianness. For now, all devices simply choose native endian, because that's the same behavior as before. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* hw/omap2.c : separate gpmc(general purpose memory controller)cmchao2010-06-301-0/+419
Signed-off-by: cmchao <cmchao@gmail.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
OpenPOWER on IntegriCloud