[RFC PATCH 00/41] staging: dwc2: Miscellaneous cleanups and fixes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi folks,

over the past two weeks, I've worked on the dwc2 driver to make it work
on the RT3052 platform. Basic mass-storage works, there are still some
unsolved problems with 3G modems I haven't looked at closely yet.

During that time, I've done some cleanups and small fixes whenever I
noticed something in the code, and this patch series is the result. A
lot of these patches are probably ok to apply as-is, but some of might
need some modifications.

It has become a bit of big patch series, but because there are a lot of
small dependencies between patches, I decided to just send it over as a
single series.

There roughly three big changes: register-related cleanups, fixing an
irq race condition and irq related cleanups, and adding a platform
driver.

These are register-related and misc cleanups:

  staging: dwc2: when dma is disabled, clear dev->dma_mask
  staging: dwc2: disable dma when no dma_mask was setup
  staging: dwc2: fix naming of register constants
  staging: dwc2: fix off-by-one in check for max_packet_count parameter
  staging: dwc2: replace some magic numbers by constants
  staging: dwc2: remove unneeded check
  staging: dwc2: use dwc2_hcd_get_frame_number where possible
  staging: dwc2: add helper variable to simplify code
  staging: dwc2: unshift non-bool register value constants
  staging: dwc2: only read the snpsid register once
  staging: dwc2: remove some device-mode related debug code
  staging: dwc2: simplify register shift expressions
  staging: dwc2: add missing shift
  staging: dwc2: simplify debug output in dwc_hc_init
  staging: dwc2: re-use hptxfsiz variable
  staging: dwc2: remove redundant register reads
  staging: dwc2: properly mask the GRXFSIZ register
  staging: dwc2: interpret all hwcfg and related register at init time
  staging: dwc2: validate the value for phy_utmi_width
  staging: dwc2: make dwc2_core_params documentation more complete

These are irq cleanups and the last one is the fix:

  staging: dwc2: do not use IRQF_DISABLED
  staging: dwc2: do not handle PRTINT in dwc2_handle_common_intr
  staging: dwc2: move some interrupt enabling around
  staging: dwc2: disable I2CINT in dwc2_disable_host_interrupts
  staging: dwc2: add dwc2_disable_common_interrupts function
  staging: dwc2: introduce GINTMSK_HOST macro
  staging: dwc2: use functions to disable interrupts
  staging: dwc2: properly separate common and host interrupt enabling
  staging: dwc2: don't pass IRQ_LEVEL to devm_request_irq
  staging: dwc2: register common irq handler in dwc2_core_init

These are platform-driver related:

  staging: dwc2: convert to devm_ioremap_resource()
  staging: dwc2: cleanup includes in pci.c
  staging: dwc2: set the driver name to "dwc2"
  staging: dwc2: Make dwc2_set_uninitialized more specific
  staging: dwc2: add platform device bindings
  staging: dwc2: load parameters from the devicetree

And these patch are just for reference. I'll send the MIPS patches to
the MIPS folks later, the raspberry pi patch isn't quite working yet.

  MIPS: ralink: use the dwc2 driver for the rt305x USB controller
  MIPS: ralink: setup dma_mask for the rt305x dwc2 usb controller
  WIP: enable dwc2 for raspberry pi

Stephen Warren (2):
  staging: dwc2: add const to handling of dwc2_core_params
  staging: dwc2: use irq_return_t for interrupt handlers

 Documentation/devicetree/bindings/staging/dwc2.txt |  51 ++
 arch/arm/Kconfig                                   |   1 +
 arch/arm/boot/dts/bcm2835.dtsi                     |   6 +
 arch/arm/configs/bcm2835_defconfig                 |  20 +-
 arch/mips/ralink/dts/rt3050.dtsi                   |   2 +-
 arch/mips/ralink/rt305x-usb.c                      |   5 +
 drivers/staging/dwc2/Kconfig                       |   6 +-
 drivers/staging/dwc2/Makefile                      |   2 +
 drivers/staging/dwc2/core.c                        | 522 ++++++++++++---------
 drivers/staging/dwc2/core.h                        | 198 ++++++--
 drivers/staging/dwc2/core_intr.c                   |  32 +-
 drivers/staging/dwc2/hcd.c                         | 204 +++-----
 drivers/staging/dwc2/hcd.h                         |  30 +-
 drivers/staging/dwc2/hcd_ddma.c                    |   8 +-
 drivers/staging/dwc2/hcd_intr.c                    |  88 ++--
 drivers/staging/dwc2/hcd_queue.c                   |   2 +-
 drivers/staging/dwc2/hw.h                          | 147 +++---
 drivers/staging/dwc2/pci.c                         |  24 +-
 drivers/staging/dwc2/platform.c                    | 218 +++++++++
 19 files changed, 997 insertions(+), 569 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/staging/dwc2.txt
 create mode 100644 drivers/staging/dwc2/platform.c

-- 
1.8.0

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux