Commit 912c5dae authored by David Woodhouse's avatar David Woodhouse

Update CPM UART driver according to feedback from Dan Malek.

Patch from Pantelis Antoniou <panto@intracom.gr>
parent 3a71cfd5
...@@ -26,6 +26,8 @@ ...@@ -26,6 +26,8 @@
#endif #endif
#define IS_SMC(pinfo) (pinfo->flags & FLAG_SMC) #define IS_SMC(pinfo) (pinfo->flags & FLAG_SMC)
#define IS_DISCARDING(pinfo) (pinfo->flags & FLAG_DISCARDING)
#define FLAG_DISCARDING 0x00000004 /* when set, don't discard */
#define FLAG_SMC 0x00000002 #define FLAG_SMC 0x00000002
#define FLAG_CONSOLE 0x00000001 #define FLAG_CONSOLE 0x00000001
...@@ -50,7 +52,7 @@ struct uart_cpm_port { ...@@ -50,7 +52,7 @@ struct uart_cpm_port {
u16 tx_nrfifos; u16 tx_nrfifos;
u16 tx_fifosize; u16 tx_fifosize;
smc_t *smcp; smc_t *smcp;
volatile smc_uart_t *smcup; smc_uart_t *smcup;
scc_t *sccp; scc_t *sccp;
scc_uart_t *sccup; scc_uart_t *sccup;
volatile cbd_t *rx_bd_base; volatile cbd_t *rx_bd_base;
...@@ -60,11 +62,12 @@ struct uart_cpm_port { ...@@ -60,11 +62,12 @@ struct uart_cpm_port {
unsigned char *tx_buf; unsigned char *tx_buf;
unsigned char *rx_buf; unsigned char *rx_buf;
u32 flags; u32 flags;
void (*set_lineif) (struct uart_cpm_port *); void (*set_lineif)(struct uart_cpm_port *);
u8 brg; u8 brg;
uint dp_addr; uint dp_addr;
void *mem_addr; void *mem_addr;
dma_addr_t dma_addr; dma_addr_t dma_addr;
/* helpers */
int baud; int baud;
int bits; int bits;
}; };
...@@ -74,16 +77,16 @@ extern int cpm_uart_nr; ...@@ -74,16 +77,16 @@ extern int cpm_uart_nr;
extern struct uart_cpm_port cpm_uart_ports[UART_NR]; extern struct uart_cpm_port cpm_uart_ports[UART_NR];
/* these are located in their respective files */ /* these are located in their respective files */
extern void cpm_line_cr_cmd(int line, int cmd); void cpm_line_cr_cmd(int line, int cmd);
extern int cpm_uart_init_portdesc(void); int cpm_uart_init_portdesc(void);
extern int cpm_uart_allocbuf(struct uart_cpm_port *pinfo, unsigned int is_con); int cpm_uart_allocbuf(struct uart_cpm_port *pinfo, unsigned int is_con);
extern void cpm_uart_freebuf(struct uart_cpm_port *pinfo); void cpm_uart_freebuf(struct uart_cpm_port *pinfo);
extern void smc1_lineif(struct uart_cpm_port *pinfo); void smc1_lineif(struct uart_cpm_port *pinfo);
extern void smc2_lineif(struct uart_cpm_port *pinfo); void smc2_lineif(struct uart_cpm_port *pinfo);
extern void scc1_lineif(struct uart_cpm_port *pinfo); void scc1_lineif(struct uart_cpm_port *pinfo);
extern void scc2_lineif(struct uart_cpm_port *pinfo); void scc2_lineif(struct uart_cpm_port *pinfo);
extern void scc3_lineif(struct uart_cpm_port *pinfo); void scc3_lineif(struct uart_cpm_port *pinfo);
extern void scc4_lineif(struct uart_cpm_port *pinfo); void scc4_lineif(struct uart_cpm_port *pinfo);
#endif /* CPM_UART_H */ #endif /* CPM_UART_H */
This diff is collapsed.
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