linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Re: usb.c:undefined reference to `qe_immr'
       [not found] <202301101500.pillNv6R-lkp@intel.com>
@ 2023-01-10 10:06 ` Randy Dunlap
  2023-01-11  7:39   ` Michael Ellerman
  0 siblings, 1 reply; 5+ messages in thread
From: Randy Dunlap @ 2023-01-10 10:06 UTC (permalink / raw)
  To: kernel test robot, Masahiro Yamada
  Cc: Nicolas Schier, linux-kernel, Li Yang, oe-kbuild-all,
	linuxppc-dev, Qiang Zhao

[adding Cc's]


On 1/9/23 23:59, kernel test robot wrote:
> Hi Masahiro,
> 
> FYI, the error/warning still remains.
> 
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head:   5a41237ad1d4b62008f93163af1d9b1da90729d8
> commit: 7b4537199a4a8480b8c3ba37a2d44765ce76cd9b kbuild: link symbol CRCs at final link, removing CONFIG_MODULE_REL_CRCS
> date:   8 months ago
> config: powerpc-randconfig-r026-20230110
> compiler: powerpc-linux-gcc (GCC) 12.1.0
> reproduce (this is a W=1 build):
>         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>         chmod +x ~/bin/make.cross
>         # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7b4537199a4a8480b8c3ba37a2d44765ce76cd9b
>         git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
>         git fetch --no-tags linus master
>         git checkout 7b4537199a4a8480b8c3ba37a2d44765ce76cd9b
>         # save the config file
>         mkdir build_dir && cp config build_dir/.config
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=powerpc olddefconfig
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=powerpc SHELL=/bin/bash
> 
> If you fix the issue, kindly add following tag where applicable
> | Reported-by: kernel test robot <lkp@intel.com>
> 
> All errors (new ones prefixed by >>):
> 
>    powerpc-linux-ld: powerpc-linux-ld: DWARF error: could not find abbrev number 74
>    drivers/soc/fsl/qe/usb.o: in function `qe_usb_clock_set':
>>> usb.c:(.text+0x1e): undefined reference to `qe_immr'
>>> powerpc-linux-ld: usb.c:(.text+0x2a): undefined reference to `qe_immr'
>>> powerpc-linux-ld: usb.c:(.text+0xbc): undefined reference to `qe_setbrg'
>>> powerpc-linux-ld: usb.c:(.text+0xca): undefined reference to `cmxgcr_lock'
>    powerpc-linux-ld: usb.c:(.text+0xce): undefined reference to `cmxgcr_lock'
> 

.config extract:

#
# NXP/Freescale QorIQ SoC drivers
#
# CONFIG_QUICC_ENGINE is not set
CONFIG_QE_USB=y


This is caused by (drivers/soc/fsl/qe/Kconfig):

config QE_USB
	bool
	default y if USB_FSL_QE
	help
	  QE USB Controller support

which does not depend on QUICC_ENGINE, where the latter build provides
the missing symbols.

drivers/usb/gadget/udc/Kconfig:

config USB_FSL_QE
	tristate "Freescale QE/CPM USB Device Controller"
	depends on FSL_SOC && (QUICC_ENGINE || CPM)
	depends on !64BIT || BROKEN

CPM is set but QUICC_ENGINE is not set (by CONFIG_PPC_EP88XC=y).


I don't know of a good fix for this build error.

-- 
~Randy

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

* Re: usb.c:undefined reference to `qe_immr'
  2023-01-10 10:06 ` usb.c:undefined reference to `qe_immr' Randy Dunlap
@ 2023-01-11  7:39   ` Michael Ellerman
  2023-01-11 16:01     ` Randy Dunlap
  0 siblings, 1 reply; 5+ messages in thread
From: Michael Ellerman @ 2023-01-11  7:39 UTC (permalink / raw)
  To: Randy Dunlap, kernel test robot, Masahiro Yamada
  Cc: Nicolas Schier, linux-kernel, Li Yang, oe-kbuild-all,
	linuxppc-dev, Qiang Zhao

Randy Dunlap <rdunlap@infradead.org> writes:
> [adding Cc's]
>
>
> On 1/9/23 23:59, kernel test robot wrote:
>> Hi Masahiro,
>> 
>> FYI, the error/warning still remains.
>> 
>> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
>> head:   5a41237ad1d4b62008f93163af1d9b1da90729d8
>> commit: 7b4537199a4a8480b8c3ba37a2d44765ce76cd9b kbuild: link symbol CRCs at final link, removing CONFIG_MODULE_REL_CRCS
>> date:   8 months ago
>> config: powerpc-randconfig-r026-20230110
>> compiler: powerpc-linux-gcc (GCC) 12.1.0
>> reproduce (this is a W=1 build):
>>         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>>         chmod +x ~/bin/make.cross
>>         # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7b4537199a4a8480b8c3ba37a2d44765ce76cd9b
>>         git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
>>         git fetch --no-tags linus master
>>         git checkout 7b4537199a4a8480b8c3ba37a2d44765ce76cd9b
>>         # save the config file
>>         mkdir build_dir && cp config build_dir/.config
>>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=powerpc olddefconfig
>>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=powerpc SHELL=/bin/bash
>> 
>> If you fix the issue, kindly add following tag where applicable
>> | Reported-by: kernel test robot <lkp@intel.com>
>> 
>> All errors (new ones prefixed by >>):
>> 
>>    powerpc-linux-ld: powerpc-linux-ld: DWARF error: could not find abbrev number 74
>>    drivers/soc/fsl/qe/usb.o: in function `qe_usb_clock_set':
>>>> usb.c:(.text+0x1e): undefined reference to `qe_immr'
>>>> powerpc-linux-ld: usb.c:(.text+0x2a): undefined reference to `qe_immr'
>>>> powerpc-linux-ld: usb.c:(.text+0xbc): undefined reference to `qe_setbrg'
>>>> powerpc-linux-ld: usb.c:(.text+0xca): undefined reference to `cmxgcr_lock'
>>    powerpc-linux-ld: usb.c:(.text+0xce): undefined reference to `cmxgcr_lock'
>> 
>
> .config extract:
>
> #
> # NXP/Freescale QorIQ SoC drivers
> #
> # CONFIG_QUICC_ENGINE is not set
> CONFIG_QE_USB=y
>
>
> This is caused by (drivers/soc/fsl/qe/Kconfig):
>
> config QE_USB
> 	bool
> 	default y if USB_FSL_QE
> 	help
> 	  QE USB Controller support
>
> which does not depend on QUICC_ENGINE, where the latter build provides
> the missing symbols.

So QE_USB should depend on QUICC_ENGINE no?

cheers

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

* Re: usb.c:undefined reference to `qe_immr'
  2023-01-11  7:39   ` Michael Ellerman
@ 2023-01-11 16:01     ` Randy Dunlap
  2023-01-11 19:42       ` Christophe Leroy
  0 siblings, 1 reply; 5+ messages in thread
From: Randy Dunlap @ 2023-01-11 16:01 UTC (permalink / raw)
  To: Michael Ellerman, kernel test robot, Masahiro Yamada
  Cc: Nicolas Schier, linux-kernel, Li Yang, oe-kbuild-all,
	linuxppc-dev, Qiang Zhao



On 1/10/23 23:39, Michael Ellerman wrote:
> Randy Dunlap <rdunlap@infradead.org> writes:
>> [adding Cc's]
>>
>>
>> On 1/9/23 23:59, kernel test robot wrote:
>>> Hi Masahiro,
>>>
>>> FYI, the error/warning still remains.
>>>
>>> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
>>> head:   5a41237ad1d4b62008f93163af1d9b1da90729d8
>>> commit: 7b4537199a4a8480b8c3ba37a2d44765ce76cd9b kbuild: link symbol CRCs at final link, removing CONFIG_MODULE_REL_CRCS
>>> date:   8 months ago
>>> config: powerpc-randconfig-r026-20230110
>>> compiler: powerpc-linux-gcc (GCC) 12.1.0
>>> reproduce (this is a W=1 build):
>>>         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>>>         chmod +x ~/bin/make.cross
>>>         # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7b4537199a4a8480b8c3ba37a2d44765ce76cd9b
>>>         git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
>>>         git fetch --no-tags linus master
>>>         git checkout 7b4537199a4a8480b8c3ba37a2d44765ce76cd9b
>>>         # save the config file
>>>         mkdir build_dir && cp config build_dir/.config
>>>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=powerpc olddefconfig
>>>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=powerpc SHELL=/bin/bash
>>>
>>> If you fix the issue, kindly add following tag where applicable
>>> | Reported-by: kernel test robot <lkp@intel.com>
>>>
>>> All errors (new ones prefixed by >>):
>>>
>>>    powerpc-linux-ld: powerpc-linux-ld: DWARF error: could not find abbrev number 74
>>>    drivers/soc/fsl/qe/usb.o: in function `qe_usb_clock_set':
>>>>> usb.c:(.text+0x1e): undefined reference to `qe_immr'
>>>>> powerpc-linux-ld: usb.c:(.text+0x2a): undefined reference to `qe_immr'
>>>>> powerpc-linux-ld: usb.c:(.text+0xbc): undefined reference to `qe_setbrg'
>>>>> powerpc-linux-ld: usb.c:(.text+0xca): undefined reference to `cmxgcr_lock'
>>>    powerpc-linux-ld: usb.c:(.text+0xce): undefined reference to `cmxgcr_lock'
>>>
>>
>> .config extract:
>>
>> #
>> # NXP/Freescale QorIQ SoC drivers
>> #
>> # CONFIG_QUICC_ENGINE is not set
>> CONFIG_QE_USB=y
>>
>>
>> This is caused by (drivers/soc/fsl/qe/Kconfig):
>>
>> config QE_USB
>> 	bool
>> 	default y if USB_FSL_QE
>> 	help
>> 	  QE USB Controller support
>>
>> which does not depend on QUICC_ENGINE, where the latter build provides
>> the missing symbols.
> 
> So QE_USB should depend on QUICC_ENGINE no?

Yes, that would make sense, but I don't know enough about the
hardware. I.e., could CONFIG_PPC_EP88XC have QE_USB without having
a full QUICC_ENGINE?

thanks.

-- 
~Randy

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

* Re: usb.c:undefined reference to `qe_immr'
  2023-01-11 16:01     ` Randy Dunlap
@ 2023-01-11 19:42       ` Christophe Leroy
  2023-01-11 23:11         ` Leo Li
  0 siblings, 1 reply; 5+ messages in thread
From: Christophe Leroy @ 2023-01-11 19:42 UTC (permalink / raw)
  To: Randy Dunlap, Michael Ellerman, kernel test robot,
	Masahiro Yamada
  Cc: Nicolas Schier, linux-kernel@vger.kernel.org, Li Yang,
	oe-kbuild-all@lists.linux.dev, linuxppc-dev, Qiang Zhao



Le 11/01/2023 à 17:01, Randy Dunlap a écrit :
> 
> 
> On 1/10/23 23:39, Michael Ellerman wrote:
>> Randy Dunlap <rdunlap@infradead.org> writes:
>>> [adding Cc's]
>>>
>>>
>>> On 1/9/23 23:59, kernel test robot wrote:
>>>> Hi Masahiro,
>>>>
>>>> FYI, the error/warning still remains.
>>>>
>>>> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
>>>> head:   5a41237ad1d4b62008f93163af1d9b1da90729d8
>>>> commit: 7b4537199a4a8480b8c3ba37a2d44765ce76cd9b kbuild: link symbol CRCs at final link, removing CONFIG_MODULE_REL_CRCS
>>>> date:   8 months ago
>>>> config: powerpc-randconfig-r026-20230110
>>>> compiler: powerpc-linux-gcc (GCC) 12.1.0
>>>> reproduce (this is a W=1 build):
>>>>          wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>>>>          chmod +x ~/bin/make.cross
>>>>          # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7b4537199a4a8480b8c3ba37a2d44765ce76cd9b
>>>>          git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
>>>>          git fetch --no-tags linus master
>>>>          git checkout 7b4537199a4a8480b8c3ba37a2d44765ce76cd9b
>>>>          # save the config file
>>>>          mkdir build_dir && cp config build_dir/.config
>>>>          COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=powerpc olddefconfig
>>>>          COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=powerpc SHELL=/bin/bash
>>>>
>>>> If you fix the issue, kindly add following tag where applicable
>>>> | Reported-by: kernel test robot <lkp@intel.com>
>>>>
>>>> All errors (new ones prefixed by >>):
>>>>
>>>>     powerpc-linux-ld: powerpc-linux-ld: DWARF error: could not find abbrev number 74
>>>>     drivers/soc/fsl/qe/usb.o: in function `qe_usb_clock_set':
>>>>>> usb.c:(.text+0x1e): undefined reference to `qe_immr'
>>>>>> powerpc-linux-ld: usb.c:(.text+0x2a): undefined reference to `qe_immr'
>>>>>> powerpc-linux-ld: usb.c:(.text+0xbc): undefined reference to `qe_setbrg'
>>>>>> powerpc-linux-ld: usb.c:(.text+0xca): undefined reference to `cmxgcr_lock'
>>>>     powerpc-linux-ld: usb.c:(.text+0xce): undefined reference to `cmxgcr_lock'
>>>>
>>>
>>> .config extract:
>>>
>>> #
>>> # NXP/Freescale QorIQ SoC drivers
>>> #
>>> # CONFIG_QUICC_ENGINE is not set
>>> CONFIG_QE_USB=y
>>>
>>>
>>> This is caused by (drivers/soc/fsl/qe/Kconfig):
>>>
>>> config QE_USB
>>> 	bool
>>> 	default y if USB_FSL_QE
>>> 	help
>>> 	  QE USB Controller support
>>>
>>> which does not depend on QUICC_ENGINE, where the latter build provides
>>> the missing symbols.
>>
>> So QE_USB should depend on QUICC_ENGINE no?
> 
> Yes, that would make sense, but I don't know enough about the
> hardware. I.e., could CONFIG_PPC_EP88XC have QE_USB without having
> a full QUICC_ENGINE?
> 

Kconfig says:

config PPC_EP88XC
	bool "Embedded Planet EP88xC (a.k.a. CWH-PPC-885XN-VE)"
	select CPM1
	help
	  This enables support for the Embedded Planet EP88xC board.

	  This board is also resold by Freescale as the QUICCStart
	  MPC885 Evaluation System and/or the CWH-PPC-885XN-VE.


MPC885 has an USB controller, but I was not aware Linux had any USB 
driver for the 885. Need to dig into history. Was initialy added by 
commit 3948f0e0c999 ("usb: add Freescale QE/CPM USB peripheral 
controller driver"), it explicitely says it should work on CPM.

Christophe

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

* RE: usb.c:undefined reference to `qe_immr'
  2023-01-11 19:42       ` Christophe Leroy
@ 2023-01-11 23:11         ` Leo Li
  0 siblings, 0 replies; 5+ messages in thread
From: Leo Li @ 2023-01-11 23:11 UTC (permalink / raw)
  To: Christophe Leroy, Randy Dunlap, Michael Ellerman,
	kernel test robot, Masahiro Yamada
  Cc: Qiang Zhao, oe-kbuild-all@lists.linux.dev, linuxppc-dev,
	Nicolas Schier, linux-kernel@vger.kernel.org



> -----Original Message-----
> From: Christophe Leroy <christophe.leroy@csgroup.eu>
> Sent: Wednesday, January 11, 2023 1:43 PM
> To: Randy Dunlap <rdunlap@infradead.org>; Michael Ellerman
> <mpe@ellerman.id.au>; kernel test robot <lkp@intel.com>; Masahiro
> Yamada <masahiroy@kernel.org>
> Cc: Nicolas Schier <nicolas@fjasle.eu>; linux-kernel@vger.kernel.org; Leo Li
> <leoyang.li@nxp.com>; oe-kbuild-all@lists.linux.dev; linuxppc-dev
> <linuxppc-dev@lists.ozlabs.org>; Qiang Zhao <qiang.zhao@nxp.com>
> Subject: Re: usb.c:undefined reference to `qe_immr'
> 
> 
> 
> Le 11/01/2023 à 17:01, Randy Dunlap a écrit :
> >
> >
> > On 1/10/23 23:39, Michael Ellerman wrote:
> >> Randy Dunlap <rdunlap@infradead.org> writes:
> >>> [adding Cc's]
> >>>
> >>>
> >>> On 1/9/23 23:59, kernel test robot wrote:
> >>>> Hi Masahiro,
> >>>>
> >>>> FYI, the error/warning still remains.
> >>>>
> >>>> tree:
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgit.ke
> rnel.org%2Fpub%2Fscm%2Flinux%2Fkernel%2Fgit%2Ftorvalds%2Flinux.git&d
> ata=05%7C01%7Cleoyang.li%40nxp.com%7Cd7f37490b9ad42174b0408daf40c
> 0376%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C63809062972159
> 7124%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2lu
> MzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=uv8%2
> BzM6uKMc9VPSXwH60Hi4V27pIKvv7BPzAFA3GOK8%3D&reserved=0 master
> >>>> head:   5a41237ad1d4b62008f93163af1d9b1da90729d8
> >>>> commit: 7b4537199a4a8480b8c3ba37a2d44765ce76cd9b kbuild: link
> symbol CRCs at final link, removing CONFIG_MODULE_REL_CRCS
> >>>> date:   8 months ago
> >>>> config: powerpc-randconfig-r026-20230110
> >>>> compiler: powerpc-linux-gcc (GCC) 12.1.0 reproduce (this is a W=1
> >>>> build):
> >>>>          wget
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fraw.g
> ithubusercontent.com%2Fintel%2Flkp-
> tests%2Fmaster%2Fsbin%2Fmake.cross&data=05%7C01%7Cleoyang.li%40nx
> p.com%7Cd7f37490b9ad42174b0408daf40c0376%7C686ea1d3bc2b4c6fa92cd9
> 9c5c301635%7C0%7C0%7C638090629721753373%7CUnknown%7CTWFpbGZs
> b3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn
> 0%3D%7C3000%7C%7C%7C&sdata=bZocY77aLRAMjD3F1ttgzm%2F2tW8JfhYf
> xq%2B6vxJh9Mc%3D&reserved=0 -O ~/bin/make.cross
> >>>>          chmod +x ~/bin/make.cross
> >>>>          #
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgit.ke
> rnel.org%2Fpub%2Fscm%2Flinux%2Fkernel%2Fgit%2Ftorvalds%2Flinux.git%2
> Fcommit%2F%3Fid%3D7b4537199a4a8480b8c3ba37a2d44765ce76cd9b&data=
> 05%7C01%7Cleoyang.li%40nxp.com%7Cd7f37490b9ad42174b0408daf40c0376
> %7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C638090629721753373
> %7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiL
> CJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=%2F%2BX1fl
> KB1kjgv3wNK18Cu9uq6%2FUOr%2FCTjIsudBfiGho%3D&reserved=0
> >>>>          git remote add linus
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgit.ke
> rnel.org%2Fpub%2Fscm%2Flinux%2Fkernel%2Fgit%2Ftorvalds%2Flinux.git&d
> ata=05%7C01%7Cleoyang.li%40nxp.com%7Cd7f37490b9ad42174b0408daf40c
> 0376%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C63809062972175
> 3373%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2lu
> MzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=%2BvI
> %2BGkvbol1aWLlg%2FAF12%2F44xZeN8U1c%2B0Y%2BvGCadt0%3D&reserve
> d=0
> >>>>          git fetch --no-tags linus master
> >>>>          git checkout 7b4537199a4a8480b8c3ba37a2d44765ce76cd9b
> >>>>          # save the config file
> >>>>          mkdir build_dir && cp config build_dir/.config
> >>>>          COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0
> make.cross W=1 O=build_dir ARCH=powerpc olddefconfig
> >>>>          COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0
> >>>> make.cross W=1 O=build_dir ARCH=powerpc SHELL=/bin/bash
> >>>>
> >>>> If you fix the issue, kindly add following tag where applicable
> >>>> | Reported-by: kernel test robot <lkp@intel.com>
> >>>>
> >>>> All errors (new ones prefixed by >>):
> >>>>
> >>>>     powerpc-linux-ld: powerpc-linux-ld: DWARF error: could not find
> abbrev number 74
> >>>>     drivers/soc/fsl/qe/usb.o: in function `qe_usb_clock_set':
> >>>>>> usb.c:(.text+0x1e): undefined reference to `qe_immr'
> >>>>>> powerpc-linux-ld: usb.c:(.text+0x2a): undefined reference to
> `qe_immr'
> >>>>>> powerpc-linux-ld: usb.c:(.text+0xbc): undefined reference to
> `qe_setbrg'
> >>>>>> powerpc-linux-ld: usb.c:(.text+0xca): undefined reference to
> `cmxgcr_lock'
> >>>>     powerpc-linux-ld: usb.c:(.text+0xce): undefined reference to
> `cmxgcr_lock'
> >>>>
> >>>
> >>> .config extract:
> >>>
> >>> #
> >>> # NXP/Freescale QorIQ SoC drivers
> >>> #
> >>> # CONFIG_QUICC_ENGINE is not set
> >>> CONFIG_QE_USB=y
> >>>
> >>>
> >>> This is caused by (drivers/soc/fsl/qe/Kconfig):
> >>>
> >>> config QE_USB
> >>> 	bool
> >>> 	default y if USB_FSL_QE
> >>> 	help
> >>> 	  QE USB Controller support
> >>>
> >>> which does not depend on QUICC_ENGINE, where the latter build
> >>> provides the missing symbols.
> >>
> >> So QE_USB should depend on QUICC_ENGINE no?
> >
> > Yes, that would make sense, but I don't know enough about the
> > hardware. I.e., could CONFIG_PPC_EP88XC have QE_USB without having a
> > full QUICC_ENGINE?
> >
> 
> Kconfig says:
> 
> config PPC_EP88XC
> 	bool "Embedded Planet EP88xC (a.k.a. CWH-PPC-885XN-VE)"
> 	select CPM1
> 	help
> 	  This enables support for the Embedded Planet EP88xC board.
> 
> 	  This board is also resold by Freescale as the QUICCStart
> 	  MPC885 Evaluation System and/or the CWH-PPC-885XN-VE.
> 
> 
> MPC885 has an USB controller, but I was not aware Linux had any USB driver
> for the 885. Need to dig into history. Was initialy added by commit
> 3948f0e0c999 ("usb: add Freescale QE/CPM USB peripheral controller driver"),
> it explicitely says it should work on CPM.

The udc driver should work with CPM.  But that driver doesn't use the qe_usb_clock_set() defined in drivers/soc/fsl/qe/usb.c which seems only be needed for QE as the clock setting for legacy platforms with CPM is normally done in platform code.

I think it should be safe to make QE_USB depends on QUICC_ENGINE.

Regards,
Leo

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

end of thread, other threads:[~2023-01-11 23:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <202301101500.pillNv6R-lkp@intel.com>
2023-01-10 10:06 ` usb.c:undefined reference to `qe_immr' Randy Dunlap
2023-01-11  7:39   ` Michael Ellerman
2023-01-11 16:01     ` Randy Dunlap
2023-01-11 19:42       ` Christophe Leroy
2023-01-11 23:11         ` Leo Li

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).