[BACK]Return to config.c CVS log [TXT][DIR] Up to [local] / funnyos / arch / testarm

File: [local] / funnyos / arch / testarm / config.c (download)

Revision 1.16, Fri Jan 11 15:22:09 2008 UTC (16 years, 3 months ago) by nbrk
Branch: MAIN
CVS Tags: HEAD
Changes since 1.15: +2 -2 lines

set intrno to 2 for tacons device

/*
 * $Id: config.c,v 1.16 2008/01/11 15:22:09 nbrk Exp $
 */
#include <sys/types.h>
#include <sys/device.h>
#include <sys/kern_sched.h>
/*
 * Configuration file for platform (testarm).
 */

/* device drivers */
extern struct driver root_dr;
extern struct driver cpu_dr;
extern struct driver obio_dr;
extern struct driver tacons_dr;
extern struct driver fcons_dr;
extern struct driver tartc_dr;
extern struct driver tairqc_dr;


/* putchar & early putchar */
extern void(*putchar)(char);
void 	tacons_early_putc(char ch);

/* tasks */
extern void hello_enter(void);
extern void hello2_enter(void);


/* amount of physical memory, in Bytes */
uint32_t physmem = 33554432;

/*
 * Where to attach each device.
 */
struct attachinfo config_attachinfo[] = {
	/* child,   parent, pminor, loc, 	intrno, flags */
	{ "cpu" , 	"root", 	0, 0, 			-1,	0 },
	{ "obio", 	"root", 	0, 0, 			-1,	0 },
	{ "tacons",	"obio", 	0, 0x10000000, 	2,	0 },
	{ "tartc", 	"obio", 	0, 0x15000000, 	4,  0 },
	{ "tairqc", "obio",		0, 0x16000000, 	-1,	0 },
	{ "fcons", 	"tacons", 	0, 0, 			-1,	0 },
	{ NULL, 	NULL, 		0, 0, 			-1,  0 }
};


/*
 * Link device names with their drivers.
 */
struct driverinfo config_driverinfo[] = {
/* name, driverp, ninstances (should be -1) */
	{ "root", &root_dr, -1 },
	{ "obio", &obio_dr, -1 },
	{ "cpu" , &cpu_dr, -1 },
	{ "tacons", &tacons_dr, -1 },
	{ "tartc", &tartc_dr, -1 },
	{ "fcons", &fcons_dr, -1 },
	{ "tairqc", &tairqc_dr, -1 },
	{ NULL, NULL, 0 }
};


/*
 * Tasks.
 */
struct u_task config_tasklist[] = {
/* name, priority, enter */
	{ "hello", 1, hello_enter },
	{ "hello2",1, hello2_enter },
	{ NULL,    0, NULL }
};


/*
 * Machine early-stage initialization hooks.
 */

void
config_machineinit(void)
{
	/*
	 * Configure putchar, so we can printf messages to the console without fcons.
	 */
	/* putchar = tauart_early_putc; */
	putchar = tacons_early_putc;

}