Skip to content

Commit

Permalink
staging: MIPS: add Octeon USB HCD support
Browse files Browse the repository at this point in the history
Add support for Octeon USB HCD. Tested on EdgeRouter Lite with USB
mass storage.

The driver has been extracted from GPL sources of EdgeRouter Lite firmware
(based on Linux 2.6.32.13). Some minor fixes and cleanups have been done
to make it work with 3.10-rc3.

$ uname -a
Linux (none) 3.10.0-rc3-edge-00005-g86cb5bc torvalds#41 SMP PREEMPT Sat Jun 1 20:41:46 EEST 2013 mips64 GNU/Linux
$ modprobe octeon-usb
[   37.971683] octeon_usb: module is from the staging directory, the quality is unknown, you have been warned.
[   37.983649] OcteonUSB: Detected 1 ports
[   37.999360] OcteonUSB OcteonUSB.0: Octeon Host Controller
[   38.004847] OcteonUSB OcteonUSB.0: new USB bus registered, assigned bus number 1
[   38.012332] OcteonUSB OcteonUSB.0: irq 122, io mem 0x00000000
[   38.019970] hub 1-0:1.0: USB hub found
[   38.023851] hub 1-0:1.0: 1 port detected
[   38.028101] OcteonUSB: Registered HCD for port 0 on irq 122
[   38.391443] usb 1-1: new high-speed USB device number 2 using OcteonUSB
[   38.586922] usb-storage 1-1:1.0: USB Mass Storage device detected
[   38.597375] scsi0 : usb-storage 1-1:1.0
[   39.604111] scsi 0:0:0:0: Direct-Access              USB DISK 2.0     PMAP PQ: 0 ANSI: 4
[   39.619113] sd 0:0:0:0: [sda] 7579008 512-byte logical blocks: (3.88 GB/3.61 GiB)
[   39.630696] sd 0:0:0:0: [sda] Write Protect is off
[   39.635945] sd 0:0:0:0: [sda] No Caching mode page present
[   39.641464] sd 0:0:0:0: [sda] Assuming drive cache: write through
[   39.651341] sd 0:0:0:0: [sda] No Caching mode page present
[   39.656917] sd 0:0:0:0: [sda] Assuming drive cache: write through
[   39.664296]  sda: sda1 sda2
[   39.675574] sd 0:0:0:0: [sda] No Caching mode page present
[   39.681093] sd 0:0:0:0: [sda] Assuming drive cache: write through
[   39.687223] sd 0:0:0:0: [sda] Attached SCSI removable disk

Signed-off-by: Aaro Koskinen <[email protected]>
Cc: David Daney <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
aakoskin authored and gregkh committed Jun 3, 2013
1 parent 51dd7d2 commit b164935
Show file tree
Hide file tree
Showing 10 changed files with 9,992 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/staging/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ source "drivers/staging/line6/Kconfig"

source "drivers/staging/octeon/Kconfig"

source "drivers/staging/octeon-usb/Kconfig"

source "drivers/staging/serqt_usb2/Kconfig"

source "drivers/staging/vt6655/Kconfig"
Expand Down
1 change: 1 addition & 0 deletions drivers/staging/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ obj-$(CONFIG_LINE6_USB) += line6/
obj-$(CONFIG_NETLOGIC_XLR_NET) += netlogic/
obj-$(CONFIG_USB_SERIAL_QUATECH2) += serqt_usb2/
obj-$(CONFIG_OCTEON_ETHERNET) += octeon/
obj-$(CONFIG_OCTEON_USB) += octeon-usb/
obj-$(CONFIG_VT6655) += vt6655/
obj-$(CONFIG_VT6656) += vt6656/
obj-$(CONFIG_VME_BUS) += vme/
Expand Down
10 changes: 10 additions & 0 deletions drivers/staging/octeon-usb/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
config OCTEON_USB
tristate "Cavium Networks Octeon USB support"
depends on CPU_CAVIUM_OCTEON && USB
help
This driver supports USB host controller on some Cavium
Networks' products in the Octeon family.

To compile this driver as a module, choose M here. The module
will be called octeon-usb.

3 changes: 3 additions & 0 deletions drivers/staging/octeon-usb/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
obj-${CONFIG_OCTEON_USB} := octeon-usb.o
octeon-usb-y := octeon-hcd.o
octeon-usb-y += cvmx-usb.o
11 changes: 11 additions & 0 deletions drivers/staging/octeon-usb/TODO
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
This driver is functional and has been tested on EdgeRouter Lite with
USB mass storage.

TODO:
- kernel coding style
- checkpatch warnings
- dead code elimination
- device tree bindings
- possibly eliminate the extra "hardware abstraction layer"

Contact: Aaro Koskinen <[email protected]>
3,344 changes: 3,344 additions & 0 deletions drivers/staging/octeon-usb/cvmx-usb.c

Large diffs are not rendered by default.

Loading

0 comments on commit b164935

Please sign in to comment.