[OLPC] ROM BIOS signature probing less verbose,
export 'machine_is_olpc' flag
David Woodhouse
dwmw2 at infradead.unroutableorg
Thu Nov 9 01:17:24 EST 2006
Commit: 38ec230ba3bf896f4a20b47c7cf0927b6aa7ec99
Parent: a43965ddf74f5debdd8b6ad061519a5c69771de7
commit 38ec230ba3bf896f4a20b47c7cf0927b6aa7ec99
Author: David Woodhouse <dwmw2 at infradead.org>
AuthorDate: Thu Nov 9 14:21:49 2006 +0800
Commit: David Woodhouse <dwmw2 at infradead.org>
CommitDate: Thu Nov 9 14:21:49 2006 +0800
[OLPC] ROM BIOS signature probing less verbose, export 'machine_is_olpc' flag
Signed-off-by: David Woodhouse <dwmw2 at infradead.org>
---
arch/i386/kernel/olpc.c | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/arch/i386/kernel/olpc.c b/arch/i386/kernel/olpc.c
index 0a33579..3f0ec81 100644
--- a/arch/i386/kernel/olpc.c
+++ b/arch/i386/kernel/olpc.c
@@ -25,6 +25,8 @@ static void olpc_power_off(void)
}
+int machine_is_olpc;
+EXPORT_SYMBOL_GPL(machine_is_olpc);
int olpc_dcon_present = -1;
module_param(olpc_dcon_present, int, 0444);
@@ -42,20 +44,18 @@ static int __init olpc_init(void)
unsigned char *romsig;
romsig = ioremap(0xffffffc0, 16);
- if (!romsig) {
- printk(KERN_INFO "Failed to map BIOS. Assuming not OLPC\n");
+ if (!romsig)
return 0;
- }
- if (strncmp(romsig, "CL1 Q", 7)) {
- printk("Board signature doesn't match. Assuming not OLPC\n");
+
+ if (strncmp(romsig, "CL1 Q", 7))
goto unmap;
- }
if (strncmp(romsig+6, romsig+13, 3)) {
- printk("OLPC BIOS signature looks invalid. Assuming not OLPC\n");
+ printk(KERN_INFO "OLPC BIOS signature looks invalid. Assuming not OLPC\n");
goto unmap;
}
- printk("OLPC board with OpenFirmware: %.16s\n", romsig);
+ printk(KERN_INFO "OLPC board with OpenFirmware: %.16s\n", romsig);
+ machine_is_olpc = 1;
pm_power_off = olpc_power_off;
/* Read the DCON present bit in the CMOS and set the flag accordingly */
More information about the Commits-kernel
mailing list