summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorandrew <andrew@FreeBSD.org>2016-01-21 16:48:01 +0000
committerandrew <andrew@FreeBSD.org>2016-01-21 16:48:01 +0000
commit1ca0aa6a341a8be1dd8a3e6ac3a75a5b33e11c74 (patch)
treee63932005382fb351de199898f8d3c233705f7cc
parent1652ce7837289ee0cb8fb3fe44dd2a75c3ffb8a7 (diff)
downloadFreeBSD-src-1ca0aa6a341a8be1dd8a3e6ac3a75a5b33e11c74.zip
FreeBSD-src-1ca0aa6a341a8be1dd8a3e6ac3a75a5b33e11c74.tar.gz
Remove fdt_fixup_table from architectures where it's unneeded. We only make
use of fdt_fixup_table on PowerPC and ARM. As such we can remove it from other architectures as it's unneeded. Reviewed by: nwhitehorn Sponsored by: ABT Systems Ltd Differential Revision: https://reviews.freebsd.org/D5013
-rw-r--r--sys/conf/files.amd641
-rw-r--r--sys/conf/files.arm641
-rw-r--r--sys/conf/files.i3861
-rw-r--r--sys/conf/files.mips1
-rw-r--r--sys/dev/fdt/fdt_arm64.c49
-rw-r--r--sys/dev/fdt/fdt_common.h2
-rw-r--r--sys/dev/fdt/fdt_mips.c51
-rw-r--r--sys/dev/fdt/fdt_x86.c48
-rw-r--r--sys/dev/ofw/ofw_fdt.c6
9 files changed, 8 insertions, 152 deletions
diff --git a/sys/conf/files.amd64 b/sys/conf/files.amd64
index 5944a38..a6ab7d9 100644
--- a/sys/conf/files.amd64
+++ b/sys/conf/files.amd64
@@ -240,7 +240,6 @@ dev/fdc/fdc.c optional fdc
dev/fdc/fdc_acpi.c optional fdc
dev/fdc/fdc_isa.c optional fdc isa
dev/fdc/fdc_pccard.c optional fdc pccard
-dev/fdt/fdt_x86.c optional fdt
dev/hpt27xx/hpt27xx_os_bsd.c optional hpt27xx
dev/hpt27xx/hpt27xx_osm_bsd.c optional hpt27xx
dev/hpt27xx/hpt27xx_config.c optional hpt27xx
diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64
index a128967..6168d70 100644
--- a/sys/conf/files.arm64
+++ b/sys/conf/files.arm64
@@ -59,7 +59,6 @@ crypto/blowfish/bf_enc.c optional crypto | ipsec
crypto/des/des_enc.c optional crypto | ipsec | netsmb
dev/acpica/acpi_if.m optional acpi
dev/ahci/ahci_generic.c optional ahci fdt
-dev/fdt/fdt_arm64.c optional fdt
dev/hwpmc/hwpmc_arm64.c optional hwpmc
dev/hwpmc/hwpmc_arm64_md.c optional hwpmc
dev/mmc/host/dwmmc.c optional dwmmc
diff --git a/sys/conf/files.i386 b/sys/conf/files.i386
index 334e857..172897b 100644
--- a/sys/conf/files.i386
+++ b/sys/conf/files.i386
@@ -208,7 +208,6 @@ dev/fdc/fdc.c optional fdc
dev/fdc/fdc_acpi.c optional fdc
dev/fdc/fdc_isa.c optional fdc isa
dev/fdc/fdc_pccard.c optional fdc pccard
-dev/fdt/fdt_x86.c optional fdt
dev/fe/if_fe_isa.c optional fe isa
dev/glxiic/glxiic.c optional glxiic
dev/glxsb/glxsb.c optional glxsb
diff --git a/sys/conf/files.mips b/sys/conf/files.mips
index da21410..0bd6938 100644
--- a/sys/conf/files.mips
+++ b/sys/conf/files.mips
@@ -80,7 +80,6 @@ dev/syscons/scvtb.c optional sc
mips/mips/sc_machdep.c optional sc
# FDT support
-dev/fdt/fdt_mips.c optional fdt
dev/uart/uart_cpu_fdt.c optional uart fdt
# crypto support -- use generic
diff --git a/sys/dev/fdt/fdt_arm64.c b/sys/dev/fdt/fdt_arm64.c
deleted file mode 100644
index fc98f51..0000000
--- a/sys/dev/fdt/fdt_arm64.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/*-
- * Copyright (c) 2009-2010 The FreeBSD Foundation
- * All rights reserved.
- *
- * This software was developed by Semihalf under sponsorship from
- * the FreeBSD Foundation.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/kernel.h>
-#include <sys/module.h>
-#include <sys/bus.h>
-
-#include <dev/ofw/ofw_bus.h>
-#include <dev/ofw/ofw_bus_subr.h>
-#include <dev/ofw/openfirm.h>
-
-#include "ofw_bus_if.h"
-#include "fdt_common.h"
-
-struct fdt_fixup_entry fdt_fixup_table[] = {
- { NULL, NULL }
-};
-
diff --git a/sys/dev/fdt/fdt_common.h b/sys/dev/fdt/fdt_common.h
index 3d05341..09224d5 100644
--- a/sys/dev/fdt/fdt_common.h
+++ b/sys/dev/fdt/fdt_common.h
@@ -48,12 +48,14 @@ struct fdt_sense_level {
typedef int (*fdt_pic_decode_t)(phandle_t, pcell_t *, int *, int *, int *);
extern fdt_pic_decode_t fdt_pic_table[];
+#if defined(__arm__) || defined(__powerpc__)
typedef void (*fdt_fixup_t)(phandle_t);
struct fdt_fixup_entry {
char *model;
fdt_fixup_t handler;
};
extern struct fdt_fixup_entry fdt_fixup_table[];
+#endif
extern SLIST_HEAD(fdt_ic_list, fdt_ic) fdt_ic_list_head;
struct fdt_ic {
diff --git a/sys/dev/fdt/fdt_mips.c b/sys/dev/fdt/fdt_mips.c
deleted file mode 100644
index 4e04602..0000000
--- a/sys/dev/fdt/fdt_mips.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/*-
- * Copyright (c) 2009-2010 The FreeBSD Foundation
- * All rights reserved.
- *
- * This software was developed by Semihalf under sponsorship from
- * the FreeBSD Foundation.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/kernel.h>
-#include <sys/module.h>
-#include <sys/bus.h>
-
-#include <machine/intr_machdep.h>
-
-#include <dev/ofw/ofw_bus.h>
-#include <dev/ofw/ofw_bus_subr.h>
-#include <dev/ofw/openfirm.h>
-
-#include "ofw_bus_if.h"
-#include "fdt_common.h"
-
-struct fdt_fixup_entry fdt_fixup_table[] = {
- { NULL, NULL }
-};
-
diff --git a/sys/dev/fdt/fdt_x86.c b/sys/dev/fdt/fdt_x86.c
deleted file mode 100644
index d4d9fc8..0000000
--- a/sys/dev/fdt/fdt_x86.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/*-
- * Copyright (c) 2013 Juniper Networks, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/kernel.h>
-#include <sys/module.h>
-#include <sys/bus.h>
-
-#include <machine/intr_machdep.h>
-
-#include <dev/ofw/ofw_bus.h>
-#include <dev/ofw/ofw_bus_subr.h>
-#include <dev/ofw/openfirm.h>
-
-#include "ofw_bus_if.h"
-#include "fdt_common.h"
-
-struct fdt_fixup_entry fdt_fixup_table[] = {
- { NULL, NULL }
-};
-
diff --git a/sys/dev/ofw/ofw_fdt.c b/sys/dev/ofw/ofw_fdt.c
index 6cabc3c..fc41d5b 100644
--- a/sys/dev/ofw/ofw_fdt.c
+++ b/sys/dev/ofw/ofw_fdt.c
@@ -394,6 +394,7 @@ ofw_fdt_package_to_path(ofw_t ofw, phandle_t package, char *buf, size_t len)
return (-1);
}
+#if defined(__arm__) || defined(__powerpc__)
static int
ofw_fdt_fixup(ofw_t ofw)
{
@@ -427,10 +428,12 @@ ofw_fdt_fixup(ofw_t ofw)
return (0);
}
+#endif
static int
ofw_fdt_interpret(ofw_t ofw, const char *cmd, int nret, cell_t *retvals)
{
+#if defined(__arm__) || defined(__powerpc__)
int rv;
/*
@@ -449,4 +452,7 @@ ofw_fdt_interpret(ofw_t ofw, const char *cmd, int nret, cell_t *retvals)
retvals[0] = rv;
return (rv);
+#else
+ return (0);
+#endif
}
OpenPOWER on IntegriCloud