diff options
author | Finn Thain <fthain@telegraphics.com.au> | 2009-11-17 04:04:44 -0500 |
---|---|---|
committer | Geert Uytterhoeven <geert@linux-m68k.org> | 2010-02-27 12:31:02 -0500 |
commit | ec9cbe09899e36b5f216c3232215520dcf0320ab (patch) | |
tree | 7960e72bdad982d7dd18cab1e49ae3ca42d1a5a0 /drivers/serial/pmac_zilog.h | |
parent | 1f7b5fff505232521a7a770a639b63cd17636549 (diff) |
pmac-zilog: add platform driver
Add platform driver support to the pmac-zilog driver, for m68k macs.
Place the powermac-specific code inside #ifdef CONFIG_PPC_PMAC.
Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Diffstat (limited to 'drivers/serial/pmac_zilog.h')
-rw-r--r-- | drivers/serial/pmac_zilog.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/serial/pmac_zilog.h b/drivers/serial/pmac_zilog.h index f18c426324a4..cbc34fbb1b20 100644 --- a/drivers/serial/pmac_zilog.h +++ b/drivers/serial/pmac_zilog.h | |||
@@ -1,7 +1,15 @@ | |||
1 | #ifndef __PMAC_ZILOG_H__ | 1 | #ifndef __PMAC_ZILOG_H__ |
2 | #define __PMAC_ZILOG_H__ | 2 | #define __PMAC_ZILOG_H__ |
3 | 3 | ||
4 | #ifdef CONFIG_PPC_PMAC | ||
4 | #define pmz_debug(fmt, arg...) dev_dbg(&uap->dev->ofdev.dev, fmt, ## arg) | 5 | #define pmz_debug(fmt, arg...) dev_dbg(&uap->dev->ofdev.dev, fmt, ## arg) |
6 | #define pmz_error(fmt, arg...) dev_err(&uap->dev->ofdev.dev, fmt, ## arg) | ||
7 | #define pmz_info(fmt, arg...) dev_info(&uap->dev->ofdev.dev, fmt, ## arg) | ||
8 | #else | ||
9 | #define pmz_debug(fmt, arg...) dev_dbg(&uap->node->dev, fmt, ## arg) | ||
10 | #define pmz_error(fmt, arg...) dev_err(&uap->node->dev, fmt, ## arg) | ||
11 | #define pmz_info(fmt, arg...) dev_info(&uap->node->dev, fmt, ## arg) | ||
12 | #endif | ||
5 | 13 | ||
6 | /* | 14 | /* |
7 | * At most 2 ESCCs with 2 ports each | 15 | * At most 2 ESCCs with 2 ports each |
@@ -17,6 +25,7 @@ struct uart_pmac_port { | |||
17 | struct uart_port port; | 25 | struct uart_port port; |
18 | struct uart_pmac_port *mate; | 26 | struct uart_pmac_port *mate; |
19 | 27 | ||
28 | #ifdef CONFIG_PPC_PMAC | ||
20 | /* macio_dev for the escc holding this port (maybe be null on | 29 | /* macio_dev for the escc holding this port (maybe be null on |
21 | * early inited port) | 30 | * early inited port) |
22 | */ | 31 | */ |
@@ -25,6 +34,9 @@ struct uart_pmac_port { | |||
25 | * of "escc" node (ie. ch-a or ch-b) | 34 | * of "escc" node (ie. ch-a or ch-b) |
26 | */ | 35 | */ |
27 | struct device_node *node; | 36 | struct device_node *node; |
37 | #else | ||
38 | struct platform_device *node; | ||
39 | #endif | ||
28 | 40 | ||
29 | /* Port type as obtained from device tree (IRDA, modem, ...) */ | 41 | /* Port type as obtained from device tree (IRDA, modem, ...) */ |
30 | int port_type; | 42 | int port_type; |
@@ -55,10 +67,12 @@ struct uart_pmac_port { | |||
55 | volatile u8 __iomem *control_reg; | 67 | volatile u8 __iomem *control_reg; |
56 | volatile u8 __iomem *data_reg; | 68 | volatile u8 __iomem *data_reg; |
57 | 69 | ||
70 | #ifdef CONFIG_PPC_PMAC | ||
58 | unsigned int tx_dma_irq; | 71 | unsigned int tx_dma_irq; |
59 | unsigned int rx_dma_irq; | 72 | unsigned int rx_dma_irq; |
60 | volatile struct dbdma_regs __iomem *tx_dma_regs; | 73 | volatile struct dbdma_regs __iomem *tx_dma_regs; |
61 | volatile struct dbdma_regs __iomem *rx_dma_regs; | 74 | volatile struct dbdma_regs __iomem *rx_dma_regs; |
75 | #endif | ||
62 | 76 | ||
63 | struct ktermios termios_cache; | 77 | struct ktermios termios_cache; |
64 | }; | 78 | }; |