OLPC: add One Laptop Per Child architecture support
Subsystems (3)
PATCH 3/3 OLPC: add One Laptop Per Child architecture support
This adds support for OLPC XO hardware. Open Firmware on XOs don't contain the VSA, so it is necessary to emulate the PCI BARs in the kernel. This also adds functionality for running EC commands, and a CONFIG_OLPC.
A number of OLPC drivers depend upon CONFIG_OLPC.
olpc_ec_timeout is a hack to work around Embedded Controller bugs.
Signed-off-by Andres Salomon <[email protected]>
--- Documentation/kernel-parameters.txt | 7 + arch/x86/Kconfig | 18 ++- arch/x86/kernel/Makefile | 2 + arch/x86/kernel/olpc.c | 256 ++++++++++++++++++++++++++++ arch/x86/pci/Makefile_32 | 1 + arch/x86/pci/init.c | 3 + arch/x86/pci/olpc.c | 313 +++++++++++++++++++++++++++++++++++ arch/x86/pci/pci.h | 1 + include/asm-x86/olpc.h | 135 +++++++++++++++ 9 files changed, 735 insertions(+), 1 deletions(-) create mode 100644 arch/x86/kernel/olpc.c create mode 100644 arch/x86/pci/olpc.c create mode 100644 include/asm-x86/olpc.h
Documentation/kernel-parameters.txt +7 -0
@@ -1347,6 +1347,13 @@ and is between 256 and 4096 characters. It is defined in the file nr_uarts= [SERIAL] maximum number of UARTs to be registered. + olpc_ec_timeout= [OLPC] ms delay when issuing EC commands + Rather than timing out after 20 ms if an EC + command is not properly ACKed, override the length + of the timeout. We have interrupts disabled while + waiting for the ACK, so if this is set too high + interrupts *may* be lost! + opl3= [HW,OSS] Format: <io>
arch/x86/Kconfig +17 -1
@@ -1420,6 +1420,10 @@ config PCI_GODIRECT config PCI_GOANY bool "Any" +config PCI_GOOLPC + bool "OLPC" + depends on OLPC + endchoice config PCI_BIOS
@@ -1429,12 +1433,17 @@ config PCI_BIOS # x86-64 doesn't support PCI BIOS access from long mode so always go direct. config PCI_DIRECT def_bool y - depends on PCI && (X86_64 || (PCI_GODIRECT || PCI_GOANY) || X86_VISWS) + depends on PCI && (X86_64 || (PCI_GODIRECT || PCI_GOANY || PCI_GOOLPC) || X86_VISWS) config PCI_MMCONFIG def_bool y depends on X86_32 && PCI && ACPI && (PCI_GOMMCONFIG || PCI_GOANY) +config PCI_OLPC + bool + depends on PCI && PCI_GOOLPC + default y + config PCI_DOMAINS def_bool y depends on PCI
@@ -1554,6 +1563,13 @@ config GEODE_MFGPT_TIMER MFGPTs have a better resolution and max interval than the generic PIT, and are suitable for use as high-res timers. +config OLPC + bool "One Laptop Per Child support" + default n + help + Add support for detecting the unique features of the OLPC + XO hardware. + endif # X86_32 config K8_NB
arch/x86/kernel/Makefile +2 -0
@@ -86,6 +86,8 @@ endif obj-$(CONFIG_SCx200) += scx200.o scx200-y += scx200_32.o +obj-$(CONFIG_OLPC) += olpc.o + ### # 64 bit specific files ifeq ($(CONFIG_X86_64),y)
arch/x86/kernel/olpc.c new file +256 -0
256 lines not on this page · raw message
arch/x86/pci/Makefile_32 +1 -0
@@ -3,6 +3,7 @@ obj-y := i386.o init.o obj-$(CONFIG_PCI_BIOS) += pcbios.o obj-$(CONFIG_PCI_MMCONFIG) += mmconfig_32.o direct.o mmconfig-shared.o obj-$(CONFIG_PCI_DIRECT) += direct.o +obj-$(CONFIG_PCI_OLPC) += olpc.o pci-y := fixup.o pci-$(CONFIG_ACPI) += acpi.o
arch/x86/pci/init.c +3 -0
@@ -14,6 +14,9 @@ static __init int pci_access_init(void)#ifdef CONFIG_PCI_MMCONFIG pci_mmcfg_init (type);#endif +#ifdef CONFIG_PCI_OLPC +pci_olpc_init (); +#endif if (raw_pci_ops)return 0 ;#ifdef CONFIG_PCI_BIOS
arch/x86/pci/olpc.c new file +313 -0
313 lines not on this page · raw message
arch/x86/pci/pci.h +1 -0
@@ -101,6 +101,7 @@ extern int pci_direct_probe(void);extern void pci_direct_init (int type);extern void pci_pcbios_init (void );extern void pci_mmcfg_init (int type); +extern void pci_olpc_init (void );extern void pcibios_sort (void );/* pci-mmconfig.c */
include/asm-x86/olpc.h new file +135 -0
135 lines not on this page · raw message
Signature · 1 line
1.5.4.2