diff options
author | Alan Cox <alan@lxorguk.ukuu.org.uk> | 2008-08-04 12:21:18 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-08-04 20:12:07 -0400 |
commit | d7283353221e73a793847252d063ff9186885160 (patch) | |
tree | d48705f707d4fa429dfcfcd079208bf9e60ae090 /drivers/serial | |
parent | b1cbefe5d5fc2d4a6109961d914027172ce8e152 (diff) |
cris: Fixup compile problems
It now compiles with the tty changes but isn't tested (which has to be
better than not compiling..
Closes bug #11218
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/serial')
-rw-r--r-- | drivers/serial/crisv10.c | 79 | ||||
-rw-r--r-- | drivers/serial/crisv10.h | 3 |
2 files changed, 42 insertions, 40 deletions
diff --git a/drivers/serial/crisv10.c b/drivers/serial/crisv10.c index 8249ac490559..bf94a770bb44 100644 --- a/drivers/serial/crisv10.c +++ b/drivers/serial/crisv10.c | |||
@@ -234,7 +234,7 @@ unsigned long r_alt_ser_baudrate_shadow = 0; | |||
234 | 234 | ||
235 | static struct e100_serial rs_table[] = { | 235 | static struct e100_serial rs_table[] = { |
236 | { .baud = DEF_BAUD, | 236 | { .baud = DEF_BAUD, |
237 | .port = (unsigned char *)R_SERIAL0_CTRL, | 237 | .ioport = (unsigned char *)R_SERIAL0_CTRL, |
238 | .irq = 1U << 12, /* uses DMA 6 and 7 */ | 238 | .irq = 1U << 12, /* uses DMA 6 and 7 */ |
239 | .oclrintradr = R_DMA_CH6_CLR_INTR, | 239 | .oclrintradr = R_DMA_CH6_CLR_INTR, |
240 | .ofirstadr = R_DMA_CH6_FIRST, | 240 | .ofirstadr = R_DMA_CH6_FIRST, |
@@ -288,7 +288,7 @@ static struct e100_serial rs_table[] = { | |||
288 | }, /* ttyS0 */ | 288 | }, /* ttyS0 */ |
289 | #ifndef CONFIG_SVINTO_SIM | 289 | #ifndef CONFIG_SVINTO_SIM |
290 | { .baud = DEF_BAUD, | 290 | { .baud = DEF_BAUD, |
291 | .port = (unsigned char *)R_SERIAL1_CTRL, | 291 | .ioport = (unsigned char *)R_SERIAL1_CTRL, |
292 | .irq = 1U << 16, /* uses DMA 8 and 9 */ | 292 | .irq = 1U << 16, /* uses DMA 8 and 9 */ |
293 | .oclrintradr = R_DMA_CH8_CLR_INTR, | 293 | .oclrintradr = R_DMA_CH8_CLR_INTR, |
294 | .ofirstadr = R_DMA_CH8_FIRST, | 294 | .ofirstadr = R_DMA_CH8_FIRST, |
@@ -344,7 +344,7 @@ static struct e100_serial rs_table[] = { | |||
344 | }, /* ttyS1 */ | 344 | }, /* ttyS1 */ |
345 | 345 | ||
346 | { .baud = DEF_BAUD, | 346 | { .baud = DEF_BAUD, |
347 | .port = (unsigned char *)R_SERIAL2_CTRL, | 347 | .ioport = (unsigned char *)R_SERIAL2_CTRL, |
348 | .irq = 1U << 4, /* uses DMA 2 and 3 */ | 348 | .irq = 1U << 4, /* uses DMA 2 and 3 */ |
349 | .oclrintradr = R_DMA_CH2_CLR_INTR, | 349 | .oclrintradr = R_DMA_CH2_CLR_INTR, |
350 | .ofirstadr = R_DMA_CH2_FIRST, | 350 | .ofirstadr = R_DMA_CH2_FIRST, |
@@ -398,7 +398,7 @@ static struct e100_serial rs_table[] = { | |||
398 | }, /* ttyS2 */ | 398 | }, /* ttyS2 */ |
399 | 399 | ||
400 | { .baud = DEF_BAUD, | 400 | { .baud = DEF_BAUD, |
401 | .port = (unsigned char *)R_SERIAL3_CTRL, | 401 | .ioport = (unsigned char *)R_SERIAL3_CTRL, |
402 | .irq = 1U << 8, /* uses DMA 4 and 5 */ | 402 | .irq = 1U << 8, /* uses DMA 4 and 5 */ |
403 | .oclrintradr = R_DMA_CH4_CLR_INTR, | 403 | .oclrintradr = R_DMA_CH4_CLR_INTR, |
404 | .ofirstadr = R_DMA_CH4_FIRST, | 404 | .ofirstadr = R_DMA_CH4_FIRST, |
@@ -939,7 +939,7 @@ static const struct control_pins e100_modem_pins[NR_PORTS] = | |||
939 | /* Output */ | 939 | /* Output */ |
940 | #define E100_RTS_GET(info) ((info)->rx_ctrl & E100_RTS_MASK) | 940 | #define E100_RTS_GET(info) ((info)->rx_ctrl & E100_RTS_MASK) |
941 | /* Input */ | 941 | /* Input */ |
942 | #define E100_CTS_GET(info) ((info)->port[REG_STATUS] & E100_CTS_MASK) | 942 | #define E100_CTS_GET(info) ((info)->ioport[REG_STATUS] & E100_CTS_MASK) |
943 | 943 | ||
944 | /* These are typically PA or PB and 0 means 0V, 1 means 3.3V */ | 944 | /* These are typically PA or PB and 0 means 0V, 1 means 3.3V */ |
945 | /* Is an output */ | 945 | /* Is an output */ |
@@ -1092,7 +1092,7 @@ e100_rts(struct e100_serial *info, int set) | |||
1092 | local_irq_save(flags); | 1092 | local_irq_save(flags); |
1093 | info->rx_ctrl &= ~E100_RTS_MASK; | 1093 | info->rx_ctrl &= ~E100_RTS_MASK; |
1094 | info->rx_ctrl |= (set ? 0 : E100_RTS_MASK); /* RTS is active low */ | 1094 | info->rx_ctrl |= (set ? 0 : E100_RTS_MASK); /* RTS is active low */ |
1095 | info->port[REG_REC_CTRL] = info->rx_ctrl; | 1095 | info->ioport[REG_REC_CTRL] = info->rx_ctrl; |
1096 | local_irq_restore(flags); | 1096 | local_irq_restore(flags); |
1097 | #ifdef SERIAL_DEBUG_IO | 1097 | #ifdef SERIAL_DEBUG_IO |
1098 | printk("ser%i rts %i\n", info->line, set); | 1098 | printk("ser%i rts %i\n", info->line, set); |
@@ -1142,7 +1142,7 @@ e100_disable_rx(struct e100_serial *info) | |||
1142 | { | 1142 | { |
1143 | #ifndef CONFIG_SVINTO_SIM | 1143 | #ifndef CONFIG_SVINTO_SIM |
1144 | /* disable the receiver */ | 1144 | /* disable the receiver */ |
1145 | info->port[REG_REC_CTRL] = | 1145 | info->ioport[REG_REC_CTRL] = |
1146 | (info->rx_ctrl &= ~IO_MASK(R_SERIAL0_REC_CTRL, rec_enable)); | 1146 | (info->rx_ctrl &= ~IO_MASK(R_SERIAL0_REC_CTRL, rec_enable)); |
1147 | #endif | 1147 | #endif |
1148 | } | 1148 | } |
@@ -1152,7 +1152,7 @@ e100_enable_rx(struct e100_serial *info) | |||
1152 | { | 1152 | { |
1153 | #ifndef CONFIG_SVINTO_SIM | 1153 | #ifndef CONFIG_SVINTO_SIM |
1154 | /* enable the receiver */ | 1154 | /* enable the receiver */ |
1155 | info->port[REG_REC_CTRL] = | 1155 | info->ioport[REG_REC_CTRL] = |
1156 | (info->rx_ctrl |= IO_MASK(R_SERIAL0_REC_CTRL, rec_enable)); | 1156 | (info->rx_ctrl |= IO_MASK(R_SERIAL0_REC_CTRL, rec_enable)); |
1157 | #endif | 1157 | #endif |
1158 | } | 1158 | } |
@@ -1490,7 +1490,7 @@ rs_stop(struct tty_struct *tty) | |||
1490 | xoff |= IO_STATE(R_SERIAL0_XOFF, auto_xoff, enable); | 1490 | xoff |= IO_STATE(R_SERIAL0_XOFF, auto_xoff, enable); |
1491 | } | 1491 | } |
1492 | 1492 | ||
1493 | *((unsigned long *)&info->port[REG_XOFF]) = xoff; | 1493 | *((unsigned long *)&info->ioport[REG_XOFF]) = xoff; |
1494 | local_irq_restore(flags); | 1494 | local_irq_restore(flags); |
1495 | } | 1495 | } |
1496 | } | 1496 | } |
@@ -1513,7 +1513,7 @@ rs_start(struct tty_struct *tty) | |||
1513 | xoff |= IO_STATE(R_SERIAL0_XOFF, auto_xoff, enable); | 1513 | xoff |= IO_STATE(R_SERIAL0_XOFF, auto_xoff, enable); |
1514 | } | 1514 | } |
1515 | 1515 | ||
1516 | *((unsigned long *)&info->port[REG_XOFF]) = xoff; | 1516 | *((unsigned long *)&info->ioport[REG_XOFF]) = xoff; |
1517 | if (!info->uses_dma_out && | 1517 | if (!info->uses_dma_out && |
1518 | info->xmit.head != info->xmit.tail && info->xmit.buf) | 1518 | info->xmit.head != info->xmit.tail && info->xmit.buf) |
1519 | e100_enable_serial_tx_ready_irq(info); | 1519 | e100_enable_serial_tx_ready_irq(info); |
@@ -1888,7 +1888,7 @@ static void receive_chars_dma(struct e100_serial *info) | |||
1888 | handle_all_descr_data(info); | 1888 | handle_all_descr_data(info); |
1889 | 1889 | ||
1890 | /* Read the status register to detect errors */ | 1890 | /* Read the status register to detect errors */ |
1891 | rstat = info->port[REG_STATUS]; | 1891 | rstat = info->ioport[REG_STATUS]; |
1892 | if (rstat & IO_MASK(R_SERIAL0_STATUS, xoff_detect) ) { | 1892 | if (rstat & IO_MASK(R_SERIAL0_STATUS, xoff_detect) ) { |
1893 | DFLOW(DEBUG_LOG(info->line, "XOFF detect stat %x\n", rstat)); | 1893 | DFLOW(DEBUG_LOG(info->line, "XOFF detect stat %x\n", rstat)); |
1894 | } | 1894 | } |
@@ -1897,7 +1897,7 @@ static void receive_chars_dma(struct e100_serial *info) | |||
1897 | /* If we got an error, we must reset it by reading the | 1897 | /* If we got an error, we must reset it by reading the |
1898 | * data_in field | 1898 | * data_in field |
1899 | */ | 1899 | */ |
1900 | unsigned char data = info->port[REG_DATA]; | 1900 | unsigned char data = info->ioport[REG_DATA]; |
1901 | 1901 | ||
1902 | PROCSTAT(ser_stat[info->line].errors_cnt++); | 1902 | PROCSTAT(ser_stat[info->line].errors_cnt++); |
1903 | DEBUG_LOG(info->line, "#dERR: s d 0x%04X\n", | 1903 | DEBUG_LOG(info->line, "#dERR: s d 0x%04X\n", |
@@ -2077,7 +2077,7 @@ static int force_eop_if_needed(struct e100_serial *info) | |||
2077 | /* We check data_avail bit to determine if data has | 2077 | /* We check data_avail bit to determine if data has |
2078 | * arrived since last time | 2078 | * arrived since last time |
2079 | */ | 2079 | */ |
2080 | unsigned char rstat = info->port[REG_STATUS]; | 2080 | unsigned char rstat = info->ioport[REG_STATUS]; |
2081 | 2081 | ||
2082 | /* error or datavail? */ | 2082 | /* error or datavail? */ |
2083 | if (rstat & SER_ERROR_MASK) { | 2083 | if (rstat & SER_ERROR_MASK) { |
@@ -2096,7 +2096,7 @@ static int force_eop_if_needed(struct e100_serial *info) | |||
2096 | TIMERD(DEBUG_LOG(info->line, "timeout: rstat 0x%03X\n", | 2096 | TIMERD(DEBUG_LOG(info->line, "timeout: rstat 0x%03X\n", |
2097 | rstat | (info->line << 8))); | 2097 | rstat | (info->line << 8))); |
2098 | /* Read data to clear status flags */ | 2098 | /* Read data to clear status flags */ |
2099 | (void)info->port[REG_DATA]; | 2099 | (void)info->ioport[REG_DATA]; |
2100 | 2100 | ||
2101 | info->forced_eop = 0; | 2101 | info->forced_eop = 0; |
2102 | START_FLUSH_FAST_TIMER(info, "magic"); | 2102 | START_FLUSH_FAST_TIMER(info, "magic"); |
@@ -2296,7 +2296,7 @@ struct e100_serial * handle_ser_rx_interrupt_no_dma(struct e100_serial *info) | |||
2296 | } | 2296 | } |
2297 | 2297 | ||
2298 | /* Read data and status at the same time */ | 2298 | /* Read data and status at the same time */ |
2299 | data_read = *((unsigned long *)&info->port[REG_DATA_STATUS32]); | 2299 | data_read = *((unsigned long *)&info->ioport[REG_DATA_STATUS32]); |
2300 | more_data: | 2300 | more_data: |
2301 | if (data_read & IO_MASK(R_SERIAL0_READ, xoff_detect) ) { | 2301 | if (data_read & IO_MASK(R_SERIAL0_READ, xoff_detect) ) { |
2302 | DFLOW(DEBUG_LOG(info->line, "XOFF detect\n", 0)); | 2302 | DFLOW(DEBUG_LOG(info->line, "XOFF detect\n", 0)); |
@@ -2391,7 +2391,7 @@ more_data: | |||
2391 | 2391 | ||
2392 | 2392 | ||
2393 | info->icount.rx++; | 2393 | info->icount.rx++; |
2394 | data_read = *((unsigned long *)&info->port[REG_DATA_STATUS32]); | 2394 | data_read = *((unsigned long *)&info->ioport[REG_DATA_STATUS32]); |
2395 | if (data_read & IO_MASK(R_SERIAL0_READ, data_avail)) { | 2395 | if (data_read & IO_MASK(R_SERIAL0_READ, data_avail)) { |
2396 | DEBUG_LOG(info->line, "ser_rx %c in loop\n", IO_EXTRACT(R_SERIAL0_READ, data_in, data_read)); | 2396 | DEBUG_LOG(info->line, "ser_rx %c in loop\n", IO_EXTRACT(R_SERIAL0_READ, data_in, data_read)); |
2397 | goto more_data; | 2397 | goto more_data; |
@@ -2413,7 +2413,7 @@ static struct e100_serial* handle_ser_rx_interrupt(struct e100_serial *info) | |||
2413 | return handle_ser_rx_interrupt_no_dma(info); | 2413 | return handle_ser_rx_interrupt_no_dma(info); |
2414 | } | 2414 | } |
2415 | /* DMA is used */ | 2415 | /* DMA is used */ |
2416 | rstat = info->port[REG_STATUS]; | 2416 | rstat = info->ioport[REG_STATUS]; |
2417 | if (rstat & IO_MASK(R_SERIAL0_STATUS, xoff_detect) ) { | 2417 | if (rstat & IO_MASK(R_SERIAL0_STATUS, xoff_detect) ) { |
2418 | DFLOW(DEBUG_LOG(info->line, "XOFF detect\n", 0)); | 2418 | DFLOW(DEBUG_LOG(info->line, "XOFF detect\n", 0)); |
2419 | } | 2419 | } |
@@ -2426,7 +2426,7 @@ static struct e100_serial* handle_ser_rx_interrupt(struct e100_serial *info) | |||
2426 | /* If we got an error, we must reset it by reading the | 2426 | /* If we got an error, we must reset it by reading the |
2427 | * data_in field | 2427 | * data_in field |
2428 | */ | 2428 | */ |
2429 | data = info->port[REG_DATA]; | 2429 | data = info->ioport[REG_DATA]; |
2430 | DINTR1(DEBUG_LOG(info->line, "ser_rx! %c\n", data)); | 2430 | DINTR1(DEBUG_LOG(info->line, "ser_rx! %c\n", data)); |
2431 | DINTR1(DEBUG_LOG(info->line, "ser_rx err stat %02X\n", rstat)); | 2431 | DINTR1(DEBUG_LOG(info->line, "ser_rx err stat %02X\n", rstat)); |
2432 | if (!data && (rstat & SER_FRAMING_ERR_MASK)) { | 2432 | if (!data && (rstat & SER_FRAMING_ERR_MASK)) { |
@@ -2528,10 +2528,10 @@ static void handle_ser_tx_interrupt(struct e100_serial *info) | |||
2528 | unsigned char rstat; | 2528 | unsigned char rstat; |
2529 | DFLOW(DEBUG_LOG(info->line, "tx_int: xchar 0x%02X\n", info->x_char)); | 2529 | DFLOW(DEBUG_LOG(info->line, "tx_int: xchar 0x%02X\n", info->x_char)); |
2530 | local_irq_save(flags); | 2530 | local_irq_save(flags); |
2531 | rstat = info->port[REG_STATUS]; | 2531 | rstat = info->ioport[REG_STATUS]; |
2532 | DFLOW(DEBUG_LOG(info->line, "stat %x\n", rstat)); | 2532 | DFLOW(DEBUG_LOG(info->line, "stat %x\n", rstat)); |
2533 | 2533 | ||
2534 | info->port[REG_TR_DATA] = info->x_char; | 2534 | info->ioport[REG_TR_DATA] = info->x_char; |
2535 | info->icount.tx++; | 2535 | info->icount.tx++; |
2536 | info->x_char = 0; | 2536 | info->x_char = 0; |
2537 | /* We must enable since it is disabled in ser_interrupt */ | 2537 | /* We must enable since it is disabled in ser_interrupt */ |
@@ -2545,7 +2545,7 @@ static void handle_ser_tx_interrupt(struct e100_serial *info) | |||
2545 | /* We only use normal tx interrupt when sending x_char */ | 2545 | /* We only use normal tx interrupt when sending x_char */ |
2546 | DFLOW(DEBUG_LOG(info->line, "tx_int: xchar sent\n", 0)); | 2546 | DFLOW(DEBUG_LOG(info->line, "tx_int: xchar sent\n", 0)); |
2547 | local_irq_save(flags); | 2547 | local_irq_save(flags); |
2548 | rstat = info->port[REG_STATUS]; | 2548 | rstat = info->ioport[REG_STATUS]; |
2549 | DFLOW(DEBUG_LOG(info->line, "stat %x\n", rstat)); | 2549 | DFLOW(DEBUG_LOG(info->line, "stat %x\n", rstat)); |
2550 | e100_disable_serial_tx_ready_irq(info); | 2550 | e100_disable_serial_tx_ready_irq(info); |
2551 | if (info->port.tty->stopped) | 2551 | if (info->port.tty->stopped) |
@@ -2573,7 +2573,7 @@ static void handle_ser_tx_interrupt(struct e100_serial *info) | |||
2573 | DINTR2(DEBUG_LOG(info->line, "tx_int %c\n", info->xmit.buf[info->xmit.tail])); | 2573 | DINTR2(DEBUG_LOG(info->line, "tx_int %c\n", info->xmit.buf[info->xmit.tail])); |
2574 | /* Send a byte, rs485 timing is critical so turn of ints */ | 2574 | /* Send a byte, rs485 timing is critical so turn of ints */ |
2575 | local_irq_save(flags); | 2575 | local_irq_save(flags); |
2576 | info->port[REG_TR_DATA] = info->xmit.buf[info->xmit.tail]; | 2576 | info->ioport[REG_TR_DATA] = info->xmit.buf[info->xmit.tail]; |
2577 | info->xmit.tail = (info->xmit.tail + 1) & (SERIAL_XMIT_SIZE-1); | 2577 | info->xmit.tail = (info->xmit.tail + 1) & (SERIAL_XMIT_SIZE-1); |
2578 | info->icount.tx++; | 2578 | info->icount.tx++; |
2579 | if (info->xmit.head == info->xmit.tail) { | 2579 | if (info->xmit.head == info->xmit.tail) { |
@@ -2848,7 +2848,7 @@ startup(struct e100_serial * info) | |||
2848 | 2848 | ||
2849 | /* dummy read to reset any serial errors */ | 2849 | /* dummy read to reset any serial errors */ |
2850 | 2850 | ||
2851 | (void)info->port[REG_DATA]; | 2851 | (void)info->ioport[REG_DATA]; |
2852 | 2852 | ||
2853 | /* enable the interrupts */ | 2853 | /* enable the interrupts */ |
2854 | if (info->uses_dma_out) | 2854 | if (info->uses_dma_out) |
@@ -2897,7 +2897,7 @@ shutdown(struct e100_serial * info) | |||
2897 | /* shut down the transmitter and receiver */ | 2897 | /* shut down the transmitter and receiver */ |
2898 | DFLOW(DEBUG_LOG(info->line, "shutdown %i\n", info->line)); | 2898 | DFLOW(DEBUG_LOG(info->line, "shutdown %i\n", info->line)); |
2899 | e100_disable_rx(info); | 2899 | e100_disable_rx(info); |
2900 | info->port[REG_TR_CTRL] = (info->tx_ctrl &= ~0x40); | 2900 | info->ioport[REG_TR_CTRL] = (info->tx_ctrl &= ~0x40); |
2901 | 2901 | ||
2902 | /* disable interrupts, reset dma channels */ | 2902 | /* disable interrupts, reset dma channels */ |
2903 | if (info->uses_dma_in) { | 2903 | if (info->uses_dma_in) { |
@@ -2968,7 +2968,7 @@ change_speed(struct e100_serial *info) | |||
2968 | 2968 | ||
2969 | if (!info->port.tty || !info->port.tty->termios) | 2969 | if (!info->port.tty || !info->port.tty->termios) |
2970 | return; | 2970 | return; |
2971 | if (!info->port) | 2971 | if (!info->ioport) |
2972 | return; | 2972 | return; |
2973 | 2973 | ||
2974 | cflag = info->port.tty->termios->c_cflag; | 2974 | cflag = info->port.tty->termios->c_cflag; |
@@ -3037,7 +3037,7 @@ change_speed(struct e100_serial *info) | |||
3037 | 3037 | ||
3038 | info->baud = cflag_to_baud(cflag); | 3038 | info->baud = cflag_to_baud(cflag); |
3039 | #ifndef CONFIG_SVINTO_SIM | 3039 | #ifndef CONFIG_SVINTO_SIM |
3040 | info->port[REG_BAUD] = cflag_to_etrax_baud(cflag); | 3040 | info->ioport[REG_BAUD] = cflag_to_etrax_baud(cflag); |
3041 | #endif /* CONFIG_SVINTO_SIM */ | 3041 | #endif /* CONFIG_SVINTO_SIM */ |
3042 | } | 3042 | } |
3043 | 3043 | ||
@@ -3097,8 +3097,8 @@ change_speed(struct e100_serial *info) | |||
3097 | 3097 | ||
3098 | /* actually write the control regs to the hardware */ | 3098 | /* actually write the control regs to the hardware */ |
3099 | 3099 | ||
3100 | info->port[REG_TR_CTRL] = info->tx_ctrl; | 3100 | info->ioport[REG_TR_CTRL] = info->tx_ctrl; |
3101 | info->port[REG_REC_CTRL] = info->rx_ctrl; | 3101 | info->ioport[REG_REC_CTRL] = info->rx_ctrl; |
3102 | xoff = IO_FIELD(R_SERIAL0_XOFF, xoff_char, STOP_CHAR(info->port.tty)); | 3102 | xoff = IO_FIELD(R_SERIAL0_XOFF, xoff_char, STOP_CHAR(info->port.tty)); |
3103 | xoff |= IO_STATE(R_SERIAL0_XOFF, tx_stop, enable); | 3103 | xoff |= IO_STATE(R_SERIAL0_XOFF, tx_stop, enable); |
3104 | if (info->port.tty->termios->c_iflag & IXON ) { | 3104 | if (info->port.tty->termios->c_iflag & IXON ) { |
@@ -3107,7 +3107,7 @@ change_speed(struct e100_serial *info) | |||
3107 | xoff |= IO_STATE(R_SERIAL0_XOFF, auto_xoff, enable); | 3107 | xoff |= IO_STATE(R_SERIAL0_XOFF, auto_xoff, enable); |
3108 | } | 3108 | } |
3109 | 3109 | ||
3110 | *((unsigned long *)&info->port[REG_XOFF]) = xoff; | 3110 | *((unsigned long *)&info->ioport[REG_XOFF]) = xoff; |
3111 | local_irq_restore(flags); | 3111 | local_irq_restore(flags); |
3112 | #endif /* !CONFIG_SVINTO_SIM */ | 3112 | #endif /* !CONFIG_SVINTO_SIM */ |
3113 | 3113 | ||
@@ -3156,7 +3156,7 @@ static int rs_raw_write(struct tty_struct *tty, | |||
3156 | #ifdef SERIAL_DEBUG_DATA | 3156 | #ifdef SERIAL_DEBUG_DATA |
3157 | if (info->line == SERIAL_DEBUG_LINE) | 3157 | if (info->line == SERIAL_DEBUG_LINE) |
3158 | printk("rs_raw_write (%d), status %d\n", | 3158 | printk("rs_raw_write (%d), status %d\n", |
3159 | count, info->port[REG_STATUS]); | 3159 | count, info->ioport[REG_STATUS]); |
3160 | #endif | 3160 | #endif |
3161 | 3161 | ||
3162 | #ifdef CONFIG_SVINTO_SIM | 3162 | #ifdef CONFIG_SVINTO_SIM |
@@ -3427,7 +3427,7 @@ get_serial_info(struct e100_serial * info, | |||
3427 | memset(&tmp, 0, sizeof(tmp)); | 3427 | memset(&tmp, 0, sizeof(tmp)); |
3428 | tmp.type = info->type; | 3428 | tmp.type = info->type; |
3429 | tmp.line = info->line; | 3429 | tmp.line = info->line; |
3430 | tmp.port = (int)info->port; | 3430 | tmp.port = (int)info->ioport; |
3431 | tmp.irq = info->irq; | 3431 | tmp.irq = info->irq; |
3432 | tmp.flags = info->flags; | 3432 | tmp.flags = info->flags; |
3433 | tmp.baud_base = info->baud_base; | 3433 | tmp.baud_base = info->baud_base; |
@@ -3557,14 +3557,14 @@ char *get_control_state_str(int MLines, char *s) | |||
3557 | } | 3557 | } |
3558 | #endif | 3558 | #endif |
3559 | 3559 | ||
3560 | static void | 3560 | static int |
3561 | rs_break(struct tty_struct *tty, int break_state) | 3561 | rs_break(struct tty_struct *tty, int break_state) |
3562 | { | 3562 | { |
3563 | struct e100_serial *info = (struct e100_serial *)tty->driver_data; | 3563 | struct e100_serial *info = (struct e100_serial *)tty->driver_data; |
3564 | unsigned long flags; | 3564 | unsigned long flags; |
3565 | 3565 | ||
3566 | if (!info->port) | 3566 | if (!info->ioport) |
3567 | return; | 3567 | return -EIO; |
3568 | 3568 | ||
3569 | local_irq_save(flags); | 3569 | local_irq_save(flags); |
3570 | if (break_state == -1) { | 3570 | if (break_state == -1) { |
@@ -3575,8 +3575,9 @@ rs_break(struct tty_struct *tty, int break_state) | |||
3575 | /* Set bit 7 (txd) and 6 (tr_enable) */ | 3575 | /* Set bit 7 (txd) and 6 (tr_enable) */ |
3576 | info->tx_ctrl |= (0x80 | 0x40); | 3576 | info->tx_ctrl |= (0x80 | 0x40); |
3577 | } | 3577 | } |
3578 | info->port[REG_TR_CTRL] = info->tx_ctrl; | 3578 | info->ioport[REG_TR_CTRL] = info->tx_ctrl; |
3579 | local_irq_restore(flags); | 3579 | local_irq_restore(flags); |
3580 | return 0; | ||
3580 | } | 3581 | } |
3581 | 3582 | ||
3582 | static int | 3583 | static int |
@@ -4231,9 +4232,9 @@ static int line_info(char *buf, struct e100_serial *info) | |||
4231 | unsigned long tmp; | 4232 | unsigned long tmp; |
4232 | 4233 | ||
4233 | ret = sprintf(buf, "%d: uart:E100 port:%lX irq:%d", | 4234 | ret = sprintf(buf, "%d: uart:E100 port:%lX irq:%d", |
4234 | info->line, (unsigned long)info->port, info->irq); | 4235 | info->line, (unsigned long)info->ioport, info->irq); |
4235 | 4236 | ||
4236 | if (!info->port || (info->type == PORT_UNKNOWN)) { | 4237 | if (!info->ioport || (info->type == PORT_UNKNOWN)) { |
4237 | ret += sprintf(buf+ret, "\n"); | 4238 | ret += sprintf(buf+ret, "\n"); |
4238 | return ret; | 4239 | return ret; |
4239 | } | 4240 | } |
@@ -4281,7 +4282,7 @@ static int line_info(char *buf, struct e100_serial *info) | |||
4281 | } | 4282 | } |
4282 | 4283 | ||
4283 | { | 4284 | { |
4284 | unsigned char rstat = info->port[REG_STATUS]; | 4285 | unsigned char rstat = info->ioport[REG_STATUS]; |
4285 | if (rstat & IO_MASK(R_SERIAL0_STATUS, xoff_detect) ) | 4286 | if (rstat & IO_MASK(R_SERIAL0_STATUS, xoff_detect) ) |
4286 | ret += sprintf(buf+ret, " xoff_detect:1"); | 4287 | ret += sprintf(buf+ret, " xoff_detect:1"); |
4287 | } | 4288 | } |
@@ -4502,7 +4503,7 @@ rs_init(void) | |||
4502 | 4503 | ||
4503 | if (info->enabled) { | 4504 | if (info->enabled) { |
4504 | printk(KERN_INFO "%s%d at 0x%x is a builtin UART with DMA\n", | 4505 | printk(KERN_INFO "%s%d at 0x%x is a builtin UART with DMA\n", |
4505 | serial_driver->name, info->line, (unsigned int)info->port); | 4506 | serial_driver->name, info->line, (unsigned int)info->ioport); |
4506 | } | 4507 | } |
4507 | } | 4508 | } |
4508 | #ifdef CONFIG_ETRAX_FAST_TIMER | 4509 | #ifdef CONFIG_ETRAX_FAST_TIMER |
diff --git a/drivers/serial/crisv10.h b/drivers/serial/crisv10.h index ccd0f32b7372..e3c5c8c3c09b 100644 --- a/drivers/serial/crisv10.h +++ b/drivers/serial/crisv10.h | |||
@@ -36,8 +36,9 @@ struct etrax_recv_buffer { | |||
36 | }; | 36 | }; |
37 | 37 | ||
38 | struct e100_serial { | 38 | struct e100_serial { |
39 | struct tty_port port; | ||
39 | int baud; | 40 | int baud; |
40 | volatile u8 *port; /* R_SERIALx_CTRL */ | 41 | volatile u8 *ioport; /* R_SERIALx_CTRL */ |
41 | u32 irq; /* bitnr in R_IRQ_MASK2 for dmaX_descr */ | 42 | u32 irq; /* bitnr in R_IRQ_MASK2 for dmaX_descr */ |
42 | 43 | ||
43 | /* Output registers */ | 44 | /* Output registers */ |