From: Jiri Slaby <jirislaby@kernel.org>
To: Crescent Hsieh <crescentcy.hsieh@moxa.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org
Subject: Re: [PATCH 3/6] tty: mxser: serial: 8250: Relocate device IDs from mxser to 8250_pci
Date: Tue, 11 Jun 2024 09:42:36 +0200 [thread overview]
Message-ID: <0d8da651-4e41-4af2-81cc-732f17aab403@kernel.org> (raw)
In-Reply-To: <20240607114336.4496-4-crescentcy.hsieh@moxa.com>
On 07. 06. 24, 13:43, Crescent Hsieh wrote:
> The devices in mxser could be supported by 8250_pci, so this patch
> relocates these device IDs from mxser into 8250_pci.
>
> Signed-off-by: Crescent Hsieh <crescentcy.hsieh@moxa.com>
> ---
> drivers/tty/mxser.c | 50 ------------------------------
> drivers/tty/serial/8250/8250_pci.c | 50 ++++++++++++++++++++++++++++++
> 2 files changed, 50 insertions(+), 50 deletions(-)
>
> diff --git a/drivers/tty/mxser.c b/drivers/tty/mxser.c
> index 458bb1280ebf..b0e7ea6611bf 100644
> --- a/drivers/tty/mxser.c
> +++ b/drivers/tty/mxser.c
> @@ -160,31 +160,6 @@
> #define MXSER_CUSTOM_DIVISOR (MXSER_BAUD_BASE * 16)
>
> #define PCI_DEVICE_ID_MOXA_RC7000 0x0001
> -#define PCI_DEVICE_ID_MOXA_CP102 0x1020
> -#define PCI_DEVICE_ID_MOXA_CP102UL 0x1021
> -#define PCI_DEVICE_ID_MOXA_CP102U 0x1022
> -#define PCI_DEVICE_ID_MOXA_CP102UF 0x1023
> -#define PCI_DEVICE_ID_MOXA_C104 0x1040
> -#define PCI_DEVICE_ID_MOXA_CP104U 0x1041
> -#define PCI_DEVICE_ID_MOXA_CP104JU 0x1042
> -#define PCI_DEVICE_ID_MOXA_CP104EL 0x1043
> -#define PCI_DEVICE_ID_MOXA_POS104UL 0x1044
> -#define PCI_DEVICE_ID_MOXA_CB108 0x1080
> -#define PCI_DEVICE_ID_MOXA_CP112UL 0x1120
> -#define PCI_DEVICE_ID_MOXA_CT114 0x1140
> -#define PCI_DEVICE_ID_MOXA_CP114 0x1141
> -#define PCI_DEVICE_ID_MOXA_CB114 0x1142
> -#define PCI_DEVICE_ID_MOXA_CP114UL 0x1143
> -#define PCI_DEVICE_ID_MOXA_CP118U 0x1180
> -#define PCI_DEVICE_ID_MOXA_CP118EL 0x1181
> -#define PCI_DEVICE_ID_MOXA_CP132 0x1320
> -#define PCI_DEVICE_ID_MOXA_CP132U 0x1321
> -#define PCI_DEVICE_ID_MOXA_CP134U 0x1340
> -#define PCI_DEVICE_ID_MOXA_CB134I 0x1341
> -#define PCI_DEVICE_ID_MOXA_CP138U 0x1380
> -#define PCI_DEVICE_ID_MOXA_C168 0x1680
> -#define PCI_DEVICE_ID_MOXA_CP168U 0x1681
> -#define PCI_DEVICE_ID_MOXA_CP168EL 0x1682
>
> #define MXSER_NPORTS(ddata) ((ddata) & 0xffU)
> #define MXSER_HIGHBAUD 0x0100
> @@ -212,32 +187,7 @@ static const struct {
> /* driver_data correspond to the lines in the structure above
> see also ISA probe function before you change something */
> static const struct pci_device_id mxser_pcibrds[] = {
> - { PCI_DEVICE_DATA(MOXA, C168, 8) },
> - { PCI_DEVICE_DATA(MOXA, C104, 4) },
> - { PCI_DEVICE_DATA(MOXA, CP132, 2) },
> - { PCI_DEVICE_DATA(MOXA, CP114, 4) },
> - { PCI_DEVICE_DATA(MOXA, CT114, 4) },
> - { PCI_DEVICE_DATA(MOXA, CP102, 2 | MXSER_HIGHBAUD) },
How is this MXSER_HIGHBAUD handled in 8250_pci?
> - { PCI_DEVICE_DATA(MOXA, CP104U, 4) },
> - { PCI_DEVICE_DATA(MOXA, CP168U, 8) },
> - { PCI_DEVICE_DATA(MOXA, CP132U, 2) },
> - { PCI_DEVICE_DATA(MOXA, CP134U, 4) },
> - { PCI_DEVICE_DATA(MOXA, CP104JU, 4) },
> { PCI_DEVICE_DATA(MOXA, RC7000, 8) }, /* RC7000 */
Can you simply add this exception to mxser_get_nports() I suggested in
1/6 and drop the whole mxser then \o/?
I had a long-term plan to mount mxser onto serial-core (or 8250). I
haven't managed the conversion yet. So I am glad to see this.
> - { PCI_DEVICE_DATA(MOXA, CP118U, 8) },
> - { PCI_DEVICE_DATA(MOXA, CP102UL, 2) },
> - { PCI_DEVICE_DATA(MOXA, CP102U, 2) },
> - { PCI_DEVICE_DATA(MOXA, CP118EL, 8) },
> - { PCI_DEVICE_DATA(MOXA, CP168EL, 8) },
> - { PCI_DEVICE_DATA(MOXA, CP104EL, 4) },
> - { PCI_DEVICE_DATA(MOXA, CB108, 8) },
> - { PCI_DEVICE_DATA(MOXA, CB114, 4) },
> - { PCI_DEVICE_DATA(MOXA, CB134I, 4) },
> - { PCI_DEVICE_DATA(MOXA, CP138U, 8) },
> - { PCI_DEVICE_DATA(MOXA, POS104UL, 4) },
> - { PCI_DEVICE_DATA(MOXA, CP114UL, 4) },
> - { PCI_DEVICE_DATA(MOXA, CP102UF, 2) },
> - { PCI_DEVICE_DATA(MOXA, CP112UL, 2) },
> { }
> };
--
js
next prev parent reply other threads:[~2024-06-11 7:42 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-07 11:43 [PATCH 0/6] Adjustments and Enhancements for MOXA PCI Serial Boards Crescent Hsieh
2024-06-07 11:43 ` [PATCH 1/6] tty: serial: 8250: Fix the amount of ports doesn't match the device Crescent Hsieh
2024-06-08 9:58 ` Andy Shevchenko
2024-06-11 7:39 ` Jiri Slaby
2024-06-07 11:43 ` [PATCH 2/6] tty: serial: 8250: Add 2 ports PCI configuration for 921600 BAR 2 Crescent Hsieh
2024-06-07 11:43 ` [PATCH 3/6] tty: mxser: serial: 8250: Relocate device IDs from mxser to 8250_pci Crescent Hsieh
2024-06-11 7:42 ` Jiri Slaby [this message]
2024-06-13 10:03 ` Crescent CY Hsieh
2024-06-07 11:43 ` [PATCH 4/6] tty: serial: 8250: Add check for setting default serial interface Crescent Hsieh
2024-06-08 9:57 ` Andy Shevchenko
2024-06-07 11:43 ` [PATCH 5/6] tty: serial: 8250: Add support for Moxa PCIe boards to switch interface Crescent Hsieh
2024-06-08 9:51 ` Andy Shevchenko
2024-06-07 11:43 ` [PATCH 6/6] tty: serial: 8250: Add support for MUEX50 UART Crescent Hsieh
2024-06-08 9:52 ` Andy Shevchenko
2024-06-08 9:47 ` [PATCH 0/6] Adjustments and Enhancements for MOXA PCI Serial Boards Andy Shevchenko
2024-06-13 10:15 ` Crescent CY Hsieh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0d8da651-4e41-4af2-81cc-732f17aab403@kernel.org \
--to=jirislaby@kernel.org \
--cc=crescentcy.hsieh@moxa.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).