diff options
author | Dirk Brandewie <dirk.brandewie@gmail.com> | 2010-11-17 10:35:20 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-11-30 20:21:50 -0500 |
commit | 095e24b0ea75b2bdc532b39b04530993442f237f (patch) | |
tree | 75ec2eee4df1939e405b30a856969366725c017b /drivers/serial | |
parent | 83abd0d897ad3b7d064c8d8594ec5cc8520d6646 (diff) |
Serial: ce4100: Add PCI UART support for the ce4100
This patch adds support for the PCI UART on the ce4100.
Signed-off-by: Dirk Brandewie <dirk.brandewie@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/serial')
-rw-r--r-- | drivers/serial/8250_pci.c | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/drivers/serial/8250_pci.c b/drivers/serial/8250_pci.c index 53be4d35a0aa..e30356d15af7 100644 --- a/drivers/serial/8250_pci.c +++ b/drivers/serial/8250_pci.c | |||
@@ -957,6 +957,22 @@ pci_default_setup(struct serial_private *priv, | |||
957 | return setup_port(priv, port, bar, offset, board->reg_shift); | 957 | return setup_port(priv, port, bar, offset, board->reg_shift); |
958 | } | 958 | } |
959 | 959 | ||
960 | static int | ||
961 | ce4100_serial_setup(struct serial_private *priv, | ||
962 | const struct pciserial_board *board, | ||
963 | struct uart_port *port, int idx) | ||
964 | { | ||
965 | int ret; | ||
966 | |||
967 | ret = setup_port(priv, port, 0, 0, board->reg_shift); | ||
968 | port->iotype = UPIO_MEM32; | ||
969 | port->type = PORT_XSCALE; | ||
970 | port->flags = (port->flags | UPF_FIXED_PORT | UPF_FIXED_TYPE); | ||
971 | port->regshift = 2; | ||
972 | |||
973 | return ret; | ||
974 | } | ||
975 | |||
960 | static int skip_tx_en_setup(struct serial_private *priv, | 976 | static int skip_tx_en_setup(struct serial_private *priv, |
961 | const struct pciserial_board *board, | 977 | const struct pciserial_board *board, |
962 | struct uart_port *port, int idx) | 978 | struct uart_port *port, int idx) |
@@ -981,6 +997,7 @@ static int skip_tx_en_setup(struct serial_private *priv, | |||
981 | #define PCI_SUBDEVICE_ID_POCTAL232 0x0308 | 997 | #define PCI_SUBDEVICE_ID_POCTAL232 0x0308 |
982 | #define PCI_SUBDEVICE_ID_POCTAL422 0x0408 | 998 | #define PCI_SUBDEVICE_ID_POCTAL422 0x0408 |
983 | #define PCI_VENDOR_ID_ADVANTECH 0x13fe | 999 | #define PCI_VENDOR_ID_ADVANTECH 0x13fe |
1000 | #define PCI_DEVICE_ID_INTEL_CE4100_UART 0x2e66 | ||
984 | #define PCI_DEVICE_ID_ADVANTECH_PCI3620 0x3620 | 1001 | #define PCI_DEVICE_ID_ADVANTECH_PCI3620 0x3620 |
985 | #define PCI_DEVICE_ID_TITAN_200I 0x8028 | 1002 | #define PCI_DEVICE_ID_TITAN_200I 0x8028 |
986 | #define PCI_DEVICE_ID_TITAN_400I 0x8048 | 1003 | #define PCI_DEVICE_ID_TITAN_400I 0x8048 |
@@ -1072,6 +1089,13 @@ static struct pci_serial_quirk pci_serial_quirks[] __refdata = { | |||
1072 | .subdevice = PCI_ANY_ID, | 1089 | .subdevice = PCI_ANY_ID, |
1073 | .setup = skip_tx_en_setup, | 1090 | .setup = skip_tx_en_setup, |
1074 | }, | 1091 | }, |
1092 | { | ||
1093 | .vendor = PCI_VENDOR_ID_INTEL, | ||
1094 | .device = PCI_DEVICE_ID_INTEL_CE4100_UART, | ||
1095 | .subvendor = PCI_ANY_ID, | ||
1096 | .subdevice = PCI_ANY_ID, | ||
1097 | .setup = ce4100_serial_setup, | ||
1098 | }, | ||
1075 | /* | 1099 | /* |
1076 | * ITE | 1100 | * ITE |
1077 | */ | 1101 | */ |
@@ -1592,6 +1616,7 @@ enum pci_board_num_t { | |||
1592 | pbn_ADDIDATA_PCIe_2_3906250, | 1616 | pbn_ADDIDATA_PCIe_2_3906250, |
1593 | pbn_ADDIDATA_PCIe_4_3906250, | 1617 | pbn_ADDIDATA_PCIe_4_3906250, |
1594 | pbn_ADDIDATA_PCIe_8_3906250, | 1618 | pbn_ADDIDATA_PCIe_8_3906250, |
1619 | pbn_ce4100_1_115200, | ||
1595 | }; | 1620 | }; |
1596 | 1621 | ||
1597 | /* | 1622 | /* |
@@ -2281,6 +2306,12 @@ static struct pciserial_board pci_boards[] __devinitdata = { | |||
2281 | .uart_offset = 0x200, | 2306 | .uart_offset = 0x200, |
2282 | .first_offset = 0x1000, | 2307 | .first_offset = 0x1000, |
2283 | }, | 2308 | }, |
2309 | [pbn_ce4100_1_115200] = { | ||
2310 | .flags = FL_BASE0, | ||
2311 | .num_ports = 1, | ||
2312 | .base_baud = 921600, | ||
2313 | .reg_shift = 2, | ||
2314 | }, | ||
2284 | }; | 2315 | }; |
2285 | 2316 | ||
2286 | static const struct pci_device_id softmodem_blacklist[] = { | 2317 | static const struct pci_device_id softmodem_blacklist[] = { |
@@ -3760,6 +3791,11 @@ static struct pci_device_id serial_pci_tbl[] = { | |||
3760 | { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9865, | 3791 | { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9865, |
3761 | 0xA000, 0x3004, | 3792 | 0xA000, 0x3004, |
3762 | 0, 0, pbn_b0_bt_4_115200 }, | 3793 | 0, 0, pbn_b0_bt_4_115200 }, |
3794 | /* Intel CE4100 */ | ||
3795 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CE4100_UART, | ||
3796 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, | ||
3797 | pbn_ce4100_1_115200 }, | ||
3798 | |||
3763 | 3799 | ||
3764 | /* | 3800 | /* |
3765 | * These entries match devices with class COMMUNICATION_SERIAL, | 3801 | * These entries match devices with class COMMUNICATION_SERIAL, |