Re: [PATCH] powerpc: allow PPC_EARLY_DEBUG_CPM only when SERIAL_CPM=y

From: Randy Dunlap
Date: Fri Jun 09 2023 - 23:11:22 EST


Hi--

On 5/16/23 11:54, Pali Rohár wrote:
> On Tuesday 16 May 2023 08:28:54 Randy Dunlap wrote:
>> In a randconfig with CONFIG_SERIAL_CPM=m and
>> CONFIG_PPC_EARLY_DEBUG_CPM=y, there is a build error:
>> ERROR: modpost: "udbg_putc" [drivers/tty/serial/cpm_uart/cpm_uart.ko] undefined!
>>
>> Prevent the build error by allowing PPC_EARLY_DEBUG_CPM only when
>> SERIAL_CPM=y.
>>
>> Fixes: c374e00e17f1 ("[POWERPC] Add early debug console for CPM serial ports.")
>> Signed-off-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>
>> Cc: Scott Wood <scottwood@xxxxxxxxxxxxx>
>> Cc: Kumar Gala <galak@xxxxxxxxxxxxxxxxxxx>
>> Cc: "Pali Rohár" <pali@xxxxxxxxxx>
>> Cc: Michael Ellerman <mpe@xxxxxxxxxxxxxx>
>> Cc: Nicholas Piggin <npiggin@xxxxxxxxx>
>> Cc: Christophe Leroy <christophe.leroy@xxxxxxxxxx>
>> Cc: linuxppc-dev@xxxxxxxxxxxxxxxx
>
> Looks good,
>
> Reviewed-by: Pali Rohár <pali@xxxxxxxxxx>

I'm still seeing this build error in linux-next even with other (PPC) CPM
patches applied.

>
>> ---
>> arch/powerpc/Kconfig.debug | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff -- a/arch/powerpc/Kconfig.debug b/arch/powerpc/Kconfig.debug
>> --- a/arch/powerpc/Kconfig.debug
>> +++ b/arch/powerpc/Kconfig.debug
>> @@ -240,7 +240,7 @@ config PPC_EARLY_DEBUG_40x
>>
>> config PPC_EARLY_DEBUG_CPM
>> bool "Early serial debugging for Freescale CPM-based serial ports"
>> - depends on SERIAL_CPM
>> + depends on SERIAL_CPM=y
>> help
>> Select this to enable early debugging for Freescale chips
>> using a CPM-based serial port. This assumes that the bootwrapper

--
~Randy