[PATCH master 1/5] pwm: atmel: point MMIO accesses at correct address

Ahmad Fatoum a.fatoum at pengutronix.de
Mon Jan 3 03:57:14 PST 2022


The base address for MMIO writes was the address of the resource struct,
not the start address pointed at by it.

Change untested, but it doesn't look like this driver could ever have
worked.

Cc: Sam Ravnborg <sam at ravnborg.org>
Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
 drivers/pwm/pwm-atmel.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pwm/pwm-atmel.c b/drivers/pwm/pwm-atmel.c
index 7819d321d387..648f75fb7292 100644
--- a/drivers/pwm/pwm-atmel.c
+++ b/drivers/pwm/pwm-atmel.c
@@ -256,7 +256,7 @@ static int atmel_pwm_probe(struct device_d *dev)
 	if (IS_ERR(res))
 		return PTR_ERR(res);
 
-	atmel_pwm->base = IOMEM(res);
+	atmel_pwm->base = IOMEM(res->start);
 
 	for (i = 0; i < PWM_CHANNELS; i++) {
 		struct atmel_pwm_chip *chip = &atmel_pwm->atmel_pwm_chip[i];
-- 
2.30.2




More information about the barebox mailing list