arm: at91: fix build-error for board-dt
PATCH 1/1 arm: at91: fix build-error for board-dt
From: Wolfram Sang <[email protected]>
When build-testing i2c-patches, I encountered:
arch/arm/mach-at91/built-in.o:(.arch.info.init+0x34): undefined reference to `at91sam926x_timer'
(using allnoconfig and roughly only MACH_AT91SAM_DT enabled)
Since this boardfile doesn't belong to a specific architecture, directly add the only supported timer to compilation.
--- arch/arm/mach-at91/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-at91/Makefile +1 -1
@@ -79,7 +79,7 @@ obj-$(CONFIG_MACH_SNAPPER_9260) += board-snapper9260.o obj-$(CONFIG_MACH_AT91SAM9M10G45EK) += board-sam9m10g45ek.o # AT91SAM board with device-tree -obj-$(CONFIG_MACH_AT91SAM_DT) += board-dt.o +obj-$(CONFIG_MACH_AT91SAM_DT) += board-dt.o at91sam926x_time.o # AT91X40 board-specific support obj-$(CONFIG_MACH_AT91EB01) += board-eb01.o
Signature · 1 line
1.7.10
PATCH 1/1 arm: at91: fix build-error for board-dt
Quoted 4 lines · Wolfram Sang
From: Wolfram Sang <[email protected]>
When build-testing i2c-patches, I encountered:
Quoted 8 lines
arch/arm/mach-at91/built-in.o:(.arch.info.init+0x34): undefined reference to `at91sam926x_timer'
(using allnoconfig and roughly only
MACH_AT91SAM_DTenabled)Since this boardfile doesn't belong to a specific architecture, directly add the only supported timer to compilation.
Signed-off-by Wolfram Sang <[email protected]>
no this is selected by the soc
I do not want the timer be compiled un condtionally
Best Regards,
J.
PATCH 1/1 arm: at91: fix build-error for board-dt
Quoted 9 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 8 lines · Wolfram Sang
From: Wolfram Sang <[email protected]>
When build-testing i2c-patches, I encountered:
arch/arm/mach-at91/built-in.o:(.arch.info.init+0x34): undefined reference to `at91sam926x_timer'
(using allnoconfig and roughly only
MACH_AT91SAM_DTenabled)
Quoted 7 lines
Quoted 4 lines
Since this boardfile doesn't belong to a specific architecture, directly add the only supported timer to compilation.
Signed-off-by Wolfram Sang <[email protected]>no this is selected by the soc
I do not want the timer be compiled un condtionally
Ok, we can discard this patch and see it as a bug report. Since you know best what you'd like, would you send a patch?
Thanks,
Wolfram
Signature · 9 lines
Pengutronix e.K. | Wolfram Sang | Industrial Linux Solutions | http://www.pengutronix.de/ | -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 198 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20120421/6f706c9f/attachment.sig>
PATCH 1/1 arm: at91: fix build-error for board-dt
Quoted 13 lines · Wolfram Sang
Quoted 12 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 11 lines · Wolfram Sang
From: Wolfram Sang <[email protected]>
When build-testing i2c-patches, I encountered:
arch/arm/mach-at91/built-in.o:(.arch.info.init+0x34): undefined reference to `at91sam926x_timer'
(using allnoconfig and roughly only
MACH_AT91SAM_DTenabled)Since this boardfile doesn't belong to a specific architecture, directly add the only supported timer to compilation.
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
Signed-off-by Wolfram Sang <[email protected]>no this is selected by the soc
I do not want the timer be compiled un condtionally
Ok, we can discard this patch and see it as a bug report. Since you know best what you'd like, would you send a patch?
I'll fix on 3.5 by make it depends on AT91SAM9
Best Regards,
J.
PATCH 1/1 arm: at91: fix build-error for board-dt
Quoted 3 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 2 lines
Ok, we can discard this patch and see it as a bug report. Since you know best what you'd like, would you send a patch?
I'll fix on 3.5 by make it depends on AT91SAM9
I think it should be fixed for v3.4, especially since it's so easy to trigger and the fix will be trivial.
Arnd
PATCH 1/1 arm: at91: fix build-error for board-dt
Quoted 7 lines · Arnd Bergmann
Quoted 3 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 2 lines
Ok, we can discard this patch and see it as a bug report. Since you know best what you'd like, would you send a patch?
I'll fix on 3.5 by make it depends on AT91SAM9
I think it should be fixed for v3.4, especially since it's so easy to trigger and the fix will be trivial.
The symbol does not exist before
and the board-dt is sam9 only
Best Regards,
J.
PATCH 1/1 arm: at91: fix build-error for board-dt
Quoted 11 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 7 lines · Arnd Bergmann
Quoted 3 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 2 lines
Ok, we can discard this patch and see it as a bug report. Since you know best what you'd like, would you send a patch?
I'll fix on 3.5 by make it depends on AT91SAM9
I think it should be fixed for v3.4, especially since it's so easy to trigger and the fix will be trivial.
The symbol does not exist before
and the board-dt is sam9 only
How about this patch for v3.4 then? It ensures that we don't try to build ARCH_AT91RM9200 or ARCH_AT91X40 with MACH_AT91SAM_DT, which would be broken in v3.4-rc4 as Wolfram pointed out.
8<----
ARM: at91: fix DT-enabled builds for non-DT chips
The ARCH_AT91RM9200 and ARCH_AT91X40 variants do not support booting with DT yet, so we must not let the user select MACH_AT91SAM_DT in order to avoid build errors.
It's still possible to enable USE_OF, and we should provide a few stub functions for that case for restart and clock_init.
arch/arm/mach-at91/Kconfig +2 -0
@@ -457,6 +457,7 @@ endif # ---------------------------------------------------------- +if !ARCH_AT91RM9200 && !ARCH_AT91X40 comment "Generic Board Type" config MACH_AT91SAM_DT
@@ -465,6 +466,7 @@ config MACH_AT91SAM_DT help Select this if you want to experiment device-tree with an Atmel Evaluation Kit. +endif # ----------------------------------------------------------
arch/arm/mach-at91/generic.h +10 -1
@@ -55,7 +55,8 @@ extern void __init at91sam9g45_set_console_clock(int id);extern int __init at91_clock_init (unsigned long main_clock);extern int __init at91_dt_clock_init (void );#else -static int inline at91_clock_init (unsigned long main_clock) {return 0 ; } +static inline int at91_clock_init (unsigned long main_clock) {return 0 ; } +static inline int at91_dt_clock_init (void ) {return 0 ; }#endif struct device ;
@@ -68,8 +69,16 @@ extern void at91sam9_idle(void);/* reset */ extern void at91_ioremap_rstc (u32 base_addr); +#ifdef CONFIG_AT91_SAM9_ALT_RESET extern void at91sam9_alt_restart (char ,const char *); +#else +static inline void at91sam9_alt_restart (char c,const char *s) { } +#endif +#ifdef CONFIG_AT91_SAM9G45_RESET extern void at91sam9g45_restart (char ,const char *); +#else +static inline void at91sam9g45_restart (char c,const char *s) { } +#endif /* shutdown */ extern void at91_ioremap_shdwc (u32 base_addr);
PATCH 1/1 arm: at91: fix build-error for board-dt
Quoted 8 lines
How about this patch for v3.4 then? It ensures that we don't try to build
ARCH_AT91RM9200orARCH_AT91X40withMACH_AT91SAM_DT, which would be broken in v3.4-rc4 as Wolfram pointed out.8<----
ARM: at91: fix DT-enabled builds for non-DT chips
Quoted 8 lines
The
ARCH_AT91RM9200andARCH_AT91X40variants do not support booting with DT yet, so we must not let the user selectMACH_AT91SAM_DTin order to avoid build errors.It's still possible to enable
USE_OF, and we should provide a few stub functions for that case for restart andclock_init.Signed-off-by Arnd Bergmann <[email protected]>
Thanks! In case it goes in:
Signature · 9 lines
Pengutronix e.K. | Wolfram Sang | Industrial Linux Solutions | http://www.pengutronix.de/ | -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 198 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20120422/638bd040/attachment.sig>
PATCH 1/1 arm: at91: fix build-error for board-dt
In reply to Arnd BergmannQuoted 9 lines · Arnd Bergmann
Quoted 8 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 7 lines · Arnd Bergmann
Quoted 3 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 2 lines
Ok, we can discard this patch and see it as a bug report. Since you know best what you'd like, would you send a patch?
I'll fix on 3.5 by make it depends on AT91SAM9
I think it should be fixed for v3.4, especially since it's so easy to trigger and the fix will be trivial.
Quoted 7 lines
Quoted 3 lines
The symbol does not exist before
and the board-dt is sam9 only
How about this patch for v3.4 then? It ensures that we don't try to build
ARCH_AT91RM9200orARCH_AT91X40withMACH_AT91SAM_DT, which would be broken in v3.4-rc4 as Wolfram pointed out.
no I don't like it either
I prefer to apply this patch from 3.5 1441bd325bbbcd38d190b2444481b23cdf70069a ARM: at91: add SOC_AT91SAM9 kconfig option to factorise select
and then fix it
so the board will be build only for sam9
Best Regards,
J.