All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [RFC PATCH 0/7] RFC: dm: Add USB support
@ 2015-01-30 19:04 Simon Glass
  2015-01-30 19:04 ` [U-Boot] [RFC PATCH 1/7] dm: usb: Add a uclass for USB controllers Simon Glass
                   ` (8 more replies)
  0 siblings, 9 replies; 21+ messages in thread
From: Simon Glass @ 2015-01-30 19:04 UTC (permalink / raw)
  To: u-boot

This series adds basic driver model support to USB. The intent is to permit
the various subsystems (OHCI, EHCI, XHCI) to co-exist and allow any number
of USB ports of different types. So far the absolute limit on the number
of USB devices is only slightly relaxed.

Only USB controllers have a real driver model device. USB devices (including
the hub in the controller) are not modelled as driver model devices. This
is for two reasons:

- it is easier since we don't need to bind a whole lot of devices when
    scanning
- the two main USB devices (block devices and Ethernet) don't have driver
    mode support yet anyway, so it would be pointless. However the recent
    network RFC has encouraged me to send this.

The basic approach is to set up the driver model structures in parallel to
what already exists rather than to replace them. This allows both driver
model and legacy to be used for USB, although not with the same board.

So far only XHCI is supported. As an example the Exynos XHCI driver is
converted to driver model.

I would appreciate comments before going further.

Caveats:
- sandbox code is incomplete and there are no tests
- 'usb stop' does not remove existing devices (I have not yet settled on
the best approach)
- the usb.h changes need to be split correctly into the patches once they
  are final

This series is available at u-boot-dm/usb-working.


Simon Glass (7):
  dm: usb: Add a uclass for USB controllers
  dm: usb: Support driver model in exynos XHCI
  dm: usb: Adjust users of the USB stack to work with driver model
  dm: usb: WIP sandbox USB implementation
  dm: core: Add a function to get the uclass data for a device
  arm: Show relocated PC/LR in the register dump
  dm: exynos: Enable driver model for snow XHCI

 Makefile                             |   1 +
 arch/arm/lib/interrupts.c            |  13 +-
 arch/sandbox/dts/sandbox.dts         |  20 +++
 arch/sandbox/include/asm/processor.h |   0
 common/cmd_usb.c                     |  74 ++++++++---
 common/usb.c                         |  28 +++--
 common/usb_hub.c                     |  13 +-
 common/usb_storage.c                 | 148 +++++++++++++---------
 drivers/core/device.c                |  10 ++
 drivers/usb/dev/Makefile             |  10 ++
 drivers/usb/dev/sandbox-flash.c      |  95 +++++++++++++++
 drivers/usb/dev/sandbox-hub.c        | 116 ++++++++++++++++++
 drivers/usb/dev/usb-emul-uclass.c    |  16 +++
 drivers/usb/eth/usb_ether.c          |  46 +++++--
 drivers/usb/host/Makefile            |   5 +
 drivers/usb/host/usb-sandbox.c       | 151 +++++++++++++++++++++++
 drivers/usb/host/usb-uclass.c        | 227 ++++++++++++++++++++++++++++++++++
 drivers/usb/host/xhci-exynos5.c      | 115 +++++++++++++++++-
 drivers/usb/host/xhci.c              | 229 ++++++++++++++++++++++++++++-------
 drivers/usb/host/xhci.h              |  24 ++++
 include/configs/sandbox.h            |   3 +
 include/configs/snow.h               |   1 +
 include/dm/device.h                  |  10 ++
 include/dm/uclass-id.h               |   2 +
 include/usb.h                        |  76 +++++++++++-
 include/usb_defs.h                   |  14 ++-
 26 files changed, 1294 insertions(+), 153 deletions(-)
 create mode 100644 arch/sandbox/include/asm/processor.h
 create mode 100644 drivers/usb/dev/Makefile
 create mode 100644 drivers/usb/dev/sandbox-flash.c
 create mode 100644 drivers/usb/dev/sandbox-hub.c
 create mode 100644 drivers/usb/dev/usb-emul-uclass.c
 create mode 100644 drivers/usb/host/usb-sandbox.c
 create mode 100644 drivers/usb/host/usb-uclass.c

-- 
2.2.0.rc0.207.ga3a616c

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2015-03-09  6:32 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-30 19:04 [U-Boot] [RFC PATCH 0/7] RFC: dm: Add USB support Simon Glass
2015-01-30 19:04 ` [U-Boot] [RFC PATCH 1/7] dm: usb: Add a uclass for USB controllers Simon Glass
2015-02-09 20:59   ` Marek Vasut
2015-03-09  6:20   ` Vivek Gautam
2015-03-09  6:32     ` Vivek Gautam
2015-01-30 19:04 ` [U-Boot] [RFC PATCH 2/7] dm: usb: Support driver model in exynos XHCI Simon Glass
2015-01-30 19:04 ` [U-Boot] [RFC PATCH 3/7] dm: usb: Adjust users of the USB stack to work with driver model Simon Glass
2015-02-25 14:09   ` Vivek Gautam
2015-01-30 19:04 ` [U-Boot] [RFC PATCH 4/7] dm: usb: WIP sandbox USB implementation Simon Glass
2015-01-30 19:04 ` [U-Boot] [RFC PATCH 5/7] dm: core: Add a function to get the uclass data for a device Simon Glass
2015-01-30 19:04 ` [U-Boot] [RFC PATCH 6/7] arm: Show relocated PC/LR in the register dump Simon Glass
2015-02-01  8:45   ` Albert ARIBAUD
2015-02-02 16:42     ` Simon Glass
2015-02-03 19:20   ` Albert ARIBAUD
2015-01-30 19:04 ` [U-Boot] [RFC PATCH 7/7] dm: exynos: Enable driver model for snow XHCI Simon Glass
2015-01-30 22:16 ` [U-Boot] [RFC PATCH 0/7] RFC: dm: Add USB support Marek Vasut
2015-01-30 22:41   ` Simon Glass
2015-02-09 21:02     ` Marek Vasut
2015-02-10  5:28       ` Simon Glass
2015-02-10 18:52         ` Marek Vasut
2015-02-25 14:07 ` Vivek Gautam

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.