Annotation of funnyos/arch/testarm/config.c, Revision 1.12
1.1 init 1: /*
1.12 ! nbrk 2: * $Id: config.c,v 1.11 2007/11/02 12:39:26 init Exp $
1.1 init 3: */
4: #include <sys/types.h>
5: #include <sys/device.h>
6:
7: /*
8: * Configuration file for platform (testarm).
9: */
10:
11: /* device drivers */
12: extern struct driver root_dr;
13: extern struct driver cpu_dr;
1.3 init 14: extern struct driver obio_dr;
1.5 init 15: extern struct driver tacons_dr;
1.6 init 16: extern struct driver fcons_dr;
1.9 init 17: extern struct driver tartc_dr;
1.11 init 18: extern struct driver tairqc_dr;
1.1 init 19:
20:
21: extern void(*putchar)(char);
22: void tacons_early_putc(char ch);
23:
24: /* amount of physical memory, in Bytes */
25: uint32_t physmem = 33554432;
26:
27: /*
28: * Where to attach each device.
29: */
30: struct attachinfo config_attachinfo[] = {
1.10 init 31: /* child, parent, pminor, loc, intrno, flags */
32: { "cpu" , "root", 0, 0, 0, 0 },
33: { "obio", "root", 0, 0, 0, 0 },
34: { "tacons", "obio", 0, 0x10000000, 0, 0 },
35: { "tartc", "obio", 0, 0x15000000, 4, 0 },
1.11 init 36: { "tairqc", "obio", 0, 0x16000000, 0, 0 },
1.10 init 37: { "fcons", "tacons", 0, 0, 0, 0 },
38: { NULL, NULL, 0, 0, 0, 0 }
1.1 init 39: };
40:
41:
42: /*
43: * Link device names with their drivers.
44: */
45: struct driverinfo config_driverinfo[] = {
1.7 init 46: /* name, driverp, ninstances (should be -1) */
1.1 init 47: { "root", &root_dr, -1 },
1.3 init 48: { "obio", &obio_dr, -1 },
1.1 init 49: { "cpu" , &cpu_dr, -1 },
1.4 init 50: { "tacons", &tacons_dr, -1 },
1.9 init 51: { "tartc", &tartc_dr, -1 },
1.6 init 52: { "fcons", &fcons_dr, -1 },
1.11 init 53: { "tairqc", &tairqc_dr, -1 },
1.1 init 54: { NULL, NULL, 0 }
55: };
56:
57:
58: /*
59: * Machine early-stage initialization hooks.
60: */
61:
62: void
1.12 ! nbrk 63: config_machineinit(void)
1.1 init 64: {
65: /*
66: * Configure putchar, so we can printf messages to the console without fcons.
67: */
68: /* putchar = tauart_early_putc; */
69: putchar = tacons_early_putc;
70: }
71:
72:
CVSweb