[BACK]Return to cpu_mainbus.c CVS log [TXT][DIR] Up to [local] / sys / arch / arm / mainbus

Annotation of sys/arch/arm/mainbus/cpu_mainbus.c, Revision 1.1

1.1     ! nbrk        1: /*     $OpenBSD: cpu_mainbus.c,v 1.1 2004/02/01 05:09:49 drahn Exp $   */
        !             2: /*     $NetBSD: cpu_mainbus.c,v 1.3 2002/01/05 22:41:48 chris Exp $    */
        !             3:
        !             4: /*
        !             5:  * Copyright (c) 1995 Mark Brinicombe.
        !             6:  * Copyright (c) 1995 Brini.
        !             7:  * All rights reserved.
        !             8:  *
        !             9:  * Redistribution and use in source and binary forms, with or without
        !            10:  * modification, are permitted provided that the following conditions
        !            11:  * are met:
        !            12:  * 1. Redistributions of source code must retain the above copyright
        !            13:  *    notice, this list of conditions and the following disclaimer.
        !            14:  * 2. Redistributions in binary form must reproduce the above copyright
        !            15:  *    notice, this list of conditions and the following disclaimer in the
        !            16:  *    documentation and/or other materials provided with the distribution.
        !            17:  * 3. All advertising materials mentioning features or use of this software
        !            18:  *    must display the following acknowledgement:
        !            19:  *     This product includes software developed by Brini.
        !            20:  * 4. The name of the company nor the name of the author may be used to
        !            21:  *    endorse or promote products derived from this software without specific
        !            22:  *    prior written permission.
        !            23:  *
        !            24:  * THIS SOFTWARE IS PROVIDED BY BRINI ``AS IS'' AND ANY EXPRESS OR IMPLIED
        !            25:  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
        !            26:  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
        !            27:  * IN NO EVENT SHALL BRINI OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
        !            28:  * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
        !            29:  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
        !            30:  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
        !            31:  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
        !            32:  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
        !            33:  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
        !            34:  * SUCH DAMAGE.
        !            35:  *
        !            36:  * RiscBSD kernel project
        !            37:  *
        !            38:  * cpu.c
        !            39:  *
        !            40:  * Probing and configuration for the master cpu
        !            41:  *
        !            42:  * Created      : 10/10/95
        !            43:  */
        !            44:
        !            45: #include <sys/param.h>
        !            46: #include <sys/systm.h>
        !            47: #include <sys/malloc.h>
        !            48: #include <sys/device.h>
        !            49: #include <sys/proc.h>
        !            50: #if 0
        !            51: #include <uvm/uvm_extern.h>
        !            52: #include <machine/io.h>
        !            53: #include <machine/conf.h>
        !            54: #endif
        !            55: #include <machine/cpu.h>
        !            56: #if 0
        !            57: #include <arm/cpus.h>
        !            58: #include <arm/undefined.h>
        !            59: #endif
        !            60: #include <arm/mainbus/mainbus.h>
        !            61:
        !            62: /*
        !            63:  * Prototypes
        !            64:  */
        !            65: static int cpu_mainbus_match (struct device *, void *, void *);
        !            66: static void cpu_mainbus_attach (struct device *, struct device *, void *);
        !            67:
        !            68: /*
        !            69:  * int cpumatch(struct device *parent, struct cfdata *cf, void *aux)
        !            70:  */
        !            71:
        !            72: static int
        !            73: cpu_mainbus_match(struct device *parent, void *vcf, void *aux)
        !            74: {
        !            75:        struct mainbus_attach_args *ma = aux;
        !            76:        struct cfdata *cf = (struct cfdata *)vcf;
        !            77:
        !            78:        return (strcmp(cf->cf_driver->cd_name, ma->ma_name) == 0);
        !            79: }
        !            80:
        !            81: /*
        !            82:  * void cpusattach(struct device *parent, struct device *dev, void *aux)
        !            83:  *
        !            84:  * Attach the main cpu
        !            85:  */
        !            86:
        !            87: static void
        !            88: cpu_mainbus_attach(parent, self, aux)
        !            89:        struct device *parent;
        !            90:        struct device *self;
        !            91:        void *aux;
        !            92: {
        !            93:        cpu_attach(self);
        !            94: }
        !            95:
        !            96: struct cfattach cpu_mainbus_ca = {
        !            97:        sizeof(struct device), cpu_mainbus_match, cpu_mainbus_attach
        !            98: };
        !            99:
        !           100: struct cfdriver cpu_cd = {
        !           101:        NULL, "cpu", DV_DULL
        !           102: };

CVSweb