From d21f7ac4857899ef5bf721dc02a48f5404b870d9 Mon Sep 17 00:00:00 2001
From: Bernie Innocenti <bernie@codewiz.org>
Date: Mon, 1 Feb 2010 15:51:05 -0300
Subject: [PATCH 2/3] olpc: convenience funcs to check for XO-1 / XO-1.5
Organization: Sugar Labs Foundation
For the time being, we assume that anything beyond BOARD_XO_1_5_Ax
is an XO-1.5. This will have to be reworked when new models appear.
---
arch/x86/include/asm/olpc.h | 15 +++++++++++++--
1 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/arch/x86/include/asm/olpc.h b/arch/x86/include/asm/olpc.h
index 05c4598..635b54e 100644
|
a
|
b
|
|
| 57 | 57 | return id << 4; |
| 58 | 58 | } |
| 59 | 59 | |
| 60 | | static inline int machine_is_olpc(void) |
| | 60 | static inline bool olpc_board_is_xo1(void) |
| | 61 | { |
| | 62 | return (olpc_platform_info.boardrev >= olpc_board_pre(BOARD_XO_1_B1) |
| | 63 | && olpc_platform_info.boardrev <= olpc_board(BOARD_XO_1_C2)); |
| | 64 | } |
| | 65 | |
| | 66 | static inline bool olpc_board_is_xo1_5(void) |
| | 67 | { |
| | 68 | return (olpc_platform_info.boardrev >= olpc_board_pre(BOARD_XO_1_5_Ax)); |
| | 69 | } |
| | 70 | |
| | 71 | static inline bool machine_is_olpc(void) |
| 61 | 72 | { |
| 62 | | return (olpc_platform_info.flags & OLPC_F_PRESENT) ? 1 : 0; |
| | 73 | return olpc_platform_info.flags & OLPC_F_PRESENT; |
| 63 | 74 | } |
| 64 | 75 | |
| 65 | 76 | /* |