aboutsummaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)AuthorFilesLines
2013-11-15usb-xhci: add xhci host controller supportNikunj A Dadhania4-9/+1453
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2013-11-15usb-xhci: add xhci supportNikunj A Dadhania7-2/+230
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2013-10-15usb-core: disable xhciNikunj A Dadhania1-1/+1
Code still does not support xhci, disable creation of xhci node, as it was causing crash in the quiesce path. Also check if ops pointer is verified before accessing function pointers during usb_hcd_exit. Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2013-10-09Add ibm,client-architecture-support methodNikunj A Dadhania4-1/+23
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2013-10-04usb-ohci: preserve the toggleCarry bit in EDNikunj A Dadhania1-1/+2
Endpoint descriptors toggleCarry bit needs to be preserved when using DataToggle bit in transfer descriptor is set to 0. Also zero the bulk_curr_ed Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2013-10-04usb-ohci: done_head processing fixesNikunj A Dadhania2-36/+42
Return error code like STALL back, so it can be handled effectively. Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2013-10-04usb-ohci: update init and rationalize timingsNikunj A Dadhania2-13/+17
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2013-10-04usb-msc: handle stall and other fixesNikunj A Dadhania2-2/+16
* Add Reset Recovery procedure * Zero cbw and csw memory everytime * Add delays during cbw, data and csw stage * Increment tag after every command Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2013-10-04usb-core: Add CLEAR FEATURE apiNikunj A Dadhania2-0/+22
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2013-10-04Add bcm57xx network driver in libbcmAvik Sil6-1/+3913
Signed-off-by: Avik Sil <aviksil@linux.vnet.ibm.com> Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2013-10-04Add e1000 network driver in libe1kAvik Sil6-1/+1252
Signed-off-by: Avik Sil <aviksil@linux.vnet.ibm.com> Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2013-10-04Add virtio-net driver in libvirtioAvik Sil5-1/+461
Signed-off-by: Avik Sil <aviksil@linux.vnet.ibm.com> Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2013-10-04Add veth driver in libvethAvik Sil6-1/+430
Signed-off-by: Avik Sil <aviksil@linux.vnet.ibm.com> Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2013-08-23usb-ohci: Convert td-phys every time to td-virtqemu-slof-20130827Nikunj A Dadhania1-1/+4
next_td is phys pointer as well, convert that to virt Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2013-08-21usb: fix various issues found with js2xNikunj A Dadhania4-36/+125
* JS20 exposed various timing related issues that were not apparent in the emulated environment. * Reset the USB Bus * JS20 overrides the frame_interval and periodic_start on setting the controller to USB operational. Reprogram them. * ohci fix the data-toggle bits. * Robust error handling Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2013-08-21usb: Use separate in-memory endian swapNikunj A Dadhania3-32/+33
Convert pending in-memory byteswaps to accessors Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2013-08-21usb-ohci: collect TDs from done listNikunj A Dadhania2-14/+133
OHCI HC after using the TDs queues them back to hccaDoneHead. Until this event the TDs cannot be reused, as there might be references in the host controller still pending. Recycle all the TDs from the queue and acknowledge it by clearing the WD bit in interrupt status register. Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2013-08-06usb-ohci: Use proper memory barriers alwaysBenjamin Herrenschmidt1-2/+2
Compiler barriers are not useful for ordering memory accesses. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2013-08-06usb: Fix a couple of warningsBenjamin Herrenschmidt2-1/+5
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2013-08-06usb-ehci: Add ehci handshakeNikunj A Dadhania2-6/+43
After removal of the QTD, the device driver needs to make sure that the host controller is really done with this QTD, and does not have any local/cached copy of this. This is achieved by employing a 3-bit handshake as explained in the echi spec 4.8.2 and Fig 4-10 Also add missing memory barrier. Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2013-08-06usb: add mb for write accessorsNikunj A Dadhania1-0/+5
Introduce mb() in all the variants of write_reg* before the hcall Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2013-08-06usb-ohci: add missing memory barriersNikunj A Dadhania1-0/+8
* Start the control/bulk processing after ed is written * Clear the content of control_head_ed and bulk_head_ed once done using them. Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2013-08-06usb-ohci: suspend the controller in exit code pathNikunj A Dadhania2-7/+3
Moreover ehci already suspends the controller in the hcd_exit path. So we can remove hc-suspend from the cleanup path. Also, count mechanism is not needed anymore, as quiesce is called only once. Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2013-08-06usb-ohci: Add a reset when closing the OHCIBenjamin Herrenschmidt1-0/+1
Or it will continue DMA'ing which is not a good idea. On recent qemu's that add proper DMA error handling, it will get into error state. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2013-08-06usb: Use proper accessors for MMIO and separate in-memory endian swapBenjamin Herrenschmidt3-129/+131
We cannot just access MMIO like that. On KVM for example, this has to be hypercalls. On js2x, we need to use special cache-inhibited loads and stores. We have accessors in cache.h, we just need to use them. However that means that read/write_reg() are no longer suitable for in-memory byteswaps. We need to use the accessors in byteorder.h for that While at it, we also fix the code to use mb() instead of barrier() as a full memory barrier is needed to actually order things. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2013-07-25Use a global definition of sync() and mb()Benjamin Herrenschmidt3-12/+9
For memory barriers accross the board. Also move the compiler barrier to cpu.h Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2013-07-24usb: unmap buffersNikunj A Dadhania9-12/+120
Clean up all the dma allocated buffers and remove their mappings. Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Acked-by: Thomas Huth <thuth@linux.vnet.ibm.com>
2013-07-24usb-kbd: accept "s" to drop to OF promptNikunj A Dadhania1-0/+20
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Acked-by: Thomas Huth <thuth@linux.vnet.ibm.com>
2013-07-24USB storage driverNikunj A Dadhania1-0/+1
* Integrated with generic scsi * Support multiple LUNs Signed-off-by: Avik Sil <aviksil@linux.vnet.ibm.com> Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> [ Changed to adapt to latest scsi rework ] Reviewed-by: Thomas Huth <thuth@linux.vnet.ibm.com>
2013-07-24usb-ohci: add Bulk transfer supportNikunj A Dadhania2-2/+112
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Acked-by: Thomas Huth <thuth@linux.vnet.ibm.com>
2013-07-24usb-ehci: Add bulk supportAvik Sil2-14/+130
* Implement USB ehci bulk transfer * USB core add bulk transfer api Signed-off-by: Avik Sil <aviksil@linux.vnet.ibm.com> Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Reviewed-by: Thomas Huth <thuth@linux.vnet.ibm.com>
2013-07-24usb-core: add usb bulk supportAvik Sil5-2/+156
Signed-off-by: Avik Sil <aviksil@linux.vnet.ibm.com> Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Acked-by: Thomas Huth <thuth@linux.vnet.ibm.com>
2013-07-24USB generic hub device driverNikunj A Dadhania7-6/+207
Support for usb generic hub driver. Todo: Detect disconnects and remove device Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Acked-by: Thomas Huth <thuth@linux.vnet.ibm.com>
2013-07-24usb-ehci: setup new deviceAvik Sil3-10/+250
Call usb-core routine to setup the newly found device Signed-off-by: Avik Sil <aviksil@linux.vnet.ibm.com> Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Reviewed-by: Thomas Huth <thuth@linux.vnet.ibm.com>
2013-07-24usb-ehci: Check ehci portsAvik Sil2-1/+23
Discover devices connected on the controller Signed-off-by: Avik Sil <aviksil@linux.vnet.ibm.com> Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Acked-by: Thomas Huth <thuth@linux.vnet.ibm.com>
2013-07-24usb-ehci: initialize controllerAvik Sil2-9/+146
Signed-off-by: Avik Sil <aviksil@linux.vnet.ibm.com> Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Reviewed-by: Thomas Huth <thuth@linux.vnet.ibm.com>
2013-07-24USB keyboard driverNikunj A Dadhania11-7/+1257
Portions of keyboard driver(usb-key.h and usb-hid.c) inherited from code originally written by former SLOF team Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Acked-by: Thomas Huth <thuth@linux.vnet.ibm.com>
2013-07-24usb-core: setup new deviceNikunj A Dadhania5-8/+399
* Configures the newly found usb devices. Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Fixes-by: Avik Sil <aviksil@linux.vnet.ibm.com> Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Acked-by: Thomas Huth <thuth@linux.vnet.ibm.com>
2013-07-24usb-core: create dev pool allocationNikunj A Dadhania2-0/+63
Have a device structure pool and provide apis usb_devpool_[get,put] Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Acked-by: Thomas Huth <thuth@linux.vnet.ibm.com>
2013-07-24usb-ohci: implement ohci send controlNikunj A Dadhania2-3/+118
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Acked-by: Thomas Huth <thuth@linux.vnet.ibm.com>
2013-07-24usb-core: usb send controlNikunj A Dadhania4-0/+28
Introduce generice usb_send_control and implement correspoding stubs in ohci and ehci Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Acked-by: Thomas Huth <thuth@linux.vnet.ibm.com>
2013-07-24usb-core: implement usb_{get,put}_pipe routinesNikunj A Dadhania5-13/+211
Generic routines to get pipe structure from controller. Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Acked-by: Thomas Huth <thuth@linux.vnet.ibm.com>
2013-07-24usb-ohci: allocate pipe poolNikunj A Dadhania4-0/+94
usb-core: usb_pipe structure, this structure will be embedded in controller specific pipe structure and accessed using container_of macro. usb-ohci: allocate pipe pool and support routines Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Acked-by: Thomas Huth <thuth@linux.vnet.ibm.com>
2013-07-24usb-ohci: reset, init and check-portsNikunj A Dadhania3-4/+344
* Resets the controller * Initializes controller * Query ports for discovering devices Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Acked-by: Thomas Huth <thuth@linux.vnet.ibm.com>
2013-07-24Add standard header stdbool.hNikunj A Dadhania1-0/+20
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Acked-by: Thomas Huth <thuth@linux.vnet.ibm.com>
2013-07-24usb-ehci: Add USB EHCI skeletonAvik Sil6-1/+150
Dump EHCI registers Signed-off-by: Avik Sil <aviksil@linux.vnet.ibm.com> Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Acked-by: Thomas Huth <thuth@linux.vnet.ibm.com>
2013-07-24usb-core: Add register accessor functionsAvik Sil2-0/+83
Endian conversion routines Signed-off-by: Avik Sil <aviksil@linux.vnet.ibm.com> Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Acked-by: Thomas Huth <thuth@linux.vnet.ibm.com>
2013-07-24usb-core: hcd registration and query routinesNikunj A Dadhania6-4/+84
* usb-core: hcd registration query hcd operations structure hcd controller init routines * usb-ohci: stub ochi controller init Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Acked-by: Thomas Huth <thuth@linux.vnet.ibm.com>
2013-07-24usb-core: registration and makefilesNikunj A Dadhania8-1/+215
* Introduce libusb * USB core register routine and required forth changes * USB OHCI skeleton file Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Acked-by: Thomas Huth <thuth@de.ibm.com>
2013-07-24Add new USB codeNikunj A Dadhania1-0/+0
* Create usb directory * Remove compilation of slof-usb code * Generalize pci-class_0c.fs * Add usb-static.fs with alias and dummy usb-scan Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Acked-by: Thomas Huth <thuth@linux.vnet.ibm.com>