Skip to content

Commit 6bb5d75

Browse files
andy-shevgregkh
authored andcommitted
serial: 8250_lpss: move Quark code from PCI driver
Intel Quark has DesignWare UART. Move the code from 8250_pci to 8250_lpss. Reviewed-by: Bryan O'Donoghue <[email protected]> Signed-off-by: Andy Shevchenko <[email protected]> Tested-by: Bryan O'Donoghue <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent a13e19c commit 6bb5d75

File tree

3 files changed

+13
-14
lines changed

3 files changed

+13
-14
lines changed

drivers/tty/serial/8250/8250_lpss.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919

2020
#include "8250.h"
2121

22+
#define PCI_DEVICE_ID_INTEL_QRK_UARTx 0x0936
23+
2224
#define PCI_DEVICE_ID_INTEL_BYT_UART1 0x0f0a
2325
#define PCI_DEVICE_ID_INTEL_BYT_UART2 0x0f0c
2426

@@ -166,6 +168,9 @@ static int lpss8250_dma_setup(struct lpss8250 *lpss, struct uart_8250_port *port
166168
struct dw_dma_slave *rx_param, *tx_param;
167169
struct device *dev = port->port.dev;
168170

171+
if (!lpss->dma_param.dma_dev)
172+
return 0;
173+
169174
rx_param = devm_kzalloc(dev, sizeof(*rx_param), GFP_KERNEL);
170175
if (!rx_param)
171176
return -ENOMEM;
@@ -253,9 +258,15 @@ static const struct lpss8250_board byt_board = {
253258
.setup = byt_serial_setup,
254259
};
255260

261+
static const struct lpss8250_board qrk_board = {
262+
.freq = 44236800,
263+
.base_baud = 2764800,
264+
};
265+
256266
#define LPSS_DEVICE(id, board) { PCI_VDEVICE(INTEL, id), (kernel_ulong_t)&board }
257267

258268
static const struct pci_device_id pci_ids[] = {
269+
LPSS_DEVICE(PCI_DEVICE_ID_INTEL_QRK_UARTx, qrk_board),
259270
LPSS_DEVICE(PCI_DEVICE_ID_INTEL_BYT_UART1, byt_board),
260271
LPSS_DEVICE(PCI_DEVICE_ID_INTEL_BYT_UART2, byt_board),
261272
LPSS_DEVICE(PCI_DEVICE_ID_INTEL_BSW_UART1, byt_board),

drivers/tty/serial/8250/8250_pci.c

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1776,7 +1776,6 @@ pci_wch_ch38x_setup(struct serial_private *priv,
17761776
#define PCI_DEVICE_ID_COMMTECH_4222PCIE 0x0022
17771777
#define PCI_DEVICE_ID_BROADCOM_TRUMANAGE 0x160a
17781778
#define PCI_DEVICE_ID_AMCC_ADDIDATA_APCI7800 0x818e
1779-
#define PCI_DEVICE_ID_INTEL_QRK_UART 0x0936
17801779

17811780
#define PCI_VENDOR_ID_SUNIX 0x1fd4
17821781
#define PCI_DEVICE_ID_SUNIX_1999 0x1999
@@ -2755,7 +2754,6 @@ enum pci_board_num_t {
27552754
pbn_ADDIDATA_PCIe_4_3906250,
27562755
pbn_ADDIDATA_PCIe_8_3906250,
27572756
pbn_ce4100_1_115200,
2758-
pbn_qrk,
27592757
pbn_omegapci,
27602758
pbn_NETMOS9900_2s_115200,
27612759
pbn_brcm_trumanage,
@@ -3531,12 +3529,6 @@ static struct pciserial_board pci_boards[] = {
35313529
.base_baud = 921600,
35323530
.reg_shift = 2,
35333531
},
3534-
[pbn_qrk] = {
3535-
.flags = FL_BASE0,
3536-
.num_ports = 1,
3537-
.base_baud = 2764800,
3538-
.reg_shift = 2,
3539-
},
35403532
[pbn_omegapci] = {
35413533
.flags = FL_BASE0,
35423534
.num_ports = 8,
@@ -3650,6 +3642,7 @@ static const struct pci_device_id blacklist[] = {
36503642
{ PCI_VDEVICE(INTEL, 0x19d8), },
36513643

36523644
/* Intel platforms with DesignWare UART */
3645+
{ PCI_VDEVICE(INTEL, 0x0936), },
36533646
{ PCI_VDEVICE(INTEL, 0x0f0a), },
36543647
{ PCI_VDEVICE(INTEL, 0x0f0c), },
36553648
{ PCI_VDEVICE(INTEL, 0x228a), },
@@ -5322,12 +5315,6 @@ static struct pci_device_id serial_pci_tbl[] = {
53225315
PCI_ANY_ID, PCI_ANY_ID, 0, 0,
53235316
pbn_ce4100_1_115200 },
53245317

5325-
/*
5326-
* Intel Quark x1000
5327-
*/
5328-
{ PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_QRK_UART,
5329-
PCI_ANY_ID, PCI_ANY_ID, 0, 0,
5330-
pbn_qrk },
53315318
/*
53325319
* Cronyx Omega PCI
53335320
*/

drivers/tty/serial/8250/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,7 @@ config SERIAL_8250_LPSS
415415
present on the UART found on various Intel platforms such as:
416416
- Intel Baytrail SoC
417417
- Intel Braswell SoC
418+
- Intel Quark X1000 SoC
418419

419420
config SERIAL_8250_MID
420421
tristate "Support for serial ports on Intel MID platforms" if EXPERT

0 commit comments

Comments
 (0)