Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

serial: pmac_zilog: remove unfinished DBDMA support

The support for DBDMA was never completed. Remove the the code that only
maps spaces without real work.

Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Link: https://lore.kernel.org/r/20220519075653.31356-1-jslaby@suse.cz
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Jiri Slaby and committed by
Greg Kroah-Hartman
a5ddc498 9bb13b2f

+1 -46
+1 -37
drivers/tty/serial/pmac_zilog.c
··· 65 65 66 66 #include "pmac_zilog.h" 67 67 68 - /* Not yet implemented */ 69 - #undef HAS_DBDMA 70 - 71 68 static char version[] __initdata = "pmac_zilog: 0.6 (Benjamin Herrenschmidt <benh@kernel.crashing.org>)"; 72 69 MODULE_AUTHOR("Benjamin Herrenschmidt <benh@kernel.crashing.org>"); 73 70 MODULE_DESCRIPTION("Driver for the Mac and PowerMac serial ports."); ··· 1396 1399 char name[1]; 1397 1400 } *slots; 1398 1401 int len; 1399 - struct resource r_ports, r_rxdma, r_txdma; 1402 + struct resource r_ports; 1400 1403 1401 1404 /* 1402 1405 * Request & map chip registers ··· 1408 1411 1409 1412 uap->control_reg = uap->port.membase; 1410 1413 uap->data_reg = uap->control_reg + 0x10; 1411 - 1412 - /* 1413 - * Request & map DBDMA registers 1414 - */ 1415 - #ifdef HAS_DBDMA 1416 - if (of_address_to_resource(np, 1, &r_txdma) == 0 && 1417 - of_address_to_resource(np, 2, &r_rxdma) == 0) 1418 - uap->flags |= PMACZILOG_FLAG_HAS_DMA; 1419 - #else 1420 - memset(&r_txdma, 0, sizeof(struct resource)); 1421 - memset(&r_rxdma, 0, sizeof(struct resource)); 1422 - #endif 1423 - if (ZS_HAS_DMA(uap)) { 1424 - uap->tx_dma_regs = ioremap(r_txdma.start, 0x100); 1425 - if (uap->tx_dma_regs == NULL) { 1426 - uap->flags &= ~PMACZILOG_FLAG_HAS_DMA; 1427 - goto no_dma; 1428 - } 1429 - uap->rx_dma_regs = ioremap(r_rxdma.start, 0x100); 1430 - if (uap->rx_dma_regs == NULL) { 1431 - iounmap(uap->tx_dma_regs); 1432 - uap->tx_dma_regs = NULL; 1433 - uap->flags &= ~PMACZILOG_FLAG_HAS_DMA; 1434 - goto no_dma; 1435 - } 1436 - uap->tx_dma_irq = irq_of_parse_and_map(np, 1); 1437 - uap->rx_dma_irq = irq_of_parse_and_map(np, 2); 1438 - } 1439 - no_dma: 1440 1414 1441 1415 /* 1442 1416 * Detect port type ··· 1473 1505 of_device_is_compatible(np->parent->parent, "gatwick")) { 1474 1506 /* IRQs on gatwick are offset by 64 */ 1475 1507 uap->port.irq = irq_create_mapping(NULL, 64 + 15); 1476 - uap->tx_dma_irq = irq_create_mapping(NULL, 64 + 4); 1477 - uap->rx_dma_irq = irq_create_mapping(NULL, 64 + 5); 1478 1508 } 1479 1509 1480 1510 /* Setup some valid baud rate information in the register ··· 1492 1526 struct device_node *np; 1493 1527 1494 1528 np = uap->node; 1495 - iounmap(uap->rx_dma_regs); 1496 - iounmap(uap->tx_dma_regs); 1497 1529 iounmap(uap->control_reg); 1498 1530 uap->node = NULL; 1499 1531 of_node_put(np);
-9
drivers/tty/serial/pmac_zilog.h
··· 43 43 #define PMACZILOG_FLAG_TX_ACTIVE 0x00000040 44 44 #define PMACZILOG_FLAG_IS_IRDA 0x00000100 45 45 #define PMACZILOG_FLAG_IS_INTMODEM 0x00000200 46 - #define PMACZILOG_FLAG_HAS_DMA 0x00000400 47 46 #define PMACZILOG_FLAG_RSRC_REQUESTED 0x00000800 48 47 #define PMACZILOG_FLAG_IS_OPEN 0x00002000 49 48 #define PMACZILOG_FLAG_IS_EXTCLK 0x00008000 ··· 53 54 54 55 volatile u8 __iomem *control_reg; 55 56 volatile u8 __iomem *data_reg; 56 - 57 - #ifdef CONFIG_PPC_PMAC 58 - unsigned int tx_dma_irq; 59 - unsigned int rx_dma_irq; 60 - volatile struct dbdma_regs __iomem *tx_dma_regs; 61 - volatile struct dbdma_regs __iomem *rx_dma_regs; 62 - #endif 63 57 64 58 unsigned char irq_name[8]; 65 59 ··· 369 377 #define ZS_WANTS_MODEM_STATUS(UP) ((UP)->flags & PMACZILOG_FLAG_MODEM_STATUS) 370 378 #define ZS_IS_IRDA(UP) ((UP)->flags & PMACZILOG_FLAG_IS_IRDA) 371 379 #define ZS_IS_INTMODEM(UP) ((UP)->flags & PMACZILOG_FLAG_IS_INTMODEM) 372 - #define ZS_HAS_DMA(UP) ((UP)->flags & PMACZILOG_FLAG_HAS_DMA) 373 380 #define ZS_IS_OPEN(UP) ((UP)->flags & PMACZILOG_FLAG_IS_OPEN) 374 381 #define ZS_IS_EXTCLK(UP) ((UP)->flags & PMACZILOG_FLAG_IS_EXTCLK) 375 382