Statistics
| Branch: | Revision:

root / hw / usb-musb.c @ 4e4fa398

History | View | Annotate | Download (43.8 kB)

# Date Author Comment
25d5de7d 01/17/2012 10:44 am Gerd Hoffmann

usb: link packets to endpoints not devices

Add USBEndpoint for the control endpoint to USBDevices. Link async
packets to the USBEndpoint instead of the USBDevice.

Signed-off-by: Gerd Hoffmann <>

406c2075 09/07/2011 10:58 am Peter Maydell

usb-musb: Take a DeviceState* in init function

Initialise usb-musb by passing it a DeviceState* and the offset of the
IRQs in its gpio array, rather than a plain pointer to an irq array.
This is simpler for callers and also allows us to pass in a valid parent...

5b1cdb4e 09/07/2011 10:58 am Juha Riihimäki

usb-musb: Add reset function

Add a separate reset function musb_reset() to the usb-musb interface,
so that users who implement a reset function can also reset usb-musb.
Use this in tusb6010.

Signed-off-by: Juha Riihimäki <>
[Riku Voipio: Fixes and restructuring patchset]...

7267c094 08/21/2011 07:01 am Anthony Liguori

Use glib memory allocation and free functions

qemu_malloc/qemu_free no longer exist after this commit.

Signed-off-by: Anthony Liguori <>

4f4321c1 08/04/2011 04:51 pm Gerd Hoffmann

usb: use iovecs in USBPacket

Zap data pointer from USBPacket, add a QEMUIOVector instead.
Add a bunch of helper functions to manage USBPacket data.
Switch over users to the new interface.

Note that USBPacket->len was used for two purposes: First to
pass in the buffer size and second to return the number of...

3631e6c8 07/05/2011 04:09 pm Hans de Goede

usb: Move (initial) call of usb_port_location to usb_fill_port

Cleanup / preparation patch for companion controller support. Note that
as a "side-effect" this patch also fixes the milkymist-softusb controller
not having a port_location set for its ports....

d47e59b8 07/05/2011 04:09 pm Hans de Goede

usb: Make port wakeup and complete ops take a USBPort instead of a Device

This makes them consistent with the attach and detach ops, and in general
it makes sense to make portops take a port as argument. This also makes
adding support for a companion controller easier / cleaner....

4706ab6c 07/05/2011 04:09 pm Hans de Goede

usb: Replace device_destroy bus op with a child_detach port op

Note this fixes 2 things in one go, first of all the device_destroy bus
op should be a device_detach bus op, as pending async packets from the
device should be cancelled on detach not on destroy....

000eb4fa 07/05/2011 04:09 pm Peter Maydell

hw/usb-musb.c: Don't misuse usb_packet_complete()

In musb_packet() handle final processing of non-asynchronous
USB packets by directly calling musb_schedule_cb() rather than
going through usb_packet_complete(). The latter will trigger
an assertion because the packet doesn't belong to a device....

07771f6f 06/14/2011 01:56 pm Gerd Hoffmann

usb: cancel async packets on unplug

This patch adds USBBusOps struct with (for now) only a single callback
which is called when a device is about to be destroyed. The USB Host
adapters are implementing this callback and use it to cancel any async
requests which might be in flight before the device actually goes away....

53aa8c0e 05/26/2011 12:55 pm Gerd Hoffmann

usb: add usb_handle_packet

Add a usb_handle_packet function, put it into use everywhere.
Right now it just calls dev->info->handle_packet(), that will
change in future patches though.

Signed-off-by: Gerd Hoffmann <>

b3e5759e 05/09/2011 11:02 am Gerd Hoffmann

usb-musb: uninline functions

Prototype without "inline" keyword breaks the build with some gcc
versions. Noticed by Alexander Graf.

Fix this by removing the inline keywork everywhere. Some functions
can't be inlined anyway as the are referenced using function pointers....

5dc1672b 05/04/2011 03:11 pm Gerd Hoffmann

musb: get musb state via container_of()

13a9a0d3 05/04/2011 03:11 pm Gerd Hoffmann

usb: move complete callback to port ops

74475455 03/21/2011 10:23 am Paolo Bonzini

change all other clock references to use nanosecond resolution accessors

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\>' )...
ace1318b 01/12/2011 12:40 pm Gerd Hoffmann

usb: zap pdev from usbport

It isn't needed any more.

Signed-off-by: Gerd Hoffmann <>

c7a2196a 01/11/2011 06:24 pm Gerd Hoffmann

usb: keep track of physical port address.

Add a path string to USBPort. Add usb_port_location() function to set
the physical location of the usb port. Update all drivers implementing
usb ports to call it. Update the monitor commands to print it. Wind it...

843d4e0c 01/11/2011 06:15 pm Gerd Hoffmann

usb: add speed mask to ports

Add a field to usb ports indicating the speed(s) they are
able to handle.

Signed-off-by: Gerd Hoffmann <>

0d86d2be 01/11/2011 06:01 pm Gerd Hoffmann

usb: create USBPortOps, move attach there.

Create USBPortOps struct, move the attach function to that struct.

Signed-off-by: Gerd Hoffmann <>

618c169b 01/11/2011 06:01 pm Gerd Hoffmann

usb: rework attach/detach workflow

Add separate detach callback to USBPortOps, split
uhci/ohci/musb/usbhub attach functions into two.

Move common code to the usb_attach() function, only
the hardware-specific bits remain in the attach/detach
callbacks.

Keep track of the port it is attached to for each usb device....

ab28ccc0 12/11/2010 11:32 pm Gleb Natapov

Record which USBDevice USBPort belongs too.

Ports on root hub will have NULL here. This is needed to reconstruct
path from device to its root hub to build device path.

Signed-off-by: Gleb Natapov <>
Signed-off-by: Blue Swirl <>

384dce1e 12/19/2009 12:23 am Riku Voipio

usb-musb: convert fifo to 8bit and add more registers

Convert musb fifo to 8bit to allow 8/16/32bit access

MUSB allows reading and writing to the fifo in 32/16/8 bit
width. The Linux kernel does this sometimes, most usually at
the end of writing the packet to allow packet to end at a...

b2317837 10/05/2009 05:32 pm Gerd Hoffmann

switch usb bus to inplace allocation.

Signed-off-by: Gerd Hoffmann <>
Signed-off-by: Anthony Liguori <>

c227f099 10/02/2009 12:12 am Anthony Liguori

Revert "Get rid of _t suffix"

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...

99a0949b 10/01/2009 09:45 pm malc

Get rid of _t suffix

Some not so obvious bits, slirp and Xen were left alone for the time
being.

Signed-off-by: malc <>

6ee093c9 09/11/2009 06:19 pm Juan Quintela

Unexport ticks_per_sec variable. Create get_ticks_per_sec() function

Signed-off-by: Juan Quintela <>
Signed-off-by: Anthony Liguori <>

806b6024 09/09/2009 10:55 pm Gerd Hoffmann

qdev/usb: add usb bus support to qdev, convert drivers.

  • Add USBBus. * Add USBDeviceInfo, move device callbacks here. * Add usb-qdev helper functions. * Switch drivers to qdev.

TODO: * make the rest of qemu aware of usb busses and kill the FIXMEs
added by this patch....

a5d2f727 09/09/2009 10:55 pm Gerd Hoffmann

qdev/usb: make qemu aware of usb busses.

Move usb code from vl.c to usb-bus.c and make it use the new data
structures added by qdev conversion. qemu usb core should be able
to handle multiple USB busses just fine now (untested though).

Kill some usb_*_init() legacy functions, use usb_create_simple()...

d60efc6b 08/25/2009 09:29 pm Blue Swirl

Make CPURead/WriteFunc structure 'const'

Signed-off-by: Blue Swirl <>

8167ee88 07/16/2009 11:47 pm Blue Swirl

Update to a hopefully more future proof FSF address

Signed-off-by: Blue Swirl <>

bc24a225 05/10/2009 03:44 am Paul Brook

Follow coding conventions

Remove explicit struct qualifiers and rename structure types.

Signed-off-by: Paul Brook <>

2ac71179 05/08/2009 04:35 am Paul Brook

Replace cpu_abort with hw_error

Signed-off-by: Paul Brook <>

fad6cb1a 01/05/2009 12:05 am aurel32

Update FSF address in GPL/LGPL boilerplate

The attached patch updates the FSF address in the GPL/LGPL boilerplate
in most GPL/LGPLed files, and also in COPYING.LIB.

Signed-off-by: Stuart Brady <>
Signed-off-by: Aurelien Jarno <>...

942ac052 04/22/2008 06:15 am balrog

Inventra MUSB-HDRC host-mode USB.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4232 c046a42c-6fe2-441c-8c8c-71466251a162