Message ID | 20220522155046.260146-5-tmaimon77@gmail.com (mailing list archive) |
---|---|
State | Changes Requested |
Headers | show |
Series | Introduce Nuvoton Arbel NPCM8XX BMC SoC | expand |
On Sun, May 22, 2022 at 5:50 PM Tomer Maimon <tmaimon77@gmail.com> wrote: > +++ b/drivers/tty/serial/8250/8250_of.c > @@ -333,6 +333,7 @@ static const struct of_device_id of_platform_serial_table[] = { > { .compatible = "ti,da830-uart", .data = (void *)PORT_DA830, }, > { .compatible = "nuvoton,wpcm450-uart", .data = (void *)PORT_NPCM, }, > { .compatible = "nuvoton,npcm750-uart", .data = (void *)PORT_NPCM, }, > + { .compatible = "nuvoton,npcm845-uart", .data = (void *)PORT_NPCM, }, > { /* end of list */ }, If these are compatible devices, it's usually easier to claim compatibility with both the specific chip and the older model as a fallback, to avoid driver changes. This seems to apply to the timer and watchdog devices as well. Arnd
Hi Arnd, Thanks for your comment. On Mon, 23 May 2022 at 14:48, Arnd Bergmann <arnd@arndb.de> wrote: > On Sun, May 22, 2022 at 5:50 PM Tomer Maimon <tmaimon77@gmail.com> wrote: > > +++ b/drivers/tty/serial/8250/8250_of.c > > @@ -333,6 +333,7 @@ static const struct of_device_id > of_platform_serial_table[] = { > > { .compatible = "ti,da830-uart", .data = (void *)PORT_DA830, }, > > { .compatible = "nuvoton,wpcm450-uart", .data = (void > *)PORT_NPCM, }, > > { .compatible = "nuvoton,npcm750-uart", .data = (void > *)PORT_NPCM, }, > > + { .compatible = "nuvoton,npcm845-uart", .data = (void > *)PORT_NPCM, }, > > { /* end of list */ }, > > If these are compatible devices, it's usually easier to claim > compatibility with both the specific chip and the older model > as a fallback, to avoid driver changes. This seems to apply to > the timer and watchdog devices as well. > Just to make sure, Do you mean claim in the device tree? like compatible = "nuvoton,npcm845-timer", "nuvoton,npcm-timer"; > Arnd > Best regards, Tomer
On 23/05/2022 14:58, Tomer Maimon wrote: > Hi Arnd, > > Thanks for your comment. > > On Mon, 23 May 2022 at 14:48, Arnd Bergmann <arnd@arndb.de > <mailto:arnd@arndb.de>> wrote: > > On Sun, May 22, 2022 at 5:50 PM Tomer Maimon <tmaimon77@gmail.com > <mailto:tmaimon77@gmail.com>> wrote: > > +++ b/drivers/tty/serial/8250/8250_of.c > > @@ -333,6 +333,7 @@ static const struct of_device_id > of_platform_serial_table[] = { > > { .compatible = "ti,da830-uart", .data = (void > *)PORT_DA830, }, > > { .compatible = "nuvoton,wpcm450-uart", .data = (void > *)PORT_NPCM, }, > > { .compatible = "nuvoton,npcm750-uart", .data = (void > *)PORT_NPCM, }, > > + { .compatible = "nuvoton,npcm845-uart", .data = (void > *)PORT_NPCM, }, > > { /* end of list */ }, > > If these are compatible devices, it's usually easier to claim > compatibility with both the specific chip and the older model > as a fallback, to avoid driver changes. This seems to apply to > the timer and watchdog devices as well. > > Just to make sure, Do you mean claim in the device tree? > like > > compatible = "nuvoton,npcm845-timer", "nuvoton,npcm-timer"; compatible = "nuvoton,npcm845-timer", "nuvoton,npcm750-timer""; Best regards, Krzysztof
Yes, that's what I mean forgot the 750... Thanks Krzysztof On Mon, 23 May 2022 at 16:06, Krzysztof Kozlowski < krzysztof.kozlowski@linaro.org> wrote: > On 23/05/2022 14:58, Tomer Maimon wrote: > > Hi Arnd, > > > > Thanks for your comment. > > > > On Mon, 23 May 2022 at 14:48, Arnd Bergmann <arnd@arndb.de > > <mailto:arnd@arndb.de>> wrote: > > > > On Sun, May 22, 2022 at 5:50 PM Tomer Maimon <tmaimon77@gmail.com > > <mailto:tmaimon77@gmail.com>> wrote: > > > +++ b/drivers/tty/serial/8250/8250_of.c > > > @@ -333,6 +333,7 @@ static const struct of_device_id > > of_platform_serial_table[] = { > > > { .compatible = "ti,da830-uart", .data = (void > > *)PORT_DA830, }, > > > { .compatible = "nuvoton,wpcm450-uart", .data = (void > > *)PORT_NPCM, }, > > > { .compatible = "nuvoton,npcm750-uart", .data = (void > > *)PORT_NPCM, }, > > > + { .compatible = "nuvoton,npcm845-uart", .data = (void > > *)PORT_NPCM, }, > > > { /* end of list */ }, > > > > If these are compatible devices, it's usually easier to claim > > compatibility with both the specific chip and the older model > > as a fallback, to avoid driver changes. This seems to apply to > > the timer and watchdog devices as well. > > > > Just to make sure, Do you mean claim in the device tree? > > like > > > > compatible = "nuvoton,npcm845-timer", "nuvoton,npcm-timer"; > > compatible = "nuvoton,npcm845-timer", "nuvoton,npcm750-timer""; > > > Best regards, > Krzysztof >
diff --git a/drivers/tty/serial/8250/8250_of.c b/drivers/tty/serial/8250/8250_of.c index be8626234627..b155c596e614 100644 --- a/drivers/tty/serial/8250/8250_of.c +++ b/drivers/tty/serial/8250/8250_of.c @@ -333,6 +333,7 @@ static const struct of_device_id of_platform_serial_table[] = { { .compatible = "ti,da830-uart", .data = (void *)PORT_DA830, }, { .compatible = "nuvoton,wpcm450-uart", .data = (void *)PORT_NPCM, }, { .compatible = "nuvoton,npcm750-uart", .data = (void *)PORT_NPCM, }, + { .compatible = "nuvoton,npcm845-uart", .data = (void *)PORT_NPCM, }, { /* end of list */ }, }; MODULE_DEVICE_TABLE(of, of_platform_serial_table);
Add Nuvoton BMC NPCM845 UART support. The NPCM845 uses the same UART as the NPCM750. Signed-off-by: Tomer Maimon <tmaimon77@gmail.com> --- drivers/tty/serial/8250/8250_of.c | 1 + 1 file changed, 1 insertion(+)