|
From: Paul M. <le...@us...> - 2001-08-25 02:19:30
|
Update of /cvsroot/linux-mips/linux/arch/mips/au1000/common
In directory usw-pr-cvs1:/tmp/cvs-serv13548/arch/mips/au1000/common
Modified Files:
Makefile irq.c prom.c time.c
Log Message:
Sync to 2.4.7
Index: Makefile
===================================================================
RCS file: /cvsroot/linux-mips/linux/arch/mips/au1000/common/Makefile,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** Makefile 2001/08/17 22:53:26 1.3
--- Makefile 2001/08/25 02:19:27 1.4
***************
*** 25,28 ****
--- 25,32 ----
obj-$(CONFIG_AU1000_USB_DEVICE) += usbdev.o
obj-$(CONFIG_REMOTE_DEBUG) += dbg_io.o
+ obj-$(CONFIG_BLK_DEV_INITRD) += ramdisk.o
+
+ ramdisk.o:
+ mkramobj ramdisk ramdisk.o
include $(TOPDIR)/Rules.make
Index: irq.c
===================================================================
RCS file: /cvsroot/linux-mips/linux/arch/mips/au1000/common/irq.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** irq.c 2001/08/17 22:53:26 1.3
--- irq.c 2001/08/25 02:19:27 1.4
***************
*** 73,78 ****
extern asmlinkage void au1000_IRQ(void);
extern void set_debug_traps(void);
! irq_cpustat_t irq_stat [NR_CPUS];
unsigned int local_bh_count[NR_CPUS];
unsigned int local_irq_count[NR_CPUS];
--- 73,81 ----
extern asmlinkage void au1000_IRQ(void);
+
extern void set_debug_traps(void);
! extern irq_cpustat_t irq_stat [];
! extern irq_desc_t irq_desc[NR_IRQS];
!
unsigned int local_bh_count[NR_CPUS];
unsigned int local_irq_count[NR_CPUS];
***************
*** 119,122 ****
--- 122,135 ----
+ static void disable_cpu_irq_input(unsigned int irq_nr)
+ {
+ unsigned long flags;
+
+ save_and_cli(flags);
+ mask_cpu_irq_input(irq_nr);
+ restore_flags(flags);
+ }
+
+
static void enable_cpu_irq_input(unsigned int irq_nr)
{
***************
*** 316,321 ****
local_enable_irq(irq_nr);
else
! printk("warning: end_irq %d did not enable (%x)\n",
! irq_nr, irq_desc[irq_nr].status);
}
--- 329,333 ----
local_enable_irq(irq_nr);
else
! printk("warning: end_irq %d did not enable\n", irq_nr);
}
***************
*** 472,479 ****
- /*
- * Interrupt Controller 1:
- * interrupts 32 - 63
- */
void intc1_req0_irqdispatch(struct pt_regs *regs)
{
--- 484,487 ----
***************
*** 487,491 ****
for (i=0; i<32; i++) {
if ((int_request & 0x1)) {
! do_IRQ(irq+32, regs);
}
irq++;
--- 495,499 ----
for (i=0; i<32; i++) {
if ((int_request & 0x1)) {
! do_IRQ(irq, regs);
}
irq++;
***************
*** 506,510 ****
for (i=0; i<32; i++) {
if ((int_request & 0x1)) {
! do_IRQ(irq+32, regs);
}
irq++;
--- 514,518 ----
for (i=0; i<32; i++) {
if ((int_request & 0x1)) {
! do_IRQ(irq, regs);
}
irq++;
Index: prom.c
===================================================================
RCS file: /cvsroot/linux-mips/linux/arch/mips/au1000/common/prom.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** prom.c 2001/08/17 22:53:26 1.2
--- prom.c 2001/08/25 02:19:27 1.3
***************
*** 49,57 ****
char **prom_argv, **prom_envp;
! typedef struct
! {
! char *name;
! /* char *val; */
! }t_env_var;
--- 49,56 ----
char **prom_argv, **prom_envp;
! typedef struct {
! char *name;
! /* char *val; */
! } t_env_var;
***************
*** 103,107 ****
}
! inline unsigned char str2hexnum(unsigned char c)
{
if(c >= '0' && c <= '9')
--- 102,106 ----
}
! static inline unsigned char str2hexnum(unsigned char c)
{
if(c >= '0' && c <= '9')
***************
*** 112,151 ****
}
! inline void str2eaddr(unsigned char *ea, unsigned char *str)
{
! int i;
!
! for(i = 0; i < 6; i++) {
! unsigned char num;
!
! if((*str == '.') || (*str == ':'))
! str++;
! num = str2hexnum(*str++) << 4;
! num |= (str2hexnum(*str++));
! ea[i] = num;
! }
}
-
- int get_ethernet_addr(char *ethernet_addr)
- {
- int i;
- char *ethaddr_str;
-
- ethaddr_str = prom_getenv("ethaddr");
- if (!ethaddr_str) {
- printk("ethaddr not set in boot prom\n");
- return -1;
- }
- str2eaddr(ethernet_addr, ethaddr_str);
! #if 0
! printk("get_ethernet_addr: ");
! for (i=0; i<5; i++)
! printk("%02x:", (unsigned char)*(ethernet_addr+i));
! printk("%02x\n", *(ethernet_addr+i));
! #endif
!
! return 0;
}
-
- void prom_free_prom_memory (void) {}
--- 111,120 ----
}
! int __init page_is_ram(unsigned long pagenr)
{
! return 1;
}
! void prom_free_prom_memory (void)
! {
}
Index: time.c
===================================================================
RCS file: /cvsroot/linux-mips/linux/arch/mips/au1000/common/time.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** time.c 2001/08/17 22:53:26 1.3
--- time.c 2001/08/25 02:19:27 1.4
***************
*** 1,4 ****
/*
- *
* Copyright (C) 2001 MontaVista Software, pp...@mv...
* Copied and modified Carsten Langgaard's time.c
--- 1,3 ----
***************
*** 25,31 ****
*
* Setting up the clock on the MIPS boards.
- *
*/
-
#include <linux/config.h>
#include <linux/init.h>
--- 24,28 ----
***************
*** 71,86 ****
void mips_timer_interrupt(struct pt_regs *regs)
{
! int irq = 63;
! unsigned long count;
-
if (r4k_offset == 0)
goto null;
do {
- count = read_32bit_cp0_register(CP0_COUNT);
- timerhi += (count < timerlo); /* Wrap around */
- timerlo = count;
-
kstat.irqs[0][irq]++;
do_timer(regs);
--- 68,77 ----
void mips_timer_interrupt(struct pt_regs *regs)
{
! int irq = 7;
if (r4k_offset == 0)
goto null;
do {
kstat.irqs[0][irq]++;
do_timer(regs);
***************
*** 105,111 ****
--- 96,104 ----
{
unsigned long count;
+ unsigned long cpu_pll;
unsigned long cpu_speed;
unsigned long start, end;
unsigned long counter;
+ int i;
int trim_divide = 16;
***************
*** 172,177 ****
/* This is for machines which generate the exact clock. */
#define USECS_PER_JIFFY (1000000/HZ)
! #define USECS_PER_JIFFY_FRAC (0x100000000*1000000/HZ&0xffffffff)
static unsigned long
--- 165,173 ----
/* This is for machines which generate the exact clock. */
#define USECS_PER_JIFFY (1000000/HZ)
! #define USECS_PER_JIFFY_FRAC ((1000000ULL << 32) / HZ & 0xffffffff)
!
! /* Cycle counter value at the previous timer interrupt.. */
+ static unsigned int timerhi = 0, timerlo = 0;
static unsigned long
|