mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-12 05:48:40 +00:00
![Daniel Drake](/assets/img/avatar_default.png)
The XO-1.5 laptop is not currently detected as an OLPC machine because it fails this XO-1-centric check. Now that we have OLPC OFW support in the kernel, a more sensible check is to see if we found OFW during boot and check the architecture property. Also remove a now-meaningless codepath, as we're always going to have OFW support with OLPC. Signed-off-by: Daniel Drake <dsd@laptop.org> LKML-Reference: <20100923162846.D8D409D401B@zog.reactivated.net> Cc: Andres Salomon <dilinger@queued.net> Cc: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
35 lines
1 KiB
C
35 lines
1 KiB
C
#ifndef _ASM_X86_OLPC_OFW_H
|
|
#define _ASM_X86_OLPC_OFW_H
|
|
|
|
/* index into the page table containing the entry OFW occupies */
|
|
#define OLPC_OFW_PDE_NR 1022
|
|
|
|
#define OLPC_OFW_SIG 0x2057464F /* aka "OFW " */
|
|
|
|
#ifdef CONFIG_OLPC_OPENFIRMWARE
|
|
|
|
/* run an OFW command by calling into the firmware */
|
|
#define olpc_ofw(name, args, res) \
|
|
__olpc_ofw((name), ARRAY_SIZE(args), args, ARRAY_SIZE(res), res)
|
|
|
|
extern int __olpc_ofw(const char *name, int nr_args, const void **args, int nr_res,
|
|
void **res);
|
|
|
|
/* determine whether OFW is available and lives in the proper memory */
|
|
extern void olpc_ofw_detect(void);
|
|
|
|
/* install OFW's pde permanently into the kernel's pgtable */
|
|
extern void setup_olpc_ofw_pgd(void);
|
|
|
|
/* check if OFW was detected during boot */
|
|
extern bool olpc_ofw_present(void);
|
|
|
|
#else /* !CONFIG_OLPC_OPENFIRMWARE */
|
|
|
|
static inline void olpc_ofw_detect(void) { }
|
|
static inline void setup_olpc_ofw_pgd(void) { }
|
|
static inline bool olpc_ofw_present(void) { return false; }
|
|
|
|
#endif /* !CONFIG_OLPC_OPENFIRMWARE */
|
|
|
|
#endif /* _ASM_X86_OLPC_OFW_H */
|