2015-11-04 20:40:23

by Arnd Bergmann

[permalink] [raw]
Subject: Re: [RESEND][PATCH] ARM: debug: add support for Palmchip 16550-like UART

On Tuesday 27 October 2015 12:57:57 Mans Rullgard wrote:
> --- a/arch/arm/include/debug/8250.S
> +++ b/arch/arm/include/debug/8250.S
> @@ -9,6 +9,18 @@
> */
> #include <linux/serial_reg.h>
>
> +#ifdef CONFIG_DEBUG_UART_8250_PALMCHIP
> +
> +#undef UART_TX
> +#undef UART_LSR
> +#undef UART_MSR
> +
> +#define UART_TX 1
> +#define UART_LSR 7
> +#define UART_MSR 8
> +
> +#endif
>

Maybe use a separate file instead of an #ifdef?


Something like

arch/arm/include/debug/8250-palmchip.S:

#include <linux/serial_reg.h>

#undef UART_TX
#undef UART_LSR
#undef UART_MSR

#define UART_TX 1
#define UART_LSR 7
#define UART_MSR 8

#include "8250.S"



Arnd


2015-11-04 21:41:23

by Måns Rullgård

[permalink] [raw]
Subject: Re: [RESEND][PATCH] ARM: debug: add support for Palmchip 16550-like UART

Arnd Bergmann <[email protected]> writes:

> On Tuesday 27 October 2015 12:57:57 Mans Rullgard wrote:
>> --- a/arch/arm/include/debug/8250.S
>> +++ b/arch/arm/include/debug/8250.S
>> @@ -9,6 +9,18 @@
>> */
>> #include <linux/serial_reg.h>
>>
>> +#ifdef CONFIG_DEBUG_UART_8250_PALMCHIP
>> +
>> +#undef UART_TX
>> +#undef UART_LSR
>> +#undef UART_MSR
>> +
>> +#define UART_TX 1
>> +#define UART_LSR 7
>> +#define UART_MSR 8
>> +
>> +#endif
>>
>
> Maybe use a separate file instead of an #ifdef?
>
> Something like
>
> arch/arm/include/debug/8250-palmchip.S:
>
> #include <linux/serial_reg.h>
>
> #undef UART_TX
> #undef UART_LSR
> #undef UART_MSR
>
> #define UART_TX 1
> #define UART_LSR 7
> #define UART_MSR 8
>
> #include "8250.S"

Good idea. I'll make a new patch.

--
M?ns Rullg?rd
[email protected]