linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Jiri Slaby <jslaby@suse.cz>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-serial <linux-serial@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Michael Ellerman <mpe@ellerman.id.au>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Paul Mackerras <paulus@samba.org>
Subject: Re: [PATCH 1/4] serial: pmac_zilog: remove unfinished DBDMA support
Date: Thu, 19 May 2022 11:56:54 +0300 (EEST)	[thread overview]
Message-ID: <2f7a739f-61b4-a1af-7c9b-70c5b93c6281@linux.intel.com> (raw)
In-Reply-To: <20220519075653.31356-1-jslaby@suse.cz>

On Thu, 19 May 2022, Jiri Slaby wrote:

> 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>
> ---
>  drivers/tty/serial/pmac_zilog.c | 38 +--------------------------------
>  drivers/tty/serial/pmac_zilog.h |  9 --------
>  2 files changed, 1 insertion(+), 46 deletions(-)
> 
> diff --git a/drivers/tty/serial/pmac_zilog.c b/drivers/tty/serial/pmac_zilog.c
> index c903085acb8d..2953ff64a892 100644
> --- a/drivers/tty/serial/pmac_zilog.c
> +++ b/drivers/tty/serial/pmac_zilog.c

How about dropping this too:
#include <asm/dbdma.h>

-- 
 i.


> @@ -65,9 +65,6 @@
>  
>  #include "pmac_zilog.h"
>  
> -/* Not yet implemented */
> -#undef HAS_DBDMA
> -
>  static char version[] __initdata = "pmac_zilog: 0.6 (Benjamin Herrenschmidt <benh@kernel.crashing.org>)";
>  MODULE_AUTHOR("Benjamin Herrenschmidt <benh@kernel.crashing.org>");
>  MODULE_DESCRIPTION("Driver for the Mac and PowerMac serial ports.");
> @@ -1399,7 +1396,7 @@ static int __init pmz_init_port(struct uart_pmac_port *uap)
>  		char	name[1];
>  	} *slots;
>  	int len;
> -	struct resource r_ports, r_rxdma, r_txdma;
> +	struct resource r_ports;
>  
>  	/*
>  	 * Request & map chip registers
> @@ -1411,35 +1408,6 @@ static int __init pmz_init_port(struct uart_pmac_port *uap)
>  
>  	uap->control_reg = uap->port.membase;
>  	uap->data_reg = uap->control_reg + 0x10;
> -	
> -	/*
> -	 * Request & map DBDMA registers
> -	 */
> -#ifdef HAS_DBDMA
> -	if (of_address_to_resource(np, 1, &r_txdma) == 0 &&
> -	    of_address_to_resource(np, 2, &r_rxdma) == 0)
> -		uap->flags |= PMACZILOG_FLAG_HAS_DMA;
> -#else
> -	memset(&r_txdma, 0, sizeof(struct resource));
> -	memset(&r_rxdma, 0, sizeof(struct resource));
> -#endif	
> -	if (ZS_HAS_DMA(uap)) {
> -		uap->tx_dma_regs = ioremap(r_txdma.start, 0x100);
> -		if (uap->tx_dma_regs == NULL) {	
> -			uap->flags &= ~PMACZILOG_FLAG_HAS_DMA;
> -			goto no_dma;
> -		}
> -		uap->rx_dma_regs = ioremap(r_rxdma.start, 0x100);
> -		if (uap->rx_dma_regs == NULL) {	
> -			iounmap(uap->tx_dma_regs);
> -			uap->tx_dma_regs = NULL;
> -			uap->flags &= ~PMACZILOG_FLAG_HAS_DMA;
> -			goto no_dma;
> -		}
> -		uap->tx_dma_irq = irq_of_parse_and_map(np, 1);
> -		uap->rx_dma_irq = irq_of_parse_and_map(np, 2);
> -	}
> -no_dma:
>  
>  	/*
>  	 * Detect port type
> @@ -1505,8 +1473,6 @@ static int __init pmz_init_port(struct uart_pmac_port *uap)
>  	    of_device_is_compatible(np->parent->parent, "gatwick")) {
>  		/* IRQs on gatwick are offset by 64 */
>  		uap->port.irq = irq_create_mapping(NULL, 64 + 15);
> -		uap->tx_dma_irq = irq_create_mapping(NULL, 64 + 4);
> -		uap->rx_dma_irq = irq_create_mapping(NULL, 64 + 5);
>  	}
>  
>  	/* Setup some valid baud rate information in the register
> @@ -1526,8 +1492,6 @@ static void pmz_dispose_port(struct uart_pmac_port *uap)
>  	struct device_node *np;
>  
>  	np = uap->node;
> -	iounmap(uap->rx_dma_regs);
> -	iounmap(uap->tx_dma_regs);
>  	iounmap(uap->control_reg);
>  	uap->node = NULL;
>  	of_node_put(np);
> diff --git a/drivers/tty/serial/pmac_zilog.h b/drivers/tty/serial/pmac_zilog.h
> index fa85b0de5c2f..87337b748d6d 100644
> --- a/drivers/tty/serial/pmac_zilog.h
> +++ b/drivers/tty/serial/pmac_zilog.h
> @@ -43,7 +43,6 @@ struct uart_pmac_port {
>  #define PMACZILOG_FLAG_TX_ACTIVE	0x00000040
>  #define PMACZILOG_FLAG_IS_IRDA		0x00000100
>  #define PMACZILOG_FLAG_IS_INTMODEM	0x00000200
> -#define PMACZILOG_FLAG_HAS_DMA		0x00000400
>  #define PMACZILOG_FLAG_RSRC_REQUESTED	0x00000800
>  #define PMACZILOG_FLAG_IS_OPEN		0x00002000
>  #define PMACZILOG_FLAG_IS_EXTCLK	0x00008000
> @@ -55,13 +54,6 @@ struct uart_pmac_port {
>  	volatile u8			__iomem *control_reg;
>  	volatile u8			__iomem *data_reg;
>  
> -#ifdef CONFIG_PPC_PMAC
> -	unsigned int			tx_dma_irq;
> -	unsigned int			rx_dma_irq;
> -	volatile struct dbdma_regs	__iomem *tx_dma_regs;
> -	volatile struct dbdma_regs	__iomem *rx_dma_regs;
> -#endif
> -
>  	unsigned char			irq_name[8];
>  
>  	struct ktermios			termios_cache;
> @@ -377,7 +369,6 @@ static inline void zssync(struct uart_pmac_port *port)
>  #define ZS_WANTS_MODEM_STATUS(UP)	((UP)->flags & PMACZILOG_FLAG_MODEM_STATUS)
>  #define ZS_IS_IRDA(UP)			((UP)->flags & PMACZILOG_FLAG_IS_IRDA)
>  #define ZS_IS_INTMODEM(UP)		((UP)->flags & PMACZILOG_FLAG_IS_INTMODEM)
> -#define ZS_HAS_DMA(UP)			((UP)->flags & PMACZILOG_FLAG_HAS_DMA)
>  #define ZS_IS_OPEN(UP)			((UP)->flags & PMACZILOG_FLAG_IS_OPEN)
>  #define ZS_IS_EXTCLK(UP)		((UP)->flags & PMACZILOG_FLAG_IS_EXTCLK)
>  
> 


  parent reply	other threads:[~2022-05-19  8:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-19  7:56 [PATCH 1/4] serial: pmac_zilog: remove unfinished DBDMA support Jiri Slaby
2022-05-19  7:56 ` [PATCH 2/4] serial: pmac_zilog: remove unused uart_pmac_port::termios_cache Jiri Slaby
2022-05-19  7:56 ` [PATCH 3/4] serial: pmac_zilog: remove tracing prints Jiri Slaby
2022-05-19  7:56 ` [PATCH 4/4] serial: pmac_zilog: remove initial print Jiri Slaby
2022-05-19  8:59   ` Ilpo Järvinen
2022-05-19  8:56 ` Ilpo Järvinen [this message]
2022-05-19  9:02   ` [PATCH 1/4] serial: pmac_zilog: remove unfinished DBDMA support Jiri Slaby
2022-05-19 16:23     ` Greg Kroah-Hartman

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=2f7a739f-61b4-a1af-7c9b-70c5b93c6281@linux.intel.com \
    --to=ilpo.jarvinen@linux.intel.com \
    --cc=benh@kernel.crashing.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jslaby@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=mpe@ellerman.id.au \
    --cc=paulus@samba.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).