diff options
author | Harald Koerfgen <hkoerfg@web.de> | 1999-04-11 17:03:38 +0000 |
---|---|---|
committer | Harald Koerfgen <hkoerfg@web.de> | 1999-04-11 17:03:38 +0000 |
commit | cf32452ae9bc67a48c2f0fb3719b31a78512ed82 (patch) | |
tree | e09543fdc263f3174e3d4eb5ab4271cb81704b74 | |
parent | cd12ada75f0358baf2570affb075a7f7b35f11dd (diff) |
Baget updates
-rw-r--r-- | arch/mips/baget/Makefile | 18 | ||||
-rw-r--r-- | arch/mips/baget/irq.c | 10 | ||||
-rw-r--r-- | arch/mips/baget/setup.c | 4 | ||||
-rw-r--r-- | arch/mips/baget/time.c | 12 | ||||
-rw-r--r-- | arch/mips/baget/vacserial.c | 22 | ||||
-rw-r--r-- | drivers/char/defkeymap.c | 21 | ||||
-rw-r--r-- | include/asm-mips/baget/baget.h | 2 | ||||
-rw-r--r-- | include/asm-mips/baget/vac.h | 1 |
8 files changed, 52 insertions, 38 deletions
diff --git a/arch/mips/baget/Makefile b/arch/mips/baget/Makefile index 2980761be..6bddfad4b 100644 --- a/arch/mips/baget/Makefile +++ b/arch/mips/baget/Makefile @@ -15,8 +15,22 @@ image: ../../../vmlinux cp -f $< $@ O_TARGET := baget.a -O_OBJS := baget.o print.o setup.o irq.o time.o \ - bagetIRQ.o vacserial.o reset.o +O_OBJS := baget.o print.o setup.o time.o irq.o bagetIRQ.o reset.o wbflush.o + +ifeq ($(CONFIG_SERIAL),y) + OX_OBJS += vacserial.o +else + ifeq ($(CONFIG_SERIAL),m) + MX_OBJS += vacserial.o + endif +endif +ifeq ($(CONFIG_VAC_RTC),y) + OX_OBJS += vacrtc.o +else + ifeq ($(CONFIG_VAC_RTC),m) + MX_OBJS += vacrtc.o + endif +endif bagetIRQ.o : bagetIRQ.S $(CC) $(CFLAGS) -c -o $@ $< diff --git a/arch/mips/baget/irq.c b/arch/mips/baget/irq.c index a6513d7f1..8fc7ec179 100644 --- a/arch/mips/baget/irq.c +++ b/arch/mips/baget/irq.c @@ -33,6 +33,8 @@ unsigned int local_bh_count[NR_CPUS]; unsigned int local_irq_count[NR_CPUS]; unsigned long spurious_count = 0; +atomic_t __mips_bh_counter; + /* * This table is a correspondence between IRQ numbers and CPU PILs */ @@ -41,7 +43,7 @@ static int irq_to_pil_map[BAGET_IRQ_NR] = { 7/*fixme: dma_err -1*/,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* 0x00 - 0x0f */ -1,-1,-1,-1, 3,-1,-1,-1, 2, 2, 2,-1, 3,-1,-1,3/*fixme: lance*/, /* 0x10 - 0x1f */ -1,-1,-1,-1,-1,-1, 5,-1,-1,-1,-1,-1, 7,-1,-1,-1, /* 0x20 - 0x2f */ - -1, 3, 2/*fixme systimer:3*/, 3, 3, 3, 2,-1, 3, 3, 3, 3, 3, 3, 3, 3 /* 0x30 - 0x3f */ + -1, 3, 2/*fixme systimer:3*/, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 /* 0x30 - 0x3f */ }; static inline int irq_to_pil(int irq_nr) @@ -61,7 +63,7 @@ static inline int irq_to_pil(int irq_nr) /* Function for careful CP0 interrupt mask access */ -static inline modify_cp0_intmask(unsigned clr_mask, unsigned set_mask) +static inline void modify_cp0_intmask(unsigned clr_mask, unsigned set_mask) { unsigned long status = read_32bit_cp0_register(CP0_STATUS); status &= ~((clr_mask & 0xFF) << 8); @@ -191,7 +193,7 @@ static void do_IRQ(int irq, struct pt_regs * regs) int do_random, cpu; cpu = smp_processor_id(); - irq_enter(cpu, irq); + hardirq_enter(cpu); kstat.irqs[cpu][irq]++; mask_irq(irq); @@ -213,7 +215,7 @@ static void do_IRQ(int irq, struct pt_regs * regs) printk("do_IRQ: Unregistered IRQ (0x%X) occured\n", irq); } unmask_irq(irq); - irq_exit(cpu, irq); + hardirq_exit(cpu); /* unmasking and bottom half handling is done magically for us. */ } diff --git a/arch/mips/baget/setup.c b/arch/mips/baget/setup.c index 209816dca..de5c5763d 100644 --- a/arch/mips/baget/setup.c +++ b/arch/mips/baget/setup.c @@ -17,6 +17,8 @@ extern long mips_memory_upper; +extern void wbflush_setup(void); + #define CACHEABLE_STR(val) ((val) ? "not cached" : "cached") #define MIN(a,b) (((a)<(b)) ? (a):(b)) @@ -480,6 +482,8 @@ __initfunc(void baget_setup(void)) *BAGET_WRERR_ACK = 0; irq_setup = baget_irq_setup; + wbflush_setup(); + _machine_restart = baget_machine_restart; _machine_halt = baget_machine_halt; _machine_power_off = baget_machine_power_off; diff --git a/arch/mips/baget/time.c b/arch/mips/baget/time.c index b24f5b93e..093b6c0ac 100644 --- a/arch/mips/baget/time.c +++ b/arch/mips/baget/time.c @@ -28,7 +28,7 @@ */ #define FREQ_NOM 79125 /* Baget frequency ratio */ #define FREQ_DEN 10000 -static inline int timer_intr_valid() +static inline int timer_intr_valid(void) { static unsigned long long ticks, valid_ticks; @@ -52,16 +52,6 @@ void static timer_interrupt(int irq, void *dev_id, struct pt_regs * regs) } } -__initfunc(static void rtc_enable(void)) -{ - short ic; - - ic = vac_inw(VAC_INT_CTRL) ; - vac_outw(ic & 0xfffc, VAC_INT_CTRL); - vac_outw(ic, VAC_INT_CTRL); - vic_outb(0xb9 & 0x7f, VIC_LINT6); -} - __initfunc(static void timer_enable(void)) { unsigned char ss0cr0 = vic_inb(VIC_SS0CR0); diff --git a/arch/mips/baget/vacserial.c b/arch/mips/baget/vacserial.c index 6e3add687..456964298 100644 --- a/arch/mips/baget/vacserial.c +++ b/arch/mips/baget/vacserial.c @@ -1289,6 +1289,8 @@ static int set_serial_info(struct async_struct * info, return -EPERM; state->flags = ((state->flags & ~ASYNC_USR_MASK) | (new_serial.flags & ASYNC_USR_MASK)); + info->flags = ((state->flags & ~ASYNC_USR_MASK) | + (info->flags & ASYNC_USR_MASK)); state->custom_divisor = new_serial.custom_divisor; goto check_and_exit; } @@ -1296,7 +1298,9 @@ static int set_serial_info(struct async_struct * info, new_serial.irq = irq_cannonicalize(new_serial.irq); if ((new_serial.irq >= NR_IRQS) || (new_serial.port > 0xffff) || - (new_serial.type < PORT_UNKNOWN) || (new_serial.type > PORT_MAX)) { + (new_serial.baud_base == 0) || (new_serial.type < PORT_UNKNOWN) || + (new_serial.type > PORT_MAX) || (new_serial.type == PORT_CIRRUS) || + (new_serial.type == PORT_STARTECH)) { return -EINVAL; } @@ -1719,8 +1723,7 @@ static void rs_close(struct tty_struct *tty, struct file * filp) if (info->blocked_open) { if (info->close_delay) { current->state = TASK_INTERRUPTIBLE; - current->timeout = jiffies + info->close_delay; - schedule(); + schedule_timeout(info->close_delay); } wake_up_interruptible(&info->open_wait); } @@ -1776,8 +1779,7 @@ static void rs_wait_until_sent(struct tty_struct *tty, int timeout) #endif current->state = TASK_INTERRUPTIBLE; current->counter = 0; /* make us low-priority */ - current->timeout = jiffies + char_time; - schedule(); + schedule_timeout(char_time); if (signal_pending(current)) break; if (timeout && ((orig_jiffies + timeout) < jiffies)) @@ -2002,7 +2004,7 @@ static int rs_open(struct tty_struct *tty, struct file * filp) tty->driver_data = info; info->tty = tty; if (serial_paranoia_check(info, tty->device, "rs_open")) { - MOD_DEC_USE_COUNT; + /* MOD_DEC_USE_COUNT; "info->tty" will cause this */ return -ENODEV; } @@ -2016,7 +2018,7 @@ static int rs_open(struct tty_struct *tty, struct file * filp) if (!tmp_buf) { page = get_free_page(GFP_KERNEL); if (!page) { - MOD_DEC_USE_COUNT; + /* MOD_DEC_USE_COUNT; "info->tty" will cause this */ return -ENOMEM; } if (tmp_buf) @@ -2032,7 +2034,7 @@ static int rs_open(struct tty_struct *tty, struct file * filp) (info->flags & ASYNC_CLOSING)) { if (info->flags & ASYNC_CLOSING) interruptible_sleep_on(&info->close_wait); - MOD_DEC_USE_COUNT; + /* MOD_DEC_USE_COUNT; "info->tty" will cause this */ #ifdef SERIAL_DO_RESTART return ((info->flags & ASYNC_HUP_NOTIFY) ? -EAGAIN : -ERESTARTSYS); @@ -2046,13 +2048,13 @@ static int rs_open(struct tty_struct *tty, struct file * filp) */ retval = startup(info); if (retval) { - MOD_DEC_USE_COUNT; + /* MOD_DEC_USE_COUNT; "info->tty" will cause this */ return retval; } retval = block_til_ready(tty, filp, info); if (retval) { - MOD_DEC_USE_COUNT; + /* MOD_DEC_USE_COUNT; "info->tty" will cause this */ #ifdef SERIAL_DEBUG_OPEN baget_printk("rs_open returning after block_til_ready " "with %d\n", diff --git a/drivers/char/defkeymap.c b/drivers/char/defkeymap.c index d8ac176c2..fda9aa5cb 100644 --- a/drivers/char/defkeymap.c +++ b/drivers/char/defkeymap.c @@ -1,3 +1,4 @@ +Loading defkeymap.map /* Do not edit this file! It was automatically generated by */ /* loadkeys --mktable defkeymap.map > defkeymap.c */ @@ -24,7 +25,7 @@ u_short plain_map[NR_KEYS] = { 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, }; -u_short shift_map[NR_KEYS] = { +static u_short shift_map[NR_KEYS] = { 0xf200, 0xf01b, 0xf021, 0xf040, 0xf023, 0xf024, 0xf025, 0xf05e, 0xf026, 0xf02a, 0xf028, 0xf029, 0xf05f, 0xf02b, 0xf07f, 0xf009, 0xfb51, 0xfb57, 0xfb45, 0xfb52, 0xfb54, 0xfb59, 0xfb55, 0xfb49, @@ -37,13 +38,13 @@ u_short shift_map[NR_KEYS] = { 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301, 0xf302, 0xf303, 0xf300, 0xf310, 0xf206, 0xf200, 0xf03e, 0xf10a, 0xf10b, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, - 0xf30e, 0xf702, 0xf30d, 0xf200, 0xf701, 0xf205, 0xf114, 0xf603, + 0xf30e, 0xf702, 0xf30d, 0xf01c, 0xf701, 0xf205, 0xf114, 0xf603, 0xf20b, 0xf601, 0xf602, 0xf117, 0xf600, 0xf20a, 0xf115, 0xf116, 0xf11a, 0xf10c, 0xf10d, 0xf11b, 0xf11c, 0xf110, 0xf311, 0xf11d, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, }; -u_short altgr_map[NR_KEYS] = { +static u_short altgr_map[NR_KEYS] = { 0xf200, 0xf200, 0xf200, 0xf040, 0xf200, 0xf024, 0xf200, 0xf200, 0xf07b, 0xf05b, 0xf05d, 0xf07d, 0xf05c, 0xf200, 0xf200, 0xf200, 0xfb71, 0xfb77, 0xf918, 0xfb72, 0xfb74, 0xfb79, 0xfb75, 0xfb69, @@ -56,13 +57,13 @@ u_short altgr_map[NR_KEYS] = { 0xf912, 0xf913, 0xf30b, 0xf90e, 0xf90f, 0xf910, 0xf30a, 0xf90b, 0xf90c, 0xf90d, 0xf90a, 0xf310, 0xf206, 0xf200, 0xf07c, 0xf516, 0xf517, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, - 0xf30e, 0xf702, 0xf30d, 0xf200, 0xf701, 0xf205, 0xf114, 0xf603, + 0xf30e, 0xf702, 0xf30d, 0xf01c, 0xf701, 0xf205, 0xf114, 0xf603, 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116, 0xf11a, 0xf10c, 0xf10d, 0xf11b, 0xf11c, 0xf110, 0xf311, 0xf11d, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, }; -u_short ctrl_map[NR_KEYS] = { +static u_short ctrl_map[NR_KEYS] = { 0xf200, 0xf200, 0xf200, 0xf000, 0xf01b, 0xf01c, 0xf01d, 0xf01e, 0xf01f, 0xf07f, 0xf200, 0xf200, 0xf01f, 0xf200, 0xf008, 0xf200, 0xf011, 0xf017, 0xf005, 0xf012, 0xf014, 0xf019, 0xf015, 0xf009, @@ -81,7 +82,7 @@ u_short ctrl_map[NR_KEYS] = { 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, }; -u_short shift_ctrl_map[NR_KEYS] = { +static u_short shift_ctrl_map[NR_KEYS] = { 0xf200, 0xf200, 0xf200, 0xf000, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf01f, 0xf200, 0xf200, 0xf200, 0xf011, 0xf017, 0xf005, 0xf012, 0xf014, 0xf019, 0xf015, 0xf009, @@ -94,13 +95,13 @@ u_short shift_ctrl_map[NR_KEYS] = { 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301, 0xf302, 0xf303, 0xf300, 0xf310, 0xf206, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, - 0xf30e, 0xf702, 0xf30d, 0xf200, 0xf701, 0xf205, 0xf114, 0xf603, + 0xf30e, 0xf702, 0xf30d, 0xf01c, 0xf701, 0xf205, 0xf114, 0xf603, 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116, 0xf11a, 0xf10c, 0xf10d, 0xf11b, 0xf11c, 0xf110, 0xf311, 0xf11d, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, }; -u_short alt_map[NR_KEYS] = { +static u_short alt_map[NR_KEYS] = { 0xf200, 0xf81b, 0xf831, 0xf832, 0xf833, 0xf834, 0xf835, 0xf836, 0xf837, 0xf838, 0xf839, 0xf830, 0xf82d, 0xf83d, 0xf87f, 0xf809, 0xf871, 0xf877, 0xf865, 0xf872, 0xf874, 0xf879, 0xf875, 0xf869, @@ -119,7 +120,7 @@ u_short alt_map[NR_KEYS] = { 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, }; -u_short ctrl_alt_map[NR_KEYS] = { +static u_short ctrl_alt_map[NR_KEYS] = { 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf811, 0xf817, 0xf805, 0xf812, 0xf814, 0xf819, 0xf815, 0xf809, @@ -132,7 +133,7 @@ u_short ctrl_alt_map[NR_KEYS] = { 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301, 0xf302, 0xf303, 0xf300, 0xf20c, 0xf206, 0xf200, 0xf200, 0xf50a, 0xf50b, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, - 0xf30e, 0xf702, 0xf30d, 0xf200, 0xf701, 0xf205, 0xf114, 0xf603, + 0xf30e, 0xf702, 0xf30d, 0xf01c, 0xf701, 0xf205, 0xf114, 0xf603, 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf20c, 0xf11a, 0xf10c, 0xf10d, 0xf11b, 0xf11c, 0xf110, 0xf311, 0xf11d, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, diff --git a/include/asm-mips/baget/baget.h b/include/asm-mips/baget/baget.h index 774493965..172b8c884 100644 --- a/include/asm-mips/baget/baget.h +++ b/include/asm-mips/baget/baget.h @@ -44,7 +44,7 @@ struct baget_int_reg { #define BAGET_FPU_IRQ 0x26 #define BAGET_VIC_TIMER_IRQ 0x32 -#define BAGET_VAC_TIMER_IRQ 0x37 +#define BAGET_VAC_TIMER_IRQ 0x36 #define BAGET_BSM_IRQ 0x3C #define BAGET_LANCE_MEM_BASE 0xfcf10000 diff --git a/include/asm-mips/baget/vac.h b/include/asm-mips/baget/vac.h index 4d1614773..46ae6812e 100644 --- a/include/asm-mips/baget/vac.h +++ b/include/asm-mips/baget/vac.h @@ -89,6 +89,7 @@ #define VAC_INT_CTRL_TIMER_PIO10 (2<<0) #define VAC_INT_CTRL_TIMER_PIO7 (1<<0) #define VAC_INT_CTRL_TIMER_DISABLE (0<<0) +#define VAC_INT_CTRL_TIMER_MASK (3<<0) #define VAC_INT_CTRL_UART_B_PIO11 (3<<2) #define VAC_INT_CTRL_UART_B_PIO10 (2<<2) #define VAC_INT_CTRL_UART_B_PIO7 (1<<2) |