diff options
Diffstat (limited to 'drivers/tc/zs.c')
| -rw-r--r-- | drivers/tc/zs.c | 32 |
1 files changed, 6 insertions, 26 deletions
diff --git a/drivers/tc/zs.c b/drivers/tc/zs.c index 6bed8713897e..c52af73a251b 100644 --- a/drivers/tc/zs.c +++ b/drivers/tc/zs.c | |||
| @@ -65,14 +65,14 @@ | |||
| 65 | #include <asm/system.h> | 65 | #include <asm/system.h> |
| 66 | #include <asm/uaccess.h> | 66 | #include <asm/uaccess.h> |
| 67 | #include <asm/bootinfo.h> | 67 | #include <asm/bootinfo.h> |
| 68 | #include <asm/dec/serial.h> | ||
| 69 | 68 | ||
| 70 | #ifdef CONFIG_MACH_DECSTATION | ||
| 71 | #include <asm/dec/interrupts.h> | 69 | #include <asm/dec/interrupts.h> |
| 70 | #include <asm/dec/ioasic_addrs.h> | ||
| 72 | #include <asm/dec/machtype.h> | 71 | #include <asm/dec/machtype.h> |
| 72 | #include <asm/dec/serial.h> | ||
| 73 | #include <asm/dec/system.h> | ||
| 73 | #include <asm/dec/tc.h> | 74 | #include <asm/dec/tc.h> |
| 74 | #include <asm/dec/ioasic_addrs.h> | 75 | |
| 75 | #endif | ||
| 76 | #ifdef CONFIG_KGDB | 76 | #ifdef CONFIG_KGDB |
| 77 | #include <asm/kgdb.h> | 77 | #include <asm/kgdb.h> |
| 78 | #endif | 78 | #endif |
| @@ -192,18 +192,6 @@ static void probe_sccs(void); | |||
| 192 | static void change_speed(struct dec_serial *info); | 192 | static void change_speed(struct dec_serial *info); |
| 193 | static void rs_wait_until_sent(struct tty_struct *tty, int timeout); | 193 | static void rs_wait_until_sent(struct tty_struct *tty, int timeout); |
| 194 | 194 | ||
| 195 | /* | ||
| 196 | * tmp_buf is used as a temporary buffer by serial_write. We need to | ||
| 197 | * lock it in case the copy_from_user blocks while swapping in a page, | ||
| 198 | * and some other program tries to do a serial write at the same time. | ||
| 199 | * Since the lock will only come under contention when the system is | ||
| 200 | * swapping and available memory is low, it makes sense to share one | ||
| 201 | * buffer across all the serial ports, since it significantly saves | ||
| 202 | * memory if large numbers of serial ports are open. | ||
| 203 | */ | ||
| 204 | static unsigned char tmp_buf[4096]; /* This is cheating */ | ||
| 205 | static DECLARE_MUTEX(tmp_buf_sem); | ||
| 206 | |||
| 207 | static inline int serial_paranoia_check(struct dec_serial *info, | 195 | static inline int serial_paranoia_check(struct dec_serial *info, |
| 208 | char *name, const char *routine) | 196 | char *name, const char *routine) |
| 209 | { | 197 | { |
| @@ -1628,30 +1616,22 @@ static void __init probe_sccs(void) | |||
| 1628 | return; | 1616 | return; |
| 1629 | } | 1617 | } |
| 1630 | 1618 | ||
| 1631 | /* | ||
| 1632 | * When serial console is activated, tc_init has not been called yet | ||
| 1633 | * and system_base is undefined. Unfortunately we have to hardcode | ||
| 1634 | * system_base for this case :-(. HK | ||
| 1635 | */ | ||
| 1636 | switch(mips_machtype) { | 1619 | switch(mips_machtype) { |
| 1637 | #ifdef CONFIG_MACH_DECSTATION | 1620 | #ifdef CONFIG_MACH_DECSTATION |
| 1638 | case MACH_DS5000_2X0: | 1621 | case MACH_DS5000_2X0: |
| 1639 | case MACH_DS5900: | 1622 | case MACH_DS5900: |
| 1640 | system_base = KSEG1ADDR(0x1f800000); | ||
| 1641 | n_chips = 2; | 1623 | n_chips = 2; |
| 1642 | zs_parms = &ds_parms; | 1624 | zs_parms = &ds_parms; |
| 1643 | zs_parms->irq0 = dec_interrupt[DEC_IRQ_SCC0]; | 1625 | zs_parms->irq0 = dec_interrupt[DEC_IRQ_SCC0]; |
| 1644 | zs_parms->irq1 = dec_interrupt[DEC_IRQ_SCC1]; | 1626 | zs_parms->irq1 = dec_interrupt[DEC_IRQ_SCC1]; |
| 1645 | break; | 1627 | break; |
| 1646 | case MACH_DS5000_1XX: | 1628 | case MACH_DS5000_1XX: |
| 1647 | system_base = KSEG1ADDR(0x1c000000); | ||
| 1648 | n_chips = 2; | 1629 | n_chips = 2; |
| 1649 | zs_parms = &ds_parms; | 1630 | zs_parms = &ds_parms; |
| 1650 | zs_parms->irq0 = dec_interrupt[DEC_IRQ_SCC0]; | 1631 | zs_parms->irq0 = dec_interrupt[DEC_IRQ_SCC0]; |
| 1651 | zs_parms->irq1 = dec_interrupt[DEC_IRQ_SCC1]; | 1632 | zs_parms->irq1 = dec_interrupt[DEC_IRQ_SCC1]; |
| 1652 | break; | 1633 | break; |
| 1653 | case MACH_DS5000_XX: | 1634 | case MACH_DS5000_XX: |
| 1654 | system_base = KSEG1ADDR(0x1c000000); | ||
| 1655 | n_chips = 1; | 1635 | n_chips = 1; |
| 1656 | zs_parms = &ds_parms; | 1636 | zs_parms = &ds_parms; |
| 1657 | zs_parms->irq0 = dec_interrupt[DEC_IRQ_SCC0]; | 1637 | zs_parms->irq0 = dec_interrupt[DEC_IRQ_SCC0]; |
| @@ -1673,10 +1653,10 @@ static void __init probe_sccs(void) | |||
| 1673 | * The sccs reside on the high byte of the 16 bit IOBUS | 1653 | * The sccs reside on the high byte of the 16 bit IOBUS |
| 1674 | */ | 1654 | */ |
| 1675 | zs_channels[n_channels].control = | 1655 | zs_channels[n_channels].control = |
| 1676 | (volatile unsigned char *)system_base + | 1656 | (volatile void *)CKSEG1ADDR(dec_kn_slot_base + |
| 1677 | (0 == chip ? zs_parms->scc0 : zs_parms->scc1) + | 1657 | (0 == chip ? zs_parms->scc0 : zs_parms->scc1) + |
| 1678 | (0 == channel ? zs_parms->channel_a_offset : | 1658 | (0 == channel ? zs_parms->channel_a_offset : |
| 1679 | zs_parms->channel_b_offset); | 1659 | zs_parms->channel_b_offset)); |
| 1680 | zs_channels[n_channels].data = | 1660 | zs_channels[n_channels].data = |
| 1681 | zs_channels[n_channels].control + 4; | 1661 | zs_channels[n_channels].control + 4; |
| 1682 | 1662 | ||
