aboutsummaryrefslogtreecommitdiff
path: root/drivers/staging/octeon-usb/cvmx-usb.c
AgeCommit message (Collapse)Author
2013-09-25staging: octeon-usb: Cocci spatch "noderef"Thomas Meyer
sizeof when applied to a pointer typed expression gives the size of the pointer. Found by coccinelle spatch "misc/noderef.cocci" Signed-off-by: Thomas Meyer <thomas@m3y3r.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-31staging: octeon-usb: eliminate remaining typedef unionsAaro Koskinen
Remaining typedef unions can be trivially eliminated with the pattern: foo_t -> union foo Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-31staging: octeon-usb: cvmx_usb_control_header_t -> union cvmx_usb_control_headerAaro Koskinen
Replace cvmx_usb_control_header_t with union cvmx_usb_control_header. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-31staging: octeon-usb: cvmx_usb_internal_state_t -> struct cvmx_usb_internal_stateAaro Koskinen
Replace cvmx_usb_internal_state_t with struct cvmx_usb_internal_state. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-31staging: octeon-usb: cvmx_usb_tx_fifo_t -> struct cvmx_usb_tx_fifoAaro Koskinen
Replace cvmx_usb_tx_fifo_t with struct cvmx_usb_tx_fifo_t. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-31staging: octeon-usb: cvmx_usb_pipe_list_t -> struct cvmx_usb_pipe_listAaro Koskinen
Replace cvmx_usb_pipe_list_t with struct cvmx_usb_pipe_list. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-31staging: octeon-usb: cvmx_usb_pipe_t -> struct cvmx_usb_pipeAaro Koskinen
Replace cvmx_usb_pipe_t with struct cvmx_usb_pipe. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-31staging: octeon-usb: cvmx_usb_transaction_t -> struct cvmx_usb_transactionAaro Koskinen
Replace cvmx_usb_transaction_t with struct cvmx_usb_transaction. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-31staging: octeon-usb: cvmx_usb_state_t -> struct cvmx_usb_stateAaro Koskinen
Replace cvmx_usb_state_t with struct cvmx_usb_state. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-31staging: octeon-usb: cvmx_usb_iso_packet_t -> struct cvmx_usb_iso_packetAaro Koskinen
Replace cvmx_usb_iso_packet_t with struct cvmx_usb_iso_packet. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-31staging: octeon-usb: cvmx_usb_port_status_t -> struct cvmx_usb_port_statusAaro Koskinen
Replace cvmx_usb_port_status_t with struct cvmx_usb_port_status. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-31staging: octeon-usb: cvmx_usb_stage_t -> enum cvmx_usb_stageAaro Koskinen
Replace cvmx_usb_stage_t with enum cvmx_usb_stage. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-31staging: octeon-usb: cvmx_usb_transaction_flags_t -> enum ↵Aaro Koskinen
cvmx_usb_transaction_flags Replace cvmx_usb_transaction_flags_t with enum cvmx_usb_transaction_flags. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-31staging: octeon-usb: cvmx_usb_isochronous_flags_t -> enum ↵Aaro Koskinen
cvmx_usb_isochronous_flags Replace cvmx_usb_isochronous_flags_t with enum cvmx_usb_isochronous_flags. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-31staging: octeon-usb: cvmx_usb_pipe_flags_t -> enum cvmx_usb_pipe_flagsAaro Koskinen
Replace cvmx_usb_pipe_flags_t with enum cvmx_usb_pipe_flags. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-31staging: octeon-usb: cvmx_usb_initialize_flags_t -> enum ↵Aaro Koskinen
cvmx_usb_initialize_flags Replace cvmx_usb_initialize_flags_t with enum cvmx_usb_initialize_flags. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-31staging: octeon-usb: cvmx_usb_callback_t -> enum cvmx_usb_callbackAaro Koskinen
Replace cvmx_usb_callback_t with enum cvmx_usb_callback. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-31staging: octeon-usb: cvmx_usb_complete_t -> enum cvmx_usb_completeAaro Koskinen
Replace cvmx_usb_complete_t with enum cvmx_usb_complete. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-31staging: octeon-usb: cvmx_usb_direction_t -> enum cvmx_usb_directionAaro Koskinen
Replace cvmx_usb_direction_t with enum cvmx_usb_direction. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-31staging: octeon-usb: cvmx_usb_transfer_t -> enum cvmx_usb_transferAaro Koskinen
Replace cvmx_usb_transfer_t with enum cvmx_usb_transfer. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-31staging: octeon-usb: cvmx_usb_speed_t -> enum cvmx_usb_speedAaro Koskinen
Replace cvmx_usb_speed_t with enum cvmx_usb_speed. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-29staging: octeon-usb: cvmx-usb: delete CVS keyword markersAaro Koskinen
Delete CVS keyword markers. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-29staging: octeon-usb: cvmx-usb: convert @returnAaro Koskinen
Convert "@return" to "Returns: ". Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-29staging: octeon-usb: cvmx-usb: convert @paramAaro Koskinen
Convert "@param name" inside comments to "@name:". Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-29staging: octeon-usb: cvmx-usb: delete @INTERNALAaro Koskinen
Delete "@INTERNAL" from comments. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-29staging: octeon-usb: cvmx-usb: reformat long commentsAaro Koskinen
Reformat long comments according to multi-line comment style. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-29staging: octeon-usb: cvmx-usb: fix whitespace issuesAaro Koskinen
Fix most of the whitespace issues reported by checkpatch: - use tabs for indentation - brace placement vs. newlines - (foo_t*) -> (foo_t *) - i=0 -> i = 0 Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-29staging: octeon-usb: cvmx-usb: delete __cvmx_usb_complete_to_string()Aaro Koskinen
Delete a redundant function. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-29staging: octeon-usb: cvmx-usb: replace cvmx_le16_to_cpu with le16_to_cpuAaro Koskinen
Replace cvmx_le16_to_cpu() with le16_to_cpu(). Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-29staging: octeon-usb: cvmx-usb: replace cvmx_wait_usec with udelayAaro Koskinen
Just use udelay(). Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-29staging: octeon-usb: cvmx-usb: replace long udelays with mdelaysAaro Koskinen
Replace long udelays with mdelays. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-29staging: octeon-usb: cvmx-usb: eliminate cvmx_likely/unlikelyAaro Koskinen
Just use likely/unlikely. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-29staging: octeon-usb: cvmx-usb: utilize Linux error codesAaro Koskinen
Use generic Linux error codes to replace cvmx_usb_status_t. The conversion table: Before After cvmx_usb_status_t int CVMX_USB_SUCCESS 0 CVMX_USB_INVALID_PARAM -EINVAL CVMX_USB_NO_MEMORY -ENOMEM CVMX_USB_BUSY -EBUSY CVMX_USB_TIMEOUT -ETIMEDOUT CVMX_USB_INCORRECT_MODE Deleted (was never used) Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-29staging: octeon-usb: cvmx-usb: delete redundant debug flagsAaro Koskinen
Delete redudant debug flags and dead code behind them. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-29staging: octeon-usb: cvmx-usb: delete driver-specific tracing codeAaro Koskinen
Delete call, parameter, and return value tracing. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-29staging: octeon-usb: use correct board type for EdgeRouter LiteAaro Koskinen
Use CVMX_BOARD_TYPE_UBNT_E100 for EdgeRouter Lite. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-05staging: octeon-usb: more checkpatch fixesDevendra Naga
place the opening brace right after the if,else, else if,switch statements. Cc: Aaro Koskinen <aaro.koskinen@iki.fi> Cc: David Daney <ddaney.cavm@gmail.com> Signed-off-by: Devendra Naga <devendra.aaru@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-05staging: octeon-usb: fix checkpatch errorDevendra Naga
this places the opening braces just after the if, else, elseif, switch statements Cc: Aaro Koskinen <aaro.koskinen@iki.fi> Cc: David Daney <ddaney.cavm@gmail.com> Signed-off-by: Devendra Naga <devendra.aaru@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-05staging: octeon-usb: place opening braces of structs, enums on topDevendra Naga
this fixes coding style problem, placing of the braces just right after the struct name, not below the struct name. this reduces the errors reported by checkpatch script from total: 1496 errors, 2133 warnings, 3344 lines checked to total: 1488 errors, 2132 warnings, 3336 lines checked Cc: Aaro Koskinen <aaro.koskinen@iki.fi> Cc: David Daney <ddaney.cavm@gmail.com> Signed-off-by: Devendra Naga <devendra.aaru@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-03staging: MIPS: add Octeon USB HCD supportAaro Koskinen
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 #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 <aaro.koskinen@iki.fi> Cc: David Daney <ddaney.cavm@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>