diff options
author | Lee Howard <lee.howard@mainpine.com> | 2008-10-21 08:48:58 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-23 12:31:09 -0400 |
commit | 7106b4e333baeaf3c596e4d240438059b8a7616d (patch) | |
tree | 134152ba7d67e2a3d26d6fe1b464a3f51690147a /drivers/serial | |
parent | cb4bca3540535a15705b50bdaea4fe2fddd183b3 (diff) |
8250: Oxford Semiconductor Devices
Add support for the OxSemi 'Tornado' devices.
Reformatted and reworked a bit by Alan Cox
Signed-off-by: Lee Howard <lee.howard@mainpine.com>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/serial')
-rw-r--r-- | drivers/serial/8250_pci.c | 211 |
1 files changed, 211 insertions, 0 deletions
diff --git a/drivers/serial/8250_pci.c b/drivers/serial/8250_pci.c index c014ffb110e9..1bdb08b41f73 100644 --- a/drivers/serial/8250_pci.c +++ b/drivers/serial/8250_pci.c | |||
@@ -1100,6 +1100,8 @@ enum pci_board_num_t { | |||
1100 | pbn_b0_4_1843200_200, | 1100 | pbn_b0_4_1843200_200, |
1101 | pbn_b0_8_1843200_200, | 1101 | pbn_b0_8_1843200_200, |
1102 | 1102 | ||
1103 | pbn_b0_1_4000000, | ||
1104 | |||
1103 | pbn_b0_bt_1_115200, | 1105 | pbn_b0_bt_1_115200, |
1104 | pbn_b0_bt_2_115200, | 1106 | pbn_b0_bt_2_115200, |
1105 | pbn_b0_bt_8_115200, | 1107 | pbn_b0_bt_8_115200, |
@@ -1167,6 +1169,10 @@ enum pci_board_num_t { | |||
1167 | pbn_exsys_4055, | 1169 | pbn_exsys_4055, |
1168 | pbn_plx_romulus, | 1170 | pbn_plx_romulus, |
1169 | pbn_oxsemi, | 1171 | pbn_oxsemi, |
1172 | pbn_oxsemi_1_4000000, | ||
1173 | pbn_oxsemi_2_4000000, | ||
1174 | pbn_oxsemi_4_4000000, | ||
1175 | pbn_oxsemi_8_4000000, | ||
1170 | pbn_intel_i960, | 1176 | pbn_intel_i960, |
1171 | pbn_sgi_ioc3, | 1177 | pbn_sgi_ioc3, |
1172 | pbn_computone_4, | 1178 | pbn_computone_4, |
@@ -1290,6 +1296,12 @@ static struct pciserial_board pci_boards[] __devinitdata = { | |||
1290 | .base_baud = 1843200, | 1296 | .base_baud = 1843200, |
1291 | .uart_offset = 0x200, | 1297 | .uart_offset = 0x200, |
1292 | }, | 1298 | }, |
1299 | [pbn_b0_1_4000000] = { | ||
1300 | .flags = FL_BASE0, | ||
1301 | .num_ports = 1, | ||
1302 | .base_baud = 4000000, | ||
1303 | .uart_offset = 8, | ||
1304 | }, | ||
1293 | 1305 | ||
1294 | [pbn_b0_bt_1_115200] = { | 1306 | [pbn_b0_bt_1_115200] = { |
1295 | .flags = FL_BASE0|FL_BASE_BARS, | 1307 | .flags = FL_BASE0|FL_BASE_BARS, |
@@ -1625,6 +1637,35 @@ static struct pciserial_board pci_boards[] __devinitdata = { | |||
1625 | .base_baud = 115200, | 1637 | .base_baud = 115200, |
1626 | .uart_offset = 8, | 1638 | .uart_offset = 8, |
1627 | }, | 1639 | }, |
1640 | [pbn_oxsemi_1_4000000] = { | ||
1641 | .flags = FL_BASE0, | ||
1642 | .num_ports = 1, | ||
1643 | .base_baud = 4000000, | ||
1644 | .uart_offset = 0x200, | ||
1645 | .first_offset = 0x1000, | ||
1646 | }, | ||
1647 | [pbn_oxsemi_2_4000000] = { | ||
1648 | .flags = FL_BASE0, | ||
1649 | .num_ports = 2, | ||
1650 | .base_baud = 4000000, | ||
1651 | .uart_offset = 0x200, | ||
1652 | .first_offset = 0x1000, | ||
1653 | }, | ||
1654 | [pbn_oxsemi_4_4000000] = { | ||
1655 | .flags = FL_BASE0, | ||
1656 | .num_ports = 4, | ||
1657 | .base_baud = 4000000, | ||
1658 | .uart_offset = 0x200, | ||
1659 | .first_offset = 0x1000, | ||
1660 | }, | ||
1661 | [pbn_oxsemi_8_4000000] = { | ||
1662 | .flags = FL_BASE0, | ||
1663 | .num_ports = 8, | ||
1664 | .base_baud = 4000000, | ||
1665 | .uart_offset = 0x200, | ||
1666 | .first_offset = 0x1000, | ||
1667 | }, | ||
1668 | |||
1628 | 1669 | ||
1629 | /* | 1670 | /* |
1630 | * EKF addition for i960 Boards form EKF with serial port. | 1671 | * EKF addition for i960 Boards form EKF with serial port. |
@@ -1813,6 +1854,34 @@ serial_pci_matches(struct pciserial_board *board, | |||
1813 | board->first_offset == guessed->first_offset; | 1854 | board->first_offset == guessed->first_offset; |
1814 | } | 1855 | } |
1815 | 1856 | ||
1857 | /* | ||
1858 | * Oxford Semiconductor Inc. | ||
1859 | * Check that device is part of the Tornado range of devices, then determine | ||
1860 | * the number of ports available on the device. | ||
1861 | */ | ||
1862 | static int pci_oxsemi_tornado_init(struct pci_dev *dev, struct pciserial_board *board) | ||
1863 | { | ||
1864 | u8 __iomem *p; | ||
1865 | unsigned long deviceID; | ||
1866 | unsigned int number_uarts; | ||
1867 | |||
1868 | p = pci_iomap(dev, 0, 5); | ||
1869 | if (p == NULL) | ||
1870 | return -ENOMEM; | ||
1871 | |||
1872 | deviceID = ioread32(p); | ||
1873 | /* Tornado device */ | ||
1874 | if (deviceID == 0x07000200) { | ||
1875 | number_uarts = ioread8(p + 4); | ||
1876 | board->num_ports = number_uarts; | ||
1877 | printk(KERN_DEBUG | ||
1878 | "%d ports detected on Oxford PCI Express device\n", | ||
1879 | number_uarts); | ||
1880 | } | ||
1881 | pci_iounmap(dev, p); | ||
1882 | return 0; | ||
1883 | } | ||
1884 | |||
1816 | struct serial_private * | 1885 | struct serial_private * |
1817 | pciserial_init_ports(struct pci_dev *dev, struct pciserial_board *board) | 1886 | pciserial_init_ports(struct pci_dev *dev, struct pciserial_board *board) |
1818 | { | 1887 | { |
@@ -1821,6 +1890,12 @@ pciserial_init_ports(struct pci_dev *dev, struct pciserial_board *board) | |||
1821 | struct pci_serial_quirk *quirk; | 1890 | struct pci_serial_quirk *quirk; |
1822 | int rc, nr_ports, i; | 1891 | int rc, nr_ports, i; |
1823 | 1892 | ||
1893 | /* | ||
1894 | * Find number of ports on board | ||
1895 | */ | ||
1896 | if (dev->vendor == PCI_VENDOR_ID_OXSEMI) | ||
1897 | pci_oxsemi_tornado_init(dev, board); | ||
1898 | |||
1824 | nr_ports = board->num_ports; | 1899 | nr_ports = board->num_ports; |
1825 | 1900 | ||
1826 | /* | 1901 | /* |
@@ -2301,6 +2376,142 @@ static struct pci_device_id serial_pci_tbl[] = { | |||
2301 | pbn_b0_bt_2_921600 }, | 2376 | pbn_b0_bt_2_921600 }, |
2302 | 2377 | ||
2303 | /* | 2378 | /* |
2379 | * Oxford Semiconductor Inc. Tornado PCI express device range. | ||
2380 | */ | ||
2381 | { PCI_VENDOR_ID_OXSEMI, 0xc101, /* OXPCIe952 1 Legacy UART */ | ||
2382 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, | ||
2383 | pbn_b0_1_4000000 }, | ||
2384 | { PCI_VENDOR_ID_OXSEMI, 0xc105, /* OXPCIe952 1 Legacy UART */ | ||
2385 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, | ||
2386 | pbn_b0_1_4000000 }, | ||
2387 | { PCI_VENDOR_ID_OXSEMI, 0xc11b, /* OXPCIe952 1 Native UART */ | ||
2388 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, | ||
2389 | pbn_oxsemi_1_4000000 }, | ||
2390 | { PCI_VENDOR_ID_OXSEMI, 0xc11f, /* OXPCIe952 1 Native UART */ | ||
2391 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, | ||
2392 | pbn_oxsemi_1_4000000 }, | ||
2393 | { PCI_VENDOR_ID_OXSEMI, 0xc120, /* OXPCIe952 1 Legacy UART */ | ||
2394 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, | ||
2395 | pbn_b0_1_4000000 }, | ||
2396 | { PCI_VENDOR_ID_OXSEMI, 0xc124, /* OXPCIe952 1 Legacy UART */ | ||
2397 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, | ||
2398 | pbn_b0_1_4000000 }, | ||
2399 | { PCI_VENDOR_ID_OXSEMI, 0xc138, /* OXPCIe952 1 Native UART */ | ||
2400 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, | ||
2401 | pbn_oxsemi_1_4000000 }, | ||
2402 | { PCI_VENDOR_ID_OXSEMI, 0xc13d, /* OXPCIe952 1 Native UART */ | ||
2403 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, | ||
2404 | pbn_oxsemi_1_4000000 }, | ||
2405 | { PCI_VENDOR_ID_OXSEMI, 0xc140, /* OXPCIe952 1 Legacy UART */ | ||
2406 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, | ||
2407 | pbn_b0_1_4000000 }, | ||
2408 | { PCI_VENDOR_ID_OXSEMI, 0xc141, /* OXPCIe952 1 Legacy UART */ | ||
2409 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, | ||
2410 | pbn_b0_1_4000000 }, | ||
2411 | { PCI_VENDOR_ID_OXSEMI, 0xc144, /* OXPCIe952 1 Legacy UART */ | ||
2412 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, | ||
2413 | pbn_b0_1_4000000 }, | ||
2414 | { PCI_VENDOR_ID_OXSEMI, 0xc145, /* OXPCIe952 1 Legacy UART */ | ||
2415 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, | ||
2416 | pbn_b0_1_4000000 }, | ||
2417 | { PCI_VENDOR_ID_OXSEMI, 0xc158, /* OXPCIe952 2 Native UART */ | ||
2418 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, | ||
2419 | pbn_oxsemi_2_4000000 }, | ||
2420 | { PCI_VENDOR_ID_OXSEMI, 0xc15d, /* OXPCIe952 2 Native UART */ | ||
2421 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, | ||
2422 | pbn_oxsemi_2_4000000 }, | ||
2423 | { PCI_VENDOR_ID_OXSEMI, 0xc208, /* OXPCIe954 4 Native UART */ | ||
2424 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, | ||
2425 | pbn_oxsemi_4_4000000 }, | ||
2426 | { PCI_VENDOR_ID_OXSEMI, 0xc20d, /* OXPCIe954 4 Native UART */ | ||
2427 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, | ||
2428 | pbn_oxsemi_4_4000000 }, | ||
2429 | { PCI_VENDOR_ID_OXSEMI, 0xc308, /* OXPCIe958 8 Native UART */ | ||
2430 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, | ||
2431 | pbn_oxsemi_8_4000000 }, | ||
2432 | { PCI_VENDOR_ID_OXSEMI, 0xc30d, /* OXPCIe958 8 Native UART */ | ||
2433 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, | ||
2434 | pbn_oxsemi_8_4000000 }, | ||
2435 | { PCI_VENDOR_ID_OXSEMI, 0xc40b, /* OXPCIe200 1 Native UART */ | ||
2436 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, | ||
2437 | pbn_oxsemi_1_4000000 }, | ||
2438 | { PCI_VENDOR_ID_OXSEMI, 0xc40f, /* OXPCIe200 1 Native UART */ | ||
2439 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, | ||
2440 | pbn_oxsemi_1_4000000 }, | ||
2441 | { PCI_VENDOR_ID_OXSEMI, 0xc41b, /* OXPCIe200 1 Native UART */ | ||
2442 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, | ||
2443 | pbn_oxsemi_1_4000000 }, | ||
2444 | { PCI_VENDOR_ID_OXSEMI, 0xc41f, /* OXPCIe200 1 Native UART */ | ||
2445 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, | ||
2446 | pbn_oxsemi_1_4000000 }, | ||
2447 | { PCI_VENDOR_ID_OXSEMI, 0xc42b, /* OXPCIe200 1 Native UART */ | ||
2448 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, | ||
2449 | pbn_oxsemi_1_4000000 }, | ||
2450 | { PCI_VENDOR_ID_OXSEMI, 0xc42f, /* OXPCIe200 1 Native UART */ | ||
2451 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, | ||
2452 | pbn_oxsemi_1_4000000 }, | ||
2453 | { PCI_VENDOR_ID_OXSEMI, 0xc43b, /* OXPCIe200 1 Native UART */ | ||
2454 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, | ||
2455 | pbn_oxsemi_1_4000000 }, | ||
2456 | { PCI_VENDOR_ID_OXSEMI, 0xc43f, /* OXPCIe200 1 Native UART */ | ||
2457 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, | ||
2458 | pbn_oxsemi_1_4000000 }, | ||
2459 | { PCI_VENDOR_ID_OXSEMI, 0xc44b, /* OXPCIe200 1 Native UART */ | ||
2460 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, | ||
2461 | pbn_oxsemi_1_4000000 }, | ||
2462 | { PCI_VENDOR_ID_OXSEMI, 0xc44f, /* OXPCIe200 1 Native UART */ | ||
2463 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, | ||
2464 | pbn_oxsemi_1_4000000 }, | ||
2465 | { PCI_VENDOR_ID_OXSEMI, 0xc45b, /* OXPCIe200 1 Native UART */ | ||
2466 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, | ||
2467 | pbn_oxsemi_1_4000000 }, | ||
2468 | { PCI_VENDOR_ID_OXSEMI, 0xc45f, /* OXPCIe200 1 Native UART */ | ||
2469 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, | ||
2470 | pbn_oxsemi_1_4000000 }, | ||
2471 | { PCI_VENDOR_ID_OXSEMI, 0xc46b, /* OXPCIe200 1 Native UART */ | ||
2472 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, | ||
2473 | pbn_oxsemi_1_4000000 }, | ||
2474 | { PCI_VENDOR_ID_OXSEMI, 0xc46f, /* OXPCIe200 1 Native UART */ | ||
2475 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, | ||
2476 | pbn_oxsemi_1_4000000 }, | ||
2477 | { PCI_VENDOR_ID_OXSEMI, 0xc47b, /* OXPCIe200 1 Native UART */ | ||
2478 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, | ||
2479 | pbn_oxsemi_1_4000000 }, | ||
2480 | { PCI_VENDOR_ID_OXSEMI, 0xc47f, /* OXPCIe200 1 Native UART */ | ||
2481 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, | ||
2482 | pbn_oxsemi_1_4000000 }, | ||
2483 | { PCI_VENDOR_ID_OXSEMI, 0xc48b, /* OXPCIe200 1 Native UART */ | ||
2484 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, | ||
2485 | pbn_oxsemi_1_4000000 }, | ||
2486 | { PCI_VENDOR_ID_OXSEMI, 0xc48f, /* OXPCIe200 1 Native UART */ | ||
2487 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, | ||
2488 | pbn_oxsemi_1_4000000 }, | ||
2489 | { PCI_VENDOR_ID_OXSEMI, 0xc49b, /* OXPCIe200 1 Native UART */ | ||
2490 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, | ||
2491 | pbn_oxsemi_1_4000000 }, | ||
2492 | { PCI_VENDOR_ID_OXSEMI, 0xc49f, /* OXPCIe200 1 Native UART */ | ||
2493 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, | ||
2494 | pbn_oxsemi_1_4000000 }, | ||
2495 | { PCI_VENDOR_ID_OXSEMI, 0xc4ab, /* OXPCIe200 1 Native UART */ | ||
2496 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, | ||
2497 | pbn_oxsemi_1_4000000 }, | ||
2498 | { PCI_VENDOR_ID_OXSEMI, 0xc4af, /* OXPCIe200 1 Native UART */ | ||
2499 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, | ||
2500 | pbn_oxsemi_1_4000000 }, | ||
2501 | { PCI_VENDOR_ID_OXSEMI, 0xc4bb, /* OXPCIe200 1 Native UART */ | ||
2502 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, | ||
2503 | pbn_oxsemi_1_4000000 }, | ||
2504 | { PCI_VENDOR_ID_OXSEMI, 0xc4bf, /* OXPCIe200 1 Native UART */ | ||
2505 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, | ||
2506 | pbn_oxsemi_1_4000000 }, | ||
2507 | { PCI_VENDOR_ID_OXSEMI, 0xc4cb, /* OXPCIe200 1 Native UART */ | ||
2508 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, | ||
2509 | pbn_oxsemi_1_4000000 }, | ||
2510 | { PCI_VENDOR_ID_OXSEMI, 0xc4cf, /* OXPCIe200 1 Native UART */ | ||
2511 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, | ||
2512 | pbn_oxsemi_1_4000000 }, | ||
2513 | |||
2514 | /* | ||
2304 | * SBS Technologies, Inc. P-Octal and PMC-OCTPRO cards, | 2515 | * SBS Technologies, Inc. P-Octal and PMC-OCTPRO cards, |
2305 | * from skokodyn@yahoo.com | 2516 | * from skokodyn@yahoo.com |
2306 | */ | 2517 | */ |