Eric Anholt [Mon, 27 Feb 2017 20:11:41 +0000 (12:11 -0800)]
drm/vc4: Convert existing documentation to actual kerneldoc.
I'm going to hook vc4 up to the sphinx build, so clean up its comments
to not generate warnings when we do.
Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20170227201144.10970-2-eric@anholt.net
(cherry picked from commit
72f793f14afcec9697fadb8cd4e5d33327b108cd)
Phil Elwell [Tue, 6 Feb 2018 11:48:17 +0000 (11:48 +0000)]
BCM270X_DT: Minor cosmetic DT tidy
Deleting the timer node for all bcm27* DTBs than re-adding an identical
one for bcm2708 is wrong - just delete it where it isn't wanted.
Also change a #include to match the style of similar includes.
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
Phil Elwell [Mon, 5 Feb 2018 10:37:54 +0000 (10:37 +0000)]
config: Add SND_USB_HIFACE=m
See: https://github.com/raspberrypi/linux/issues/2368
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
Phil Elwell [Mon, 5 Feb 2018 09:35:01 +0000 (09:35 +0000)]
mmc: bcm2835-sdhost: Add include
highmem.h (needed for kmap_atomic) is pulled in by one of the other
include files, but only with some CONFIG settings. Make the inclusion
explicit to cater for cases where the CONFIG setting is absent.
See: https://github.com/raspberrypi/linux/issues/2366
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
Thierry Reding [Fri, 1 Sep 2017 14:49:54 +0000 (16:49 +0200)]
drm/vc4: Use correct path to trace include
The header comment in include/trace/define_trace.h specifies that the
TRACE_INCLUDE_PATH needs to be relative to the define_trace.h header
rather than the trace file including it. Most instances get that wrong
and work around it by adding the $(src) directory to the include path.
While this works, it is preferable to refer to the correct path to the
trace file in the first place and avoid any workaround.
Acked-by: Christian König <christian.koenig@amd.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20170901144954.19620-6-thierry.reding@gmail.com
(cherry picked from commit
ff58a15a502a900c35ff2f20182249b65719d6d7)
Phil Elwell [Wed, 24 Jan 2018 20:00:48 +0000 (20:00 +0000)]
overlays: Allow multiple pps-gpio instantiations
See: https://github.com/raspberrypi/linux/issues/2352
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
Phil Elwell [Wed, 24 Jan 2018 15:19:39 +0000 (15:19 +0000)]
lan78xx: Avoid spurious kevent 4 "error"
lan78xx_defer_event generates an error message whenever the work item
is already scheduled. lan78xx_open defers three events -
EVENT_STAT_UPDATE, EVENT_DEV_OPEN and EVENT_LINK_RESET. Being aware
of the likelihood (or certainty) of an error message, the DEV_OPEN
event is added to the set of pending events directly, relying on
the subsequent deferral of the EVENT_LINK_RESET call to schedule the
work. Take the same precaution with EVENT_STAT_UPDATE to avoid a
totally unnecessary error message.
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
Phil Elwell [Tue, 23 Jan 2018 16:52:45 +0000 (16:52 +0000)]
irqchip: irq-bcm2836: Remove regmap and syscon use
The syscon node defines a register range that duplicates that used by
the local_intc node on bcm2836/7. Since irq-bcm2835 and irq-bcm2836 are
built in and always present together (both drivers are enabled by
CONFIG_ARCH_BCM2835), it is possible to replace the syscon usage with a
global variable that simplifies the code. Doing so does lose the
locking provided by regmap, but as only one side is using the regmap
interface (irq-bcm2835 uses readl and write) there is no loss of
atomicity.
See: https://github.com/raspberrypi/firmware/issues/926
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
Phil Elwell [Mon, 22 Jan 2018 17:26:38 +0000 (17:26 +0000)]
serial: 8250: bcm2835aux - suppress EPROBE_DEFER
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
Phil Elwell [Mon, 22 Jan 2018 12:22:01 +0000 (12:22 +0000)]
mmc: bcm2835-mmc: Support underclocking
Support underclocking of the SD bus using the max-frequency DT property
(which currently has no DT parameter). The sd_overclock parameter
already provides another way to achieve the same thing which should be
equivalent in end result, but it is a bug not to support max-frequency
as well.
See: https://github.com/raspberrypi/linux/issues/2350
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
Phil Elwell [Mon, 22 Jan 2018 12:17:27 +0000 (12:17 +0000)]
mmc: bcm2835-sdhost: Support underclocking
Support underclocking of the SD bus in two ways:
1. using the max-frequency DT property (which currently has no DT
parameter), and
2. using the exiting sd_overclock parameter.
The two methods differ slightly - in the former the MMC subsystem is
aware of the underclocking, while in the latter it isn't - but the
end results should be the same.
See: https://github.com/raspberrypi/linux/issues/2350
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
Yevhen Kyriukha [Sun, 14 Jan 2018 11:36:24 +0000 (13:36 +0200)]
Added support for mbed AudioCODEC (TLV320AIC23B)
Signed-off-by: Yevhen Kyriukha <kirgene@gmail.com>
Ahmet Inan [Fri, 1 Sep 2017 13:18:01 +0000 (15:18 +0200)]
overlays: Add EETI EXC3000 overlay
Add support for I2C connected EETI EXC3000 multiple touch controller
using GPIO 4 (pin 7 on GPIO header) for interrupt.
Signed-off-by: Ahmet Inan <inan@aicodix.de>
Ahmet Inan [Fri, 1 Sep 2017 13:14:23 +0000 (15:14 +0200)]
config: Add EETI EXC3000 touch controller module
Signed-off-by: Ahmet Inan <inan@aicodix.de>
Ahmet Inan [Sat, 14 Oct 2017 17:10:53 +0000 (10:10 -0700)]
Input: add I2C attached EETI EXC3000 multi touch driver
commit
7e577a17f2eefeef32f1106ebf91e7cd143ba654 upstream.
beware: code adapted to use the old timer API.
The 3000 series have a new protocol which allows to report up to 5 points
in a single 66 byte frame. One must always read in 66 byte frames.
To support up to 10 points, two consecutive frames need to be read:
The first frame says how many points until sync.
The second frame must say zero points or both frames must be discarded.
To be able to work with the higher 400KHz I2C bus rate, one must
successfully send a special package prior _each_ read or the controller
will refuse to cooperate.
This is a minimal implementation based on egalax_i2c.c (which can be found
on the internet) and egalax_ts.c but without the vendor interface and no
power management support.
Signed-off-by: Ahmet Inan <inan@distec.de>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Phil Elwell [Tue, 16 Jan 2018 12:59:17 +0000 (12:59 +0000)]
overlays: Fix resetgpio and ledgpio for hy28a/b
Offsets for overlay parameters are specified in bytes, not in access
units.
See: https://github.com/raspberrypi/linux/issues/2344
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
Phil Elwell [Fri, 12 Jan 2018 09:15:01 +0000 (09:15 +0000)]
overlays: Add uart0 overlay to change pin usage
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
Aaron Shaw [Fri, 5 Jan 2018 15:08:37 +0000 (15:08 +0000)]
add additional overrides to rotary-encoder overlay (#2334)
Aaron Shaw [Thu, 4 Jan 2018 15:02:16 +0000 (15:02 +0000)]
add gpio-key overlay (#2329)
An overlay that allows a Linux key to be bound to a GPIO.
penfold42 [Mon, 1 Jan 2018 13:15:19 +0000 (00:15 +1100)]
Add overlay for mcp3202 12 bit ADC
Aaron Shaw [Thu, 28 Dec 2017 17:34:54 +0000 (17:34 +0000)]
add backlight control to media-center overlay
Aaron Shaw [Thu, 28 Dec 2017 17:31:52 +0000 (17:31 +0000)]
add backlight control to rpi-display overlay
Aaron Shaw [Sun, 24 Dec 2017 21:57:05 +0000 (21:57 +0000)]
add media center hat overlay (#2313)
overlays: Add media center HAT overlay
Alex Riesen [Thu, 21 Dec 2017 08:29:39 +0000 (09:29 +0100)]
Add Raspberry Pi firmware driver to the dependencies of backlight driver
Otherwise the backlight driver fails to build if the firmware
loading driver is not in the kernel
Signed-off-by: Alex Riesen <alexander.riesen@cetitec.com>
Phil Elwell [Tue, 12 Dec 2017 12:12:46 +0000 (12:12 +0000)]
staging: vchiq_arm: Make debugfs failure non-fatal
It can be useful to be able to open multiple vchiq instances in a
single process. This currently fails due to a debugfs collision,
so make such a failure non-fatal.
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
Phil Elwell [Sat, 9 Dec 2017 21:45:12 +0000 (21:45 +0000)]
overlays: Add applepi-dac overlay
See: https://github.com/raspberrypi/linux/issues/2302
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
Gottfried Haider [Tue, 26 Sep 2017 11:59:51 +0000 (11:59 +0000)]
pwm: Set class for exported channels in sysfs
Notifications for devices without bus or class set get dropped by
dev_uevent_filter(). Adding the class to the exported child matches
what the GPIO subsystem is doing.
With this change exporting a channel triggers a udev event, which
gives userspace a chance to fixup permissions and makes it possible
for non-root users to make use of the PWM subsystem.
Signed-off-by: Gottfried Haider <gottfried.haider@gmail.com>
CC: Thierry Reding <thierry.reding@gmail.com>
CC: H Hartley Sweeten <hsweeten@visionengravers.com>
CC: linux-pwm@vger.kernel.org
CC: linux-arm-kernel@lists.infradead.org
CC: linux-rpi-kernel@lists.infradead.org
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Giedrius Trainavicius [Mon, 24 Oct 2016 22:47:20 +0000 (01:47 +0300)]
Updates for Pisound module code:
* Merged 'Fix a warning in DEBUG builds' (
1c8b82b).
* Updating some strings and copyright information.
* Fix for handling high load of MIDI input and output.
* Use dual rate oversampling ratio for 96kHz instead of single
rate one.
Signed-off-by: Giedrius Trainavicius <giedrius@blokas.io>
Phil Elwell [Thu, 30 Nov 2017 09:04:07 +0000 (09:04 +0000)]
config: Add GPIO_PCF857X=m
The PCF8574 & 5 are I2C-connected 8- & 16-bit GPIO expanders.
See: https://github.com/raspberrypi/linux/issues/2294
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
Phil Elwell [Tue, 17 Oct 2017 14:04:29 +0000 (15:04 +0100)]
lan78xx: Enable LEDs if no valid EEPROM or OTP
For applications of the LAN78xx that don't have valid programmed
EEPROMs or OTPs, enabling both LEDs by default seems reasonable.
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
Phil Elwell [Tue, 28 Nov 2017 12:02:37 +0000 (12:02 +0000)]
lan78xx: Correctly indicate invalid OTP
lan78xx_read_otp tries to return -EINVAL in the event of invalid OTP
content, but the value gets overwritten before it is returned and the
read goes ahead anyway. Make the read conditional as it should be
and preserve the error code.
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
Phil Elwell [Fri, 21 Jul 2017 10:30:18 +0000 (11:30 +0100)]
lan78xx: Read MAC address from DT if present
There is a standard mechanism for locating and using a MAC address from
the Device Tree. Use this facility in the lan78xx driver to support
applications without programmed EEPROM or OTP.
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
Phil Elwell [Mon, 27 Nov 2017 17:29:08 +0000 (17:29 +0000)]
cgroup: Retain support for cgroup_memory=1
As part of a misguided fix for the automatic disabling of cgroup
memory, a new kernel parameter "cgroup_memory" was added. This
extra parameter is unnecessary now that implicit memory cgroup
disabling works correctly, but some unfortunate users may have
come to rely on it.
See: https://github.com/raspberrypi/issues/1950
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
Phil Elwell [Mon, 27 Nov 2017 17:14:54 +0000 (17:14 +0000)]
cgroup: Fix automatic disabling of cgroup "memory"
Some Raspberry Pis have limited RAM and most users won't use the
cgroup memory support so it is disabled by default. The previous
implementation relied on the memory cgroup being encountered first,
which is not guaranteed to be the case. Change the implementation
to be registration-order-agnostic.
See: https://github.com/raspberrypi/issues/1950
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
popcornmix [Wed, 18 Dec 2013 22:16:19 +0000 (22:16 +0000)]
config: Enable CONFIG_MEMCG, but leave it disabled (due to memory cost). Enable with cgroup_enable=memory.
Phil Elwell [Sat, 25 Nov 2017 19:21:11 +0000 (19:21 +0000)]
Revert "cgroup: Add kernel param to enable memory group"
This reverts commit
ba742b52e5099b3ed964e78f227dc96460b5cdc0.
Phil Elwell [Tue, 14 Nov 2017 11:03:22 +0000 (11:03 +0000)]
mcp2515: Use DT-supplied interrupt flags
The MCP2515 datasheet clearly describes a level-triggered interrupt
pin. Therefore the receiving interrupt controller must also be
configured for level-triggered operation otherwise there is a danger
of a missed interrupt condition blocking all subsequent interrupts.
The ONESHOT flag ensures that the interrupt is masked until the
threaded interrupt handler exits.
Rather than change the flags globally (they must have worked for at
least one user), allow the flags to be overridden from Device Tree
in the event that the device has a DT node.
See: https://github.com/raspberrypi/linux/issues/2175
https://github.com/raspberrypi/linux/issues/2263
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
Gerald Pape [Tue, 21 Nov 2017 14:32:11 +0000 (15:32 +0100)]
enable sht3x module in kernel, add sht3x definition to i2c-sensor dts definition (#2282)
Enable sht3x module in kernel configuration, and add to i2c-sensor overlay.
James Hughes [Fri, 29 Sep 2017 14:44:24 +0000 (15:44 +0100)]
AXI performance monitor driver
Uses the debugfs I/F to provide access to the AXI
bus performance monitors.
Requires the new mailbox peripheral access for access
to the VPU performance registers, system bus access
is done using direct register reads.
Signed-off-by: James Hughes <james.hughes@raspberrypi.org>
Phil Elwell [Mon, 13 Nov 2017 13:00:14 +0000 (13:00 +0000)]
USB_DWCOTG: Disable building dwc_otg as a module (#2265)
When dwc_otg is built as a module, build will fail with the following
error:
ERROR: "DWC_TASK_HI_SCHEDULE" [drivers/usb/host/dwc_otg/dwc_otg.ko] undefined!
scripts/Makefile.modpost:91: recipe for target '__modpost' failed
make[1]: *** [__modpost] Error 1
Makefile:1199: recipe for target 'modules' failed
make: *** [modules] Error 2
Even if the error is solved by including the missing
DWC_TASK_HI_SCHEDULE function, the kernel will panic when loading
dwc_otg.
As a workaround, simply prevent user from building dwc_otg as a module
as the current kernel does not support it.
See: https://github.com/raspberrypi/linux/issues/2258
Signed-off-by: Malik Olivier Boussejra <malik@boussejra.com>
Phil Elwell [Wed, 1 Nov 2017 12:24:28 +0000 (12:24 +0000)]
ARM: dts: Add fake CTS signal to pi3-miniuart-bt
The Pi 3B rev 1.3 and the Pi Zero W have flow control signals to the
BT modem, which work well using UART0 (a.k.a. ttyAMA0). Because of
this, the pin wired to the modem's CTS line has to be held low in
order for it to transmit data.
Unfortunately the mini-UART (or its driver) appears to have a flow
control issue, causing hciattach to stall during modem initialisation.
As a workaround (potentially short-term), configure GPIO 31 as an
output driving low (the default state for an output).
See: https://www.raspberrypi.org/forums/viewtopic.php?f=107&t=138223&start=100#p1228339
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
Gerald Pape [Wed, 1 Nov 2017 10:15:32 +0000 (11:15 +0100)]
Include tsl4531, veml6070 and hdc100x dtoverlay (#2252)
This commit adds the needed kernel config keys and extends the
i2c-sensor-overlay.dts file with support for:
* the Texas Instruments HDC100x temp sensor
* the AMS TSL4531 digital ambient light sensor
* the Vishay VEML6070 ultraviolet light sensor
Alistair Buxton [Sat, 28 Oct 2017 03:58:26 +0000 (04:58 +0100)]
BCM_VC_SM: select DMA_SHARED_BUFFER
This driver was refactored to use the kernel DMA buffer sharing api
in commit
a97390852b14e8f06cf579adaaf8b664184e92d2.
Per Documentation/dma-buf-sharing.txt, it must select DMA_SHARED_BUFFER
in its Kconfig.
Signed-off-by: Alistair Buxton <a.j.buxton@gmail.com>
Phil Elwell [Fri, 27 Oct 2017 20:34:12 +0000 (21:34 +0100)]
config: Add CONFIG_W1_SLAVE_DS2438=m
See: https://github.com/raspberrypi/linux/issues/2246
Mariusz Bialonczyk [Thu, 23 Feb 2017 06:38:43 +0000 (07:38 +0100)]
w1: add support for DS2438 Smart Battery Monitor
[ Upstream commit
e3af95e60738e2f0ecedca96f8f3baa2fa4d1b7d ]
Detailed information about support and provided sysfs files
in my next commit which creates a documentation file:
Documentation/w1/slaves/w1_ds2438
Signed-off-by: Mariusz Bialonczyk <manio@skyboo.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Phil Elwell [Wed, 25 Oct 2017 08:20:56 +0000 (09:20 +0100)]
scripts: Update mkknlimg, just in case
With the removal of the vc_cma driver, mkknlimg lost an indication that
the user had built a downstream kernel. Update the script, adding a few
more key strings, in case it is still being used.
Note that mkknlimg is now deprecated, except to tag kernels as upstream
(283x), and thus requiring upstream DTBs.
See: https://github.com/raspberrypi/linux/issues/2239
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
Dave Stevenson [Tue, 17 Oct 2017 15:21:13 +0000 (16:21 +0100)]
vc-cma: Remove the driver as non-functional on Pi
vc-cma was pulled in from previous platforms. It
supposedly allowed the VPU relocatable heap to be
released to the kernel as CMA, but it was always
a little fragile.
Remove it to avoid complications.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Phil Elwell [Tue, 17 Oct 2017 16:17:20 +0000 (17:17 +0100)]
config: Add CONFIG_USB_LAN78XX=m
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
Daniel Matuschek [Tue, 17 Oct 2017 08:30:28 +0000 (10:30 +0200)]
Fixed a bug when using 352.8kHz sample rate
Signed-off-by: Daniel Matuschek <daniel@hifiberry.com>
Allo [Mon, 16 Oct 2017 16:52:24 +0000 (22:22 +0530)]
Bug fix: initial max volume level & default mode value. (#2224)
Bug fix: initial max volume level & default mode value.
Signed-off-by: allocom <sparky-dev@allo.com>
Phil Elwell [Fri, 13 Oct 2017 07:47:50 +0000 (08:47 +0100)]
overlays/README: Remove trailing whitespace
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
neilneil2000 [Thu, 12 Oct 2017 16:29:43 +0000 (17:29 +0100)]
GPIO and gpio-poweroff clarifications
Notes added:
1) All GPIO references use the hardware numbering scheme
2) Enabling gpio-poweroff prevents the ability to boot the pi by driving GPIO3 low
Phil Elwell [Wed, 11 Oct 2017 12:48:04 +0000 (13:48 +0100)]
amba-pl011: Report AUTOCTS capability to framework
The PL011 has full hardware RTS/CTS support which is enabled by
the driver when flow control is requested. However, it doesn't
notify the UART framework of the fact, causing the software CTS
support to be enabled at the same time.
Software CTS triggers the sending of another batch of characters
when CTS becomes asserted. The pl011 interrupt handler processes
the CTIS bit before TXIS, which can cause some characters to be
sent between the time that the TXIS bit first becomes asserted
and the time it is handled by a call to px011_tx_chars. This
would be fine were it not for the optimisation in pl011_tx_char
that assumes the FIFO is half-empty if called from the interrupt
handler and skips the checking of the FIFO status register before
sending each character, leading to data loss if the FIFO is more
than half-full.
Prevent the data loss and improve efficiency by indicating the
AUTOCTS support.
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
Phil Elwell [Fri, 6 Oct 2017 12:23:32 +0000 (13:23 +0100)]
brcmfmac: request_firmware_direct is quieter
Since we don't have any CLM-capable firmware yet, silence the warning
of its absence by using request_firmware_direct, which should also
be marginally quicker.
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
Chung-Hsien Hsu [Mon, 15 May 2017 01:11:05 +0000 (20:11 -0500)]
brcmfmac: add CLM download support
Future firmwares will be provided with minimal built-in CLM - the
NULL region (#n/0) becomes the initial country. It cannot be changed
until downloading a CLM blob file with some other regions. This patch
adds support for CLM blob file download. The blob file should be named
as firmware but with extension .clm_blob (e.g.
brcmfmac43430-sdio.clm_blob) and be placed in /lib/firmware/brcm/.
Change-Id: I0901a4b38592fe28d0adeb8f3e2402292842f169
Signed-off-by: Chung-Hsien Hsu <cnhu@cypress.com>
Christoph Hellwig [Thu, 7 Sep 2017 11:54:35 +0000 (13:54 +0200)]
bsg-lib: don't free job in bsg_prepare_job
commit
f507b54dccfd8000c517d740bc45f20c74532d18 upstream.
The job structure is allocated as part of the request, so we should not
free it in the error path of bsg_prepare_job.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Phil Elwell [Fri, 29 Sep 2017 09:32:19 +0000 (10:32 +0100)]
amba_pl011: Insert mb() for correct FIFO handling
The pl011 register accessor functions use the _relaxed versions of the
standard readl() and writel() functions, meaning that there are no
automatic memory barriers. When polling a FIFO status register to check
for fullness, it is necessary to ensure that any outstanding writes have
completed; otherwise the flags are effectively stale, making it possible
that the next write is to a full FIFO.
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
Phil Elwell [Fri, 29 Sep 2017 09:32:19 +0000 (10:32 +0100)]
amba_pl011: Add cts-event-workaround DT property
The BCM2835 PL011 implementation seems to have a bug that can lead to a
transmission lockup if CTS changes frequently. A workaround was added to
the driver with a vendor-specific flag to enable it, but this flag is
currently not set for ARM implementations.
Add a "cts-event-workaround" property to Pi DTBs and use the presence
of that property to force the flag to be enabled in the driver.
See: https://github.com/raspberrypi/linux/issues/1280
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
David H [Wed, 4 Oct 2017 11:43:07 +0000 (04:43 -0700)]
bcm2835-camera: Fix timestamp calculation problem (#2214)
* bcm2835-camera: Fix timestamp calculation problem
Use div_s64_rem() to convert usec timestamp to timeval
to avoid integer signedness bug.
* bcm2835-camera: Store kernel start time in NSEC instead of USEC
* bcm2835-camera: Reword debug message for clarity
Kevin Cernekee [Sun, 17 Sep 2017 04:08:23 +0000 (21:08 -0700)]
brcmfmac: Delete redundant length check
brcmf_fweh_process_event() sets event->datalen to the
endian-swapped value of event_packet->msg.datalen, which is the
same as emsg.datalen. This length is already validated in
brcmf_fweh_process_event(), so there is no need to check it
again upon dequeuing the event.
Suggested-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: Kevin Cernekee <cernekee@chromium.org>
Kevin Cernekee [Sun, 17 Sep 2017 04:08:22 +0000 (21:08 -0700)]
brcmfmac: Avoid possible out-of-bounds read
In brcmf_p2p_notify_rx_mgmt_p2p_probereq(), chanspec is assigned before
the length of rxframe is validated. This could lead to uninitialized
data being accessed (but not printed). Since we already have a
perfectly good endian-swapped copy of rxframe->chanspec in ch.chspec,
and ch.chspec is not modified by decchspec(), avoid the extra
assignment and use ch.chspec in the debug print.
Suggested-by: Mattias Nissler <mnissler@chromium.org>
Signed-off-by: Kevin Cernekee <cernekee@chromium.org>
Reviewed-by: Arend van Spriel <arend.vanspriel@broadcom.com>
popcornmix [Fri, 29 Sep 2017 15:15:01 +0000 (16:15 +0100)]
vcsm: Fix up macros to avoid breaking numbers used by existing apps
Dan Pasanen [Thu, 21 Sep 2017 12:41:02 +0000 (07:41 -0500)]
vcsm: use dma APIs for cache functions
* Will handle multi-platform builds
Dan Pasanen [Thu, 21 Sep 2017 14:57:44 +0000 (09:57 -0500)]
vcsm: add macros for cache functions
Dan Pasanen [Thu, 21 Sep 2017 14:55:42 +0000 (09:55 -0500)]
arm: partially revert
702b94bff3c50542a6e4ab9a4f4cef093262fe65
* Re-expose some dmi APIs for use in VCSM
Dave Stevenson [Sun, 24 Sep 2017 21:43:16 +0000 (22:43 +0100)]
vc-sm: Fix a printf of a dma_addr_t from %u to %pad
Avoids issues when other build parameters result in
dma_addr_t being a 64 bit value.
See #2196.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
James Hughes [Fri, 22 Sep 2017 09:24:04 +0000 (10:24 +0100)]
Touchscreen spurious event fix
Touchscreen driver was not checking event type,
which meant bad coords that arrived with the
finger up event were being used, causing this
spurious coordinate event.
Fix is to ignore all finger up events.
Signed-off-by: James Hughes <james.hughes@raspberrypi.org>
Dan Pasanen [Wed, 20 Sep 2017 15:17:41 +0000 (10:17 -0500)]
vcsm: fix multi-platform build
Phil Elwell [Mon, 18 Sep 2017 11:01:46 +0000 (12:01 +0100)]
cgroup: Add kernel param to enable memory group
cgroup support is useful, but enabling the "memory" cgroup has a 32-byte
overhead per page. Arrange that "memory" cgroup is disabled by default
unless the "cgroup_memory" parameter is set to a true value.
See: https://github.com/raspberrypi/issues/1950
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
Phil Elwell [Mon, 18 Sep 2017 09:07:54 +0000 (10:07 +0100)]
Revert "config: Enable CONFIG_MEMCG, but leave it disabled (due to memory cost). Enable with cgroup_enable=memory."
This reverts commit
7dbc189967bef8e7f431c982557d0e73eb13f161.
Phil Elwell [Thu, 14 Sep 2017 15:16:24 +0000 (16:16 +0100)]
config: Add CONFIG_GPIO_WATCHDOG=m
Enable the gpio_wdt module, to support external watchdogs.
See: https://github.com/raspberrypi/linux/issues/2199
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
popcornmix [Tue, 5 Sep 2017 15:24:03 +0000 (16:24 +0100)]
vcsm: Handle the clean+invalidate case directly
Dave Stevenson [Tue, 5 Sep 2017 09:18:33 +0000 (10:18 +0100)]
vcsm: Replace SM_PDE_T with sm_pde_t
Follows the Linux kernel coding style
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Dave Stevenson [Tue, 5 Sep 2017 09:17:18 +0000 (10:17 +0100)]
vcsm: Replace SM_PRIV_DATA_T with sm_priv_data_t
Follows the Linux kernel coding style
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Dave Stevenson [Tue, 5 Sep 2017 09:16:07 +0000 (10:16 +0100)]
vcsm: Replace SM_STATE_T with sm_state_t
Follow the Linux kernel coding style
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Dave Stevenson [Tue, 5 Sep 2017 09:15:25 +0000 (10:15 +0100)]
vcsm: Replace SM_STATS_T with sm_stats_t
Follows the kernel coding style
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Dave Stevenson [Tue, 5 Sep 2017 09:12:21 +0000 (10:12 +0100)]
vcsm: Replace SM_RESOURCE_T with sm_resource_t
Follow the Linux kernel coding style.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Dave Stevenson [Fri, 1 Sep 2017 16:55:07 +0000 (17:55 +0100)]
vcsm: Remove VC_SM_LOCK_CACHE_MODE_T typedef.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Dave Stevenson [Fri, 1 Sep 2017 16:47:32 +0000 (17:47 +0100)]
vcsm: Fix "Prefer kcalloc over kzalloc with multiply"
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Dave Stevenson [Fri, 1 Sep 2017 16:45:34 +0000 (17:45 +0100)]
vcsm: Fix "void function return statements are not generally useful"
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Dave Stevenson [Fri, 1 Sep 2017 16:38:27 +0000 (17:38 +0100)]
vcsm: Fix "struct vm_operations_struct should normally be const"
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Dave Stevenson [Fri, 1 Sep 2017 16:36:11 +0000 (17:36 +0100)]
vcsm: Correct "long unsigned int" to "unsigned long"
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Dave Stevenson [Fri, 1 Sep 2017 16:33:49 +0000 (17:33 +0100)]
vcsm: Fix use of S_IRUGO and use 0444 instead
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Dave Stevenson [Fri, 1 Sep 2017 16:24:48 +0000 (17:24 +0100)]
vcsm: Fix spaces around operators.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Dave Stevenson [Fri, 1 Sep 2017 16:29:37 +0000 (17:29 +0100)]
vcsm: Fix indentation of switch/case statement.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Dave Stevenson [Fri, 1 Sep 2017 16:21:09 +0000 (17:21 +0100)]
vcsm: Fix lots of block quote formatting issues
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Dave Stevenson [Fri, 1 Sep 2017 16:01:11 +0000 (17:01 +0100)]
vcsm: Fix erroneous space in 'if' statement.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Dave Stevenson [Fri, 1 Sep 2017 15:59:49 +0000 (16:59 +0100)]
vcsm: Fix blank lines after declarations.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Dave Stevenson [Fri, 1 Sep 2017 15:55:08 +0000 (16:55 +0100)]
vcsm: "unsigned int" preferred over "unsigned" fixed.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Dave Stevenson [Fri, 1 Sep 2017 15:50:29 +0000 (16:50 +0100)]
vcsm: Remove typedef of VC_VCHI_SM_HANDLE_T
Replaced with struct sm_instance *.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Dave Stevenson [Fri, 1 Sep 2017 15:34:13 +0000 (16:34 +0100)]
vcsm: Fix block comment formatting
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Dave Stevenson [Fri, 1 Sep 2017 15:29:53 +0000 (16:29 +0100)]
vcsm: Correct block comment style on licence headers.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Dave Stevenson [Fri, 1 Sep 2017 15:26:12 +0000 (16:26 +0100)]
vcsm: Remove all typedefs from vc_sm_defs.h and calling code
Remove typedefs on the structures that make up the IPC
to the firmware for VCSM. Update all calling code appropriately.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Dave Stevenson [Wed, 15 Feb 2017 11:17:44 +0000 (11:17 +0000)]
VCSM: New option to import a DMABUF for VPU use
Takes a dmabuf, and then calls over to the VPU to wrap
it into a suitable handle.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Dave Stevenson [Fri, 25 Aug 2017 14:58:57 +0000 (15:58 +0100)]
vcsm: Convert to loading via device tree.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Dave Stevenson [Fri, 19 May 2017 13:29:12 +0000 (14:29 +0100)]
vcsm: code-style: Fix comment indentation
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Dave Stevenson [Wed, 15 Feb 2017 11:16:05 +0000 (11:16 +0000)]
VCSM: Specify pointers in IPC msgs as uint32_t
Pointers were specified as void* which will fail
rather badly if the kernel is switched to 64 bit.
GPU wants 32 bit addresses, so use uint32_t and
cast whereever necessary.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
popcornmix [Mon, 4 Sep 2017 19:48:02 +0000 (20:48 +0100)]
vcsm: Allow both clean and invalidate to be requested
Phil Elwell [Thu, 24 Aug 2017 15:16:16 +0000 (16:16 +0100)]
brcmfmac: Disable ARP offloading when promiscuous
This is a test patch for brcmfmac from Franky Lin at Broadcom to disable
ARP offloading when in promiscuous mode, re-enabling the ability to
sniff ARP packets over WiFi.
See: https://github.com/raspberrypi/linux/issues/2171
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
Eric Anholt [Fri, 19 Dec 2014 00:07:15 +0000 (16:07 -0800)]
mm: Remove the PFN busy warning
See commit
dae803e165a11bc88ca8dbc07a11077caf97bbcb -- the warning is
expected sometimes when using CMA. However, that commit still spams
my kernel log with these warnings.
Signed-off-by: Eric Anholt <eric@anholt.net>