aboutsummaryrefslogtreecommitdiffstats
path: root/hw/pxa2xx.c
AgeCommit message (Collapse)AuthorFilesLines
2011-04-22vmstate: port pxa2xx_pmJuan Quintela1-21/+12
Signed-off-by: Juan Quintela <quintela@redhat.com>
2011-04-22vmstate: port pxa2xx_mmJuan Quintela1-21/+12
Signed-off-by: Juan Quintela <quintela@redhat.com>
2011-04-22vmstate: port pxa2xx_cmJuan Quintela1-25/+14
Signed-off-by: Juan Quintela <quintela@redhat.com>
2011-04-22vmstate: port pxa2xx_i2sJuan Quintela1-35/+18
Signed-off-by: Juan Quintela <quintela@redhat.com>
2011-03-21change all other clock references to use nanosecond resolution accessorsPaolo Bonzini1-1/+1
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-14/+14
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>
2011-03-03pxa2xx: port pxa2xx_rtc to using qdev/vmstateAndrzej Zaborowski1-73/+100
Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
2011-03-03pxa2xx_dma: port to qdev/vmstateAndrzej Zaborowski1-15/+30
Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
2011-03-03pxa2xx_timer: switch to using qdev/vmstateDmitry Eremin-Solenikov1-2/+13
Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
2011-02-25pxa2xx_pic: update to use qdevDmitry Eremin-Solenikov1-31/+45
Use qdev/sysbus framework to handle pxa2xx-pic. Instead of exposing IRQs via array, reference them via qdev_get_gpio_in(). Patch has been modified by the committer. Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
2011-02-20Fix obvious mistake in pxa2xx i2s driverVasily Khoruzhick1-1/+1
RST bit is (1 << 4) bit, not (1 << 3), fix condition that enables i2s if ENB is set and RST is not set. Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2011-02-11pxa2xx: convert i2c master to use qdev/vmsdDmitry Eremin-Solenikov1-11/+42
Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
2011-01-29pxa2xx_gpio: switch to using qdevDmitry Eremin-Solenikov1-2/+2
As noted by Markus Armbruster pxa2xx_gpio vmstate version bumped because of a change in the or .ilevel / .olevel arrays are saved, for convenience. Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
2011-01-20pxa2xx: fix vmstate_pxa2xx_i2cDmitry Eremin-Solenikov1-1/+1
vmstate_pxa2xx_i2c incorrectly recursed to itself instead of going to store slave device. Fix that stop stop qemu from segfaulting during savevm for pxa2xx-based devices. Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-12-11Add endianness as io mem parameterAlexander Graf1-12/+13
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 gcc warning flag -Wempty-bodyBlue Swirl1-2/+3
If the compiler supports the warning flag -Wempty-body, use it. Adjust the code to avoid the warnings. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-09-18pxa2xx: fix SSSR TFN logicBlue Swirl1-4/+4
Fix SSSR TFN logic: TX FIFO is never filled, so it is always in underrun condition if SSP is enabled. This also avoids a gcc warning with -Wtype-limits. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-09-18pxa2xx: remove useless checksBlue Swirl1-1/+1
Remove checks which were made useless by r5849, 8da3ff180974732fc4272cb4433fef85c1822961. This also avoids a warning with GCC flag -Wtype-limits. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
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-4/+8
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-07-06savevm: Add DeviceState paramAlex Williamson1-12/+15
When available, we'd like to be able to access the DeviceState when registering a savevm. For buses with a get_dev_path() function, this will allow us to create more unique savevm id strings. Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-04-05OHCI qdev conversionPaul Brook1-2/+4
Convert remaining OHCI devices to QDEV interface. Signed-off-by: Paul Brook <paul@codesourcery.com>
2010-04-04Revert "Compile usb-ohci only once"Paul Brook1-11/+2
This reverts commit f1698408f1dcb7548a21828a0b1e2b530fae3af3. PCI is always little-endian. Having a user-visible "be" property is just plain wrong.
2010-03-23Fix recent pxa270 serial breakageLars Munch1-1/+1
This fixes a copy/paste bug introduced in commit 2d48377a8531de63ec1d0c4b9b1959dc4b78356c that pushed TARGET_WORDS_BIGENDIAN dependency to board level. Signed-off-by: Lars Munch <lars@segv.dk> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-03-21Compile usb-ohci only onceBlue Swirl1-2/+11
Push TARGET_WORDS_BIGENDIAN dependency to board level. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-03-21Compile serial only onceBlue Swirl1-4/+17
Push TARGET_WORDS_BIGENDIAN dependency to board level. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-10-05vmstate: port pxa2xx_i2c deviceJuan Quintela1-28/+26
Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-01Revert "Get rid of _t suffix"Anthony Liguori1-22/+22
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-22/+22
Some not so obvious bits, slirp and Xen were left alone for the time being. Signed-off-by: malc <av1474@comtv.ru>
2009-08-27qdev: add return value to init() callbacks.Gerd Hoffmann1-2/+4
Sorry folks, but it has to be. One more of these invasive qdev patches. We have a serious design bug in the qdev interface: device init callbacks can't signal failure because the init() callback has no return value. This patch fixes it. We have already one case in-tree where this is needed: Try -device virtio-blk-pci (without drive= specified) and watch qemu segfault. This patch fixes it. With usb+scsi being converted to qdev we'll get more devices where the init callback can fail for various reasons. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-25Make CPURead/WriteFunc structure 'const'Blue Swirl1-16/+16
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-07-27kill drives_tableGerd Hoffmann1-8/+8
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-06-16Remove io_index argument from cpu_register_io_memory()Avi Kivity1-12/+12
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-06-11qdev: move name+size into DeviceInfo (v2)Gerd Hoffmann1-2/+3
Rationale: move device information from code to data structures. v2: Adapt the drivers missed in the first version. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2009-05-23Add common BusStatePaul Brook1-6/+5
Implement and use a common device bus state. The main side-effect is that creating a bus and attaching it to a parent device are no longer separate operations. For legacy code we allow a NULL parent, but that should go away eventually. Also tweak creation code to veriry theat a device in on the right bus. Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-14PXA SSI qdev conversionPaul Brook1-60/+39
Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-14PXA2xx I2C slave qdev conversionPaul Brook1-13/+42
Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-10Follow coding conventionsPaul Brook1-95/+95
Remove explicit struct qualifiers and rename structure types. Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-01-16graphical_console_init change (Stefano Stabellini)aliguori1-8/+4
Patch 5/7 This patch changes the graphical_console_init function to return an allocated DisplayState instead of a QEMUConsole. This patch contains just the graphical_console_init change and few other modifications mainly in console.c and vl.c. It was necessary to move the display frontends (e.g. sdl and vnc) initialization after machine->init in vl.c. This patch does *not* include any required changes to any device, these changes come with the following patches. Patch 6/7 This patch changes the QEMUMachine init functions not to take a DisplayState as an argument because is not needed any more; In few places the graphic hardware initialization function was called only if DisplayState was not NULL, now they are always called. Apart from these cases, the rest are all mechanical substitutions. Patch 7/7 This patch updates the graphic device code to use the new graphical_console_init function. As for the previous patch, in few places graphical_console_init was called only if DisplayState was not NULL, now it is always called. Apart from these cases, the rest are all mechanical substitutions. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6344 c046a42c-6fe2-441c-8c8c-71466251a162
2008-12-07PXA: Account for offset from page start in a subpage mapping.balrog1-1/+1
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5917 c046a42c-6fe2-441c-8c8c-71466251a162
2008-12-07Don't wrap I2C registers addresses on PXA270.balrog1-4/+7
This way the registers will only be visible at the given offset instead of every 0x100 bytes. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5899 c046a42c-6fe2-441c-8c8c-71466251a162
2008-12-04Fix RTC initial date computationaurel321-1/+1
qemu_get_clock() returns a structure containing the time the user wants to be set (either UTC time, a local time, or a given date). Use mktimegm() instead of mktime() to convert it into POSIX time without taking the host timezone into account. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5878 c046a42c-6fe2-441c-8c8c-71466251a162
2008-12-01Change MMIO callbacks to use offsets, not absolute addresses.pbrook1-29/+11
Signed-off-by: Paul Brook <paul@codesourcery.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5849 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-02Resurrect the safe part of r5274blueswir11-6/+6
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5401 c046a42c-6fe2-441c-8c8c-71466251a162
2008-09-25Revert r5274 which breaks savevm/loadvmblueswir11-6/+6
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5321 c046a42c-6fe2-441c-8c8c-71466251a162
2008-09-20Add signed versions of save/load functionsblueswir11-6/+6
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5274 c046a42c-6fe2-441c-8c8c-71466251a162
2008-07-01Fix i2c save/restore.pbrook1-3/+5
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4820 c046a42c-6fe2-441c-8c8c-71466251a162
2008-06-30Move CPU save/load registration to common code.pbrook1-6/+0
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4808 c046a42c-6fe2-441c-8c8c-71466251a162
2008-05-048250: Customized base baudrateaurel321-2/+4
(Jan Kiszka) git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4336 c046a42c-6fe2-441c-8c8c-71466251a162
2008-04-22Hush pointer target signedness warnings from gcc 4.balrog1-6/+6
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4231 c046a42c-6fe2-441c-8c8c-71466251a162