aboutsummaryrefslogtreecommitdiff
path: root/hw/tosa.c
AgeCommit message (Collapse)Author
2013-01-15Make default boot order machine specificAvik Sil
This patch makes default boot order machine specific instead of set globally. The default boot order can be set per machine in QEMUMachine boot_order. This also allows a machine to receive a NULL boot order when -boot isn't used and take an appropriate action accordingly. This helps machine boots from the devices as set in guest's non-volatile memory location in case no boot order is provided by the user. Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Avik Sil <aviksil@linux.vnet.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-01-10Make all static TypeInfos constAndreas Färber
Since 39bffca2030950ef6efe57c2fac8327a45ae1015 (qdev: register all types natively through QEMU Object Model), TypeInfo as used in the common, non-iterative pattern is no longer amended with information and should therefore be const. Fix the documented QOM examples: sed -i 's/static TypeInfo/static const TypeInfo/g' include/qom/object.h Since frequently the wrong examples are being copied by contributors of new devices, fix all types in the tree: sed -i 's/^static TypeInfo/static const TypeInfo/g' */*.c sed -i 's/^static TypeInfo/static const TypeInfo/g' */*/*.c This also avoids to piggy-back these changes onto real functional changes or other refactorings. Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-12-19softmmu: move include files to include/sysemu/Paolo Bonzini
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-12-19exec: move include files to include/exec/Paolo Bonzini
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-12-19block: move include files to include/block/Paolo Bonzini
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-10-20create struct for machine initialization argumentsEduardo Habkost
This should help us to: - More easily add or remove machine initialization arguments without having to change every single machine init function; - More easily make mechanical changes involving the machine init functions in the future; - Let machine initialization forward the init arguments to other functions more easily. This change was half-mechanical process: first the struct was added with the local ram_size, boot_device, kernel_*, initrd_*, and cpu_model local variable initialization to all functions. Then the compiler helped me locate the local variables that are unused, so they could be removed. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-06-11arm_boot: Pass ARMCPU to arm_load_kernel()Andreas Färber
In particular this simplifies the &s->mpu->cpu->env expression again. first_cpu and ->next_cpu are expected to be QOM'ified later. Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Igor Mitsyanko <i.mitsyanko@samsung.com> (for exynos) Acked-by: Peter Maydell <peter.maydell@linaro.org>
2012-06-11tosa: Rename PXA2xxState variableAndreas Färber
Avoid cpu->cpu by using "mpu" as variable name. Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Peter Maydell <peter.maydell@linaro.org>
2012-06-04pxa2xx: Use cpu_arm_init() and store ARMCPUAndreas Färber
Also use cpu_reset() in place of cpu_state_reset(). Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Peter Maydell <peter.maydell@linaro.org>
2012-02-15qom: Unify type registrationAndreas Färber
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 Liguori
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 Liguori
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 Liguori
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-01-27ssi: convert to QEMU Object ModelAnthony Liguori
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-01-13prepare for future GPLv2+ relicensingPaolo Bonzini
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 Kivity
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 Kivity
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-17tc63963xb: convert to memory APIAvi Kivity
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-02pxa: Pass in address_space to pxa{255, 270}_initRichard Henderson
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 Armbruster
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 Swirl
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-Solenikov
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-Solenikov
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-Solenikov
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 Swirl
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 Williamson
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 Munch
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 Liguori
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 suffixmalc
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 Hoffmann
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 Hoffmann
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 Hoffmann
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 Hoffmann
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 Liguori
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 Brook
Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-14TOSC DAC i2c qdev voncersionPaul Brook
Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-13Remove vga_ram_sizePaul Brook
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 Brook
More structure renaming. Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-10Follow coding conventionsPaul Brook
Remove explicit struct qualifiers and rename structure types. Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-04-11Remove redundant ram_require machine properly.pbrook
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.pbrook
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.pbrook
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 warningaurel32
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)aliguori
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).balrog
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).balrog
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).balrog
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).balrog
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).balrog
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.balrog
Clean-up machine definitions. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5566 c046a42c-6fe2-441c-8c8c-71466251a162