-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MIPS: Loongson: Lemote-2F: Get the machine type from PMON_VER
Lemote have used the PMON_VER strings to indicate the loongson-2f machine series: PMON_VER=LM8089 Lemote 8.9'' netbook LM8101 Lemote 10.1'' netbook (The above two netbooks have the same kernel support) LM6XXX Lemote FuLoong(2F) box series LM9XXX Lemote LynLoong PC series Before the machtype is supported by the PMON, we can get the machine type from the PMON_VER for these machines, this will help the users a lot. Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com> Cc: linux-mips@linux-mips.org Cc: yanh@lemote.com Cc: huhb@lemote.com Cc: zhangfx@lemote.com Cc: Wu Zhangjin <wuzhangjin@gmail.com> Patchwork: http://patchwork.linux-mips.org/patch/821/ Patchwork: http://patchwork.linux-mips.org/patch/908/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
- Loading branch information
Wu Zhangjin
authored and
Ralf Baechle
committed
Feb 27, 2010
1 parent
081f674
commit 1b39a0b
Showing
3 changed files
with
54 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/* | ||
* Copyright (C) 2009 Lemote Inc. | ||
* Author: Wu Zhangjin, wuzj@lemote.com | ||
* | ||
* This program is free software; you can redistribute it and/or modify it | ||
* under the terms of the GNU General Public License as published by the | ||
* Free Software Foundation; either version 2 of the License, or (at your | ||
* option) any later version. | ||
*/ | ||
#include <asm/bootinfo.h> | ||
|
||
#include <loongson.h> | ||
|
||
void __init mach_prom_init_machtype(void) | ||
{ | ||
/* We share the same kernel image file among Lemote 2F family | ||
* of machines, and provide the machtype= kernel command line | ||
* to users to indicate their machine, this command line will | ||
* be passed by the latest PMON automatically. and fortunately, | ||
* up to now, we can get the machine type from the PMON_VER= | ||
* commandline directly except the NAS machine, In the old | ||
* machines, this will help the users a lot. | ||
* | ||
* If no "machtype=" passed, get machine type from "PMON_VER=". | ||
* PMON_VER=LM8089 Lemote 8.9'' netbook | ||
* LM8101 Lemote 10.1'' netbook | ||
* (The above two netbooks have the same kernel support) | ||
* LM6XXX Lemote FuLoong(2F) box series | ||
* LM9XXX Lemote LynLoong PC series | ||
*/ | ||
if (strstr(arcs_cmdline, "PMON_VER=LM")) { | ||
if (strstr(arcs_cmdline, "PMON_VER=LM8")) | ||
mips_machtype = MACH_LEMOTE_YL2F89; | ||
else if (strstr(arcs_cmdline, "PMON_VER=LM6")) | ||
mips_machtype = MACH_LEMOTE_FL2F; | ||
else if (strstr(arcs_cmdline, "PMON_VER=LM9")) | ||
mips_machtype = MACH_LEMOTE_LL2F; | ||
else | ||
mips_machtype = MACH_LEMOTE_NAS; | ||
|
||
strcat(arcs_cmdline, " machtype="); | ||
strcat(arcs_cmdline, get_system_type()); | ||
strcat(arcs_cmdline, " "); | ||
} | ||
} |