1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter.git synced 2025-03-09 15:40:20 +00:00

Update RPI 4.19 patches

This commit is contained in:
Ycarus 2019-05-30 09:07:04 +02:00
parent d5a0aade8c
commit a109b26606
16 changed files with 1441 additions and 0 deletions

View file

@ -0,0 +1,31 @@
From 365ab793942c71df7615392f13cda736f12dceed Mon Sep 17 00:00:00 2001
From: Peter Robinson <pbrobinson@gmail.com>
Date: Sun, 5 May 2019 21:07:12 +0100
Subject: [PATCH 493/515] arm: dts: overlays: rpi-sense: add upstream humidity
compatible
The upstream humidiity driver uses "st,hts221" for the compatible
string so add that in as well so it will work with an unmodified
upstream kernel driver. We leave the downstream as the priority.
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
---
arch/arm/boot/dts/overlays/rpi-sense-overlay.dts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/overlays/rpi-sense-overlay.dts b/arch/arm/boot/dts/overlays/rpi-sense-overlay.dts
index 27153240e1be..6eba2a10bfa5 100644
--- a/arch/arm/boot/dts/overlays/rpi-sense-overlay.dts
+++ b/arch/arm/boot/dts/overlays/rpi-sense-overlay.dts
@@ -38,7 +38,7 @@
};
hts221-humid@5f {
- compatible = "st,hts221-humid";
+ compatible = "st,hts221-humid", "st,hts221";
reg = <0x5f>;
status = "okay";
};
--
2.19.1

View file

@ -0,0 +1,72 @@
From ebfca1b4585632188f1e1a57b53b414523daa5c0 Mon Sep 17 00:00:00 2001
From: Dave Stevenson <dave.stevenson@raspberrypi.org>
Date: Thu, 2 May 2019 15:50:01 +0100
Subject: [PATCH 494/515] staging: mmal-vchiq: Fix memory leak in error path
On error, vchiq_mmal_component_init could leave the
event context allocated for ports.
Clean them up in the error path.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
---
.../vc04_services/vchiq-mmal/mmal-vchiq.c | 27 +++++++++++++------
1 file changed, 19 insertions(+), 8 deletions(-)
diff --git a/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c b/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c
index bce42b652e57..c82fb0fad9d4 100644
--- a/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c
+++ b/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c
@@ -1848,9 +1848,26 @@ static void free_event_context(struct vchiq_mmal_port *port)
{
struct mmal_msg_context *ctx = port->event_context;
+ if (!ctx)
+ return;
+
kfree(ctx->u.bulk.buffer->buffer);
kfree(ctx->u.bulk.buffer);
release_msg_context(ctx);
+ port->event_context = NULL;
+}
+
+static void release_all_event_contexts(struct vchiq_mmal_component *component)
+{
+ int idx;
+
+ for (idx = 0; idx < component->inputs; idx++)
+ free_event_context(&component->input[idx]);
+ for (idx = 0; idx < component->outputs; idx++)
+ free_event_context(&component->output[idx]);
+ for (idx = 0; idx < component->clocks; idx++)
+ free_event_context(&component->clock[idx]);
+ free_event_context(&component->control);
}
/* Initialise a mmal component and its ports
@@ -1948,6 +1965,7 @@ int vchiq_mmal_component_init(struct vchiq_mmal_instance *instance,
release_component:
destroy_component(instance, component);
+ release_all_event_contexts(component);
unlock:
if (component)
component->in_use = 0;
@@ -1975,14 +1993,7 @@ int vchiq_mmal_component_finalise(struct vchiq_mmal_instance *instance,
component->in_use = 0;
- for (idx = 0; idx < component->inputs; idx++)
- free_event_context(&component->input[idx]);
- for (idx = 0; idx < component->outputs; idx++)
- free_event_context(&component->output[idx]);
- for (idx = 0; idx < component->clocks; idx++)
- free_event_context(&component->clock[idx]);
-
- free_event_context(&component->control);
+ release_all_event_contexts(component);
mutex_unlock(&instance->vchiq_mutex);
--
2.19.1

View file

@ -0,0 +1,67 @@
From ed98ed3ae5aa7d2a13b7606373fc2b788edd1b4e Mon Sep 17 00:00:00 2001
From: Dave Stevenson <dave.stevenson@raspberrypi.org>
Date: Fri, 3 May 2019 13:27:51 +0100
Subject: [PATCH 495/515] staging: vchiq-mmal: Fix memory leak of vchiq
instance
The vchiq instance was allocated from vchiq_mmal_init via
vchi_initialise, but was never released with vchi_disconnect.
Retain the handle and release it from vchiq_mmal_finalise.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
---
drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c b/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c
index c82fb0fad9d4..5bfba5b5b08f 100644
--- a/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c
+++ b/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c
@@ -176,6 +176,7 @@ struct mmal_msg_context {
};
struct vchiq_mmal_instance {
+ VCHI_INSTANCE_T vchi_instance;
VCHI_SERVICE_HANDLE_T handle;
/* ensure serialised access to service */
@@ -1981,7 +1982,7 @@ EXPORT_SYMBOL_GPL(vchiq_mmal_component_init);
int vchiq_mmal_component_finalise(struct vchiq_mmal_instance *instance,
struct vchiq_mmal_component *component)
{
- int ret, idx;
+ int ret;
if (mutex_lock_interruptible(&instance->vchiq_mutex))
return -EINTR;
@@ -2094,6 +2095,8 @@ int vchiq_mmal_finalise(struct vchiq_mmal_instance *instance)
idr_destroy(&instance->context_map);
+ vchi_disconnect(instance->vchi_instance);
+
kfree(instance);
return status;
@@ -2105,7 +2108,7 @@ int vchiq_mmal_init(struct vchiq_mmal_instance **out_instance)
int status;
struct vchiq_mmal_instance *instance;
static VCHI_CONNECTION_T *vchi_connection;
- static VCHI_INSTANCE_T vchi_instance;
+ VCHI_INSTANCE_T vchi_instance;
SERVICE_CREATION_T params = {
.version = VCHI_VERSION_EX(VC_MMAL_VER, VC_MMAL_MIN_VER),
.service_id = VC_MMAL_SERVER_NAME,
@@ -2151,6 +2154,8 @@ int vchiq_mmal_init(struct vchiq_mmal_instance **out_instance)
if (!instance)
return -ENOMEM;
+ instance->vchi_instance = vchi_instance;
+
mutex_init(&instance->vchiq_mutex);
instance->bulk_scratch = vmalloc(PAGE_SIZE);
--
2.19.1

View file

@ -0,0 +1,171 @@
From 8a61a0791ab90cd7d2c1ef270ebc056580940b0e Mon Sep 17 00:00:00 2001
From: Dave Stevenson <dave.stevenson@raspberrypi.org>
Date: Mon, 13 May 2019 17:34:29 +0100
Subject: [PATCH 496/515] Revert "video: bcm2708_fb: Try allocating on the ARM
and passing to VPU"
This reverts commit ca36c709fce57e8023d2b8b354376bf161601a49.
The driver tries a cma_alloc to avoid using gpu_mem, but should
that fail the core code is logging an error with no easy way to
test whether it will succeed or fail first.
Revert until we either totally give up on gpu_mem and increase
CMA always, or find a way to try an allocation.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
---
drivers/video/fbdev/bcm2708_fb.c | 102 +++------------------
include/soc/bcm2835/raspberrypi-firmware.h | 1 -
2 files changed, 12 insertions(+), 91 deletions(-)
diff --git a/drivers/video/fbdev/bcm2708_fb.c b/drivers/video/fbdev/bcm2708_fb.c
index 0cdec747d5e3..209a1504a160 100644
--- a/drivers/video/fbdev/bcm2708_fb.c
+++ b/drivers/video/fbdev/bcm2708_fb.c
@@ -98,11 +98,6 @@ struct bcm2708_fb {
struct bcm2708_fb_stats stats;
unsigned long fb_bus_address;
struct { u32 base, length; } gpu;
-
- bool disable_arm_alloc;
- unsigned int image_size;
- dma_addr_t dma_addr;
- void *cpuaddr;
};
#define to_bcm2708(info) container_of(info, struct bcm2708_fb, fb)
@@ -288,88 +283,23 @@ static int bcm2708_fb_set_par(struct fb_info *info)
.xoffset = info->var.xoffset,
.yoffset = info->var.yoffset,
.tag5 = { RPI_FIRMWARE_FRAMEBUFFER_ALLOCATE, 8, 0 },
- /* base and screen_size will be initialised later */
- .tag6 = { RPI_FIRMWARE_FRAMEBUFFER_SET_PITCH, 4, 0 },
- /* pitch will be initialised later */
+ .base = 0,
+ .screen_size = 0,
+ .tag6 = { RPI_FIRMWARE_FRAMEBUFFER_GET_PITCH, 4, 0 },
+ .pitch = 0,
};
- int ret, image_size;
-
+ int ret;
print_debug("%s(%p) %dx%d (%dx%d), %d, %d\n", __func__, info,
info->var.xres, info->var.yres, info->var.xres_virtual,
info->var.yres_virtual, (int)info->screen_size,
info->var.bits_per_pixel);
- /* Try allocating our own buffer. We can specify all the parameters */
- image_size = ((info->var.xres * info->var.yres) *
- info->var.bits_per_pixel) >> 3;
-
- if (!fb->disable_arm_alloc &&
- (image_size != fb->image_size || !fb->dma_addr)) {
- if (fb->dma_addr) {
- dma_free_coherent(info->device, fb->image_size,
- fb->cpuaddr, fb->dma_addr);
- fb->image_size = 0;
- fb->cpuaddr = NULL;
- fb->dma_addr = 0;
- }
-
- fb->cpuaddr = dma_alloc_coherent(info->device, image_size,
- &fb->dma_addr, GFP_KERNEL);
-
- if (!fb->cpuaddr) {
- fb->dma_addr = 0;
- fb->disable_arm_alloc = true;
- } else {
- fb->image_size = image_size;
- }
- }
-
- if (fb->cpuaddr) {
- fbinfo.base = fb->dma_addr;
- fbinfo.screen_size = image_size;
- fbinfo.pitch = (info->var.xres * info->var.bits_per_pixel) >> 3;
-
- ret = rpi_firmware_property_list(fb->fw, &fbinfo,
- sizeof(fbinfo));
- if (ret || fbinfo.base != fb->dma_addr) {
- /* Firmware either failed, or assigned a different base
- * address (ie it doesn't support being passed an FB
- * allocation).
- * Destroy the allocation, and don't try again.
- */
- dma_free_coherent(info->device, fb->image_size,
- fb->cpuaddr, fb->dma_addr);
- fb->image_size = 0;
- fb->cpuaddr = NULL;
- fb->dma_addr = 0;
- fb->disable_arm_alloc = true;
- }
- } else {
- /* Our allocation failed - drop into the old scheme of
- * allocation by the VPU.
- */
- ret = -ENOMEM;
- }
-
+ ret = rpi_firmware_property_list(fb->fw, &fbinfo, sizeof(fbinfo));
if (ret) {
- /* Old scheme:
- * - FRAMEBUFFER_ALLOCATE passes 0 for base and screen_size.
- * - GET_PITCH instead of SET_PITCH.
- */
- fbinfo.base = 0;
- fbinfo.screen_size = 0;
- fbinfo.tag6.tag = RPI_FIRMWARE_FRAMEBUFFER_GET_PITCH;
- fbinfo.pitch = 0;
-
- ret = rpi_firmware_property_list(fb->fw, &fbinfo,
- sizeof(fbinfo));
- if (ret) {
- dev_err(info->device,
- "Failed to allocate GPU framebuffer (%d)\n",
- ret);
- return ret;
- }
+ dev_err(info->device,
+ "Failed to allocate GPU framebuffer (%d)\n", ret);
+ return ret;
}
if (info->var.bits_per_pixel <= 8)
@@ -384,17 +314,9 @@ static int bcm2708_fb_set_par(struct fb_info *info)
fb->fb.fix.smem_start = fbinfo.base;
fb->fb.fix.smem_len = fbinfo.pitch * fbinfo.yres_virtual;
fb->fb.screen_size = fbinfo.screen_size;
-
- if (!fb->dma_addr) {
- if (fb->fb.screen_base)
- iounmap(fb->fb.screen_base);
-
- fb->fb.screen_base = ioremap_wc(fbinfo.base,
- fb->fb.screen_size);
- } else {
- fb->fb.screen_base = fb->cpuaddr;
- }
-
+ if (fb->fb.screen_base)
+ iounmap(fb->fb.screen_base);
+ fb->fb.screen_base = ioremap_wc(fbinfo.base, fb->fb.screen_size);
if (!fb->fb.screen_base) {
/* the console may currently be locked */
console_trylock();
diff --git a/include/soc/bcm2835/raspberrypi-firmware.h b/include/soc/bcm2835/raspberrypi-firmware.h
index e35a89eeee26..23b9d356537f 100644
--- a/include/soc/bcm2835/raspberrypi-firmware.h
+++ b/include/soc/bcm2835/raspberrypi-firmware.h
@@ -128,7 +128,6 @@ enum rpi_firmware_property_tag {
RPI_FIRMWARE_FRAMEBUFFER_SET_DEPTH = 0x00048005,
RPI_FIRMWARE_FRAMEBUFFER_SET_PIXEL_ORDER = 0x00048006,
RPI_FIRMWARE_FRAMEBUFFER_SET_ALPHA_MODE = 0x00048007,
- RPI_FIRMWARE_FRAMEBUFFER_SET_PITCH = 0x00048008,
RPI_FIRMWARE_FRAMEBUFFER_SET_VIRTUAL_OFFSET = 0x00048009,
RPI_FIRMWARE_FRAMEBUFFER_SET_OVERSCAN = 0x0004800a,
RPI_FIRMWARE_FRAMEBUFFER_SET_PALETTE = 0x0004800b,
--
2.19.1

View file

@ -0,0 +1,145 @@
From 646f633466ac539a329dd3694c3ec74d55297855 Mon Sep 17 00:00:00 2001
From: Jean-Francois Dagenais <jeff.dagenais@gmail.com>
Date: Thu, 28 Mar 2019 12:41:11 -0400
Subject: [PATCH 500/515] w1: ds2408: reset on output_write retry with readback
commit 49695ac46861180baf2b2b92c62da8619b6bf28f upstream.
When we have success in 'Channel Access Write' but reading back latch
states fails, a write is retried without doing a proper slave reset.
This leads to protocol errors as the slave treats the next 'Channel
Access Write' as the continuation of previous command.
This commit is fixing this by making sure if the retry loop re-runs, a
reset is performed, whatever the failure (CONFIRM_BYTE or the read
back).
The loop was quite due for a cleanup and this change mandated it. By
isolating the CONFIG_W1_SLAVE_DS2408_READBACK case into it's own
function, we vastly reduce the visual and branching(runtime and
compile-time) noise.
Reported-by: Mariusz Bialonczyk <manio@skyboo.net>
Tested-by: Mariusz Bialonczyk <manio@skyboo.net>
Signed-off-by: Jean-Francois Dagenais <jeff.dagenais@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/w1/slaves/w1_ds2408.c | 76 ++++++++++++++++++-----------------
1 file changed, 39 insertions(+), 37 deletions(-)
diff --git a/drivers/w1/slaves/w1_ds2408.c b/drivers/w1/slaves/w1_ds2408.c
index b535d5ec35b6..92e8f0755b9a 100644
--- a/drivers/w1/slaves/w1_ds2408.c
+++ b/drivers/w1/slaves/w1_ds2408.c
@@ -138,14 +138,37 @@ static ssize_t status_control_read(struct file *filp, struct kobject *kobj,
W1_F29_REG_CONTROL_AND_STATUS, buf);
}
+#ifdef fCONFIG_W1_SLAVE_DS2408_READBACK
+static bool optional_read_back_valid(struct w1_slave *sl, u8 expected)
+{
+ u8 w1_buf[3];
+
+ if (w1_reset_resume_command(sl->master))
+ return false;
+
+ w1_buf[0] = W1_F29_FUNC_READ_PIO_REGS;
+ w1_buf[1] = W1_F29_REG_OUTPUT_LATCH_STATE;
+ w1_buf[2] = 0;
+
+ w1_write_block(sl->master, w1_buf, 3);
+
+ return (w1_read_8(sl->master) == expected);
+}
+#else
+static bool optional_read_back_valid(struct w1_slave *sl, u8 expected)
+{
+ return true;
+}
+#endif
+
static ssize_t output_write(struct file *filp, struct kobject *kobj,
struct bin_attribute *bin_attr, char *buf,
loff_t off, size_t count)
{
struct w1_slave *sl = kobj_to_w1_slave(kobj);
u8 w1_buf[3];
- u8 readBack;
unsigned int retries = W1_F29_RETRIES;
+ ssize_t bytes_written = -EIO;
if (count != 1 || off != 0)
return -EFAULT;
@@ -155,54 +178,33 @@ static ssize_t output_write(struct file *filp, struct kobject *kobj,
dev_dbg(&sl->dev, "mutex locked");
if (w1_reset_select_slave(sl))
- goto error;
+ goto out;
- while (retries--) {
+ do {
w1_buf[0] = W1_F29_FUNC_CHANN_ACCESS_WRITE;
w1_buf[1] = *buf;
w1_buf[2] = ~(*buf);
- w1_write_block(sl->master, w1_buf, 3);
- readBack = w1_read_8(sl->master);
+ w1_write_block(sl->master, w1_buf, 3);
- if (readBack != W1_F29_SUCCESS_CONFIRM_BYTE) {
- if (w1_reset_resume_command(sl->master))
- goto error;
- /* try again, the slave is ready for a command */
- continue;
+ if (w1_read_8(sl->master) == W1_F29_SUCCESS_CONFIRM_BYTE &&
+ optional_read_back_valid(sl, *buf)) {
+ bytes_written = 1;
+ goto out;
}
-#ifdef CONFIG_W1_SLAVE_DS2408_READBACK
- /* here the master could read another byte which
- would be the PIO reg (the actual pin logic state)
- since in this driver we don't know which pins are
- in and outs, there's no value to read the state and
- compare. with (*buf) so end this command abruptly: */
if (w1_reset_resume_command(sl->master))
- goto error;
+ goto out; /* unrecoverable error */
+ /* try again, the slave is ready for a command */
+ } while (--retries);
- /* go read back the output latches */
- /* (the direct effect of the write above) */
- w1_buf[0] = W1_F29_FUNC_READ_PIO_REGS;
- w1_buf[1] = W1_F29_REG_OUTPUT_LATCH_STATE;
- w1_buf[2] = 0;
- w1_write_block(sl->master, w1_buf, 3);
- /* read the result of the READ_PIO_REGS command */
- if (w1_read_8(sl->master) == *buf)
-#endif
- {
- /* success! */
- mutex_unlock(&sl->master->bus_mutex);
- dev_dbg(&sl->dev,
- "mutex unlocked, retries:%d", retries);
- return 1;
- }
- }
-error:
+out:
mutex_unlock(&sl->master->bus_mutex);
- dev_dbg(&sl->dev, "mutex unlocked in error, retries:%d", retries);
- return -EIO;
+ dev_dbg(&sl->dev, "%s, mutex unlocked retries:%d\n",
+ (bytes_written > 0) ? "succeeded" : "error", retries);
+
+ return bytes_written;
}
--
2.19.1

View file

@ -0,0 +1,50 @@
From afb1d05657278c16cca2a9fa96ef9a6c7170d07d Mon Sep 17 00:00:00 2001
From: Mariusz Bialonczyk <manio@skyboo.net>
Date: Thu, 21 Mar 2019 11:52:55 +0100
Subject: [PATCH 501/515] w1: fix the resume command API
commit 62909da8aca048ecf9fbd7e484e5100608f40a63 upstream.
>From the DS2408 datasheet [1]:
"Resume Command function checks the status of the RC flag and, if it is set,
directly transfers control to the control functions, similar to a Skip ROM
command. The only way to set the RC flag is through successfully executing
the Match ROM, Search ROM, Conditional Search ROM, or Overdrive-Match ROM
command"
The function currently works perfectly fine in a multidrop bus, but when we
have only a single slave connected, then only a Skip ROM is used and Match
ROM is not called at all. This is leading to problems e.g. with single one
DS2408 connected, as the Resume Command is not working properly and the
device is responding with failing results after the Resume Command.
This commit is fixing this by using a Skip ROM instead in those cases.
The bandwidth / performance advantage is exactly the same.
Refs:
[1] https://datasheets.maximintegrated.com/en/ds/DS2408.pdf
Signed-off-by: Mariusz Bialonczyk <manio@skyboo.net>
Reviewed-by: Jean-Francois Dagenais <jeff.dagenais@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/w1/w1_io.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/w1/w1_io.c b/drivers/w1/w1_io.c
index 0364d3329c52..3516ce6718d9 100644
--- a/drivers/w1/w1_io.c
+++ b/drivers/w1/w1_io.c
@@ -432,8 +432,7 @@ int w1_reset_resume_command(struct w1_master *dev)
if (w1_reset_bus(dev))
return -1;
- /* This will make only the last matched slave perform a skip ROM. */
- w1_write_8(dev, W1_RESUME_CMD);
+ w1_write_8(dev, dev->slave_count > 1 ? W1_RESUME_CMD : W1_SKIP_ROM);
return 0;
}
EXPORT_SYMBOL_GPL(w1_reset_resume_command);
--
2.19.1

View file

@ -0,0 +1,96 @@
From 3f647927237babee492cbb6ce0ab29417af55ea0 Mon Sep 17 00:00:00 2001
From: Mariusz Bialonczyk <manio@skyboo.net>
Date: Mon, 4 Mar 2019 12:23:36 +0100
Subject: [PATCH 502/515] w1: ds2482: cosmetic fixes after 54865314f5a1
commit 5cb27d30fc3a281e830a2099d520b469e2b82008 upstream.
We have a helper function ds2482_calculate_config() which is calculating
the config value, so just use it instead of passing the same variable
in all calls to this function.
Also fixes the placement of module parameters to match with:
50fa2951bd74 (w1: Organize driver source to natural/common order)
by Andrew F. Davis
Signed-off-by: Mariusz Bialonczyk <manio@skyboo.net>
Cc: Andrew Worsley <amworsley@gmail.com>
Cc: Andrew F. Davis <afd@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/w1/masters/ds2482.c | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/drivers/w1/masters/ds2482.c b/drivers/w1/masters/ds2482.c
index 8b5e598ffdb3..8f2b25f1614c 100644
--- a/drivers/w1/masters/ds2482.c
+++ b/drivers/w1/masters/ds2482.c
@@ -37,6 +37,11 @@ module_param_named(active_pullup, ds2482_active_pullup, int, 0644);
MODULE_PARM_DESC(active_pullup, "Active pullup (apply to all buses): " \
"0-disable, 1-enable (default)");
+/* extra configurations - e.g. 1WS */
+static int extra_config;
+module_param(extra_config, int, S_IRUGO | S_IWUSR);
+MODULE_PARM_DESC(extra_config, "Extra Configuration settings 1=APU,2=PPM,3=SPU,8=1WS");
+
/**
* The DS2482 registers - there are 3 registers that are addressed by a read
* pointer. The read pointer is set by the last command executed.
@@ -70,8 +75,6 @@ MODULE_PARM_DESC(active_pullup, "Active pullup (apply to all buses): " \
#define DS2482_REG_CFG_PPM 0x02 /* presence pulse masking */
#define DS2482_REG_CFG_APU 0x01 /* active pull-up */
-/* extra configurations - e.g. 1WS */
-static int extra_config;
/**
* Write and verify codes for the CHANNEL_SELECT command (DS2482-800 only).
@@ -130,6 +133,8 @@ struct ds2482_data {
*/
static inline u8 ds2482_calculate_config(u8 conf)
{
+ conf |= extra_config;
+
if (ds2482_active_pullup)
conf |= DS2482_REG_CFG_APU;
@@ -405,7 +410,7 @@ static u8 ds2482_w1_reset_bus(void *data)
/* If the chip did reset since detect, re-config it */
if (err & DS2482_REG_STS_RST)
ds2482_send_cmd_data(pdev, DS2482_CMD_WRITE_CONFIG,
- ds2482_calculate_config(extra_config));
+ ds2482_calculate_config(0x00));
}
mutex_unlock(&pdev->access_lock);
@@ -431,7 +436,8 @@ static u8 ds2482_w1_set_pullup(void *data, int delay)
ds2482_wait_1wire_idle(pdev);
/* note: it seems like both SPU and APU have to be set! */
retval = ds2482_send_cmd_data(pdev, DS2482_CMD_WRITE_CONFIG,
- ds2482_calculate_config(extra_config|DS2482_REG_CFG_SPU|DS2482_REG_CFG_APU));
+ ds2482_calculate_config(DS2482_REG_CFG_SPU |
+ DS2482_REG_CFG_APU));
ds2482_wait_1wire_idle(pdev);
}
@@ -484,7 +490,7 @@ static int ds2482_probe(struct i2c_client *client,
/* Set all config items to 0 (off) */
ds2482_send_cmd_data(data, DS2482_CMD_WRITE_CONFIG,
- ds2482_calculate_config(extra_config));
+ ds2482_calculate_config(0x00));
mutex_init(&data->access_lock);
@@ -559,7 +565,5 @@ module_i2c_driver(ds2482_driver);
MODULE_AUTHOR("Ben Gardner <bgardner@wabtec.com>");
MODULE_DESCRIPTION("DS2482 driver");
-module_param(extra_config, int, S_IRUGO | S_IWUSR);
-MODULE_PARM_DESC(extra_config, "Extra Configuration settings 1=APU,2=PPM,3=SPU,8=1WS");
MODULE_LICENSE("GPL");
--
2.19.1

View file

@ -0,0 +1,26 @@
From 4ed0f310669e324505b2125619349312497d4a08 Mon Sep 17 00:00:00 2001
From: Klaus Schulz <klsschlz@gmail.com>
Date: Thu, 16 May 2019 13:35:32 +0200
Subject: [PATCH 503/515] sound: pcm512x-codec: Adding 352.8kHz samplerate
support
---
sound/soc/codecs/pcm512x.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/codecs/pcm512x.c b/sound/soc/codecs/pcm512x.c
index e6523e74fdd9..45f9644e53af 100644
--- a/sound/soc/codecs/pcm512x.c
+++ b/sound/soc/codecs/pcm512x.c
@@ -542,7 +542,7 @@ static unsigned long pcm512x_ncp_target(struct pcm512x_priv *pcm512x,
static const u32 pcm512x_dai_rates[] = {
8000, 11025, 16000, 22050, 32000, 44100, 48000, 64000,
- 88200, 96000, 176400, 192000, 384000,
+ 88200, 96000, 176400, 192000, 352800, 384000,
};
static const struct snd_pcm_hw_constraint_list constraints_slave = {
--
2.19.1

View file

@ -0,0 +1,44 @@
From 00de9e45fe619d9fd3e810d10d99ac328ee5190c Mon Sep 17 00:00:00 2001
From: Marcel Holtmann <marcel@holtmann.org>
Date: Wed, 22 May 2019 09:05:40 +0200
Subject: [PATCH 506/515] Bluetooth: Check key sizes only when Secure Simple
Pairing is enabled
The encryption is only mandatory to be enforced when both sides are using
Secure Simple Pairing and this means the key size check makes only sense
in that case.
On legacy Bluetooth 2.0 and earlier devices like mice the encryption was
optional and thus causing an issue if the key size check is not bound to
using Secure Simple Pairing.
Fixes: d5bb334a8e17 ("Bluetooth: Align minimum encryption key size for LE and BR/EDR connections")
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Cc: stable@vger.kernel.org
---
net/bluetooth/hci_conn.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c
index 3cf0764d5793..7516cdde3373 100644
--- a/net/bluetooth/hci_conn.c
+++ b/net/bluetooth/hci_conn.c
@@ -1272,8 +1272,13 @@ int hci_conn_check_link_mode(struct hci_conn *conn)
return 0;
}
- if (hci_conn_ssp_enabled(conn) &&
- !test_bit(HCI_CONN_ENCRYPT, &conn->flags))
+ /* If Secure Simple Pairing is not enabled, then legacy connection
+ * setup is used and no encryption or key sizes can be enforced.
+ */
+ if (!hci_conn_ssp_enabled(conn))
+ return 1;
+
+ if (!test_bit(HCI_CONN_ENCRYPT, &conn->flags))
return 0;
/* The minimum encryption key size needs to be enforced by the
--
2.19.1

View file

@ -0,0 +1,168 @@
From d903e18191d372cf917b0db788b5cd43bcd16025 Mon Sep 17 00:00:00 2001
From: Phil Elwell <phil@raspberrypi.org>
Date: Tue, 7 May 2019 17:23:41 +0100
Subject: [PATCH 507/515] usb: dwc_otg: Clean up interrupt claiming code
The FIQ/IRQ interrupt number identification code is scattered through
the dwc_otg driver. Rationalise it, simplifying the code and solving
an existing issue.
See: https://github.com/raspberrypi/linux/issues/2612
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
---
drivers/usb/host/dwc_otg/dwc_otg_driver.c | 18 +++++++++-----
drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c | 10 +++-----
drivers/usb/host/dwc_otg/dwc_otg_os_dep.h | 6 +++++
drivers/usb/host/dwc_otg/dwc_otg_pcd_linux.c | 26 +++-----------------
4 files changed, 25 insertions(+), 35 deletions(-)
diff --git a/drivers/usb/host/dwc_otg/dwc_otg_driver.c b/drivers/usb/host/dwc_otg/dwc_otg_driver.c
index 04535c3eff4a..3fd21c7ba360 100644
--- a/drivers/usb/host/dwc_otg/dwc_otg_driver.c
+++ b/drivers/usb/host/dwc_otg/dwc_otg_driver.c
@@ -624,11 +624,7 @@ static int dwc_otg_driver_remove( struct platform_device *_dev )
* Free the IRQ
*/
if (otg_dev->common_irq_installed) {
-#ifdef PLATFORM_INTERFACE
- free_irq(platform_get_irq(_dev, 0), otg_dev);
-#else
- free_irq(_dev->irq, otg_dev);
-#endif
+ free_irq(otg_dev->os_dep.irq_num, otg_dev);
} else {
DWC_DEBUGPL(DBG_ANY, "%s: There is no installed irq!\n", __func__);
return REM_RETVAL(-ENXIO);
@@ -905,7 +901,9 @@ static int dwc_otg_driver_probe(
*/
#if defined(PLATFORM_INTERFACE)
- devirq = platform_get_irq(_dev, fiq_enable ? 0 : 1);
+ devirq = platform_get_irq_byname(_dev, fiq_enable ? "soft" : "usb");
+ if (devirq < 0)
+ devirq = platform_get_irq(_dev, fiq_enable ? 0 : 1);
#else
devirq = _dev->irq;
#endif
@@ -922,6 +920,14 @@ static int dwc_otg_driver_probe(
} else {
dwc_otg_device->common_irq_installed = 1;
}
+ dwc_otg_device->os_dep.irq_num = devirq;
+ dwc_otg_device->os_dep.fiq_num = -EINVAL;
+ if (fiq_enable) {
+ int devfiq = platform_get_irq_byname(_dev, "usb");
+ if (devfiq < 0)
+ devfiq = platform_get_irq(_dev, 1);
+ dwc_otg_device->os_dep.fiq_num = devfiq;
+ }
#ifndef IRQF_TRIGGER_LOW
#if defined(LM_INTERFACE) || defined(PLATFORM_INTERFACE)
diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c
index 028f7fd22ba9..fc43f2a66d6a 100644
--- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c
+++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c
@@ -492,7 +492,7 @@ static void hcd_init_fiq(void *cookie)
#endif
// Enable FIQ interrupt from USB peripheral
#ifdef CONFIG_ARM64
- irq = platform_get_irq(otg_dev->os_dep.platformdev, 1);
+ irq = otg_dev->os_dep.fiq_num;
if (irq < 0) {
DWC_ERROR("Can't get SIM-FIQ irq");
@@ -509,7 +509,7 @@ static void hcd_init_fiq(void *cookie)
simfiq_irq = irq;
#else
#ifdef CONFIG_GENERIC_IRQ_MULTI_HANDLER
- irq = platform_get_irq(otg_dev->os_dep.platformdev, 1);
+ irq = otg_dev->os_dep.fiq_num;
#else
irq = INTERRUPT_VC_USB;
#endif
@@ -626,11 +626,7 @@ int hcd_init(dwc_bus_dev_t *_dev)
* allocates the DMA buffer pool, registers the USB bus, requests the
* IRQ line, and calls hcd_start method.
*/
-#ifdef PLATFORM_INTERFACE
- retval = usb_add_hcd(hcd, platform_get_irq(_dev, fiq_enable ? 0 : 1), IRQF_SHARED);
-#else
- retval = usb_add_hcd(hcd, _dev->irq, IRQF_SHARED);
-#endif
+ retval = usb_add_hcd(hcd, otg_dev->os_dep.irq_num, IRQF_SHARED);
if (retval < 0) {
goto error2;
}
diff --git a/drivers/usb/host/dwc_otg/dwc_otg_os_dep.h b/drivers/usb/host/dwc_otg/dwc_otg_os_dep.h
index d7b700ff1782..3da96b253155 100644
--- a/drivers/usb/host/dwc_otg/dwc_otg_os_dep.h
+++ b/drivers/usb/host/dwc_otg/dwc_otg_os_dep.h
@@ -102,6 +102,12 @@ typedef struct os_dependent {
/** Base address for MPHI peripheral */
void *mphi_base;
+ /** IRQ number (<0 if not valid) */
+ int irq_num;
+
+ /** FIQ number (<0 if not valid) */
+ int fiq_num;
+
#ifdef LM_INTERFACE
struct lm_device *lmdev;
#elif defined(PCI_INTERFACE)
diff --git a/drivers/usb/host/dwc_otg/dwc_otg_pcd_linux.c b/drivers/usb/host/dwc_otg/dwc_otg_pcd_linux.c
index e799f15f2947..a5ed8e83711d 100644
--- a/drivers/usb/host/dwc_otg/dwc_otg_pcd_linux.c
+++ b/drivers/usb/host/dwc_otg/dwc_otg_pcd_linux.c
@@ -1224,30 +1224,16 @@ int pcd_init(dwc_bus_dev_t *_dev)
/*
* Setup interupt handler
*/
-#ifdef PLATFORM_INTERFACE
DWC_DEBUGPL(DBG_ANY, "registering handler for irq%d\n",
- platform_get_irq(_dev, fiq_enable ? 0 : 1));
- retval = request_irq(platform_get_irq(_dev, fiq_enable ? 0 : 1), dwc_otg_pcd_irq,
+ otg_dev->os_dep.irq_num);
+ retval = request_irq(otg_dev->os_dep.irq_num, dwc_otg_pcd_irq,
IRQF_SHARED, gadget_wrapper->gadget.name,
otg_dev->pcd);
if (retval != 0) {
- DWC_ERROR("request of irq%d failed\n",
- platform_get_irq(_dev, fiq_enable ? 0 : 1));
+ DWC_ERROR("request of irq%d failed\n", otg_dev->os_dep.irq_num);
free_wrapper(gadget_wrapper);
return -EBUSY;
}
-#else
- DWC_DEBUGPL(DBG_ANY, "registering handler for irq%d\n",
- _dev->irq);
- retval = request_irq(_dev->irq, dwc_otg_pcd_irq,
- IRQF_SHARED | IRQF_DISABLED,
- gadget_wrapper->gadget.name, otg_dev->pcd);
- if (retval != 0) {
- DWC_ERROR("request of irq%d failed\n", _dev->irq);
- free_wrapper(gadget_wrapper);
- return -EBUSY;
- }
-#endif
dwc_otg_pcd_start(gadget_wrapper->pcd, &fops);
@@ -1267,11 +1253,7 @@ void pcd_remove(dwc_bus_dev_t *_dev)
/*
* Free the IRQ
*/
-#ifdef PLATFORM_INTERFACE
- free_irq(platform_get_irq(_dev, 0), pcd);
-#else
- free_irq(_dev->irq, pcd);
-#endif
+ free_irq(otg_dev->os_dep.irq_num, pcd);
dwc_otg_pcd_remove(otg_dev->pcd);
free_wrapper(gadget_wrapper);
otg_dev->pcd = 0;
--
2.19.1

View file

@ -0,0 +1,98 @@
From 5efe78e312cef1b0eb699e54c680a59105967fec Mon Sep 17 00:00:00 2001
From: Phil Elwell <phil@raspberrypi.org>
Date: Tue, 7 May 2019 14:27:35 +0100
Subject: [PATCH 508/515] overlays: Delete the deprecated sdio-1bit overlay
Use dtoverlay=sdio,bus_width=1,gpios_22_25 instead.
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
---
arch/arm/boot/dts/overlays/Makefile | 1 -
.../boot/dts/overlays/sdio-1bit-overlay.dts | 63 -------------------
2 files changed, 64 deletions(-)
delete mode 100644 arch/arm/boot/dts/overlays/sdio-1bit-overlay.dts
diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile
index cc70cf5c8579..ae7ba0bc3945 100644
--- a/arch/arm/boot/dts/overlays/Makefile
+++ b/arch/arm/boot/dts/overlays/Makefile
@@ -126,7 +126,6 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
sc16is752-spi1.dtbo \
sdhost.dtbo \
sdio.dtbo \
- sdio-1bit.dtbo \
sdtweak.dtbo \
smi.dtbo \
smi-dev.dtbo \
diff --git a/arch/arm/boot/dts/overlays/sdio-1bit-overlay.dts b/arch/arm/boot/dts/overlays/sdio-1bit-overlay.dts
deleted file mode 100644
index 297daae8faf9..000000000000
--- a/arch/arm/boot/dts/overlays/sdio-1bit-overlay.dts
+++ /dev/null
@@ -1,63 +0,0 @@
-/dts-v1/;
-/plugin/;
-
-/* Enable 1-bit SDIO from MMC interface via GPIOs 22-25. Includes sdhost overlay. */
-
-/{
- compatible = "brcm,bcm2708";
-
- fragment@0 {
- target = <&mmc>;
- __overlay__ {
- status = "disabled";
- };
- };
-
- fragment@1 {
- target = <&soc>;
- __overlay__ {
- #address-cells = <1>;
- #size-cells = <1>;
-
- sdio_1bit: sdio@7e300000 {
- compatible = "brcm,bcm2835-mmc",
- "brcm,bcm2835-sdhci";
- reg = <0x7e300000 0x100>;
- interrupts = <2 30>;
- clocks = <&clocks 28/*BCM2835_CLOCK_EMMC*/>;
- dmas = <&dma 11>;
- dma-names = "rx-tx";
- brcm,overclock-50 = <0>;
- status = "okay";
- pinctrl-names = "default";
- pinctrl-0 = <&sdio_1bit_pins>;
- non-removable;
- bus-width = <1>;
- };
- };
- };
-
- fragment@2 {
- target = <&gpio>;
- __overlay__ {
- sdio_1bit_pins: sdio_1bit_pins {
- brcm,pins = <22 23 24 25>;
- brcm,function = <7>; /* ALT3 = SD1 */
- brcm,pull = <0 2 2 2>;
- };
- };
- };
-
- fragment@3 {
- target-path = "/aliases";
- __overlay__ {
- mmc1 = "/soc/sdio@7e300000";
- };
- };
-
-
- __overrides__ {
- poll_once = <&sdio_1bit>,"non-removable?";
- sdio_overclock = <&sdio_1bit>,"brcm,overclock-50:0";
- };
-};
--
2.19.1

View file

@ -0,0 +1,109 @@
From 02c3ae26d1a5789b9b32de87f2e887807e74a200 Mon Sep 17 00:00:00 2001
From: Phil Elwell <phil@raspberrypi.org>
Date: Tue, 7 May 2019 10:06:04 +0100
Subject: [PATCH 509/515] overlays: Remove upstream-aux-interrupt overlay
We no longer have a downstream-specific auxilliary interrupt
driver, so the overlay to disable it is no longer needed.
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
---
arch/arm/boot/dts/overlays/Makefile | 1 -
arch/arm/boot/dts/overlays/README | 12 +++----
.../upstream-aux-interrupt-overlay.dts | 33 -------------------
.../boot/dts/overlays/upstream-overlay.dts | 2 +-
4 files changed, 6 insertions(+), 42 deletions(-)
delete mode 100644 arch/arm/boot/dts/overlays/upstream-aux-interrupt-overlay.dts
diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile
index ae7ba0bc3945..9aea64b0d325 100644
--- a/arch/arm/boot/dts/overlays/Makefile
+++ b/arch/arm/boot/dts/overlays/Makefile
@@ -151,7 +151,6 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
uart1.dtbo \
udrc.dtbo \
upstream.dtbo \
- upstream-aux-interrupt.dtbo \
vc4-fkms-v3d.dtbo \
vc4-kms-kippah-7inch.dtbo \
vc4-kms-v3d.dtbo \
diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README
index fc71a917f495..42265637df37 100644
--- a/arch/arm/boot/dts/overlays/README
+++ b/arch/arm/boot/dts/overlays/README
@@ -2206,18 +2206,16 @@ Params: alsaname Name of the ALSA audio device (default "udrc")
Name: upstream
-Info: Allow usage of downstream .dtb with upstream kernel. Comprises
- vc4-kms-v3d, dwc2 and upstream-aux-interrupt overlays.
+Info: Allow usage of downstream .dtb with upstream kernel. Comprises the
+ vc4-kms-v3d and dwc2 overlays.
Load: dtoverlay=upstream
Params: <None>
Name: upstream-aux-interrupt
-Info: Allow usage of downstream .dtb with upstream kernel by binding AUX
- devices directly to the shared AUX interrupt line. One of the parts
- of the 'upstream' overlay
-Load: dtoverlay=upstream-aux-interrupt
-Params: <None>
+Info: This overlay has been deprecated and removed because it is no longer
+ necessary.
+Load: <Deprecated>
Name: vc4-fkms-v3d
diff --git a/arch/arm/boot/dts/overlays/upstream-aux-interrupt-overlay.dts b/arch/arm/boot/dts/overlays/upstream-aux-interrupt-overlay.dts
deleted file mode 100644
index 04e271b72a3a..000000000000
--- a/arch/arm/boot/dts/overlays/upstream-aux-interrupt-overlay.dts
+++ /dev/null
@@ -1,33 +0,0 @@
-// Overlay for missing AUX interrupt controller
-// Instead we bind all AUX devices to the generic AUX interrupt line
-/dts-v1/;
-/plugin/;
-
-/ {
- compatible = "brcm,bcm2708";
-
- fragment@0 {
- target = <&uart1>;
- __overlay__ {
- interrupt-parent = <&intc>;
- interrupts = <0x1 0x1d>;
- };
- };
-
- fragment@1 {
- target = <&spi1>;
- __overlay__ {
- interrupt-parent = <&intc>;
- interrupts = <0x1 0x1d>;
- };
- };
-
- fragment@2 {
- target = <&spi2>;
- __overlay__ {
- interrupt-parent = <&intc>;
- interrupts = <0x1 0x1d>;
- };
- };
-};
-
diff --git a/arch/arm/boot/dts/overlays/upstream-overlay.dts b/arch/arm/boot/dts/overlays/upstream-overlay.dts
index b597f863c4a8..5ddc95b6d8fc 100644
--- a/arch/arm/boot/dts/overlays/upstream-overlay.dts
+++ b/arch/arm/boot/dts/overlays/upstream-overlay.dts
@@ -1,4 +1,4 @@
-// redo: ovmerge -c vc4-kms-v3d-overlay.dts,cma-96 dwc2-overlay.dts,dr_mode=otg upstream-aux-interrupt-overlay.dts,
+// redo: ovmerge -c vc4-kms-v3d-overlay.dts,cma-96 dwc2-overlay.dts,dr_mode=otg
/dts-v1/;
/plugin/;
--
2.19.1

View file

@ -0,0 +1,128 @@
From b21d708869b4c87533d621cce93667c07261d88d Mon Sep 17 00:00:00 2001
From: Phil Elwell <phil@raspberrypi.org>
Date: Wed, 22 May 2019 12:58:47 +0100
Subject: [PATCH 511/515] vc4: Remove interrupt and DMA trampling
As part of the effort to clean up the overlays, remove the interrupt
and DMA mask declarations from the vc4 overlays which just duplicate
that which is in the base DTBs.
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
---
.../boot/dts/overlays/vc4-fkms-v3d-overlay.dts | 8 --------
.../boot/dts/overlays/vc4-kms-v3d-overlay.dts | 18 ++----------------
2 files changed, 2 insertions(+), 24 deletions(-)
diff --git a/arch/arm/boot/dts/overlays/vc4-fkms-v3d-overlay.dts b/arch/arm/boot/dts/overlays/vc4-fkms-v3d-overlay.dts
index aae52ac6f3ed..d9af97c8414f 100644
--- a/arch/arm/boot/dts/overlays/vc4-fkms-v3d-overlay.dts
+++ b/arch/arm/boot/dts/overlays/vc4-fkms-v3d-overlay.dts
@@ -60,7 +60,6 @@
fragment@7 {
target = <&v3d>;
__overlay__ {
- interrupts = <1 10>;
status = "okay";
};
};
@@ -72,13 +71,6 @@
};
};
- fragment@9 {
- target-path = "/soc/dma";
- __overlay__ {
- brcm,dma-channel-mask = <0x7f35>;
- };
- };
-
__overrides__ {
cma-256 = <0>,"+0-1-2-3-4";
cma-192 = <0>,"-0+1-2-3-4";
diff --git a/arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts b/arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts
index 62ed673404e0..19e1d2548e7b 100644
--- a/arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts
+++ b/arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts
@@ -62,7 +62,6 @@
fragment@7 {
target = <&pixelvalve0>;
__overlay__ {
- interrupts = <2 13>; /* pwa0 */
status = "okay";
};
};
@@ -70,7 +69,6 @@
fragment@8 {
target = <&pixelvalve1>;
__overlay__ {
- interrupts = <2 14>; /* pwa1 */
status = "okay";
};
};
@@ -78,7 +76,6 @@
fragment@9 {
target = <&pixelvalve2>;
__overlay__ {
- interrupts = <2 10>; /* pixelvalve */
status = "okay";
};
};
@@ -86,7 +83,6 @@
fragment@10 {
target = <&hvs>;
__overlay__ {
- interrupts = <2 1>;
status = "okay";
};
};
@@ -94,7 +90,6 @@
fragment@11 {
target = <&hdmi>;
__overlay__ {
- interrupts = <2 8>, <2 9>;
status = "okay";
};
};
@@ -102,7 +97,6 @@
fragment@12 {
target = <&v3d>;
__overlay__ {
- interrupts = <1 10>;
status = "okay";
};
};
@@ -115,14 +109,6 @@
};
fragment@14 {
- target-path = "/soc/dma";
- __overlay__ {
- brcm,dma-channel-mask = <0x7f35>;
- };
- };
-
-
- fragment@15 {
target = <&clocks>;
__overlay__ {
claim-clocks = <
@@ -134,14 +120,14 @@
};
};
- fragment@16 {
+ fragment@15 {
target = <&vec>;
__overlay__ {
status = "okay";
};
};
- fragment@17 {
+ fragment@16 {
target = <&txp>;
__overlay__ {
status = "okay";
--
2.19.1

View file

@ -0,0 +1,69 @@
From 1e86eb066dfc16b23f397fb433fc9294ea06a99f Mon Sep 17 00:00:00 2001
From: Phil Elwell <phil@raspberrypi.org>
Date: Wed, 8 May 2019 10:08:31 +0100
Subject: [PATCH 513/515] BCM270X_DT: usb: Refactor DTS and overlays
Move the IRQ interrupt declaration in the usb node before the FIQ
declaration, so that the dwc2 driver will find it. Name the
interrupts appropriately so that the dwc_otg driver can still find
them. Then remove the interrupt rewriting from the overlays.
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
---
arch/arm/boot/dts/bcm270x.dtsi | 6 ++++--
arch/arm/boot/dts/overlays/dwc-otg-overlay.dts | 6 ------
arch/arm/boot/dts/overlays/dwc2-overlay.dts | 2 --
3 files changed, 4 insertions(+), 10 deletions(-)
diff --git a/arch/arm/boot/dts/bcm270x.dtsi b/arch/arm/boot/dts/bcm270x.dtsi
index 6d2563b25a42..86f3eb2d3f48 100644
--- a/arch/arm/boot/dts/bcm270x.dtsi
+++ b/arch/arm/boot/dts/bcm270x.dtsi
@@ -131,8 +131,10 @@
compatible = "brcm,bcm2708-usb";
reg = <0x7e980000 0x10000>,
<0x7e006000 0x1000>;
- interrupts = <2 0>,
- <1 9>;
+ interrupt-names = "usb",
+ "soft";
+ interrupts = <1 9>,
+ <2 0>;
};
v3d@7ec00000 { /* vd3 */
diff --git a/arch/arm/boot/dts/overlays/dwc-otg-overlay.dts b/arch/arm/boot/dts/overlays/dwc-otg-overlay.dts
index 15dd7750813e..78c5e9f85048 100644
--- a/arch/arm/boot/dts/overlays/dwc-otg-overlay.dts
+++ b/arch/arm/boot/dts/overlays/dwc-otg-overlay.dts
@@ -6,14 +6,8 @@
fragment@0 {
target = <&usb>;
- #address-cells = <1>;
- #size-cells = <1>;
__overlay__ {
compatible = "brcm,bcm2708-usb";
- reg = <0x7e980000 0x10000>,
- <0x7e006000 0x1000>;
- interrupts = <2 0>,
- <1 9>;
status = "okay";
};
};
diff --git a/arch/arm/boot/dts/overlays/dwc2-overlay.dts b/arch/arm/boot/dts/overlays/dwc2-overlay.dts
index 7f04b2ab3762..732adbe3faaf 100644
--- a/arch/arm/boot/dts/overlays/dwc2-overlay.dts
+++ b/arch/arm/boot/dts/overlays/dwc2-overlay.dts
@@ -10,8 +10,6 @@
#size-cells = <1>;
dwc2_usb: __overlay__ {
compatible = "brcm,bcm2835-usb";
- reg = <0x7e980000 0x10000>;
- interrupts = <1 9>;
dr_mode = "otg";
g-np-tx-fifo-size = <32>;
g-rx-fifo-size = <256>;
--
2.19.1

View file

@ -0,0 +1,131 @@
From d2b14d32d3e417e5ef9434bb8ec9f1229035ee2e Mon Sep 17 00:00:00 2001
From: Phil Elwell <phil@raspberrypi.org>
Date: Wed, 22 May 2019 13:29:56 +0100
Subject: [PATCH 514/515] overlays: Update upstream overlay
The recent DT/overlay changes have had a corresponding effect on the
upstream overlay, which is a composite of the vc4-kms-v3d and dwc2
overlays.
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
---
.../boot/dts/overlays/upstream-overlay.dts | 41 ++-----------------
1 file changed, 3 insertions(+), 38 deletions(-)
diff --git a/arch/arm/boot/dts/overlays/upstream-overlay.dts b/arch/arm/boot/dts/overlays/upstream-overlay.dts
index 2b91dc143945..1e069f3672f4 100644
--- a/arch/arm/boot/dts/overlays/upstream-overlay.dts
+++ b/arch/arm/boot/dts/overlays/upstream-overlay.dts
@@ -52,42 +52,36 @@
fragment@7 {
target = <&pixelvalve0>;
__overlay__ {
- interrupts = <2 13>;
status = "okay";
};
};
fragment@8 {
target = <&pixelvalve1>;
__overlay__ {
- interrupts = <2 14>;
status = "okay";
};
};
fragment@9 {
target = <&pixelvalve2>;
__overlay__ {
- interrupts = <2 10>;
status = "okay";
};
};
fragment@10 {
target = <&hvs>;
__overlay__ {
- interrupts = <2 1>;
status = "okay";
};
};
fragment@11 {
target = <&hdmi>;
__overlay__ {
- interrupts = <2 8>, <2 9>;
status = "okay";
};
};
fragment@12 {
target = <&v3d>;
__overlay__ {
- interrupts = <1 10>;
status = "okay";
};
};
@@ -98,37 +92,29 @@
};
};
fragment@14 {
- target-path = "/soc/dma";
- __overlay__ {
- brcm,dma-channel-mask = <0x7f35>;
- };
- };
- fragment@15 {
target = <&clocks>;
__overlay__ {
claim-clocks = <BCM2835_PLLD_DSI0 BCM2835_PLLD_DSI1 BCM2835_PLLH_AUX BCM2835_PLLH_PIX>;
};
};
- fragment@16 {
+ fragment@15 {
target = <&vec>;
__overlay__ {
status = "okay";
};
};
- fragment@17 {
+ fragment@16 {
target = <&txp>;
__overlay__ {
status = "okay";
};
};
- fragment@18 {
+ fragment@17 {
target = <&usb>;
#address-cells = <1>;
#size-cells = <1>;
dwc2_usb: __overlay__ {
compatible = "brcm,bcm2835-usb";
- reg = <0x7e980000 0x10000>;
- interrupts = <1 9>;
dr_mode = "otg";
g-np-tx-fifo-size = <32>;
g-rx-fifo-size = <256>;
@@ -136,25 +122,4 @@
status = "okay";
};
};
- fragment@19 {
- target = <&uart1>;
- __overlay__ {
- interrupt-parent = <&intc>;
- interrupts = <0x1 0x1d>;
- };
- };
- fragment@20 {
- target = <&spi1>;
- __overlay__ {
- interrupt-parent = <&intc>;
- interrupts = <0x1 0x1d>;
- };
- };
- fragment@21 {
- target = <&spi2>;
- __overlay__ {
- interrupt-parent = <&intc>;
- interrupts = <0x1 0x1d>;
- };
- };
};
--
2.19.1

View file

@ -0,0 +1,36 @@
From 1694cf065778a8508b6dd8ce8ce270ca0e643788 Mon Sep 17 00:00:00 2001
From: Mariusz Bialonczyk <manio@skyboo.net>
Date: Thu, 16 May 2019 14:39:21 +0200
Subject: [PATCH 515/515] w1: ds2408: Fix typo after 49695ac46861 (reset on
output_write retry with readback)
commit 6660a04feb7ef648e50c792e19084d675fa6f3a2 upstream.
Fix a typo in commit:
49695ac46861 w1: ds2408: reset on output_write retry with readback
Fixes: 49695ac46861 ("w1: ds2408: reset on output_write retry with readback")
Reported-by: Phil Elwell <phil@raspberrypi.org>
Cc: Jean-Francois Dagenais <jeff.dagenais@gmail.com>
Signed-off-by: Mariusz Bialonczyk <manio@skyboo.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/w1/slaves/w1_ds2408.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/w1/slaves/w1_ds2408.c b/drivers/w1/slaves/w1_ds2408.c
index 92e8f0755b9a..edf0bc98012c 100644
--- a/drivers/w1/slaves/w1_ds2408.c
+++ b/drivers/w1/slaves/w1_ds2408.c
@@ -138,7 +138,7 @@ static ssize_t status_control_read(struct file *filp, struct kobject *kobj,
W1_F29_REG_CONTROL_AND_STATUS, buf);
}
-#ifdef fCONFIG_W1_SLAVE_DS2408_READBACK
+#ifdef CONFIG_W1_SLAVE_DS2408_READBACK
static bool optional_read_back_valid(struct w1_slave *sl, u8 expected)
{
u8 w1_buf[3];
--
2.19.1