From 36eba36d0848ff69c29462b0dbccaf4aebf15bee Mon Sep 17 00:00:00 2001 From: martin Date: Thu, 2 Mar 2006 10:44:33 +0000 Subject: [PATCH] Add glue to make ath* usable on sparc64. --- sys/arch/sparc64/conf/Makefile.sparc64 | 21 ++++++++++++++++++++- sys/arch/sparc64/conf/files.sparc64 | 5 ++++- sys/arch/sparc64/conf/std.sparc64 | 4 +++- 3 files changed, 27 insertions(+), 3 deletions(-) diff --git a/sys/arch/sparc64/conf/Makefile.sparc64 b/sys/arch/sparc64/conf/Makefile.sparc64 index 072cf467288f..17e0a98467df 100644 --- a/sys/arch/sparc64/conf/Makefile.sparc64 +++ b/sys/arch/sparc64/conf/Makefile.sparc64 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.sparc64,v 1.57 2005/12/11 12:19:08 christos Exp $ +# $NetBSD: Makefile.sparc64,v 1.58 2006/03/02 10:44:33 martin Exp $ #========================================================================= # @@ -144,6 +144,25 @@ machdep.o mem.o openprom.o pmap.o vm_machdep.o: Makefile %RULES +# XXX - Ugly, but make doesn't easily handle .o.uue (assumes it's a suffix) +# XXX - Also, config has no simple was to just add foo.o to the Makefile. +# It needs a pathname of some sort for "object" +.if !empty(OBJS:M\/athhal-sparc64-be-elf.hal.o) +OBJS:=${OBJS:C/\/athhal-sparc64-be-elf.hal.o/athhal-sparc64-be-elf.hal.o/} + +.PATH: $S/contrib/arch/sparc64/dev +ATH_UUDEC?= @${_MKSHMSG} "uudecode ${.CURDIR:T}/${.TARGET}"; \ + ${_MKSHECHO}\ + ${UUDECODE} -p $> \> ${.TARGET}; \ + rm -f ${.TARGET}; \ + ${UUDECODE} -p $> > ${.TARGET} +athhal-sparc64-be-elf.hal.o: athhal-sparc64-be-elf.hal.o.uue + ${ATH_UUDEC} +all depend: opt_ah.h +opt_ah.h: athhal-sparc64-be-elf.opt_ah.h + ln -s ${.ALLSRC} ${.TARGET} +.endif + ## ## (9) port independent kernel machinery ## diff --git a/sys/arch/sparc64/conf/files.sparc64 b/sys/arch/sparc64/conf/files.sparc64 index 028cc3df414d..585e12847811 100644 --- a/sys/arch/sparc64/conf/files.sparc64 +++ b/sys/arch/sparc64/conf/files.sparc64 @@ -1,4 +1,4 @@ -# $NetBSD: files.sparc64,v 1.97 2005/12/11 12:19:08 christos Exp $ +# $NetBSD: files.sparc64,v 1.98 2006/03/02 10:44:33 martin Exp $ # @(#)files.sparc64 8.1 (Berkeley) 7/19/93 # sparc64-specific configuration info @@ -201,6 +201,9 @@ file arch/sparc64/sparc64/db_disasm.c ddb include "dev/wscons/files.wscons" include "dev/wsfont/files.wsfont" +# Atheros 5210/5211/5212 Hardware Abstraction Layer (HAL) +object /athhal-sparc64-be-elf.hal.o ath + # USB Support include "dev/usb/files.usb" diff --git a/sys/arch/sparc64/conf/std.sparc64 b/sys/arch/sparc64/conf/std.sparc64 index 14a356d85bef..6a0a7ab1e490 100644 --- a/sys/arch/sparc64/conf/std.sparc64 +++ b/sys/arch/sparc64/conf/std.sparc64 @@ -1,4 +1,4 @@ -# $NetBSD: std.sparc64,v 1.12 2005/12/11 12:19:08 christos Exp $ +# $NetBSD: std.sparc64,v 1.13 2006/03/02 10:44:33 martin Exp $ # # Mandatory NetBSD/sparc64 kernel options when building either 32-bit or @@ -10,3 +10,5 @@ machine sparc64 # Machine architecture; required by config(8) include "conf/std" # MI standard options options EXEC_SCRIPT # execve(2) support for scripts + +options AH_REGOPS_FUNC # aht(4) HAL needs register access funcitons