summaryrefslogtreecommitdiffstats
path: root/hw/es1370.c
Commit message (Collapse)AuthorAgeFilesLines
* Make all static TypeInfos constAndreas Färber2013-01-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | 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>
* softmmu: move include files to include/sysemu/Paolo Bonzini2012-12-191-1/+1
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* pci: update all users to look in pci/Michael S. Tsirkin2012-12-171-1/+1
| | | | | | update all users so we can remove the makefile hack. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* es1370: convert PIO to new memory api read/writeAlexander Graf2012-10-291-10/+36
| | | | Signed-off-by: Alexander Graf <agraf@suse.de>
* pci: convert PCIUnregisterFunc to voidAlex Williamson2012-07-041-2/+1
| | | | | | | | Not a single driver has any possibility of failure on their exit function, let's keep it that way. Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* es1370: Fix debug codeStefan Weil2012-05-241-5/+6
| | | | | | | | | | | | | | | | | | When DEBUG_ES1370 is defined, the compiler shows these warnings: hw/es1370.c: In function ?es1370_update_voices?: hw/es1370.c:414: warning: format ?%d? expects type ?int?, but argument 3 has type ?size_t? hw/es1370.c: In function ?es1370_writel?: hw/es1370.c:582: warning: format ?%d? expects type ?int?, but argument 3 has type ?long int? hw/es1370.c:592: warning: format ?%d? expects type ?int?, but argument 3 has type ?long int? hw/es1370.c:609: warning: format ?%d? expects type ?int?, but argument 3 has type ?long int? hw/es1370.c: In function ?es1370_readl?: hw/es1370.c:751: warning: suggest braces around empty body in an ?if? statement Fix the format strings and add the missing braces. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: malc <av1474@comtv.ru>
* qom: Unify type registrationAndreas Färber2012-02-151-2/+3
| | | | | | | | | | | | | 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>
* Restore consistent formattingmalc2012-02-071-21/+21
| | | | Signed-off-by: malc <av1474@comtv.ru>
* qdev: register all types natively through QEMU Object ModelAnthony Liguori2012-02-031-7/+9
| | | | | | | | | | | | | | | | | | | | | 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>
* pci: convert to QEMU Object ModelAnthony Liguori2012-01-271-12/+19
| | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* qdev: prepare source tree for code conversionAnthony Liguori2012-01-271-5/+0
| | | | | | | | | | These are various small stylistic changes which help make things more consistent such that the automated conversion script can be simpler. It's not necessary to agree or disagree with these style changes because all of this code is going to be rewritten by the patch monkey script anyway. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* hw: Fix spelling in comments and codeStefan Weil2011-12-141-7/+7
| | | | | | | | | compatiblity->compatibility transfered->transferred transfering->transferring Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* es1370: Use PCI DMA stub functionsEduard - Gabriel Munteanu2011-11-011-2/+3
| | | | | | | | | This updates the es1370 device emulation to use the explicit PCI DMA functions, instead of directly calling physical memory access functions. Signed-off-by: Eduard - Gabriel Munteanu <eduard.munteanu@linux360.ro> Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* pci: interrupt pin documentation updateMichael S. Tsirkin2011-09-191-1/+0
| | | | | | | | | Fix up some erroneous comments in code: interrupt pins are named A-D, the interrupt pin register is always readonly and isn't zeroed out on reset. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* pci: rename pci_register_bar_region() to pci_register_bar()Avi Kivity2011-08-081-1/+1
| | | | | | | Reviewed-by: Richard Henderson <rth@twiddle.net> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* es1370: convert to memory APIAvi Kivity2011-08-081-18/+25
| | | | | | | Reviewed-by: Richard Henderson <rth@twiddle.net> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* hw/es1370.c: convert to PCIDeviceInfo to initialize idsIsaku Yamahata2011-06-121-13/+11
| | | | | | | use PCIDeviceInfo to initialize ids. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* es1370: symbolic names for pci registersMichael S. Tsirkin2009-12-231-14/+15
| | | | | | | | | No functional changes. I verified that the generated binary does not change. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Juan Quintela <quintela@redhat.com> Acked-by: Glauber Costa <glommer@gmail.com>
* savevm: Port to qdev.vmsd all devices that have qdevJuan Quintela2009-12-031-1/+1
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* es1370: port to vmstateJuan Quintela2009-12-031-41/+36
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* pci: introduce pcibus_t to represent pci bus address/size instead of uint32_tIsaku Yamahata2009-11-091-1/+1
| | | | | | | | | | | This patch is preliminary for 64 bit BAR support. Introduce dedicated type, pcibus_t, to represent pci bus address/size instead of uint32_t. Later this type will be changed to uint64_t. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* pci: s/PCI_ADDRESS_SPACE_/PCI_BASE_ADDRESS_SPACE_/ to match pci_regs.hIsaku Yamahata2009-11-091-1/+1
| | | | | | | | | make constants for pci base address match pci_regs.h by renaming PCI_ADDRESS_SPACE_xxx to PCI_BASE_ADDRESS_SPACE_xxx. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* qdev: add return value to init() callbacks.Gerd Hoffmann2009-08-271-1/+2
| | | | | | | | | | | | | | | | | | 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>
* Restore consistent formattingmalc2009-08-241-5/+5
| | | | Signed-off-by: malc <av1474@comtv.ru>
* es1370: Remove unused indirection of PCIES1370State and ES1370StateJuan Quintela2009-08-241-21/+10
| | | | Signed-off-by: Juan Quintela <quintela@redhat.com>
* qdev: es1370+ac97 descriptionGerd Hoffmann2009-07-161-0/+1
| | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Indent ac97 and es1370 according to audio formattingAnthony Liguori2009-07-101-3/+3
| | | | | | | For the sake of consistency. I pulled in the wrong patches from Gerd when he did the qdev conversion. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* qdev: convert es1370.Gerd Hoffmann2009-07-091-19/+22
| | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* Revert "Introduce reset notifier order"Jan Kiszka2009-06-291-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>
* Restore consistent formatting of audio devicesmalc2009-06-201-5/+5
|
* Rename pci_register_io_region() to pci_register_bar()Avi Kivity2009-06-161-1/+1
| | | | | | | | This function is used to manage a PCI BAR, so make the more generic pci_register_io_region() available to other uses. Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Introduce reset notifier orderJan Kiszka2009-05-221-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>
* Remove any pretense that there can be more than one AudioStatemalc2009-05-141-2/+1
|
* Push AUD_init down to devicesPaul Brook2009-05-121-6/+2
| | | | | | | | 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>
* Add and use #defines for PCI device classesblueswir12009-02-011-2/+1
| | | | | | | | | | | | | This patch adds and uses #defines for PCI device classes and subclases, using a new pci_config_set_class() function, similar to the recently added pci_config_set_vendor_id() and pci_config_set_device_id(). Change since v1: fixed compilation of hw/sun4u.c Signed-off-by: Stuart Brady <stuart.brady@gmail.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6491 c046a42c-6fe2-441c-8c8c-71466251a162
* Define PCI vendor and device IDs in pci.h (Stuart Brady)aliguori2009-01-261-4/+2
| | | | | | | | | | | | | | | This patch defines PCI vendor and device IDs in pci.h (matching those from Linux's pci_ids.h), and uses those definitions where appropriate. Change from v1: Introduces pci_config_set_vendor_id() / pci_config_set_device_id() accessors as suggested by Anthony Liguori. Signed-off-by: Stuart Brady <stuart.brady@gmail.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6442 c046a42c-6fe2-441c-8c8c-71466251a162
* Make audio violate POSIX lessmalc2008-12-031-1/+1
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5864 c046a42c-6fe2-441c-8c8c-71466251a162
* Add calls to pci_device_save/loadmalc2008-06-211-2/+8
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4766 c046a42c-6fe2-441c-8c8c-71466251a162
* Break up vl.h.pbrook2007-11-171-1/+4
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3674 c046a42c-6fe2-441c-8c8c-71466251a162
* Unify IRQ handling.pbrook2007-04-071-2/+2
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2635 c046a42c-6fe2-441c-8c8c-71466251a162
* audio endianness API changes (malc)bellard2006-07-041-4/+3
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2042 c046a42c-6fe2-441c-8c8c-71466251a162
* audio fixes + initial audio capture support (malc)bellard2006-07-041-1/+2
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2040 c046a42c-6fe2-441c-8c8c-71466251a162
* pcm endianness is now explicit (malc)bellard2005-11-201-2/+4
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1633 c046a42c-6fe2-441c-8c8c-71466251a162
* ES1370 word sized read fix (aka Win9x bug) (malc)bellard2005-11-111-3/+35
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1613 c046a42c-6fe2-441c-8c8c-71466251a162
* audio merge (malc)bellard2005-11-051-14/+35
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1601 c046a42c-6fe2-441c-8c8c-71466251a162
* merged 15a_aqemu.patch audio patch (malc)bellard2005-10-301-0/+1007
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1584 c046a42c-6fe2-441c-8c8c-71466251a162
OpenPOWER on IntegriCloud