* [PATCH] arm64: sunxi: Enable REGMAP_MMIO to fix linker error
@ 2018-11-13 17:04 John Garry
2018-11-14 14:51 ` Maxime Ripard
0 siblings, 1 reply; 3+ messages in thread
From: John Garry @ 2018-11-13 17:04 UTC (permalink / raw)
To: catalin.marinas, will.deacon, maxime.ripard, wens
Cc: linux-arm-kernel, linux-kernel, icenowy, John Garry
The following linker failure can be seen for a certain heavily reduced
defconfig:
drivers/soc/sunxi/sunxi_sram.o: In function `sunxi_sram_probe':
drivers/soc/sunxi/sunxi_sram.c:353: undefined reference to `__devm_regmap_init_mmio_clk'
drivers/soc/sunxi/sunxi_sram.c:353:(.text+0x3c4): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `__devm_regmap_init_mmio_clk'
It would seem that the sunxi sram driver implicitly depended on config
REGMAP_MMIO.
To solve, select config REGMAP_MMIO for ARCH_SUNXI. This seems a better
option than selecting from the respective driver config as this just
defaults to ARCH_SUNXI.
Fixes: 5828729bebbb ("soc: sunxi: export a regmap for EMAC clock reg on A64")
Signed-off-by: John Garry <john.garry@huawei.com>
diff --git a/arch/arm64/Kconfig.platforms b/arch/arm64/Kconfig.platforms
index 51bc479..c8a6ad3 100644
--- a/arch/arm64/Kconfig.platforms
+++ b/arch/arm64/Kconfig.platforms
@@ -12,6 +12,7 @@ config ARCH_SUNXI
select ARCH_HAS_RESET_CONTROLLER
select GENERIC_IRQ_CHIP
select PINCTRL
+ select REGMAP_MMIO
select RESET_CONTROLLER
help
This enables support for Allwinner sunxi based SoCs like the A64.
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] arm64: sunxi: Enable REGMAP_MMIO to fix linker error
2018-11-13 17:04 [PATCH] arm64: sunxi: Enable REGMAP_MMIO to fix linker error John Garry
@ 2018-11-14 14:51 ` Maxime Ripard
2018-11-14 15:00 ` John Garry
0 siblings, 1 reply; 3+ messages in thread
From: Maxime Ripard @ 2018-11-14 14:51 UTC (permalink / raw)
To: John Garry
Cc: catalin.marinas, will.deacon, wens, linux-arm-kernel,
linux-kernel, icenowy
[-- Attachment #1: Type: text/plain, Size: 1600 bytes --]
Hi John,
On Wed, Nov 14, 2018 at 01:04:25AM +0800, John Garry wrote:
> The following linker failure can be seen for a certain heavily reduced
> defconfig:
> drivers/soc/sunxi/sunxi_sram.o: In function `sunxi_sram_probe':
> drivers/soc/sunxi/sunxi_sram.c:353: undefined reference to `__devm_regmap_init_mmio_clk'
> drivers/soc/sunxi/sunxi_sram.c:353:(.text+0x3c4): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `__devm_regmap_init_mmio_clk'
>
> It would seem that the sunxi sram driver implicitly depended on config
> REGMAP_MMIO.
>
> To solve, select config REGMAP_MMIO for ARCH_SUNXI. This seems a better
> option than selecting from the respective driver config as this just
> defaults to ARCH_SUNXI.
>
> Fixes: 5828729bebbb ("soc: sunxi: export a regmap for EMAC clock reg on A64")
> Signed-off-by: John Garry <john.garry@huawei.com>
>
> diff --git a/arch/arm64/Kconfig.platforms b/arch/arm64/Kconfig.platforms
> index 51bc479..c8a6ad3 100644
> --- a/arch/arm64/Kconfig.platforms
> +++ b/arch/arm64/Kconfig.platforms
> @@ -12,6 +12,7 @@ config ARCH_SUNXI
> select ARCH_HAS_RESET_CONTROLLER
> select GENERIC_IRQ_CHIP
> select PINCTRL
> + select REGMAP_MMIO
> select RESET_CONTROLLER
> help
> This enables support for Allwinner sunxi based SoCs like the A64.
The sunxi_sram driver has a Kconfig symbol of its own now, it would
make more sense to add that select there, especially since we can also
compile it for arm.
Maxime
--
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] arm64: sunxi: Enable REGMAP_MMIO to fix linker error
2018-11-14 14:51 ` Maxime Ripard
@ 2018-11-14 15:00 ` John Garry
0 siblings, 0 replies; 3+ messages in thread
From: John Garry @ 2018-11-14 15:00 UTC (permalink / raw)
To: Maxime Ripard
Cc: catalin.marinas, will.deacon, wens, linux-arm-kernel,
linux-kernel, icenowy
On 14/11/2018 14:51, Maxime Ripard wrote:
> Hi John,
>
> On Wed, Nov 14, 2018 at 01:04:25AM +0800, John Garry wrote:
>> The following linker failure can be seen for a certain heavily reduced
>> defconfig:
>> drivers/soc/sunxi/sunxi_sram.o: In function `sunxi_sram_probe':
>> drivers/soc/sunxi/sunxi_sram.c:353: undefined reference to `__devm_regmap_init_mmio_clk'
>> drivers/soc/sunxi/sunxi_sram.c:353:(.text+0x3c4): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `__devm_regmap_init_mmio_clk'
>>
>> It would seem that the sunxi sram driver implicitly depended on config
>> REGMAP_MMIO.
>>
>> To solve, select config REGMAP_MMIO for ARCH_SUNXI. This seems a better
>> option than selecting from the respective driver config as this just
>> defaults to ARCH_SUNXI.
>>
>> Fixes: 5828729bebbb ("soc: sunxi: export a regmap for EMAC clock reg on A64")
>> Signed-off-by: John Garry <john.garry@huawei.com>
>>
>> diff --git a/arch/arm64/Kconfig.platforms b/arch/arm64/Kconfig.platforms
>> index 51bc479..c8a6ad3 100644
>> --- a/arch/arm64/Kconfig.platforms
>> +++ b/arch/arm64/Kconfig.platforms
>> @@ -12,6 +12,7 @@ config ARCH_SUNXI
>> select ARCH_HAS_RESET_CONTROLLER
>> select GENERIC_IRQ_CHIP
>> select PINCTRL
>> + select REGMAP_MMIO
>> select RESET_CONTROLLER
>> help
>> This enables support for Allwinner sunxi based SoCs like the A64.
>
> The sunxi_sram driver has a Kconfig symbol of its own now, it would
> make more sense to add that select there, especially since we can also
> compile it for arm.
Fine, so I'll leave this to you to fix if you don't mind.
Thanks,
John
>
> Maxime
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-11-14 15:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-13 17:04 [PATCH] arm64: sunxi: Enable REGMAP_MMIO to fix linker error John Garry
2018-11-14 14:51 ` Maxime Ripard
2018-11-14 15:00 ` John Garry
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).