summaryrefslogtreecommitdiff
path: root/hw/omap1.c
AgeCommit message (Collapse)AuthorFilesLines
2013-01-11Replace remaining gmtime, localtime by gmtime_r, localtime_rStefan Weil1-1/+1
This allows removing of MinGW specific code and improves reentrancy for POSIX hosts. [Removed unused ret variable in qemu_get_timedate() to fix warning: vl.c: In function ‘qemu_get_timedate’: vl.c:451:16: error: variable ‘ret’ set but not used [-Werror=unused-but-set-variable] -- Stefan Hajnoczi] Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2012-12-19softmmu: move include files to include/sysemu/Paolo Bonzini1-2/+2
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-12-19misc: move include files to include/qemu/Paolo Bonzini1-1/+1
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-10-23Rename target_phys_addr_t to hwaddrAvi Kivity1-74/+74
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>
2012-06-11arm_pic: Pass ARMCPU to arm_pic_init_cpu()Andreas Färber1-1/+1
Pass it through to arm_pic_cpu_handler(). Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Peter Maydell <peter.maydell@linaro.org> Acked-by: Igor Mitsyanko <i.mitsyanko@samsung.com> (for exynos)
2012-06-04omap: Use cpu_arm_init() to store ARMCPU in omap_mpu_state_sAndreas Färber1-9/+11
Fix tab indentations of comments, add braces, use cpu_reset(). Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Peter Maydell <peter.maydell@linaro.org>
2012-03-30arm: switch real-time clocks to rtc_clockPaolo Bonzini1-2/+2
This lets the user specify the desired semantics. By default, the RTC will follow adjustments from the host's NTP client. "-rtc clock=vm" will improve determinism with both icount and qtest. Finally, the previous behavior is available with "-rtc clock=rt". Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2012-03-30omap: switch omap_lpg to vm_clockPaolo Bonzini1-3/+3
The output of the pulse generator needs to be deterministic when running in -icount mode, and to remain constant whenever the VM is stopped. So the right clock to use is vm_clock. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2012-03-15hw/omap_i2c: Convert to qdevJuha Riihimäki1-4/+9
Convert the omap_i2c device to qdev. 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>
2012-03-14Rename cpu_reset() to cpu_state_reset()Andreas Färber1-1/+1
Frees the identifier cpu_reset for QOM CPUs (manual rename). Don't hide the parameter type behind explicit casts, use static functions with strongly typed argument to indirect. Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
2012-01-04Merge remote-tracking branch 'pmaydell/arm-devs.for-upstream' into stagingAnthony Liguori1-62/+89
* pmaydell/arm-devs.for-upstream: add L2x0/PL310 cache controller device arm: add dummy gic security registers arm: Set frequencies for arm_timer arm: add missing scu registers hw/omap_gpmc: Fix region map/unmap when configuring prefetch engine hw/omap1.c: Drop unused includes hw/omap1.c: Separate dpll_ctl from omap_mpu_state hw/omap1.c: Separate PWT from omap_mpu_state hw/omap1.c: Separate PWL from omap_mpu_state hw/omap1.c: omap_mpuio_init() need not be public hw/pl110.c: Add post-load hook to invalidate display hw/pl181.c: Add save/load support
2012-01-04hw/omap1.c: Drop unused includesPeter Maydell1-4/+0
Drop includes of qemu-timer.h, qemu-char.h and pc.h as they are no longer needed. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2012-01-04hw/omap1.c: Separate dpll_ctl from omap_mpu_stateJuha Riihimäki1-10/+18
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>
2012-01-04hw/omap1.c: Separate PWT from omap_mpu_stateJuha Riihimäki1-23/+34
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>
2012-01-04vmstate, memory: decouple vmstate from memory APIAvi Kivity1-2/+4
Currently creating a memory region automatically registers it for live migration. This differs from other state (which is enumerated in a VMStateDescription structure) and ties the live migration code into the memory core. Decouple the two by introducing a separate API, vmstate_register_ram(), for registering a RAM block for migration. Currently the same implementation is reused, but later it can be moved into a separate list, and registrations can be moved to VMStateDescription blocks. Signed-off-by: Avi Kivity <avi@redhat.com>
2012-01-04hw/omap1.c: Separate PWL from omap_mpu_stateJuha Riihimäki1-24/+36
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>
2012-01-04hw/omap1.c: omap_mpuio_init() need not be publicPeter Maydell1-1/+1
omap_mpuio_init() is only used and defined in omap1.c, so make it static. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2011-11-28omap_i2c: convert to memory APIBenoît Canet1-1/+1
Signed-off-by: Benoît Canet <benoit.canet@gmail.com> Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-28omap_lcdc: convert to memory APIBenoît Canet1-1/+1
Signed-off-by: Benoît Canet <benoit.canet@gmail.com> Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-28omap_dma: convert to memory APIAvi Kivity1-1/+1
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-28omap_mmc: convert to memory APIAvi Kivity1-1/+1
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-09-23hw/omap1: Wire up GPIO clockPeter Maydell1-0/+1
Wire up the OMAP1 GPIO clock -- this fixes a hw_error() on startup with OMAP1 based machines (sx1, cheetah). Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2011-09-23omap_intc: QdevifyPeter Maydell1-55/+86
Convert the omap_intc devices to qdev. This includes adding a 'revision' property which will be needed for omap3. The bulk of this patch is the replacement of "s->irq[x][y]" with "qdev_get_gpio_in(s->ih[x], y)" now that the interrupt controller exposes its input lines as qdev gpio inputs. The devices are named "omap-intc" and "omap2-intc", following the filename and the OMAP2/3 hardware names, although some internal functions are still named "omap_inth_*". Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2011-09-21omap1: convert to memory API (part VI)Avi Kivity1-10/+7
Easy RAM stuff. Acked-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Avi Kivity <avi@redhat.com>
2011-09-21soc_dma: drop soc_dma_port_add_mem_ram()Avi Kivity1-4/+4
It's a trivial wrapper for soc_dma_port_add_mem(), which makes the memory API conversion more difficult because it takes a ram addr_t. Drop. Acked-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Avi Kivity <avi@redhat.com>
2011-09-21omap_lcdc: remove imif, emiff from structureAvi Kivity1-2/+1
Not used. Acked-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Avi Kivity <avi@redhat.com>
2011-09-21omap1: convert to memory API (part V)Avi Kivity1-6/+8
Tricky aliases. Acked-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Avi Kivity <avi@redhat.com>
2011-09-21omap1: convert to memory API (part IV)Avi Kivity1-34/+47
Acked-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Avi Kivity <avi@redhat.com>
2011-09-21omap1: convert to memory API (part III)Avi Kivity1-92/+117
Acked-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Avi Kivity <avi@redhat.com>
2011-09-21omap1: convert to memory API (part II)Avi Kivity1-90/+105
Acked-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Avi Kivity <avi@redhat.com>
2011-09-21omap1: convert to memory API (part I)Avi Kivity1-151/+187
Acked-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Avi Kivity <avi@redhat.com>
2011-08-20Use glib memory allocation and free functionsAnthony Liguori1-10/+10
qemu_malloc/qemu_free no longer exist after this commit. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-07-30hw/omap_gpio.c: Convert to qdevJuha Riihimäki1-3/+7
Convert the OMAP GPIO module to qdev. 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>
2011-03-21change all other clock references to use nanosecond resolution accessorsPaolo Bonzini1-10/+10
This was done with: sed -i 's/qemu_get_clock\>/qemu_get_clock_ns/' \ $(git grep -l 'qemu_get_clock\>' ) sed -i 's/qemu_new_timer\>/qemu_new_timer_ns/' \ $(git grep -l 'qemu_new_timer\>' ) after checking that get_clock and new_timer never occur twice on the same line. There were no missed occurrences; however, even if there had been, they would have been caught by the compiler. There was exactly one false positive in qemu_run_timers: - current_time = qemu_get_clock (clock); + current_time = qemu_get_clock_ns (clock); which is of course not in this patch. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2011-03-21change all rt_clock references to use millisecond resolution accessorsPaolo Bonzini1-5/+5
This was done with: sed -i '/get_clock\>.*rt_clock/s/get_clock\>/get_clock_ms/' \ $(git grep -l 'get_clock\>.*rt_clock' ) sed -i '/new_timer\>.*rt_clock/s/new_timer\>/new_timer_ms/' \ $(git grep -l 'new_timer\>.*rt_clock' ) after checking that get_clock and new_timer never occur twice on the same line. There were no missed occurrences; however, even if there had been, they would have been caught by the compiler. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2010-12-11Add endianness as io mem parameterAlexander Graf1-20/+22
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>
2010-09-18Use range_covers_byteBlue Swirl1-6/+8
Use range_covers_byte() instead of comparisons. This avoids some warnings with GCC flag -Wtype-limits. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-09-10hw/omap: Fix default setup for OMAP UART devicesStefan Weil1-0/+3
Character devices created by qemu_chr_open don't allow duplicate device names, so naming all UART devices "null" no longer works. Running "qemu-system-arm -M n800" (and some other machines) results in this error message: qemu-system-arm: Duplicate ID 'null' for chardev Can't create serial device, empty char device This is fixed by setting a default label "uart1", "uart2" or "uart3". Cc: Andrzej Zaborowski <andrew.zaborowski@intel.com> Signed-off-by: Stefan Weil <weil@mail.berlios.de>
2010-08-24Rearrange block headersBlue Swirl1-0/+1
Changing block.h or blockdev.h resulted in recompiling most objects. Move DriveInfo typedef and BlockInterfaceType enum definitions to qemu-common.h and rearrange blockdev.h use to decrease churn. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-07-06qemu_ram_alloc: Add DeviceState and name parametersAlex Williamson1-2/+4
These will be used to generate unique id strings for ramblocks. The name field is required, the device pointer is optional as most callers don't have a device. When there's no device or the device isn't a child of a bus implementing BusInfo.get_dev_path, the name should be unique for the platform. Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-06-30hw/omap : make local function static and remove declaration from headercmchao1-6/+6
Signed-off-by: cmchao <cmchao@gmail.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-06-30hw/omap1.c : separate uart modulecmchao1-170/+0
Signed-off-by: cmchao <cmchao@gmail.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-06-30hw/omap1.c : separate interrupt controller modulecmchao1-574/+2
Signed-off-by: cmchao <cmchao@gmail.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-06-30hw/omap1.c : separate gpio modulecmchao1-181/+0
Signed-off-by: cmchao <cmchao@gmail.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-04-25arm: remove dead assignments, spotted by clang analyzerBlue Swirl1-1/+0
Value stored is never read. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-03-21Compile serial only onceBlue Swirl1-4/+18
Push TARGET_WORDS_BIGENDIAN dependency to board level. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-11-22BCD cleanupPaul Brook1-40/+30
Combine multiple BCD implementations. Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-10-01Revert "Get rid of _t suffix"Anthony Liguori1-87/+87
In the very least, a change like this requires discussion on the list. The naming convention is goofy and it causes a massive merge problem. Something like this _must_ be presented on the list first so people can provide input and cope with it. This reverts commit 99a0949b720a0936da2052cb9a46db04ffc6db29. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-01Get rid of _t suffixmalc1-87/+87
Some not so obvious bits, slirp and Xen were left alone for the time being. Signed-off-by: malc <av1474@comtv.ru>
2009-09-21Fix Sparse warnings about using plain integer as NULL pointerBlue Swirl1-4/+4
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>