Commit 9a903d42 authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] pmac_zilog iomem annotations

Signed-off-by: default avatarAl Viro <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 969baba1
...@@ -1439,7 +1439,7 @@ static int __init pmz_init_port(struct uart_pmac_port *uap) ...@@ -1439,7 +1439,7 @@ static int __init pmz_init_port(struct uart_pmac_port *uap)
uap->port.mapbase = np->addrs[0].address; uap->port.mapbase = np->addrs[0].address;
uap->port.membase = ioremap(uap->port.mapbase, 0x1000); uap->port.membase = ioremap(uap->port.mapbase, 0x1000);
uap->control_reg = (volatile u8 *)uap->port.membase; uap->control_reg = uap->port.membase;
uap->data_reg = uap->control_reg + 0x10; uap->data_reg = uap->control_reg + 0x10;
/* /*
...@@ -1450,16 +1450,14 @@ static int __init pmz_init_port(struct uart_pmac_port *uap) ...@@ -1450,16 +1450,14 @@ static int __init pmz_init_port(struct uart_pmac_port *uap)
uap->flags |= PMACZILOG_FLAG_HAS_DMA; uap->flags |= PMACZILOG_FLAG_HAS_DMA;
#endif #endif
if (ZS_HAS_DMA(uap)) { if (ZS_HAS_DMA(uap)) {
uap->tx_dma_regs = (volatile struct dbdma_regs *) uap->tx_dma_regs = ioremap(np->addrs[np->n_addrs - 2].address, 0x1000);
ioremap(np->addrs[np->n_addrs - 2].address, 0x1000);
if (uap->tx_dma_regs == NULL) { if (uap->tx_dma_regs == NULL) {
uap->flags &= ~PMACZILOG_FLAG_HAS_DMA; uap->flags &= ~PMACZILOG_FLAG_HAS_DMA;
goto no_dma; goto no_dma;
} }
uap->rx_dma_regs = (volatile struct dbdma_regs *) uap->rx_dma_regs = ioremap(np->addrs[np->n_addrs - 1].address, 0x1000);
ioremap(np->addrs[np->n_addrs - 1].address, 0x1000);
if (uap->rx_dma_regs == NULL) { if (uap->rx_dma_regs == NULL) {
iounmap((void *)uap->tx_dma_regs); iounmap(uap->tx_dma_regs);
uap->tx_dma_regs = NULL; uap->tx_dma_regs = NULL;
uap->flags &= ~PMACZILOG_FLAG_HAS_DMA; uap->flags &= ~PMACZILOG_FLAG_HAS_DMA;
goto no_dma; goto no_dma;
...@@ -1536,9 +1534,9 @@ static void pmz_dispose_port(struct uart_pmac_port *uap) ...@@ -1536,9 +1534,9 @@ static void pmz_dispose_port(struct uart_pmac_port *uap)
struct device_node *np; struct device_node *np;
np = uap->node; np = uap->node;
iounmap((void *)uap->rx_dma_regs); iounmap(uap->rx_dma_regs);
iounmap((void *)uap->tx_dma_regs); iounmap(uap->tx_dma_regs);
iounmap((void *)uap->control_reg); iounmap(uap->control_reg);
uap->node = NULL; uap->node = NULL;
of_node_put(np); of_node_put(np);
memset(uap, 0, sizeof(struct uart_pmac_port)); memset(uap, 0, sizeof(struct uart_pmac_port));
......
...@@ -52,13 +52,13 @@ struct uart_pmac_port { ...@@ -52,13 +52,13 @@ struct uart_pmac_port {
unsigned char parity_mask; unsigned char parity_mask;
unsigned char prev_status; unsigned char prev_status;
volatile u8 *control_reg; volatile u8 __iomem *control_reg;
volatile u8 *data_reg; volatile u8 __iomem *data_reg;
unsigned int tx_dma_irq; unsigned int tx_dma_irq;
unsigned int rx_dma_irq; unsigned int rx_dma_irq;
volatile struct dbdma_regs *tx_dma_regs; volatile struct dbdma_regs __iomem *tx_dma_regs;
volatile struct dbdma_regs *rx_dma_regs; volatile struct dbdma_regs __iomem *rx_dma_regs;
struct termios termios_cache; struct termios termios_cache;
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment