1. 09 2月, 2016 2 次提交
    • L
      tools/gpio: create GPIO tools · 6d591c46
      Linus Walleij 提交于
      This creates GPIO tools under tools/gpio/* and adds a single
      example program to list the GPIOs on a system. When proper
      devices are created it provides this minimal output:
      
      Cc: Johan Hovold <johan@kernel.org>
      Cc: Michael Welling <mwelling@ieee.org>
      Cc: Markus Pargmann <mpa@pengutronix.de>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      6d591c46
    • L
      gpio: add a userspace chardev ABI for GPIOs · 3c702e99
      Linus Walleij 提交于
      A new chardev that is to be used for userspace GPIO access is
      added in this patch. It is intended to gradually replace the
      horribly broken sysfs ABI.
      
      Using a chardev has many upsides:
      
      - All operations are per-gpiochip, which is the actual
        device underlying the GPIOs, making us tie in to the
        kernel device model properly.
      
      - Hotpluggable GPIO controllers can come and go, as this
        kind of problem has been know to userspace for character
        devices since ages, and if a gpiochip handle is held in
        userspace we know we will break something, whereas the
        sysfs is stateless.
      
      - The one-value-per-file rule of sysfs is really hard to
        maintain when you want to twist more than one knob at a time,
        for example have in-kernel APIs to switch several GPIO
        lines at the same time, and this will be possible to do
        with a single ioctl() from userspace, saving a lot of
        context switching.
      
      We also need to add a new bus type for GPIO. This is
      necessary for example for userspace coldplug, where sysfs is
      traversed to find the boot-time device nodes and create the
      character devices in /dev.
      
      This new chardev ABI is *non* *optional* and can be counted
      on to be present in the future, emphasizing the preference
      of this ABI.
      
      The ABI only implements one single ioctl() to get the name
      and number of GPIO lines of a chip. Even this is debatable:
      see it as a minimal example for review. This ABI shall be
      ruthlessly reviewed and etched in stone.
      
      The old /sys/class/gpio is still optional to compile in,
      but will be deprecated.
      
      Unique device IDs are created using IDR, which is overkill
      and insanely scalable, but also well tested.
      
      Cc: Johan Hovold <johan@kernel.org>
      Cc: Michael Welling <mwelling@ieee.org>
      Cc: Markus Pargmann <mpa@pengutronix.de>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      3c702e99
  2. 25 1月, 2016 1 次提交
  3. 24 1月, 2016 3 次提交
  4. 23 1月, 2016 1 次提交
  5. 22 1月, 2016 1 次提交
  6. 21 1月, 2016 3 次提交
  7. 20 1月, 2016 8 次提交
  8. 19 1月, 2016 2 次提交
  9. 16 1月, 2016 1 次提交
    • K
      x86/PCI: Add driver for Intel Volume Management Device (VMD) · 185a383a
      Keith Busch 提交于
      The Intel Volume Management Device (VMD) is a Root Complex Integrated
      Endpoint that acts as a host bridge to a secondary PCIe domain.  BIOS can
      reassign one or more Root Ports to appear within a VMD domain instead of
      the primary domain.  The immediate benefit is that additional PCIe domains
      allow more than 256 buses in a system by letting bus numbers be reused
      across different domains.
      
      VMD domains do not define ACPI _SEG, so to avoid domain clashing with host
      bridges defining this segment, VMD domains start at 0x10000, which is
      greater than the highest possible 16-bit ACPI defined _SEG.
      
      This driver enumerates and enables the domain using the root bus
      configuration interface provided by the PCI subsystem.  The driver provides
      configuration space accessor functions (pci_ops), bus and memory resources,
      an MSI IRQ domain with irq_chip implementation, and DMA operations
      necessary to use devices through the VMD endpoint's interface.
      
      VMD routes I/O as follows:
      
         1) Configuration Space: BAR 0 ("CFGBAR") of VMD provides the base
         address and size for configuration space register access to VMD-owned
         root ports.  It works similarly to MMCONFIG for extended configuration
         space.  Bus numbering is independent and does not conflict with the
         primary domain.
      
         2) MMIO Space: BARs 2 and 4 ("MEMBAR1" and "MEMBAR2") of VMD provide the
         base address, size, and type for MMIO register access.  These addresses
         are not translated by VMD hardware; they are simply reservations to be
         distributed to root ports' memory base/limit registers and subdivided
         among devices downstream.
      
         3) DMA: To interact appropriately with an IOMMU, the source ID DMA read
         and write requests are translated to the bus-device-function of the VMD
         endpoint.  Otherwise, DMA operates normally without VMD-specific address
         translation.
      
         4) Interrupts: Part of VMD's BAR 4 is reserved for VMD's MSI-X Table and
         PBA.  MSIs from VMD domain devices and ports are remapped to appear as
         if they were issued using one of VMD's MSI-X table entries.  Each MSI
         and MSI-X address of VMD-owned devices and ports has a special format
         where the address refers to specific entries in the VMD's MSI-X table.
         As with DMA, the interrupt source ID is translated to VMD's
         bus-device-function.
      
         The driver provides its own MSI and MSI-X configuration functions
         specific to how MSI messages are used within the VMD domain, and
         provides an irq_chip for independent IRQ allocation to relay interrupts
         from VMD's interrupt handler to the appropriate device driver's handler.
      
         5) Errors: PCIe error message are intercepted by the root ports normally
         (e.g., AER), except with VMD, system errors (i.e., firmware first) are
         disabled by default.  AER and hotplug interrupts are translated in the
         same way as endpoint interrupts.
      
         6) VMD does not support INTx interrupts or IO ports.  Devices or drivers
         requiring these features should either not be placed below VMD-owned
         root ports, or VMD should be disabled by BIOS for such endpoints.
      
      [bhelgaas: add VMD BAR #defines, factor out vmd_cfg_addr(), rework VMD
      resource setup, whitespace, changelog]
      Signed-off-by: NKeith Busch <keith.busch@intel.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Acked-by: Thomas Gleixner <tglx@linutronix.de> (IRQ-related parts)
      185a383a
  10. 14 1月, 2016 3 次提交
  11. 13 1月, 2016 2 次提交
  12. 09 1月, 2016 1 次提交
  13. 06 1月, 2016 1 次提交
  14. 05 1月, 2016 1 次提交
  15. 04 1月, 2016 1 次提交
  16. 01 1月, 2016 1 次提交
  17. 30 12月, 2015 1 次提交
  18. 28 12月, 2015 1 次提交
  19. 24 12月, 2015 2 次提交
  20. 23 12月, 2015 4 次提交