From 36f0b804ea6e2d54da613fe035febc8b4fba140d Mon Sep 17 00:00:00 2001 From: Dale Rahn Date: Mon, 16 Oct 2000 00:18:02 +0000 Subject: configuration changes to enable the uni-north memory controller to enable the ethernet pci bus. Allows the gm ethernet controller to configure. --- sys/arch/powerpc/conf/files.powerpc | 2 ++ sys/arch/powerpc/mac/uni_n.c | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 sys/arch/powerpc/mac/uni_n.c (limited to 'sys/arch/powerpc') diff --git a/sys/arch/powerpc/conf/files.powerpc b/sys/arch/powerpc/conf/files.powerpc index 9f9a44d6f63..281893a2fbd 100644 --- a/sys/arch/powerpc/conf/files.powerpc +++ b/sys/arch/powerpc/conf/files.powerpc @@ -69,6 +69,8 @@ include "../../../dev/ofw/files.ofw" file arch/powerpc/powerpc/opendev.c ofcons | ofnet | ofdisk | ofrtc major { ofdisk = 4 } +file arch/powerpc/mac/uni_n.c ofbus + file arch/powerpc/powerpc/rd_root.c ramdisk_hooks major {rd = 17} diff --git a/sys/arch/powerpc/mac/uni_n.c b/sys/arch/powerpc/mac/uni_n.c new file mode 100644 index 00000000000..545d186c326 --- /dev/null +++ b/sys/arch/powerpc/mac/uni_n.c @@ -0,0 +1,33 @@ +/* $OpenBSD: uni_n.c,v 1.1 2000/10/16 00:18:01 drahn Exp $ */ + + +/* put BSD copyright here */ + +#include +#include +#include + +#include + +void +uni_n_config(int handle) +{ + char name[20]; + char *baseaddr; + int *ctladdr; + u_int32_t address; + if (OF_getprop(handle, "name", name, sizeof name) > 0) { + /* sanity test */ + if (!strcmp (name, "uni-n")) { + if (OF_getprop(handle, "reg", &address, + sizeof address) > 0) + { + printf("found uni-n at address %x\n", address); + baseaddr = mapiodev(address, NBPG); + ctladdr = (void*)(baseaddr + 0x20); + *ctladdr |= 0x02; + } + } + } + return; +} -- cgit v1.2.3