[RFC 16/50] staging: vchi: Get rid of vchi_msg_dequeue()

2020-05-27 Thread Nicolas Saenz Julienne
Nobody uses it. Get rid of it. Signed-off-by: Nicolas Saenz Julienne --- .../vc04_services/interface/vchi/vchi.h | 7 .../interface/vchiq_arm/vchiq_shim.c | 39 --- 2 files changed, 46 deletions(-) diff --git a/drivers/staging/vc04_services/interface/vchi

[RFC 11/50] staging: vchi: Get rid of all useless callback reasons

2020-05-27 Thread Nicolas Saenz Julienne
They are neither produced nor expected, so just delete them. Signed-off-by: Nicolas Saenz Julienne --- .../interface/vchi/vchi_common.h | 40 ++- 1 file changed, 3 insertions(+), 37 deletions(-) diff --git a/drivers/staging/vc04_services/interface/vchi

[RFC 09/50] staging: vchiq: move vchiq_release_message() into vchiq

2020-05-27 Thread Nicolas Saenz Julienne
For messages with a reason different from VCHIQ_MESSAGE_AVAILABLE the responsibility for releasing them is kept in vchi, in other words, services don't need to worry about it. As we're trying to unify vchi and vchiq, move the release code into vchiq. Signed-off-by: Nicolas Saenz Julienne

[RFC 14/50] staging: vchi: Unify struct shim_service and struct vchi_service_handle

2020-05-27 Thread Nicolas Saenz Julienne
struct shim_service into struvt vchi_service, which is more consistent with the rest of the exposed API. Signed-off-by: Nicolas Saenz Julienne --- .../bcm2835-audio/bcm2835-vchiq.c | 24 +++ .../vc04_services/interface/vchi/vchi.h | 27 .../interface/vchiq_arm

Re: [PATCH 04/15] PCI: brcmstb: Add compatibily of other chips

2020-05-22 Thread Nicolas Saenz Julienne
On Thu, 2020-05-21 at 15:35 -0400, Jim Quinlan wrote: > On Wed, May 20, 2020 at 7:51 AM Nicolas Saenz Julienne [...] > > > /* > > > @@ -602,20 +667,21 @@ static struct pci_ops brcm_pcie_ops = { > > > > > > static inline void brcm_pcie_bridge_sw_ini

Re: [PATCH v2 20/91] clk: bcm: rpi: Discover the firmware clocks

2020-05-21 Thread Nicolas Saenz Julienne
Hi Maxime, On Fri, 2020-05-15 at 10:19 +0200, Maxime Ripard wrote: > Hi Nicolas, > > On Mon, May 04, 2020 at 02:05:47PM +0200, Nicolas Saenz Julienne wrote: > > Hi Maxime, as always, thanks for the series! > > Some extra context, and comments below. > > > >

Re: [PATCH 04/15] PCI: brcmstb: Add compatibily of other chips

2020-05-20 Thread Nicolas Saenz Julienne
On Wed, 2020-05-20 at 10:30 -0400, Jim Quinlan wrote: > On Wed, May 20, 2020 at 7:51 AM Nicolas Saenz Julienne > wrote: [...] > > > + > > > +static const struct pcie_cfg_data bcm7278_cfg = { > > > + .reg_field_info = pcie_reg_field_i

Re: [PATCH 14/15] PCI: brcmstb: Set bus max burst side by chip type

2020-05-20 Thread Nicolas Saenz Julienne
On Tue, 2020-05-19 at 16:34 -0400, Jim Quinlan wrote: > From: Jim Quinlan > > The proper value of the parameter SCB_MAX_BURST_SIZE varies > per chip. The 2711 family requires 128B whereas other devices > can employ 512. The assignment is complicated by the fact > that the values for this

Re: [PATCH 04/15] PCI: brcmstb: Add compatibily of other chips

2020-05-20 Thread Nicolas Saenz Julienne
Hi Jim, On Tue, 2020-05-19 at 16:34 -0400, Jim Quinlan wrote: > From: Jim Quinlan > > Add in compatibility strings and code for three Broadcom STB chips. > Some of the register locations, shifts, and masks are different > for certain chips, requiring the use of different constants based > on

Re: [PATCH 09/15] device core: Add ability to handle multiple dma offsets

2020-05-20 Thread Nicolas Saenz Julienne
Hi Jim, thanks for having a go at this! My two cents. On Tue, 2020-05-19 at 16:34 -0400, Jim Quinlan wrote: > The device variable 'dma_pfn_offset' is used to do a single > linear map between cpu addrs and dma addrs. The variable > 'dma_map' is added to struct device to point to an array > of

Re: [PATCH v3 0/2] usb: xhci: Load Raspberry Pi 4 VL805's firmware

2020-05-13 Thread Nicolas Saenz Julienne
On Tue, 2020-05-05 at 18:26 +0200, Nicolas Saenz Julienne wrote: > Newer revisions of the RPi4 need their xHCI chip, VL805, firmware to be > loaded explicitly. Earlier versions didn't need that as they where using > an EEPROM for that purpose. This series takes care of setting up the &

Re: [PATCH v8 0/4] USB: pci-quirks: Add Raspberry Pi 4 quirk

2020-05-13 Thread Nicolas Saenz Julienne
On Wed, 2020-05-13 at 12:17 +0100, Lorenzo Pieralisi wrote: > On Tue, May 05, 2020 at 06:13:13PM +0200, Nicolas Saenz Julienne wrote: > > On the Raspberry Pi 4, after a PCI reset, VL805's firmware may either be > > loaded directly from an EEPROM or, if not present, by the SoC's &

[PATCH] MAINTAINERS: Update Raspberry Pi development repository

2020-05-11 Thread Nicolas Saenz Julienne
Eric Anholt's repo isn't used anymore. List current one. Signed-off-by: Nicolas Saenz Julienne --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index 091ec22c1a23..60908ace8d31 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3320,7

Re: [PATCH v8 2/4] firmware: raspberrypi: Introduce vl805 init routine

2020-05-09 Thread Nicolas Saenz Julienne
On Sat, 2020-05-09 at 12:02 +0200, Stefan Wahren wrote: > Hi Nicolas, > > Am 07.05.20 um 23:48 schrieb Rob Herring: > > On Tue, 5 May 2020 18:13:15 +0200, Nicolas Saenz Julienne wrote: > > > The Raspberry Pi 4 gets its USB functionality from VL805, a PCIe chip > >

[PATCH] PCI: brcmstb: Assert fundamental reset on initialization

2020-05-07 Thread Nicolas Saenz Julienne
: Add Broadcom STB PCIe host controller driver") Signed-off-by: Nicolas Saenz Julienne --- drivers/pci/controller/pcie-brcmstb.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/pci/controller/pcie-brcmstb.c b/drivers/pci/controller/pcie-brcmstb.c index 0b97b94c4a9a..795a03be4

Re: [PATCH v3 1/2] arm: rpi: Add function to trigger VL805's firmware load

2020-05-06 Thread Nicolas Saenz Julienne
Hi Bin, On Wed, 2020-05-06 at 13:33 +0800, Bin Meng wrote: > Hi Nicolas, > > On Wed, May 6, 2020 at 12:26 AM Nicolas Saenz Julienne > wrote: > > On the Raspberry Pi 4, after a PCI reset, VL805's (a xHCI chip) firmware > > may either be loaded directly from an E

[PATCH v3 0/2] usb: xhci: Load Raspberry Pi 4 VL805's firmware

2020-05-05 Thread Nicolas Saenz Julienne
ename function - Use callback in xhci-pci.c Nicolas Saenz Julienne (2): arm: rpi: Add function to trigger VL805's firmware load usb: xhci: Load Raspberry Pi 4 VL805's firmware arch/arm/mach-bcm283x/include/mach/mbox.h | 13 +++ arch/arm/mach-bcm283x/include/mach/msg.h | 7 arch/ar

[PATCH v3 2/2] usb: xhci: Load Raspberry Pi 4 VL805's firmware

2020-05-05 Thread Nicolas Saenz Julienne
in between the PCIe configuration and xHCI startup. Introduce a callback in xhci_pci_probe() to run this platform specific routine. Signed-off-by: Nicolas Saenz Julienne --- Changes since v2: - Get rid of #ifdef CONFIG_BCM2711 - Get rid of redundant error message Changes since v1: - Create

[PATCH v3 1/2] arm: rpi: Add function to trigger VL805's firmware load

2020-05-05 Thread Nicolas Saenz Julienne
Saenz Julienne --- Changes since v2: - Correct wrong function name in comment - Add better comment on rpi_firmware_init_vl805() Changes since v1: - Rename function so it's not mistaken with regular firmware loading arch/arm/mach-bcm283x/include/mach/mbox.h | 13 +++ arch/arm/mach-bcm283x

[PATCH v8 4/4] USB: pci-quirks: Add Raspberry Pi 4 quirk

2020-05-05 Thread Nicolas Saenz Julienne
can't be set as a module neither this can. Reflect that on the firmware interface Kconfg. Signed-off-by: Nicolas Saenz Julienne --- Changes since v5: - Fix Kconfig issue with allmodconfig Changes since v4: - Do not split up error message Changes since v3: - Add more complete error message

[PATCH v8 3/4] PCI: brcmstb: Wait for Raspberry Pi's firmware when present

2020-05-05 Thread Nicolas Saenz Julienne
xHCI's PCI fixup, run at the end of pcie-brcmstb's probe, depends on RPi4's VideoCore firmware interface to be up and running. It's possible for both initializations to race, so make sure it's available prior to starting. Signed-off-by: Nicolas Saenz Julienne Reviewed-by: Florian Fainelli

[PATCH v8 2/4] firmware: raspberrypi: Introduce vl805 init routine

2020-05-05 Thread Nicolas Saenz Julienne
logic and the VL805 firmware blob. The function this patch introduces triggers the aforementioned process. Signed-off-by: Nicolas Saenz Julienne --- Change since v7: - Use usleep_delay() - Add comment about PCI errors - Don't wait on error - Typos Change since v6: - Add test to avoid loading

[PATCH v8 1/4] soc: bcm2835: Add notify xHCI reset property

2020-05-05 Thread Nicolas Saenz Julienne
The property is needed in order to trigger VL805's firmware load. Note that gap between the property introduced and the previous one is due to the properties not being defined. Signed-off-by: Nicolas Saenz Julienne Reviewed-by: Florian Fainelli --- include/soc/bcm2835/raspberrypi-firmware.h

[PATCH v8 0/4] USB: pci-quirks: Add Raspberry Pi 4 quirk

2020-05-05 Thread Nicolas Saenz Julienne
since v5: - Fix issues reported by Kbuild test robot Changes since v4: - Addressed Sergei's comments - Fix potential warning in patch #2 Changes since v3: - Addressed Greg's comments There was no v2, my bad. Changes since v1: - Addressed Floarians comments Nicolas Saenz Julienne (4): soc

Re: [PATCH v2 2/2] usb: xhci: Load Raspberry Pi 4 VL805's firmware

2020-05-05 Thread Nicolas Saenz Julienne
On Tue, 2020-05-05 at 16:59 +0200, Matthias Brugger wrote: [...] > > > > > > +#ifdef CONFIG_BCM2711 > > > > > > > > > > This won't work with rpi_arm64_defconfig. > > > > > Can't we just evaluate at runtime if we need to do anything in > > > > > xhci_pci_fixup. > > > > > > > > I can't see why,

Re: [PATCH v2 2/2] usb: xhci: Load Raspberry Pi 4 VL805's firmware

2020-05-05 Thread Nicolas Saenz Julienne
On Tue, 2020-05-05 at 15:39 +0200, Matthias Brugger wrote: > > On 05/05/2020 14:53, Nicolas Saenz Julienne wrote: > > Hi Matthias, > > > > On Tue, 2020-05-05 at 14:15 +0200, Matthias Brugger wrote: > > > On 30/04/2020 15:04, Nicolas Saenz Julienne wrote: > &g

Re: [PATCH v2 4/4] PCI: brcmstb: Disable L0s component of ASPM if requested

2020-05-05 Thread Nicolas Saenz Julienne
e new generic dt property: Acked-by: Nicolas Saenz Julienne Regards, Nicolas > --- > drivers/pci/controller/pcie-brcmstb.c | 14 +- > 1 file changed, 13 insertions(+), 1 deletion(-) > > diff --git a/drivers/pci/controller/pcie-brcmstb.c > b/drivers/pci/controller/pcie-

Re: [PATCH v2 2/4] PCI: brcmstb: Fix window register offset from 4 to 8

2020-05-05 Thread Nicolas Saenz Julienne
t; Signed-off-by: Jim Quinlan > Acked-by: Florian Fainelli > > Fixes: c0452137034b ("PCI: brcmstb: Add Broadcom STB PCIe host controller > driver") > --- Acked-by: Nicolas Saenz Julienne Regards, Nicolas > drivers/pci/controller/pcie-brcmstb.c | 4 ++-- > 1 file chan

Re: [PATCH v2 1/4] PCI: brcmstb: Don't clk_put() a managed clock

2020-05-05 Thread Nicolas Saenz Julienne
On Fri, 2020-05-01 at 10:28 -0400, Jim Quinlan wrote: > From: Jim Quinlan > > clk_put() was being invoked on a clock obtained by > devm_clk_get_optional(). > > Signed-off-by: Jim Quinlan > Acked-by: Florian Fainelli > --- Acked-by: Nicolas Saenz Julienne Regards,

Re: [PATCH v2 2/2] usb: xhci: Load Raspberry Pi 4 VL805's firmware

2020-05-05 Thread Nicolas Saenz Julienne
Hi Matthias, On Tue, 2020-05-05 at 14:15 +0200, Matthias Brugger wrote: > > On 30/04/2020 15:04, Nicolas Saenz Julienne wrote: > > When needed, RPi4's co-processor (called VideoCore) has to be instructed > > to load VL805's firmware (the chip providing xHCI support). VideoC

Re: [PATCH v2 20/91] clk: bcm: rpi: Discover the firmware clocks

2020-05-04 Thread Nicolas Saenz Julienne
Hi Maxime, as always, thanks for the series! Some extra context, and comments below. On Fri, 2020-04-24 at 17:34 +0200, Maxime Ripard wrote: > The RaspberryPi4 firmware actually exposes more clocks than are currently > handled by the driver and we will need to change some of them directly > based

Re: [PATCH v7 2/4] firmware: raspberrypi: Introduce vl805 init routine

2020-05-04 Thread Nicolas Saenz Julienne
Hi Stefan, thanks for the review! On Sat, 2020-05-02 at 11:05 +0200, Stefan Wahren wrote: > > + /* Make sure we don't trigger a firmware load unnecesarely * > s/unnecesarely/unnecessarily/ Noted > > + pci_read_config_dword(pdev, VL805_PCI_CONFIG_VERSION_OFFSET, ); > pci_read_config_dword()

Re: [PATCH v2 04/91] firmware: rpi: Only create clocks device if we don't have a node for it

2020-04-30 Thread Nicolas Saenz Julienne
On Fri, 2020-04-24 at 17:33 +0200, Maxime Ripard wrote: > The firmware clocks driver was previously probed through a platform_device > created by the firmware driver. > > Since we will now have a node for that clocks driver, we need to create the > device only in the case where there's no node

Re: [PATCH v2 05/91] clk: bcm: rpi: Allow the driver to be probed by DT

2020-04-30 Thread Nicolas Saenz Julienne
On Fri, 2020-04-24 at 17:33 +0200, Maxime Ripard wrote: > The current firmware clock driver for the RaspberryPi can only be probed by > manually registering an associated platform_device. > > While this works fine for cpufreq where the device gets attached a clkdev > lookup, it would be tedious

Re: [PATCH v2 1/2] arm: rpi: Add function to trigger VL805's firmware load

2020-04-30 Thread Nicolas Saenz Julienne
On Thu, 2020-04-30 at 15:31 +0200, Mark Kettenis wrote: > > From: Nicolas Saenz Julienne > > Date: Thu, 30 Apr 2020 15:04:32 +0200 > > > > On the Raspberry Pi 4, after a PCI reset, VL805's (a xHCI chip) firmware > > may either be loaded directly fro

[PATCH v2 2/2] usb: xhci: Load Raspberry Pi 4 VL805's firmware

2020-04-30 Thread Nicolas Saenz Julienne
in between the PCIe configuration and xHCI startup. Introduce a callback in xhci_pci_probe() to run this platform specific routine. Signed-off-by: Nicolas Saenz Julienne --- Changes since v1: - Create callback board/raspberrypi/rpi/rpi.c | 12 drivers/usb/host/xhci-pci.c | 6

[PATCH v2 1/2] arm: rpi: Add function to trigger VL805's firmware load

2020-04-30 Thread Nicolas Saenz Julienne
Saenz Julienne --- Changes since v1: - Rename function so it's not mistaken with regular firmware loading arch/arm/mach-bcm283x/include/mach/mbox.h | 13 +++ arch/arm/mach-bcm283x/include/mach/msg.h | 7 arch/arm/mach-bcm283x/msg.c | 43 +++ 3 files

[PATCH v2 0/2] Raspberry Pi 4 VL805 firmware load

2020-04-30 Thread Nicolas Saenz Julienne
. Note that this builds on top of Sylwester Nawrocki's "USB host support for Raspberry Pi 4 board" series. --- Changes since v1: - Rename function - Use callback in xhci-pci.c Nicolas Saenz Julienne (2): arm: rpi: Add function to trigger VL805's firmware load usb: xhci: Load Rasp

[PATCH v7 0/4] USB: pci-quirks: Add Raspberry Pi 4 quirk

2020-04-29 Thread Nicolas Saenz Julienne
issues reported by Kbuild test robot Changes since v4: - Addressed Sergei's comments - Fix potential warning in patch #2 Changes since v3: - Addressed Greg's comments There was no v2, my bad. Changes since v1: - Addressed Floarians comments Nicolas Saenz Julienne (4): soc: bcm2835: Add notify

[PATCH v7 3/4] PCI: brcmstb: Wait for Raspberry Pi's firmware when present

2020-04-29 Thread Nicolas Saenz Julienne
xHCI's PCI fixup, run at the end of pcie-brcmstb's probe, depends on RPi4's VideoCore firmware interface to be up and running. It's possible for both initializations to race, so make sure it's available prior to starting. Signed-off-by: Nicolas Saenz Julienne Reviewed-by: Florian Fainelli

[PATCH v7 2/4] firmware: raspberrypi: Introduce vl805 init routine

2020-04-29 Thread Nicolas Saenz Julienne
logic and the VL805 firmware blob. The function this patch introduces triggers the aforementioned process. Signed-off-by: Nicolas Saenz Julienne --- Change since v6: - Add test to avoid loading the firmware when not needed - Since we have it around, print VL805's firmware version, it'll make

[PATCH v7 4/4] USB: pci-quirks: Add Raspberry Pi 4 quirk

2020-04-29 Thread Nicolas Saenz Julienne
can't be set as a module neither this can. Reflect that on the firmware interface Kconfg. Signed-off-by: Nicolas Saenz Julienne --- Changes since v5: - Fix Kconfig issue with allmodconfig Changes since v4: - Do not split up error message Changes since v3: - Add more complete error message

[PATCH v7 1/4] soc: bcm2835: Add notify xHCI reset property

2020-04-29 Thread Nicolas Saenz Julienne
The property is needed in order to trigger VL805's firmware load. Note that gap between the property introduced and the previous one is due to the properties not being defined. Signed-off-by: Nicolas Saenz Julienne Reviewed-by: Florian Fainelli --- include/soc/bcm2835/raspberrypi-firmware.h

Re: [PATCH v6 3/4] arm64: use both ZONE_DMA and ZONE_DMA32

2019-10-22 Thread Nicolas Saenz Julienne
On Mon, 2019-10-21 at 16:36 -0400, Qian Cai wrote: > I managed to get more information here, > > [0.00] cma: dma_contiguous_reserve(limit c000) > [0.00] cma: dma_contiguous_reserve: reserving 64 MiB for global area > [0.00] cma: cma_declare_contiguous(size

Re: [PATCH v6 3/4] arm64: use both ZONE_DMA and ZONE_DMA32

2019-10-21 Thread Nicolas Saenz Julienne
On Mon, 2019-10-21 at 13:25 -0400, Qian Cai wrote: > > On Oct 21, 2019, at 1:01 PM, Nicolas Saenz Julienne > > wrote: > > > > Could you enable CMA debugging to see if anything interesting comes out of > > it. > > I did but nothing interesting came out. Did

Re: [PATCH v6 3/4] arm64: use both ZONE_DMA and ZONE_DMA32

2019-10-21 Thread Nicolas Saenz Julienne
On Mon, 2019-10-21 at 10:46 -0400, Qian Cai wrote: > > On Oct 21, 2019, at 10:34 AM, Nicolas Saenz Julienne > > wrote: > > > > On Mon, 2019-10-21 at 10:15 -0400, Qian Cai wrote: > > > > On Sep 11, 2019, at 2:25 PM, Nicolas Saenz Julienne < > &

Re: [PATCH v6 3/4] arm64: use both ZONE_DMA and ZONE_DMA32

2019-10-21 Thread Nicolas Saenz Julienne
On Mon, 2019-10-21 at 10:15 -0400, Qian Cai wrote: > > On Sep 11, 2019, at 2:25 PM, Nicolas Saenz Julienne > > wrote: > > > > So far all arm64 devices have supported 32 bit DMA masks for their > > peripherals. This is not true anymore for the Raspberry Pi 4 as mo

[PATCH v2 1/2] dma-direct: check for overflows on 32 bit DMA addresses

2019-10-18 Thread Nicolas Saenz Julienne
which dma_capable() can't detect as it only checks for addresses bigger then the maximum allowed DMA address. Fix this by verifying in dma_capable() if the DMA address range provided is at any point lower than the minimum possible DMA address on the bus. Signed-off-by: Nicolas Saenz Julienne

[PATCH v2 2/2] x86/PCI: sta2x11: use default DMA address translation

2019-10-18 Thread Nicolas Saenz Julienne
setup, sta2x11_pdev_to_mapping() is moved to avoid warnings whenever CONFIG_PM is not enabled. Signed-off-by: Nicolas Saenz Julienne --- Changed since v1: - use variable to avoid recalculating AMBA's max address - remove x86's dma-direct.h as it's not longer needed Note: This was only

Re: [PATCH] x86/PCI: sta2x11: use default DMA address translation ops

2019-10-18 Thread Nicolas Saenz Julienne
2019 at 06:51:37PM +0200, Nicolas Saenz Julienne wrote: > > The devices found behind this PCIe chip have unusual DMA mapping > > constraints as there is an AMBA interconnect placed in between them and > > the different PCI endpoints. The offset between physical memory >

[PATCH] x86/PCI: sta2x11: use default DMA address translation ops

2019-10-16 Thread Nicolas Saenz Julienne
setup, sta2x11_pdev_to_mapping() is moved to avoid warnings whenever CONFIG_PM is not enabled. Signed-off-by: Nicolas Saenz Julienne --- Note: This was only compile tested. arch/x86/Kconfig | 1 - arch/x86/include/asm/device.h | 3 - arch/x86/pci/sta2x11-fixup.c | 135

Re: [PATCH -next v3] arm64: mm: Fix unused variable warning in zone_sizes_init

2019-10-16 Thread Nicolas Saenz Julienne
On Wed, 2019-10-16 at 16:08 +0100, Catalin Marinas wrote: > On Wed, Oct 16, 2019 at 07:47:14AM -0700, Nathan Chancellor wrote: > > When building arm64 allnoconfig, CONFIG_ZONE_DMA and CONFIG_ZONE_DMA32 > > get disabled so there is a warning about max_dma being unused. > > > >

Re: [PATCH -next v2] arm64: mm: Fix unused variable warning in zone_sizes_init

2019-10-16 Thread Nicolas Saenz Julienne
2 = min; > +#if defined(CONFIG_ZONE_DMA) || defined(CONFIG_ZONE_DMA32) > unsigned long max_dma = min; > +#endif > > memset(zone_size, 0, sizeof(zone_size)); > Reviewed-by: Nicolas Saenz Julienne Thanks! signature.asc Description: This is a digitally signed message part

Re: [PATCH] sh: use dma_to_phys() instead of dev->dma_pfn_offset

2019-10-15 Thread Nicolas Saenz Julienne
On Tue, 2019-10-15 at 00:43 -0700, Christoph Hellwig wrote: > On Fri, Oct 11, 2019 at 06:51:29PM +0200, Nicolas Saenz Julienne wrote: > > It's more explicit and lets dma-direct handle the specifics of how to > > translate addresses. > > > > On top of that ge

Re: [PATCH v1 2/3] net: bcmgenet: use optional max DMA burst size property

2019-10-11 Thread Nicolas Saenz Julienne
Hi Matthias! One small comment, I'll test everything later on. On Fri, 2019-10-11 at 20:48 +0200, matthias@kernel.org wrote: > From: Matthias Brugger > > Depending on the HW, the maximal usable DMA burst size can vary. > If not set accordingly a timeout in the transmit queue happens and no

[PATCH] sh: use dma_to_phys() instead of dev->dma_pfn_offset

2019-10-11 Thread Nicolas Saenz Julienne
It's more explicit and lets dma-direct handle the specifics of how to translate addresses. On top of that get rid of warnings as, since the introduction of commit 6fa1d28e38c ("sh: use generic dma_noncoherent_ops"), it's impossible for the dev to be NULL. Signed-off-by: Nicolas Saen

Re: [PATCH v2] HID: core: check whether usage page item is after usage id item

2019-10-10 Thread Nicolas Saenz Julienne
On Thu, 2019-10-10 at 11:05 +0800, Candle Sun wrote: > > > -static void hid_concatenate_usage_page(struct hid_parser *parser) > > > +static void hid_concatenate_last_usage_page(struct hid_parser *parser) > > > { > > > int i; > > > + unsigned int usage; > > > + unsigned int

Re: [PATCH v2] HID: core: check whether usage page item is after usage id item

2019-10-09 Thread Nicolas Saenz Julienne
On Wed, 2019-10-09 at 20:53 +0800, Candle Sun wrote: > From: Candle Sun > > Upstream commit 58e75155009c ("HID: core: move Usage Page concatenation > to Main item") adds support for Usage Page item after Usage ID items > (such as keyboards manufactured by Primax). > > Usage Page concatenation

Re: [PATCH v2] of: Make of_dma_get_range() work on bus nodes

2019-10-09 Thread Nicolas Saenz Julienne
On Tue, 2019-10-08 at 20:03 -0500, Rob Herring wrote: > On Tue, Oct 8, 2019 at 3:52 PM Nicolas Saenz Julienne > wrote: > > Hi Rob/Robin, > > > > On Tue, 2019-10-08 at 14:52 -0500, Rob Herring wrote: > > > From: Robin Murphy > > > > > > Since

Re: [PATCH v2] of: Make of_dma_get_range() work on bus nodes

2019-10-08 Thread Nicolas Saenz Julienne
Hi Rob/Robin, On Tue, 2019-10-08 at 14:52 -0500, Rob Herring wrote: > From: Robin Murphy > > Since the "dma-ranges" property is only valid for a node representing a > bus, of_dma_get_range() currently assumes the node passed in is a leaf > representing a device, and starts the walk from its

Re: [PATCH 05/11] of: Ratify of_dma_configure() interface

2019-10-07 Thread Nicolas Saenz Julienne
On Thu, 2019-10-03 at 20:53 -0500, Rob Herring wrote: > > > > But I think that with this series, given the fact that we now treat the > > > > lack > > > > of > > > > dma-ranges as a 1:1 mapping instead of an error, we could rewrite the > > > > function > > > > like this: > > > > > > Now, I'm

[PATCH v2] ARM: dt: check MPIDR on MP devices built without SMP

2019-10-04 Thread Nicolas Saenz Julienne
IDR register and specifies that any unwarranted register access will raise an undefined exception. Overall, given the bogus DT, a reasonable outcome. This was originally seen on a Raspberry Pi 2 built with bcm2835_defconfig. Reported-by: "kernelci.org bot" Signed-off-by: Nicolas Saenz Jul

[PATCH v2] mmc: sdhci-iproc: fix spurious interrupts on Multiblock reads with bcm2711

2019-10-04 Thread Nicolas Saenz Julienne
M2711") Signed-off-by: Nicolas Saenz Julienne Tested-by: Matthias Brugger Acked-by: Stefan Wahren --- Changes since v1: - Add Fixes tag and Acked-by drivers/mmc/host/sdhci-iproc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/mmc/host/sdhci-iproc.c b/drivers/mmc/host/sdhci-ipr

Re: [PATCH] mmc: sdhci-iproc: fix spurious interrupts on Multiblock reads with bcm2711

2019-10-04 Thread Nicolas Saenz Julienne
On Fri, 2019-10-04 at 14:52 +0200, Nicolas Saenz Julienne wrote: > The Raspberry Pi 4 SDHCI hardware seems to automatically issue CMD12 > after multiblock reads even when ACMD12 is disabled. This triggers > spurious interrupts after the data transfer is done with the following

[PATCH] mmc: sdhci-iproc: fix spurious interrupts on Multiblock reads with bcm2711

2019-10-04 Thread Nicolas Saenz Julienne
: ADMA Err: 0x | ADMA Ptr: 0xf3025208 mmc1: sdhci: Enable SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12 to enable ACMD12 on multiblock reads and suppress the spurious interrupts. Signed-off-by: Nicolas Saenz Julienne Tested-by: Matthias Brugger

Re: [PATCH] ARM: dt: check MPIDR on MP devices built without SMP

2019-10-04 Thread Nicolas Saenz Julienne
On Thu, 2019-10-03 at 16:47 -0700, Florian Fainelli wrote: > On 10/3/19 12:39 PM, Nicolas Saenz Julienne wrote: > > On Thu, 2019-10-03 at 11:08 -0700, Florian Fainelli wrote: > > > On 10/2/19 4:45 AM, Nicolas Saenz Julienne wrote: > > > > Currently, in arm_dt_init_cp

Re: [PATCH] ARM: dt: check MPIDR on MP devices built without SMP

2019-10-03 Thread Nicolas Saenz Julienne
On Thu, 2019-10-03 at 11:08 -0700, Florian Fainelli wrote: > On 10/2/19 4:45 AM, Nicolas Saenz Julienne wrote: > > Currently, in arm_dt_init_cpu_maps(), the hwid of the boot CPU is read > > from MPIDR on SMP devices and set to 0 for non SMP. This value is then > > matched

[PATCH] ARM: dt: check MPIDR on MP devices built without SMP

2019-10-02 Thread Nicolas Saenz Julienne
the way we choose whether to get MPIDR or not. Instead of depending on SMP check the number of CPUs defined in DT. Anything > 1 means MPIDR will be available. This was seen on a Raspberry Pi 2 build with bcm2835_defconfig. Reported-by: "kernelci.org bot" Signed-off-by: Nicolas S

Re: [PATCH 05/11] of: Ratify of_dma_configure() interface

2019-10-01 Thread Nicolas Saenz Julienne
On Mon, 2019-09-30 at 16:24 -0500, Rob Herring wrote: > On Mon, Sep 30, 2019 at 8:32 AM Nicolas Saenz Julienne > wrote: > > On Mon, 2019-09-30 at 05:57 -0700, Christoph Hellwig wrote: > > > On Thu, Sep 26, 2019 at 07:24:49PM -0500, Rob Herring wrote: > > > > -i

Re: [PATCH v2] ARM: add __always_inline to functions called from __get_user_check()

2019-10-01 Thread Nicolas Saenz Julienne
chitectures can enable CONFIG_OPTIMIZE_INLINING. > So, __always_inline is now the only guaranteed way of forcible inlining. > > I also added __always_inline to 4 functions in the call-graph from the > __get_user_check() macro. > > Fixes: 9012d011660e ("compiler: allow all arches to

Re: [PATCH 05/11] of: Ratify of_dma_configure() interface

2019-09-30 Thread Nicolas Saenz Julienne
On Mon, 2019-09-30 at 05:57 -0700, Christoph Hellwig wrote: > On Thu, Sep 26, 2019 at 07:24:49PM -0500, Rob Herring wrote: > > -int of_dma_configure(struct device *dev, struct device_node *np, bool > > force_dma) > > +int of_dma_configure(struct device *dev, struct device_node *parent, bool > >

Re: [PATCH] HID: core: add usage_page_preceding flag for hid_concatenate_usage_page()

2019-09-30 Thread Nicolas Saenz Julienne
On Mon, 2019-09-30 at 11:36 +0200, Benjamin Tissoires wrote: > Hi, > > [also addingg Nicolas, the author of 58e75155009c] Thanks! > > On Mon, Sep 30, 2019 at 10:10 AM Candle Sun wrote: > > From: Candle Sun > > > > Upstream commit 58e75155009c ("HID: core: move Usage Page concatenation > >

Re: [PATCH 00/11] of: dma-ranges fixes and improvements

2019-09-30 Thread Nicolas Saenz Julienne
a_get_range() work on bus nodes Re-tested the whole series. Verified both the unittests run fine and PCIe's behaviour is fixed. Tested-by: Nicolas Saenz Julienne Also for the whole series: Reviewed-by: Nicolas Saenz Julienne Regards, Nicolas signature.asc Description: This is a digitally signed message part

Re: [PATCH] ARM: fix __get_user_check() in case uaccess_* calls are not inlined

2019-09-30 Thread Nicolas Saenz Julienne
ceived a regression report from Nicolas Saenz Julienne: > > https://lkml.org/lkml/2019/9/27/263 > > This problem has cropped up on arch/arm/config/bcm2835_defconfig > because it enables CONFIG_CC_OPTIMIZE_FOR_SIZE. The compiler tends > to prefer not inlining functions with -O

Re: [PATCH] compiler: enable CONFIG_OPTIMIZE_INLINING forcibly

2019-09-27 Thread Nicolas Saenz Julienne
On Fri, 2019-08-30 at 12:43 +0900, Masahiro Yamada wrote: > Commit 9012d011660e ("compiler: allow all arches to enable > CONFIG_OPTIMIZE_INLINING") allowed all architectures to enable > this option. A couple of build errors were reported by randconfig, > but all of them have been ironed out. > >

Re: [PATCH] compiler: enable CONFIG_OPTIMIZE_INLINING forcibly

2019-09-27 Thread Nicolas Saenz Julienne
On Fri, 2019-08-30 at 12:43 +0900, Masahiro Yamada wrote: > Commit 9012d011660e ("compiler: allow all arches to enable > CONFIG_OPTIMIZE_INLINING") allowed all architectures to enable > this option. A couple of build errors were reported by randconfig, > but all of them have been ironed out. > >

Re: [RFC PATCH] xen/gntdev: Stop abusing DT of_dma_configure API

2019-09-26 Thread Nicolas Saenz Julienne
Robin Murphy > Cc: Julien Grall > Cc: Nicolas Saenz Julienne > Cc: Oleksandr Andrushchenko > Cc: Boris Ostrovsky > Cc: Juergen Gross > Cc: Stefano Stabellini > Cc: xen-de...@lists.xenproject.org > Signed-off-by: Rob Herring Just so it isn't forgotten, the same appli

[PATCH v6 2/4] arm64: rename variables used to calculate ZONE_DMA32's size

2019-09-11 Thread Nicolas Saenz Julienne
Let the name indicate that they are used to calculate ZONE_DMA32's size as opposed to ZONE_DMA. Signed-off-by: Nicolas Saenz Julienne Reviewed-by: Catalin Marinas --- arch/arm64/mm/init.c | 30 +++--- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/arch

[PATCH v6 3/4] arm64: use both ZONE_DMA and ZONE_DMA32

2019-09-11 Thread Nicolas Saenz Julienne
-by: Nicolas Saenz Julienne Reviewed-by: Catalin Marinas --- I kept the Reviewed-by as the last bug solution was proposed by Catalin Changes in v6: - Fixed bug in max_zone_phys Changes in v5: - Fixed swiotlb initialization Changes in v4: - Fixed issue when NUMA=n and ZONE_DMA=n - Merged two

[PATCH v6 4/4] mm: refresh ZONE_DMA and ZONE_DMA32 comments in 'enum zone_type'

2019-09-11 Thread Nicolas Saenz Julienne
These zones usage has evolved with time and the comments were outdated. This joins both ZONE_DMA and ZONE_DMA32 explanation and gives up to date examples on how they are used on different architectures. Signed-off-by: Nicolas Saenz Julienne Reviewed-by: Christoph Hellwig Reviewed-by: Catalin

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

2019-09-11 Thread Nicolas Saenz Julienne
essential Nicolas Saenz Julienne (4): arm64: mm: use arm64_dma_phys_limit instead of calling max_zone_dma_phys() arm64: rename variables used to calculate ZONE_DMA32's size arm64: use both ZONE_DMA and ZONE_DMA32 mm: refresh ZONE_DMA and ZONE_DMA32 comments in 'enum zone_type' arch/arm64

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

2019-09-11 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 Reviewed-by: Catalin Marinas --- arch/arm64/mm

Re: [PATCH v5 3/4] arm64: use both ZONE_DMA and ZONE_DMA32

2019-09-11 Thread Nicolas Saenz Julienne
On Wed, 2019-09-11 at 15:35 +0100, Catalin Marinas wrote: > On Wed, Sep 11, 2019 at 12:54:38PM +0200, Nicolas Saenz Julienne wrote: > > On Mon, 2019-09-09 at 11:58 +0200, Nicolas Saenz Julienne wrote: > > > /* > > > - * Return the maximum physical address for

Re: [PATCH v5 3/4] arm64: use both ZONE_DMA and ZONE_DMA32

2019-09-11 Thread Nicolas Saenz Julienne
On Mon, 2019-09-09 at 11:58 +0200, Nicolas Saenz Julienne wrote: > + > /* > - * Return the maximum physical address for ZONE_DMA32 (DMA_BIT_MASK(32)). It > - * currently assumes that for memory starting above 4G, 32-bit devices will > - * use a DMA offset. > + * Return th

Re: [PATCH v5 0/4] Raspberry Pi 4 DMA addressing support

2019-09-09 Thread Nicolas Saenz Julienne
On Mon, 2019-09-09 at 21:33 +0200, Stefan Wahren wrote: > Hi Nicolas, > > Am 09.09.19 um 11:58 schrieb Nicolas Saenz Julienne: > > Hi all, > > this series attempts to address some issues we found while bringing up > > the new Raspberry Pi 4 in arm64 and it's intended

[PATCH v5 4/4] mm: refresh ZONE_DMA and ZONE_DMA32 comments in 'enum zone_type'

2019-09-09 Thread Nicolas Saenz Julienne
These zones usage has evolved with time and the comments were outdated. This joins both ZONE_DMA and ZONE_DMA32 explanation and gives up to date examples on how they are used on different architectures. Signed-off-by: Nicolas Saenz Julienne Reviewed-by: Christoph Hellwig Reviewed-by: Catalin

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

2019-09-09 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 Reviewed-by: Catalin Marinas --- arch/arm64/mm

[PATCH v5 3/4] arm64: use both ZONE_DMA and ZONE_DMA32

2019-09-09 Thread Nicolas Saenz Julienne
-by: Nicolas Saenz Julienne Reviewed-by: Catalin Marinas --- Changes in v5: - Fixed swiotlb initialization Changes in v4: - Fixed issue when NUMA=n and ZONE_DMA=n - Merged two max_zone_dma*_phys() functions Changes in v3: - Used fixed size ZONE_DMA - Fix check befor swiotlb_init() Changes in v2

[PATCH v5 2/4] arm64: rename variables used to calculate ZONE_DMA32's size

2019-09-09 Thread Nicolas Saenz Julienne
Let the name indicate that they are used to calculate ZONE_DMA32's size as opposed to ZONE_DMA. Signed-off-by: Nicolas Saenz Julienne Reviewed-by: Catalin Marinas --- arch/arm64/mm/init.c | 30 +++--- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/arch

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

2019-09-09 Thread Nicolas Saenz Julienne
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 of calling max_zone_dma_phys() arm64: rename

Re: [PATCH v4 3/4] arm64: use both ZONE_DMA and ZONE_DMA32

2019-09-09 Thread Nicolas Saenz Julienne
On Sun, 2019-09-08 at 22:27 +0100, Catalin Marinas wrote: > On Fri, Sep 06, 2019 at 02:06:14PM +0200, Nicolas Saenz Julienne wrote: > > @@ -430,7 +454,7 @@ void __init arm64_memblock_init(void) > > > > high_memory = __va(memblock_end_of_DRAM() - 1) + 1; > > >

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

2019-09-06 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 Reviewed-by: Catalin Marinas --- arch/arm64/mm

[PATCH v4 4/4] mm: refresh ZONE_DMA and ZONE_DMA32 comments in 'enum zone_type'

2019-09-06 Thread Nicolas Saenz Julienne
These zones usage has evolved with time and the comments were outdated. This joins both ZONE_DMA and ZONE_DMA32 explanation and gives up to date examples on how they are used on different architectures. Signed-off-by: Nicolas Saenz Julienne Reviewed-by: Christoph Hellwig Reviewed-by: Catalin

[PATCH v4 3/4] arm64: use both ZONE_DMA and ZONE_DMA32

2019-09-06 Thread Nicolas Saenz Julienne
-by: Nicolas Saenz Julienne --- Changes in v4: - Fixed issue when NUMA=n and ZONE_DMA=n - Merged two max_zone_dma*_phys() functions Changes in v3: - Used fixed size ZONE_DMA - Fix check befor swiotlb_init() Changes in v2: - Update comment to reflect new zones split - ZONE_DMA will never be left

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

2019-09-06 Thread Nicolas Saenz Julienne
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 of calling max_zone_dma_phys() arm64: rename variables used to calculate ZONE_DMA32's size arm64: use both ZONE_DMA and ZONE_DMA32 mm

[PATCH v4 2/4] arm64: rename variables used to calculate ZONE_DMA32's size

2019-09-06 Thread Nicolas Saenz Julienne
Let the name indicate that they are used to calculate ZONE_DMA32's size as opposed to ZONE_DMA. Signed-off-by: Nicolas Saenz Julienne Reviewed-by: Catalin Marinas --- arch/arm64/mm/init.c | 30 +++--- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/arch

Re: [PATCH v3 3/4] arm64: use both ZONE_DMA and ZONE_DMA32

2019-09-05 Thread Nicolas Saenz Julienne
On Thu, 2019-09-05 at 18:19 +0100, Catalin Marinas wrote: > On Mon, Sep 02, 2019 at 04:10:41PM +0200, Nicolas Saenz Julienne wrote: > > diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c > > index 8956c22634dd..f02a4945aeac 100644 > > --- a/arch/arm64/mm/init.c > >

[PATCH v3 3/4] arm64: use both ZONE_DMA and ZONE_DMA32

2019-09-02 Thread Nicolas Saenz Julienne
-by: Nicolas Saenz Julienne --- Changes in v3: - Used fixed size ZONE_DMA - Fix check befor swiotlb_init() Changes in v2: - Update comment to reflect new zones split - ZONE_DMA will never be left empty arch/arm64/Kconfig| 4 +++ arch/arm64/include/asm/page.h | 2 ++ arch/arm64/mm

[PATCH v3 4/4] mm: refresh ZONE_DMA and ZONE_DMA32 comments in 'enum zone_type'

2019-09-02 Thread Nicolas Saenz Julienne
These zones usage has evolved with time and the comments were outdated. This joins both ZONE_DMA and ZONE_DMA32 explanation and gives up to date examples on how they are used on different architectures. Signed-off-by: Nicolas Saenz Julienne Reviewed-by: Christoph Hellwig --- Changes in v3

[PATCH v3 2/4] arm64: rename variables used to calculate ZONE_DMA32's size

2019-09-02 Thread Nicolas Saenz Julienne
Let the name indicate that they are used to calculate ZONE_DMA32's size as opposed to ZONE_DMA. Signed-off-by: Nicolas Saenz Julienne --- Changes in v3: None Changes in v2: None arch/arm64/mm/init.c | 30 +++--- 1 file changed, 15 insertions(+), 15 deletions(-) diff

<    3   4   5   6   7   8   9   10   11   12   >