07 Jul, 2011

6 commits

  • Add a driver to configure the XO-1 RTC via CS5536 MSRs, to be used as a
    system wakeup source via olpc-xo1-pm.

    Device detection is based on finding the relevant device tree node.

    Signed-off-by: Daniel Drake
    Link: http://lkml.kernel.org/r/1309019658-1712-11-git-send-email-dsd@laptop.org
    Acked-by: Andres Salomon
    Acked-by: Grant Likely
    Reviewed-by: Sebastian Andrzej Siewior
    Cc: devicetree-discuss@lists.ozlabs.org
    Signed-off-by: H. Peter Anvin

    Daniel Drake
     
  • Configure the XO-1's lid switch GPIO to trigger an SCI interrupt,
    and correctly expose this input device which can be used as a wakeup
    source.

    Signed-off-by: Daniel Drake
    Link: http://lkml.kernel.org/r/1309019658-1712-9-git-send-email-dsd@laptop.org
    Acked-by: Andres Salomon
    Signed-off-by: H. Peter Anvin

    Daniel Drake
     
  • The EC in the OLPC XO-1 delivers GPE events to provide various
    notifications. Add the basic code for GPE/EC event processing and
    enable the ebook switch, which can be used as a wakeup source.

    Signed-off-by: Daniel Drake
    Link: http://lkml.kernel.org/r/1309019658-1712-8-git-send-email-dsd@laptop.org
    Acked-by: Andres Salomon
    Signed-off-by: H. Peter Anvin

    Daniel Drake
     
  • The System Control Interrupt is used in the OLPC XO-1 to control various
    features of the laptop. Add the driver base and the power button
    functionality.

    This driver can't be built as a module, because functionality added in
    future patches means that some drivers need to know at boot-time whether
    SCI-based functionality is available.

    Signed-off-by: Daniel Drake
    Link: http://lkml.kernel.org/r/1309019658-1712-6-git-send-email-dsd@laptop.org
    Acked-by: Andres Salomon
    Signed-off-by: H. Peter Anvin

    Daniel Drake
     
  • Add code needed for basic suspend/resume of the XO-1 laptop.
    Based on earlier work by Jordan Crouse, Andres Salomon, and others.

    This patch incorporates all earlier feedback from Thomas Gleixner. To
    clarify a certain point (now more obvious in the code itself):
    On resume, OpenFirmware returns execution to Linux in protected mode
    with a kernel-compatible GDT already set up. The changes and
    simplifications suggested have all been included.

    Signed-off-by: Daniel Drake
    Link: http://lkml.kernel.org/r/1309019658-1712-5-git-send-email-dsd@laptop.org
    Acked-by: Andres Salomon
    Signed-off-by: H. Peter Anvin

    Daniel Drake
     
  • Move these definitions into the relevant header file.
    This was requested in the review of the upcoming XO-1 suspend/resume code.

    Signed-off-by: Daniel Drake
    Link: http://lkml.kernel.org/r/1309019658-1712-3-git-send-email-dsd@laptop.org
    Acked-by: Andres Salomon
    Signed-off-by: H. Peter Anvin

    Daniel Drake
     

14 Jan, 2011

2 commits

  • Drop the old geode_gpio crud, as well as the raw outl() calls; instead,
    use the Linux GPIO API where possible, and the cs5535_gpio API in other
    places.

    Note that we don't actually clean up the driver properly yet (once loaded,
    it always remains loaded). That'll come later..

    This patch is necessary for building the driver.

    Signed-off-by: Andres Salomon
    Cc: Greg KH
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andres Salomon
     
  • This adds (well, re-adds actually) handling for events/IRQs through cs5535
    GPIOs. In the wild and wooly world of CS5535, setup_event() is for
    assigning an IRQ to a GPIO filter/event pair, and set_irq() sets up the
    pair to trigger IRQs.

    These should really only be used in highly platform-specific drivers (such
    as OLPC's DCON driver). Sadly, because set_irq() uses MSRs, this causes
    the driver to become X86-specific.

    Signed-off-by: Andres Salomon
    Signed-off-by: Daniel Drake
    Cc: Grant Likely
    Cc: Greg KH
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andres Salomon
     

16 Dec, 2009

5 commits

  • ..and include them in the lxfb/gxfb drivers rather than asm/geode.h (where
    possible).

    Signed-off-by: Andres Salomon
    Cc: Jordan Crouse
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: john stultz
    Cc: Chris Ball
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andres Salomon
     
  • Signed-off-by: Andres Salomon
    Cc: Jordan Crouse
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: john stultz
    Cc: Chris Ball
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andres Salomon
     
  • The only thing that uses this is the reboot_fixups code.

    Signed-off-by: Andres Salomon
    Cc: Jordan Crouse
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: john stultz
    Cc: Chris Ball
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andres Salomon
     
  • This is based on the old code on arch/x86/kernel/mfgpt_32.c, except it's
    not x86 specific, it's modular, and it makes use of a PCI BAR rather than
    a random MSR. Currently module unloading is not supported; it's uncertain
    whether or not it can be made work with the hardware.

    [akpm@linux-foundation.org: add X86 dependency]
    Signed-off-by: Andres Salomon
    Cc: Jordan Crouse
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: john stultz
    Cc: Chris Ball
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andres Salomon
     
  • This creates a CS5535/CS5536 GPIO driver which uses a gpio_chip backend
    (allowing GPIO users to use the generic GPIO API if desired) while also
    allowing architecture-specific users directly (via the cs5535_gpio_*
    functions).

    Tested on an OLPC machine. Some Leemotes also use CS5536 (with a mips
    cpu), which is why this is in drivers/gpio rather than arch/x86.
    Currently, it conflicts with older geode GPIO support; once MFGPT support
    is reworked to also be more generic, the older geode code will be removed.

    Signed-off-by: Andres Salomon
    Cc: Takashi Iwai
    Cc: Jordan Crouse
    Cc: David Brownell
    Reviewed-by: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andres Salomon