Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e691d24e authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'x86-olpc-for-linus' of...

Merge branch 'x86-olpc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'x86-olpc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  x86, olpc: Speed up device tree creation during boot
  x86, olpc: Add OLPC device-tree support
  x86, of: Define irq functions to allow drivers/of/* to build on x86
parents 55065bc5 b5318d30
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -2076,11 +2076,17 @@ config OLPC_OPENFIRMWARE
	bool "Support for OLPC's Open Firmware"
	depends on !X86_64 && !X86_PAE
	default n
	select OF
	help
	  This option adds support for the implementation of Open Firmware
	  that is used on the OLPC XO-1 Children's Machine.
	  If unsure, say N here.

config OLPC_OPENFIRMWARE_DT
	bool
	default y if OLPC_OPENFIRMWARE && PROC_DEVICETREE
	select OF_PROMTREE

endif # X86_32

config AMD_NB
+3 −0
Original line number Diff line number Diff line
@@ -10,6 +10,9 @@
#include <asm/apicdef.h>
#include <asm/irq_vectors.h>

/* Even though we don't support this, supply it to appease OF */
static inline void irq_dispose_mapping(unsigned int virq) { }

static inline int irq_canonicalize(int irq)
{
	return ((irq == 2) ? 9 : irq);
+9 −0
Original line number Diff line number Diff line
@@ -8,6 +8,8 @@

#ifdef CONFIG_OLPC_OPENFIRMWARE

extern bool olpc_ofw_is_installed(void);

/* 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)
@@ -26,10 +28,17 @@ extern bool olpc_ofw_present(void);

#else /* !CONFIG_OLPC_OPENFIRMWARE */

static inline bool olpc_ofw_is_installed(void) { return false; }
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 */

#ifdef CONFIG_OLPC_OPENFIRMWARE_DT
extern void olpc_dt_build_devicetree(void);
#else
static inline void olpc_dt_build_devicetree(void) { }
#endif /* CONFIG_OLPC_OPENFIRMWARE_DT */

#endif /* _ASM_X86_OLPC_OFW_H */
+1 −0
Original line number Diff line number Diff line
/* dummy prom.h; here to make linux/of.h's #includes happy */
+10 −0
Original line number Diff line number Diff line
@@ -4,6 +4,7 @@
#include <linux/cpu.h>
#include <linux/interrupt.h>
#include <linux/kernel_stat.h>
#include <linux/of.h>
#include <linux/seq_file.h>
#include <linux/smp.h>
#include <linux/ftrace.h>
@@ -275,6 +276,15 @@ void smp_x86_platform_ipi(struct pt_regs *regs)

EXPORT_SYMBOL_GPL(vector_used_by_percpu_irq);

#ifdef CONFIG_OF
unsigned int irq_create_of_mapping(struct device_node *controller,
		const u32 *intspec, unsigned int intsize)
{
	return intspec[0];
}
EXPORT_SYMBOL_GPL(irq_create_of_mapping);
#endif

#ifdef CONFIG_HOTPLUG_CPU
/* A cpu has been removed from cpu_online_mask.  Reset irq affinities. */
void fixup_irqs(void)
Loading