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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxx>
Signed-off-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx>
---
 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


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux