diff options
author | nwhitehorn <nwhitehorn@FreeBSD.org> | 2013-11-11 15:43:21 +0000 |
---|---|---|
committer | nwhitehorn <nwhitehorn@FreeBSD.org> | 2013-11-11 15:43:21 +0000 |
commit | 22459a6d41e890368af247ecf21359dd6f1dfbd2 (patch) | |
tree | 11f9f4830e1f9159bda883758c89344522df343c /sys/powerpc/ofw | |
parent | f129c5c40759078013d692f3219b74b116b97274 (diff) | |
download | FreeBSD-src-22459a6d41e890368af247ecf21359dd6f1dfbd2.zip FreeBSD-src-22459a6d41e890368af247ecf21359dd6f1dfbd2.tar.gz |
Make tsec work with the device tree present on the RB800. The previous code
assumed that the MDIO bus was a direct child of the Ethernet interface. It
may not be and indeed on many device trees is not. While here, add proper
locking for MII transactions, which may be on a bus shared by several MACs.
Hardware donated by: Benjamin Perrault
Diffstat (limited to 'sys/powerpc/ofw')
-rw-r--r-- | sys/powerpc/ofw/ofw_machdep.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/powerpc/ofw/ofw_machdep.c b/sys/powerpc/ofw/ofw_machdep.c index 587562e..344865f 100644 --- a/sys/powerpc/ofw/ofw_machdep.c +++ b/sys/powerpc/ofw/ofw_machdep.c @@ -63,11 +63,13 @@ __FBSDID("$FreeBSD$"); static struct mem_region OFmem[PHYS_AVAIL_SZ], OFavail[PHYS_AVAIL_SZ]; static struct mem_region OFfree[PHYS_AVAIL_SZ]; +static int apple_hacks; + +#ifdef AIM extern register_t ofmsr[5]; extern void *openfirmware_entry; static void *fdt; int ofw_real_mode; -static int apple_hacks; int ofwcall(void *); static int openfirmware(void *args); @@ -114,6 +116,7 @@ ofw_sprg_restore(void) */ __asm __volatile("mtsprg0 %0" :: "r"(ofw_sprg0_save)); } +#endif /* * Memory region utilities: determine if two regions overlap, @@ -436,6 +439,7 @@ ofw_mem_regions(struct mem_region **memp, int *memsz, *availsz = fsz; } +#ifdef AIM void OF_initial_setup(void *fdt_ptr, void *junk, int (*openfirm)(void *)) { @@ -607,6 +611,8 @@ OF_reboot() for (;;); /* just in case */ } +#endif /* AIM */ + void OF_getetheraddr(device_t dev, u_char *addr) { |