From 62820660cc957a5a8408fae505dff7d53da38842 Mon Sep 17 00:00:00 2001 From: "Bjoern A. Zeeb" Date: Thu, 26 Jun 2014 17:20:45 +0000 Subject: [PATCH] Introduce opt_netfpga.h and allow setting NF10BMAC_64BIT from mips kernel configs. Switch the BERI_NETFPGA_MDROOT to 64bit by default. Give we have working interrupts also cleanup the extra polling CFLAGS from the module Makefile. MFC after: 2 weeks --- sys/conf/options.mips | 5 +++++ sys/dev/netfpga10g/nf10bmac/if_nf10bmac.c | 1 + sys/mips/conf/BERI_NETFPGA_MDROOT | 1 + sys/modules/netfpga10g/nf10bmac/Makefile | 3 +-- 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/sys/conf/options.mips b/sys/conf/options.mips index eec1ca41b7bb..93d4ed34f807 100644 --- a/sys/conf/options.mips +++ b/sys/conf/options.mips @@ -90,6 +90,11 @@ OCTEON_BOARD_CAPK_0100ND opt_cvmx.h # BERI_LARGE_TLB opt_global.h +# +# Options that control the NetFPGA-10G Embedded CPU Ethernet Core. +# +NF10BMAC_64BIT opt_netfpga.h + # # Options that control the Atheros SoC peripherals # diff --git a/sys/dev/netfpga10g/nf10bmac/if_nf10bmac.c b/sys/dev/netfpga10g/nf10bmac/if_nf10bmac.c index a5aebbafa3c7..6a13b281f567 100644 --- a/sys/dev/netfpga10g/nf10bmac/if_nf10bmac.c +++ b/sys/dev/netfpga10g/nf10bmac/if_nf10bmac.c @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include "opt_device_polling.h" +#include "opt_netfpga.h" #include #include diff --git a/sys/mips/conf/BERI_NETFPGA_MDROOT b/sys/mips/conf/BERI_NETFPGA_MDROOT index 2ba4917d007a..307f579cc285 100644 --- a/sys/mips/conf/BERI_NETFPGA_MDROOT +++ b/sys/mips/conf/BERI_NETFPGA_MDROOT @@ -23,6 +23,7 @@ device bpf options DEVICE_POLLING device netfpga10g_nf10bmac +options NF10BMAC_64BIT # # This kernel configuration uses an embedded memory root file system. diff --git a/sys/modules/netfpga10g/nf10bmac/Makefile b/sys/modules/netfpga10g/nf10bmac/Makefile index 06636d9e5b72..adc447194c1e 100644 --- a/sys/modules/netfpga10g/nf10bmac/Makefile +++ b/sys/modules/netfpga10g/nf10bmac/Makefile @@ -6,11 +6,10 @@ KMOD= if_nf10bmac SRCS= if_nf10bmac.c SRCS+= device_if.h bus_if.h pci_if.h SRCS+= opt_device_polling.h +SRCS+= opt_netfpga.h .if ${MACHINE_CPUARCH} == "mips" SRCS+= if_nf10bmac_fdt.c ofw_bus_if.h .endif -CFLAGS+= -DDEVICE_POLLING - .include