23 Mar, 2011

4 commits


21 Mar, 2011

1 commit

  • * 'trivial' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6: (25 commits)
    video: change to new flag variable
    scsi: change to new flag variable
    rtc: change to new flag variable
    rapidio: change to new flag variable
    pps: change to new flag variable
    net: change to new flag variable
    misc: change to new flag variable
    message: change to new flag variable
    memstick: change to new flag variable
    isdn: change to new flag variable
    ieee802154: change to new flag variable
    ide: change to new flag variable
    hwmon: change to new flag variable
    dma: change to new flag variable
    char: change to new flag variable
    fs: change to new flag variable
    xtensa: change to new flag variable
    um: change to new flag variables
    s390: change to new flag variable
    mips: change to new flag variable
    ...

    Fix up trivial conflict in drivers/hwmon/Makefile

    Linus Torvalds
     

19 Mar, 2011

1 commit

  • * 'spi/next' of git://git.secretlab.ca/git/linux-2.6: (34 commits)
    spi/dw_spi: move dw_spi.h into drivers/spi
    spi/dw_spi: Fix missing header
    gpio/langwell: Clear edge bit before handling
    gpio/langwell: Simplify demux loop
    gpio/langwell: Convert irq name space
    gpio/langwell: Fix broken irq_eoi change.
    gpio; Make Intel chipset gpio drivers depend on x86
    gpio/cs5535-gpio: Fix section mismatch
    spi/rtc-{ds1390,ds3234,m41t94}: Use spi_get_drvdata() for SPI devices
    spi/davinci: Support DMA transfers larger than 65535 words
    spi/davinci: Use correct length parameter to dma_map_single calls
    gpio: Use __devexit at necessary places
    gpio: add MODULE_DEVICE_TABLE to pch_gpio and ml_ioh_gpio
    gpio/mcp23s08: support mcp23s17 variant
    of_mmc_spi: add card detect irq support
    spi/omap_mcspi: catch xfers of non-multiple SPI word size
    spi/omap_mcspi: Off-by-one error in finding the right divisor
    gpio/pca953x: Fix wrong pointer type
    spi/pl022: rid dangling labels
    spi: add support for SuperH SPI
    ...

    Linus Torvalds
     

18 Mar, 2011

3 commits

  • * 'defcfg' of master.kernel.org:/home/rmk/linux-2.6-arm:
    ARM: 6647/1: add Versatile Express defconfig
    ARM: 6644/1: mach-ux500: update the U8500 defconfig

    * 'drivers' of master.kernel.org:/home/rmk/linux-2.6-arm:
    ARM: 6764/1: pl011: factor out FIFO to TTY code
    ARM: 6763/1: pl011: add optional RX DMA to PL011 v2
    ARM: 6758/1: amba: support pm ops
    ARM: amba: make amba_driver id_table const
    ARM: amba: make internal ID table handling const
    ARM: amba: make probe() functions take const id tables
    ARM: 6662/1: amba: make amba_bustype non-static
    ARM: mmci: add dmaengine-based DMA support
    ARM: mmci: no need for separate host->data_xfered
    ARM: mmci: avoid unnecessary switch to data available PIO interrupts
    ARM: mmci: no need to call flush_dcache_page() with sg_miter API
    ARM: mmci: avoid reporting too many completed bytes on fifo overrun
    ALSA: AACI: make fifo variables more explanitory
    ALSA: AACI: no need to call snd_pcm_period_elapsed() for each period
    ALSA: AACI: use snd_pcm_lib_period_bytes()
    ALSA: AACI: clean up AACI announcement printk
    ALSA: AACI: fix channel mask selection
    ALSA: AACI: fix number of channels for record
    ALSA: AACI: fix multiple IRQ claiming

    * 'cyberpro-next' of master.kernel.org:/home/rmk/linux-2.6-arm:
    VIDEO: cyberpro: remove unused cyber2000fb_get_fb_var()
    VIDEO: cyberpro: remove useless function extreg pointers
    VIDEO: cyberpro: update handling of device structures
    VIDEO: cyberpro: add support for video capture I2C
    VIDEO: cyberpro: make 'reg_b0_lock' always present
    VIDEO: cyberpro: add I2C support
    VIDEO: cyberpro: select lowest multipler/divisor for PLL

    Linus Torvalds
     
  • Pull in Linus' tree to pick up changes required for the langwell gpio fixes

    Grant Likely
     
  • The recently increased type checking in platform_get_drvdata() reveals a few
    offenders:

    drivers/rtc/rtc-ds1390.c:161: warning: passing argument 1 of ‘platform_get_drvdata’ from incompatible pointer type
    drivers/rtc/rtc-ds3234.c:161: warning: passing argument 1 of ‘platform_get_drvdata’ from incompatible pointer type
    drivers/rtc/rtc-m41t94.c:139: warning: passing argument 1 of ‘platform_get_drvdata’ from incompatible pointer type

    Use spi_get_drvdata() instead of platform_get_drvdata().

    Signed-off-by: Geert Uytterhoeven
    Signed-off-by: Grant Likely

    Geert Uytterhoeven
     

17 Mar, 2011

3 commits

  • Replace EXTRA_CFLAGS with ccflags-y.

    Signed-off-by: matt mooney
    Acked-by: WANG Cong
    Signed-off-by: Michal Marek

    matt mooney
     
  • Russell King
     
  • * 'devicetree/next' of git://git.secretlab.ca/git/linux-2.6: (21 commits)
    tty: serial: altera_jtaguart: Add device tree support
    tty: serial: altera_uart: Add devicetree support
    dt: eliminate of_platform_driver shim code
    dt: Eliminate of_platform_{,un}register_driver
    dt/serial: Eliminate users of of_platform_{,un}register_driver
    dt/usb: Eliminate users of of_platform_{,un}register_driver
    dt/video: Eliminate users of of_platform_{,un}register_driver
    dt/net: Eliminate users of of_platform_{,un}register_driver
    dt/sound: Eliminate users of of_platform_{,un}register_driver
    dt/spi: Eliminate users of of_platform_{,un}register_driver
    dt: uartlite: merge platform and of_platform driver bindings
    dt: xilinx_hwicap: merge platform and of_platform driver bindings
    ipmi: convert OF driver to platform driver
    leds/leds-gpio: merge platform_driver with of_platform_driver
    dt/sparc: Eliminate users of of_platform_{,un}register_driver
    dt/powerpc: Eliminate users of of_platform_{,un}register_driver
    dt/powerpc: move of_bus_type infrastructure to ibmebus
    drivercore/dt: add a match table pointer to struct device
    dt: Typo fix.
    altera_ps2: Add devicetree support
    ...

    Linus Torvalds
     

16 Mar, 2011

1 commit

  • …el/git/tip/linux-2.6-tip

    * 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (27 commits)
    x86: Clean up apic.c and apic.h
    x86: Remove superflous goal definition of tsc_sync
    x86: dt: Correct local apic documentation in device tree bindings
    x86: dt: Cleanup local apic setup
    x86: dt: Fix OLPC=y/INTEL_CE=n build
    rtc: cmos: Add OF bindings
    x86: ce4100: Use OF to setup devices
    x86: ioapic: Add OF bindings for IO_APIC
    x86: dtb: Add generic bus probe
    x86: dtb: Add support for PCI devices backed by dtb nodes
    x86: dtb: Add device tree support for HPET
    x86: dtb: Add early parsing of IO_APIC
    x86: dtb: Add irq domain abstraction
    x86: dtb: Add a device tree for CE4100
    x86: Add device tree support
    x86: e820: Remove conditional early mapping in parse_e820_ext
    x86: OLPC: Make OLPC=n build again
    x86: OLPC: Remove extra OLPC_OPENFIRMWARE_DT indirection
    x86: OLPC: Cleanup config maze completely
    x86: OLPC: Hide OLPC_OPENFIRMWARE config switch
    ...

    Fix up conflicts in arch/x86/platform/ce4100/ce4100.c

    Linus Torvalds
     

10 Mar, 2011

9 commits

  • Since PIE interrupts are now emulated, this patch removes the previous
    code that used the hardware counters.

    The removal of read_callback() also fixes a wrong user space behaviour
    of this driver, which was not returning the right value to read().

    [john.stultz: Merge fixups]

    CC: Thomas Gleixner
    CC: Alessandro Zummo
    CC: Marcelo Roberto Jimenez
    CC: rtc-linux@googlegroups.com
    Signed-off-by: Marcelo Roberto Jimenez
    Signed-off-by: John Stultz

    Marcelo Roberto Jimenez
     
  • The rtc-test driver is meant to provide a test/debug code for the RTC
    subsystem.

    The rtc-test driver simulates specific interrupts by echoing to the
    sys interface. Those were the update, alarm and periodic interrupts.

    As a side effect of the new implementation, any interrupt generated in
    the rtc-test driver would trigger the same code path in the generic
    code, and thus the distinction among interrupts gets lost.

    This patch preserves the previous behaviour of the rtc-test driver,
    where e.g. an update interrupt would not trigger an alarm or periodic
    interrupt, and vice-versa. In real world RTC drivers, this is not an
    issue, but in the rtc-test driver it may be interesting to distinguish
    these interrupts for testing purposes.

    CC: Thomas Gleixner
    CC: Alessandro Zummo
    CC: Marcelo Roberto Jimenez
    CC: rtc-linux@googlegroups.com
    Signed-off-by: Marcelo Roberto Jimenez
    Signed-off-by: John Stultz

    Marcelo Roberto Jimenez
     
  • This patch removes the UIE and PIE information that is now being
    supplied directly in the generic RTC code.

    CC: Thomas Gleixner
    CC: Alessandro Zummo
    CC: Marcelo Roberto Jimenez
    CC: rtc-linux@googlegroups.com
    Signed-off-by: Marcelo Roberto Jimenez
    Signed-off-by: John Stultz

    Marcelo Roberto Jimenez
     
  • Generic RTC code is always able to provide the necessary information
    about update and periodic interrupts. This patch add such information to
    the proc interface.

    CC: Thomas Gleixner
    CC: Alessandro Zummo
    CC: Marcelo Roberto Jimenez
    CC: rtc-linux@googlegroups.com
    Signed-off-by: Marcelo Roberto Jimenez
    Signed-off-by: John Stultz

    Marcelo Roberto Jimenez
     
  • With the generic RTC rework, the UIE mode irqs are handled
    in the generic layer, and only hardware specific ioctls
    get passed down to the rtc driver layer.

    So this patch removes the UIE mode ioctl handling in the rtc
    driver layer, which never get used.

    CC: Thomas Gleixner
    CC: Alessandro Zummo
    CC: Marcelo Roberto Jimenez
    CC: rtc-linux@googlegroups.com
    Signed-off-by: John Stultz

    John Stultz
     
  • Now that the generic code handles UIE mode irqs via periodic
    alarm interrupts, no one calls the
    rtc_class_ops->update_irq_enable() method anymore.

    This patch removes the driver hooks and implementations of
    update_irq_enable if no one else is calling it.

    CC: Thomas Gleixner
    CC: Alessandro Zummo
    CC: Marcelo Roberto Jimenez
    CC: rtc-linux@googlegroups.com
    Signed-off-by: John Stultz

    John Stultz
     
  • With the generic rtc code now emulating PIE mode irqs via an
    hrtimer, no one calls the rtc_class_ops->irq_set_freq call.

    This patch removes the hook and deletes the driver functions
    if no one else calls them.

    CC: Thomas Gleixner
    CC: Alessandro Zummo
    CC: Marcelo Roberto Jimenez
    CC: rtc-linux@googlegroups.com
    Signed-off-by: John Stultz

    John Stultz
     
  • With PIE mode interrupts now emulated in generic code via an hrtimer,
    no one calls rtc_class_ops->irq_set_state(), so this patch removes it
    along with driver implementations.

    CC: Thomas Gleixner
    CC: Alessandro Zummo
    CC: Marcelo Roberto Jimenez
    CC: rtc-linux@googlegroups.com
    Signed-off-by: John Stultz

    John Stultz
     
  • Mark Brown pointed out a corner case: that RTC alarms should
    be allowed to be persistent across reboots if the hardware
    supported it.

    The rework of the generic layer to virtualize the RTC alarm
    virtualized much of the alarm handling, and removed the
    code used to read the alarm time from the hardware.

    Mark noted if we want the alarm to be persistent across
    reboots, we need to re-read the alarm value into the
    virtualized generic layer at boot up, so that the generic
    layer properly exposes that value.

    This patch restores much of the earlier removed
    rtc_read_alarm code and wires it in so that we
    set the kernel's alarm value to what we find in the
    hardware at boot time.

    NOTE: Not all hardware supports persistent RTC alarm state across
    system reset. rtc-cmos for example will keep the alarm time, but
    disables the AIE mode irq. Applications should not expect the RTC
    alarm to be valid after a system reset. We will preserve what
    we can, to represent the hardware state at boot, but its not
    guarenteed.

    Further, in the future, with multiplexed RTC alarms, the
    soonest alarm to fire may not be the one set via the /dev/rt
    ioctls. So an application may set the alarm with RTC_ALM_SET,
    but after a reset find that RTC_ALM_READ returns an earlier
    time. Again, we preserve what we can, but applications should
    not expect the RTC alarm state to persist across a system reset.

    Big thanks to Mark for pointing out the issue!
    Thanks also to Marcelo for helping think through the solution.

    CC: Mark Brown
    CC: Marcelo Roberto Jimenez
    CC: Thomas Gleixner
    CC: Alessandro Zummo
    CC: rtc-linux@googlegroups.com
    Reported-by: Mark Brown
    Signed-off-by: John Stultz

    John Stultz
     

05 Mar, 2011

1 commit

  • Fix s3c_rtc_setaie() prototype to eliminate the following compile
    warning:

    drivers/rtc/rtc-s3c.c:383: warning: initialization from incompatible pointer type

    (akpm: the rtc_class_ops.alarm_irq_enable() handler is being passed two
    arguments where it expects just one, presumably with undesired effects)

    Signed-off-by: Axel Lin
    Cc: Alessandro Zummo
    Cc: Ben Dooks
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Axel Lin
     

01 Mar, 2011

1 commit


26 Feb, 2011

2 commits

  • In linux rtc_time struct, tm_mon range is 0~11, tm_wday range is 0~6,
    while in RTC HW REG, month range is 1~12, day of the week range is 1~7,
    this patch adjusts difference of them.

    The efect of this bug was that most of month will be operated on as the
    next month by the hardware (When in Jan it maybe even worse). For
    example, if in May, software wrote 4 to the hardware, which handled it as
    April. Then the logic would be different between software and hardware,
    which would cause weird things to happen.

    Signed-off-by: Lei Xu
    Cc: Alessandro Zummo
    Cc: john stultz
    Cc: Jack Lan
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Lei Xu
     
  • The member of the rtc_class_ops struct is called alarm_irq_enable and
    not alarm_irq_enabled

    CC: Thomas Gleixner
    Signed-off-by: Jelle Martijn Kok
    Signed-off-by: John Stultz
    Signed-off-by: Linus Torvalds

    Jelle Martijn Kok
     

24 Feb, 2011

2 commits

  • This allows to load the OF driver based informations from the device
    tree. Systems without BIOS may need to perform some initialization.
    PowerPC creates a PNP device from the OF information and performs this
    kind of initialization in their private PCI quirk. This looks more
    generic.

    This patch also avoids registering the platform RTC driver on X86 if
    we have a device tree blob. Otherwise we would setup the device based
    on the hardcoded information in arch/x86 rather than the device tree
    based one.

    [ tglx: Changed "int of_have_populated_dt()" to bool as recommended by
    Grant ]

    Signed-off-by: Sebastian Andrzej Siewior
    Signed-off-by: Dirk Brandewie
    Acked-by: Grant Likely
    Cc: sodaville@linutronix.de
    Cc: devicetree-discuss@lists.ozlabs.org
    Cc: rtc-linux@googlegroups.com
    Cc: Alessandro Zummo
    LKML-Reference:
    Signed-off-by: Thomas Gleixner

    Sebastian Andrzej Siewior
     
  • Make Primecell driver probe functions take a const pointer to their
    ID tables. Drivers should never modify their ID tables in their
    probe handler.

    Signed-off-by: Russell King

    Russell King
     

23 Feb, 2011

2 commits


19 Feb, 2011

1 commit


18 Feb, 2011

3 commits

  • This patch re-enables UIE timer/polling emulation for rtc devices
    that do not support alarm irqs.

    CC: Uwe Kleine-König
    CC: Thomas Gleixner
    Reported-by: Uwe Kleine-König
    Tested-by: Uwe Kleine-König
    Signed-off-by: John Stultz

    John Stultz
     
  • Uwe pointed out that my alarm based UIE emulation is not sufficient
    to replace the older timer/polling based UIE emulation on devices
    where there is no alarm irq. This causes rtc devices without alarms
    to return -EINVAL to UIE ioctls. The fix is to re-instate the old
    timer/polling method for devices without alarm irqs.

    This patch reverts the following commits:
    042620a018afcfba1d678062b62e46 - Remove UIE emulation
    1daeddd5962acad1bea55e524fc0fa - Cleanup removed UIE emulation declaration
    b5cc8ca1c9c3a37eaddf709b2fd3e1 - Remove Kconfig symbol for UIE emulation

    The emulation mode will still need to be wired-in with a following
    patch before it will work.

    CC: Uwe Kleine-König
    CC: Thomas Gleixner
    Reported-by: Uwe Kleine-König
    Signed-off-by: John Stultz

    John Stultz
     
  • On hardware that doesn't support alarm interrupts, rtc_alarm_irq_enable
    could return without releasing the ops_lock mutex.

    This was introduced in
    aa0be0f (RTC: Propagate error handling via rtc_timer_enqueue properly)

    This patch corrects the issue by only returning once the mutex is
    released.

    [john.stultz: Reworded the commit log]

    Signed-off-by: Uwe Kleine-König
    Signed-off-by: John Stultz

    Uwe Kleine-König
     

15 Feb, 2011

2 commits


12 Feb, 2011

1 commit

  • In file drivers/rtc/rtc-proc.c seq_open() can return -ENOMEM.

    86 if (!try_module_get(THIS_MODULE))
    87 return -ENODEV;
    88
    89 return single_open(file, rtc_proc_show, rtc);

    In this case before exiting (line 89) from rtc_proc_open the
    module_put(THIS_MODULE) must be called.

    Found by Linux Device Drivers Verification Project

    Signed-off-by: Alexander Strakh
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexander Strakh
     

04 Feb, 2011

3 commits

  • Two rtc drivers return values from void functions. This patch
    fixes that.

    CC: Thomas Gleixner
    CC: Alessandro Zummo
    CC: Marcelo Roberto Jimenez
    Signed-off-by: John Stultz

    John Stultz
     
  • Some rtc drivers use the ioctl method instead of the alarm_irq_enable
    method for enabling alarm interupts. With the new virtualized RTC
    rework, its important for drivers to use the alarm_irq_enable instead.

    This patch converts the drivers that use the AIE ioctl method to
    use the alarm_irq_enable method. Other ioctl cmds are left untouched.

    I have not been able to test or even compile most of these drivers.
    Any help to make sure this change is correct would be appreciated!

    CC: Alessandro Zummo
    CC: Thomas Gleixner
    CC: Marcelo Roberto Jimenez
    Reported-by: Marcelo Roberto Jimenez
    Tested-by: Marcelo Roberto Jimenez
    Signed-off-by: John Stultz

    John Stultz
     
  • Some RTC drivers enable functionality directly via their ioctl method
    instead of using the generic ioctl handling code. With the recent
    virtualization of the RTC layer, its now important that the generic
    layer always be used.

    This patch moved the rtc driver ioctl method call to after the generic
    ioctl processing is done. This allows hardware specific features or
    ioctls to still function, while relying on the generic code for handling
    everything else.

    This patch on its own may more obviously break rtc drivers that
    implement the alarm irq enablement via their ioctl method instead of
    implementing the alarm_irq_eanble method. Those drivers will be fixed
    in a following patch. Additionaly, those drivers are already likely to
    not be functioning reliably without this patch.

    CC: Alessandro Zummo
    CC: Marcelo Roberto Jimenez
    CC: Thomas Gleixner
    Reported-by: Marcelo Roberto Jimenez
    Tested-by: Marcelo Roberto Jimenez
    Signed-off-by: John Stultz

    John Stultz