generic: update mips multimachine patch
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21681 3c298f89-4303-0410-b956-a3cf2f4a3e73master
parent
bfa2da2042
commit
e69562eb28
|
@ -57,7 +57,7 @@
|
||||||
+#endif /* __ASM_MIPS_MACHINE_H */
|
+#endif /* __ASM_MIPS_MACHINE_H */
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/arch/mips/kernel/mips_machine.c
|
+++ b/arch/mips/kernel/mips_machine.c
|
||||||
@@ -0,0 +1,83 @@
|
@@ -0,0 +1,86 @@
|
||||||
+/*
|
+/*
|
||||||
+ * Copyright (C) 2008-2010 Gabor Juhos <juhosg@openwrt.org>
|
+ * Copyright (C) 2008-2010 Gabor Juhos <juhosg@openwrt.org>
|
||||||
+ *
|
+ *
|
||||||
|
@ -109,29 +109,32 @@
|
||||||
+ continue;
|
+ continue;
|
||||||
+
|
+
|
||||||
+ if (strcmp(mach->mach_id, id) == 0) {
|
+ if (strcmp(mach->mach_id, id) == 0) {
|
||||||
+ mips_machine = mach;
|
+ mips_machtype = mach->mach_type;
|
||||||
+ break;
|
+ return 0;
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ if (!mips_machine) {
|
+ pr_err("MIPS: no machine found for id '%s', supported machines:\n", id);
|
||||||
+ pr_err("MIPS: no machine found for id '%s', supported machines:\n",
|
+ pr_err("%-24s : %s\n", "id", "name");
|
||||||
+ id);
|
+ for_each_machine(mach)
|
||||||
+ pr_err("%32s %s\n", "id", "name");
|
+ pr_err("%-24s : %s\n", mach->mach_id, mach->mach_name);
|
||||||
+ for_each_machine(mach)
|
|
||||||
+ pr_err("%32s %s\n", mach->mach_id, mach->mach_name);
|
|
||||||
+ return 1;
|
|
||||||
+ }
|
|
||||||
+
|
+
|
||||||
+ mips_machtype = mips_machine->mach_type;
|
+ return 1;
|
||||||
+
|
|
||||||
+ return 0;
|
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
+__setup("machtype=", mips_machtype_setup);
|
+__setup("machtype=", mips_machtype_setup);
|
||||||
+
|
+
|
||||||
+__init void mips_machine_setup(void)
|
+__init void mips_machine_setup(void)
|
||||||
+{
|
+{
|
||||||
|
+ struct mips_machine *mach;
|
||||||
|
+
|
||||||
|
+ for_each_machine(mach) {
|
||||||
|
+ if (mips_machtype == mach->mach_type) {
|
||||||
|
+ mips_machine = mach;
|
||||||
|
+ break;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+
|
||||||
+ if (!mips_machine)
|
+ if (!mips_machine)
|
||||||
+ return;
|
+ return;
|
||||||
+
|
+
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
+#endif /* __ASM_MIPS_MACHINE_H */
|
+#endif /* __ASM_MIPS_MACHINE_H */
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/arch/mips/kernel/mips_machine.c
|
+++ b/arch/mips/kernel/mips_machine.c
|
||||||
@@ -0,0 +1,83 @@
|
@@ -0,0 +1,86 @@
|
||||||
+/*
|
+/*
|
||||||
+ * Copyright (C) 2008-2010 Gabor Juhos <juhosg@openwrt.org>
|
+ * Copyright (C) 2008-2010 Gabor Juhos <juhosg@openwrt.org>
|
||||||
+ *
|
+ *
|
||||||
|
@ -109,29 +109,32 @@
|
||||||
+ continue;
|
+ continue;
|
||||||
+
|
+
|
||||||
+ if (strcmp(mach->mach_id, id) == 0) {
|
+ if (strcmp(mach->mach_id, id) == 0) {
|
||||||
+ mips_machine = mach;
|
+ mips_machtype = mach->mach_type;
|
||||||
+ break;
|
+ return 0;
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ if (!mips_machine) {
|
+ pr_err("MIPS: no machine found for id '%s', supported machines:\n", id);
|
||||||
+ pr_err("MIPS: no machine found for id '%s', supported machines:\n",
|
+ pr_err("%-24s : %s\n", "id", "name");
|
||||||
+ id);
|
+ for_each_machine(mach)
|
||||||
+ pr_err("%32s %s\n", "id", "name");
|
+ pr_err("%-24s : %s\n", mach->mach_id, mach->mach_name);
|
||||||
+ for_each_machine(mach)
|
|
||||||
+ pr_err("%32s %s\n", mach->mach_id, mach->mach_name);
|
|
||||||
+ return 1;
|
|
||||||
+ }
|
|
||||||
+
|
+
|
||||||
+ mips_machtype = mips_machine->mach_type;
|
+ return 1;
|
||||||
+
|
|
||||||
+ return 0;
|
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
+__setup("machtype=", mips_machtype_setup);
|
+__setup("machtype=", mips_machtype_setup);
|
||||||
+
|
+
|
||||||
+__init void mips_machine_setup(void)
|
+__init void mips_machine_setup(void)
|
||||||
+{
|
+{
|
||||||
|
+ struct mips_machine *mach;
|
||||||
|
+
|
||||||
|
+ for_each_machine(mach) {
|
||||||
|
+ if (mips_machtype == mach->mach_type) {
|
||||||
|
+ mips_machine = mach;
|
||||||
|
+ break;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+
|
||||||
+ if (!mips_machine)
|
+ if (!mips_machine)
|
||||||
+ return;
|
+ return;
|
||||||
+
|
+
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
+#endif /* __ASM_MIPS_MACHINE_H */
|
+#endif /* __ASM_MIPS_MACHINE_H */
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/arch/mips/kernel/mips_machine.c
|
+++ b/arch/mips/kernel/mips_machine.c
|
||||||
@@ -0,0 +1,83 @@
|
@@ -0,0 +1,86 @@
|
||||||
+/*
|
+/*
|
||||||
+ * Copyright (C) 2008-2010 Gabor Juhos <juhosg@openwrt.org>
|
+ * Copyright (C) 2008-2010 Gabor Juhos <juhosg@openwrt.org>
|
||||||
+ *
|
+ *
|
||||||
|
@ -109,29 +109,32 @@
|
||||||
+ continue;
|
+ continue;
|
||||||
+
|
+
|
||||||
+ if (strcmp(mach->mach_id, id) == 0) {
|
+ if (strcmp(mach->mach_id, id) == 0) {
|
||||||
+ mips_machine = mach;
|
+ mips_machtype = mach->mach_type;
|
||||||
+ break;
|
+ return 0;
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ if (!mips_machine) {
|
+ pr_err("MIPS: no machine found for id '%s', supported machines:\n", id);
|
||||||
+ pr_err("MIPS: no machine found for id '%s', supported machines:\n",
|
+ pr_err("%-24s : %s\n", "id", "name");
|
||||||
+ id);
|
+ for_each_machine(mach)
|
||||||
+ pr_err("%32s %s\n", "id", "name");
|
+ pr_err("%-24s : %s\n", mach->mach_id, mach->mach_name);
|
||||||
+ for_each_machine(mach)
|
|
||||||
+ pr_err("%32s %s\n", mach->mach_id, mach->mach_name);
|
|
||||||
+ return 1;
|
|
||||||
+ }
|
|
||||||
+
|
+
|
||||||
+ mips_machtype = mips_machine->mach_type;
|
+ return 1;
|
||||||
+
|
|
||||||
+ return 0;
|
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
+__setup("machtype=", mips_machtype_setup);
|
+__setup("machtype=", mips_machtype_setup);
|
||||||
+
|
+
|
||||||
+__init void mips_machine_setup(void)
|
+__init void mips_machine_setup(void)
|
||||||
+{
|
+{
|
||||||
|
+ struct mips_machine *mach;
|
||||||
|
+
|
||||||
|
+ for_each_machine(mach) {
|
||||||
|
+ if (mips_machtype == mach->mach_type) {
|
||||||
|
+ mips_machine = mach;
|
||||||
|
+ break;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+
|
||||||
+ if (!mips_machine)
|
+ if (!mips_machine)
|
||||||
+ return;
|
+ return;
|
||||||
+
|
+
|
||||||
|
|
Loading…
Reference in New Issue