Re: [RFC/PATCH v2 09/16] soc: bcm: bcm2835-power: Add support for BCM2711's Argon ASB

2021-02-09 Thread Phil Elwell
Nicolas, On Tue, 9 Feb 2021 at 14:00, Nicolas Saenz Julienne wrote: > > On Tue, 2021-02-09 at 13:19 +, Phil Elwell wrote: > > Hi Nicolas, > > > > On Tue, 9 Feb 2021 at 13:00, Nicolas Saenz Julienne > > wrote: > > > > > > In BCM2711 the n

Re: [RFC/PATCH v2 09/16] soc: bcm: bcm2835-power: Add support for BCM2711's Argon ASB

2021-02-09 Thread Phil Elwell
Hi Nicolas, On Tue, 9 Feb 2021 at 13:00, Nicolas Saenz Julienne wrote: > > In BCM2711 the new ARGON ASB took over V3D. The old ASB is still present > with the ISP and H264 bits, and V3D is in the same place in the new ASB > as the old one. > > Use the fact that 'pm->argon_asb' is populated as a h

Re: [PATCH] tty: amba-pl011: Make TX optimisation conditional

2019-07-12 Thread Phil Elwell
Hi Rogier, On 12/07/2019 13:10, Rogier Wolff wrote: > On Fri, Jul 12, 2019 at 12:21:05PM +0100, Dave Martin wrote: >> diff --git a/drivers/tty/serial/amba-pl011.c >> b/drivers/tty/serial/amba-pl011.c >> index 89ade21..1902071 100644 >> --- a/drivers/tty/serial/amba-pl011.c >> +++ b/drivers/tty/se

Re: [PATCH] tty: amba-pl011: Make TX optimisation conditional

2019-07-12 Thread Phil Elwell
Hi Dave, Thanks for the reply. On 12/07/2019 12:21, Dave Martin wrote: > On Thu, Jul 11, 2019 at 02:45:32PM +0100, Phil Elwell wrote: >> pl011_tx_chars takes a "from_irq" parameter to reduce the number of >> register accesses. When from_irq is true the function assumes

[PATCH] tty: amba-pl011: Make TX optimisation conditional

2019-07-11 Thread Phil Elwell
pl011_tx_chars, causing polling to be used in the unsafe case. Fixes: 1e84d22322ce ("serial/amba-pl011: Refactor and simplify TX FIFO handling") Signed-off-by: Phil Elwell --- drivers/tty/serial/amba-pl011.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/driver

Re: Dynamic overlay failure in 4.19 & 4.20

2019-06-04 Thread Phil Elwell
Hi Frank, On 04/06/2019 19:20, Frank Rowand wrote: Hi Phil, On 6/4/19 5:15 AM, Phil Elwell wrote: Hi, In the downstream Raspberry Pi kernel we are using configfs to apply overlays at runtime, using a patchset from Pantelis that hasn't been accepted upstream yet. Apart from the occas

Dynamic overlay failure in 4.19 & 4.20

2019-06-04 Thread Phil Elwell
Hi, In the downstream Raspberry Pi kernel we are using configfs to apply overlays at runtime, using a patchset from Pantelis that hasn't been accepted upstream yet. Apart from the occasional need to adapt to upstream changes, this has been working well for us. A Raspberry Pi user recently notice

Re: [PATCH] thermal: bcm2835: Fix crash in bcm2835_thermal_debugfs

2019-01-29 Thread Phil Elwell
Hi Stefan, On 29/01/2019 09:44, Stefan Wahren wrote: > Hi Phil, > > Am 29.01.2019 um 10:10 schrieb Phil Elwell: >> "cat /sys/kernel/debug/bcm2835_thermal/regset" causes a NULL pointer >> dereference in bcm2835_thermal_debugfs. The driver makes use of the >>

Re: [PATCH] thermal: bcm2835: Fix crash in bcm2835_thermal_debugfs

2019-01-29 Thread Phil Elwell
Hi Daniel, On 29/01/2019 09:52, Daniel Lezcano wrote: > On 29/01/2019 10:10, Phil Elwell wrote: >> "cat /sys/kernel/debug/bcm2835_thermal/regset" causes a NULL pointer >> dereference in bcm2835_thermal_debugfs. The driver makes use of the >> implementation deta

[PATCH resend] thermal: bcm2835: Fix crash in bcm2835_thermal_debugfs

2019-01-29 Thread Phil Elwell
ing to the crash. Instead, store its private data as the drvdata and retrieve the thermal_zone_device pointer from it. Fixes: bcb7dd9ef206 ("thermal: bcm2835: add thermal driver for bcm2835 SoC") Signed-off-by: Phil Elwell --- drivers/thermal/broadcom/bcm2835_thermal.c | 9

[PATCH] thermal: bcm2835: Fix crash in bcm2835_thermal_debugfs

2019-01-29 Thread Phil Elwell
ing to the crash. Instead, store its private data as the drvdata and retrieve the thermal_zone_device pointer from it. Fixes: bcb7dd9ef206 ("thermal: bcm2835: add thermal driver for bcm2835 SoC") Signed-off-by: Phil Elwell --- drivers/thermal/broadcom/bcm2835_thermal.c | 9

[PATCH] staging: vchiq: Fix local event signalling

2019-01-11 Thread Phil Elwell
and since the armed flag was being cleared this lead to a deadlock. Fixes: 852b2876a8a8 ("staging: vchiq: rework remove_event handling") Signed-off-by: Phil Elwell --- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c | 1 + 1 file changed, 1 insertion(+) diff --g

[PATCH] spi: Make GPIO CSs honour the SPI_NO_CS flag

2018-10-12 Thread Phil Elwell
The SPI configuration state includes an SPI_NO_CS flag that disables all CS line manipulation, for applications that want to manage their own chip selects. However, this flag is ignored by the GPIO CS code in the SPI framework. Correct this omission with a trivial patch. Signed-off-by: Phil

Re: [PATCH 1/2] sc16is7xx: Fix for multi-channel stall

2018-09-18 Thread Phil Elwell
Hi Greg, On 18/09/2018 14:02, Greg Kroah-Hartman wrote: > On Wed, Sep 12, 2018 at 03:31:55PM +0100, Phil Elwell wrote: >> The SC16IS752 is a dual-channel device. The two channels are largely >> independent, but the IRQ signals are wired together as an open-drain, >> active

[PATCH 2/2] sc16is7xx: Fix for "Unexpected interrupt: 8"

2018-09-12 Thread Phil Elwell
eaded interrupt handler). See: https://github.com/raspberrypi/linux/issues/2529 Signed-off-by: Phil Elwell --- drivers/tty/serial/sc16is7xx.c | 28 1 file changed, 28 insertions(+) diff --git a/drivers/tty/serial/sc16is7xx.c b/drivers/tty/serial/sc16is7xx.c index 47b4115.

[PATCH 1/2] sc16is7xx: Fix for multi-channel stall

2018-09-12 Thread Phil Elwell
em (or at least make it much less likely to happen) by reducing the granularity of per-channel interrupt processing to one condition per iteration, only exiting the overall loop when both channels are no longer interrupting. Signed-off-by: Phil Elwell --- drivers/tty/serial/s

[PATCH 0/2] sc16is7xx interrupt fixes

2018-09-12 Thread Phil Elwell
between the interrupt handler and access to the Enhanced Features Register. Phil Elwell (2): sc16is7xx: Fix for multi-channel stall sc16is7xx: Fix for "Unexpected interrupt: 8" drivers/tty/serial/sc16is7xx.c | 50 +- 1 file changed, 44 insert

[PATCH v4 2/3] lan78xx: Read LED states from Device Tree

2018-04-19 Thread Phil Elwell
available. Signed-off-by: Phil Elwell Reviewed-by: Andrew Lunn --- MAINTAINERS | 1 + drivers/net/phy/microchip.c | 25 ++ drivers/net/usb/lan78xx.c | 32 - include/dt-bindings/net

[PATCH v4 0/3] lan78xx: Read configuration from Device Tree

2018-04-19 Thread Phil Elwell
. Phil Elwell (3): lan78xx: Read MAC address from DT if present lan78xx: Read LED states from Device Tree dt-bindings: Document the DT bindings for lan78xx .../devicetree/bindings/net/microchip,lan78xx.txt | 54 MAINTAINERS| 2

[PATCH v4 3/3] dt-bindings: Document the DT bindings for lan78xx

2018-04-19 Thread Phil Elwell
a bindings file. Signed-off-by: Phil Elwell Reviewed-by: Andrew Lunn --- .../devicetree/bindings/net/microchip,lan78xx.txt | 54 ++ MAINTAINERS| 1 + 2 files changed, 55 insertions(+) create mode 100644 Documentation/devicetree

[PATCH v4 1/3] lan78xx: Read MAC address from DT if present

2018-04-19 Thread Phil Elwell
There is a standard mechanism for locating and using a MAC address from the Device Tree. Use this facility in the lan78xx driver to support applications without programmed EEPROM or OTP. At the same time, regularise the handling of the different address sources. Signed-off-by: Phil Elwell

[PATCH resend v3 2/3] lan78xx: Read LED states from Device Tree

2018-04-19 Thread Phil Elwell
available. Signed-off-by: Phil Elwell --- MAINTAINERS | 1 + drivers/net/phy/microchip.c | 25 ++ drivers/net/usb/lan78xx.c | 32 - include/dt-bindings/net/microchip-lan7

[PATCH resend v3 0/3] lan78xx: Read configuration from Device Tree

2018-04-19 Thread Phil Elwell
EEE support. Phil Elwell (3): lan78xx: Read MAC address from DT if present lan78xx: Read LED states from Device Tree dt-bindings: Document the DT bindings for lan78xx .../devicetree/bindings/net/microchip,lan78xx.txt | 54 MAINTAINERS

[PATCH resend v3 3/3] dt-bindings: Document the DT bindings for lan78xx

2018-04-19 Thread Phil Elwell
a bindings file. Signed-off-by: Phil Elwell --- .../devicetree/bindings/net/microchip,lan78xx.txt | 54 ++ MAINTAINERS| 1 + 2 files changed, 55 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/microchip

[PATCH resend v3 1/3] lan78xx: Read MAC address from DT if present

2018-04-19 Thread Phil Elwell
There is a standard mechanism for locating and using a MAC address from the Device Tree. Use this facility in the lan78xx driver to support applications without programmed EEPROM or OTP. At the same time, regularise the handling of the different address sources. Signed-off-by: Phil Elwell

[PATCH v3 0/3] lan78xx: Read configuration from Device Tree

2018-04-19 Thread Phil Elwell
reading the MAC address and LED modes from Device Tree. v3: - Move LED setting into PHY driver. v2: - Use eth_platform_get_mac_address. - Support up to 4 LEDs, and move LED mode constants into dt-bindings header. - Improve bindings document. - Remove EEE support. Phil Elwell (3): lan78xx: Read MAC

[PATCH v3 1/3] lan78xx: Read MAC address from DT if present

2018-04-19 Thread Phil Elwell
There is a standard mechanism for locating and using a MAC address from the Device Tree. Use this facility in the lan78xx driver to support applications without programmed EEPROM or OTP. At the same time, regularise the handling of the different address sources. Signed-off-by: Phil Elwell

[PATCH v3 2/3] lan78xx: Read LED states from Device Tree

2018-04-19 Thread Phil Elwell
available. Signed-off-by: Phil Elwell --- MAINTAINERS | 1 + drivers/net/phy/microchip.c | 25 ++ drivers/net/usb/lan78xx.c | 32 - include/dt-bindings/net/microchip-lan7

[PATCH v3 0/3] lan78xx: Read configuration from Device Tree

2018-04-19 Thread Phil Elwell
reading the MAC address and LED modes from Device Tree. v3: - Move LED setting into PHY driver. v2: - Use eth_platform_get_mac_address. - Support up to 4 LEDs, and move LED mode constants into dt-bindings header. - Improve bindings document. - Remove EEE support. Phil Elwell (3): lan78xx: Read MAC

[PATCH v3 3/3] dt-bindings: Document the DT bindings for lan78xx

2018-04-19 Thread Phil Elwell
a bindings file. Signed-off-by: Phil Elwell --- .../devicetree/bindings/net/microchip,lan78xx.txt | 54 ++ MAINTAINERS| 1 + 2 files changed, 55 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/microchip

[PATCH v2 2/3] lan78xx: Read LED states from Device Tree

2018-04-18 Thread Phil Elwell
available. Signed-off-by: Phil Elwell --- MAINTAINERS | 1 + drivers/net/usb/lan78xx.c| 35 include/dt-bindings/net/microchip-78xx.h | 21 +++ 3 files changed, 57 insertions(+) create mode 100644

[PATCH v2 1/3] lan78xx: Read MAC address from DT if present

2018-04-18 Thread Phil Elwell
There is a standard mechanism for locating and using a MAC address from the Device Tree. Use this facility in the lan78xx driver to support applications without programmed EEPROM or OTP. At the same time, regularise the handling of the different address sources. Signed-off-by: Phil Elwell

[PATCH v2 3/3] dt-bindings: Document the DT bindings for lan78xx

2018-04-18 Thread Phil Elwell
a bindings file. Signed-off-by: Phil Elwell --- .../devicetree/bindings/net/microchip,lan78xx.txt | 44 ++ MAINTAINERS| 1 + 2 files changed, 45 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/microchip

[PATCH v2 0/3] lan78xx: Read configuration from Device Tree

2018-04-18 Thread Phil Elwell
reading the MAC address and LED modes from Device Tree. v2: - Use eth_platform_get_mac_address. - Support up to 4 LEDs, and move LED mode constants into dt-bindings header. - Improve bindings document. - Remove EEE support. Phil Elwell (3): lan78xx: Read MAC address from DT if present lan78xx

Re: [PATCH 4/4] dt-bindings: Document the DT bindings for lan78xx

2018-04-17 Thread Phil Elwell
On 16/04/2018 20:22, Rob Herring wrote: > On Thu, Apr 12, 2018 at 02:55:36PM +0100, Phil Elwell wrote: >> The Microchip LAN78XX family of devices are Ethernet controllers with >> a USB interface. Despite being discoverable devices it can be useful to >> be able to configure

Re: [PATCH 2/4] lan78xx: Read initial EEE setting from Device Tree

2018-04-12 Thread Phil Elwell
Andrew, On 12/04/2018 15:16, Andrew Lunn wrote: > On Thu, Apr 12, 2018 at 02:55:34PM +0100, Phil Elwell wrote: >> Add two new Device Tree properties: >> * microchip,eee-enabled - a boolean to enable EEE >> * microchip,tx-lpi-timer - time in microseconds

Re: [PATCH 4/4] dt-bindings: Document the DT bindings for lan78xx

2018-04-12 Thread Phil Elwell
Hi Andrew, On 12/04/2018 15:30, Andrew Lunn wrote: > On Thu, Apr 12, 2018 at 02:55:36PM +0100, Phil Elwell wrote: >> The Microchip LAN78XX family of devices are Ethernet controllers with >> a USB interface. Despite being discoverable devices it can be useful to >> be able t

Re: [PATCH 3/4] lan78xx: Read LED modes from Device Tree

2018-04-12 Thread Phil Elwell
Hi Andrew, On 12/04/2018 15:26, Andrew Lunn wrote: > On Thu, Apr 12, 2018 at 02:55:35PM +0100, Phil Elwell wrote: >> Add support for DT property "microchip,led-modes", a vector of two >> cells (u32s) in the range 0-15, each of which sets the mode for one >> of the

Re: [PATCH 1/4] lan78xx: Read MAC address from DT if present

2018-04-12 Thread Phil Elwell
Hi Andrew, On 12/04/2018 15:06, Andrew Lunn wrote: > Hi Phil > >> -ret = lan78xx_write_reg(dev, RX_ADDRL, addr_lo); >> -ret = lan78xx_write_reg(dev, RX_ADDRH, addr_hi); >> +mac_addr = of_get_mac_address(dev->udev->dev.of_node); > > It might be

Re: [PATCH 4/4] dt-bindings: Document the DT bindings for lan78xx

2018-04-12 Thread Phil Elwell
Hi Andrew, On 12/04/2018 15:04, Andrew Lunn wrote: > On Thu, Apr 12, 2018 at 02:55:36PM +0100, Phil Elwell wrote: >> The Microchip LAN78XX family of devices are Ethernet controllers with >> a USB interface. Despite being discoverable devices it can be useful to >> be able t

[PATCH 1/4] lan78xx: Read MAC address from DT if present

2018-04-12 Thread Phil Elwell
There is a standard mechanism for locating and using a MAC address from the Device Tree. Use this facility in the lan78xx driver to support applications without programmed EEPROM or OTP. At the same time, regularise the handling of the different address sources. Signed-off-by: Phil Elwell

[PATCH 0/4] lan78xx: Read configuration from Device Tree

2018-04-12 Thread Phil Elwell
reading the MAC address, EEE setting and LED modes from Device Tree. Phil Elwell (4): lan78xx: Read MAC address from DT if present lan78xx: Read initial EEE setting from Device Tree lan78xx: Read LED modes from Device Tree dt-bindings: Document the DT bindings for lan78xx .../devicetree

[PATCH 2/4] lan78xx: Read initial EEE setting from Device Tree

2018-04-12 Thread Phil Elwell
Add two new Device Tree properties: * microchip,eee-enabled - a boolean to enable EEE * microchip,tx-lpi-timer - time in microseconds to wait after TX goes idle before entering the low power state (default 600) Signed-off-by: Phil Elwell

[PATCH 3/4] lan78xx: Read LED modes from Device Tree

2018-04-12 Thread Phil Elwell
nk100/1000/activity 5=link10/1000/activity 6=link10/100/activity14=off15=on Also use the presence of the DT property to indicate that the LEDs should be enabled - necessary in the event that no valid OTP or EEPROM is available. Signed-off-by: Phil Elwell --- drivers/net/usb/lan7

[PATCH 4/4] dt-bindings: Document the DT bindings for lan78xx

2018-04-12 Thread Phil Elwell
a bindings file, adding it to MAINTAINERS at the same time. Signed-off-by: Phil Elwell --- .../devicetree/bindings/net/microchip,lan78xx.txt | 44 ++ MAINTAINERS| 1 + 2 files changed, 45 insertions(+) create mode 100644

Re: [PATCH] lan78xx: Correctly indicate invalid OTP

2018-04-11 Thread Phil Elwell
Hi Andrew. On 11/04/2018 13:57, Andrew Lunn wrote: > On Wed, Apr 11, 2018 at 10:59:17AM +0100, Phil Elwell wrote: >> lan78xx_read_otp tries to return -EINVAL in the event of invalid OTP >> content, but the value gets overwritten before it is returned and the >> read goes a

[PATCH] lan78xx: Avoid spurious kevent 4 "error"

2018-04-11 Thread Phil Elwell
events directly, relying on the subsequent deferral of the EVENT_LINK_RESET call to schedule the work. Take the same precaution with EVENT_STAT_UPDATE to avoid a totally unnecessary error message. Signed-off-by: Phil Elwell --- drivers/net/usb/lan78xx.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH] lan78xx: Correctly indicate invalid OTP

2018-04-11 Thread Phil Elwell
lan78xx_read_otp tries to return -EINVAL in the event of invalid OTP content, but the value gets overwritten before it is returned and the read goes ahead anyway. Make the read conditional as it should be and preserve the error code. Signed-off-by: Phil Elwell --- drivers/net/usb/lan78xx.c | 3

Re: [PATCH] lan78xx: Don't reset the interface on open

2018-04-10 Thread Phil Elwell
Hi Nisar, On 10/04/2018 15:16, nisar.sa...@microchip.com wrote: > Thanks Phil, for identifying the issues. > >> -ret = lan78xx_reset(dev); >> -if (ret < 0) >> -goto done; >> - >> phy_start(net->phydev); >> >> netif_dbg(dev, ifup, dev->net, "phy initialised successful

[PATCH] lan78xx: Don't reset the interface on open

2018-04-10 Thread Phil Elwell
h the link is up), rendering the interface unusable. Fix this issue by removing the lan78xx_reset call from lan78xx_open. Fixes: 92571a1aae40 ("lan78xx: Connect phy early") Signed-off-by: Phil Elwell --- drivers/net/usb/lan78xx.c | 4 1 file changed, 4 deletions(-) diff --g

Re: [PATCH/RFC] soc: bcm2835: Make !RASPBERRYPI_FIRMWARE dummies return failure

2018-04-09 Thread Phil Elwell
On 08/04/2018 12:28, Stefan Wahren wrote: > Hi Geert, > > [add Phil] > >> Geert Uytterhoeven hat am 8. April 2018 um 11:05 >> geschrieben: >> >> >> If CONFIG_RASPBERRYPI_FIRMWARE=n: >> >> drivers/gpio/gpio-raspberrypi-exp.c: In function >> ‘rpi_exp_gpio_get_polarity’: >> drivers/gpio/g

Re: [PATCH 2/5] staging: vc04_services: Remove cache-line-size property.

2018-03-07 Thread Phil Elwell
On 07/03/2018 12:10, Stefan Wahren wrote: > Hi Phil, >> It is the L2 cache line size that matters, but as long as you end up with >> the numbers Stefan mentioned - 32 on BCM2835, 64 on BCM2836 and BCM2837 - >> I'm not too bothered how you get there. > > i think a kernel with bcm2835_defconfig

Re: [PATCH 2/5] staging: vc04_services: Remove cache-line-size property.

2018-03-07 Thread Phil Elwell
Hi Eric, On 06/03/2018 19:02, Eric Anholt wrote: Stefan Wahren writes: Hi Eric, Am 05.03.2018 um 21:28 schrieb Eric Anholt: This was just a way for the DT-passed value to get out of sync with what Linux has configured the ARM for. Signed-off-by: Eric Anholt --- .../interface/vchiq_arm

Re: [PATCH] Arm: mm: ftrace: Only set text back to ro after kernel has been marked ro

2017-12-05 Thread Phil Elwell
On 05/12/2017 13:23, Matthias Reichl wrote: > On Tue, Dec 05, 2017 at 01:14:17PM +, Russell King - ARM Linux wrote: >> On Tue, Dec 05, 2017 at 12:47:09PM +0100, Matthias Reichl wrote: >>> On Wed, Aug 23, 2017 at 03:03:51PM -0400, Steven Rostedt wrote: On Wed, 23 Aug 2017 11:48:13 -0700 >>>

[PATCH v2 resend] staging: bcm2835-audio: Fix memory corruption

2017-09-24 Thread Phil Elwell
connections. Simplifying the code by removing a bunch of gotos and returning errors directly. Signed-off-by: Phil Elwell Fixes: 0adbfd4694c2 ("staging: bcm2835-audio: fix memory leak in bcm2835_audio_open_connection()") --- v2: Simplified following feedback from Dan Carpenter. --- .../vc0

[PATCH v2] staging: bcm2835-audio: Fix memory corruption

2017-08-11 Thread Phil Elwell
connections. Simplifying the code by removing a bunch of gotos and returning errors directly. Signed-off-by: Phil Elwell Fixes: 0adbfd4694c2 ("staging: bcm2835-audio: fix memory leak in bcm2835_audio_open_connection()") --- [Resend with v2 in subject] v2: Simplified following feedback from Dan

[PATCH] staging: bcm2835-audio: Fix memory corruption

2017-08-11 Thread Phil Elwell
connections. Simplifying the code by removing a bunch of gotos and returning errors directly. Signed-off-by: Phil Elwell Fixes: 0adbfd4694c2 ("staging: bcm2835-audio: fix memory leak in bcm2835_audio_open_connection()") --- v2: Simplified following feedback from Dan Carpenter. --- .../vc0

Re: [PATCH] staging: bcm2835-audio: Fix memory corruption

2017-08-10 Thread Phil Elwell
On 10/08/2017 12:24, Dan Carpenter wrote: > On Thu, Aug 10, 2017 at 11:52:42AM +0100, Phil Elwell wrote: >> On 10/08/2017 11:21, Dan Carpenter wrote: >>> The original patch did not go through the normal review process... >>> >>> On Tue, Aug 08, 2017 at

Re: [PATCH] staging: bcm2835-audio: Fix memory corruption

2017-08-10 Thread Phil Elwell
On 10/08/2017 11:21, Dan Carpenter wrote: > The original patch did not go through the normal review process... > > On Tue, Aug 08, 2017 at 01:05:02PM +0100, Phil Elwell wrote: >> I'm all for fixing memory leaks, but freeing a block while it is still >> being used is

[PATCH] staging: bcm2835-audio: Fix memory corruption

2017-08-08 Thread Phil Elwell
I'm all for fixing memory leaks, but freeing a block while it is still being used is a recipe for hard-to-debug kernel exceptions. 1) There is already a vchi method for freeing the instance, so use it. 2) Only call it on error, and then only before initted is false. Signed-off-by: Phil E

[PATCH] ARM: bcm2836: Send event when onlining other cores

2017-08-08 Thread Phil Elwell
"sev" (and a memory barrier) to bcm2836_boot_secondary, the function that wakes the waiting cores during booting. This is required if the secondary cores are sitting in "wfe", and harmless if not. Signed-off-by: Phil Elwell --- arch/arm/mach-bcm/platsmp.c | 3 +++ 1 file cha

[PATCH 0/1] ARM: bcm2836: Send event when onlining other cores

2017-08-08 Thread Phil Elwell
e irqchip driver. [1] - https://github.com/anholt/linux/commits/bcm2835-soc-smp-cleanup Phil Elwell (1): ARM: bcm2836: Send event when onlining other cores arch/arm/mach-bcm/platsmp.c | 3 +++ 1 file changed, 3 insertions(+) -- 1.9.1

Re: [PATCH v3 3/4] irqchip: Add BCM2835 AUX interrupt controller

2017-06-20 Thread Phil Elwell
On 19/06/2017 22:13, Florian Fainelli wrote: > On 06/14/2017 09:29 AM, Phil Elwell wrote: >> Devices in the BCM2835 AUX block share a common interrupt line, with a >> register indicating which devices have active IRQs. Expose this as a >> nested interrupt controller to avoid

[PATCH v3 2/4] dt: bindings: Add bindings for bcm2835-aux-intc

2017-06-14 Thread Phil Elwell
Add bindings documentation for brcm,bcm2835-aux-intc and human-readable declarations for the BCM2835 AUX IRQs. Signed-off-by: Phil Elwell Reviewed-by: Florian Fainelli --- .../interrupt-controller/brcm,bcm2835-aux-intc.txt | 27 ++ .../interrupt-controller/bcm2835-aux

[PATCH v3 0/4] Add bcm2835aux interrupt controller

2017-06-14 Thread Phil Elwell
to permit sharing. Phil Elwell (4): clk: bcm2835: More flexible IO register remapping dt: bindings: Add bindings for bcm2835-aux-intc irqchip: Add BCM2835 AUX interrupt controller ARM: dts: bcm283x: Add and use bcm2835-aux-intc .../interrupt-controller/brcm,bcm2835-aux-intc.txt | 28

[PATCH v3 4/4] ARM: dts: bcm283x: Add and use bcm2835-aux-intc

2017-06-14 Thread Phil Elwell
reserving it, along with preparing for a point in the future where the clock node may be shrunk to the single word it actually needs. Signed-off-by: Phil Elwell --- arch/arm/boot/dts/bcm283x.dtsi | 27 +++ 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/arch/arm

[PATCH v3 1/4] clk: bcm2835: More flexible IO register remapping

2017-06-14 Thread Phil Elwell
handling the case where this driver's MEM resource has been reduced to include only the AUXENB register. Otherwise, use devm_ioremap to remap the region without reserving it. Signed-off-by: Phil Elwell --- drivers/clk/bcm/clk-bcm2835-aux.c | 27 +++ 1 file change

[PATCH v3 3/4] irqchip: Add BCM2835 AUX interrupt controller

2017-06-14 Thread Phil Elwell
Devices in the BCM2835 AUX block share a common interrupt line, with a register indicating which devices have active IRQs. Expose this as a nested interrupt controller to avoid IRQ sharing problems (easily observed if UART1 and SPI1/2 are enabled simultaneously). Signed-off-by: Phil Elwell

Re: [PATCH v2 3/4] irqchip: Add BCM2835 AUX interrupt controller

2017-06-12 Thread Phil Elwell
On 12/06/2017 15:59, Marc Zyngier wrote:> On 12/06/17 15:25, Phil Elwell wrote: >> Devices in the BCM2835 AUX block share a common interrupt line, with a >> register indicating which devices have active IRQs. Expose this as a >> nested interrupt controller to avoid IRQ sha

[PATCH v2 4/4] ARM: dts: bcm283x: Add and use bcm2835-aux-intc

2017-06-12 Thread Phil Elwell
it, along with preparing for a point in the future where the clock node MEM resource may be shrunk to the single word it actually needs. Signed-off-by: Phil Elwell --- arch/arm/boot/dts/bcm283x.dtsi | 27 +++ 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a

[PATCH v2 1/4] clk: bcm2835: More flexible IO register remapping

2017-06-12 Thread Phil Elwell
handling the case where this driver's MEM resource has been reduced to include only the AUXENB register. Otherwise, use devm_ioremap to remap the region without reserving it. Signed-off-by: Phil Elwell --- drivers/clk/bcm/clk-bcm2835-aux.c | 20 1 file changed, 16 inser

[PATCH v2 2/4] dt: bindings: Add bindings for bcm2835-aux-intc

2017-06-12 Thread Phil Elwell
Add bindings documentation for brcm,bcm2835-aux-intc and human-readable declarations for the BCM2835 AUX IRQs. Signed-off-by: Phil Elwell --- .../interrupt-controller/brcm,bcm2835-aux-intc.txt | 28 ++ .../interrupt-controller/bcm2835-aux-intc.h| 20

[PATCH v2 3/4] irqchip: Add BCM2835 AUX interrupt controller

2017-06-12 Thread Phil Elwell
Devices in the BCM2835 AUX block share a common interrupt line, with a register indicating which devices have active IRQs. Expose this as a nested interrupt controller to avoid IRQ sharing problems (easily observed if UART1 and SPI1/2 are enabled simultaneously). Signed-off-by: Phil Elwell

[PATCH v2 0/4] Add bcm2835aux interrupt controller

2017-06-12 Thread Phil Elwell
AUX clock driver for a time when its DT node may only be a single word register, but until then ioremap its region without reserving it to permit sharing. Phil Elwell (4): clk: bcm2835: More flexible IO register remapping dt: bindings: Add bindings for bcm2835-aux-intc irqchip: Add

Re: [PATCH 0/2] Add bcm2835aux interrupt controller

2017-06-08 Thread Phil Elwell
On 07/06/2017 21:58, Florian Fainelli wrote: > On 06/07/2017 04:11 AM, Phil Elwell wrote: >> Devices in the AUX block share a common interrupt line, with a register >> indicating which devices have active IRQs. Expose this as a nested >> interrupt controller to avoid IRQ sha

Re: [PATCH 0/2] Add bcm2835aux interrupt controller

2017-06-07 Thread Phil Elwell
On 07/06/2017 21:37, Stefan Wahren wrote: Hi Phil, Phil Elwell hat am 7. Juni 2017 um 13:11 geschrieben: Devices in the AUX block share a common interrupt line, with a register indicating which devices have active IRQs. Expose this as a nested interrupt controller to avoid IRQ sharing

Re: [PATCH 1/2] clk: bcm2835: Add AUX interrupt controller

2017-06-07 Thread Phil Elwell
On 07/06/2017 18:25, Alexander Stein wrote: On Wednesday, June 7, 2017, 2:37:41 PM CEST Phil Elwell wrote: On 07/06/2017 13:07, Alexander Stein wrote: On Wednesday 07 June 2017 12:11:45, Phil Elwell wrote: Devices in the AUX block share a common interrupt line, with a register indicating

Re: [PATCH 1/2] clk: bcm2835: Add AUX interrupt controller

2017-06-07 Thread Phil Elwell
On 07/06/2017 13:07, Alexander Stein wrote: > On Wednesday 07 June 2017 12:11:45, Phil Elwell wrote: >> Devices in the AUX block share a common interrupt line, with a register >> indicating which devices have active IRQs. Expose this as a nested >> interrupt controller

[PATCH 2/2] ARM: dts: bcm283x: Enable AUX interrupt controller

2017-06-07 Thread Phil Elwell
Now that the AUX block has a dedicated interrupt controller, declare it in the Device Tree and update the bcm283x uart1 and spi1/spi2 nodes to use it. Signed-off-by: Phil Elwell --- arch/arm/boot/dts/bcm283x.dtsi | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a

[PATCH 1/2] clk: bcm2835: Add AUX interrupt controller

2017-06-07 Thread Phil Elwell
Devices in the AUX block share a common interrupt line, with a register indicating which devices have active IRQs. Expose this as a nested interrupt controller to avoid IRQ sharing problems (easily observed if UART1 and SPI1/2 are enabled simultaneously). Signed-off-by: Phil Elwell --- drivers

[PATCH 0/2] Add bcm2835aux interrupt controller

2017-06-07 Thread Phil Elwell
arguably be forked off as a separate irqchip driver, but the clock driver has already claimed the AUX_IRQ register so some driver and DT surgery would still be required. Eric Anholt thought that including it here is reasonable, but I'm prepared to split it out if this is considered too hacky. Phil E

Re: CLK_OF_DECLARE advice required

2017-06-06 Thread Phil Elwell
On 05/06/2017 21:13, Stephen Boyd wrote: > On 06/05, Phil Elwell wrote: >> That sounds great, but it doesn't match my experience. Let me restate my >> observations with a bit more detail. >> >> In this scenario there three devices in a dependency chain: >> >

Re: CLK_OF_DECLARE advice required

2017-06-05 Thread Phil Elwell
On 02/06/2017 23:34, Stephen Boyd wrote:> On 06/01, Phil Elwell wrote: >> On 01/06/2017 07:39, Stephen Boyd wrote: >>> On 05/31, Phil Elwell wrote: >>>> For my edification, can you pretend for a moment that the application was >>>> a valid one an

[PATCH v4 1/2] clk: bcm2835: Limit PCM clock to OSC and PLLD_PER

2017-06-01 Thread Phil Elwell
-off-by: Phil Elwell Reviewed-by: Eric Anholt Acked-by: Stefan Wahren --- drivers/clk/bcm/clk-bcm2835.c | 27 ++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c index 0258538..49867d2 100644 --- a

[PATCH v4 0/2] clk: bcm2835: PCM clock improvements

2017-06-01 Thread Phil Elwell
Changes in v2: * Extended bcm2835_pcm_per_parents to cover the pllh_aux slot, and gave it a comment in patch 1. * Added a REGISTER_PCM_CLK analagous to REGISTER_PER_CLK in patch 1. * Renamed temporary variable idiv to int_div in patch 2. * Fix comment formatting in patch 2. Phil Elwell (2): clk: bcm

[PATCH v4 2/2] clk: bcm2835: Minimise clock jitter for PCM clock

2017-06-01 Thread Phil Elwell
jitter. The metric is the ideal rate minus the worse deviation from that ideal using the nearest integer divisors. Use this metric for parent selection for clocks requiring low jitter (currently just PCM). Signed-off-by: Phil Elwell Reviewed-by: Eric Anholt Acked-by: Stefan Wahren --- drivers

[PATCH v3 2/2] clk: bcm2835: Minimise clock jitter for PCM clock

2017-06-01 Thread Phil Elwell
jitter. The metric is the ideal rate minus the worse deviation from that ideal using the nearest integer divisors. Use this metric for parent selection for clocks requiring low jitter (currently just PCM). Signed-off-by: Phil Elwell Reviewed-by: Eric Anholt --- drivers/clk/bcm/clk-bcm2835.c | 34

[PATCH v3 1/2] clk: bcm2835: Limit PCM clock to OSC and PLLD_PER

2017-06-01 Thread Phil Elwell
-off-by: Phil Elwell Reviewed-by: Eric Anholt --- drivers/clk/bcm/clk-bcm2835.c | 27 ++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c index 0258538..81ecd4c 100644 --- a/drivers/clk/bcm/clk

[PATCH v3 0/2] clk: bcm2835: PCM clock improvements

2017-06-01 Thread Phil Elwell
and gave it a comment in patch 1. * Added a REGISTER_PCM_CLK analagous to REGISTER_PER_CLK in patch 1. * Renamed temporary variable idiv to int_div in patch 2. Phil Elwell (2): clk: bcm2835: Limit PCM clock to OSC and PLLD_PER clk: bcm2835: Minimise clock jitter for PCM clock drivers/clk/bcm/clk

Re: [PATCH 1/2] clk: bcm2835: Limit PCM clock to OSC and PLLD_PER

2017-06-01 Thread Phil Elwell
On 31/05/2017 22:24, Eric Anholt wrote: > Phil Elwell writes: > >> Restrict clock sources for the PCM peripheral to the oscillator and >> PLLD_PER because other source may have varying rates or be switched off. >> Prevent other sources from being selected by replacing th

Re: [PATCH v2 2/2] clk: bcm2835: Minimise clock jitter for PCM clock

2017-06-01 Thread Phil Elwell
On 31/05/2017 22:36, Eric Anholt wrote: > Phil Elwell writes: > >> Fractional clock dividers generate accurate average frequencies but >> with jitter, particularly when the integer divisor is small. >> >> Introduce a new metric of clock accuracy to penalise clo

Re: CLK_OF_DECLARE advice required

2017-06-01 Thread Phil Elwell
On 01/06/2017 07:39, Stephen Boyd wrote: > On 05/31, Phil Elwell wrote: >> On 31/05/2017 16:58, Stefan Wahren wrote: >>> Am 31.05.2017 um 17:27 schrieb Stephen Warren: >>>> On 05/30/2017 06:23 AM, Phil Elwell wrote: >>>>> Hi, >>>>> &

Re: CLK_OF_DECLARE advice required

2017-05-31 Thread Phil Elwell
On 31/05/2017 16:58, Stefan Wahren wrote: > Am 31.05.2017 um 17:27 schrieb Stephen Warren: >> On 05/30/2017 06:23 AM, Phil Elwell wrote: >>> Hi, >>> >>> I've run into a problem using the fixed-factor clock on Raspberry Pi >>> and I'd >

[PATCH v2 0/2] clk: bcm2835: PCM clock improvements

2017-05-31 Thread Phil Elwell
LK analagous to REGISTER_PER_CLK in patch 1. * Renamed temporary variable idiv to int_div in patch 2. Phil Elwell (2): clk: bcm2835: Limit PCM clock to OSC and PLLD_PER clk: bcm2835: Minimise clock jitter for PCM clock drivers/clk/bcm/clk-bcm2835.c | 50 ++- 1 f

[PATCH v2 1/2] clk: bcm2835: Limit PCM clock to OSC and PLLD_PER

2017-05-31 Thread Phil Elwell
-off-by: Phil Elwell --- drivers/clk/bcm/clk-bcm2835.c | 27 ++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c index 0258538..81ecd4c 100644 --- a/drivers/clk/bcm/clk-bcm2835.c +++ b/drivers/clk

[PATCH v2 2/2] clk: bcm2835: Minimise clock jitter for PCM clock

2017-05-31 Thread Phil Elwell
jitter. The metric is the ideal rate minus the worse deviation from that ideal using the nearest integer divisors. Use this metric for parent selection for clocks requiring low jitter (currently just PCM). Signed-off-by: Phil Elwell --- drivers/clk/bcm/clk-bcm2835.c | 40

Re: [PATCH 2/2] clk: bcm2835: Minimise clock jitter for PCM clock

2017-05-31 Thread Phil Elwell
Hi Stefan, On 30/05/2017 20:04, Stefan Wahren wrote: > Hi Phil, > >> Phil Elwell hat am 30. Mai 2017 um 18:28 geschrieben: >> >> >> Fractional clock dividers generate accurate average frequencies but >> with jitter, particularly when the integer divisor is sm

Re: [PATCH 1/2] clk: bcm2835: Limit PCM clock to OSC and PLLD_PER

2017-05-31 Thread Phil Elwell
Hi Stefan, On 30/05/2017 19:41, Stefan Wahren wrote: > Hi Phil, > >> Phil Elwell hat am 30. Mai 2017 um 18:28 geschrieben: >> >> >> Restrict clock sources for the PCM peripheral to the oscillator and >> PLLD_PER because other source may have varying rates or

[PATCH 2/2] clk: bcm2835: Minimise clock jitter for PCM clock

2017-05-30 Thread Phil Elwell
jitter. The metric is the ideal rate minus the worse deviation from that ideal using the nearest integer divisors. Use this metric for parent selection for clocks requiring low jitter (currently just PCM). Signed-off-by: Phil Elwell --- drivers/clk/bcm/clk-bcm2835.c | 39

[PATCH 1/2] clk: bcm2835: Limit PCM clock to OSC and PLLD_PER

2017-05-30 Thread Phil Elwell
-off-by: Phil Elwell --- drivers/clk/bcm/clk-bcm2835.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c index 0258538..facc346 100644 --- a/drivers/clk/bcm/clk-bcm2835.c +++ b/drivers/clk/bcm/clk-bcm2835.c @@ -1511,6

  1   2   >