path: root/hw/tosa.c
AgeCommit message (Collapse)AuthorFilesLines
2012-02-15qom: Unify type registrationAndreas Färber1-2/+2
Replace device_init() with generalized type_init(). While at it, unify naming convention: type_init([$prefix_]register_types) Also, type_init() is a function, so add preceding blank line where necessary and don't put a semicolon after the closing brace. Signed-off-by: Andreas Färber <afaerber@suse.de> Cc: Anthony Liguori <anthony@codemonkey.ws> Cc: malc <av1474@comtv.ru> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-03qdev: register all types natively through QEMU Object ModelAnthony Liguori1-11/+13
This was done in a mostly automated fashion. I did it in three steps and then rebased it into a single step which avoids repeatedly touching every file in the tree. The first step was a sed-based addition of the parent type to the subclass registration functions. The second step was another sed-based removal of subclass registration functions while also adding virtual functions from the base class into a class_init function as appropriate. Finally, a python script was used to convert the DeviceInfo structures and qdev_register_subclass functions to TypeInfo structures, class_init functions, and type_register_static calls. We are almost fully converted to QOM after this commit. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-01-27i2c: smbus: convert to QEMU Object ModelAnthony Liguori1-7/+14
This converts two types because smbus is implemented as a subclass of i2c. It's extremely difficult to convert these two independently. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-01-27i2c: rename i2c_slave -> I2CSlaveAnthony Liguori1-5/+5
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-01-27ssi: convert to QEMU Object ModelAnthony Liguori1-6/+13
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-01-13prepare for future GPLv2+ relicensingPaolo Bonzini1-0/+3
All files under GPLv2 will get GPLv2+ changes starting tomorrow. event_notifier.c and exec-obsolete.h were only ever touched by Red Hat employees and can be relicensed now. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-01-04vmstate, memory: decouple vmstate from memory APIAvi Kivity1-1/+2
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-11-24tosa: convert to memory APIAvi Kivity1-2/+4
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-17tc63963xb: convert to memory APIAvi Kivity1-1/+1
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-02pxa: Pass in address_space to pxa{255, 270}_initRichard Henderson1-1/+3
Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Avi Kivity <avi@redhat.com>
2011-09-06spitz tosa: Simplify "drive is suitable for microdrive" testMarkus Armbruster1-7/+3
We try the drive defined with -drive if=ide,index=0 (or equivalent sugar). We use it only if (dinfo && bdrv_is_inserted(dinfo->bdrv) && !bdrv_is_removable(dinfo->bdrv)). This is a convoluted way to test for "drive media can't be removed". The only way to create such a drive with -drive if=ide is media=cdrom. And that sets dinfo->media_cd, so just test that. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2011-04-15Remove unused sysemu.h include directivesBlue Swirl1-1/+0
Remove unused sysemu.h include directives to speed up build with the following patches. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-02-11tosa: we aren't connected to VBus, pass this info to Linux kernelDmitry Eremin-Solenikov1-0/+4
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-6/+6
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-29SharpSL scoop device - convert to qdevDmitry Eremin-Solenikov1-11/+12
Convert SharpSL scoop device to qdev, remove lots of supporting code, as lot of init and gpio related things can now be done automagically. Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.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-1/+1
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-05-31arm: fix arm kernel boot for non zero start addrLars Munch1-3/+0
Booting an arm kernel has been broken a while when booting from non zero start address. This is due to the order of events: board init loads the kernel and sets register 15 to the start address and then qemu_system_reset reset the cpu making register 15 zero again. This patch fixes the usage of the register 15 start address trick in combination with arm_load_kernel. Signed-off-by: Lars Munch <lars@segv.dk> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-10-01Revert "Get rid of _t suffix"Anthony Liguori1-1/+1
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-1/+1
Some not so obvious bits, slirp and Xen were left alone for the time being. Signed-off-by: malc <av1474@comtv.ru>
2009-09-04ide: pass down DriveInfo instead of BlockDriverStateGerd Hoffmann1-1/+1
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
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-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-06-11qdev: move name+size into DeviceInfo (v2)Gerd Hoffmann1-2/+6
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-21Convert machine registration to use module init functionsAnthony Liguori1-1/+8
This cleans up quite a lot of #ifdefs, extern variables, and other ugliness. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-05-14PXA SSI qdev conversionPaul Brook1-5/+12
Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-14TOSC DAC i2c qdev voncersionPaul Brook1-7/+22
Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-13Remove vga_ram_sizePaul Brook1-1/+1
The vga_ram_size argument to machine init functions always has the same value, and is ignored by many machines (including SPARC32 which has an obsolete ifdef for VGA_RAM_SIZE). Remove it and push VGA_RAM_SIZE into vga_int.h. Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-12Follow coding conventions.Paul Brook1-6/+6
More structure renaming. Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-10Follow coding conventionsPaul Brook1-10/+10
Remove explicit struct qualifiers and rename structure types. Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-04-11Remove redundant ram_require machine properly.pbrook1-1/+0
Signed-off-by: Paul Brook <paul@codesourcery.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7090 c046a42c-6fe2-441c-8c8c-71466251a162
2009-04-11Remove more redundant ram size checks.pbrook1-6/+0
Signed-off-by: Paul Brook <paul@codesourcery.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7089 c046a42c-6fe2-441c-8c8c-71466251a162
2009-04-09More phys_ram_base removal.pbrook1-1/+1
Signed-off-by: Paul Brook <paul@codesourcery.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7055 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-07Fix tosa_dac_recv warningaurel321-1/+1
This patch fixes: /scratch/froydnj/qemu.git/hw/tosa.c:176: warning: no previous prototype for 'tosa_dac_recv' by making the function static. Signed-off-by: Nathan Froyd <froydnj@codesourcery.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6551 c046a42c-6fe2-441c-8c8c-71466251a162
2009-01-16graphical_console_init change (Stefano Stabellini)aliguori1-4/+3
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-11-04tc6393xb: non-accelerated FB support (Dmitry Baryshkov).balrog1-5/+12
Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5617 c046a42c-6fe2-441c-8c8c-71466251a162
2008-11-04Tosa: dummy lcd support (Dmitry Baryshkov).balrog1-0/+84
Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5616 c046a42c-6fe2-441c-8c8c-71466251a162
2008-11-04Tosa: disable pxafb as it's not used on tosa (Dmitry Baryshkov).balrog1-1/+1
Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5614 c046a42c-6fe2-441c-8c8c-71466251a162
2008-11-04Tosa: provide correct IRQ to tc6393xb init (Dmitry Baryshkov).balrog1-1/+2
Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5613 c046a42c-6fe2-441c-8c8c-71466251a162
2008-11-04Tosa: emulate LEDs (Dmitry Baryshkov).balrog1-1/+34
Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5612 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-28Set default max_cpus to one.balrog1-1/+0
Clean-up machine definitions. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5566 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-07machine struct - specify max_cpus at the per machine level (Jes Sorensen)aliguori1-0/+1
Introduce a max_cpus per-machine variable, allowing individual boards to limit it's number of CPUs. Check requested number of CPUs in setup code and exit if it exceeds the supported number for the machine. This also renders the static MAX_CPUS check obsolete, so remove this from vl.c. Signed-off-by: Jes Sorensen <jes@sgi.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5443 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-07machine struct - use C99 initializers (Jes Sorensen)aliguori1-4/+4
Modify all the machine struct declarations to use C99 initializers. This patch has no functional changes. Signed-off-by: Jes Sorensen <jes@sgi.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5442 c046a42c-6fe2-441c-8c8c-71466251a162
2008-06-09TC6393XB system features (Dmitry Baryshkov).balrog1-36/+2
Add basic support for TC6393XB system features. No support for GPIO input though. Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4702 c046a42c-6fe2-441c-8c8c-71466251a162
2008-06-02Provide basic emulation for Sharp SL-6000 PDA (Tosa), Dmitry Baryshkov.balrog1-0/+160
This adds basic support for emulating Sharp Zaurus SL-6000 PDA (tosa). Currently it provides only basic support: no kbd/lcd, sound, ts, etc. But it's able at least to boot Linux from CF. Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4643 c046a42c-6fe2-441c-8c8c-71466251a162