On Tue, Mar 31, 2020 at 07:50:32AM +0200, Ahmad Fatoum wrote:
> Hi,
>
> On 3/31/20 7:45 AM, Sascha Hauer wrote:
> > On Mon, Mar 30, 2020 at 04:39:13PM +0200, Ahmad Fatoum wrote:
> >> Since Linux v5.1, the pinctrl driver can use the st,package property
> >> if provided to validate whether the ball
Hi,
On 3/31/20 8:10 AM, Sascha Hauer wrote:
> On Mon, Mar 30, 2020 at 04:57:13PM +0200, Ahmad Fatoum wrote:
>> From: Ahmad Fatoum
>>
>> Use pwm_apply_state we can avoid having to store PWM state in the
>> instance structure and in future we have an easy way to support new
>> parameters like inver
Hello,
On 3/31/20 8:41 AM, Sascha Hauer wrote:
>> +pwm1 = &{/soc/timer@4400/pwm};
>> +pwm2 = &{/soc/timer@4000/pwm};
>> +pwm3 = &{/soc/timer@40001000/pwm};
>> +pwm4 = &{/soc/timer@40002000/pwm};
>> +pwm5 = &{/soc/timer@40003000/pw
On Mon, Mar 30, 2020 at 04:57:17PM +0200, Ahmad Fatoum wrote:
> From: Ahmad Fatoum
>
> This driver adds support for PWM driver on STM32 platform
> based on the Linux v5.4 support.
>
> Signed-off-by: Ahmad Fatoum
> ---
> arch/arm/dts/stm32mp151.dtsi | 12 +
> drivers/mfd/Kconfig
On Mon, Mar 30, 2020 at 04:57:13PM +0200, Ahmad Fatoum wrote:
> From: Ahmad Fatoum
>
> Use pwm_apply_state we can avoid having to store PWM state in the
> instance structure and in future we have an easy way to support new
> parameters like inverted duty cycle.
>
> Signed-off-by: Ahmad Fatoum
>
Hi,
On 3/31/20 7:45 AM, Sascha Hauer wrote:
> On Mon, Mar 30, 2020 at 04:39:13PM +0200, Ahmad Fatoum wrote:
>> Since Linux v5.1, the pinctrl driver can use the st,package property
>> if provided to validate whether the ball to be configured exists
>> on the package. Have barebox supply this proper
On Mon, Mar 30, 2020 at 04:39:13PM +0200, Ahmad Fatoum wrote:
> Since Linux v5.1, the pinctrl driver can use the st,package property
> if provided to validate whether the ball to be configured exists
> on the package. Have barebox supply this property.
>
> Signed-off-by: Ahmad Fatoum
> ---
> arc
On Mon, Mar 30, 2020 at 04:33:55PM +0200, Ahmad Fatoum wrote:
> of_property needs at least two parameters, the path and the property
> name. If we supply less, we risk crashes, e.g. by running
> of_property -fs /test
>
> Verify we got at least two parameters.
>
> Signed-off-by: Ahmad Fatoum
> --
On Mon, Mar 30, 2020 at 04:32:58PM +0200, Ahmad Fatoum wrote:
> Instead of hardcoding the 512 byte constant, use the symbolic
> SECTOR_SIZE.
>
> Signed-off-by: Ahmad Fatoum
> ---
> drivers/mci/mci-core.c | 10 +-
> 1 file changed, 5 insertions(+), 5 deletions(-)
Applied, thanks
Sascha
On Thu, Mar 26, 2020 at 07:33:00PM +0100, Jules Maselbas wrote:
> Hi,
>
> The two first patch are focused on two fixes for an issue I encountered
> when trying to use the DFU gadget on big flash partition (2MB).
>
> You can find more information in each patch, but here is a short summary
> of the
of_regmap_init_mmio_clk was introduced as to avoid allocating new
devices for syscon nodes, a device tree node sufficed.
We already have an existing device node though, so let's use that.
Through this device node, we can access the big-endian and friends
properties.
Signed-off-by: Ahmad Fatoum
-
The Linux default for the regmap MMIO bus used for syscon is little endian,
not big endian like for a general regmap bus.
This fixes network breakage on the STM32MP, which uses a syscon in
link mode configuration.
Signed-off-by: Ahmad Fatoum
---
drivers/base/regmap/regmap-mmio.c | 1 +
1 file c
From: Ahmad Fatoum
Import the Linux helper, so code using it may be more easily ported.
Signed-off-by: Ahmad Fatoum
---
drivers/of/base.c | 32
include/of.h | 8
2 files changed, 40 insertions(+)
diff --git a/drivers/of/base.c b/drivers/of/base.
This functions prepares a state that can later be tweaked and applied
to the PWM device with pwm_apply_state(). This is a convenient function
that first retrieves the current PWM state and the replaces the period
with the reference values defined in pwm->args.
Once the function returns, you can adj
From: Ahmad Fatoum
This driver adds support for PWM driver on STM32 platform
based on the Linux v5.4 support.
Signed-off-by: Ahmad Fatoum
---
arch/arm/dts/stm32mp151.dtsi | 12 +
drivers/mfd/Kconfig | 7 +
drivers/mfd/Makefile | 1 +
drivers/mfd/stm32-timers.c
From: Ahmad Fatoum
Some PWM chips support outputting an inverted PWM signal.
Add API support for this.
Signed-off-by: Ahmad Fatoum
---
drivers/pwm/core.c | 21 +
include/pwm.h | 6 ++
2 files changed, 23 insertions(+), 4 deletions(-)
diff --git a/drivers/pwm/core
From: Ahmad Fatoum
To support PWM_POLARITY_INVERTED for PWM LEDs, we need to to use the
apply API. Do so.
Signed-off-by: Ahmad Fatoum
---
drivers/led/led-pwm.c | 17 ++---
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/drivers/led/led-pwm.c b/drivers/led/led-pwm.c
Hi,
- Port Linux apply API to make porting future PWM drivers easier
- Remove duplicated PWM state, so device variables can be used to query
and influence actual configuration
- Add support for PWM polarity
- Add support for STM32
Cheers,
Ahmad Fatoum (12):
led: pwm: always initialize PWM LED
Linux has the new atomic PWM API in addition to the old one for backward
compatibility. We only have three PWM drivers in here, so port them over
to the new ->apply API.
Signed-off-by: Ahmad Fatoum
---
drivers/pwm/core.c| 66 +-
drivers/pwm/pwm-imx.c | 32 ++--
From: Ahmad Fatoum
Use pwm_apply_state we can avoid having to store PWM state in the
instance structure and in future we have an easy way to support new
parameters like inverted duty cycle.
Signed-off-by: Ahmad Fatoum
---
drivers/video/backlight-pwm.c | 13 -
1 file changed, 8 inse
From: Ahmad Fatoum
Client code can use pwm_apply_state or pwm_config to set period as well
as duty cycle. Having a pwm_set_period thus doesn't add any value.
Signed-off-by: Ahmad Fatoum
---
drivers/pwm/core.c | 7 +--
include/pwm.h | 1 -
2 files changed, 1 insertion(+), 7 deletions(-
From: Ahmad Fatoum
As a prerequisite for moving to the new apply API, we need to group all
state into one struct that we can apply at once. Prepare for this.
Signed-off-by: Ahmad Fatoum
---
drivers/pwm/core.c | 34 --
include/pwm.h | 21 +++-
From: Ahmad Fatoum
The setter sets a value unused anywhere, but in the getter.
As the functions are unused, just drop them.
There's pwm_config that can be used for this instead.
Signed-off-by: Ahmad Fatoum
---
drivers/pwm/core.c | 10 --
include/pwm.h | 2 --
2 files changed, 12
From: Ahmad Fatoum
In preparation for moving to a struct pwm_state like Linux does, turn
the flag into a variable.
Signed-off-by: Ahmad Fatoum
---
drivers/pwm/core.c | 12
include/pwm.h | 2 ++
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/drivers/pwm/core.
While the active-low property is respected when setting brightness,
it's ignored when initializing the LED as off in the probe function
and thus LEDs are active on startup. Fix this.
Fixes: 769eb5e7bb ("led: pwm: support active-low property")
Signed-off-by: Ahmad Fatoum
---
drivers/led/led-pwm.c
The STM32MP157A-EV1 and STM32MP157C-EV1 Evaluation boards are the
full-feature demonstration and development platforms for the STM32MP1.
The C suffix indicates that crypto and secure boot are supported.
They can be handled the same for now. Later on, when the crypto cores
get device tree nodes, we
Setting the NVMEM stride to 4 means we can't have nvmem cells pointing
at odd addresses. Linux sets it to 1 instead and handles reads at
unaligned addresses by splitting them up to aligned chunks. Copy over
the code to do the same. Unaligned writes remain illegal.
Signed-off-by: Ahmad Fatoum
---
Now that we have a nvmem cell describing the package, we don't need to
provide a stm32mp_package() function for querying it. Displaying the
package type on every boot is also not that useful, especially when some
SoCs don't even have the bsec field populated.
As the code has now become duplicate (
To facilitate using the same barebox binary for multiple variants of the
STM32MP15x, have it fix up the CPU device tree nodes.
Signed-off-by: Ahmad Fatoum
---
arch/arm/mach-stm32mp/init.c | 45
1 file changed, 45 insertions(+)
diff --git a/arch/arm/mach-stm3
Since Linux v5.1, the pinctrl driver can use the st,package property
if provided to validate whether the ball to be configured exists
on the package. Have barebox supply this property.
Signed-off-by: Ahmad Fatoum
---
arch/arm/dts/stm32mp151.dtsi| 16
drivers/pinctrl/pinctrl-stm32.c
bsec_read_field returns a negative value on error, pass it along
signed. This doesn't matter now, because we ignore the error code, but
it's the correct thing to do.
Signed-off-by: Ahmad Fatoum
---
arch/arm/mach-stm32mp/init.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
BSEC_SMC_READ_SHADOW and BSEC_SMC_WRITE_SHADOW aren't fields, but
operations to apply on fields. Rename it accordingly and fix up instances
where it was used wrongly.
Signed-off-by: Ahmad Fatoum
---
arch/arm/mach-stm32mp/include/mach/bsec.h | 6 +++---
drivers/nvmem/bsec.c |
Revision A was 0x1000 and B was 0x2000, so I assumed the next would
be revision C valued 0x3000. Alas, it's revision Z with 0x2001...
Change the code accordingly and add detection for the new 800Mhz
profiles.
Code taken from U-Boot commit
cf0818b477 ("stm32mp1: support of STM32MP15x Rev.Z") and
P
Hi Ahmad,
I think I've found the problem with my imx7d:
in your commit id ae0a375ba71ba9b9a70cb7eda177445fcfbf586d:
ARM: cache-armv7: remove duplicate domain initialization
...
you removed the two asm lines:
movne r1, #-1
mcrne p15, 0, r1, c3, c0, 0 @ load
of_property needs at least two parameters, the path and the property
name. If we supply less, we risk crashes, e.g. by running
of_property -fs /test
Verify we got at least two parameters.
Signed-off-by: Ahmad Fatoum
---
commands/of_property.c | 11 ---
1 file changed, 4 insertions(+), 7
Instead of hardcoding the 512 byte constant, use the symbolic
SECTOR_SIZE.
Signed-off-by: Ahmad Fatoum
---
drivers/mci/mci-core.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/mci/mci-core.c b/drivers/mci/mci-core.c
index 34aaee54f9ed..f3718327f18d 100644
Hi Sascha,
On Mon, Mar 30, 2020 at 07:26:30AM +0200, Sascha Hauer wrote:
> DFU stopped working for me quite a while ago and I tracked it down to
> this dfu-util commit:
>
> | commit 377f6f136d3369529f44578acaeee82d7c7d7af9
> | Author: Paul Fertser
> | Date: Sun Aug 10 14:26:05 2014 +0400
> |
This series fixes some issues with the NFS code. It was easy to confuse
the code by pressing ctrl-c during a file transfer. The next file
transfers then ended in corrupted files.
Sascha
Sascha Hauer (8):
nfs: Add function to free packets
nfs: Add missing free
nfs: remove unnecessary check
In rpc_check_reply() pkt is never NULL, drop the unnecessary patch.
Signed-off-by: Sascha Hauer
---
fs/nfs.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/fs/nfs.c b/fs/nfs.c
index eb316fe295..9956791820 100644
--- a/fs/nfs.c
+++ b/fs/nfs.c
@@ -366,9 +366,6 @@ static int rpc_check_reply(
nfs dentries may change underneath barebox, so do not maintain them in
the dcache.
Signed-off-by: Sascha Hauer
---
fs/nfs.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/nfs.c b/fs/nfs.c
index 26ff354c37..a5fc6467fb 100644
--- a/fs/nfs.c
+++ b/fs/nfs.c
@@ -1396,6 +1396,7 @@ static int n
When ctrl-c is pressed then ctrlc() will return true until
ctrlc_handled() is called. This means that once ctrl-c is pressed every
NFS operation will fail until the upper layer calls ctrlc_handled().
When for example we are doing a 'ls -l' on an NFS directory then after
a ctrl-c press not the 'ls -
It can happen that the first packet we receive is not the desired one.
In this case we have to poll for further packets. set nfs_state back to
STATE_START before polling for more packets, otherwise we check the same
packet again and again.
Signed-off-by: Sascha Hauer
---
fs/nfs.c | 7 +--
1
Add forgotten packet free in error path.
Signed-off-by: Sascha Hauer
---
fs/nfs.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/nfs.c b/fs/nfs.c
index 0d098f2a66..eb316fe295 100644
--- a/fs/nfs.c
+++ b/fs/nfs.c
@@ -773,6 +773,7 @@ static int nfs_lookup_req(struct nfs_priv *npriv, struct
It may happen that we receive more than one RPC packet before we come
along to check the result. Instead of handling just a single received
packet and possibly overwriting the last one queue the received RPC
packets.
Signed-off-by: Sascha Hauer
---
fs/nfs.c | 52 +
Add to function to free packets rather than freeing them directly. We
will introduce received packet qeueuing with one of the next patches,
this patch is meant to make it better readable.
Signed-off-by: Sascha Hauer
---
fs/nfs.c | 27 ---
1 file changed, 16 insertions(+),
When we receive a packet with the previous rpc_id then we have
the comment "stale packet, wait a bit longer", but that's not what
the code does. rpc_check_reply() returns 0 in this case and the caller
then interprets the packet as valid.
Always return -EAGAIN for invalid rpc_ids. This lets the call
46 matches
Mail list logo