linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] clk: at91: fix the build with binutils 2.27
@ 2022-10-08  5:15 Kefeng Wang
  2022-10-12  2:28 ` Stephen Boyd
  0 siblings, 1 reply; 3+ messages in thread
From: Kefeng Wang @ 2022-10-08  5:15 UTC (permalink / raw)
  To: Nicolas Ferre, Alexandre Belloni, Claudiu Beznea, linux-clk
  Cc: linux-arm-kernel, linux-kernel, Kefeng Wang

There is an issue when build with older versions of binutils 2.27.0,

arch/arm/mach-at91/pm_suspend.S: Assembler messages:
arch/arm/mach-at91/pm_suspend.S:1086: Error: garbage following instruction -- `ldr tmp1,=0x00020010UL'

Use UL() macro to fix the issue in assembly file.

Fixes: 4fd36e458392 ("ARM: at91: pm: add plla disable/enable support for sam9x60")
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
 include/linux/clk/at91_pmc.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/include/linux/clk/at91_pmc.h b/include/linux/clk/at91_pmc.h
index 3484309b59bf..4fc387d0335d 100644
--- a/include/linux/clk/at91_pmc.h
+++ b/include/linux/clk/at91_pmc.h
@@ -12,6 +12,8 @@
 #ifndef AT91_PMC_H
 #define AT91_PMC_H
 
+#include <vdso/bits.h>
+
 #define AT91_PMC_V1		(1)			/* PMC version 1 */
 #define AT91_PMC_V2		(2)			/* PMC version 2 [SAM9X60] */
 
@@ -45,8 +47,8 @@
 #define	AT91_PMC_PCSR		0x18			/* Peripheral Clock Status Register */
 
 #define AT91_PMC_PLL_ACR	0x18			/* PLL Analog Control Register [for SAM9X60] */
-#define		AT91_PMC_PLL_ACR_DEFAULT_UPLL	0x12020010UL	/* Default PLL ACR value for UPLL */
-#define		AT91_PMC_PLL_ACR_DEFAULT_PLLA	0x00020010UL	/* Default PLL ACR value for PLLA */
+#define		AT91_PMC_PLL_ACR_DEFAULT_UPLL	UL(0x12020010)	/* Default PLL ACR value for UPLL */
+#define		AT91_PMC_PLL_ACR_DEFAULT_PLLA	UL(0x00020010)	/* Default PLL ACR value for PLLA */
 #define		AT91_PMC_PLL_ACR_UTMIVR		(1 << 12)	/* UPLL Voltage regulator Control */
 #define		AT91_PMC_PLL_ACR_UTMIBG		(1 << 13)	/* UPLL Bandgap Control */
 
-- 
2.35.3


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] clk: at91: fix the build with binutils 2.27
  2022-10-08  5:15 [PATCH] clk: at91: fix the build with binutils 2.27 Kefeng Wang
@ 2022-10-12  2:28 ` Stephen Boyd
  2022-10-12  2:46   ` Kefeng Wang
  0 siblings, 1 reply; 3+ messages in thread
From: Stephen Boyd @ 2022-10-12  2:28 UTC (permalink / raw)
  To: Alexandre Belloni, Claudiu Beznea, Kefeng Wang, Nicolas Ferre, linux-clk
  Cc: linux-arm-kernel, linux-kernel, Kefeng Wang

Quoting Kefeng Wang (2022-10-07 22:15:34)
> diff --git a/include/linux/clk/at91_pmc.h b/include/linux/clk/at91_pmc.h
> index 3484309b59bf..4fc387d0335d 100644
> --- a/include/linux/clk/at91_pmc.h
> +++ b/include/linux/clk/at91_pmc.h
> @@ -12,6 +12,8 @@
>  #ifndef AT91_PMC_H
>  #define AT91_PMC_H
>  
> +#include <vdso/bits.h>

Can we just include linux/bits.h instead? It looks weird to include
vdso/ outside of the kernel's vdso.

> +
>  #define AT91_PMC_V1            (1)                     /* PMC version 1 */
>  #define AT91_PMC_V2            (2)                     /* PMC version 2 [SAM9X60] */
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] clk: at91: fix the build with binutils 2.27
  2022-10-12  2:28 ` Stephen Boyd
@ 2022-10-12  2:46   ` Kefeng Wang
  0 siblings, 0 replies; 3+ messages in thread
From: Kefeng Wang @ 2022-10-12  2:46 UTC (permalink / raw)
  To: Stephen Boyd, Alexandre Belloni, Claudiu Beznea, Nicolas Ferre,
	linux-clk
  Cc: linux-arm-kernel, linux-kernel


On 2022/10/12 10:28, Stephen Boyd wrote:
> Quoting Kefeng Wang (2022-10-07 22:15:34)
>> diff --git a/include/linux/clk/at91_pmc.h b/include/linux/clk/at91_pmc.h
>> index 3484309b59bf..4fc387d0335d 100644
>> --- a/include/linux/clk/at91_pmc.h
>> +++ b/include/linux/clk/at91_pmc.h
>> @@ -12,6 +12,8 @@
>>   #ifndef AT91_PMC_H
>>   #define AT91_PMC_H
>>   
>> +#include <vdso/bits.h>
> Can we just include linux/bits.h instead? It looks weird to include
> vdso/ outside of the kernel's vdso.
sure, will send v2.
>> +
>>   #define AT91_PMC_V1            (1)                     /* PMC version 1 */
>>   #define AT91_PMC_V2            (2)                     /* PMC version 2 [SAM9X60] */
>>
> .

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-10-12  2:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-08  5:15 [PATCH] clk: at91: fix the build with binutils 2.27 Kefeng Wang
2022-10-12  2:28 ` Stephen Boyd
2022-10-12  2:46   ` Kefeng Wang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).