- 14 6月, 2016 3 次提交
-
-
由 Peter Crosthwaite 提交于
Most of the control flow logic between send and recv (error checking etc) is the same. Factor this out into a common send_recv() API. This is then usable by clients, where the control logic for send and receive differs only by a boolean. E.g. if (send) i2c_send(...): else i2c_recv(...); becomes: i2c_send_recv(... , send); Signed-off-by: NPeter Crosthwaite <crosthwaite.peter@gmail.com> Reviewed-by: NAlistair Francis <alistair.francis@xilinx.com> Signed-off-by: NKONRAD Frederic <fred.konrad@greensocs.com> Message-id: 1465833014-21982-4-git-send-email-fred.konrad@greensocs.com Changes from FK: * Rebased on master. * Rebased on my i2c broadcast patch. Signed-off-by: NKONRAD Frederic <fred.konrad@greensocs.com> Reviewed-by: NAlistair Francis <alistair.francis@xilinx.com> Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
-
由 KONRAD Frederic 提交于
This does a write to every slaves when the I2C bus get a write to address 0. Signed-off-by: NKONRAD Frederic <fred.konrad@greensocs.com> Reviewed-by: NAlistair Francis <alistair.francis@xilinx.com> Reviewed-by: NPeter Crosthwaite <crosthwaite.peter@gmail.com> Tested-By: NHyun Kwon <hyun.kwon@xilinx.com> Message-id: 1465833014-21982-3-git-send-email-fred.konrad@greensocs.com Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
-
由 KONRAD Frederic 提交于
The dev field in i2cbus is not used. So just drop it. Signed-off-by: NKONRAD Frederic <fred.konrad@greensocs.com> Reviewed-by: NAlistair Francis <alistair.francis@xilinx.com> Reviewed-by: NPeter Crosthwaite <crosthwaite.peter@gmail.com> Tested-By: NHyun Kwon <hyun.kwon@xilinx.com> Message-id: 1465833014-21982-2-git-send-email-fred.konrad@greensocs.com Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
-
- 29 1月, 2016 1 次提交
-
-
由 Peter Maydell 提交于
Clean up includes so that osdep.h is included first and headers which it implies are not included manually. This commit was created with scripts/clean-includes. Signed-off-by: NPeter Maydell <peter.maydell@linaro.org> Message-id: 1453832250-766-38-git-send-email-peter.maydell@linaro.org
-
- 14 5月, 2014 1 次提交
-
-
由 Juan Quintela 提交于
After previous Peter patch, they are redundant. This way we don't assign them except when needed. Once there, there were lots of case where the ".fields" indentation was wrong: .fields = (VMStateField []) { and .fields = (VMStateField []) { Change all the combinations to: .fields = (VMStateField[]){ The biggest problem (appart from aesthetics) was that checkpatch complained when we copy&pasted the code from one place to another. Signed-off-by: NJuan Quintela <quintela@redhat.com> Reviewed-by: NPeter Maydell <peter.maydell@linaro.org>
-
- 14 2月, 2014 1 次提交
-
-
由 Andreas Färber 提交于
Reviewed-by: NPeter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
- 29 7月, 2013 1 次提交
-
-
由 Marcel Apfelbaum 提交于
The category will be used to sort the devices displayed in the command line help. Signed-off-by: NMarcel Apfelbaum <marcel.a@redhat.com> Message-id: 1375107465-25767-4-git-send-email-marcel.a@redhat.com Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 07 6月, 2013 1 次提交
-
-
由 Andreas Färber 提交于
Use QOM cast macros I2C_BUS(), SSI_BUS(), PCI_BUS() instead. Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
- 09 4月, 2013 2 次提交
-
-
由 Paolo Bonzini 提交于
This patch tackles all files that are compiled once, moving them to subdirectories of hw/. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
Many of these should be cleaned up with proper qdev-/QOM-ification. Right now there are many catch-all headers in include/hw/ARCH depending on cpu.h, and this makes it necessary to compile these files per-target. However, fixing this does not belong in these patches. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 01 3月, 2013 1 次提交
-
-
由 Paolo Bonzini 提交于
Done with this script: cd hw for i in `find . -name '*.h' | sed 's/^..//'`; do echo '\,^#.*include.*["<]'$i'[">], s,'$i',hw/&,' done | sed -i -f - `find . -type f` This is so that paths remain valid as files are moved. Instead, files in hw/dataplane are referenced with the relative path. We know they are not going to move to include/, and they are the only include files that are in subdirectories _and_ move. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 02 2月, 2013 1 次提交
-
-
由 Andreas Färber 提交于
It is not being used in hot paths and is obsoleted by I2C_SLAVE() QOM cast macro. Clean it up using a scripted conversion, so that it doesn't get used in new code. Some of its callers were combining it with FROM_I2C_SLAVE() macro, which is equally obsolete but needs to be replaced in a type-specific way. Signed-off-by: NAndreas Färber <afaerber@suse.de> Cc: Kuo-Jung Su <dantesu@faraday-tech.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 11 1月, 2013 1 次提交
-
-
由 Andreas Färber 提交于
Since 39bffca2 (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: NAndreas Färber <afaerber@suse.de> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 18 6月, 2012 4 次提交
-
-
由 Anthony Liguori 提交于
Make qbus children show up as link<> properties. There is no stable addressing for qbus children so we use an unstable naming convention. This is okay in QOM though because the composition name is expected to be what's stable. Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
由 Anthony Liguori 提交于
This is far less interesting than it sounds. We simply add an Object to each BusState and then register the types appropriately. Most of the interesting refactoring will follow in the next patches. Since we're changing fundamental type names (BusInfo -> BusClass), it all needs to convert at once. Fortunately, not a lot of code is affected. Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> [AF: Made all new bus TypeInfos static const.] [AF: Made qbus_free() call object_delete(), required {qom,glib}_allocated] Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
由 Paolo Bonzini 提交于
In qdev, each bus in practice identified an abstract superclass, but this was mostly hidden. In QOM, instead, these abstract classes are explicit so we can move bus properties there. All bus property walks are removed, and all device property walks are changed to look along the class hierarchy instead. We would have duplicates if class A defines some properties and its subclass B does not define any, because class_b->props will be left equal to class_a->props. The solution here is to reintroduce the class_base_init TypeInfo callback, that was present in one of the early QOM versions but removed (on my request...) before committing. This breaks global bus properties, an obscure feature when used with the command-line which is actually useful and used when used by backwards-compatible machine types. So this patch also adjusts the global bus properties in hw/pc_piix.c to refer to the abstract class. Globals and other properties must be modified in the same patch to avoid complications related to initialization ordering. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
由 Paolo Bonzini 提交于
Simple code movement in order to simplify future refactoring. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
- 15 2月, 2012 1 次提交
-
-
由 Andreas 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: NAndreas Färber <afaerber@suse.de> Cc: Anthony Liguori <anthony@codemonkey.ws> Cc: malc <av1474@comtv.ru> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 04 2月, 2012 2 次提交
-
-
由 Anthony Liguori 提交于
It is no longer used in the tree since everything is done natively through QEMU Object Model. Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
由 Anthony 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: NAnthony Liguori <aliguori@us.ibm.com>
-
- 28 1月, 2012 2 次提交
-
-
由 Anthony 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: NAnthony Liguori <aliguori@us.ibm.com>
-
由 Anthony Liguori 提交于
Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 29 10月, 2011 1 次提交
-
-
由 Paolo Bonzini 提交于
SCSI buses will need to read the children list first-to-last. This requires using a QTAILQ, because hell breaks loose if you just try inserting at the tail (thus reversing the order of all existing visits from last-to-first to first-to-tail). Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
- 24 7月, 2011 1 次提交
-
-
由 Matthew Fernandez 提交于
Correct typos of "licenced" to "licensed". Reviewed-by: NStefan Weil <weil@mail.berlios.de> Reviewed-by: NAndreas F=E4rber <andreas.faerber@web.de> Signed-off-by: NMatthew Fernandez <matthew.fernandez@gmail.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 06 7月, 2010 1 次提交
-
-
由 Alex Williamson 提交于
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: NAlex Williamson <alex.williamson@redhat.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 03 12月, 2009 1 次提交
-
-
由 Juha Riihimäki 提交于
With the recent device handling changes the I2C slave addressing code was broken. With current code, if a slave with the correct address is not found on the bus the last scanned slave on the bus will be addressed. This is wrong. Please find attached a patch to fix it. Signed-off-by: NJuha Riihimäki <juha.riihimaki@nokia.com> Acked-by: NRiku Voipio <riku.voipio@iki.fi> Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
-
- 07 10月, 2009 1 次提交
-
-
由 Markus Armbruster 提交于
Like qdev_init(), but terminate program via hw_error() instead of returning an error value. Use it instead of qdev_init() where terminating the program on failure is okay, either because it's during machine construction, or because we know that failure can't happen. Because relying in the latter is somewhat unclean, and the former is not always obvious, it would be nice to go back to qdev_init() in the not-so-obvious cases, only with proper error handling. I'm leaving that for another day, because it involves making sure that error values are properly checked by all callers. Patchworks-ID: 35168 Signed-off-by: NMarkus Armbruster <armbru@redhat.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 05 10月, 2009 5 次提交
-
-
由 Juan Quintela 提交于
All its users moved to vmstate Signed-off-by: NJuan Quintela <quintela@redhat.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
由 Juan Quintela 提交于
Signed-off-by: NJuan Quintela <quintela@redhat.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
由 Juan Quintela 提交于
Signed-off-by: NJuan Quintela <quintela@redhat.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
由 Juan Quintela 提交于
Signed-off-by: NJuan Quintela <quintela@redhat.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
由 Juan Quintela 提交于
Signed-off-by: NJuan Quintela <quintela@redhat.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 12 9月, 2009 1 次提交
-
-
由 Blue Swirl 提交于
Problem: Our file sys-queue.h is a copy of the BSD file, but there are some additions and it's not entirely compatible. Because of that, there have been conflicts with system headers on BSD systems. Some hacks have been introduced in the commits 15cc9235, f40d7537, 96555a96 and 3990d09a but the fixes were fragile. Solution: Avoid the conflict entirely by renaming the functions and the file. Revert the previous hacks. Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
-
- 28 8月, 2009 1 次提交
-
-
由 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: NGerd Hoffmann <kraxel@redhat.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 11 8月, 2009 1 次提交
-
-
由 Gerd Hoffmann 提交于
Signed-off-by: NGerd Hoffmann <kraxel@redhat.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com> Message-Id:
-
- 17 7月, 2009 1 次提交
-
-
由 Gerd Hoffmann 提交于
This patch is a major overhaul of the device properties. The properties are saved directly in the device state struct now, the linked list of property values is gone. Advantages: * We don't have to maintain the list with the property values. * The value in the property list and the value actually used by the device can't go out of sync any more (used to happen for the pci.devfn == -1 case) because there is only one place where the value is stored. * A record describing the property is required now, you can't set random properties any more. There are bus-specific and device-specific properties. The former should be used for properties common to all bus drivers. Typical use case is bus addressing, i.e. pci.devfn and i2c.address. Properties have a PropertyInfo struct attached with name, size and function pointers to parse and print properties. A few common property types have PropertyInfos defined in qdev-properties.c. Drivers are free to implement their own very special property parsers if needed. Properties can have default values. If unset they are zero-filled. Signed-off-by: NGerd Hoffmann <kraxel@redhat.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 09 7月, 2009 1 次提交
-
-
由 Gerd Hoffmann 提交于
BusInfo is filled with name and size (pretty much like I did for DeviceInfo as well). There is also a function pointer to print bus-specific device information to the monitor. sysbus is hooked up there, I've also added a print function for PCI. Device creation is slightly modified as well: The device type search loop now also checks the bus type while scanning the list instead of complaining thereafter in case of a mismatch. This effectively gives each bus a private namespace for device names. Signed-off-by: NGerd Hoffmann <kraxel@redhat.com> Signed-off-by: NPaul Brook <paul@codesourcery.com>
-
- 11 6月, 2009 1 次提交
-
-
由 Gerd Hoffmann 提交于
Rationale: move device information from code to data structures. v2: Adapt the drivers missed in the first version. Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
-
- 23 5月, 2009 1 次提交
-
-
由 Paul Brook 提交于
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: NPaul Brook <paul@codesourcery.com>
-
- 15 5月, 2009 1 次提交
-
-
由 Paul Brook 提交于
Signed-off-by: NPaul Brook <paul@codesourcery.com>
-