[PATCH v4 5/8] ehci-atmel: Power down during suspend is normal

2017-09-28 Thread Romain Izard
When an Atmel SoC is suspended with the backup mode, the USB bus will be powered down. As this is expected, do not return an error to the driver core when ehci_resume detects it. Signed-off-by: Romain Izard Acked-by: Nicolas Ferre --- drivers/usb/host/ehci-atmel.c | 3 ++- 1 file changed, 2

[PATCH v4 1/8] clk: at91: pmc: Wait for clocks when resuming

2017-09-28 Thread Romain Izard
Wait for the syncronization of all clocks when resuming, not only the UPLL clock. Do not use regmap_read_poll_timeout, as it will call BUG() when interrupts are masked, which is the case in here. Signed-off-by: Romain Izard Acked-by: Ludovic Desroches Acked-by: Nicolas Ferre --- drivers/clk

[PATCH v4 8/8] tty/serial: atmel: Prevent a warning on suspend

2017-09-28 Thread Romain Izard
spend_port disappears, and suspending is 20ms shorter for each enabled Atmel serial port. Signed-off-by: Romain Izard Tested-by: Nicolas Ferre Acked-by: Nicolas Ferre Acked-by: Richard Genoud --- drivers/tty/serial/atmel_serial.c | 13 + 1 file changed, 13 insertions(+) diff --git a/d

[PATCH v4 6/8] pwm: atmel-tcb: Support backup mode

2017-09-28 Thread Romain Izard
Save and restore registers for the PWM on suspend and resume, which makes hibernation and backup modes possible. Signed-off-by: Romain Izard <romain.izard@gmail.com> Acked-by: Nicolas Ferre <nicolas.fe...@microchip.com> --- drivers/pwm/pwm-atme

[PATCH v4 6/8] pwm: atmel-tcb: Support backup mode

2017-09-28 Thread Romain Izard
Save and restore registers for the PWM on suspend and resume, which makes hibernation and backup modes possible. Signed-off-by: Romain Izard Acked-by: Nicolas Ferre --- drivers/pwm/pwm-atmel-tcb.c | 63 +++-- 1 file changed, 61 insertions(+), 2 deletions

Re: [PATCH v3 4/8] mtd: nand: atmel: Avoid ECC errors when leaving backup mode

2017-09-27 Thread Romain Izard
2017-09-27 17:08 GMT+02:00 Boris Brezillon <boris.brezil...@free-electrons.com>: > On Wed, 27 Sep 2017 10:35:51 +0200 > Romain Izard <romain.izard@gmail.com> wrote: > >> During backup mode, the contents of all registers will be cleared as the >> So

Re: [PATCH v3 4/8] mtd: nand: atmel: Avoid ECC errors when leaving backup mode

2017-09-27 Thread Romain Izard
2017-09-27 17:08 GMT+02:00 Boris Brezillon : > On Wed, 27 Sep 2017 10:35:51 +0200 > Romain Izard wrote: > >> During backup mode, the contents of all registers will be cleared as the >> SoC will be completely powered down. For a product that boots on NAND >> F

[PATCH v3 3/8] clk: at91: pmc: Support backup for programmable clocks

2017-09-27 Thread Romain Izard
From: Romain Izard <romain.iz...@mobile-devices.fr> When an AT91 programmable clock is declared in the device tree, register it into the Power Management Controller driver. On entering suspend mode, the driver saves and restores the Programmable Clock registers to support the backu

[PATCH v3 3/8] clk: at91: pmc: Support backup for programmable clocks

2017-09-27 Thread Romain Izard
From: Romain Izard When an AT91 programmable clock is declared in the device tree, register it into the Power Management Controller driver. On entering suspend mode, the driver saves and restores the Programmable Clock registers to support the backup mode for these clocks. Signed-off-by: Romain

[PATCH v3 2/8] clk: at91: pmc: Save SCSR during suspend

2017-09-27 Thread Romain Izard
clocks will be impacted. Fix the obvious typo in the suspend/resume code, as the IMR register does not need to be saved twice. Signed-off-by: Romain Izard <romain.izard@gmail.com> Acked-by: Nicolas Ferre <nicolas.fe...@microchip.com> --- drivers/clk/at91/pmc.c | 4 ++-- 1 fil

[PATCH v3 2/8] clk: at91: pmc: Save SCSR during suspend

2017-09-27 Thread Romain Izard
clocks will be impacted. Fix the obvious typo in the suspend/resume code, as the IMR register does not need to be saved twice. Signed-off-by: Romain Izard Acked-by: Nicolas Ferre --- drivers/clk/at91/pmc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/clk/at91

[PATCH v3 0/8] Various patches for SAMA5D2 backup mode

2017-09-27 Thread Romain Izard
variable in the tty/serial patch Changes in v3: * drop dev_printk changes for PMECC * rework the resume code for PMECC * improve comments on PMC clock handling Romain Izard (8): clk: at91: pmc: Wait for clocks when resuming clk: at91: pmc: Save SCSR during suspend clk: at91: pmc: Support

[PATCH v3 0/8] Various patches for SAMA5D2 backup mode

2017-09-27 Thread Romain Izard
variable in the tty/serial patch Changes in v3: * drop dev_printk changes for PMECC * rework the resume code for PMECC * improve comments on PMC clock handling Romain Izard (8): clk: at91: pmc: Wait for clocks when resuming clk: at91: pmc: Save SCSR during suspend clk: at91: pmc: Support

[PATCH v3 5/8] ehci-atmel: Power down during suspend is normal

2017-09-27 Thread Romain Izard
When an Atmel SoC is suspended with the backup mode, the USB bus will be powered down. As this is expected, do not return an error to the driver core when ehci_resume detects it. Signed-off-by: Romain Izard <romain.izard@gmail.com> Acked-by: Nicolas Ferre <nicolas.fe...@micr

[PATCH v3 5/8] ehci-atmel: Power down during suspend is normal

2017-09-27 Thread Romain Izard
When an Atmel SoC is suspended with the backup mode, the USB bus will be powered down. As this is expected, do not return an error to the driver core when ehci_resume detects it. Signed-off-by: Romain Izard Acked-by: Nicolas Ferre --- drivers/usb/host/ehci-atmel.c | 3 ++- 1 file changed, 2

[PATCH v3 4/8] mtd: nand: atmel: Avoid ECC errors when leaving backup mode

2017-09-27 Thread Romain Izard
-by: Romain Izard <romain.izard@gmail.com> --- Change in v3: * keep the PMECC disabled when not in use, and use atmel_pmecc_resume to reset the controller after the bootloader has left it enabled. drivers/mtd/nand/atmel/nand-controller.c | 3 +++ drivers/mtd/nand/atmel/pmecc.c

[PATCH v3 4/8] mtd: nand: atmel: Avoid ECC errors when leaving backup mode

2017-09-27 Thread Romain Izard
-by: Romain Izard --- Change in v3: * keep the PMECC disabled when not in use, and use atmel_pmecc_resume to reset the controller after the bootloader has left it enabled. drivers/mtd/nand/atmel/nand-controller.c | 3 +++ drivers/mtd/nand/atmel/pmecc.c | 22 ++ drivers

[PATCH v3 6/8] pwm: atmel-tcb: Support backup mode

2017-09-27 Thread Romain Izard
Save and restore registers for the PWM on suspend and resume, which makes hibernation and backup modes possible. Signed-off-by: Romain Izard <romain.izard@gmail.com> Acked-by: Nicolas Ferre <nicolas.fe...@microchip.com> --- drivers/pwm/pwm-atme

[PATCH v3 6/8] pwm: atmel-tcb: Support backup mode

2017-09-27 Thread Romain Izard
Save and restore registers for the PWM on suspend and resume, which makes hibernation and backup modes possible. Signed-off-by: Romain Izard Acked-by: Nicolas Ferre --- drivers/pwm/pwm-atmel-tcb.c | 63 +++-- 1 file changed, 61 insertions(+), 2 deletions

[PATCH v3 8/8] tty/serial: atmel: Prevent a warning on suspend

2017-09-27 Thread Romain Izard
spend_port disappears, and suspending is 20ms shorter for each enabled Atmel serial port. Signed-off-by: Romain Izard <romain.izard@gmail.com> Tested-by: Nicolas Ferre <nicolas.fe...@microchip.com> Acked-by: Nicolas Ferre <nicolas.fe...@microchip.com> Acked-by: Richard Geno

[PATCH v3 7/8] atmel_flexcom: Support backup mode

2017-09-27 Thread Romain Izard
The controller used by a flexcom module is configured at boot, and left alone after this. As the configuration will be lost after backup mode, restore the state of the flexcom driver on resume. Signed-off-by: Romain Izard <romain.izard@gmail.com> Acked-by: Nicolas Ferre <n

[PATCH v3 8/8] tty/serial: atmel: Prevent a warning on suspend

2017-09-27 Thread Romain Izard
spend_port disappears, and suspending is 20ms shorter for each enabled Atmel serial port. Signed-off-by: Romain Izard Tested-by: Nicolas Ferre Acked-by: Nicolas Ferre Acked-by: Richard Genoud --- drivers/tty/serial/atmel_serial.c | 13 + 1 file changed, 13 insertions(+) diff --git a/d

[PATCH v3 7/8] atmel_flexcom: Support backup mode

2017-09-27 Thread Romain Izard
The controller used by a flexcom module is configured at boot, and left alone after this. As the configuration will be lost after backup mode, restore the state of the flexcom driver on resume. Signed-off-by: Romain Izard Acked-by: Nicolas Ferre Tested-by: Nicolas Ferre --- drivers/mfd/atmel

[PATCH v3 1/8] clk: at91: pmc: Wait for clocks when resuming

2017-09-27 Thread Romain Izard
Wait for the syncronization of all clocks when resuming, not only the UPLL clock. Do not use regmap_read_poll_timeout, as it will call BUG() when interrupts are masked, which is the case in here. Signed-off-by: Romain Izard <romain.izard@gmail.com> Acked-by: Ludovic Desroches <ludov

[PATCH v3 1/8] clk: at91: pmc: Wait for clocks when resuming

2017-09-27 Thread Romain Izard
Wait for the syncronization of all clocks when resuming, not only the UPLL clock. Do not use regmap_read_poll_timeout, as it will call BUG() when interrupts are masked, which is the case in here. Signed-off-by: Romain Izard Acked-by: Ludovic Desroches Acked-by: Nicolas Ferre --- drivers/clk

Re: [PATCH v2 3/9] clk: at91: pmc: Support backup for programmable clocks

2017-09-25 Thread Romain Izard
2017-09-22 12:31 GMT+02:00 Nicolas Ferre <nicolas.fe...@microchip.com>: > On 15/09/2017 at 16:04, Romain Izard wrote: >> From: Romain Izard <romain.iz...@mobile-devices.fr> >> >> When an AT91 programmable clock is declared in the device tree, register >>

Re: [PATCH v2 3/9] clk: at91: pmc: Support backup for programmable clocks

2017-09-25 Thread Romain Izard
2017-09-22 12:31 GMT+02:00 Nicolas Ferre : > On 15/09/2017 at 16:04, Romain Izard wrote: >> From: Romain Izard >> >> When an AT91 programmable clock is declared in the device tree, register >> it into the Power Management Controller driver. On entering suspen

Re: [PATCH v2 5/9] mtd: nand: atmel: Report PMECC failures as errors

2017-09-21 Thread Romain Izard
2017-09-18 12:00 GMT+02:00 Boris Brezillon <boris.brezil...@free-electrons.com>: > Hi Romain, > > On Fri, 15 Sep 2017 16:04:07 +0200 > Romain Izard <romain.izard@gmail.com> wrote: > >> It is not normal for the PMECC to fail when trying to fix ECC errors

Re: [PATCH v2 5/9] mtd: nand: atmel: Report PMECC failures as errors

2017-09-21 Thread Romain Izard
2017-09-18 12:00 GMT+02:00 Boris Brezillon : > Hi Romain, > > On Fri, 15 Sep 2017 16:04:07 +0200 > Romain Izard wrote: > >> It is not normal for the PMECC to fail when trying to fix ECC errors. >> Report these cases as errors. > > I'm not sure we want to have ECC

[PATCH] ARM: unaligned.h: Use an arch-specific version

2017-09-20 Thread Romain Izard
header to ARM, to retain other optimizations that rely on HAVE_EFFICIENT_UNALIGNED_ACCESS, while making sure that access that explicitly rely on the unaligned accessors are correctly handled by the compiler. Signed-off-by: Romain Izard <romain.izard@gmail.com> --- This is a fol

[PATCH] ARM: unaligned.h: Use an arch-specific version

2017-09-20 Thread Romain Izard
header to ARM, to retain other optimizations that rely on HAVE_EFFICIENT_UNALIGNED_ACCESS, while making sure that access that explicitly rely on the unaligned accessors are correctly handled by the compiler. Signed-off-by: Romain Izard --- This is a follow-up to this discussion

Re: [PATCH v2 8/9] atmel_flexcom: Support backup mode

2017-09-20 Thread Romain Izard
2017-09-19 17:25 GMT+02:00 Lee Jones <lee.jo...@linaro.org>: > On Tue, 19 Sep 2017, Nicolas Ferre wrote: > >> On 15/09/2017 at 16:04, Romain Izard wrote: >> > The controller used by a flexcom module is configured at boot, and left >> > alone after this. As

Re: [PATCH v2 8/9] atmel_flexcom: Support backup mode

2017-09-20 Thread Romain Izard
2017-09-19 17:25 GMT+02:00 Lee Jones : > On Tue, 19 Sep 2017, Nicolas Ferre wrote: > >> On 15/09/2017 at 16:04, Romain Izard wrote: >> > The controller used by a flexcom module is configured at boot, and left >> > alone after this. As the configuration will be lost a

[PATCH v2 1/9] clk: at91: pmc: Wait for clocks when resuming

2017-09-15 Thread Romain Izard
Wait for the syncronization of all clocks when resuming, not only the UPLL clock. Do not use regmap_read_poll_timeout, as it will call BUG() when interrupts are masked, which is the case in here. Signed-off-by: Romain Izard <romain.izard@gmail.com> --- drivers/clk/at91/pmc.

[PATCH v2 1/9] clk: at91: pmc: Wait for clocks when resuming

2017-09-15 Thread Romain Izard
Wait for the syncronization of all clocks when resuming, not only the UPLL clock. Do not use regmap_read_poll_timeout, as it will call BUG() when interrupts are masked, which is the case in here. Signed-off-by: Romain Izard --- drivers/clk/at91/pmc.c | 24 1 file

[PATCH v2 2/9] clk: at91: pmc: Save SCSR during suspend

2017-09-15 Thread Romain Izard
clocks will be impacted. Fix the obvious typo in the suspend/resume code, as the IMR register does not need to be saved twice. Signed-off-by: Romain Izard <romain.izard@gmail.com> Acked-by: Nicolas Ferre <nicolas.fe...@microchip.com> --- drivers/clk/at91/pmc.c | 4 ++-- 1 fil

[PATCH v2 2/9] clk: at91: pmc: Save SCSR during suspend

2017-09-15 Thread Romain Izard
clocks will be impacted. Fix the obvious typo in the suspend/resume code, as the IMR register does not need to be saved twice. Signed-off-by: Romain Izard Acked-by: Nicolas Ferre --- drivers/clk/at91/pmc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/clk/at91

[PATCH v2 3/9] clk: at91: pmc: Support backup for programmable clocks

2017-09-15 Thread Romain Izard
From: Romain Izard <romain.iz...@mobile-devices.fr> When an AT91 programmable clock is declared in the device tree, register it into the Power Management Controller driver. On entering suspend mode, the driver saves and restores the Programmable Clock registers to support the backu

[PATCH v2 3/9] clk: at91: pmc: Support backup for programmable clocks

2017-09-15 Thread Romain Izard
From: Romain Izard When an AT91 programmable clock is declared in the device tree, register it into the Power Management Controller driver. On entering suspend mode, the driver saves and restores the Programmable Clock registers to support the backup mode for these clocks. Signed-off-by: Romain

[PATCH v2 7/9] pwm: atmel-tcb: Support backup mode

2017-09-15 Thread Romain Izard
Save and restore registers for the PWM on suspend and resume, which makes hibernation and backup modes possible. Signed-off-by: Romain Izard <romain.izard@gmail.com> --- drivers/pwm/pwm-atmel-tcb.c | 63 +++-- 1 file changed, 61 insertions

[PATCH v2 7/9] pwm: atmel-tcb: Support backup mode

2017-09-15 Thread Romain Izard
Save and restore registers for the PWM on suspend and resume, which makes hibernation and backup modes possible. Signed-off-by: Romain Izard --- drivers/pwm/pwm-atmel-tcb.c | 63 +++-- 1 file changed, 61 insertions(+), 2 deletions(-) diff --git a/drivers

[PATCH v2 8/9] atmel_flexcom: Support backup mode

2017-09-15 Thread Romain Izard
The controller used by a flexcom module is configured at boot, and left alone after this. As the configuration will be lost after backup mode, restore the state of the flexcom driver on resume. Signed-off-by: Romain Izard <romain.izard@gmail.com> --- drivers/mfd/atmel-flexcom.

[PATCH v2 9/9] tty/serial: atmel: Prevent a warning on suspend

2017-09-15 Thread Romain Izard
spend_port disappears, and suspending is 20ms shorter for each enabled Atmel serial port. Signed-off-by: Romain Izard <romain.izard@gmail.com> --- drivers/tty/serial/atmel_serial.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/drivers/tty/serial/atmel_serial.c b/dr

[PATCH v2 6/9] ehci-atmel: Power down during suspend is normal

2017-09-15 Thread Romain Izard
When an Atmel SoC is suspended with the backup mode, the USB bus will be powered down. As this is expected, do not return an error to the driver core when ehci_resume detects it. Signed-off-by: Romain Izard <romain.izard@gmail.com> --- drivers/usb/host/ehci-atmel.c | 3 ++- 1 file chan

[PATCH v2 9/9] tty/serial: atmel: Prevent a warning on suspend

2017-09-15 Thread Romain Izard
spend_port disappears, and suspending is 20ms shorter for each enabled Atmel serial port. Signed-off-by: Romain Izard --- drivers/tty/serial/atmel_serial.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c index 75

[PATCH v2 8/9] atmel_flexcom: Support backup mode

2017-09-15 Thread Romain Izard
The controller used by a flexcom module is configured at boot, and left alone after this. As the configuration will be lost after backup mode, restore the state of the flexcom driver on resume. Signed-off-by: Romain Izard --- drivers/mfd/atmel-flexcom.c | 65

[PATCH v2 6/9] ehci-atmel: Power down during suspend is normal

2017-09-15 Thread Romain Izard
When an Atmel SoC is suspended with the backup mode, the USB bus will be powered down. As this is expected, do not return an error to the driver core when ehci_resume detects it. Signed-off-by: Romain Izard --- drivers/usb/host/ehci-atmel.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion

[PATCH v2 5/9] mtd: nand: atmel: Report PMECC failures as errors

2017-09-15 Thread Romain Izard
It is not normal for the PMECC to fail when trying to fix ECC errors. Report these cases as errors. Signed-off-by: Romain Izard <romain.izard@gmail.com> --- drivers/mtd/nand/atmel/pmecc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/mtd/nand/atmel/pme

[PATCH v2 5/9] mtd: nand: atmel: Report PMECC failures as errors

2017-09-15 Thread Romain Izard
It is not normal for the PMECC to fail when trying to fix ECC errors. Report these cases as errors. Signed-off-by: Romain Izard --- drivers/mtd/nand/atmel/pmecc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/mtd/nand/atmel/pmecc.c b/drivers/mtd/nand/atmel

[PATCH v2 4/9] mtd: nand: atmel: Avoid ECC errors when leaving backup mode

2017-09-15 Thread Romain Izard
reset the PMECC controller before using it. Signed-off-by: Romain Izard <romain.izard@gmail.com> --- drivers/mtd/nand/atmel/pmecc.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/mtd/nand/atmel/pmecc.c b/drivers/mtd/nand/atmel/pmecc.c index 8c210a

[PATCH v2 4/9] mtd: nand: atmel: Avoid ECC errors when leaving backup mode

2017-09-15 Thread Romain Izard
reset the PMECC controller before using it. Signed-off-by: Romain Izard --- drivers/mtd/nand/atmel/pmecc.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/mtd/nand/atmel/pmecc.c b/drivers/mtd/nand/atmel/pmecc.c index 8c210a5776bc..8d1208f38025 100644

[PATCH v2 0/9] Various patches for SAMA5D2 backup mode

2017-09-15 Thread Romain Izard
a week without hanging. Changes in v2: * drop the IIO patch duplicating existing code * determine the number of programmable clocks to save dynamically * declare a required local variable in the tty/serial patch Romain Izard (9): clk: at91: pmc: Wait for clocks when resuming clk: at91: pmc

[PATCH v2 0/9] Various patches for SAMA5D2 backup mode

2017-09-15 Thread Romain Izard
a week without hanging. Changes in v2: * drop the IIO patch duplicating existing code * determine the number of programmable clocks to save dynamically * declare a required local variable in the tty/serial patch Romain Izard (9): clk: at91: pmc: Wait for clocks when resuming clk: at91: pmc

Re: [PATCH v1 01/10] clk: at91: pmc: Wait for clocks when resuming

2017-09-14 Thread Romain Izard
2017-09-13 14:15 GMT+02:00 Nicolas Ferre <nicolas.fe...@microchip.com>: > On 08/09/2017 at 17:35, Romain Izard wrote: >> Wait for the syncronization of all clocks when resuming, not only the >> UPLL clock. Do not use regmap_read_poll_timeout, as it will call BUG() >>

Re: [PATCH v1 01/10] clk: at91: pmc: Wait for clocks when resuming

2017-09-14 Thread Romain Izard
2017-09-13 14:15 GMT+02:00 Nicolas Ferre : > On 08/09/2017 at 17:35, Romain Izard wrote: >> Wait for the syncronization of all clocks when resuming, not only the >> UPLL clock. Do not use regmap_read_poll_timeout, as it will call BUG() >> when interrupts are masked, whic

Re: [PATCH v1 03/10] clk: at91: pmc: Support backup for programmable clocks

2017-09-14 Thread romain izard
2017-09-13 19:03 GMT+02:00 Alexandre Belloni <alexandre.bell...@free-electrons.com>: > On 13/09/2017 at 14:29:35 +0200, Nicolas Ferre wrote: >> On 08/09/2017 at 17:35, Romain Izard wrote: >> > From: Romain Izard <romain.iz...@mobile-devices.fr> >> >

Re: [PATCH v1 03/10] clk: at91: pmc: Support backup for programmable clocks

2017-09-14 Thread romain izard
2017-09-13 19:03 GMT+02:00 Alexandre Belloni : > On 13/09/2017 at 14:29:35 +0200, Nicolas Ferre wrote: >> On 08/09/2017 at 17:35, Romain Izard wrote: >> > From: Romain Izard >> > >> > Save and restore the System Clock and Programmable Clock register for >

Re: [PATCH v1 10/10] tty/serial: atmel: Prevent a warning on suspend

2017-09-11 Thread Romain Izard
2017-09-08 17:36 GMT+02:00 Romain Izard <romain.izard@gmail.com>: > The atmel serial port driver reported the following warning on suspend: > atmel_usart f802.serial: ttyS1: Unable to drain transmitter > > As the ATMEL_US_TXEMPTY status bit in ATMEL_US_CSR is alw

Re: [PATCH v1 10/10] tty/serial: atmel: Prevent a warning on suspend

2017-09-11 Thread Romain Izard
2017-09-08 17:36 GMT+02:00 Romain Izard : > The atmel serial port driver reported the following warning on suspend: > atmel_usart f802.serial: ttyS1: Unable to drain transmitter > > As the ATMEL_US_TXEMPTY status bit in ATMEL_US_CSR is always cleared > when the transmitter is di

Re: [PATCH v1 07/10] iio:adc:at91-sama5d2: Support backup mode

2017-09-08 Thread Romain Izard
2017-09-08 18:03 GMT+02:00 Nicolas Ferre <nicolas.fe...@microchip.com>: > On 08/09/2017 at 17:36, Romain Izard wrote: >> Support the backup mode for platform suspend, by restoring the hardware >> registers on resume. >> >> Signed-off-by: Romain Izard <ro

Re: [PATCH v1 07/10] iio:adc:at91-sama5d2: Support backup mode

2017-09-08 Thread Romain Izard
2017-09-08 18:03 GMT+02:00 Nicolas Ferre : > On 08/09/2017 at 17:36, Romain Izard wrote: >> Support the backup mode for platform suspend, by restoring the hardware >> registers on resume. >> >> Signed-off-by: Romain Izard > > Romain, > > Thanks for your se

[PATCH v1 02/10] clk: at91: pmc: Save SCSR during suspend

2017-09-08 Thread Romain Izard
clocks will be impacted. Fix the obvious typo in the suspend/resume code, as the IMR register does not need to be saved twice. Signed-off-by: Romain Izard <romain.izard@gmail.com> --- drivers/clk/at91/pmc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drive

[PATCH v1 02/10] clk: at91: pmc: Save SCSR during suspend

2017-09-08 Thread Romain Izard
clocks will be impacted. Fix the obvious typo in the suspend/resume code, as the IMR register does not need to be saved twice. Signed-off-by: Romain Izard --- drivers/clk/at91/pmc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/clk/at91/pmc.c b/drivers/clk/at91

[PATCH v1 03/10] clk: at91: pmc: Support backup for programmable clocks

2017-09-08 Thread Romain Izard
From: Romain Izard <romain.iz...@mobile-devices.fr> Save and restore the System Clock and Programmable Clock register for the backup use case. Signed-off-by: Romain Izard <romain.izard@gmail.com> --- drivers/clk/at91/pmc.c | 5 + 1 file changed, 5 insertions(+) diff --git a

[PATCH v1 03/10] clk: at91: pmc: Support backup for programmable clocks

2017-09-08 Thread Romain Izard
From: Romain Izard Save and restore the System Clock and Programmable Clock register for the backup use case. Signed-off-by: Romain Izard --- drivers/clk/at91/pmc.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/clk/at91/pmc.c b/drivers/clk/at91/pmc.c index 07dc2861ad3f

[PATCH v1 01/10] clk: at91: pmc: Wait for clocks when resuming

2017-09-08 Thread Romain Izard
Wait for the syncronization of all clocks when resuming, not only the UPLL clock. Do not use regmap_read_poll_timeout, as it will call BUG() when interrupts are masked, which is the case in here. Signed-off-by: Romain Izard <romain.izard@gmail.com> --- drivers/clk/at91/pmc.

[PATCH v1 01/10] clk: at91: pmc: Wait for clocks when resuming

2017-09-08 Thread Romain Izard
Wait for the syncronization of all clocks when resuming, not only the UPLL clock. Do not use regmap_read_poll_timeout, as it will call BUG() when interrupts are masked, which is the case in here. Signed-off-by: Romain Izard --- drivers/clk/at91/pmc.c | 24 1 file

[PATCH v1 05/10] mtd: nand: atmel: Report PMECC failures as errors

2017-09-08 Thread Romain Izard
It is not normal for the PMECC to fail when trying to fix ECC errors. Report these cases as errors. Signed-off-by: Romain Izard <romain.izard@gmail.com> --- drivers/mtd/nand/atmel/pmecc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/mtd/nand/atmel/pme

[PATCH v1 05/10] mtd: nand: atmel: Report PMECC failures as errors

2017-09-08 Thread Romain Izard
It is not normal for the PMECC to fail when trying to fix ECC errors. Report these cases as errors. Signed-off-by: Romain Izard --- drivers/mtd/nand/atmel/pmecc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/mtd/nand/atmel/pmecc.c b/drivers/mtd/nand/atmel

[PATCH v1 06/10] ehci-atmel: Power down during suspend is normal

2017-09-08 Thread Romain Izard
When an Atmel SoC is suspended with the backup mode, the USB bus will be powered down. As this is expected, do not return an error to the driver core when ehci_resume detects it. Signed-off-by: Romain Izard <romain.izard@gmail.com> --- drivers/usb/host/ehci-atmel.c | 3 ++- 1 file chan

[PATCH v1 06/10] ehci-atmel: Power down during suspend is normal

2017-09-08 Thread Romain Izard
When an Atmel SoC is suspended with the backup mode, the USB bus will be powered down. As this is expected, do not return an error to the driver core when ehci_resume detects it. Signed-off-by: Romain Izard --- drivers/usb/host/ehci-atmel.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion

[PATCH v1 10/10] tty/serial: atmel: Prevent a warning on suspend

2017-09-08 Thread Romain Izard
spend_port disappears, and suspending is 20ms shorter for each enabled Atmel serial port. Signed-off-by: Romain Izard <romain.izard@gmail.com> --- drivers/tty/serial/atmel_serial.c | 13 + 1 file changed, 13 insertions(+) diff --git a/drivers/tty/serial/atmel_serial.c b/dr

[PATCH v1 10/10] tty/serial: atmel: Prevent a warning on suspend

2017-09-08 Thread Romain Izard
spend_port disappears, and suspending is 20ms shorter for each enabled Atmel serial port. Signed-off-by: Romain Izard --- drivers/tty/serial/atmel_serial.c | 13 + 1 file changed, 13 insertions(+) diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c index 75

[PATCH v1 08/10] pwm: atmel-tcb: Support backup mode

2017-09-08 Thread Romain Izard
Save and restore registers for the PWM on suspend and resume, which makes hibernation and backup modes possible. Signed-off-by: Romain Izard <romain.izard@gmail.com> --- drivers/pwm/pwm-atmel-tcb.c | 63 +++-- 1 file changed, 61 insertions

[PATCH v1 08/10] pwm: atmel-tcb: Support backup mode

2017-09-08 Thread Romain Izard
Save and restore registers for the PWM on suspend and resume, which makes hibernation and backup modes possible. Signed-off-by: Romain Izard --- drivers/pwm/pwm-atmel-tcb.c | 63 +++-- 1 file changed, 61 insertions(+), 2 deletions(-) diff --git a/drivers

[PATCH v1 04/10] mtd: nand: atmel: Avoid ECC errors when leaving backup mode

2017-09-08 Thread Romain Izard
reset the PMECC controller before using it. Signed-off-by: Romain Izard <romain.izard@gmail.com> --- drivers/mtd/nand/atmel/pmecc.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/mtd/nand/atmel/pmecc.c b/drivers/mtd/nand/atmel/pmecc.c index 8c210a

[PATCH v1 04/10] mtd: nand: atmel: Avoid ECC errors when leaving backup mode

2017-09-08 Thread Romain Izard
reset the PMECC controller before using it. Signed-off-by: Romain Izard --- drivers/mtd/nand/atmel/pmecc.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/mtd/nand/atmel/pmecc.c b/drivers/mtd/nand/atmel/pmecc.c index 8c210a5776bc..8d1208f38025 100644

[PATCH v1 09/10] atmel_flexcom: Support backup mode

2017-09-08 Thread Romain Izard
The controller used by a flexcom module is configured at boot, and left alone after this. As the configuration will be lost after backup mode, restore the state of the flexcom driver on resume. Signed-off-by: Romain Izard <romain.izard@gmail.com> --- drivers/mfd/atmel-flexcom.

[PATCH v1 09/10] atmel_flexcom: Support backup mode

2017-09-08 Thread Romain Izard
The controller used by a flexcom module is configured at boot, and left alone after this. As the configuration will be lost after backup mode, restore the state of the flexcom driver on resume. Signed-off-by: Romain Izard --- drivers/mfd/atmel-flexcom.c | 65

[PATCH v1 07/10] iio:adc:at91-sama5d2: Support backup mode

2017-09-08 Thread Romain Izard
Support the backup mode for platform suspend, by restoring the hardware registers on resume. Signed-off-by: Romain Izard <romain.izard@gmail.com> --- drivers/iio/adc/at91-sama5d2_adc.c | 71 -- 1 file changed, 61 insertions(+), 10 deletions(-) diff

[PATCH v1 07/10] iio:adc:at91-sama5d2: Support backup mode

2017-09-08 Thread Romain Izard
Support the backup mode for platform suspend, by restoring the hardware registers on resume. Signed-off-by: Romain Izard --- drivers/iio/adc/at91-sama5d2_adc.c | 71 -- 1 file changed, 61 insertions(+), 10 deletions(-) diff --git a/drivers/iio/adc/at91

[PATCH v1 00/10] Various patches for SAMA5D2 backup mode

2017-09-08 Thread Romain Izard
a week without hanging. Romain Izard (10): clk: at91: pmc: Wait for clocks when resuming clk: at91: pmc: Save SCSR during suspend clk: at91: pmc: Support backup for programmable clocks mtd: nand: atmel: Avoid ECC errors when leaving backup mode mtd: nand: atmel: Report PMECC failures

[PATCH v1 00/10] Various patches for SAMA5D2 backup mode

2017-09-08 Thread Romain Izard
a week without hanging. Romain Izard (10): clk: at91: pmc: Wait for clocks when resuming clk: at91: pmc: Save SCSR during suspend clk: at91: pmc: Support backup for programmable clocks mtd: nand: atmel: Avoid ECC errors when leaving backup mode mtd: nand: atmel: Report PMECC failures

HAVE_EFFICIENT_UNALIGNED_ACCESS on ARM32 (was: Alignment issues in zImage with Linux 4.12, LZ4 and GCC5.3)

2017-09-04 Thread Romain Izard
2017-07-24 13:07 GMT+02:00 Ard Biesheuvel <ard.biesheu...@linaro.org>: > On 24 July 2017 at 11:57, Romain Izard <romain.izard@gmail.com> wrote: >> >> While upgrading the kernel from 4.9 to 4.12 for a custom board with a >> Cortex-A5 based CPU, I have encounter

HAVE_EFFICIENT_UNALIGNED_ACCESS on ARM32 (was: Alignment issues in zImage with Linux 4.12, LZ4 and GCC5.3)

2017-09-04 Thread Romain Izard
2017-07-24 13:07 GMT+02:00 Ard Biesheuvel : > On 24 July 2017 at 11:57, Romain Izard wrote: >> >> While upgrading the kernel from 4.9 to 4.12 for a custom board with a >> Cortex-A5 based CPU, I have encountered a compilation issue that leads to >> a data abort duri

Re: [PATCH 1/3] ARM: at91: pm: Add sama5d2 backup mode

2017-04-27 Thread Romain Izard
) > + mov pc, lr > +ENDPROC(at91_slowck_mode) > > /* > * void at91_sramc_self_refresh(unsigned int is_active) > @@ -314,6 +358,10 @@ ENDPROC(at91_sramc_self_refresh) > .word 0 > .sramc1_base: > .word 0 > +.shdwc: > + .word 0 > +.sfr: > + .word 0 > .memtype: > .word 0 > .pm_mode: > diff --git a/arch/arm/mach-at91/sama5.c b/arch/arm/mach-at91/sama5.c > index 6d157d0ead8e..3d0bf95a56ae 100644 > --- a/arch/arm/mach-at91/sama5.c > +++ b/arch/arm/mach-at91/sama5.c > @@ -34,7 +34,6 @@ DT_MACHINE_START(sama5_dt, "Atmel SAMA5") > MACHINE_END > > static const char *const sama5_alt_dt_board_compat[] __initconst = { > - "atmel,sama5d2", > "atmel,sama5d4", > NULL > }; > @@ -45,3 +44,21 @@ DT_MACHINE_START(sama5_alt_dt, "Atmel SAMA5") > .dt_compat = sama5_alt_dt_board_compat, > .l2c_aux_mask = ~0UL, > MACHINE_END > + > +static void __init sama5d2_init(void) > +{ > + of_platform_default_populate(NULL, NULL, NULL); > + sama5d2_pm_init(); > +} > + > +static const char *const sama5d2_compat[] __initconst = { > + "atmel,sama5d2", > + NULL > +}; > + > +DT_MACHINE_START(sama5d2, "Atmel SAMA5") > + /* Maintainer: Atmel */ > + .init_machine = sama5d2_init, > + .dt_compat = sama5d2_compat, > + .l2c_aux_mask = ~0UL, > +MACHINE_END Best regards, -- Romain Izard

Re: [PATCH 1/3] ARM: at91: pm: Add sama5d2 backup mode

2017-04-27 Thread Romain Izard
amc_self_refresh(unsigned int is_active) > @@ -314,6 +358,10 @@ ENDPROC(at91_sramc_self_refresh) > .word 0 > .sramc1_base: > .word 0 > +.shdwc: > + .word 0 > +.sfr: > + .word 0 > .memtype: > .word 0 > .pm_mode: > diff --git a/arch/arm/mach-at91/sama5.c b/arch/arm/mach-at91/sama5.c > index 6d157d0ead8e..3d0bf95a56ae 100644 > --- a/arch/arm/mach-at91/sama5.c > +++ b/arch/arm/mach-at91/sama5.c > @@ -34,7 +34,6 @@ DT_MACHINE_START(sama5_dt, "Atmel SAMA5") > MACHINE_END > > static const char *const sama5_alt_dt_board_compat[] __initconst = { > - "atmel,sama5d2", > "atmel,sama5d4", > NULL > }; > @@ -45,3 +44,21 @@ DT_MACHINE_START(sama5_alt_dt, "Atmel SAMA5") > .dt_compat = sama5_alt_dt_board_compat, > .l2c_aux_mask = ~0UL, > MACHINE_END > + > +static void __init sama5d2_init(void) > +{ > + of_platform_default_populate(NULL, NULL, NULL); > + sama5d2_pm_init(); > +} > + > +static const char *const sama5d2_compat[] __initconst = { > + "atmel,sama5d2", > + NULL > +}; > + > +DT_MACHINE_START(sama5d2, "Atmel SAMA5") > + /* Maintainer: Atmel */ > + .init_machine = sama5d2_init, > + .dt_compat = sama5d2_compat, > + .l2c_aux_mask = ~0UL, > +MACHINE_END Best regards, -- Romain Izard

Re: [PATCH v1] usb: gadget: udc: atmel: Remove an unused local variable

2017-03-10 Thread Romain Izard
2017-03-09 18:02 GMT+01:00 Romain Izard <romain.izard@gmail.com>: > The local variable ept_cfg is not used anymore in usba_ep_enable. > Use ep->ept_cfg in the debug function to remove a warning when building > with dynamic debug enabled. > > Signed-off-by: Ro

Re: [PATCH v1] usb: gadget: udc: atmel: Remove an unused local variable

2017-03-10 Thread Romain Izard
2017-03-09 18:02 GMT+01:00 Romain Izard : > The local variable ept_cfg is not used anymore in usba_ep_enable. > Use ep->ept_cfg in the debug function to remove a warning when building > with dynamic debug enabled. > > Signed-off-by: Romain Izard > Fixes: 741d2558bf0a (&qu

[PATCH v3 2/2] usb: gadget: reword configuration choices

2017-03-10 Thread Romain Izard
is not the only way to provice service as an USB gadget. Signed-off-by: Romain Izard <romain.izard@gmail.com> --- Changes in v3: - split from the functional patch drivers/usb/gadget/Kconfig | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/usb/gadget/Kc

[PATCH v3 2/2] usb: gadget: reword configuration choices

2017-03-10 Thread Romain Izard
is not the only way to provice service as an USB gadget. Signed-off-by: Romain Izard --- Changes in v3: - split from the functional patch drivers/usb/gadget/Kconfig | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfi

[PATCH v3 0/2] Various cleanups for USB Gadget Kconfig

2017-03-10 Thread Romain Izard
Fix some issues left when the configuration was updated to support a built-in USB gadget configfs together with modular legacy gadget drivers. Changes in v2: - Reword description Changes in v3: - Split functional and comment changes Romain Izard (2): usb: gadget: legacy gadgets are optional

[PATCH v3 0/2] Various cleanups for USB Gadget Kconfig

2017-03-10 Thread Romain Izard
Fix some issues left when the configuration was updated to support a built-in USB gadget configfs together with modular legacy gadget drivers. Changes in v2: - Reword description Changes in v3: - Split functional and comment changes Romain Izard (2): usb: gadget: legacy gadgets are optional

[PATCH v3 1/2] usb: gadget: legacy gadgets are optional

2017-03-10 Thread Romain Izard
gets") Cc: <sta...@vger.kernel.org> # 4.9+ Signed-off-by: Romain Izard <romain.izard@gmail.com> --- Changes in v2: - Reword description Changes in v3: - Remove comment changes drivers/usb/gadget/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/gadget/Kcon

[PATCH v3 1/2] usb: gadget: legacy gadgets are optional

2017-03-10 Thread Romain Izard
ts") Cc: # 4.9+ Signed-off-by: Romain Izard --- Changes in v2: - Reword description Changes in v3: - Remove comment changes drivers/usb/gadget/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig index 8ad203296079.

Re: [PATCH v2] usb: gadget: legacy gadgets are optional

2017-03-10 Thread Romain Izard
Hello Felipe, 2017-03-10 10:15 GMT+01:00 Felipe Balbi <ba...@kernel.org>: > > Hi, > > Romain Izard <romain.izard@gmail.com> writes: >> With commit "usb: gadget: don't couple configfs to legacy gadgets" >> it is possible to build a modular

Re: [PATCH v2] usb: gadget: legacy gadgets are optional

2017-03-10 Thread Romain Izard
Hello Felipe, 2017-03-10 10:15 GMT+01:00 Felipe Balbi : > > Hi, > > Romain Izard writes: >> With commit "usb: gadget: don't couple configfs to legacy gadgets" >> it is possible to build a modular kernel with both built-in configfs >> support and modul

[PATCH v1] usb: gadget: udc: atmel: Remove an unused local variable

2017-03-09 Thread Romain Izard
The local variable ept_cfg is not used anymore in usba_ep_enable. Use ep->ept_cfg in the debug function to remove a warning when building with dynamic debug enabled. Signed-off-by: Romain Izard <romain.izard@gmail.com> Fixes: 741d2558bf0a ("usb: gadget: udc: atmel: Update endpo

[PATCH v1] usb: gadget: udc: atmel: Remove an unused local variable

2017-03-09 Thread Romain Izard
The local variable ept_cfg is not used anymore in usba_ep_enable. Use ep->ept_cfg in the debug function to remove a warning when building with dynamic debug enabled. Signed-off-by: Romain Izard Fixes: 741d2558bf0a ("usb: gadget: udc: atmel: Update endpoint allocation scheme") ---

[PATCH v1] Revert "clocksource/drivers/tcb_clksrc: Use 32 bit tcb as sched_clock"

2017-03-09 Thread Romain Izard
ed as well. Signed-off-by: Romain Izard <romain.izard@gmail.com> --- drivers/clocksource/tcb_clksrc.c | 16 +--- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/drivers/clocksource/tcb_clksrc.c b/drivers/clocksource/tcb_clksrc.c index 745844ee973e..d4ca9962a759 1006

<    1   2   3   >