02 Dec, 2009

3 commits

  • When detecting power failure, the probe function would reset the clock
    time to defined state.

    However, the clock's _date_ might still be bogus and a subsequent probe
    fails when sanity-checking these values.

    Change the power-failure fixup code to do a full setting of rtc_time,
    including a valid date.

    Signed-off-by: Johannes Weiner
    Cc: Alessandro Zummo
    Cc: Paul Gortmaker
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Johannes Weiner
     
  • The possible CCR_Y2K register values are 19 or 20 and struct rtc_time's
    tm_year is in years since 1900.

    The function translating rtc_time to register values assumes tm_year to be
    years since first christmas, though, and we end up storing 0 or 1 in the
    CCR_Y2K register, which the hardware does not refuse to do.

    A subsequent probing of the clock fails due to the invalid value range in
    the register, though.

    [ And if it didn't, reading the clock would yield a bogus year because
    the function translating registers to tm_year is assuming a register
    value of 19 or 20. ]

    This fixes the conversion from years since 1900 in tm_year to the
    corresponding CCR_Y2K value of 19 or 20.

    Signed-off-by: Johannes Weiner
    Cc: Alessandro Zummo
    Cc: Paul Gortmaker
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Johannes Weiner
     
  • "rtc" is freed and then dereferenced on the next line. This patch fixes
    that.

    Signed-off-by: Dan Carpenter
    Acked-by: Alessandro Zummo
    Cc: David Brownell
    Cc: Paul Gortmaker
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dan Carpenter
     

17 Nov, 2009

1 commit

  • This will fix some small issues with the COH 901 331 RTC driver:
    - Interrupt is disabled after alarm so that we don't fire
    multiple interrupts.
    - We return 0 from the coh901331_alarm_irq_enable() ridding
    a compile warning.
    - We alter the name in the U300 device registry to match that
    of the driver so they sucessfully resolve.

    Signed-off-by: Linus Walleij
    Signed-off-by: Russell King

    Linus Walleij
     

12 Nov, 2009

4 commits

  • v3020_mmio_read_bit() always returns 0 when left_shift > 7.

    v3020_mmio_read_bit()'s return type is (unsigned char). The code returns
    a value masked by (1 << left_shift) that is casted to the return type. If
    left_shift is larger than 7, the cast will always result in a 0 return
    value. The problem was discovered with left_shift = 16, and the included
    patch corrects the problem.

    The bug was introduced in the last (Apr 3 2009) commit of the file, kernel
    versions 2.6.30 and later.

    Cc: Alessandro Zummo
    Cc: Paul Gortmaker
    Cc: Raphael Assenat
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Scott Valentine
     
  • drivers/rtc/rtc-vr41xx.c: In function 'vr41xx_rtc_irq_set_freq':
    drivers/rtc/rtc-vr41xx.c:217: warning: comparison of distinct pointer types lacks a cast
    drivers/rtc/rtc-vr41xx.c:217: warning: right shift count >= width of type
    drivers/rtc/rtc-vr41xx.c:217: warning: passing argument 1 of '__div64_32' from incompatible pointer type
    include/asm-generic/div64.h:35: note: expected 'uint64_t *' but argument is of type 'long unsigned int *'

    Signed-off-by: Yoichi Yuasa
    Cc: Alessandro Zummo
    Cc: Paul Gortmaker
    Cc: Paul Mundt
    Cc: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Yoichi Yuasa
     
  • According to Documentation/rtc.txt, RTC_WKALM_SET sets the alarm time and
    enables/disables the alarm. We implement RTC_WKALM_SET through
    pcf50633_rtc_set_alarm. The enabling/disabling part was missing.

    Signed-off-by: Werner Almesberger
    Reported-by: Michael 'Mickey' Lauer
    Signed-off-by: Paul Fertser
    Cc: Paul Gortmaker
    Cc: Balaji Rao
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Werner Almesberger
     
  • The PCF50633 stores a month value of 1-12, but the kernel wants 0-11.

    Signed-off-by: Rask Ingemann Lambertsen
    Signed-off-by: Paul Fertser
    Cc: Paul Gortmaker
    Cc: Balaji Rao
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rask Ingemann Lambertsen
     

12 Oct, 2009

1 commit


25 Sep, 2009

1 commit


23 Sep, 2009

14 commits

  • CONFIG_RTC_HCTOSYS allows the kernel to read the system time from the RTC
    at boot and resume, avoiding the need for userspace to do so.
    Unfortunately userspace currently has no way to know whether this
    configuration option is enabled and thus cannot sensibly choose whether to
    run hwclock itself or not. Add a hctosys sysfs attribute which indicates
    whether a given RTC set the system clock.

    Signed-off-by: Matthew Garrett
    Acked-by: Alessandro Zummo
    Cc: Mark Brown
    Cc: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Matthew Garrett
     
  • Fix two new-ish runtime warnings in the at91rm9200 (etc) RTC:

    Platform driver 'at91_rtc' needs updating - please use dev_pm_ops
    ... by just switching

    IRQ 1/at91_rtc: IRQF_DISABLED is not guaranteed on shared IRQs
    ... no longer needed now that rtc_update_irq() changed

    Signed-off-by: David Brownell
    Acked-by: Alessandro Zummo
    Cc: Andrew Victor
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Brownell
     
  • Error handling code following a kzalloc should free the allocated data.

    The semantic match that finds the problem is as follows:
    (http://www.emn.fr/x-info/coccinelle/)

    //
    @r exists@
    local idexpression x;
    statement S;
    expression E;
    identifier f,f1,l;
    position p1,p2;
    expression *ptr != NULL;
    @@

    x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(...);
    ...
    if (x == NULL) S
    }
    (
    x->f1 = E
    |
    (x->f1 == NULL || ...)
    |
    f(...,x->f1,...)
    )
    ...>
    (
    return \(0\|\|ptr\);
    |
    return@p2 ...;
    )

    @script:python@
    p1 << r.p1;
    p2 << r.p2;
    @@

    print "* file: %s kmalloc %s return %s" % (p1[0].file,p1[0].line,p2[0].line)
    //

    Signed-off-by: Julia Lawall
    Cc: David Brownell
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Julia Lawall
     
  • This code is not executed before ds1307->rtc has been successfully
    initialized to the result of calling rtc_device_register. Thus the test
    that ds1307->rtc is not NULL is always true.

    A simplified version of the semantic match that finds this problem is as
    follows: (http://coccinelle.lip6.fr/)

    //
    @match exists@
    expression x, E;
    statement S1, S2;
    @@

    x = rtc_device_register(...)
    ... when != x = E
    (
    * if (x == NULL || ...) S1 else S2
    |
    * if (x == NULL && ...) S1 else S2
    )
    //

    Signed-off-by: Julia Lawall
    Acked-by: Wolfram Sang
    Cc: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Julia Lawall
     
  • [ospite@studenti.unina.it: get pcap data from the parent device]
    Signed-off-by: guiming zhuo
    Signed-off-by: Daniel Ribeiro
    Acked-by: Alessandro Zummo
    Signed-off-by: Antonio Ospite
    Cc: Mark Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Daniel Ribeiro
     
  • Signed-off-by: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alessandro Zummo
     
  • Add support for RTC on the Freescale STMP37xx/378x platform.

    Signed-off-by: dmitry pervushin
    Signed-off-by: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    dmitry pervushin
     
  • The Blackfin RTC IRQ is an internal interrupt, so it makes no sense to
    have it be shared.

    Signed-off-by: Michael Hennerich
    Signed-off-by: Mike Frysinger
    Signed-off-by: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Michael Hennerich
     
  • This adds a driver for the RTC COH 901 331 found in the ST-Ericsson U300
    series mobile platforms to the RTC subsystem. It integrates to the ARM
    kernel support recently added to RMKs ARM tree and will be enabled in the
    U300 defconfig in due time.

    Signed-off-by: Linus Walleij
    Signed-off-by: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Linus Walleij
     
  • This adds a driver for Freescale's MXC internal real time clock modules.

    The code is taken from Freescale's BSPs, but modified to fit the current
    kernel coding mechanisms. Also, the PMIC external clock function was
    removed for now to not add dead bits and keep the code as simple as
    possible.

    [akpm@linux-foundation.org: make PIE_BIT_DEF[] static]
    Signed-off-by: Daniel Mack
    Cc: Sascha Hauer
    Signed-off-by: Alessandro Zummo

    Cc: Alessandro Zummo
    Cc: Daniel Mack
    Cc: Sascha Hauer
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Daniel Mack
     
  • Signed-off: Chris Verges
    Cc: Christian Pellegrin
    Cc: Alessandro Zummo
    Cc: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Chris Verges
     
  • Add support for the Philips/NXP PCF2123 RTC.

    Signed-off: Chris Verges
    Tested-by: Chris Verges
    Signed-off: Christian Pellegrin
    Tested-by: Christian Pellegrin
    Cc: Alessandro Zummo
    Cc: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Chris Verges
     
  • This makes it consistent with other buses (platform, i2c, vio, ...). I'm
    not sure why we use the prefixes, but there must be a reason.

    This was easy enough to do it, and I did it.

    Signed-off-by: Anton Vorontsov
    Cc: David Brownell
    Cc: David Woodhouse
    Cc: Grant Likely
    Cc: Jean Delvare
    Cc: Ben Dooks
    Cc: Benjamin Herrenschmidt
    Cc: Dmitry Torokhov
    Cc: Samuel Ortiz
    Cc: "John W. Linville"
    Acked-by: Mike Frysinger
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Anton Vorontsov
     
  • Russell King
     

21 Sep, 2009

1 commit


19 Sep, 2009

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6: (262 commits)
    sh: mach-ecovec24: Add user debug switch support
    sh: Kill off unused se_skipped in alignment trap notification code.
    sh: Wire up HAVE_SYSCALL_TRACEPOINTS.
    video: sh_mobile_lcdcfb: use both register sets for display panning
    video: sh_mobile_lcdcfb: implement display panning
    sh: Fix up sh7705 flush_dcache_page() build.
    sh: kfr2r09: document the PLL/FLL RF relationship.
    sh: mach-ecovec24: need asm/clock.h.
    sh: mach-ecovec24: deassert usb irq on boot.
    sh: Add KEYSC support for EcoVec24
    sh: add kycr2_delay for sh_keysc
    sh: cpufreq: Include CPU id in info messages.
    sh: multi-evt support for SH-X3 proto CPU.
    sh: clkfwk: remove bogus set_bus_parent() from SH7709.
    sh: Fix the indication point of the liquid crystal of AP-325RXA(AP3300)
    sh: Add EcoVec24 romImage defconfig
    sh: USB disable process is needed if romImage boot for EcoVec24
    sh: EcoVec24: add HIZA setting for LED
    sh: EcoVec24: write MAC address in boot
    sh: Add romImage support for EcoVec24
    ...

    Linus Torvalds
     

17 Sep, 2009

2 commits

  • This adds support for the RTC found inside the AB3100 Mixed Signal chip.
    The symbols used for communicating with the chip is found in the
    mfd/ab3100-core.c driver that also provides the platform device.

    Signed-off-by: Linus Walleij
    Acked-by: Alessandro Zummo
    Signed-off-by: Samuel Ortiz

    Linus Walleij
     
  • The WM831x series of PMICs contain RTC functionality. The hardware
    provides a 32 bit counter incrementing at 1Hz together with a per
    tick interrupt and an alarm value. For simplicity the driver chooses
    to define the epoch for the counter as the Unix epoch - if required
    platform data can be used in future to customise this.

    When powered on from a completely cold state the RTC reports that it
    has not been configured - when this happens an error is returned
    when attempting to read the RTC in order to avoid use of values we
    know to be invalid.

    The hardware also provides security features which mean that it can
    ignore attempts to set the RTC time in certain circumstances, most
    notably if the RTC is written to too often. These errors are detected
    by verifying the written RTC value.

    Signed-off-by: Mark Brown
    Acked-by: Alessandro Zummo
    Signed-off-by: Samuel Ortiz

    Mark Brown
     

16 Sep, 2009

2 commits


10 Sep, 2009

2 commits


09 Sep, 2009

1 commit

  • With the reordered init order, the rtc device is not registered until
    later, while sh_rtc_irq_set_freq() was attempting to assign ->irq_freq
    directly, resulting in an oops. This is handled by the upper layers for
    us, so just kill off the problematic dereference completely.

    Reported-by: Guennadi Liakhovetski
    Signed-off-by: Paul Mundt

    Paul Mundt
     

20 Aug, 2009

3 commits


30 Jul, 2009

1 commit

  • rtc-cmos has two drivers, one PNP and one platform. When PNP has not
    succeeded probing, platform is registered. However, it tries to
    unregister both drivers unconditionally, instead of only unregistering
    those that were successfully registered. This causes runtime warnings to
    be emitted from the driver core code.

    Fix this with a boolean variable for each driver indicating whether
    registering was successful.

    Signed-off-by: Thadeu Lima de Souza Cascardo
    Cc: David Brownell
    Cc: Bjorn Helgaas
    Cc: Alessandro Zummo
    Cc: Ingo Molnar
    Cc: David Brownell
    Cc: Kay Sievers
    Cc: Greg KH
    Cc: Ozan Caglayan
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Thadeu Lima de Souza Cascardo
     

07 Jul, 2009

1 commit

  • When i2c_smbus_read_byte_data fails in ds1374_work, we forgot to unlock
    the held lock. Fix that.

    Signed-off-by: Jiri Slaby
    Cc: Alessandro Zummo
    Cc: Scott Wood
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jiri Slaby
     

03 Jul, 2009

1 commit


01 Jul, 2009

1 commit

  • Make sure we do not actually request the RTC IRQ until the device driver
    is fully ready to handle and process any interrupt. This way a spurious
    interrupt won't crash the system (which may happen if the bootloader was
    poking the RTC right before booting Linux).

    Signed-off-by: Mike Frysinger
    Signed-off-by: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mike Frysinger