04 Sep, 2013

1 commit

  • Pull driver core patches from Greg KH:
    "Here's the big driver core pull request for 3.12-rc1.

    Lots of tiny changes here fixing up the way sysfs attributes are
    created, to try to make drivers simpler, and fix a whole class race
    conditions with creations of device attributes after the device was
    announced to userspace.

    All the various pieces are acked by the different subsystem
    maintainers"

    * tag 'driver-core-3.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (119 commits)
    firmware loader: fix pending_fw_head list corruption
    drivers/base/memory.c: introduce help macro to_memory_block
    dynamic debug: line queries failing due to uninitialized local variable
    sysfs: sysfs_create_groups returns a value.
    debugfs: provide debugfs_create_x64() when disabled
    rbd: convert bus code to use bus_groups
    firmware: dcdbas: use binary attribute groups
    sysfs: add sysfs_create/remove_groups for when SYSFS is not enabled
    driver core: add #include to core files.
    HID: convert bus code to use dev_groups
    Input: serio: convert bus code to use drv_groups
    Input: gameport: convert bus code to use drv_groups
    driver core: firmware: use __ATTR_RW()
    driver core: core: use DEVICE_ATTR_RO
    driver core: bus: use DRIVER_ATTR_WO()
    driver core: create write-only attribute macros for devices and drivers
    sysfs: create __ATTR_WO()
    driver-core: platform: convert bus code to use dev_groups
    workqueue: convert bus code to use dev_groups
    MEI: convert bus code to use dev_groups
    ...

    Linus Torvalds
     

31 Aug, 2013

5 commits


28 Aug, 2013

1 commit


13 Aug, 2013

2 commits


27 Jul, 2013

1 commit

  • The patch "UIO: fix uio_pdrv_genirq with device tree but no interrupt"
    (sha1: e3a3c3a205554e564751cd9c0276b2af813d7a92)
    add support to use this driver with no interrupts.
    uio_pdrv_genirq also supports device-tree binding
    which is not available in uio_pdrv.

    That's why this uio_pdrv driver can be just removed.

    Signed-off-by: Michal Simek
    Reviewed-by: Vitalii Demianets
    Reviewed-by: Pavel Machek
    Signed-off-by: Greg Kroah-Hartman

    Michal Simek
     

25 Jul, 2013

1 commit


04 Jul, 2013

1 commit


26 Jun, 2013

1 commit


25 Jun, 2013

2 commits

  • In a SMP case there was a race condition issue between
    uio_pdrv_genirq_irqcontrol() running on one CPU and irq handler on
    another CPU. Fix it by spin_locking shared resources access inside irq
    handler. Also:
    - Change disable_irq to disable_irq_nosync to avoid deadlock, because
    disable_irq waits for the completion of the irq handler;
    - Change atomic bit-manipulation routines to their non-atomic
    counterparts as we already are guarding the code by spinlock.

    Signed-off-by: Vitalii Demianets
    Reviewed-by: Pavel Machek
    Signed-off-by: Greg Kroah-Hartman

    Vitalii Demianets
     
  • This eliminates having an #ifdef returning NULL for the case
    when OF is disabled.

    Signed-off-by: Sachin Kamat
    Acked-by: Damian Hobson-Garcia
    Signed-off-by: Greg Kroah-Hartman

    Sachin Kamat
     

19 Jun, 2013

2 commits

  • If device is initialized from device tree, but has no interrupt
    assigned, uio will still try to request and interrupt old way,
    fails, and fails registration.

    This is wrong; don't try initializing irq using platform data if
    device tree is available.

    Simplified code based on suggestion by Grant Likely.

    Fixed memory leak in "irq can not be registered" error path.

    Signed-off-by: Pavel Machek
    Reported-by: Detlev Zundel
    Signed-off-by: Greg Kroah-Hartman

    Pavel Machek
     
  • This adds ability to bind uio driver to given open firmware device
    using command line option. Thus, userspace driver can be developed and
    used without modifying the kernel.

    Signed-off-by: Pavel Machek
    Tested-by: Detlev Zundel
    Signed-off-by: Greg Kroah-Hartman

    Pavel Machek
     

07 Jun, 2013

1 commit


27 May, 2013

1 commit


22 May, 2013

6 commits


30 Mar, 2013

1 commit

  • Until recently uio_get_minor() returned 0 for success and
    a negative value on failure. This became non-negative for suceess and
    negative for failure. Restore the original return value spec so that we can
    successfully initialize UIO devices with a non-zero minor device
    number.

    Cc: "Hans J. Koch"
    Signed-off-by: Damian Hobson-Garcia
    Signed-off-by: Greg Kroah-Hartman

    Damian Hobson-Garcia
     

28 Feb, 2013

1 commit


14 Feb, 2013

1 commit


13 Dec, 2012

1 commit

  • Pull ARM SoC updates from Olof Johansson:
    "This contains the bulk of new SoC development for this merge window.

    Two new platforms have been added, the sunxi platforms (Allwinner A1x
    SoCs) by Maxime Ripard, and a generic Broadcom platform for a new
    series of ARMv7 platforms from them, where the hope is that we can
    keep the platform code generic enough to have them all share one mach
    directory. The new Broadcom platform is contributed by Christian
    Daudt.

    Highbank has grown support for Calxeda's next generation of hardware,
    ECX-2000.

    clps711x has seen a lot of cleanup from Alexander Shiyan, and he's
    also taken on maintainership of the platform.

    Beyond this there has been a bunch of work from a number of people on
    converting more platforms to IRQ domains, pinctrl conversion, cleanup
    and general feature enablement across most of the active platforms."

    Fix up trivial conflicts as per Olof.

    * tag 'soc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (174 commits)
    mfd: vexpress-sysreg: Remove LEDs code
    irqchip: irq-sunxi: Add terminating entry for sunxi_irq_dt_ids
    clocksource: sunxi_timer: Add terminating entry for sunxi_timer_dt_ids
    irq: versatile: delete dangling variable
    ARM: sunxi: add missing include for mdelay()
    ARM: EXYNOS: Avoid early use of of_machine_is_compatible()
    ARM: dts: add node for PL330 MDMA1 controller for exynos4
    ARM: EXYNOS: Add support for secondary CPU bring-up on Exynos4412
    ARM: EXYNOS: add UART3 to DEBUG_LL ports
    ARM: S3C24XX: Add clkdev entry for camif-upll clock
    ARM: SAMSUNG: Add s3c24xx/s3c64xx CAMIF GPIO setup helpers
    ARM: sunxi: Add missing sun4i.dtsi file
    pinctrl: samsung: Do not initialise statics to 0
    ARM i.MX6: remove gate_mask from pllv3
    ARM i.MX6: Fix ethernet PLL clocks
    ARM i.MX6: rename PLLs according to datasheet
    ARM i.MX6: Add pwm support
    ARM i.MX51: Add pwm support
    ARM i.MX53: Add pwm support
    ARM: mx5: Replace clk_register_clkdev with clock DT lookup
    ...

    Linus Torvalds
     

22 Nov, 2012

8 commits

  • The same condition should be used both when allocating and freeing the
    driver private data. When dev.of_node is non NULL, allocate a new
    private data structure, otherwise use the values from the platform data.

    Reported-by: Fengguang Wu
    Signed-off-by: Damian Hobson-Garcia
    Cc: "Hans J. Koch"
    Signed-off-by: Greg Kroah-Hartman

    Damian Hobson-Garcia
     
  • The uio device should not fail on open just because one memory allocation
    fails. The device might export several regions, the failure of some of
    which may or may not be a problem for the user space driver. Failing
    regions will remain unmapped, and successful regions will be mapped and
    exported to user space. Also deals with the case where failing to map
    a region after successfully allocating others would not unmap the
    successfully allocated regions before dying.

    Signed-off-by: Damian Hobson-Garcia
    Cc: "Hans J. Koch"
    Signed-off-by: Greg Kroah-Hartman

    Damian Hobson-Garcia
     
  • DMA_ERROR_CODE is not defined on all architectures and is architecture
    specific. Instead, use the constant, ~0 to indicate unmapped regions.

    Reported-by: Fengguang Wu
    Reported-by: Geert Uytterhoeven
    Signed-off-by: Damian Hobson-Garcia
    Cc: "Hans J. Koch"
    Signed-off-by: Greg Kroah-Hartman

    Damian Hobson-Garcia
     
  • Assigning the virtual address returned from dma_alloc_coherent to the the
    internal_addr element of uioinfo produces the following sparse errors since
    internal_addr is a void __iomem * and dma_alloc_coherent returns void *.

    + drivers/uio/uio_dmem_genirq.c:65:39: sparse: incorrect type in assignment (different address spaces)
    drivers/uio/uio_dmem_genirq.c:65:39: expected void [noderef] *internal_addr
    drivers/uio/uio_dmem_genirq.c:65:39: got void *[assigned] addr
    + drivers/uio/uio_dmem_genirq.c:93:17: sparse: incorrect type in argument 3 (different address spaces)
    drivers/uio/uio_dmem_genirq.c:93:17: expected void *vaddr
    drivers/uio/uio_dmem_genirq.c:93:17: got void [noderef] *internal_addr

    Store the void * in the driver's private data instead.

    Reported-by: Fengguang Wu
    Signed-off-by: Damian Hobson-Garcia
    Cc: "Hans J. Koch"
    Signed-off-by: Greg Kroah-Hartman

    Damian Hobson-Garcia
     
  • CONFIG_HOTPLUG is going away as an option so __devexit is no
    longer needed.

    Signed-off-by: Bill Pemberton
    Cc: "Hans J. Koch"
    Signed-off-by: Greg Kroah-Hartman

    Bill Pemberton
     
  • CONFIG_HOTPLUG is going away as an option so __devinitdata is no
    longer needed.

    Signed-off-by: Bill Pemberton
    Cc: "Hans J. Koch"
    Signed-off-by: Greg Kroah-Hartman

    Bill Pemberton
     
  • CONFIG_HOTPLUG is going away as an option so __devinit is no longer
    needed.

    Signed-off-by: Bill Pemberton
    Cc: "Hans J. Koch"
    Signed-off-by: Greg Kroah-Hartman

    Bill Pemberton
     
  • CONFIG_HOTPLUG is going away as an option so __devexit_p is no longer
    needed.

    Signed-off-by: Bill Pemberton
    Cc: "Hans J. Koch"
    Signed-off-by: Greg Kroah-Hartman

    Bill Pemberton
     

16 Nov, 2012

1 commit

  • If uio_pdrv[_genirq] is used, the uio maps have currently no name set.
    This patch sets the uio_mem name to the name of the memory resource.

    Signed-off-by: Manuel Traut
    Reported-by: Stefan Staedtler
    Tested-by: Stefan Staedtler
    Signed-off-by: "Hans J. Koch"
    Signed-off-by: Greg Kroah-Hartman

    Manuel Traut
     

27 Oct, 2012

1 commit


25 Oct, 2012

1 commit

  • This device extends the uio_pdrv_genirq driver to provide limited
    dynamic memory allocation for UIO devices. This allows UIO devices
    to use CMA and IOMMU allocated memory regions. This driver is based
    on the uio_pdrv_genirq driver and provides the same generic interrupt
    handling capabilities. Like uio_prdv_genirq,
    a fixed number of memory regions, defined in the platform device's
    .resources field are exported to userpace. This driver adds the ability
    to export additional regions whose number and size are known at boot time,
    but whose memory is not allocated until the uio device file is opened for
    the first time. When the device file is closed, the allocated memory block
    is freed. Physical (DMA) addresses for the dynamic regions are provided to
    the userspace via /sys/class/uio/uioX/maps/mapY/addr in the same way as
    static addresses are when the uio device file is open, when no processes
    are holding the device file open, the address returned to userspace is
    DMA_ERROR_CODE.

    Signed-off-by: Damian Hobson-Garcia
    Signed-off-by: "Hans J. Koch"
    Signed-off-by: Greg Kroah-Hartman

    Damian Hobson-Garcia