aboutsummaryrefslogtreecommitdiffstats
path: root/hw/omap2.c
AgeCommit message (Collapse)AuthorFilesLines
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>
2011-12-06fix spelling in hw sub directoryDong Xu Wang1-3/+3
Correct obvious spelling errors in qemu/hw directory. Signed-off-by: Dong Xu Wang <wdongxu@linux.vnet.ibm.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2011-11-28omap_l4: rename omap_l4_attach_region() to omap_l4_attach()Avi Kivity1-5/+5
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-28omap_dss: convert to memory APIAvi Kivity1-1/+1
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-28omap2: convert to memory API (part II)Avi Kivity1-40/+47
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-28omap2: convert to memory API (part I)Avi Kivity1-48/+55
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_sdrc: convert to memory APIAvi Kivity1-1/+1
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-28omap_l4: add memory API variant of omap_l4_attach()Avi Kivity1-1/+1
Also add omap_l4_region_size(), since memory API functions need the size during initialization. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-28omap: eliminate l4_register_io_memoryAvi Kivity1-6/+6
This is a trivial wrapper around cpu_register_io_memory(), adding no value. Inline it into all callers. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-28omap_uart: convert to memory APIAvi Kivity1-4/+5
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-21hw/omap2: Wire up the IRQ for the 2430's fifth GPIO modulePeter Maydell1-0/+5
The OMAP2430 version of the omap-gpio device has five GPIO modules, not four like the other OMAP2 versions; wire up the fifth module's IRQ line correctly. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
2011-09-23omap_intc: QdevifyPeter Maydell1-38/+54
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-21soc_dma: drop soc_dma_port_add_mem_ram()Avi Kivity1-2/+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-08-28omap: Wire up the DMA request line to the GPMCPeter Maydell1-1/+2
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2011-08-28omap_gpmc: Take omap_mpu_state* in omap_gpmc_initJuha Riihimäki1-1/+1
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>
2011-08-22char: rename qemu_chr_open() -> qemu_chr_new()Anthony Liguori1-1/+1
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-08-22char: rename qemu_chr_write() -> qemu_chr_fe_write()Anthony Liguori1-3/+3
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-08-20Use glib memory allocation and free functionsAnthony Liguori1-5/+5
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-9/+25
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>
2010-12-11Add endianness as io mem parameterAlexander Graf1-2/+2
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-10hw/omap: Fix default setup for OMAP UART devicesStefan Weil1-1/+5
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-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-3/+3
Signed-off-by: cmchao <cmchao@gmail.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-06-30hw/omwp2.c : separate l4 interconnect modulecmchao1-263/+6
Signed-off-by: cmchao <cmchao@gmail.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-06-30hw/omap2.c : separate tap module(Test-Chip-level)cmchao1-90/+0
Signed-off-by: cmchao <cmchao@gmail.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-06-30hw/omap2.c : separate spi modulecmchao1-323/+0
Signed-off-by: cmchao <cmchao@gmail.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-06-30hw/omap2.c : separate sdrc (sdram controller)cmchao1-144/+0
Signed-off-by: cmchao <cmchao@gmail.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-06-30hw/omap2.c : separate gpmc(general purpose memory controller)cmchao1-396/+0
Signed-off-by: cmchao <cmchao@gmail.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-06-30hw/omap2.c : separate synctimer modulecmchao1-70/+2
Signed-off-by: cmchao <cmchao@gmail.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-06-30hw/omap2.c : separate gptimer modulecmchao1-462/+0
Signed-off-by: cmchao <cmchao@gmail.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-06-30hw/omap2.c : separate gpio modulecmchao1-523/+0
Signed-off-by: cmchao <cmchao@gmail.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-06-27Remove useless device dependency of HAS_AUDIOBlue Swirl1-2/+0
System architecture dictates whether HAS_AUDIO is defined. It's then useless to check for HAS_AUDIO in files which are only used on those architectures which always have audio. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-06-04blockdev: Collect block device code in new blockdev.cMarkus Armbruster1-0/+2
Anything that moves hundreds of lines out of vl.c can't be all bad. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2010-04-25arm: remove dead assignments, spotted by clang analyzerBlue Swirl1-1/+1
Value stored is never read. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-10-01Revert "Get rid of _t suffix"Anthony Liguori1-55/+55
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-55/+55
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 warning about invalid access past the end of 'mode'Blue Swirl1-1/+1
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-09-21Fix Sparse warnings about using plain integer as NULL pointerBlue Swirl1-8/+8
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-09-11Unexport ticks_per_sec variable. Create get_ticks_per_sec() functionJuan Quintela1-2/+2
Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-25Make CPURead/WriteFunc structure 'const'Blue Swirl1-40/+40
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-07-27kill drives_tableGerd Hoffmann1-4/+4
First step cleaning up the drives handling. This one does nothing but removing drives_table[], still it became seriously big. drive_get_index() is gone and is replaced by drives_get() which hands out DriveInfo pointers instead of a table index. This needs adaption in *tons* of places all over. The drives are now maintained as linked list. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-07-16Update to a hopefully more future proof FSF addressBlue Swirl1-2/+1
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-06-29Revert "Introduce reset notifier order"Jan Kiszka1-1/+1
This reverts commit 8217606e6edb49591b4a6fd5a0d1229cebe470a9 (and updates later added users of qemu_register_reset), we solved the problem it originally addressed less invasively. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-06-16Remove io_index argument from cpu_register_io_memory()Avi Kivity1-16/+16
The parameter is always zero except when registering the three internal io regions (ROM, unassigned, notdirty). Remove the parameter to reduce the API's power, thus facilitating future change. Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-05-22Introduce reset notifier orderJan Kiszka1-1/+1
Add the parameter 'order' to qemu_register_reset and sort callbacks on registration. On system reset, callbacks with lower order will be invoked before those with higher order. Update all existing users to the standard order 0. Note: At least for x86, the existing users seem to assume that handlers are called in their registration order. Therefore, the patch preserves this property. If someone feels bored, (s)he could try to identify this dependency and express it properly on callback registration. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-05-14Remove any pretense that there can be more than one AudioStatemalc1-1/+1
2009-05-12Push AUD_init down to devicesPaul Brook1-1/+0
Now we can safely call AUD_init multiple times we can push it down to individual audio devices, rather than having to pass it from the board init. Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-10Follow coding conventionsPaul Brook1-1/+1
Remove explicit struct qualifiers and rename structure types. Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-08Replace cpu_abort with hw_errorPaul Brook1-8/+6
Signed-off-by: Paul Brook <paul@codesourcery.com>