summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJasper Lievisse Adriaanse <jasper@cvs.openbsd.org>2013-03-15 09:19:02 +0000
committerJasper Lievisse Adriaanse <jasper@cvs.openbsd.org>2013-03-15 09:19:02 +0000
commit9535e3417be1743e8526f2127bc0c1da9532126a (patch)
treede2d88639e1e9c3ac0b09a135abdcd100daa760f
parent581f8bd30342e4e48db0bc5bc567ac83c56e0da5 (diff)
add some board types which will be used later to identify particular boards
ok yasuoka@
-rw-r--r--sys/arch/octeon/include/octeonvar.h11
-rw-r--r--sys/arch/octeon/octeon/machdep.c4
2 files changed, 12 insertions, 3 deletions
diff --git a/sys/arch/octeon/include/octeonvar.h b/sys/arch/octeon/include/octeonvar.h
index 6f081821983..02bbbbabc9d 100644
--- a/sys/arch/octeon/include/octeonvar.h
+++ b/sys/arch/octeon/include/octeonvar.h
@@ -191,6 +191,17 @@ struct octeon_fau_map {
#define OCTEON_POW_GROUP_CORE1_TASK_6 14
#define OCTEON_POW_GROUP_CORE1_TASK_7 15
+/*
+ * Octeon board types known to work with OpenBSD/octeon.
+ * One of the main reasons for keeping this list is to be able to tell which
+ * boards do and do not have octcf(4). Currently the only board not to have octcf(4)
+ * is BOARD_TYPE_UBIQUITI_E100. Sadly, this number is also used by other vendors, but
+ * we don't run on those boards yet. When that time comes, iobus needs extra care for
+ * not blindly attaching octcf(4) on every board.
+ */
+#define BOARD_TYPE_SIM 1
+#define BOARD_TYPE_UBIQUITI_E100 20002
+
#ifdef _KERNEL
struct boot_desc {
uint32_t desc_ver;
diff --git a/sys/arch/octeon/octeon/machdep.c b/sys/arch/octeon/octeon/machdep.c
index da37fdbbf52..ebfb69bfff7 100644
--- a/sys/arch/octeon/octeon/machdep.c
+++ b/sys/arch/octeon/octeon/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.25 2013/03/15 09:18:19 jasper Exp $ */
+/* $OpenBSD: machdep.c,v 1.26 2013/03/15 09:19:01 jasper Exp $ */
/*
* Copyright (c) 2009, 2010 Miodrag Vallat.
@@ -82,8 +82,6 @@
#include <octeon/dev/octeonreg.h>
#include <machine/octeonvar.h>
-#define BOARD_TYPE_SIM 1
-
/* The following is used externally (sysctl_hw) */
char machine[] = MACHINE; /* Machine "architecture" */
char cpu_model[30];