xref: /netbsd/sys/arch/riscv/riscv/cpu_mainbus.c (revision 305285c2)
1*305285c2Sskrll /*	$NetBSD: cpu_mainbus.c,v 1.2 2020/11/04 07:09:46 skrll Exp $	*/
2*305285c2Sskrll 
38d973866Smatt /*-
48d973866Smatt  * Copyright (c) 2014 The NetBSD Foundation, Inc.
58d973866Smatt  * All rights reserved.
68d973866Smatt  *
78d973866Smatt  * This code is derived from software contributed to The NetBSD Foundation
88d973866Smatt  * by Matt Thomas of 3am Software Foundry.
98d973866Smatt  *
108d973866Smatt  * Redistribution and use in source and binary forms, with or without
118d973866Smatt  * modification, are permitted provided that the following conditions
128d973866Smatt  * are met:
138d973866Smatt  * 1. Redistributions of source code must retain the above copyright
148d973866Smatt  *    notice, this list of conditions and the following disclaimer.
158d973866Smatt  * 2. Redistributions in binary form must reproduce the above copyright
168d973866Smatt  *    notice, this list of conditions and the following disclaimer in the
178d973866Smatt  *    documentation and/or other materials provided with the distribution.
188d973866Smatt  *
198d973866Smatt  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
208d973866Smatt  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
218d973866Smatt  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
228d973866Smatt  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
238d973866Smatt  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
248d973866Smatt  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
258d973866Smatt  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
268d973866Smatt  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
278d973866Smatt  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
288d973866Smatt  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
298d973866Smatt  * POSSIBILITY OF SUCH DAMAGE.
308d973866Smatt  */
318d973866Smatt 
328d973866Smatt #include <sys/cdefs.h>
338d973866Smatt 
34*305285c2Sskrll __RCSID("$NetBSD: cpu_mainbus.c,v 1.2 2020/11/04 07:09:46 skrll Exp $");
358d973866Smatt 
368d973866Smatt #include <sys/param.h>
378d973866Smatt #include <sys/systm.h>
388d973866Smatt #include <sys/device.h>
398d973866Smatt 
408d973866Smatt #include <riscv/locore.h>
418d973866Smatt 
428d973866Smatt static int cpu_mainbus_match(device_t, cfdata_t, void *);
438d973866Smatt static void cpu_mainbus_attach(device_t, device_t, void *);
448d973866Smatt 
458d973866Smatt CFATTACH_DECL_NEW(cpu_mainbus, 0,
468d973866Smatt     cpu_mainbus_match, cpu_mainbus_attach, NULL, NULL);
478d973866Smatt 
488d973866Smatt int
cpu_mainbus_match(device_t parent,cfdata_t cf,void * aux)498d973866Smatt cpu_mainbus_match(device_t parent, cfdata_t cf, void *aux)
508d973866Smatt {
518d973866Smatt 	struct mainbus_attach_args * const maa = aux;
528d973866Smatt 
538d973866Smatt 	if (strcmp(maa->maa_name, cf->cf_name))
548d973866Smatt 		return 0;
558d973866Smatt 
568d973866Smatt 	return 1;
578d973866Smatt }
588d973866Smatt 
598d973866Smatt void
cpu_mainbus_attach(device_t parent,device_t self,void * aux)608d973866Smatt cpu_mainbus_attach(device_t parent, device_t self, void *aux)
618d973866Smatt {
628d973866Smatt 
638d973866Smatt }
64