* [PATCH] Revert "clocksource: ARMv8 timer can only be built on ARMv8"
@ 2020-01-15 11:14 Ahmad Fatoum
2020-01-16 8:34 ` Sascha Hauer
0 siblings, 1 reply; 3+ messages in thread
From: Ahmad Fatoum @ 2020-01-15 11:14 UTC (permalink / raw)
To: barebox; +Cc: Ahmad Fatoum
This reverts commit 33ec8cb5872617fa95aea08d9f7f2b684d95b6de,
so that barebox can once again match against "arm,armv7-timer"
compatibles. The reverted commit restricted the timer to CPU_V8,
because in i.MX multi-image configuration with MACH_SCB9328 set,
we can have both CPU_32v7 and CPU_32v4T in the same build.
To avoid this issue properly, force use of -march=armv7-a for
non-CONFIG_CPU_V8 targets. This is acceptable as we don't expect
non-ARMv7 device trees to have the architected arm,armv7-timer.
Suggested-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
drivers/clocksource/Kconfig | 2 +-
drivers/clocksource/Makefile | 5 ++++-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig
index 44a6cef6fbae..43c5bfc9736a 100644
--- a/drivers/clocksource/Kconfig
+++ b/drivers/clocksource/Kconfig
@@ -73,7 +73,7 @@ config CLOCKSOURCE_ATMEL_PIT
config CLOCKSOURCE_ARMV8_TIMER
bool
default y
- depends on ARM && CPU_V8
+ depends on ARM && (CPU_64v8 || CPU_V7)
config CLOCKSOURCE_ARM_GLOBAL_TIMER
bool
diff --git a/drivers/clocksource/Makefile b/drivers/clocksource/Makefile
index f8ff83d60a46..8dbf91f323f3 100644
--- a/drivers/clocksource/Makefile
+++ b/drivers/clocksource/Makefile
@@ -12,8 +12,11 @@ obj-$(CONFIG_CLOCKSOURCE_UEMD) += uemd.o
obj-$(CONFIG_CLOCKSOURCE_ROCKCHIP)+= rk_timer.o
obj-$(CONFIG_CLOCKSOURCE_ATMEL_PIT) += timer-atmel-pit.o
obj-$(CONFIG_CLOCKSOURCE_ARMV8_TIMER) += armv8-timer.o
+ifneq ($(CONFIG_CPU_V8),y)
+CFLAGS_armv8-timer.o := -march=armv7-a
+endif
obj-$(CONFIG_CLOCKSOURCE_ARM_GLOBAL_TIMER) += arm_global_timer.o
obj-$(CONFIG_CLOCKSOURCE_IMX_GPT) += timer-imx-gpt.o
obj-$(CONFIG_CLOCKSOURCE_DW_APB_TIMER) += dw_apb_timer.o
obj-$(CONFIG_CLOCKSOURCE_TI_DM) += timer-ti-dm.o
-obj-$(CONFIG_CLOCKSOURCE_TI_32K) += timer-ti-32k.o
\ No newline at end of file
+obj-$(CONFIG_CLOCKSOURCE_TI_32K) += timer-ti-32k.o
--
2.25.0
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Revert "clocksource: ARMv8 timer can only be built on ARMv8"
2020-01-15 11:14 [PATCH] Revert "clocksource: ARMv8 timer can only be built on ARMv8" Ahmad Fatoum
@ 2020-01-16 8:34 ` Sascha Hauer
2020-01-16 14:40 ` Ahmad Fatoum
0 siblings, 1 reply; 3+ messages in thread
From: Sascha Hauer @ 2020-01-16 8:34 UTC (permalink / raw)
To: Ahmad Fatoum; +Cc: barebox
On Wed, Jan 15, 2020 at 12:14:09PM +0100, Ahmad Fatoum wrote:
> This reverts commit 33ec8cb5872617fa95aea08d9f7f2b684d95b6de,
> so that barebox can once again match against "arm,armv7-timer"
> compatibles. The reverted commit restricted the timer to CPU_V8,
> because in i.MX multi-image configuration with MACH_SCB9328 set,
> we can have both CPU_32v7 and CPU_32v4T in the same build.
>
> To avoid this issue properly, force use of -march=armv7-a for
> non-CONFIG_CPU_V8 targets. This is acceptable as we don't expect
> non-ARMv7 device trees to have the architected arm,armv7-timer.
>
> Suggested-by: Lucas Stach <l.stach@pengutronix.de>
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
> drivers/clocksource/Kconfig | 2 +-
> drivers/clocksource/Makefile | 5 ++++-
> 2 files changed, 5 insertions(+), 2 deletions(-)
Applied, thanks
>
> diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig
> index 44a6cef6fbae..43c5bfc9736a 100644
> --- a/drivers/clocksource/Kconfig
> +++ b/drivers/clocksource/Kconfig
> @@ -73,7 +73,7 @@ config CLOCKSOURCE_ATMEL_PIT
> config CLOCKSOURCE_ARMV8_TIMER
> bool
> default y
> - depends on ARM && CPU_V8
> + depends on ARM && (CPU_64v8 || CPU_V7)
Is it worth renaming the driver to something not v8 specific?
ARM_ARCHITECTED_TIMER maybe?
Sascha
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Revert "clocksource: ARMv8 timer can only be built on ARMv8"
2020-01-16 8:34 ` Sascha Hauer
@ 2020-01-16 14:40 ` Ahmad Fatoum
0 siblings, 0 replies; 3+ messages in thread
From: Ahmad Fatoum @ 2020-01-16 14:40 UTC (permalink / raw)
To: Sascha Hauer; +Cc: barebox
Hello Sascha,
On 1/16/20 9:34 AM, Sascha Hauer wrote:
>> diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig
>> index 44a6cef6fbae..43c5bfc9736a 100644
>> --- a/drivers/clocksource/Kconfig
>> +++ b/drivers/clocksource/Kconfig
>> @@ -73,7 +73,7 @@ config CLOCKSOURCE_ATMEL_PIT
>> config CLOCKSOURCE_ARMV8_TIMER
>> bool
>> default y
>> - depends on ARM && CPU_V8
>> + depends on ARM && (CPU_64v8 || CPU_V7)
>
> Is it worth renaming the driver to something not v8 specific?
> ARM_ARCHITECTED_TIMER maybe?
Hmm, it's default y, so we won't risk anyone losing the config
option on oldfconfig. Yes, I think we should rename it.
Cheers
Ahmad
>
> Sascha
>
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | https://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-01-16 14:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-15 11:14 [PATCH] Revert "clocksource: ARMv8 timer can only be built on ARMv8" Ahmad Fatoum
2020-01-16 8:34 ` Sascha Hauer
2020-01-16 14:40 ` Ahmad Fatoum
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox