Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/amiga Recognize Amiga 600 model.
details: https://anonhg.NetBSD.org/src/rev/0d00fd3bb2bb
branches: trunk
changeset: 760826:0d00fd3bb2bb
user: phx <phx%NetBSD.org@localhost>
date: Thu Jan 13 22:02:05 2011 +0000
description:
Recognize Amiga 600 model.
Patch submited by Radoslaw Kujawa.
diffstat:
sys/arch/amiga/amiga/autoconf.c | 16 ++++++++++++----
sys/arch/amiga/amiga/machdep.c | 6 ++++--
sys/arch/amiga/dev/gayle_pcmcia.c | 6 +++---
sys/arch/amiga/dev/wdc_amiga.c | 7 ++++---
sys/arch/amiga/include/cpu.h | 14 +++++++-------
sys/arch/amiga/stand/bootblock/boot/main.c | 12 +++++++++---
6 files changed, 39 insertions(+), 22 deletions(-)
diffs (202 lines):
diff -r 8c082394f87f -r 0d00fd3bb2bb sys/arch/amiga/amiga/autoconf.c
--- a/sys/arch/amiga/amiga/autoconf.c Thu Jan 13 21:54:14 2011 +0000
+++ b/sys/arch/amiga/amiga/autoconf.c Thu Jan 13 22:02:05 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: autoconf.c,v 1.105 2010/05/21 12:56:47 phx Exp $ */
+/* $NetBSD: autoconf.c,v 1.106 2011/01/13 22:02:05 phx Exp $ */
/*
* Copyright (c) 1994 Christian E. Hopps
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.105 2010/05/21 12:56:47 phx Exp $");
+__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.106 2011/01/13 22:02:05 phx Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -284,13 +284,13 @@
config_found(dp, __UNCONST("amidisplaycc"), simple_devprint);
config_found(dp, __UNCONST("fdc"), simple_devprint);
}
- if (is_a4000() || is_a1200())
+ if (is_a4000() || is_a1200() || is_a600())
config_found(dp, __UNCONST("wdc"), simple_devprint);
if (is_a4000()) /* Try to configure A4000T SCSI */
config_found(dp, __UNCONST("afsc"), simple_devprint);
if (is_a3000())
config_found(dp, __UNCONST("ahsc"), simple_devprint);
- if (/*is_a600() || */is_a1200())
+ if (is_a600() || is_a1200())
config_found(dp, __UNCONST("pccard"), simple_devprint);
#ifdef DRACO
if (!is_draco())
@@ -571,3 +571,11 @@
return (1); /* It's an A1200 */
return (0); /* Machine type not set */
}
+
+int
+is_a600()
+{
+ if ((machineid >> 16) == 600)
+ return (1); /* It's an A600 */
+ return (0); /* Machine type not set */
+}
diff -r 8c082394f87f -r 0d00fd3bb2bb sys/arch/amiga/amiga/machdep.c
--- a/sys/arch/amiga/amiga/machdep.c Thu Jan 13 21:54:14 2011 +0000
+++ b/sys/arch/amiga/amiga/machdep.c Thu Jan 13 22:02:05 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.227 2010/10/16 17:10:42 tsutsui Exp $ */
+/* $NetBSD: machdep.c,v 1.228 2011/01/13 22:02:05 phx Exp $ */
/*
* Copyright (c) 1982, 1986, 1990 The Regents of the University of California.
@@ -87,7 +87,7 @@
#include "opt_m68k_arch.h"
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.227 2010/10/16 17:10:42 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.228 2011/01/13 22:02:05 phx Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -393,6 +393,8 @@
mach = "Amiga 3000";
else if (is_a1200())
mach = "Amiga 1200";
+ else if (is_a600())
+ mach = "Amiga 600";
else
mach = "Amiga 500/2000";
diff -r 8c082394f87f -r 0d00fd3bb2bb sys/arch/amiga/dev/gayle_pcmcia.c
--- a/sys/arch/amiga/dev/gayle_pcmcia.c Thu Jan 13 21:54:14 2011 +0000
+++ b/sys/arch/amiga/dev/gayle_pcmcia.c Thu Jan 13 22:02:05 2011 +0000
@@ -1,9 +1,9 @@
-/* $NetBSD: gayle_pcmcia.c,v 1.23 2007/10/17 19:53:15 garbled Exp $ */
+/* $NetBSD: gayle_pcmcia.c,v 1.24 2011/01/13 22:02:05 phx Exp $ */
/* public domain */
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: gayle_pcmcia.c,v 1.23 2007/10/17 19:53:15 garbled Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gayle_pcmcia.c,v 1.24 2011/01/13 22:02:05 phx Exp $");
/* PCMCIA front-end driver for A1200's and A600's. */
@@ -102,7 +102,7 @@
pccard_probe(struct device *dev, struct cfdata *cfd, void *aux)
{
- return (/*is_a600() || */is_a1200()) && matchname(aux, "pccard");
+ return (is_a600() || is_a1200()) && matchname(aux, "pccard");
}
static void
diff -r 8c082394f87f -r 0d00fd3bb2bb sys/arch/amiga/dev/wdc_amiga.c
--- a/sys/arch/amiga/dev/wdc_amiga.c Thu Jan 13 21:54:14 2011 +0000
+++ b/sys/arch/amiga/dev/wdc_amiga.c Thu Jan 13 22:02:05 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: wdc_amiga.c,v 1.31 2008/04/28 20:23:12 martin Exp $ */
+/* $NetBSD: wdc_amiga.c,v 1.32 2011/01/13 22:02:05 phx Exp $ */
/*-
* Copyright (c) 2000, 2003 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wdc_amiga.c,v 1.31 2008/04/28 20:23:12 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wdc_amiga.c,v 1.32 2011/01/13 22:02:05 phx Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -75,7 +75,8 @@
int
wdc_amiga_probe(device_t parent, cfdata_t cfp, void *aux)
{
- if ((!is_a4000() && !is_a1200()) || !matchname(aux, "wdc"))
+ if ((!is_a4000() && !is_a1200() && !is_a600()) ||
+ !matchname(aux, "wdc"))
return(0);
return 1;
}
diff -r 8c082394f87f -r 0d00fd3bb2bb sys/arch/amiga/include/cpu.h
--- a/sys/arch/amiga/include/cpu.h Thu Jan 13 21:54:14 2011 +0000
+++ b/sys/arch/amiga/include/cpu.h Thu Jan 13 22:02:05 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.h,v 1.76 2010/12/22 02:42:27 matt Exp $ */
+/* $NetBSD: cpu.h,v 1.77 2011/01/13 22:02:05 phx Exp $ */
/*
* Copyright (c) 1982, 1990 The Regents of the University of California.
@@ -78,12 +78,6 @@
#ifndef _MACHINE_CPU_H_
#define _MACHINE_CPU_H_
-#if defined(_KERNEL)
-
-/*
- * Exported definitions unique to amiga/68k cpu support.
- */
-
#if defined(_KERNEL_OPT)
#include "opt_lockdebug.h"
#endif
@@ -92,6 +86,11 @@
* Get common m68k CPU definitions.
*/
#include <m68k/cpu.h>
+
+#if defined(_KERNEL)
+/*
+ * Exported definitions unique to amiga/68k cpu support.
+ */
#define M68K_MMU_MOTOROLA
extern volatile unsigned int interrupt_depth;
@@ -167,6 +166,7 @@
/*
* Prototypes from autoconf.c
*/
+int is_a600(void);
int is_a1200(void);
int is_a3000(void);
int is_a4000(void);
diff -r 8c082394f87f -r 0d00fd3bb2bb sys/arch/amiga/stand/bootblock/boot/main.c
--- a/sys/arch/amiga/stand/bootblock/boot/main.c Thu Jan 13 21:54:14 2011 +0000
+++ b/sys/arch/amiga/stand/bootblock/boot/main.c Thu Jan 13 22:02:05 2011 +0000
@@ -1,5 +1,5 @@
/*
- * $NetBSD: main.c,v 1.25 2009/11/15 20:38:35 snj Exp $
+ * $NetBSD: main.c,v 1.26 2011/01/13 22:02:06 phx Exp $
*
*
* Copyright (c) 1996,1999 Ignatios Souvatzis
@@ -544,7 +544,11 @@
int
get_cpuid(u_int32_t *cpuid)
{
+ uint8_t alicerev;
+
+ alicerev = *((uint8_t *)0xdff004) & 0x6f;
*cpuid |= SysBase->AttnFlags; /* get FPU and CPU flags */
+
if (*cpuid & 0xffff0000) {
if ((*cpuid >> 24) == 0x7D)
return 0;
@@ -571,8 +575,10 @@
|| (SysBase->LibNode.Version == 36))
*cpuid |= 3000 << 16;
else if (OpenResource("card.resource")) {
- /* Test for AGA? */
- *cpuid |= 1200 << 16;
+ if (alicerev == 0x22 || alicerev == 0x23)
+ *cpuid |= 1200 << 16; /* AGA + PCMCIA = A1200 */
+ else
+ *cpuid |= 600 << 16; /* noAGA + PCMCIA = A600 */
} else if (OpenResource("draco.resource")) {
*cpuid |= (32000 | DRACOREVISION) << 16;
}
Home |
Main Index |
Thread Index |
Old Index