|
From: Andy P. <at...@us...> - 2002-04-10 18:30:42
|
Update of /cvsroot/linux-vax/kernel-2.4/arch/ppc/amiga
In directory usw-pr-cvs1:/tmp/cvs-serv25860/ppc/amiga
Modified Files:
Makefile amiga_ksyms.c amiints.c amisound.c bootinfo.c
chipram.c cia.c config.c ints.c pcmcia.c time.c
Log Message:
synch 2.4.15 commit 43
Index: Makefile
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/arch/ppc/amiga/Makefile,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- Makefile 14 Jan 2001 19:32:36 -0000 1.1.1.1
+++ Makefile 10 Apr 2002 15:03:56 -0000 1.2
@@ -1,3 +1,5 @@
+# BK Id: SCCS/s.Makefile 1.5 05/21/01 00:48:24 cort
+#
#
# Makefile for Linux arch/m68k/amiga source directory
#
@@ -14,6 +16,6 @@
obj-y := config.o amiints.o cia.o time.o bootinfo.o amisound.o \
chipram.o amiga_ksyms.o
-obj-$(CONFIG_AMIGA_PCMCIA) += pcmia.o
+obj-$(CONFIG_AMIGA_PCMCIA) += pcmcia.o
include $(TOPDIR)/Rules.make
Index: amiga_ksyms.c
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/arch/ppc/amiga/amiga_ksyms.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- amiga_ksyms.c 14 Jan 2001 19:32:36 -0000 1.1.1.1
+++ amiga_ksyms.c 10 Apr 2002 15:03:56 -0000 1.2
@@ -1 +1,4 @@
+/*
+ * BK Id: SCCS/s.amiga_ksyms.c 1.5 05/17/01 18:14:20 cort
+ */
#include "../../m68k/amiga/amiga_ksyms.c"
Index: amiints.c
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/arch/ppc/amiga/amiints.c,v
retrieving revision 1.1.1.2
retrieving revision 1.2
diff -u -r1.1.1.2 -r1.2
--- amiints.c 25 Feb 2001 23:15:18 -0000 1.1.1.2
+++ amiints.c 10 Apr 2002 15:03:56 -0000 1.2
@@ -1,4 +1,7 @@
/*
+ * BK Id: SCCS/s.amiints.c 1.8 05/21/01 00:48:24 cort
+ */
+/*
* linux/arch/m68k/amiga/amiints.c -- Amiga Linux interrupt handling code
*
* This file is subject to the terms and conditions of the GNU General Public
@@ -255,9 +258,10 @@
return;
}
- if (irq >= IRQ_AMIGA_AUTO)
+ if (irq >= IRQ_AMIGA_AUTO) {
sys_free_irq(irq - IRQ_AMIGA_AUTO, dev_id);
-
+ return;
+ }
if (irq >= IRQ_AMIGA_CIAA) {
cia_free_irq(irq, dev_id);
return;
@@ -295,7 +299,10 @@
return;
}
- if (--ami_ablecount[irq])
+ ami_ablecount[irq]--;
+ if (ami_ablecount[irq]<0)
+ ami_ablecount[irq]=0;
+ else if (ami_ablecount[irq])
return;
/* No action for auto-vector interrupts */
@@ -347,64 +354,16 @@
ami_irq_list[irq]->handler(irq, ami_irq_list[irq]->dev_id, fp);
}
-void amiga_do_irq_list(int irq, struct pt_regs *fp, struct irq_server *server)
+void amiga_do_irq_list(int irq, struct pt_regs *fp)
{
- irq_node_t *node, *slow_nodes;
- unsigned short intena;
- unsigned long flags;
+ irq_node_t *node;
kstat.irqs[0][SYS_IRQS + irq]++;
- if (server->count++)
- server->reentrance = 1;
-
- intena = ami_intena_vals[irq];
- custom.intreq = intena;
- /* serve first fast handlers - there can only be one of these */
- node = ami_irq_list[irq];
-
- /*
- * Timer interrupts show up like this
- */
- if (!node) {
- server->count--;
- return;
- }
+ custom.intreq = ami_intena_vals[irq];
- if (node && (node->flags & SA_INTERRUPT)) {
- save_flags(flags);
- cli();
+ for (node = ami_irq_list[irq]; node; node = node->next)
node->handler(irq, node->dev_id, fp);
- restore_flags(flags);
-
- server->count--;
- return;
- }
-
- /*
- * Disable the interrupt source in question and reenable all
- * other interrupts. No interrupt handler should ever touch
- * the intena flags directly!
- */
- custom.intena = intena;
- save_flags(flags);
- sti();
-
- slow_nodes = node;
- for (;;) {
- for (; node; node = node->next)
- node->handler(irq, node->dev_id, fp);
-
- if (!server->reentrance) {
- server->count--;
- restore_flags(flags);
- custom.intena = IF_SETCLR | intena;
- return;
- }
-
- server->reentrance = 0;
- node = slow_nodes;
- }
}
/*
@@ -437,7 +396,6 @@
static void ami_int3(int irq, void *dev_id, struct pt_regs *fp)
{
unsigned short ints = custom.intreqr & custom.intenar;
- static struct irq_server server = {0, 0};
/* if a blitter interrupt */
if (ints & IF_BLIT) {
@@ -453,7 +411,7 @@
/* if a vertical blank interrupt */
if (ints & IF_VERTB)
- amiga_do_irq_list(IRQ_AMIGA_VERTB, fp, &server);
+ amiga_do_irq_list(IRQ_AMIGA_VERTB, fp);
}
static void ami_int4(int irq, void *dev_id, struct pt_regs *fp)
@@ -512,7 +470,7 @@
and executes them in a loop. Having ami_badint at the end of the chain
is a bad idea. */
void (*amiga_default_handler[SYS_IRQS])(int, void *, struct pt_regs *) = {
- NULL, ami_int1, NULL, NULL /* FB expects to replace ami_int3*/,
+ NULL, ami_int1, NULL, ami_int3,
ami_int4, ami_int5, NULL, ami_int7
};
#else
Index: amisound.c
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/arch/ppc/amiga/amisound.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- amisound.c 14 Jan 2001 19:32:38 -0000 1.1.1.1
+++ amisound.c 10 Apr 2002 15:03:56 -0000 1.2
@@ -1 +1,4 @@
+/*
+ * BK Id: SCCS/s.amisound.c 1.5 05/17/01 18:14:20 cort
+ */
#include "../../m68k/amiga/amisound.c"
Index: bootinfo.c
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/arch/ppc/amiga/bootinfo.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- bootinfo.c 14 Jan 2001 19:32:38 -0000 1.1.1.1
+++ bootinfo.c 10 Apr 2002 15:03:56 -0000 1.2
@@ -1,4 +1,7 @@
/*
+ * BK Id: SCCS/s.bootinfo.c 1.5 05/17/01 18:14:20 cort
+ */
+/*
* linux/arch/ppc/amiga/bootinfo.c
*
* Extracted from arch/m68k/kernel/setup.c.
Index: chipram.c
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/arch/ppc/amiga/chipram.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- chipram.c 14 Jan 2001 19:32:39 -0000 1.1.1.1
+++ chipram.c 10 Apr 2002 15:03:56 -0000 1.2
@@ -1,183 +1,4 @@
/*
-** linux/amiga/chipram.c
-**
-** Modified 03-May-94 by Geert Uytterhoeven <ge...@li...>
-** - 64-bit aligned allocations for full AGA compatibility
-*/
-
-#include <linux/config.h>
-#include <linux/types.h>
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <linux/zorro.h>
-#include <asm/amigahw.h>
-
-struct chip_desc {
- unsigned first : 1;
- unsigned last : 1;
- unsigned alloced : 1;
- unsigned length : 24;
- long pad; /* We suppose this makes this struct 64 bits long!! */
-};
-
-#define DP(ptr) ((struct chip_desc *)(ptr))
-
-u_long amiga_chip_size;
-static unsigned long chipavail;
-
-static struct resource chipram = { "Chip RAM", 0 };
-
-unsigned long amiga_chip_avail( void )
-{
-#ifdef DEBUG
- printk("chip_avail : %ld bytes\n",chipavail);
-#endif
- return chipavail;
-}
-
-
-void __init amiga_chip_init (void)
-{
- struct chip_desc *dp;
-
- if (!AMIGAHW_PRESENT(CHIP_RAM))
- return;
-
-#ifndef CONFIG_APUS_FAST_EXCEPT
- /*
- * Remove the first 4 pages where PPC exception handlers will
- * be located.
- */
- amiga_chip_size -= 0x4000;
-#endif
- chipram.end = amiga_chip_size-1;
- request_resource(&iomem_resource, &chipram);
-
- /* initialize start boundary */
-
- dp = DP(chipaddr);
- dp->first = 1;
-
- dp->alloced = 0;
- dp->length = amiga_chip_size - 2*sizeof(*dp);
-
- /* initialize end boundary */
- dp = DP(chipaddr + amiga_chip_size) - 1;
- dp->last = 1;
-
- dp->alloced = 0;
- dp->length = amiga_chip_size - 2*sizeof(*dp);
- chipavail = dp->length; /*MILAN*/
-
-#ifdef DEBUG
- printk ("chipram end boundary is %p, length is %d\n", dp,
- dp->length);
-#endif
-}
-
-void *amiga_chip_alloc(long size, const char *name)
-{
- /* last chunk */
- struct chip_desc *dp;
- void *ptr;
-
- /* round off */
- size = (size + 7) & ~7;
-
-#ifdef DEBUG
- printk("amiga_chip_alloc: allocate %ld bytes\n", size);
-#endif
-
- /*
- * get pointer to descriptor for last chunk by
- * going backwards from end chunk
- */
- dp = DP(chipaddr + amiga_chip_size) - 1;
- dp = DP((unsigned long)dp - dp->length) - 1;
-
- while ((dp->alloced || dp->length < size)
- && !dp->first)
- dp = DP ((unsigned long)dp - dp[-1].length) - 2;
-
- if (dp->alloced || dp->length < size) {
- printk ("no chipmem available for %ld allocation\n", size);
- return NULL;
- }
-
- if (dp->length < (size + 2*sizeof(*dp))) {
- /* length too small to split; allocate the whole thing */
- dp->alloced = 1;
- ptr = (void *)(dp+1);
- dp = DP((unsigned long)ptr + dp->length);
- dp->alloced = 1;
-#ifdef DEBUG
- printk ("amiga_chip_alloc: no split\n");
-#endif
- } else {
- /* split the extent; use the end part */
- long newsize = dp->length - (2*sizeof(*dp) + size);
-
-#ifdef DEBUG
- printk ("amiga_chip_alloc: splitting %d to %ld\n", dp->length,
- newsize);
-#endif
- dp->length = newsize;
- dp = DP((unsigned long)(dp+1) + newsize);
- dp->first = dp->last = 0;
- dp->alloced = 0;
- dp->length = newsize;
- dp++;
- dp->first = dp->last = 0;
- dp->alloced = 1;
- dp->length = size;
- ptr = (void *)(dp+1);
- dp = DP((unsigned long)ptr + size);
- dp->alloced = 1;
- dp->length = size;
- }
-
-#ifdef DEBUG
- printk ("amiga_chip_alloc: returning %p\n", ptr);
-#endif
-
- if ((unsigned long)ptr & 7)
- panic("amiga_chip_alloc: alignment violation\n");
-
- chipavail -= size + (2*sizeof(*dp)); /*MILAN*/
-
- if (!request_mem_region(ZTWO_PADDR(ptr), size, name))
- printk(KERN_WARNING "amiga_chip_alloc: region of size %ld at 0x%08lx "
- "is busy\n", size, ZTWO_PADDR(ptr));
-
- return ptr;
-}
-
-void amiga_chip_free (void *ptr)
-{
- struct chip_desc *sdp = DP(ptr) - 1, *dp2;
- struct chip_desc *edp = DP((unsigned long)ptr + sdp->length);
-
- chipavail += sdp->length + (2* sizeof(sdp)); /*MILAN*/
-#ifdef DEBUG
- printk("chip_free: free %ld bytes at %p\n",sdp->length,ptr);
-#endif
- /* deallocate the chunk */
- sdp->alloced = edp->alloced = 0;
- release_mem_region(ZTWO_PADDR(ptr), sdp->length);
-
- /* check if we should merge with the previous chunk */
- if (!sdp->first && !sdp[-1].alloced) {
- dp2 = DP((unsigned long)sdp - sdp[-1].length) - 2;
- dp2->length += sdp->length + 2*sizeof(*sdp);
- edp->length = dp2->length;
- sdp = dp2;
- }
-
- /* check if we should merge with the following chunk */
- if (!edp->last && !edp[1].alloced) {
- dp2 = DP((unsigned long)edp + edp[1].length) + 2;
- dp2->length += edp->length + 2*sizeof(*sdp);
- sdp->length = dp2->length;
- edp = dp2;
- }
-}
+ * BK Id: SCCS/s.chipram.c 1.7 05/21/01 00:49:49 cort
+ */
+#include "../../m68k/amiga/chipram.c"
Index: cia.c
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/arch/ppc/amiga/cia.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- cia.c 14 Jan 2001 19:32:39 -0000 1.1.1.1
+++ cia.c 10 Apr 2002 15:03:56 -0000 1.2
@@ -1,4 +1,7 @@
/*
+ * BK Id: SCCS/s.cia.c 1.7 05/21/01 00:48:24 cort
+ */
+/*
* linux/arch/m68k/amiga/cia.c - CIA support
*
* Copyright (C) 1996 Roman Zippel
@@ -27,18 +30,17 @@
u_short int_mask;
int handler_irq, cia_irq, server_irq;
char *name;
- struct irq_server server;
irq_handler_t irq_list[CIA_IRQS];
} ciaa_base = {
&ciaa, 0, 0, IF_PORTS,
IRQ_AMIGA_AUTO_2, IRQ_AMIGA_CIAA,
IRQ_AMIGA_PORTS,
- "CIAA handler", {0, 0}
+ "CIAA handler"
}, ciab_base = {
&ciab, 0, 0, IF_EXTER,
IRQ_AMIGA_AUTO_6, IRQ_AMIGA_CIAB,
IRQ_AMIGA_EXTER,
- "CIAB handler", {0, 0}
+ "CIAB handler"
};
#define CIA_SET_BASE_ADJUST_IRQ(base, irq) \
@@ -197,7 +199,7 @@
}
ints >>= 1;
}
- amiga_do_irq_list(base->server_irq, fp, &base->server);
+ amiga_do_irq_list(base->server_irq, fp);
}
void __init cia_init_IRQ(struct ciabase *base)
Index: config.c
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/arch/ppc/amiga/config.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- config.c 14 Jan 2001 19:32:43 -0000 1.1.1.1
+++ config.c 10 Apr 2002 15:03:56 -0000 1.2
@@ -1,12 +1,8 @@
+/*
+ * BK Id: SCCS/s.config.c 1.12 09/18/01 11:19:06 paulus
+ */
#define m68k_debug_device debug_device
-#include <linux/init.h>
-
-/* machine dependent "kbd-reset" setup function */
-void (*mach_kbd_reset_setup) (char *, int) __initdata = 0;
-
-#include <asm/io.h>
-
/*
* linux/arch/m68k/amiga/config.c
*
@@ -28,6 +24,10 @@
#include <linux/kd.h>
#include <linux/tty.h>
#include <linux/console.h>
+#include <linux/init.h>
+#ifdef CONFIG_ZORRO
+#include <linux/zorro.h>
+#endif
#include <asm/bootinfo.h>
#include <asm/setup.h>
@@ -36,10 +36,12 @@
#include <asm/amigahw.h>
#include <asm/amigaints.h>
#include <asm/irq.h>
+#include <asm/keyboard.h>
#include <asm/machdep.h>
-#include <linux/zorro.h>
+#include <asm/io.h>
unsigned long powerup_PCI_present;
+unsigned long powerup_BPPCPLUS_present;
unsigned long amiga_model;
unsigned long amiga_eclock;
unsigned long amiga_masterclock;
@@ -49,22 +51,22 @@
unsigned char amiga_psfreq;
struct amiga_hw_present amiga_hw_present;
-static const char s_a500[] __initdata = "A500";
-static const char s_a500p[] __initdata = "A500+";
-static const char s_a600[] __initdata = "A600";
-static const char s_a1000[] __initdata = "A1000";
-static const char s_a1200[] __initdata = "A1200";
-static const char s_a2000[] __initdata = "A2000";
-static const char s_a2500[] __initdata = "A2500";
-static const char s_a3000[] __initdata = "A3000";
-static const char s_a3000t[] __initdata = "A3000T";
-static const char s_a3000p[] __initdata = "A3000+";
-static const char s_a4000[] __initdata = "A4000";
-static const char s_a4000t[] __initdata = "A4000T";
-static const char s_cdtv[] __initdata = "CDTV";
-static const char s_cd32[] __initdata = "CD32";
-static const char s_draco[] __initdata = "Draco";
-static const char *amiga_models[] __initdata = {
+static char s_a500[] __initdata = "A500";
+static char s_a500p[] __initdata = "A500+";
+static char s_a600[] __initdata = "A600";
+static char s_a1000[] __initdata = "A1000";
+static char s_a1200[] __initdata = "A1200";
+static char s_a2000[] __initdata = "A2000";
+static char s_a2500[] __initdata = "A2500";
+static char s_a3000[] __initdata = "A3000";
+static char s_a3000t[] __initdata = "A3000T";
+static char s_a3000p[] __initdata = "A3000+";
+static char s_a4000[] __initdata = "A4000";
+static char s_a4000t[] __initdata = "A4000T";
+static char s_cdtv[] __initdata = "CDTV";
+static char s_cd32[] __initdata = "CD32";
+static char s_draco[] __initdata = "Draco";
+static char *amiga_models[] __initdata = {
s_a500, s_a500p, s_a600, s_a1000, s_a1200, s_a2000, s_a2500, s_a3000,
s_a3000t, s_a3000p, s_a4000, s_a4000t, s_cdtv, s_cd32, s_draco,
};
@@ -121,7 +123,7 @@
};
#ifdef CONFIG_MAGIC_SYSRQ
-static char amiga_sysrq_xlate[128] =
+char amiga_sysrq_xlate[128] =
"\0001234567890-=\\\000\000" /* 0x00 - 0x0f */
"qwertyuiop[]\000123" /* 0x10 - 0x1f */
"asdfghjkl;'\000\000456" /* 0x20 - 0x2f */
@@ -139,16 +141,18 @@
* Motherboard Resources present in all Amiga models
*/
-static struct resource mb_res[] = {
- { "Ranger Memory", 0x00c00000, 0x00c7ffff },
- { "CIA B", 0x00bfd000, 0x00bfdfff },
- { "CIA A", 0x00bfe000, 0x00bfefff },
- { "Custom I/O", 0x00dff000, 0x00dfffff },
- { "Kickstart ROM", 0x00f80000, 0x00ffffff }
+static struct {
+ struct resource _ciab, _ciaa, _custom, _kickstart;
+} mb_resources = {
+// { "Ranger Memory", 0x00c00000, 0x00c7ffff },
+ _ciab: { "CIA B", 0x00bfd000, 0x00bfdfff },
+ _ciaa: { "CIA A", 0x00bfe000, 0x00bfefff },
+ _custom: { "Custom I/O", 0x00dff000, 0x00dfffff },
+ _kickstart: { "Kickstart ROM", 0x00f80000, 0x00ffffff }
};
static struct resource rtc_resource = {
- "A2000 RTC", 0x00dc0000, 0x00dcffff
+ NULL, 0x00dc0000, 0x00dcffff
};
static struct resource ram_resource[NUM_MEMINFO];
@@ -194,6 +198,7 @@
break;
case BI_AMIGA_AUTOCON:
+#ifdef CONFIG_ZORRO
if (zorro_num_autocon < ZORRO_NUM_AUTO) {
const struct ConfigDev *cd = (struct ConfigDev *)data;
struct zorro_dev *dev = &zorro_autocon[zorro_num_autocon++];
@@ -204,12 +209,21 @@
dev->resource.end = dev->resource.start+cd->cd_BoardSize-1;
} else
printk("amiga_parse_bootinfo: too many AutoConfig devices\n");
+#endif /* CONFIG_ZORRO */
break;
case BI_AMIGA_SERPER:
/* serial port period: ignored here */
break;
+ case BI_AMIGA_PUP_BRIDGE:
+ powerup_PCI_present = *(const unsigned short *)data;
+ break;
+
+ case BI_AMIGA_BPPC_SCSI:
+ powerup_BPPCPLUS_present = *(const unsigned short *)data;
+ break;
+
default:
unknown = 1;
}
@@ -392,11 +406,8 @@
/* Some APUS boxes may have PCI memory, but ... */
iomem_resource.name = "Memory";
- request_resource(&iomem_resource, &ranger_resource);
- request_resource(&iomem_resource, &ciab_resource);
- request_resource(&iomem_resource, &ciaa_resource);
- request_resource(&iomem_resource, &custom_chips_resource);
- request_resource(&iomem_resource, &kickstart_resource);
+ for (i = 0; i < 4; i++)
+ request_resource(&iomem_resource, &((struct resource *)&mb_resources)[i]);
mach_sched_init = amiga_sched_init;
mach_keyb_init = amiga_keyb_init;
@@ -415,11 +426,12 @@
mach_gettimeoffset = amiga_gettimeoffset;
if (AMIGAHW_PRESENT(A3000_CLK)){
mach_gettod = a3000_gettod;
- rtc_resource.name[1] = '3';
+ rtc_resource.name = "A3000 RTC";
request_resource(&iomem_resource, &rtc_resource);
}
else{ /* if (AMIGAHW_PRESENT(A2000_CLK)) */
mach_gettod = a2000_gettod;
+ rtc_resource.name = "A2000 RTC";
request_resource(&iomem_resource, &rtc_resource);
}
@@ -439,14 +451,10 @@
mach_floppy_setup = amiga_floppy_setup;
#endif
mach_reset = amiga_reset;
+#ifdef CONFIG_DUMMY_CONSOLE
conswitchp = &dummy_con;
- kd_mksound = amiga_mksound;
-#ifdef CONFIG_MAGIC_SYSRQ
- mach_sysrq_key = 0x5f; /* HELP */
- mach_sysrq_shift_state = 0x03; /* SHIFT+ALTGR */
- mach_sysrq_shift_mask = 0xff; /* all modifiers except CapsLock */
- mach_sysrq_xlate = amiga_sysrq_xlate;
#endif
+ kd_mksound = amiga_mksound;
#ifdef CONFIG_HEARTBEAT
mach_heartbeat = amiga_heartbeat;
#endif
@@ -500,11 +508,14 @@
static unsigned short jiffy_ticks;
static void __init amiga_sched_init(void (*timer_routine)(int, void *,
- struct pt_regs *))
+ struct pt_regs *))
{
+ static struct resource sched_res = {
+ "timer", 0x00bfd400, 0x00bfd5ff,
+ };
jiffy_ticks = (amiga_eclock+HZ/2)/HZ;
- if (!request_mem_region(CIAB_PHYSADDR+0x400, 0x200, "timer"))
+ if (request_resource(&mb_resources._ciab, &sched_res))
printk("Cannot allocate ciab.ta{lo,hi}\n");
ciab.cra &= 0xC0; /* turn off timer A, continuous mode, from Eclk */
ciab.talo = jiffy_ticks % 256;
@@ -612,6 +623,8 @@
t->wday = tod->weekday;
t->mon = tod->month1 * 10 + tod->month2 - 1;
t->year = tod->year1 * 10 + tod->year2;
+ if (t->year <= 69)
+ t->year += 100;
} else {
tod->second1 = t->sec / 10;
tod->second2 = t->sec % 10;
@@ -625,6 +638,8 @@
tod->weekday = t->wday;
tod->month1 = (t->mon + 1) / 10;
tod->month2 = (t->mon + 1) % 10;
+ if (t->year >= 100)
+ t->year -= 100;
tod->year1 = t->year / 10;
tod->year2 = t->year % 10;
}
@@ -646,6 +661,8 @@
t->wday = tod->weekday;
t->mon = tod->month1 * 10 + tod->month2 - 1;
t->year = tod->year1 * 10 + tod->year2;
+ if (t->year <= 69)
+ t->year += 100;
if (!(tod->cntrl3 & TOD2000_CNTRL3_24HMODE)){
if (!(tod->hour1 & TOD2000_HOUR1_PM) && t->hour == 12)
@@ -672,6 +689,8 @@
tod->weekday = t->wday;
tod->month1 = (t->mon + 1) / 10;
tod->month2 = (t->mon + 1) % 10;
+ if (t->year >= 100)
+ t->year -= 100;
tod->year1 = t->year / 10;
tod->year2 = t->year % 10;
}
@@ -743,20 +762,6 @@
return 0;
}
-void dbprintf(const char *fmt , ...)
-{
- static char buf[1024];
- va_list args;
- extern void console_print (const char *str);
- extern int vsprintf(char * buf, const char * fmt, va_list args);
-
- va_start(args, fmt);
- vsprintf(buf, fmt, args);
- va_end(args);
-
- console_print (buf);
-}
-
static NORET_TYPE void amiga_reset( void )
ATTRIB_NORET;
@@ -796,7 +801,9 @@
static void amiga_savekmsg_init(void)
{
- savekmsg = (struct savekmsg *)amiga_chip_alloc(SAVEKMSG_MAXMEM, "Debug");
+ static struct resource debug_res = { "Debug" };
+
+ savekmsg = amiga_chip_alloc_res(SAVEKMSG_MAXMEM, &debug_res);
savekmsg->magic1 = SAVEKMSG_MAGIC1;
savekmsg->magic2 = SAVEKMSG_MAGIC2;
savekmsg->magicptr = virt_to_phys(savekmsg);
Index: ints.c
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/arch/ppc/amiga/ints.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- ints.c 14 Jan 2001 19:32:44 -0000 1.1.1.1
+++ ints.c 10 Apr 2002 15:03:56 -0000 1.2
@@ -1,4 +1,7 @@
/*
+ * BK Id: SCCS/s.ints.c 1.5 05/17/01 18:14:20 cort
+ */
+/*
* linux/arch/ppc/amiga/ints.c
*
* Linux/m68k general interrupt handling code from arch/m68k/kernel/ints.c
Index: pcmcia.c
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/arch/ppc/amiga/pcmcia.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- pcmcia.c 14 Jan 2001 19:32:44 -0000 1.1.1.1
+++ pcmcia.c 10 Apr 2002 15:03:56 -0000 1.2
@@ -1 +1,4 @@
+/*
+ * BK Id: SCCS/s.pcmcia.c 1.5 05/17/01 18:14:20 cort
+ */
#include "../../m68k/amiga/pcmcia.c"
Index: time.c
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/arch/ppc/amiga/time.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- time.c 14 Jan 2001 19:32:44 -0000 1.1.1.1
+++ time.c 10 Apr 2002 15:03:56 -0000 1.2
@@ -1,3 +1,6 @@
+/*
+ * BK Id: SCCS/s.time.c 1.5 05/17/01 18:14:20 cort
+ */
#include <linux/config.h> /* CONFIG_HEARTBEAT */
#include <linux/errno.h>
#include <linux/sched.h>
|