Skip to contentSkip to conversation

MTD: atmel_nand: fix compile error when use avr32-atstk1006_defconfig

PATCH New Josh Wu 2 participants 3 messages Oct 8, 2012 – Oct 16, 2012

Subsystems (3)
lore
Share & tools
lore

Josh Wu

author
#0 lore raw

PATCH 1/1 MTD: atmel_nand: fix compile error when use avr32-atstk1006_defconfig

fixed the following compile error when use avr32 config:
drivers/mtd/nand/atmel_nand.c: In function 'pmecc_err_location':
drivers/mtd/nand/atmel_nand.c:639: error: implicit declaration of function 'writel_relaxed'

Since in ARCH avr32, there is no macro "writel_relaxed" defined. In this patch we use macro "writel" instead.

---
 drivers/mtd/nand/atmel_nand_ecc.h |    5 +++++
 1 file changed, 5 insertions(+)
drivers/mtd/nand/atmel_nand_ecc.h +5 -0
index 8a1e9a6..e87af84 100644
@@ -129,8 +129,13 @@
 #define pmerrloc_writel(addr, reg, value) \
 	writel((value), (addr) + ATMEL_PMERRLOC_##reg)
 
+#if defined(CONFIG_ARCH_AT91)
 #define pmerrloc_writel_sigma_relaxed(addr, n, value) \
 	writel_relaxed((value), (addr) + ATMEL_PMERRLOC_SIGMAx + ((n) * 4))
+#elif defined(CONFIG_AVR32)
+#define pmerrloc_writel_sigma_relaxed(addr, n, value) \
+	writel((value), (addr) + ATMEL_PMERRLOC_SIGMAx + ((n) * 4))
+#endif
 
 #define pmerrloc_readl_sigma_relaxed(addr, n) \
 	readl_relaxed((addr) + ATMEL_PMERRLOC_SIGMAx + ((n) * 4))
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/1 MTD: atmel_nand: fix compile error when use avr32-atstk1006_defconfig

Quoted 7 lines · Josh Wu

fixed the following compile error when use avr32 config:
drivers/mtd/nand/atmel_nand.c: In function 'pmecc_err_location':
drivers/mtd/nand/atmel_nand.c:639: error: implicit declaration of function 'writel_relaxed'

Since in ARCH avr32, there is no macro "writel_relaxed" defined. In this patch we use macro "writel" instead.

Why not to provide writel_relaxed() in AVR instead?

Signature · 9 lines
Best Regards,
Artem Bityutskiy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20121015/803e0b10/attachment.sig>
author
#2 lore raw

PATCH 1/1 MTD: atmel_nand: fix compile error when use avr32-atstk1006_defconfig

Quoted 10 lines · Artem Bityutskiy
Quoted 7 lines · Josh Wu

fixed the following compile error when use avr32 config:
drivers/mtd/nand/atmel_nand.c: In function 'pmecc_err_location':
drivers/mtd/nand/atmel_nand.c:639: error: implicit declaration of function 'writel_relaxed'

Since in ARCH avr32, there is no macro "writel_relaxed" defined. In this patch we use macro "writel" instead.

Why not to provide writel_relaxed() in AVR instead?

OK, I can send another patch to add writel_relaxed() in AVR. Since I don't have any AVR board in my hand, I need someone test it. thank you.

Best Regards,
Josh Wu