pinctrl: scu: Select IMX_SCU

Message ID 20181225151306.GA14477@bogon.m.sigxcpu.org
State New
Headers show
Series
  • pinctrl: scu: Select IMX_SCU
Related show

Commit Message

Guido Günther Dec. 25, 2018, 3:13 p.m.
Otherwise building fails with only PINCTRL_IMX_SCU selected:

    aarch64-linux-gnu-ld: drivers/pinctrl/freescale/pinctrl-scu.o: in function `imx_pinctrl_sc_ipc_init':
    pinctrl-scu.c:(.text+0x10): undefined reference to `imx_scu_get_handle'
    aarch64-linux-gnu-ld: pinctrl-scu.c:(.text+0x10): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `imx_scu_get_handle'
    aarch64-linux-gnu-ld: drivers/pinctrl/freescale/pinctrl-scu.o: in function `imx_pinconf_get_scu':
    pinctrl-scu.c:(.text+0x64): undefined reference to `imx_scu_call_rpc'
    aarch64-linux-gnu-ld: pinctrl-scu.c:(.text+0x64): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `imx_scu_call_rpc'
    aarch64-linux-gnu-ld: drivers/pinctrl/freescale/pinctrl-scu.o: in function `imx_pinconf_set_scu':
    pinctrl-scu.c:(.text+0x104): undefined reference to `imx_scu_call_rpc'
    aarch64-linux-gnu-ld: pinctrl-scu.c:(.text+0x104): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `imx_scu_call_rpc'
    make: *** [Makefile:1038: vmlinux] Error 1

Signed-off-by: Guido Günther <agx@sigxcpu.org>
---
This is based on linux-next 2018-12-24.

 drivers/pinctrl/freescale/Kconfig | 1 +
 1 file changed, 1 insertion(+)

Comments

Aisheng Dong Dec. 26, 2018, 3:02 a.m. | #1
> From: Guido Günther [mailto:agx@sigxcpu.org]
> Sent: Tuesday, December 25, 2018 11:13 PM
> 
> Otherwise building fails with only PINCTRL_IMX_SCU selected:
> 
>     aarch64-linux-gnu-ld: drivers/pinctrl/freescale/pinctrl-scu.o: in function
> `imx_pinctrl_sc_ipc_init':
>     pinctrl-scu.c:(.text+0x10): undefined reference to `imx_scu_get_handle'
>     aarch64-linux-gnu-ld: pinctrl-scu.c:(.text+0x10): relocation truncated to fit:
> R_AARCH64_CALL26 against undefined symbol `imx_scu_get_handle'
>     aarch64-linux-gnu-ld: drivers/pinctrl/freescale/pinctrl-scu.o: in function
> `imx_pinconf_get_scu':
>     pinctrl-scu.c:(.text+0x64): undefined reference to `imx_scu_call_rpc'
>     aarch64-linux-gnu-ld: pinctrl-scu.c:(.text+0x64): relocation truncated to fit:
> R_AARCH64_CALL26 against undefined symbol `imx_scu_call_rpc'
>     aarch64-linux-gnu-ld: drivers/pinctrl/freescale/pinctrl-scu.o: in function
> `imx_pinconf_set_scu':
>     pinctrl-scu.c:(.text+0x104): undefined reference to `imx_scu_call_rpc'
>     aarch64-linux-gnu-ld: pinctrl-scu.c:(.text+0x104): relocation truncated to
> fit: R_AARCH64_CALL26 against undefined symbol `imx_scu_call_rpc'
>     make: *** [Makefile:1038: vmlinux] Error 1
> 
> Signed-off-by: Guido Günther <agx@sigxcpu.org>
> ---
> This is based on linux-next 2018-12-24.
> 
>  drivers/pinctrl/freescale/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/pinctrl/freescale/Kconfig b/drivers/pinctrl/freescale/Kconfig
> index f7d357910cff..036c7ad63438 100644
> --- a/drivers/pinctrl/freescale/Kconfig
> +++ b/drivers/pinctrl/freescale/Kconfig
> @@ -8,6 +8,7 @@ config PINCTRL_IMX
>  config PINCTRL_IMX_SCU
>  	bool
>  	select PINCTRL_IMX
> +	select IMX_SCU

Thanks for reporting this issue.
How about 'depends on IMX_SCU'?
It might be better to use depends as IMX_SCU also depends on IMX_MBOX.
Select may not work finally.

Regards
Dong Aisheng

> 
>  config PINCTRL_IMX1_CORE
>  	bool
> --
> 2.19.2
Guido Günther Dec. 26, 2018, 2:01 p.m. | #2
Hi,
On Wed, Dec 26, 2018 at 03:02:10AM +0000, Aisheng Dong wrote:
> > From: Guido Günther [mailto:agx@sigxcpu.org]
> > Sent: Tuesday, December 25, 2018 11:13 PM
> > 
> > Otherwise building fails with only PINCTRL_IMX_SCU selected:
> > 
> >     aarch64-linux-gnu-ld: drivers/pinctrl/freescale/pinctrl-scu.o: in function
> > `imx_pinctrl_sc_ipc_init':
> >     pinctrl-scu.c:(.text+0x10): undefined reference to `imx_scu_get_handle'
> >     aarch64-linux-gnu-ld: pinctrl-scu.c:(.text+0x10): relocation truncated to fit:
> > R_AARCH64_CALL26 against undefined symbol `imx_scu_get_handle'
> >     aarch64-linux-gnu-ld: drivers/pinctrl/freescale/pinctrl-scu.o: in function
> > `imx_pinconf_get_scu':
> >     pinctrl-scu.c:(.text+0x64): undefined reference to `imx_scu_call_rpc'
> >     aarch64-linux-gnu-ld: pinctrl-scu.c:(.text+0x64): relocation truncated to fit:
> > R_AARCH64_CALL26 against undefined symbol `imx_scu_call_rpc'
> >     aarch64-linux-gnu-ld: drivers/pinctrl/freescale/pinctrl-scu.o: in function
> > `imx_pinconf_set_scu':
> >     pinctrl-scu.c:(.text+0x104): undefined reference to `imx_scu_call_rpc'
> >     aarch64-linux-gnu-ld: pinctrl-scu.c:(.text+0x104): relocation truncated to
> > fit: R_AARCH64_CALL26 against undefined symbol `imx_scu_call_rpc'
> >     make: *** [Makefile:1038: vmlinux] Error 1
> > 
> > Signed-off-by: Guido Günther <agx@sigxcpu.org>
> > ---
> > This is based on linux-next 2018-12-24.
> > 
> >  drivers/pinctrl/freescale/Kconfig | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/drivers/pinctrl/freescale/Kconfig b/drivers/pinctrl/freescale/Kconfig
> > index f7d357910cff..036c7ad63438 100644
> > --- a/drivers/pinctrl/freescale/Kconfig
> > +++ b/drivers/pinctrl/freescale/Kconfig
> > @@ -8,6 +8,7 @@ config PINCTRL_IMX
> >  config PINCTRL_IMX_SCU
> >  	bool
> >  	select PINCTRL_IMX
> > +	select IMX_SCU
> 
> Thanks for reporting this issue.
> How about 'depends on IMX_SCU'?
> It might be better to use depends as IMX_SCU also depends on IMX_MBOX.
> Select may not work finally.

I've sent a v2. Should have noticed that IMX_SCU is a visible symbol.
Thanks,
 -- Guido
Aisheng Dong Dec. 26, 2018, 5:27 p.m. | #3
> From: Guido Günther [mailto:agx@sigxcpu.org]
> Sent: Wednesday, December 26, 2018 10:01 PM
> 
> Hi,
> On Wed, Dec 26, 2018 at 03:02:10AM +0000, Aisheng Dong wrote:
> > > From: Guido Günther [mailto:agx@sigxcpu.org]
> > > Sent: Tuesday, December 25, 2018 11:13 PM
> > >
> > > Otherwise building fails with only PINCTRL_IMX_SCU selected:
> > >
> > >     aarch64-linux-gnu-ld: drivers/pinctrl/freescale/pinctrl-scu.o: in
> function
> > > `imx_pinctrl_sc_ipc_init':
> > >     pinctrl-scu.c:(.text+0x10): undefined reference to
> `imx_scu_get_handle'
> > >     aarch64-linux-gnu-ld: pinctrl-scu.c:(.text+0x10): relocation truncated
> to fit:
> > > R_AARCH64_CALL26 against undefined symbol `imx_scu_get_handle'
> > >     aarch64-linux-gnu-ld: drivers/pinctrl/freescale/pinctrl-scu.o: in
> function
> > > `imx_pinconf_get_scu':
> > >     pinctrl-scu.c:(.text+0x64): undefined reference to `imx_scu_call_rpc'
> > >     aarch64-linux-gnu-ld: pinctrl-scu.c:(.text+0x64): relocation truncated
> to fit:
> > > R_AARCH64_CALL26 against undefined symbol `imx_scu_call_rpc'
> > >     aarch64-linux-gnu-ld: drivers/pinctrl/freescale/pinctrl-scu.o: in
> function
> > > `imx_pinconf_set_scu':
> > >     pinctrl-scu.c:(.text+0x104): undefined reference to `imx_scu_call_rpc'
> > >     aarch64-linux-gnu-ld: pinctrl-scu.c:(.text+0x104): relocation truncated
> to
> > > fit: R_AARCH64_CALL26 against undefined symbol `imx_scu_call_rpc'
> > >     make: *** [Makefile:1038: vmlinux] Error 1
> > >
> > > Signed-off-by: Guido Günther <agx@sigxcpu.org>
> > > ---
> > > This is based on linux-next 2018-12-24.
> > >
> > >  drivers/pinctrl/freescale/Kconfig | 1 +
> > >  1 file changed, 1 insertion(+)
> > >
> > > diff --git a/drivers/pinctrl/freescale/Kconfig
> b/drivers/pinctrl/freescale/Kconfig
> > > index f7d357910cff..036c7ad63438 100644
> > > --- a/drivers/pinctrl/freescale/Kconfig
> > > +++ b/drivers/pinctrl/freescale/Kconfig
> > > @@ -8,6 +8,7 @@ config PINCTRL_IMX
> > >  config PINCTRL_IMX_SCU
> > >  	bool
> > >  	select PINCTRL_IMX
> > > +	select IMX_SCU
> >
> > Thanks for reporting this issue.
> > How about 'depends on IMX_SCU'?
> > It might be better to use depends as IMX_SCU also depends on IMX_MBOX.
> > Select may not work finally.
> 
> I've sent a v2. Should have noticed that IMX_SCU is a visible symbol.

A bit more thinking.
I wonder only make PINCTRL_IMX_SCU depend on IMX_SCU might be not enough.

Do we need make PINCTRL_IMX8QXP depend on IMX_SCU as well as it will select
PINCTRL_IMX_SCU which may not work if IMX_SCU is not enabled.

Can you help confirm it?

Regards
Dong Aisheng

> Thanks,
>  -- Guido

Patch

diff --git a/drivers/pinctrl/freescale/Kconfig b/drivers/pinctrl/freescale/Kconfig
index f7d357910cff..036c7ad63438 100644
--- a/drivers/pinctrl/freescale/Kconfig
+++ b/drivers/pinctrl/freescale/Kconfig
@@ -8,6 +8,7 @@  config PINCTRL_IMX
 config PINCTRL_IMX_SCU
 	bool
 	select PINCTRL_IMX
+	select IMX_SCU
 
 config PINCTRL_IMX1_CORE
 	bool