Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/evbppc Rearrange codes for OpenBlockS266 machine.



details:   https://anonhg.NetBSD.org/src/rev/2cda2f65d368
branches:  trunk
changeset: 579584:2cda2f65d368
user:      shige <shige%NetBSD.org@localhost>
date:      Fri Mar 18 14:12:34 2005 +0000

description:
Rearrange codes for OpenBlockS266 machine.

diffstat:

 sys/arch/evbppc/conf/files.obs405        |   10 +-
 sys/arch/evbppc/include/obs266.h         |   64 ++++++
 sys/arch/evbppc/include/obs405.h         |   27 +--
 sys/arch/evbppc/obs405/consinit.c        |    8 +-
 sys/arch/evbppc/obs405/dev/obsled.c      |   16 +-
 sys/arch/evbppc/obs405/machdep.c         |  294 -------------------------------
 sys/arch/evbppc/obs405/md_autoconf.c     |   58 ------
 sys/arch/evbppc/obs405/md_machdep.c      |  284 -----------------------------
 sys/arch/evbppc/obs405/obs266_autoconf.c |   47 ++++
 sys/arch/evbppc/obs405/obs266_machdep.c  |  286 ++++++++++++++++++++++++++++++
 sys/arch/evbppc/obs405/obs405_autoconf.c |   68 +++++++
 sys/arch/evbppc/obs405/obs405_machdep.c  |   96 ++++++++++
 12 files changed, 581 insertions(+), 677 deletions(-)

diffs (truncated from 1389 to 300 lines):

diff -r b20cf6bd6d36 -r 2cda2f65d368 sys/arch/evbppc/conf/files.obs405
--- a/sys/arch/evbppc/conf/files.obs405 Fri Mar 18 12:56:59 2005 +0000
+++ b/sys/arch/evbppc/conf/files.obs405 Fri Mar 18 14:12:34 2005 +0000
@@ -1,18 +1,18 @@
-#      $NetBSD: files.obs405,v 1.9 2005/01/24 18:47:37 shige Exp $
+#      $NetBSD: files.obs405,v 1.10 2005/03/18 14:12:34 shige Exp $
 #
 # obs405-specific configuration info
 
-file   arch/powerpc/ibm4xx/autoconf.c
 file   arch/powerpc/ibm4xx/ibm4xx_autoconf.c
 file   arch/powerpc/ibm4xx/ibm4xxgpx_autoconf.c
 file   arch/powerpc/ibm4xx/ibm40x_machdep.c
 file   arch/powerpc/ibm4xx/ibm4xx_machdep.c
 file   arch/powerpc/ibm4xx/intr.c
-file   arch/powerpc/ibm4xx/machdep.c
 file   arch/powerpc/ibm4xx/openbios/openbios.c
-file   arch/evbppc/obs405/md_autoconf.c
 file   arch/evbppc/obs405/consinit.c
-file   arch/evbppc/obs405/md_machdep.c
+file   arch/evbppc/obs405/obs266_autoconf.c
+file   arch/evbppc/obs405/obs266_machdep.c
+file   arch/evbppc/obs405/obs405_autoconf.c
+file   arch/evbppc/obs405/obs405_machdep.c
 
 device obsled
 attach  obsled at gpio
diff -r b20cf6bd6d36 -r 2cda2f65d368 sys/arch/evbppc/include/obs266.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/evbppc/include/obs266.h  Fri Mar 18 14:12:34 2005 +0000
@@ -0,0 +1,64 @@
+/*     $NetBSD: obs266.h,v 1.1 2005/03/18 14:12:34 shige Exp $ */
+
+/*
+ * Copyright 2004 Shigeyuki Fukushima.
+ * All rights reserved.
+ *
+ * Written by Shigeyuki Fukushima for The NetBSD Project.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above
+ *    copyright notice, this list of conditions and the following
+ *    disclaimer in the documentation and/or other materials provided
+ *    with the distribution.
+ * 3. The name of the author may not be used to endorse or promote
+ *    products derived from this software without specific prior
+ *    written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+ * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+ * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#ifndef        _EVBPPC_OBS266_H_
+#define        _EVBPPC_OBS266_H_
+
+#include <machine/obs405.h>
+
+/*
+ * Device Properties for OpenBlockS266 (IBM405GPr 266MHz)
+ */
+
+/* UART Clock */
+#define OBS266_COM_FREQ                (COM_FREQ * 4)  /* UART CLK 7.3728 MHz */
+
+/* OpenBlockS266 GPIO LED */
+#define OBS266_LED1            (1)
+#define OBS266_LED2            (2)
+#define OBS266_LED4            (4)
+#define OBS266_LED_ON          (OBS266_LED1 | OBS266_LED2 | OBS266_LED4)
+#define OBS266_LED_OFF         (~OBS266_LED1 & ~OBS266_LED2 & ~OBS266_LED4)
+
+#define OBS266_GPIO_LED1       (12)
+#define OBS266_GPIO_LED2       (13)
+#define OBS266_GPIO_LED4       (14)
+
+/*
+ * extern variables and functions
+ */
+extern void obs266_led_set(int led);
+
+#endif /* _EVBPPC_OBS266_H_ */
diff -r b20cf6bd6d36 -r 2cda2f65d368 sys/arch/evbppc/include/obs405.h
--- a/sys/arch/evbppc/include/obs405.h  Fri Mar 18 12:56:59 2005 +0000
+++ b/sys/arch/evbppc/include/obs405.h  Fri Mar 18 14:12:34 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: obs405.h,v 1.4 2005/01/24 18:47:37 shige Exp $ */
+/*     $NetBSD: obs405.h,v 1.5 2005/03/18 14:12:34 shige Exp $ */
 
 /*
  * Copyright 2004 Shigeyuki Fukushima.
@@ -66,30 +66,9 @@
 #include <dev/ic/comreg.h>
 
 /*
- * Device Properties for OpenBlockS
- */
-
-/* UART Clock */
-#define OBS405_COM_FREQ                (COM_FREQ * 4)  /* UART CLK 7.3728 MHz */
-
-/* GPIO LED */
-/* XXX: support only OpenBlockS266 LED */
-#define OBS405_LED1            (1)
-#define OBS405_LED2            (2)
-#define OBS405_LED4            (4)
-#define OBS405_LED_ON          (OBS405_LED1 | OBS405_LED2 | OBS405_LED4)
-#define OBS405_LED_OFF         (~OBS405_LED1 & ~OBS405_LED2 & ~OBS405_LED4)
-
-#define OBS405_GPIO_LED1       (12)
-#define OBS405_GPIO_LED2       (13)
-#define OBS405_GPIO_LED4       (14)
-
-/*
  * extern variables and functions
  */
-extern void obs405_consinit(void);
-extern void obs405_cpu_startup(void);
-extern void obs405_device_register(struct device *dev, void *aux);
-extern void obs405_led_set(int led);
+extern void obs405_consinit(int com_freq);
+extern void obs405_device_register(struct device *dev, void *aux, int com_freq);
 
 #endif /* _EVBPPC_OBS405_H_ */
diff -r b20cf6bd6d36 -r 2cda2f65d368 sys/arch/evbppc/obs405/consinit.c
--- a/sys/arch/evbppc/obs405/consinit.c Fri Mar 18 12:56:59 2005 +0000
+++ b/sys/arch/evbppc/obs405/consinit.c Fri Mar 18 14:12:34 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: consinit.c,v 1.3 2005/01/21 19:24:11 shige Exp $       */
+/*     $NetBSD: consinit.c,v 1.4 2005/03/18 14:12:34 shige Exp $       */
 
 /*
  * Copyright (c) 2004 Shigeyuki Fukushima.
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: consinit.c,v 1.3 2005/01/21 19:24:11 shige Exp $");
+__KERNEL_RCSID(0, "$NetBSD: consinit.c,v 1.4 2005/03/18 14:12:34 shige Exp $");
 
 #include <machine/obs405.h>
 #include <powerpc/ibm4xx/dev/comopbvar.h>
@@ -41,11 +41,11 @@
  *   Initialize the system console.
  */
 void
-obs405_consinit(void)
+obs405_consinit(int com_freq)
 {
 
 #if (NCOM > 0)
-       com_opb_cnattach(OBS405_COM_FREQ,
+       com_opb_cnattach(com_freq,
                OBS405_CONADDR, OBS405_CONSPEED, OBS405_CONMODE);
 #endif /* NCOM */
 }
diff -r b20cf6bd6d36 -r 2cda2f65d368 sys/arch/evbppc/obs405/dev/obsled.c
--- a/sys/arch/evbppc/obs405/dev/obsled.c       Fri Mar 18 12:56:59 2005 +0000
+++ b/sys/arch/evbppc/obs405/dev/obsled.c       Fri Mar 18 14:12:34 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: obsled.c,v 1.1 2005/01/24 18:47:37 shige Exp $ */
+/*     $NetBSD: obsled.c,v 1.2 2005/03/18 14:12:34 shige Exp $ */
 
 /*
  * Copyright (c) 2004 Shigeyuki Fukushima.
@@ -31,14 +31,14 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: obsled.c,v 1.1 2005/01/24 18:47:37 shige Exp $");
+__KERNEL_RCSID(0, "$NetBSD: obsled.c,v 1.2 2005/03/18 14:12:34 shige Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
 #include <sys/queue.h>
 #include <sys/systm.h>
 
-#include <machine/obs405.h>
+#include <machine/obs266.h>
 
 #include <powerpc/ibm4xx/dev/gpiovar.h>
 
@@ -60,11 +60,11 @@
         struct gpio_attach_args *ga = aux;
 
        /* XXX: support only OpenBlockS266 LED */
-        if (ga->ga_addr == OBS405_GPIO_LED1)
+        if (ga->ga_addr == OBS266_GPIO_LED1)
                 return (1);
-        else if (ga->ga_addr == OBS405_GPIO_LED2)
+        else if (ga->ga_addr == OBS266_GPIO_LED2)
                 return (1);
-        else if (ga->ga_addr == OBS405_GPIO_LED4)
+        else if (ga->ga_addr == OBS266_GPIO_LED4)
                 return (1);
 
         return (0);
@@ -83,7 +83,7 @@
         sc->sc_tag = ga->ga_tag;
         sc->sc_addr = ga->ga_addr;
 
-       obs405_led_set(OBS405_LED_OFF);
+       obs266_led_set(OBS266_LED_OFF);
 #if 0
        {
                gpio_tag_t tag = sc->sc_tag;
@@ -93,7 +93,7 @@
 }
 
 void
-obs405_led_set(int led)
+obs266_led_set(int led)
 {
        struct device *dp = NULL;
        struct devicelist *dlp = &alldevs;
diff -r b20cf6bd6d36 -r 2cda2f65d368 sys/arch/evbppc/obs405/machdep.c
--- a/sys/arch/evbppc/obs405/machdep.c  Fri Mar 18 12:56:59 2005 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,294 +0,0 @@
-/*     $NetBSD: machdep.c,v 1.3 2005/01/17 17:24:09 shige Exp $        */
-
-/*
- * Copyright 2001, 2002 Wasabi Systems, Inc.
- * All rights reserved.
- *
- * Written by Eduardo Horvath and Simon Burge for Wasabi Systems, Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *      This product includes software developed for the NetBSD Project by
- *      Wasabi Systems, Inc.
- * 4. The name of Wasabi Systems, Inc. may not be used to endorse
- *    or promote products derived from this software without specific prior
- *    written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL WASABI SYSTEMS, INC
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-/*
- * Copyright (C) 1995, 1996 Wolfgang Solfrank.
- * Copyright (C) 1995, 1996 TooLs GmbH.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *     This product includes software developed by TooLs GmbH.
- * 4. The name of TooLs GmbH may not be used to endorse or promote products
- *    derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY TOOLS GMBH ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL TOOLS GMBH BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-



Home | Main Index | Thread Index | Old Index