[PATCH v3 0/4] Raspberry Pi 4 DMA addressing support

2019-09-02 Thread Nicolas Saenz Julienne
be left empty - Try another approach merging both ZONE_DMA comments into one - Address Christoph's comments - If this approach doesn't get much traction I'll just drop the patch from the series as it's not really essential Nicolas Saenz Julienne (4): arm64: mm: use arm64_dma_phys_limit instead

[PATCH v3 1/4] arm64: mm: use arm64_dma_phys_limit instead of calling max_zone_dma_phys()

2019-09-02 Thread Nicolas Saenz Julienne
By the time we call zones_sizes_init() arm64_dma_phys_limit already contains the result of max_zone_dma_phys(). We use the variable instead of calling the function directly to save some precious cpu time. Signed-off-by: Nicolas Saenz Julienne --- Changes in v3: None Changes in v2: None arch

[PATCH v2 01/11] asm-generic: add dma_zone_size

2019-08-20 Thread Nicolas Saenz Julienne
Some architectures have platform specific DMA addressing limitations. This will allow for hardware description code to provide the constraints in a generic manner, so as for arch code to properly setup it's memory zones and DMA mask. Signed-off-by: Nicolas Saenz Julienne --- Changes in v2: None

[PATCH v2 02/11] arm: use generic dma_zone_size

2019-08-20 Thread Nicolas Saenz Julienne
'dma_zone_size' was created as a generic replacement to 'arm_dma_zone_size'. Use it accordingly. Signed-off-by: Nicolas Saenz Julienne --- Changes in v2: None arch/arm/include/asm/dma.h | 8 +--- arch/arm/mm/init.c | 12 2 files changed, 9 insertions(+), 11 deletions

[PATCH v2 00/11] Raspberry Pi 4 DMA addressing support

2019-08-20 Thread Nicolas Saenz Julienne
to zone_dma_bits. - Try new approach by merging both ZONE_DMA and ZONE_DMA32 comments in mmzone.h, add new up to date examples. Nicolas Saenz Julienne (11): asm-generic: add dma_zone_size arm: use generic dma_zone_size of/fdt: add of_fdt_machine_is_compatible function of/fdt: add

[PATCH v2 07/11] arm64: re-introduce max_zone_dma_phys()

2019-08-20 Thread Nicolas Saenz Julienne
-off-by: Nicolas Saenz Julienne --- Changes in v2: - Update function's behavior to fit new dma zones split - Use dma_zone_size - Take into account devices with a hardcoded DMA offset arch/arm64/mm/init.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/arch/arm64/mm/init.c b/arch

[PATCH v2 04/11] of/fdt: add early_init_dt_get_dma_zone_size()

2019-08-20 Thread Nicolas Saenz Julienne
simply hardcode the device wide DMA addressable memory size conditionally to the machine compatible name and set 'dma_zone_size' accordingly. Signed-off-by: Nicolas Saenz Julienne --- Changes in v2: - New approach to getting dma_zone_size, instead of parsing the dts we hardcode it conditionally

[PATCH v2 05/11] arm64: mm: use arm64_dma_phys_limit instead of calling max_zone_dma_phys()

2019-08-20 Thread Nicolas Saenz Julienne
By the time we call zones_sizes_init() arm64_dma_phys_limit already contains the result of max_zone_dma_phys(). We use the variable instead of calling the function directly to save some precious cpu time. Signed-off-by: Nicolas Saenz Julienne --- Changes in v2: None arch/arm64/mm/init.c | 2

Re: [PATCH v2] HID: input: fix a4tech horizontal wheel custom usage

2019-08-01 Thread Nicolas Saenz Julienne
On Tue, 2019-06-11 at 14:13 +0200, Nicolas Saenz Julienne wrote: > Some a4tech mice use the 'GenericDesktop.00b8' usage to inform whether > the previous wheel report was horizontal or vertical. Before > c01908a14bf73 ("HID: input: add mapping for "Toggle Display" key&

[PATCH 0/8] Raspberry Pi 4 DMA addressing support

2019-07-31 Thread Nicolas Saenz Julienne
*. That's all. Regards, Nicolas * These solutions where already discussed on the previous RFC (see link above). --- Nicolas Saenz Julienne (8): arm64: mm: use arm64_dma_phys_limit instead of calling max_zone_dma_phys() arm64: rename variables used to calculate ZONE_DMA32's size of/fdt: add

[PATCH 1/8] arm64: mm: use arm64_dma_phys_limit instead of calling max_zone_dma_phys()

2019-07-31 Thread Nicolas Saenz Julienne
By the time we call zones_sizes_init() arm64_dma_phys_limit already contains the result of max_zone_dma_phys(). We use the variable instead of calling the function directly to save some precious cpu time. Signed-off-by: Nicolas Saenz Julienne --- arch/arm64/mm/init.c | 2 +- 1 file changed, 1

[RFC] ARM: bcm2835: register dmabounce on devices hooked to main interconnect

2019-07-23 Thread Nicolas Saenz Julienne
-kernel/msg742120.html [2] https://www.spinics.net/lists/arm-kernel/msg742736.html Signed-off-by: Nicolas Saenz Julienne --- arch/arm/mach-bcm/Kconfig | 1 + arch/arm/mach-bcm/board_bcm2835.c | 29 + 2 files changed, 30 insertions(+) diff --git a/arch/arm/mach

[RFC 2/4] arm64: mm: parse dma-ranges in order to better estimate arm64_dma_phys_limit

2019-07-17 Thread Nicolas Saenz Julienne
to calculate the lowest common denominator dma physical limit. If no dma-ranges is available, we'll default to the old scheme. Signed-off-by: Nicolas Saenz Julienne --- arch/arm64/mm/init.c | 61 +--- 1 file changed, 57 insertions(+), 4 deletions(-) diff --git

[RFC 4/4] arm64: mm: set direct_dma_min_mask according to dma-ranges

2019-07-17 Thread Nicolas Saenz Julienne
Now that we parse the dma-ranges during initialization we can fine-tune the DMA mask used by the direct DMA implementation. We set the mask based on the size of the DMA addressable memory, and if bigger than 4GB we force it to DMA_BIT_MASK(32) as it's always been. Signed-off-by: Nicolas Saenz

[RFC 1/4] arm64: mm: use arm64_dma_phys_limit instead of calling max_zone_dma_phys()

2019-07-17 Thread Nicolas Saenz Julienne
By the time we call zones_sizes_init() arm64_dma_phys_limit already contains the result of max_zone_dma_phys(). We use the variable instead of calling the function directly to save some precious cpu time. Signed-off-by: Nicolas Saenz Julienne --- arch/arm64/mm/init.c | 2 +- 1 file changed, 1

Re: [PATCH v2] HID: input: fix a4tech horizontal wheel custom usage

2019-07-05 Thread Nicolas Saenz Julienne
On Fri, 2019-06-14 at 16:25 +0200, Nicolas Saenz Julienne wrote: > On Fri, 2019-06-14 at 15:36 +0200, Benjamin Tissoires wrote: > > Hi Wolfgang, > > > > On Thu, Jun 13, 2019 at 1:49 PM Wolfgang Bauer wrote: > > > On Tuesday, 11. Juni 2019, 16:42:37 Benjamin Tissoi

[PATCH v2] xhci: clear port_remote_wakeup after resume failure

2019-07-02 Thread Nicolas Saenz Julienne
T state. Making sure the above mentioned situation doesn't trigger a PM busyloop. Signed-off-by: Nicolas Saenz Julienne --- Changes since v1: - Do not trigger clear based on PLS_MASK != XDEV_RESUME to avoid a potential race condition between the irq handler and hub thread. drivers/usb

Re: [PATCH v2] HID: input: fix a4tech horizontal wheel custom usage

2019-06-14 Thread Nicolas Saenz Julienne
On Fri, 2019-06-14 at 15:36 +0200, Benjamin Tissoires wrote: > Hi Wolfgang, > > On Thu, Jun 13, 2019 at 1:49 PM Wolfgang Bauer wrote: > > On Tuesday, 11. Juni 2019, 16:42:37 Benjamin Tissoires wrote: > > > On Tue, Jun 11, 2019 at 2:13 PM Nicolas Saenz Julienne > >

Re: Regression post "HID: core: move Usage Page concatenation to Main item"

2019-06-14 Thread Nicolas Saenz Julienne
On Fri, 2019-06-14 at 10:52 +0200, Nicolas Saenz Julienne wrote: > On Fri, 2019-06-14 at 09:02 +0900, Jean-Baptiste Théou wrote: > > Sorry - Please find the public link: > > > > > https://android.googlesource.com/platform/cts/+/master/tests/tests/hardware/res/raw/as

Re: Regression post "HID: core: move Usage Page concatenation to Main item"

2019-06-14 Thread Nicolas Saenz Julienne
On Fri, 2019-06-14 at 09:02 +0900, Jean-Baptiste Théou wrote: > Sorry - Please find the public link: > > https://android.googlesource.com/platform/cts/+/master/tests/tests/hardware/res/raw/asus_gamepad_register.json > > Best regards > > On Fri, Jun 14, 2019 at 9:01 AM Jean-Baptiste Théou >

Re: Regression post "HID: core: move Usage Page concatenation to Main item"

2019-06-14 Thread Nicolas Saenz Julienne
On Fri, 2019-06-14 at 09:01 +0900, Jean-Baptiste Théou wrote: > Hi, > > This patch (58e75155009cc85629955d3482f36a1e0eec) is triggering a > regression with the following descriptor (report not working as > expected) > >

[PATCH v4 4/7] cpufreq: add driver for Raspberry Pi

2019-06-12 Thread Nicolas Saenz Julienne
, this implements a full fledged driver, as opposed to most drivers registering cpufreq-dt, which only make use of an init routine. Signed-off-by: Nicolas Saenz Julienne Acked-by: Eric Anholt Reviewed-by: Stephen Boyd --- Changes since v3: - Fix spelling error in commit's subject Changes since v2

[PATCH v4 3/7] firmware: raspberrypi: register clk device

2019-06-12 Thread Nicolas Saenz Julienne
Since clk-raspberrypi is tied to the VC4 firmware instead of particular hardware it's registration should be performed by the firmware driver. Signed-off-by: Nicolas Saenz Julienne Acked-by: Eric Anholt --- drivers/firmware/raspberrypi.c | 10 ++ 1 file changed, 10 insertions(+) diff

[PATCH v4 5/7] clk: raspberrypi: register platform device for raspberrypi-cpufreq

2019-06-12 Thread Nicolas Saenz Julienne
Saenz Julienne Acked-by: Eric Anholt --- Changes since v2: - Use raspberrypi_clk struct to store cpufreq platform_device drivers/clk/bcm/clk-raspberrypi.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/drivers/clk/bcm/clk-raspberrypi.c b/drivers/clk/bcm/clk

[PATCH v4 6/7] ARM: defconfig: enable cpufreq driver for RPi

2019-06-12 Thread Nicolas Saenz Julienne
frequency transition latency. Signed-off-by: Nicolas Saenz Julienne Acked-by: Stefan Wahren --- Changes since v2: - Change default governor to conservative in bcm2835_defconfig - Set all as builtin in bcm2835_defconfig arch/arm/configs/bcm2835_defconfig | 9 + arch/arm/configs

[PATCH v4 2/7] clk: bcm283x: add driver interfacing with Raspberry Pi's firmware

2019-06-12 Thread Nicolas Saenz Julienne
+ * + * Copyright (C) 2019 Nicolas Saenz Julienne + */ + +#include +#include +#include +#include +#include + +#include + +#define RPI_FIRMWARE_ARM_CLK_ID0x0003 + +#define RPI_FIRMWARE_STATE_ENABLE_BIT BIT(0) +#define RPI_FIRMWARE_STATE_WAIT_BITBIT(1) + +/* + * Even t

[PATCH v4 7/7] arm64: defconfig: enable cpufreq support for RPi3

2019-06-12 Thread Nicolas Saenz Julienne
This enables both the new firmware clock driver and cpufreq driver available for the RPi3 family of boards. Signed-off-by: Nicolas Saenz Julienne Acked-by: Stefan Wahren --- Changes since v2: - Build both drivers as modules arch/arm64/configs/defconfig | 2 ++ 1 file changed, 2 insertions

[PATCH v4 0/7] cpufreq support for Raspberry Pi

2019-06-12 Thread Nicolas Saenz Julienne
now registered by firmware driver - raspberrypi-cpufreq device now registered by clk driver - Reimplemented clk rounding unsing determine_rate() - Enabled in configs for arm and arm64 Changes since RFC: - Move firmware clk device into own driver Nicolas Saenz Julienne (7): clk: bcm2835: re

[PATCH v4 1/7] clk: bcm2835: remove pllb

2019-06-12 Thread Nicolas Saenz Julienne
Raspberry Pi's firmware controls this pll, we should use the firmware interface to access it. Signed-off-by: Nicolas Saenz Julienne Acked-by: Eric Anholt --- Changes since v1: - Add comment to explain why pllb isn't there anymore drivers/clk/bcm/clk-bcm2835.c | 28

Re: [PATCH v2 1/2] net: ethernet: wiznet: w5X00 add device tree support

2019-06-12 Thread Nicolas Saenz Julienne
On Wed, 2019-06-12 at 09:52 -0700, David Miller wrote: > From: Nicolas Saenz Julienne > Date: Wed, 12 Jun 2019 14:25:25 +0200 > > > The w5X00 chip provides an SPI to Ethernet inteface. This patch allows > > platform devices to be defined through the device tree. > >

[PATCH v2 2/2] dt-bindings: net: wiznet: add w5x00 support

2019-06-12 Thread Nicolas Saenz Julienne
Add bindings for Wiznet's w5x00 series of SPI interfaced Ethernet chips. Based on the bindings for microchip,enc28j60. Signed-off-by: Nicolas Saenz Julienne --- Changes since v1: - one compatible sting per line - use correct 'ethenet@0' phandle name .../devicetree/bindings/net/wiznet

[PATCH v2 1/2] net: ethernet: wiznet: w5X00 add device tree support

2019-06-12 Thread Nicolas Saenz Julienne
The w5X00 chip provides an SPI to Ethernet inteface. This patch allows platform devices to be defined through the device tree. Signed-off-by: Nicolas Saenz Julienne --- drivers/net/ethernet/wiznet/w5100-spi.c | 24 ++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff

Re: [PATCH 1/2] input: edt-ft5x06 - add polled input support

2019-06-12 Thread Nicolas Saenz Julienne
On Tue, 2019-04-30 at 20:58 +0200, Nicolas Saenz Julienne wrote: > Some hardware configurations might pass on providing an interrupt line. > In that case there is always the option to use a polled input approach. > This patch adapts the driver for it. > > The polled approach is

Re: [PATCH v3 4/7] cpufreq: add driver for Raspbery Pi

2019-06-12 Thread Nicolas Saenz Julienne
On Tue, 2019-06-11 at 19:58 +0200, Nicolas Saenz Julienne wrote: > Raspberry Pi's firmware offers and interface though which update it's > performance requirements. It allows us to request for specific runtime > frequencies, which the firmware might or might not respect,

[PATCH v3 7/7] arm64: defconfig: enable cpufreq support for RPi3

2019-06-11 Thread Nicolas Saenz Julienne
This enables both the new firmware clock driver and cpufreq driver available for the RPi3 family of boards. Signed-off-by: Nicolas Saenz Julienne --- Changes since v2: - Build both drivers as modules arch/arm64/configs/defconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch

[PATCH v3 6/7] ARM: defconfig: enable cpufreq driver for RPi

2019-06-11 Thread Nicolas Saenz Julienne
frequency transition latency. Signed-off-by: Nicolas Saenz Julienne --- Changes since v2: - Change default governor to conservative in bcm2835_defconfig - Set all as builtin in bcm2835_defconfig arch/arm/configs/bcm2835_defconfig | 9 + arch/arm/configs/multi_v7_defconfig | 2

[PATCH v3 5/7] clk: raspberrypi: register platform device for raspberrypi-cpufreq

2019-06-11 Thread Nicolas Saenz Julienne
Saenz Julienne Acked-by: Eric Anholt --- Changes since v2: - Use raspberrypi_clk struct to store cpufreq platform_device drivers/clk/bcm/clk-raspberrypi.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/drivers/clk/bcm/clk-raspberrypi.c b/drivers/clk/bcm/clk

[PATCH v3 4/7] cpufreq: add driver for Raspbery Pi

2019-06-11 Thread Nicolas Saenz Julienne
, this implements a full fledged driver, as opposed to most drivers registering cpufreq-dt, which only make use of an init routine. Signed-off-by: Nicolas Saenz Julienne Acked-by: Eric Anholt Reviewed-by: Stephen Boyd --- Changes since v1: - Remove compatible checks - Add module support, now

[PATCH v3 3/7] firmware: raspberrypi: register clk device

2019-06-11 Thread Nicolas Saenz Julienne
Since clk-raspberrypi is tied to the VC4 firmware instead of particular hardware it's registration should be performed by the firmware driver. Signed-off-by: Nicolas Saenz Julienne Acked-by: Eric Anholt --- drivers/firmware/raspberrypi.c | 10 ++ 1 file changed, 10 insertions(+) diff

[PATCH v3 2/7] clk: bcm283x: add driver interfacing with Raspberry Pi's firmware

2019-06-11 Thread Nicolas Saenz Julienne
the firmware 'owns' it. + * We're not allowed to change it directly as we might race with the + * over-temperature and under-voltage protections provided by the firmware. + * + * Copyright (C) 2019 Nicolas Saenz Julienne + */ + +#include +#include +#include +#include +#include + +#i

[PATCH v3 1/7] clk: bcm2835: remove pllb

2019-06-11 Thread Nicolas Saenz Julienne
Raspberry Pi's firmware controls this pll, we should use the firmware interface to access it. Signed-off-by: Nicolas Saenz Julienne Acked-by: Eric Anholt --- Changes since v1: - Add comment to explain why pllb isn't there anymore drivers/clk/bcm/clk-bcm2835.c | 28

[PATCH v3 0/7] cpufreq support for Raspberry Pi

2019-06-11 Thread Nicolas Saenz Julienne
clk driver - Reimplemented clk rounding unsing determine_rate() - Enabled in configs for arm and arm64 Changes since RFC: - Move firmware clk device into own driver Nicolas Saenz Julienne (7): clk: bcm2835: remove pllb clk: bcm283x: add driver interfacing with Raspberry Pi's firmware firm

[PATCH v2] HID: input: fix a4tech horizontal wheel custom usage

2019-06-11 Thread Nicolas Saenz Julienne
ke sure the custom event handling properly handles both reports. Fixes: c01908a14bf73 ("HID: input: add mapping for "Toggle Display" key") Signed-off-by: Nicolas Saenz Julienne --- NOTE: I CC'd Wolfgang as he's the one who can test this. Changes since v1: - new approach, move

Re: [PATCH] HID: input: fix a4tech horizontal wheel custom usage id

2019-06-11 Thread Nicolas Saenz Julienne
On Tue, 2019-06-11 at 10:43 +0200, Benjamin Tissoires wrote: > Hi Nicolas, > > On Mon, Jun 10, 2019 at 8:54 PM Nicolas Saenz Julienne > wrote: > > Some a4tech mice use the 'GenericDesktop.00b8' usage id to inform > > whether the previous wheel report was horizo

[PATCH] HID: input: fix a4tech horizontal wheel custom usage id

2019-06-10 Thread Nicolas Saenz Julienne
the handling of the usage id back to it's previous behavior. Fixes: c01908a14bf73 ("HID: input: add mapping for "Toggle Display" key") Signed-off-by: Nicolas Saenz Julienne --- drivers/hid/hid-input.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dr

Re: [PATCH] xhci: clear port_remote_wakeup after resume failure

2019-06-08 Thread Nicolas Saenz Julienne
On Tue, 2019-06-04 at 16:53 +0300, Mathias Nyman wrote: > On 27.5.2019 14.28, Nicolas Saenz Julienne wrote: > > Hi Matthias, > > thanks for the review. > > > > On Mon, 2019-05-27 at 14:16 +0300, Mathias Nyman wrote: > > > On 24.5.2019 17.52, Nicolas Saenz J

Re: [PATCH v2 4/7] cpufreq: add driver for Raspbery Pi

2019-06-07 Thread Nicolas Saenz Julienne
On Fri, 2019-06-07 at 13:42 +0200, Stefan Wahren wrote: > Hi Nicolas, > > Am 06.06.19 um 16:22 schrieb Nicolas Saenz Julienne: > > Raspberry Pi's firmware offers and interface though which update it's > > performance requirements. It allows us to request for specific ru

Re: [PATCH v2 7/7] arm64: defconfig: enable cpufreq support for RPi3

2019-06-07 Thread Nicolas Saenz Julienne
On Fri, 2019-06-07 at 12:19 +0200, Stefan Wahren wrote: > Hi Nicolas, > > Am 06.06.19 um 16:23 schrieb Nicolas Saenz Julienne: > > This enables both the new firmware clock driver and cpufreq driver > > available for the RPi3 family of boards. > > > > Sign

Re: [PATCH v2 2/7] clk: bcm283x: add driver interfacing with Raspberry Pi's firmware

2019-06-07 Thread Nicolas Saenz Julienne
On Fri, 2019-06-07 at 11:26 +0200, Stefan Wahren wrote: > Hi Nicolas, > > Am 06.06.19 um 16:22 schrieb Nicolas Saenz Julienne: > > Raspberry Pi's firmware offers an interface though which update it's > > clock's frequencies. This is specially useful in order to change the CP

Re: [PATCH v2 4/7] cpufreq: add driver for Raspbery Pi

2019-06-06 Thread Nicolas Saenz Julienne
On Thu, 2019-06-06 at 11:23 -0700, Stephen Boyd wrote: > Quoting Nicolas Saenz Julienne (2019-06-06 11:10:04) > > On Thu, 2019-06-06 at 10:36 -0700, Stephen Boyd wrote: > > > Quoting Nicolas Saenz Julienne (2019-06-06 10:22:16) > > > > Hi Stephen,

Re: [PATCH v2 4/7] cpufreq: add driver for Raspbery Pi

2019-06-06 Thread Nicolas Saenz Julienne
On Thu, 2019-06-06 at 10:36 -0700, Stephen Boyd wrote: > Quoting Nicolas Saenz Julienne (2019-06-06 10:22:16) > > Hi Stephen, > > Thanks for the review. > > > > On Thu, 2019-06-06 at 10:09 -0700, Stephen Boyd wrote: > > > Quoting Nicolas Saenz Julienne (201

Re: [PATCH v2 4/7] cpufreq: add driver for Raspbery Pi

2019-06-06 Thread Nicolas Saenz Julienne
Hi Stephen, Thanks for the review. On Thu, 2019-06-06 at 10:09 -0700, Stephen Boyd wrote: > Quoting Nicolas Saenz Julienne (2019-06-06 07:22:56) > > diff --git a/drivers/cpufreq/raspberrypi-cpufreq.c > > b/drivers/cpufreq/raspberrypi-cpufreq.c > > new file mode 100644 &

Re: [PATCH v2 5/7] clk: raspberrypi: register platform device for raspberrypi-cpufreq

2019-06-06 Thread Nicolas Saenz Julienne
On Thu, 2019-06-06 at 10:05 -0700, Stephen Boyd wrote: > Quoting Nicolas Saenz Julienne (2019-06-06 07:22:58) > > diff --git a/drivers/clk/bcm/clk-raspberrypi.c b/drivers/clk/bcm/clk- > > raspberrypi.c > > index b1365cf19f3a..052296b5fbe4 100644 > > --- a/driver

Re: [PATCH v2 2/7] clk: bcm283x: add driver interfacing with Raspberry Pi's firmware

2019-06-06 Thread Nicolas Saenz Julienne
On Thu, 2019-06-06 at 16:22 +0200, Nicolas Saenz Julienne wrote: > Raspberry Pi's firmware offers an interface though which update it's > clock's frequencies. This is specially useful in order to change the CPU > clock (pllb_arm) which is 'owned' by the firmware and we're unable to >

[PATCH v2 7/7] arm64: defconfig: enable cpufreq support for RPi3

2019-06-06 Thread Nicolas Saenz Julienne
This enables both the new firmware clock driver and cpufreq driver available for the RPi3 family of boards. Signed-off-by: Nicolas Saenz Julienne --- arch/arm64/configs/defconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig

[PATCH v2 5/7] clk: raspberrypi: register platform device for raspberrypi-cpufreq

2019-06-06 Thread Nicolas Saenz Julienne
Saenz Julienne Acked-by: Eric Anholt --- drivers/clk/bcm/clk-raspberrypi.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/drivers/clk/bcm/clk-raspberrypi.c b/drivers/clk/bcm/clk-raspberrypi.c index b1365cf19f3a..052296b5fbe4 100644 --- a/drivers/clk/bcm/clk-raspberrypi.c

[PATCH v2 6/7] ARM: defconfig: enable cpufreq driver for RPi

2019-06-06 Thread Nicolas Saenz Julienne
, statistics, etc...). Signed-off-by: Nicolas Saenz Julienne --- arch/arm/configs/bcm2835_defconfig | 9 + arch/arm/configs/multi_v7_defconfig | 2 ++ 2 files changed, 11 insertions(+) diff --git a/arch/arm/configs/bcm2835_defconfig b/arch/arm/configs/bcm2835_defconfig index dcf7610cfe55

[PATCH v2 4/7] cpufreq: add driver for Raspbery Pi

2019-06-06 Thread Nicolas Saenz Julienne
, this implements a full fledged driver, as opposed to most drivers registering cpufreq-dt, which only make use of an init routine. Signed-off-by: Nicolas Saenz Julienne Acked-by: Eric Anholt --- Changes since v1: - Remove compatible checks - Add module support, now full fledged driver - Use

[PATCH v2 3/7] firmware: raspberrypi: register clk device

2019-06-06 Thread Nicolas Saenz Julienne
Since clk-raspberrypi is tied to the VC4 firmware instead of particular hardware it's registration should be performed by the firmware driver. Signed-off-by: Nicolas Saenz Julienne Acked-by: Eric Anholt --- drivers/firmware/raspberrypi.c | 10 ++ 1 file changed, 10 insertions(+) diff

[PATCH v2 2/7] clk: bcm283x: add driver interfacing with Raspberry Pi's firmware

2019-06-06 Thread Nicolas Saenz Julienne
oltage protections provided by the firmware. + * + * Copyright (C) 2019 Nicolas Saenz Julienne + */ + +#include +#include +#include +#include +#include + +#include + +#define RPI_FIRMWARE_ARM_CLK_ID0x3 + +#define RPI_FIRMWARE_STATE_ENABLE_BIT BIT(0) +#define RPI_FIRMW

[PATCH v2 1/7] clk: bcm2835: remove pllb

2019-06-06 Thread Nicolas Saenz Julienne
Raspberry Pi's firmware controls this pll, we should use the firmware interface to access it. Signed-off-by: Nicolas Saenz Julienne Acked-by: Eric Anholt --- Changes since v1: - Add comment to explain why pllb isn't there anymore drivers/clk/bcm/clk-bcm2835.c | 28

[PATCH v2 0/7] cpufreq support for Raspberry Pi

2019-06-06 Thread Nicolas Saenz Julienne
-cpufreq device now registered by clk driver - Reimplemented clk rounding unsing determine_rate() - Enabled in configs for arm and arm64 Changes since RFC: - Move firmware clk device into own driver Nicolas Saenz Julienne (7): clk: bcm2835: remove pllb clk: bcm283x: add driver interfacing

Re: [PATCH 0/4] cpufreq support for the Raspberry Pi

2019-06-05 Thread Nicolas Saenz Julienne
On Wed, 2019-06-05 at 13:34 +0200, Stefan Wahren wrote: > Hi, > > Am 05.06.19 um 13:00 schrieb Nicolas Saenz Julienne: > > Hi Stefan, > > thanks for the review, I took note of your code comments. > > > > On Wed, 2019-06-05 at 11:46 +0200, Stefan Wahren wrote:

Re: [PATCH 0/4] cpufreq support for the Raspberry Pi

2019-06-05 Thread Nicolas Saenz Julienne
Hi Stefan, On Wed, 2019-06-05 at 13:34 +0200, Stefan Wahren wrote: > Hi, > > Am 05.06.19 um 13:00 schrieb Nicolas Saenz Julienne: > > Hi Stefan, > > thanks for the review, I took note of your code comments. > > > > On Wed, 2019-06-05 at 11:46 +0200, Stef

Re: [PATCH 2/4] clk: bcm283x: add driver interfacing with Raspberry Pi's firmware

2019-06-05 Thread Nicolas Saenz Julienne
Hi Stefan, thanks for your review. On Wed, 2019-06-05 at 12:44 +0200, Stefan Wahren wrote: > Hi Nicolas, > > Am 04.06.19 um 19:32 schrieb Nicolas Saenz Julienne: > > Raspberry Pi's firmware offers and interface though which update it's > > clock's frequencies. This is spec

Re: [PATCH 0/4] cpufreq support for the Raspberry Pi

2019-06-05 Thread Nicolas Saenz Julienne
Hi Stefan, thanks for the review, I took note of your code comments. On Wed, 2019-06-05 at 11:46 +0200, Stefan Wahren wrote: > Hi Nicolas, > > Am 04.06.19 um 19:32 schrieb Nicolas Saenz Julienne: > > Hi all, > > this series aims at adding cpufreq support to the Raspberry Pi

Re: [PATCH 4/4] cpufreq: add driver for Raspbery Pi

2019-06-05 Thread Nicolas Saenz Julienne
Hi Eric, On Tue, 2019-06-04 at 17:18 -0700, Eric Anholt wrote: > Nicolas Saenz Julienne writes: > > > Raspberry Pi's firmware offers and interface though which update it's > > performance requirements. It allows us to request for specific runtime > > frequencies,

Re: [PATCH 3/4] clk: bcm2835: register Raspberry Pi's firmware clk device

2019-06-05 Thread Nicolas Saenz Julienne
On Tue, 2019-06-04 at 17:00 -0700, Eric Anholt wrote: > Nicolas Saenz Julienne writes: > > > Registers clk-raspberrypi as a platform device as part of the driver's > > probe sequence. > > Similar to how we have VCHI register platform devices for the services > VCHI

[PATCH 4/4] cpufreq: add driver for Raspbery Pi

2019-06-04 Thread Nicolas Saenz Julienne
are configurable in the firmware there is no way to know in advance their values. So the Raspberry Pi cpufreq driver queries them, builds an opp frequency table to then launch cpufreq-dt. Signed-off-by: Nicolas Saenz Julienne --- Changes since RFC: - Alphabetically ordered relevant stuff

[PATCH 3/4] clk: bcm2835: register Raspberry Pi's firmware clk device

2019-06-04 Thread Nicolas Saenz Julienne
Registers clk-raspberrypi as a platform device as part of the driver's probe sequence. Signed-off-by: Nicolas Saenz Julienne --- drivers/clk/bcm/clk-bcm2835.c | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk

[PATCH 2/4] clk: bcm283x: add driver interfacing with Raspberry Pi's firmware

2019-06-04 Thread Nicolas Saenz Julienne
Raspberry Pi's firmware offers and interface though which update it's clock's frequencies. This is specially useful in order to change the CPU clock (pllb_arm) which is 'owned' by the firmware and we're unable to scale using the register interface. Signed-off-by: Nicolas Saenz Julienne

[PATCH 1/4] clk: bcm2835: remove pllb

2019-06-04 Thread Nicolas Saenz Julienne
Raspberry Pi's firmware controls this pll, we should use the firmware interface to access it. Signed-off-by: Nicolas Saenz Julienne --- drivers/clk/bcm/clk-bcm2835.c | 25 - 1 file changed, 25 deletions(-) diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk

[PATCH 0/4] cpufreq support for the Raspberry Pi

2019-06-04 Thread Nicolas Saenz Julienne
olas Saenz Julienne (4): clk: bcm2835: remove pllb clk: bcm283x: add driver interfacing with Raspberry Pi's firmware clk: bcm2835: register Raspberry Pi's firmware clk device cpufreq: add driver for Raspbery Pi drivers/clk/bcm/Makefile | 1 + drivers/clk/bcm/clk-bcm28

Re: [PATCH] xhci: clear port_remote_wakeup after resume failure

2019-05-27 Thread Nicolas Saenz Julienne
Hi Matthias, thanks for the review. On Mon, 2019-05-27 at 14:16 +0300, Mathias Nyman wrote: > On 24.5.2019 17.52, Nicolas Saenz Julienne wrote: > > This was seen on a Dell Precision 5520 using it's WD15 dock. The dock's > > Ethernet device interfaces with the laptop through o

[PATCH] xhci: clear port_remote_wakeup after resume failure

2019-05-24 Thread Nicolas Saenz Julienne
t_remote_wakeup" upon detecting a device with a wrong resuming port state (see Table 4-9 in 4.15.2.3). Making sure the above mentioned situation doesn't trigger a PM busyloop. Signed-off-by: Nicolas Saenz Julienne --- drivers/usb/host/xhci-hub.c | 10 -- 1 file changed, 8 insertions(+),

Re: [RFC v2 3/5] clk: bcm2835: use firmware interface to update pllb

2019-05-23 Thread Nicolas Saenz Julienne
On Tue, 2019-05-21 at 23:43 +0200, Stefan Wahren wrote: > > Nicolas Saenz Julienne hat am 21. Mai 2019 um 17:47 > > geschrieben: > > > > > > Hi Stefan, thanks for your comments! > > > > On Tue, 2019-05-21 at 14:40 +0200, Stefan Wahren wrote: > &

Re: [RFC v2 3/5] clk: bcm2835: use firmware interface to update pllb

2019-05-21 Thread Nicolas Saenz Julienne
roach. > > > > On 20.05.19 12:47, Nicolas Saenz Julienne wrote: > > > Raspberry Pi's firmware, which runs in a dedicated processor, keeps > > maybe we should clarify that the firmware is running in the VPU > > > track of the board's temperature and voltage. It's respos

Re: [RFC v2 3/5] clk: bcm2835: use firmware interface to update pllb

2019-05-21 Thread Nicolas Saenz Julienne
On Tue, 2019-05-21 at 14:14 +0200, Petr Tesarik wrote: > On Tue, 21 May 2019 13:39:31 +0200 > Nicolas Saenz Julienne wrote: > > > Hi Oliver, thanks for the review. > > > > On Mon, 2019-05-20 at 14:43 +0200, Oliver Neukum wrote: > > > On Mo, 2019-05-20 at

Re: [RFC v2 0/5] cpufreq support for the Raspberry Pi

2019-05-21 Thread Nicolas Saenz Julienne
Hi Viresh, thanks for the comments. On Mon, 2019-05-20 at 16:21 +0530, Viresh Kumar wrote: > On 20-05-19, 12:47, Nicolas Saenz Julienne wrote: > > Hi all, > > as some of you may recall I've been spending some time looking into > > providing 'cpufreq' support for the Raspbe

Re: [RFC v2 4/5] dts: bcm2837: add per-cpu clock devices

2019-05-21 Thread Nicolas Saenz Julienne
On Mon, 2019-05-20 at 14:19 +0200, Stefan Wahren wrote: > Hi Nicolas, > > On 20.05.19 12:47, Nicolas Saenz Julienne wrote: > > The four CPUs share a same clock source called pllb_arm. The clock can > > be scaled through the raspberrypi firmware interface. > do you see

Re: [RFC v2 3/5] clk: bcm2835: use firmware interface to update pllb

2019-05-21 Thread Nicolas Saenz Julienne
Hi Oliver, thanks for the review. On Mon, 2019-05-20 at 14:43 +0200, Oliver Neukum wrote: > On Mo, 2019-05-20 at 12:47 +0200, Nicolas Saenz Julienne wrote: > > + * For more information on the firmware interface check: > > + * https://github.com/raspberrypi/firmware/wiki/Mailbox-pro

[RFC v2 2/5] clk: bcm2835: set pllb_arm divisor as readonly

2019-05-20 Thread Nicolas Saenz Julienne
This divisor is controlled by the firmware, we don't want the clock subsystem to update it inadvertently. Signed-off-by: Nicolas Saenz Julienne --- drivers/clk/bcm/clk-bcm2835.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk

[RFC v2 0/5] cpufreq support for the Raspberry Pi

2019-05-20 Thread Nicolas Saenz Julienne
: - Addressed Viresh's comments in cpufreq driver - Resend with (hopefully) proper CCs Nicolas Saenz Julienne (5): clk: bcm2835: set CLK_GET_RATE_NOCACHE on CPU clocks clk: bcm2835: set pllb_arm divisor as readonly clk: bcm2835: use firmware interface to update pllb dts: bcm2837: add per

[RFC v2 1/5] clk: bcm2835: set CLK_GET_RATE_NOCACHE on CPU clocks

2019-05-20 Thread Nicolas Saenz Julienne
Raspberry Pi's firmware is responsible for updating the cpu clocks and pll. This makes sure we get the right rates anytime. Signed-off-by: Nicolas Saenz Julienne --- drivers/clk/bcm/clk-bcm2835.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/clk/bcm/clk

[RFC v2 4/5] dts: bcm2837: add per-cpu clock devices

2019-05-20 Thread Nicolas Saenz Julienne
The four CPUs share a same clock source called pllb_arm. The clock can be scaled through the raspberrypi firmware interface. Signed-off-by: Nicolas Saenz Julienne --- arch/arm/boot/dts/bcm2837.dtsi | 8 1 file changed, 8 insertions(+) diff --git a/arch/arm/boot/dts/bcm2837.dtsi b/arch

[RFC v2 3/5] clk: bcm2835: use firmware interface to update pllb

2019-05-20 Thread Nicolas Saenz Julienne
the clock's state or change it's frequency. Being the sole user of the bcm2835 clock driver, this integrates the firmware interface into the clock driver and adds a first user: the CPU pll, also known as 'pllb'. Signed-off-by: Nicolas Saenz Julienne --- drivers/clk/bcm/clk-bcm2835.c | 274

[RFC v2 5/5] cpufreq: add driver for Raspbery Pi

2019-05-20 Thread Nicolas Saenz Julienne
are configurable in the firmware there is no way to know in advance their values. So the Raspberry Pi cpufreq driver queries them, builds an opp frequency table to then launch cpufreq-dt. Signed-off-by: Nicolas Saenz Julienne --- drivers/cpufreq/Kconfig.arm | 8 +++ drivers/cpufreq

[RFC 4/5] dts: bcm2837: add per-cpu clock devices

2019-05-17 Thread Nicolas Saenz Julienne
The four CPUs share a same clock source called pllb_arm. The clock can be scaled through the raspberrypi firmware interface. Signed-off-by: Nicolas Saenz Julienne --- arch/arm/boot/dts/bcm2837.dtsi | 8 1 file changed, 8 insertions(+) diff --git a/arch/arm/boot/dts/bcm2837.dtsi b/arch

[RFC 0/5] cpufreq support for the Raspberry Pi

2019-05-17 Thread Nicolas Saenz Julienne
. This was tested on a RPi3b+ and if the series is well received I'll test it further on all platforms I own. That's all, kind regards, Nicolas [1] https://lists.infradead.org/pipermail/linux-rpi-kernel/2019-April/008634.html [2] https://www.spinics.net/lists/linux-clk/msg36937.html --- Nicolas Saenz

[RFC 5/5] cpufreq: add driver for Raspbery Pi

2019-05-17 Thread Nicolas Saenz Julienne
are configurable in the firmware there is no way to know in advance their values. So the Raspberry Pi cpufreq driver queries them, builds an opp frequency table to then launch cpufreq-dt. Signed-off-by: Nicolas Saenz Julienne --- drivers/cpufreq/Kconfig.arm | 8 +++ drivers/cpufreq

[RFC 3/5] clk: bcm2835: use firmware interface to update pllb

2019-05-17 Thread Nicolas Saenz Julienne
the clock's state or change it's frequency. Being the sole user of the bcm2835 clock driver, this integrates the firmware interface into the clock driver and adds a first user: the CPU pll, also known as 'pllb'. Signed-off-by: Nicolas Saenz Julienne --- drivers/clk/bcm/clk-bcm2835.c | 274

[RFC 1/5] clk: bcm2835: set CLK_GET_RATE_NOCACHE on CPU clocks

2019-05-17 Thread Nicolas Saenz Julienne
Raspberry Pi's firmware is responsible for updating the cpu clocks and pll. This makes sure we get the right rates anytime. Signed-off-by: Nicolas Saenz Julienne --- drivers/clk/bcm/clk-bcm2835.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/clk/bcm/clk

[RFC 2/5] clk: bcm2835: set pllb_arm divisor as readonly

2019-05-17 Thread Nicolas Saenz Julienne
This divisor is controlled by the firmware, we don't want the clock subsystem to update it inadvertently. Signed-off-by: Nicolas Saenz Julienne --- drivers/clk/bcm/clk-bcm2835.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk

[PATCH] spi: bcm2835: only split transfers that exceed DLEN if DMA available

2019-05-09 Thread Nicolas Saenz Julienne
There is no use for this when performing non DMA operations. So we bypass the split. Signed-off-by: Nicolas Saenz Julienne --- drivers/spi/spi-bcm2835.c | 20 +++- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/drivers/spi/spi-bcm2835.c b/drivers/spi/spi-bcm2835

[PATCH v3 3/4] staging: vchiq: make wait events interruptible

2019-05-09 Thread Nicolas Saenz Julienne
. Fixes: 852b2876a8a8 ("staging: vchiq: rework remove_event handling") Signed-off-by: Nicolas Saenz Julienne --- .../vc04_services/interface/vchiq_arm/vchiq_core.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/staging/vc04_services/interface

[PATCH v3 1/4] staging: vchiq_2835_arm: revert "quit using custom down_interruptible()"

2019-05-09 Thread Nicolas Saenz Julienne
("staging: vchiq_2835_arm: quit using custom down_interruptible()") Signed-off-by: Nicolas Saenz Julienne --- .../staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/vc04_services/interface

[PATCH v3 2/4] staging: vchiq: revert "switch to wait_for_completion_killable"

2019-05-09 Thread Nicolas Saenz Julienne
: a772f116702e ("staging: vchiq: switch to wait_for_completion_killable") Signed-off-by: Nicolas Saenz Julienne --- .../interface/vchiq_arm/vchiq_arm.c | 21 ++- .../interface/vchiq_arm/vchiq_core.c | 21 ++- .../interface/vchiq_arm/vc

[PATCH v3 0/4] staging: vchiq: use interruptible waits

2019-05-09 Thread Nicolas Saenz Julienne
rg/message/GBXGJ7DOV5CQQXFPOZCXTRD6W4BEPT4Q/ -- Changes since v2: - Cleaned up revert commit message - Rebase & merge conflict resolutions - Add code cleanup suggested by Dan Carpenter Changes since v1: - Proplery format revert commits - Add code comment to remind of this issue - Add Fixes tags Nicolas

[PATCH v3 4/4] staging: vchiq: stop explicitly comparing with zero to catch errors

2019-05-09 Thread Nicolas Saenz Julienne
. Signed-off-by: Nicolas Saenz Julienne --- .../bcm2835-camera/bcm2835-camera.c | 11 ++-- .../interface/vchiq_arm/vchiq_2835_arm.c | 2 +- .../interface/vchiq_arm/vchiq_arm.c | 66 --- .../interface/vchiq_arm/vchiq_connected.c | 4 +- .../interface

Re: [PATCH v2 0/3] staging: vchiq: use interruptible waits

2019-05-06 Thread Nicolas Saenz Julienne
On Mon, 2019-05-06 at 20:12 +0200, Stefan Wahren wrote: > Hi Nicolas, > > Am 06.05.19 um 16:40 schrieb Nicolas Saenz Julienne: > > Hi, > > ... > > > > Regards, > > Nicolas > > > > [1] https://github.com/raspberrypi/linux/issues/2881 > &

<    4   5   6   7   8   9   10   11   12   >