Andrzej Pietrasiewicz [Tue, 15 Jul 2014 11:09:45 +0000 (13:09 +0200)]
usb: gadget: Gadget directory cleanup - group UDC drivers
The drivers/usb/gadget directory contains many files.
Files which are related can be distributed into separate directories.
This patch moves the UDC drivers into a separate directory.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Andrzej Pietrasiewicz [Tue, 15 Jul 2014 11:09:44 +0000 (13:09 +0200)]
usb: gadget: Gadget directory cleanup - group legacy gadgets
The drivers/usb/gadget directory contains many files.
Files which are related can be distributed into separate directories.
This patch moves the legacy gadgets (i.e. those not using configfs)
into a separate directory.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Ulrich Hecht [Thu, 10 Jul 2014 07:53:59 +0000 (09:53 +0200)]
usb: renesas_usbhs: add R-Car Gen. 2 init and power control
In preparation for DT conversion to reduce reliance on platform device
callbacks.
Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Li Jun [Tue, 15 Jul 2014 14:07:40 +0000 (22:07 +0800)]
usb: gadget: composite: dequeue cdev->req before free it in composite_dev_cleanup
This patch try to dequeue the cdev->req to guarantee the request is not queued
before free it.
Signed-off-by: Li Jun <b47624@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
George Cherian [Wed, 16 Jul 2014 12:52:12 +0000 (18:22 +0530)]
usb: musb: dsps: Add the sw_babble_control() and Enable for newer silicon
Add sw_babble_control() logic to differentiate between transient
babble and real babble condition. Also add the SW babble control
register definitions.
Babble control register logic is implemented in the latest
revision of AM335x.
Find whether we are running on newer silicon. The babble control
register reads 0x4 by default in newer silicon as opposed to 0
in old versions of AM335x. Based on this enable the sw babble
control logic.
Signed-off-by: George Cherian <george.cherian@ti.com>
Tested-by: Bin Liu <b-liu@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
George Cherian [Wed, 16 Jul 2014 12:52:11 +0000 (18:22 +0530)]
usb: musb: core: Convert the musb_platform_reset to have a return value.
Currently musb_platform_reset() is only used by dsps.
In case of BABBLE interrupt for other platforms the musb_platform_reset()
is a NOP. In such situations no need to re-initialize the endpoints.
Also in the latest silicon revision of AM335x, we do have a babble recovery
mechanism without resetting the IP block. In preperation to add that support
its better to have a rest_done return for musb_platform_reset().
Signed-off-by: George Cherian <george.cherian@ti.com>
Tested-by: Bin Liu <b-liu@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
George Cherian [Wed, 16 Jul 2014 12:52:10 +0000 (18:22 +0530)]
usb: musb: core: Convert babble recover work to delayed work
During babble condition both first disconnect of devices are
initiated. Make sure MUSB controller is reset and re-initialized
after all disconnects.
To acheive this schedule a delayed work for babble recovery.
While at that convert udelay to usleep_range.
Refer Documentation/timers/timers-howto.txt
Signed-off-by: George Cherian <george.cherian@ti.com>
Tested-by: Bin Liu <b-liu@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
George Cherian [Wed, 16 Jul 2014 12:52:09 +0000 (18:22 +0530)]
usb: musb: core: Handle Babble condition only in HOST mode
BABBLE and RESET share the same interrupt. The interrupt
is considered to be RESET if MUSB is in peripheral mode and
as a BABBLE if MUSB is in HOST mode.
Handle babble condition iff MUSB is in HOST mode.
Signed-off-by: George Cherian <george.cherian@ti.com>
Tested-by: Bin Liu <b-liu@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
George Cherian [Wed, 16 Jul 2014 13:07:08 +0000 (18:37 +0530)]
usb: dwc3: omap: add dwc3_omap_extcon_register function
Move the extcon related code to its own function.
Improve code readability, decrease the dwc3_probe() size.
Signed-off-by: George Cherian <george.cherian@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
George Cherian [Wed, 16 Jul 2014 13:07:07 +0000 (18:37 +0530)]
usb: dwc3: omap: add dwc3_omap_set_utmi_mode() function
Move find and set the utmi mode to its own separate function.
Improve code readability, decrease the dwc3_probe() size.
Signed-off-by: George Cherian <george.cherian@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
George Cherian [Wed, 16 Jul 2014 13:07:06 +0000 (18:37 +0530)]
usb: dwc3: omap: add dwc3_omap_map_offset() function
Move map offset to its own separate function.
Improve code readability, decrease the dwc3_probe() size.
Signed-off-by: George Cherian <george.cherian@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
George Cherian [Wed, 16 Jul 2014 13:07:05 +0000 (18:37 +0530)]
usb: dwc3: omap: remove x_major calculation from revision register
Remove the x_major calculation logic from the wrapper revision register
to differentiate between OMAP5 and AM437x. This was done to find the
register offsets of wrapper register. Now that We do it using dt
compatible, remove the whole logic.
Signed-off-by: George Cherian <george.cherian@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Jim Baxter [Mon, 7 Jul 2014 17:33:19 +0000 (18:33 +0100)]
usb: gadget: NCM: Stop RX TCP Bursts getting dropped.
This fixes a problem with dropped packets over 16k CDC-NCM
when the connection is being heavily used.
The issue was that the extracted frames cloned from the
received frame were consuming more memory than necessary
resulting in the truesize being ~32KB instead of ~2KB, this
meant there was a high chance of reaching the sk_rcvbuf
limit.
Signed-off-by: Jim Baxter <jim_baxter@mentor.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Jim Baxter [Mon, 7 Jul 2014 17:33:18 +0000 (18:33 +0100)]
usb: gadget: NCM: Add transmit multi-frame.
This adds multi-frame support to the NCM NTB's for
the gadget driver. This allows multiple network
packets to be put inside a single USB NTB with a
maximum size of 16kB.
It has a time out of 300ms to ensure that smaller
number of packets still maintain a normal latency.
Also the .fp_index and .next_fp_index have been
changed to .ndp_index and .next_ndp_index to
match the latest CDC-NCM specification and
help with maintenance.
Results transmitting from gadget to host.
Before the change:
TCP_STREAM Throughput (10^6bits/sec): 22.72
UDP_STREAM Throughput (10^6bits/sec): 25.94
Latency:
netperf -H 192.168.1.101 -v2 -l 50 -t TCP_RR -- -r 16384,16384
Trans. RoundTrip Throughput
Rate Latency 10^6bits/s
per sec usec/Tran Outbound
100.83 9918.116 13.215
After the change:
TCP_STREAM Throughput (10^6bits/sec): 124.26
UDP_STREAM Throughput (10^6bits/sec): 227.48
Latency:
netperf -H 192.168.1.101 -v2 -l 50 -t TCP_RR -- -r 16384,16384
Trans. RoundTrip Throughput
Rate Latency 10^6bits/s
per sec usec/Tran Outbound
156.80 6377.730 20.552
Signed-off-by: Jim Baxter <jim_baxter@mentor.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Jim Baxter [Mon, 7 Jul 2014 17:33:17 +0000 (18:33 +0100)]
usb: gadget: NCM: RX function support multiple NDPs
The NDP was ignoring the wNextNdpIndex in the NDP which
means that NTBs containing multiple NDPs would have missed
frames.
Signed-off-by: Jim Baxter <jim_baxter@mentor.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Nathan Sullivan [Mon, 7 Jul 2014 14:50:14 +0000 (09:50 -0500)]
usb: gadget: fix eem_wrap cloned skb logic
Even if the skb is cloned, we still need a ZLP or USB will stall.
Signed-off-by: Nathan Sullivan <nathan.sullivan@ni.com>
Acked-by: Brad Mouring <brad.mouring@ni.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Jingoo Han [Fri, 4 Jul 2014 06:00:51 +0000 (15:00 +0900)]
usb: dwc3: gadget: remove unnecessary 'start_new' variable
Remove 'start_new' variable from dwc3_endpoint_transfer_complete(),
since this variable has not been used.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Jingoo Han [Tue, 8 Jul 2014 11:51:34 +0000 (20:51 +0900)]
usb: phy: am335x: Use SIMPLE_DEV_PM_OPS macro
Use SIMPLE_DEV_PM_OPS macro and remove DEV_PM_OPS macro, in order
to make the code simpler.
Acked-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Tobias Klauser [Wed, 9 Jul 2014 16:09:56 +0000 (18:09 +0200)]
usb: gadget: Convert drivers to use module_usb_composite_driver()
Use the module_usb_composite_driver() macro where applicable to
eliminate the module_init/module_exit boilerplate in USB gadget composite
drivers.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Tobias Klauser [Wed, 9 Jul 2014 16:09:55 +0000 (18:09 +0200)]
usb: gadget: Add helper macro for usb_composite_driver boilerplate
Introduce the module_usb_composite_driver macro as a convenience macro
for USB gadget composite driver modules, similar to module_usb_driver.
It is intended to be used by drivers which init/exit section does
nothing but calling usb_composite_probe/usb_composite_unrregister. By
using this macro it is possible to eliminate a few lines of boilerplate
code per USB gadget composite driver.
Based on
f3a6a4b6 ("USB: Add helper macro for usb_driver boilerplate")
which introduced the according macro for USB drivers.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Andrzej Pietrasiewicz [Wed, 9 Jul 2014 10:20:08 +0000 (12:20 +0200)]
usb: gadget: f_fs: OS descriptors support
Add support for OS descriptors. The new format of descriptors is used,
because the "flags" field is required for extensions. os_count gives
the number of OSDesc[] elements.
The format of descriptors is given in include/uapi/linux/usb/functionfs.h.
For extended properties descriptor the usb_ext_prop_desc structure covers
only a part of a descriptor, because the wPropertyNameLength is unknown
up front.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Acked-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Andrzej Pietrasiewicz [Wed, 9 Jul 2014 10:20:07 +0000 (12:20 +0200)]
usb: gadget: u_os_desc: helper functions for accessing ext prop buffer
Provide helper functions to get pointers to particular locations within
a buffer holding an extended properties descriptor.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Andrzej Pietrasiewicz [Wed, 9 Jul 2014 10:20:06 +0000 (12:20 +0200)]
usb: gadget: f_fs: rename descriptor parsing functions
ffs_do_desc() handles one descriptor, while ffs_do_descs() handles a number
of descriptors. The tho names are so similar that it causes confusion.
Rename to reflect their purpose better.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Acked-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Thierry Reding [Mon, 7 Jul 2014 12:06:35 +0000 (14:06 +0200)]
usb: phy: tegra: Do not include asm/mach-types.h
It is no longer needed and keeping it will break 64-bit ARM builds.
Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Apelete Seketeli [Sun, 6 Jul 2014 17:58:03 +0000 (19:58 +0200)]
usb: musb: register nop transceiver driver for jz4740
Following the name change of the NOP transceiver driver in commit
4525bee (usb: phy: rename usb_nop_xceiv to usb_phy_generic), the
transceiver driver was no longer operable under its old name.
Register the transceiver driver before calling usb_get_phy() to make
sure we are noticed by an error message if it is not available.
Signed-off-by: Apelete Seketeli <apelete@seketeli.net>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Ricardo Ribalda Delgado [Fri, 4 Jul 2014 09:27:03 +0000 (11:27 +0200)]
usb: gadget: net2280: Fix typo on #ifdef
Commit
e56e69cc0ff4 ("usb: gadget: net2280: Use pr_* function")
includes a editing mistake on one of the #ifdef.
This patch fixes it.
Reported-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Arnd Bergmann [Wed, 9 Jul 2014 09:24:44 +0000 (11:24 +0200)]
usb: gadget: pxa25x_udc: use correct header for gpio devm_ functions
commit
c63d2225e7be ("usb: gadget: pxa25x_udc: use devm_ functions")
introduced the use of devm_gpio_request in this driver, but did not
correctly include the header file declaring this function, which
causes a build failure.
This changes pxa25x_udc to include linux/gpio.h instead of asm/gpio.h
to fix this.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Himangi Saraogi <himangi774@gmail.com>
Cc: Julia Lawall <julia.lawall@lip6.fr>
Cc: Felipe Balbi <balbi@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Yoshihiro Shimoda [Wed, 9 Jul 2014 11:30:13 +0000 (20:30 +0900)]
usb: renesas_usbhs: gadget: fix re-enabling pipe without re-connecting
This patch fixes an issue that the renesas_usbhs driver in gadget mode
cannot work correctly even if I disabled DMAC of the driver when I used
the g_zero driver and the testusb tool.
When a usb cable is re-connected, the renesas_usbhs driver calls the
usbhsp_flags_init() (via usbhs_hotplug() --> usbhs_mod_call(start) -->
usbhsg_try_start() --> usbhs_pipe_init()). However, the driver doesn't
call the usbhsp_flags_init() when usbhsg_ep_disable() is called.
So, if a gadget driver calls usb_ep_enable() and usb_ep_disable() again
and again, the renesas_usbhs driver will output the following log:
renesas_usbhs renesas_usbhs: can't get pipe (BULK)
renesas_usbhs renesas_usbhs: wrong recip request
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Yoshihiro Shimoda [Wed, 9 Jul 2014 11:30:03 +0000 (20:30 +0900)]
usb: renesas_usbhs: fix usbhs_pipe_malloc() to re-enable a pipe.
This patch fixes an issue that the driver cannot push a new data when
a pipe is re-enabled after the pipe is queued.
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Vasily Khoruzhick [Mon, 30 Jun 2014 19:13:29 +0000 (22:13 +0300)]
usb: gadget: s3c2410: Move to clk_prepare_enable/clk_disable_unprepare
Use clk_prepare_enable/clk_disable_unprepare to make the driver
work properly with common clock framework.
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Daniel Mack [Thu, 19 Jun 2014 22:20:44 +0000 (00:20 +0200)]
usb: musb: cppi41: fire hrtimer according to programmed channel length
The musb/cppi41 code installs a hrtimer to work around DMA completion
interrupts that have fired too early on AM335x hardware. This timer
is currently programmed to first fire 140 microseconds after the DMA
completion callback. According to the commit which introduced it
(
a655f481d83, "usb: musb: musb_cppi41: handle pre-mature TX complete
interrupt"), that value is is considered a 'rule of thumb' that worked
well with the test case described in the commit log.
Test show, however, that for USB audio devices and much smaller packet
sizes, the timer has to fire earlier in order to correctly handle the audio
stream. The original test case had output transfer sizes of 1514 bytes, and
a delay of 140 microseconds. For audio devices with 24 bytes channel size, 3
microseconds seem to work well.
Hence, let's assume that the time it takes to clear the bit correlates with
the number of bytes transferred. The referenced commit log mentions such a
suspicion as well. Let the timer fire in cppi41_channel->total_len/10
microseconds to correctly handle both cases.
Also, shorten the interval in which the timer fires again in case of
a non-empty early_tx list.
With these changes in place, both FS and HS audio devices appear to work
well on AM335x hardware.
Signed-off-by: Daniel Mack <zonque@gmail.com>
Reported-by: Sebastian Reimers <sebastian.reimers@googlemail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Daniel Mack [Thu, 19 Jun 2014 22:20:43 +0000 (00:20 +0200)]
Revert "usb: musb: musb_cppi41: Handle ISOCH differently and not use the hrtimer."
This reverts commit
1af54b7a4.
The commit tried to address cases in which isochronous transfers are 'not
reliable', most probably in the tests conducted, polling for the
MUSB_TXCSR_TXPKTRDY bit in MUSB_TXCSR is done too late.
Hence, it installs a work struct which basically busy-polls for the bit in a
rather agressive way by rescheduling the work if the FIFO is not empty. With
USB audio devices, tests have shown that it takes approximately 100
iterations of the asynchronous worker until the FIFO signals completion,
which leads to 100% CPU loads when streaming audio.
The issue the patch tried to address can be handled differently, which is
what the next patch does.
Signed-off-by: Daniel Mack <zonque@gmail.com>
Reported-by: Sebastian Reimers <sebastian.reimers@googlemail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Daniel Mack [Mon, 26 May 2014 12:52:40 +0000 (14:52 +0200)]
usb: musb: fix wrong indentation in musb_host.c
Just a cosmetic cleanup with no functional change.
Signed-off-by: Daniel Mack <zonque@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Daniel Mack [Mon, 26 May 2014 12:52:39 +0000 (14:52 +0200)]
usb: musb/cppi41: call musb_ep_select() before accessing an endpoint's CSR
Before accessing any of an endpoint's CSR registers, make sure the
correct endpoint is selected. Otherwise, data read from or written to
the registers is likely to affect the wrong endpoint as long as the
connected device has more than one endpoint.
This, of course, leads to all sorts of strange effects such as stream
starvation and driver internal state machine confusion due to spurious
interrupts.
Signed-off-by: Daniel Mack <zonque@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Daniel Mack [Mon, 26 May 2014 12:52:38 +0000 (14:52 +0200)]
usb: musb: introduce dma_channel.rx_packet_done
The musb/cppi41 glue layer is capable of handling transactions that span
over more than one USB packet by reloading the DMA descriptors
partially. An urb is considered completed when either its transfer
buffer has been filled entirely (actual_length ==
transfer_buffer_length) or if a packet in the stream has less bytes than
the endpoint's wMaxPacketSize.
Once one of the above conditions is met, musb_dma_completion() is called
from cppi41_trans_done(). However, the final decision whether or not to
return the urb to its owner is made by the core and its determination of
the variable 'done' in musb_host_rx(). This code has currently no way of
knowing what the size of the last packet was, and whether or not to
give back the urb due to a short read.
Fix this by introducing a new boolean flag in 'struct dma_channel', and
set it from musb_cppi41.c. If set, it will make the core do what the
DMA layer decided and complete the urb.
Signed-off-by: Daniel Mack <zonque@gmail.com>
Acked-by: George Cherian <george.cherian@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Daniel Mack [Mon, 26 May 2014 12:52:37 +0000 (14:52 +0200)]
usb: musb: fix bit mask for CSR in musb_h_tx_flush_fifo()
The datasheet says that MUSB_TXCSR_FLUSHFIFO is only valid when
MUSB_TXCSR_TXPKTRDY is set as well.
With this patch applied, the warning in this function does no longer
kick in when an USB soundcard is unplugged while the stream is active.
Signed-off-by: Daniel Mack <zonque@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Daniel Mack [Mon, 26 May 2014 12:52:36 +0000 (14:52 +0200)]
usb: musb: use is_host_active() to distinguish between host and gadget mode
On AM33xx platforms, unplugging a device in the middle of an active
transfer leads to a drop of MUSB_DEVCTL_HM in MUSB_DEVCTL before the
system is informed about a disconnect. This consequently makes the musb
core call the gadget code to handle the interrupt request, which then
crashes the kernel because the relevant pointers haven't been set up
for gadget mode.
To fix this, use is_host_active() rather than (devctl & MUSB_DEVCTL_HM)
in musb_interrupt() and musb_dma_completion() to detect whether the
controller is in host or peripheral mode. This information is provided
by the driver logic and does not rely on register contents.
Signed-off-by: Daniel Mack <zonque@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Daniel Mack [Mon, 26 May 2014 12:52:35 +0000 (14:52 +0200)]
usb: musb: remove unnecessary (void) prefix at function calls
Just a little cleanup that removes unnecessary casts.
Signed-off-by: Daniel Mack <zonque@gmail.com>
Acked-by: George Cherian <george.cherian@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Krzysztof Opasiak [Wed, 21 May 2014 12:05:35 +0000 (14:05 +0200)]
usb: gadget: FunctionFS: Return -ENOENT instead of -ENODEV when device not found.
Syscall mount returns -ENODEV error if requested FS type
has not been found. Returning the same error from FFS mount
callback makes value returned to userspace misleading.
Other file systems returns -ENOENT if requested device
has not been found. Adjust FFS to this convention to make
error codes meaningfull.
Acked-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Peter Chen [Wed, 21 May 2014 01:04:21 +0000 (09:04 +0800)]
usb: gadget: omap_udc: should not call gadget driver's .unbind
It has already been covered by udc core
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Peter Chen [Wed, 21 May 2014 01:04:20 +0000 (09:04 +0800)]
usb: gadget: net2272: do not need to judge gadget driver's .unbind
It has already been covered by udc core, besides, we do not
need unbind at .udc_start
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Peter Chen [Wed, 21 May 2014 01:04:19 +0000 (09:04 +0800)]
usb: gadget: m66592-udc: should not call gadget driver's .unbind
It has already been covered by udc core
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Peter Chen [Wed, 21 May 2014 01:04:18 +0000 (09:04 +0800)]
usb: gadget: fusb300_udc: should not call gadget driver's .unbind
It has already been covered by udc core
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Peter Chen [Wed, 21 May 2014 01:04:17 +0000 (09:04 +0800)]
usb: gadget: fsl_udc_core: should not call gadget driver's .unbind
It has already been covered by udc core
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Srinivas Kandagatla [Mon, 30 Jun 2014 17:29:49 +0000 (18:29 +0100)]
usb: phy: msm: Make phy_reset clk and reset line optional.
This patch makes the phy reset clk and reset line optional as this clk
is not available on boards like IFC6410 with APQ8064.
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Robert Jarzmik [Sun, 29 Jun 2014 14:01:10 +0000 (16:01 +0200)]
usb: gadget: pxa27x_udc: prepare and unprepare the clock
Add clock prepare and unprepare as required by clock framework.
Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Robert Baldyga [Wed, 25 Jun 2014 06:26:49 +0000 (08:26 +0200)]
tools: ffs-aio-example: add license information
Add missing information about license. Some people will probably want to
reuse this code in their projects released under variety of licenses. For this
reason this example is under Public Domain license to avoid GPL limitations.
Acked-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Robert Baldyga <r.baldyga@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Robert Baldyga [Wed, 25 Jun 2014 06:26:48 +0000 (08:26 +0200)]
tools: ffs-aio-example: convert to new descriptor format
Since commit [
ac8dde11: “Add flags to descriptors block”] functionfs
supports a new descriptor format, so we update example application
to make it using recomended version of descriptors.
Acked-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Robert Baldyga <r.baldyga@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Robert Baldyga [Wed, 25 Jun 2014 06:26:47 +0000 (08:26 +0200)]
tools: ffs-aio-example: fix header values endianess
We wrap numeric values of fs_count and hs_count fields in htole32,
because they should be in little-endian format.
Acked-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Robert Baldyga <r.baldyga@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Ricardo Ribalda Delgado [Tue, 20 May 2014 16:30:12 +0000 (18:30 +0200)]
usb: gadget: net2280: Use quirks instead of pci id
Use of quirks improve readability and will be easier to add new devices
to this driver.
Suggested-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Ricardo Ribalda Delgado [Tue, 20 May 2014 16:30:11 +0000 (18:30 +0200)]
usb: gadget: net2280: Use pr_* function
Driver was using custom functions WARNING, ERROR, DEBUG, instead of
pr_err, pr_dgb...
New ep_* macros have been created that use standard pr_* functions.
Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Ricardo Ribalda Delgado [Tue, 20 May 2014 16:30:10 +0000 (18:30 +0200)]
usb: gadget: net2280: Code Cleanup
- Move logical continuations to end of line
- Improve spacing
Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Ricardo Ribalda Delgado [Tue, 20 May 2014 16:30:09 +0000 (18:30 +0200)]
usb: gadget: net2280: Pass checkpacth.pl test
Fix Code Style using checkpatch.pl criteria
Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Ricardo Ribalda Delgado [Tue, 20 May 2014 16:30:08 +0000 (18:30 +0200)]
usb: gadget: net2280: Refactor queues_show
Replace a long and ugly expresion with an already available function.
Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Ricardo Ribalda Delgado [Tue, 20 May 2014 16:30:07 +0000 (18:30 +0200)]
usb: gadget: net2280: Use module_pci_driver macro
Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Ricardo Ribalda Delgado [Tue, 20 May 2014 16:30:06 +0000 (18:30 +0200)]
usb: gadget: net2280: Use true/false instead of 1/0
For bool variables
Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Ricardo Ribalda Delgado [Tue, 20 May 2014 16:30:05 +0000 (18:30 +0200)]
usb: gadget: net2280: Use BIT() macro
Improves readability of the code
Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Ricardo Ribalda Delgado [Tue, 20 May 2014 16:30:04 +0000 (18:30 +0200)]
usb: gadget: net2280: Dont use magic numbers
Instead of using magic numbers use #defines
Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Ricardo Ribalda Delgado [Tue, 20 May 2014 16:30:03 +0000 (18:30 +0200)]
usb: gadget: net2280: Add support for PLX USB338X
This patch adds support for the PLX USB3380 and USB3382.
This driver is based on the driver from the manufacturer.
Since USB338X is register compatible with NET2280, I thought that it
would be better to include this hardware into net2280 driver.
Manufacturer's driver only supported the USB33X, did not follow the
Kernel Style and contain some trivial errors. This patch has tried to
address this issues.
This patch has only been tested on USB338x hardware, but the merge has
been done trying to not affect the behaviour of NET2280.
Tested-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Peter Chen [Sun, 18 May 2014 07:19:07 +0000 (15:19 +0800)]
usb: gadget: r8a66597-udc: delete __init marker for probe
The probe function may be probed deferal and called after .init
section has freed.
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Peter Chen [Sun, 18 May 2014 07:19:06 +0000 (15:19 +0800)]
usb: gadget: fusb300_udc: delete __init marker for probe
The probe function may be probed deferal and called after .init
section has freed.
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Peter Chen [Sun, 18 May 2014 07:19:05 +0000 (15:19 +0800)]
usb: gadget: m66592-udc: delete __init marker for probe
The probe function may be probed deferal and called after .init
section has freed.
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Peter Chen [Sun, 18 May 2014 07:19:04 +0000 (15:19 +0800)]
usb: gadget: lpc32xx: delete __init marker for probe
The probe function may be probed deferal and called after .init
section has freed.
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Peter Chen [Sun, 18 May 2014 07:19:03 +0000 (15:19 +0800)]
usb: gadget: fsl_udc_core: delete __init marker for probe
The probe function may be probed deferal and called after .init
section has freed.
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Peter Chen [Sun, 18 May 2014 07:19:02 +0000 (15:19 +0800)]
usb: gadget: atmel_usba_udc: delete __init marker for probe
The probe function may be probed deferal and called after .init
section has freed.
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Paul Zimmerman [Fri, 23 May 2014 18:39:24 +0000 (11:39 -0700)]
usb: dwc3: add support for USB 2.0-only core configuration
Newer DWC3 controllers can be built for USB 2.0-only mode, where
most of the USB 3.0 circuitry is left out. To support this mode,
the driver must limit the speed programmed into the DCFG register
to Hi-Speed or lower.
Reads and writes to the PIPECTL register are left as-is, since
they should be no-ops in USB 2.0-only mode. Calls to phy_init()
etc. for the USB3 phy are also left as-is, since the no-op USB3
phy should be used for USB 2.0-only mode controllers.
Signed-off-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
George Cherian [Mon, 26 May 2014 09:20:10 +0000 (14:50 +0530)]
usb: musb: dsps: Call usb_phy(_shutdown/_init) during musb_platform_reset()
For DSPS platform usb_phy_vbus(_off/_on) are NOPs.
So during musb_platform_reset() call usb_phy(_shutdown/_init)
Signed-off-by: George Cherian <george.cherian@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Benoit Taine [Mon, 26 May 2014 15:21:20 +0000 (17:21 +0200)]
usb: gadget: Use kmemdup instead of kmalloc + memcpy
This issue was reported by coccicheck using the semantic patch
at scripts/coccinelle/api/memdup.cocci
Signed-off-by: Benoit Taine <benoit.taine@lip6.fr>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Rickard Strandqvist [Sun, 1 Jun 2014 13:48:12 +0000 (15:48 +0200)]
usb: musb: musb_host.c: Cleaning up uninitialized variables
There is a risk that the variable will be used without being initialized.
This was largely found by using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Himangi Saraogi [Sun, 1 Jun 2014 20:43:21 +0000 (02:13 +0530)]
usb: musb: backfin: Introduce the use of the managed version of kzalloc
This patch moves data allocated using kzalloc to managed data allocated
using devm_kzalloc and cleans now unnecessary kfrees in probe and remove
functions. Also, a label is done away with and err2 and err3 renamed.
The following Coccinelle semantic patch was used for making the change:
@platform@
identifier p, probefn, removefn;
@@
struct platform_driver p = {
.probe = probefn,
.remove = removefn,
};
@prb@
identifier platform.probefn, pdev;
expression e, e1, e2;
@@
probefn(struct platform_device *pdev, ...) {
<+...
- e = kzalloc(e1, e2)
+ e = devm_kzalloc(&pdev->dev, e1, e2)
...
?-kfree(e);
...+>
}
@rem depends on prb@
identifier platform.removefn;
expression e;
@@
removefn(...) {
<...
- kfree(e);
...>
}
Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Himangi Saraogi [Mon, 2 Jun 2014 15:45:05 +0000 (21:15 +0530)]
usb: musb: tusb6010: Introduce the use of the managed version of kzalloc
This patch moves data allocated using kzalloc to managed data allocated
using devm_kzalloc and cleans now unnecessary kfrees in probe and remove
functions. Also, the unnecesary labels are removed and linux/device.h is
added to make sure the devm_*() routine declarations are unambiguously
available.
The following Coccinelle semantic patch was used for making the change:
@platform@
identifier p, probefn, removefn;
@@
struct platform_driver p = {
.probe = probefn,
.remove = removefn,
};
@prb@
identifier platform.probefn, pdev;
expression e, e1, e2;
@@
probefn(struct platform_device *pdev, ...) {
<+...
- e = kzalloc(e1, e2)
+ e = devm_kzalloc(&pdev->dev, e1, e2)
...
?-kfree(e);
...+>
}
@rem depends on prb@
identifier platform.removefn;
expression e;
@@
removefn(...) {
<...
- kfree(e);
...>
}
Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Himangi Saraogi [Mon, 2 Jun 2014 16:26:01 +0000 (21:56 +0530)]
usb: musb: davinci: use devm_ functions.
This patch moves data allocated using kzalloc to managed data allocated
using devm_kzalloc and cleans now unnecessary kfrees in probe and remove
functions. Also, a label is done away with and clk_get is replaced by it
corresponding devm version and the clk_puts are done away with. The
labels are renamed to make them ordered.
The following Coccinelle semantic patch was used for making the change:
@platform@
identifier p, probefn, removefn;
@@
struct platform_driver p = {
.probe = probefn,
.remove = removefn,
};
@prb@
identifier platform.probefn, pdev;
expression e, e1, e2;
@@
probefn(struct platform_device *pdev, ...) {
<+...
- e = kzalloc(e1, e2)
+ e = devm_kzalloc(&pdev->dev, e1, e2)
...
?-kfree(e);
...+>
}
@rem depends on prb@
identifier platform.removefn;
expression e;
@@
removefn(...) {
<...
- kfree(e);
...>
}
Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Himangi Saraogi [Tue, 3 Jun 2014 21:19:53 +0000 (02:49 +0530)]
usb: phy: phy-gpio-vbus-usb: use devm_ functions
The various devm_ functions allocate memory that is released when a
driver detaches. This patch uses devm_kzalloc, devm_request_irq,
devm_gpio_request, devm_regulator_get etc. for data that is
allocated in the probe function of a platform device and is only
freed in the remove function. The corresponding free functions are
removed and the labels are done away with.
Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Vivek Gautam [Wed, 4 Jun 2014 09:04:52 +0000 (14:34 +0530)]
usb: dwc3: Keeping 'resource' related code together
Putting together the code related to getting the 'IORESOURCE_MEM'
and assigning the same to dwc->xhci_resources, for increasing
the readability.
Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Himangi Saraogi [Sat, 14 Jun 2014 15:18:27 +0000 (20:48 +0530)]
usb: gadget: fsl_qe_udc: Introduce use of managed version of kzalloc
This patch moves data allocated using kzalloc to managed data allocated
using devm_kzalloc and cleans now unnecessary kfrees in probe and remove
functions. Also, the unnecesary labels are removed and some labels are
renamed to preserve ordering.
The following Coccinelle semantic patch was used for making the change:
@platform@
identifier p, probefn, removefn;
@@
struct platform_driver p = {
.probe = probefn,
.remove = removefn,
};
@prb@
identifier platform.probefn, pdev;
expression e, e1, e2;
@@
probefn(struct platform_device *pdev, ...) {
<+...
- e = kzalloc(e1, e2)
+ e = devm_kzalloc(&pdev->dev, e1, e2)
...
?-kfree(e);
...+>
}
@rem depends on prb@
identifier platform.removefn;
expression e;
@@
removefn(...) {
<...
- kfree(e);
...>
}
Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Ben Dooks [Tue, 17 Jun 2014 15:15:01 +0000 (16:15 +0100)]
usb: gadget: r8a66597-udc: remove now unused clean_up and clean_up3 label.
With the devm additions, the clean_up and clean_up3 are now
not needed or used. Change clean_up3 and make everything use
clean_up2 and just remove clean_up.
Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Ben Dooks [Tue, 17 Jun 2014 15:15:00 +0000 (16:15 +0100)]
usb: gadget: r8a66597-udc: use devm_request_irq() to get device irq
Use the devm_request_irq() call to get the interrupt for the
device and have it automatically free on exit.
Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Ben Dooks [Tue, 17 Jun 2014 15:14:59 +0000 (16:14 +0100)]
usb: gadget: r8a66597-udc: use devm_clk_get() to get clock
Change to using the devm_clk_get() to get the clock and
have it automatically freed on exit.
Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Ben Dooks [Tue, 17 Jun 2014 15:14:58 +0000 (16:14 +0100)]
usb: gadget: r8a66597-udc: cleanup error path
With the updates for devm, the cleanup path no longer needs to
check for NULL device state, so remove it and return directly
if the irq resource missing
Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Ben Dooks [Tue, 17 Jun 2014 15:14:57 +0000 (16:14 +0100)]
usb: gadget: r8a66597-udc: handle sudmac registers with devm_ioremap_resource()
Change the sudmac register handling in the devm_ioremap_resource
to use the devm variant.
Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Ben Dooks [Tue, 17 Jun 2014 15:14:56 +0000 (16:14 +0100)]
usb: gadget: r8a66597-udc: use devm_kzalloc() to allocate driver state
Update driver to use devm_kzalloc() to make tracking of resources
easier. Also remove the exit point via cleanup as there's no
cleanup necessary from this point now.
As a note, also removes the error print as the allocation calls
produce errors if they do not return memory.
Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Ben Dooks [Tue, 17 Jun 2014 15:14:55 +0000 (16:14 +0100)]
usb: gadget: r8a66597-udc: keep dev as reference to &pdev->dev
Remove usages of &pdev->dev in the driver probe function
with just dev to make the references to it easier to
write. Convert all the current users of it to use it.
Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Ben Dooks [Tue, 17 Jun 2014 15:14:54 +0000 (16:14 +0100)]
usb: gadget: r8a66597-udc: use devm_ioremap_resource() for registers
trivial patch removing boilerplate clode.
Signed-off-by: Felipe Balbi <balbi@ti.com>
Jingoo Han [Wed, 18 Jun 2014 04:41:39 +0000 (13:41 +0900)]
usb: gadget: lpc32xx_udc: Make of_device_id array const
Make of_device_id array const, because all OF functions handle
it as const.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Jingoo Han [Wed, 18 Jun 2014 04:40:31 +0000 (13:40 +0900)]
usb: gadget: gr_udc: Make of_device_id array const
Make of_device_id array const, because all OF functions handle
it as const.
Acked-by: Andreas Larsson <andreas@gaisler.com>
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Jingoo Han [Wed, 18 Jun 2014 04:43:50 +0000 (13:43 +0900)]
usb: phy: tegra: Make of_device_id array const
Make of_device_id array const, because all OF functions handle
it as const.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Jingoo Han [Wed, 18 Jun 2014 04:42:44 +0000 (13:42 +0900)]
usb: phy: msm: Make of_device_id array const
Make of_device_id array const, because all OF functions handle
it as const.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Himangi Saraogi [Fri, 20 Jun 2014 20:40:25 +0000 (02:10 +0530)]
usb: musb: ux500: use devm_ functions
This patch introduces the use of managed interfaces for clk_get and
kzalloc and removes the corresponding free function calls in the probe
and remove functions.
Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Himangi Saraogi [Sun, 22 Jun 2014 07:17:51 +0000 (12:47 +0530)]
usb: gadget: pxa25x_udc: use devm_ functions
This patch introduces the use of devm_request_irq, devm_gpio_request,
devm_clk_get etc. instead of the corresponding unmanaged interfaces. The
calls to the functions like free_irq to free the allocated resources are
removed as they are no longer required. Some labels in the probe function
are also done away with and the name of the label err_gpio_pullup is
changed to make it less specific to the context.
Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Lothar Waßmann [Mon, 30 Jun 2014 11:17:26 +0000 (13:17 +0200)]
usb: musb: dsps: coding style cleanup
There is no reason for the register accessor functions not to adhere
to the CodingStyle rules.
Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Linus Torvalds [Sun, 29 Jun 2014 21:11:36 +0000 (14:11 -0700)]
Linux 3.16-rc3
Linus Torvalds [Sun, 29 Jun 2014 20:40:08 +0000 (13:40 -0700)]
Merge branch 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm
Pull ARM fixes from Russell King:
"Another round of ARM fixes. The largest change here is the L2 changes
to work around problems for the Armada 37x/380 devices, where most of
the size comes down to comments rather than code.
The other significant fix here is for the ptrace code, to ensure that
rewritten syscalls work as intended. This was pointed out by Kees
Cook, but Will Deacon reworked the patch to be more elegant.
The remainder are fairly trivial changes"
* 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm:
ARM: 8087/1: ptrace: reload syscall number after secure_computing() check
ARM: 8086/1: Set memblock limit for nommu
ARM: 8085/1: sa1100: collie: add top boot mtd partition
ARM: 8084/1: sa1100: collie: revert back to cfi_probe
ARM: 8080/1: mcpm.h: remove unused variable declaration
ARM: 8076/1: mm: add support for HW coherent systems in PL310 cache
Randy Dunlap [Sat, 28 Jun 2014 01:28:56 +0000 (18:28 -0700)]
MAINTAINERS: exceptions for Documentation maintainer
Note that I don't maintain Documentation/ABI/,
Documentation/devicetree/, or the language translation files.
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Dan Carpenter [Sat, 28 Jun 2014 01:28:46 +0000 (18:28 -0700)]
Documentation: add section about git to email-clients.txt
These days most people use git to send patches so I have added a section
about that.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Will Deacon [Fri, 27 Jun 2014 16:01:47 +0000 (17:01 +0100)]
ARM: 8087/1: ptrace: reload syscall number after secure_computing() check
On the syscall tracing path, we call out to secure_computing() to allow
seccomp to check the syscall number being attempted. As part of this, a
SIGTRAP may be sent to the tracer and the syscall could be re-written by
a subsequent SET_SYSCALL ptrace request. Unfortunately, this new syscall
is ignored by the current code unless TIF_SYSCALL_TRACE is also set on
the current thread.
This patch slightly reworks the enter path of the syscall tracing code
so that we always reload the syscall number from
current_thread_info()->syscall after the potential ptrace traps.
Acked-by: Kees Cook <keescook@chromium.org>
Tested-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Laura Abbott [Fri, 27 Jun 2014 09:17:27 +0000 (10:17 +0100)]
ARM: 8086/1: Set memblock limit for nommu
Commit
1c2f87c (ARM: 8025/1: Get rid of meminfo) changed find_limits
to use memblock_get_current_limit for calculating the max_low pfn.
nommu targets never actually set a limit on memblock though which
means memblock_get_current_limit will just return the default
value. Set the memblock_limit to be the end of DDR to make sure
bounds are calculated correctly.
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Andrea Adami [Wed, 25 Jun 2014 21:32:26 +0000 (22:32 +0100)]
ARM: 8085/1: sa1100: collie: add top boot mtd partition
The CFI mapping is now perfect so we can expose the top block, read only.
There isn't much to read, though, just the sharpsl_params values.
Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Andrea Adami [Wed, 25 Jun 2014 21:31:15 +0000 (22:31 +0100)]
ARM: 8084/1: sa1100: collie: revert back to cfi_probe
Reverts commit
d26b17edafc45187c30cae134a5e5429d58ad676
ARM: sa1100: collie.c: fall back to jedec_probe flash detection
Unfortunately the detection was challenged on the defective unit used for tests:
one of the NOR chips did not respond to the CFI query.
Moreover that bad device needed extra delays on erase-suspend/resume cycles.
Tested personally on 3 different units and with feedback of two other users.
Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Nicolas Pitre [Thu, 19 Jun 2014 21:57:01 +0000 (22:57 +0100)]
ARM: 8080/1: mcpm.h: remove unused variable declaration
The sync_phys variable has been replaced by link time computation in
mcpm_head.S before the code was submitted upstream.
Signed-off-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Thomas Petazzoni [Fri, 13 Jun 2014 09:58:38 +0000 (10:58 +0100)]
ARM: 8076/1: mm: add support for HW coherent systems in PL310 cache
When a PL310 cache is used on a system that provides hardware
coherency, the outer cache sync operation is useless, and can be
skipped. Moreover, on some systems, it is harmful as it causes
deadlocks between the Marvell coherency mechanism, the Marvell PCIe
controller and the Cortex-A9.
To avoid this, this commit introduces a new Device Tree property
'arm,io-coherent' for the L2 cache controller node, valid only for the
PL310 cache. It identifies the usage of the PL310 cache in an I/O
coherent configuration. Internally, it makes the driver disable the
outer cache sync operation.
Note that technically speaking, a fully coherent system wouldn't
require any of the other .outer_cache operations. However, in
practice, when booting secondary CPUs, these are not yet coherent, and
therefore a set of cache maintenance operations are necessary at this
point. This explains why we keep the other .outer_cache operations and
only ->sync is disabled.
While in theory any write to a PL310 register could cause the
deadlock, in practice, disabling ->sync is sufficient to workaround
the deadlock, since the other cache maintenance operations are only
used in very specific situations.
Contrary to previous versions of this patch, this new version does not
simply NULL-ify the ->sync member, because the l2c_init_data
structures are now 'const' and therefore cannot be modified, which is
a good thing. Therefore, this patch introduces a separate
l2c_init_data instance, called of_l2c310_coherent_data.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>