Ticket #9967: 0002-olpc-convenience-funcs-to-check-for-XO-1-XO-1.5.patch

File 0002-olpc-convenience-funcs-to-check-for-XO-1-XO-1.5.patch, 1.3 KB (added by bernie, 5 years ago)

Preparation infrastructure for the actual bugfix

  • arch/x86/include/asm/olpc.h

    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  
    5757        return id << 4; 
    5858} 
    5959 
    60 static inline int machine_is_olpc(void) 
     60static 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 
     66static 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 
     71static inline bool machine_is_olpc(void) 
    6172{ 
    62         return (olpc_platform_info.flags & OLPC_F_PRESENT) ? 1 : 0; 
     73        return olpc_platform_info.flags & OLPC_F_PRESENT; 
    6374} 
    6475 
    6576/*