* [PATCH] MTD: atmel_nand: fix compile error when use avr32-atstk1006_defconfig
@ 2012-10-08 6:46 Josh Wu
2012-10-15 13:48 ` Artem Bityutskiy
0 siblings, 1 reply; 3+ messages in thread
From: Josh Wu @ 2012-10-08 6:46 UTC (permalink / raw)
To: linux-mtd, linux-arm-kernel, dedekind1
Cc: fengguang.wu, egtvedt, Josh Wu, hskinnemoen
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.
Signed-off-by: Josh Wu <josh.wu@atmel.com>
---
drivers/mtd/nand/atmel_nand_ecc.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/mtd/nand/atmel_nand_ecc.h b/drivers/mtd/nand/atmel_nand_ecc.h
index 8a1e9a6..e87af84 100644
--- a/drivers/mtd/nand/atmel_nand_ecc.h
+++ b/drivers/mtd/nand/atmel_nand_ecc.h
@@ -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))
--
1.7.9.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] MTD: atmel_nand: fix compile error when use avr32-atstk1006_defconfig
2012-10-08 6:46 [PATCH] MTD: atmel_nand: fix compile error when use avr32-atstk1006_defconfig Josh Wu
@ 2012-10-15 13:48 ` Artem Bityutskiy
2012-10-16 6:48 ` Josh Wu
0 siblings, 1 reply; 3+ messages in thread
From: Artem Bityutskiy @ 2012-10-15 13:48 UTC (permalink / raw)
To: Josh Wu; +Cc: fengguang.wu, egtvedt, linux-mtd, linux-arm-kernel, hskinnemoen
[-- Attachment #1: Type: text/plain, Size: 536 bytes --]
On Mon, 2012-10-08 at 14:46 +0800, Josh Wu wrote:
> 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.
>
> Signed-off-by: Josh Wu <josh.wu@atmel.com>
Why not to provide writel_relaxed() in AVR instead?
--
Best Regards,
Artem Bityutskiy
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] MTD: atmel_nand: fix compile error when use avr32-atstk1006_defconfig
2012-10-15 13:48 ` Artem Bityutskiy
@ 2012-10-16 6:48 ` Josh Wu
0 siblings, 0 replies; 3+ messages in thread
From: Josh Wu @ 2012-10-16 6:48 UTC (permalink / raw)
To: dedekind1; +Cc: fengguang.wu, egtvedt, linux-mtd, linux-arm-kernel, hskinnemoen
On 10/15/2012 9:48 PM, Artem Bityutskiy wrote:
> On Mon, 2012-10-08 at 14:46 +0800, Josh Wu wrote:
>> 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.
>>
>> Signed-off-by: Josh Wu <josh.wu@atmel.com>
> 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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-10-16 6:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-08 6:46 [PATCH] MTD: atmel_nand: fix compile error when use avr32-atstk1006_defconfig Josh Wu
2012-10-15 13:48 ` Artem Bityutskiy
2012-10-16 6:48 ` Josh Wu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox