Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
machtype.c
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2009 Lemote Inc.
3  * Author: Wu Zhangjin, [email protected]
4  *
5  * This program is free software; you can redistribute it and/or modify it
6  * under the terms of the GNU General Public License as published by the
7  * Free Software Foundation; either version 2 of the License, or (at your
8  * option) any later version.
9  */
10 #include <asm/bootinfo.h>
11 
12 #include <loongson.h>
13 
15 {
16  /* We share the same kernel image file among Lemote 2F family
17  * of machines, and provide the machtype= kernel command line
18  * to users to indicate their machine, this command line will
19  * be passed by the latest PMON automatically. and fortunately,
20  * up to now, we can get the machine type from the PMON_VER=
21  * commandline directly except the NAS machine, In the old
22  * machines, this will help the users a lot.
23  *
24  * If no "machtype=" passed, get machine type from "PMON_VER=".
25  * PMON_VER=LM8089 Lemote 8.9'' netbook
26  * LM8101 Lemote 10.1'' netbook
27  * (The above two netbooks have the same kernel support)
28  * LM6XXX Lemote FuLoong(2F) box series
29  * LM9XXX Lemote LynLoong PC series
30  */
31  if (strstr(arcs_cmdline, "PMON_VER=LM")) {
32  if (strstr(arcs_cmdline, "PMON_VER=LM8"))
34  else if (strstr(arcs_cmdline, "PMON_VER=LM6"))
36  else if (strstr(arcs_cmdline, "PMON_VER=LM9"))
38  else
40 
41  strcat(arcs_cmdline, " machtype=");
43  strcat(arcs_cmdline, " ");
44  }
45 }