From b1c34fd0899bef70cb344eb7e1a51ca879efb291 Mon Sep 17 00:00:00 2001 From: jmcneill Date: Sun, 20 Feb 2011 03:58:33 +0000 Subject: [PATCH] add module glue for ath_hal, ath, and if_ath_pci --- sys/modules/ath/Makefile | 17 +++++ sys/modules/ath_hal/Makefile | 96 ++++++++++++++++++++++++ sys/modules/ath_hal/Makefile.inc | 9 +++ sys/modules/ath_hal/ath_hal.ldscript | 38 ++++++++++ sys/modules/if_ath_pci/Makefile | 15 ++++ sys/modules/if_ath_pci/if_ath_pci.ioconf | 10 +++ 6 files changed, 185 insertions(+) create mode 100644 sys/modules/ath/Makefile create mode 100644 sys/modules/ath_hal/Makefile create mode 100644 sys/modules/ath_hal/Makefile.inc create mode 100644 sys/modules/ath_hal/ath_hal.ldscript create mode 100644 sys/modules/if_ath_pci/Makefile create mode 100644 sys/modules/if_ath_pci/if_ath_pci.ioconf diff --git a/sys/modules/ath/Makefile b/sys/modules/ath/Makefile new file mode 100644 index 000000000000..dad521816468 --- /dev/null +++ b/sys/modules/ath/Makefile @@ -0,0 +1,17 @@ +# $NetBSD: Makefile,v 1.1 2011/02/20 03:58:33 jmcneill Exp $ + +.include "../Makefile.inc" + +.PATH: ${S}/dev/ic + +KMOD= ath + +SRCS= ath.c \ + ath_netbsd.c \ + athrate-sample.c + +WARNS= 3 +CPPFLAGS+= -DINET + +.include "../ath_hal/Makefile.inc" +.include diff --git a/sys/modules/ath_hal/Makefile b/sys/modules/ath_hal/Makefile new file mode 100644 index 000000000000..83944dd4fb0c --- /dev/null +++ b/sys/modules/ath_hal/Makefile @@ -0,0 +1,96 @@ +# $NetBSD: Makefile,v 1.1 2011/02/20 03:58:33 jmcneill Exp $ + +.include "../Makefile.inc" + +.PATH: ${S}/external/isc/atheros_hal/dist +.PATH: ${S}/external/isc/atheros_hal/dist/ar5210 +.PATH: ${S}/external/isc/atheros_hal/dist/ar5211 +.PATH: ${S}/external/isc/atheros_hal/dist/ar5212 +.PATH: ${S}/external/isc/atheros_hal/dist/ar5312 +.PATH: ${S}/external/isc/atheros_hal/dist/ar5312 +.PATH: ${S}/external/isc/atheros_hal/dist/ar5416 +.PATH: ${S}/external/isc/atheros_hal/ic + +KMOD= ath_hal + +SRCS= ah.c \ + ah_eeprom_v1.c \ + ah_eeprom_v3.c \ + ah_eeprom_v14.c \ + ah_regdomain.c +SRCS+= ah_osdep.c +SRCS+= ar5210_attach.c \ + ar5210_beacon.c \ + ar5210_interrupts.c \ + ar5210_keycache.c \ + ar5210_misc.c \ + ar5210_phy.c \ + ar5210_power.c \ + ar5210_recv.c \ + ar5210_reset.c \ + ar5210_xmit.c +SRCS+= ar5211_attach.c \ + ar5211_beacon.c \ + ar5211_interrupts.c \ + ar5211_keycache.c \ + ar5211_misc.c \ + ar5211_phy.c \ + ar5211_power.c \ + ar5211_recv.c \ + ar5211_reset.c \ + ar5211_xmit.c +SRCS+= ar2316.c \ + ar2317.c \ + ar2413.c \ + ar2425.c \ + ar5111.c \ + ar5112.c \ + ar5413.c +SRCS+= ar5212_ani.c \ + ar5212_attach.c \ + ar5212_beacon.c \ + ar5212_eeprom.c \ + ar5212_gpio.c \ + ar5212_interrupts.c \ + ar5212_keycache.c \ + ar5212_misc.c \ + ar5212_phy.c \ + ar5212_power.c \ + ar5212_recv.c \ + ar5212_reset.c \ + ar5212_rfgain.c \ + ar5212_xmit.c +SRCS+= ar5312_attach.c \ + ar5312_eeprom.c \ + ar5312_gpio.c \ + ar5312_interrupts.c \ + ar5312_misc.c \ + ar5312_power.c \ + ar5312_reset.c \ + ar5315_gpio.c +SRCS+= ar2133.c \ + ar5416_ani.c \ + ar5416_attach.c \ + ar5416_beacon.c \ + ar5416_cal.c \ + ar5416_cal_adcdc.c \ + ar5416_cal_adcgain.c \ + ar5416_cal_iq.c \ + ar5416_eeprom.c \ + ar5416_gpio.c \ + ar5416_interrupts.c \ + ar5416_keycache.c \ + ar5416_misc.c \ + ar5416_phy.c \ + ar5416_power.c \ + ar5416_recv.c \ + ar5416_reset.c \ + ar5416_xmit.c \ + ar9160_attach.c + +WARNS= 3 + +.include "Makefile.inc" + +.include +KMODSCRIPT= ${S}/modules/ath_hal/ath_hal.ldscript diff --git a/sys/modules/ath_hal/Makefile.inc b/sys/modules/ath_hal/Makefile.inc new file mode 100644 index 000000000000..2619a50668d5 --- /dev/null +++ b/sys/modules/ath_hal/Makefile.inc @@ -0,0 +1,9 @@ +# $NetBSD: Makefile.inc,v 1.1 2011/02/20 03:58:33 jmcneill Exp $ + +CPPFLAGS+= -I${S}/external/isc/atheros_hal/dist +CPPFLAGS+= -I${S}/external/isc/atheros_hal/ic +CPPFLAGS+= -DATHHAL_AR5210 -DATHHAL_AR5211 -DATHHAL_AR5212 \ + -DATHHAL_AR5311 -DATHHAL_AR5312 -DATHHAL_AR5416 +CPPFLAGS+= -DATHHAL_RF2316 -DATHHAL_RF2317 -DATHHAL_RF2413 \ + -DATHHAL_RF2425 -DATHHAL_RF5111 -DATHHAL_RF5112 \ + -DATHHAL_RF5413 diff --git a/sys/modules/ath_hal/ath_hal.ldscript b/sys/modules/ath_hal/ath_hal.ldscript new file mode 100644 index 000000000000..ea1af93de0af --- /dev/null +++ b/sys/modules/ath_hal/ath_hal.ldscript @@ -0,0 +1,38 @@ +/* $NetBSD: ath_hal.ldscript,v 1.1 2011/02/20 03:58:33 jmcneill Exp $ */ + +SECTIONS +{ + /* Pre-loaded modules must have merged BSS and data. */ + .data 0 : + { + *(.data) + *(.bss) + *(.bss.*) + *(COMMON) + } + + link_set_ah_rfs : + { + __start_link_set_ah_rfs = .; + *(link_set_ah_rfs); + __stop_link_set_ah_rfs = .; + } + + link_set_ah_chips : + { + __start_link_set_ah_chips = .; + *(link_set_ah_chips); + __stop_link_set_ah_chips = .; + } + + . = ALIGN(64); /* COHERENCY_UNIT */ + .data.cacheline_aligned : { *(.data.cacheline_aligned) } + . = ALIGN(64); /* COHERENCY_UNIT */ + .data.read_mostly : { *(.data.read_mostly) } + . = ALIGN(64); /* COHERENCY_UNIT */ + /* Pre-loaded modules do not need the following. */ + /DISCARD/ : + { + *(.comment) + } +} diff --git a/sys/modules/if_ath_pci/Makefile b/sys/modules/if_ath_pci/Makefile new file mode 100644 index 000000000000..ef9def41c9b4 --- /dev/null +++ b/sys/modules/if_ath_pci/Makefile @@ -0,0 +1,15 @@ +# $NetBSD: Makefile,v 1.1 2011/02/20 03:58:33 jmcneill Exp $ + +.include "../Makefile.inc" + +.PATH: ${S}/dev/pci + +KMOD= if_ath_pci +IOCONF= if_ath_pci.ioconf + +SRCS= if_ath_pci.c + +WARNS= 3 + +.include "../ath_hal/Makefile.inc" +.include diff --git a/sys/modules/if_ath_pci/if_ath_pci.ioconf b/sys/modules/if_ath_pci/if_ath_pci.ioconf new file mode 100644 index 000000000000..14a74821a208 --- /dev/null +++ b/sys/modules/if_ath_pci/if_ath_pci.ioconf @@ -0,0 +1,10 @@ +# $NetBSD: if_ath_pci.ioconf,v 1.1 2011/02/20 03:58:33 jmcneill Exp $ + +ioconf if_ath_pci + +include "conf/files" +include "dev/pci/files.pci" + +pseudo-root pci* + +ath* at pci? dev ? function ?