29 Mar, 2011

1 commit


10 Mar, 2011

3 commits

  • 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
     
  • 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
     

04 Feb, 2011

1 commit

  • 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
     

08 Nov, 2010

1 commit

  • request_mem_region() will call kzalloc to allocate memory for struct resource.
    release_resource() unregisters the resource but does not free the allocated
    memory, thus use release_mem_region() instead to fix the memory leak.

    Signed-off-by: Axel Lin
    Signed-off-by: Paul Mundt

    Axel Lin
     

30 Mar, 2010

1 commit

  • …it slab.h inclusion from percpu.h

    percpu.h is included by sched.h and module.h and thus ends up being
    included when building most .c files. percpu.h includes slab.h which
    in turn includes gfp.h making everything defined by the two files
    universally available and complicating inclusion dependencies.

    percpu.h -> slab.h dependency is about to be removed. Prepare for
    this change by updating users of gfp and slab facilities include those
    headers directly instead of assuming availability. As this conversion
    needs to touch large number of source files, the following script is
    used as the basis of conversion.

    http://userweb.kernel.org/~tj/misc/slabh-sweep.py

    The script does the followings.

    * Scan files for gfp and slab usages and update includes such that
    only the necessary includes are there. ie. if only gfp is used,
    gfp.h, if slab is used, slab.h.

    * When the script inserts a new include, it looks at the include
    blocks and try to put the new include such that its order conforms
    to its surrounding. It's put in the include block which contains
    core kernel includes, in the same order that the rest are ordered -
    alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
    doesn't seem to be any matching order.

    * If the script can't find a place to put a new include (mostly
    because the file doesn't have fitting include block), it prints out
    an error message indicating which .h file needs to be added to the
    file.

    The conversion was done in the following steps.

    1. The initial automatic conversion of all .c files updated slightly
    over 4000 files, deleting around 700 includes and adding ~480 gfp.h
    and ~3000 slab.h inclusions. The script emitted errors for ~400
    files.

    2. Each error was manually checked. Some didn't need the inclusion,
    some needed manual addition while adding it to implementation .h or
    embedding .c file was more appropriate for others. This step added
    inclusions to around 150 files.

    3. The script was run again and the output was compared to the edits
    from #2 to make sure no file was left behind.

    4. Several build tests were done and a couple of problems were fixed.
    e.g. lib/decompress_*.c used malloc/free() wrappers around slab
    APIs requiring slab.h to be added manually.

    5. The script was run on all .h files but without automatically
    editing them as sprinkling gfp.h and slab.h inclusions around .h
    files could easily lead to inclusion dependency hell. Most gfp.h
    inclusion directives were ignored as stuff from gfp.h was usually
    wildly available and often used in preprocessor macros. Each
    slab.h inclusion directive was examined and added manually as
    necessary.

    6. percpu.h was updated not to include slab.h.

    7. Build test were done on the following configurations and failures
    were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
    distributed build env didn't work with gcov compiles) and a few
    more options had to be turned off depending on archs to make things
    build (like ipr on powerpc/64 which failed due to missing writeq).

    * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
    * powerpc and powerpc64 SMP allmodconfig
    * sparc and sparc64 SMP allmodconfig
    * ia64 SMP allmodconfig
    * s390 SMP allmodconfig
    * alpha SMP allmodconfig
    * um on x86_64 SMP allmodconfig

    8. percpu.h modifications were reverted so that it could be applied as
    a separate patch and serve as bisection point.

    Given the fact that I had only a couple of failures from tests on step
    6, I'm fairly confident about the coverage of this conversion patch.
    If there is a breakage, it's likely to be something in one of the arch
    headers which should be easily discoverable easily on most builds of
    the specific arch.

    Signed-off-by: Tejun Heo <tj@kernel.org>
    Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>

    Tejun Heo
     

16 Dec, 2009

1 commit


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

1 commit

  • - simplifies irq set freq
    - ioctl() was duplicating functionalities of rtc-dev core
    - corrected initialization sequence
    - use platform_driver_probe

    Signed-off-by: Alessandro Zummo
    Cc: Angelo Castello
    Cc: Giuseppe Cavallaro
    Cc: Kay Sievers
    Cc: Jamie Lenehan
    Signed-off-by: Paul Mundt

    Alessandro Zummo
     

16 Apr, 2009

1 commit


02 Apr, 2009

1 commit

  • Modify the sh_rtc driver to use set_irq_wake() during suspend
    and resume. These functions are used to enable the rtc interrupts
    in the interrupt controller so the rtc can be used to wakeup the
    system from suspend.

    Signed-off-by: Magnus Damm
    Signed-off-by: Paul Mundt

    Magnus Damm
     

20 Mar, 2009

3 commits

  • Flag that the SuperH RTC supports wakeup.

    Signed-off-by: Magnus Damm
    Signed-off-by: Paul Mundt

    Magnus Damm
     
  • This patch modifies invalid time handling in the
    SuperH RTC driver. Instead of zeroing the returned
    value at read-out time we just return an error code
    and reset invalid values during probe.

    Signed-off-by: Magnus Damm
    Signed-off-by: Paul Mundt

    Magnus Damm
     
  • This patch modifies the SuperH RTC driver to only
    enable carry interrupts when needed. So by default
    no interrupts are enabled with this patch. Without
    this patch a suspending system will most likely
    wake up by the carry interrupt regardless if the
    alarm interrupt has been enabled or not.

    Signed-off-by: Magnus Damm
    Signed-off-by: Paul Mundt

    Magnus Damm
     

06 Mar, 2009

1 commit


27 Feb, 2009

1 commit

  • Add support for single IRQ hardware to the sh-rtc driver.

    This is useful for processors with limited interrupt masking
    support such as sh7750 and sh7780. With this patch in place we
    can add logic to the intc code that merges all RTC vectors into
    a single linux interrupt with proper masking/unmasking support.

    Specify a single IRQ in the platform data to use this new shared
    IRQ feature. Separate Periodic/Carry/Alarm IRQs are still supported.

    Signed-off-by: Magnus Damm
    Signed-off-by: Paul Mundt

    Magnus Damm
     

07 Jan, 2009

2 commits

  • Move the power of 2 check on frequencies down into individual rtc drivers

    This is to allow for non power of 2 real time clock periodic interrupts
    such as those on the pxa27x to be found in the new pxa27x-rtc driver

    Signed-off-by: Jonathan Cameron
    Signed-off-by: Alessandro Zummo
    Cc: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jonathan Cameron
     
  • This patch fixes a bunch of irq checking misuses. Most drivers were
    getting irq via platform_get_irq(), which returns -ENXIO or r->start.

    rtc-cmos.c is special. It is using PNP and platform bindings. Hopefully
    nobody is using PNP IRQ 0 for RTC. So the changes should be safe.

    rtc-sh.c is using platform_get_irq, but was storing a result into an
    unsigned type, then was checking for < 0. This is fixed now.

    Signed-off-by: Anton Vorontsov
    Cc: Alessandro Zummo
    Acked-by: David Brownell
    Acked-by: Paul Mundt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Anton Vorontsov
     

21 Oct, 2008

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6: (112 commits)
    sh: Move SH-4 CPU headers down one more level.
    sh: Only build in gpio.o when CONFIG_GENERIC_GPIO is selected.
    sh: Migrate common board headers to mach-common/.
    sh: Move the CPU definition headers from asm/ to cpu/.
    serial: sh-sci: Add support SCIF of SH7723
    video: add sh_mobile_lcdc platform flags
    video: remove unused sh_mobile_lcdc platform data
    sh: remove consistent alloc cruft
    sh: add dynamic crash base address support
    sh: reduce Migo-R smc91x overruns
    sh: Fix up some merge damage.
    Fix debugfs_create_file's error checking method for arch/sh/mm/
    Fix debugfs_create_dir's error checking method for arch/sh/kernel/
    sh: ap325rxa: Add support RTC RX-8564LC in AP325RXA board
    sh: Use sh7720 GPIO on magicpanelr2 board
    sh: Add sh7720 pinmux code
    sh: Use sh7203 GPIO on rsk7203 board
    sh: Add sh7203 pinmux code
    sh: Use sh7723 GPIO on AP325RXA board
    sh: Add sh7723 pinmux code
    ...

    Linus Torvalds
     

20 Oct, 2008

2 commits


17 Oct, 2008

1 commit

  • Make the rtc framework consistent about disabling 1/second update IRQs
    that may have been activated through the /dev interface, when that /dev
    file is closed. (It may have closed because of coredump, etc.) This was
    previously done only for emulated update IRQs ... now, do it always.

    Also comment the current policy: repeating IRQs (periodic, update) that
    userspace enabled will be cleanly disabled, but alarms are left alone.
    Such repeating IRQs are a constant and pointless system load.

    Update some RTC drivers to remove now-needless release() methods. Most
    such methods just enforce that policy. The others all seem to be buggy,
    and mistreat in-kernel clients of periodic or alarm IRQs.

    Signed-off-by: David Brownell
    Acked-by: Andrew Sharp
    Cc: Angelo Castello
    Acked-by: Atsushi Nemoto
    Acked-by: Paul Mundt
    Cc: Thomas Hommel
    Acked-by: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Brownell
     

11 Sep, 2008

1 commit


08 May, 2008

1 commit


28 Apr, 2008

1 commit


19 Apr, 2008

1 commit


11 Apr, 2008

1 commit

  • Since 43cc71eed1250755986da4c0f9898f9a635cb3bf, the platform modalias is
    prefixed with "platform:". Add MODULE_ALIAS() to the hotpluggable RTC
    platform drivers, to re-enable module auto loading.

    [dbrownell@users.sourceforge.net: more drivers, minor fix]
    Signed-off-by: Kay Sievers
    Signed-off-by: David Brownell
    Cc: Greg KH
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kay Sievers
     

28 Jan, 2008

3 commits


07 Nov, 2007

2 commits


21 Sep, 2007

1 commit

  • All SH-4 parts have a 4-digit year, while the SH-3 parts typically
    only use a 2-digit one. The SH7705, SH7710, and SH7712 SH-3 parts
    however opted to extend it to 4-digit and still look and act like
    an SH-3 RTC in all other ways.

    This adds a capability flag (RTC_CAP_4_DIGIT_YEAR) that these
    corner-case CPU subtypes can set in their platform data and cleans
    up some of the ifdef mess in the driver as a result.

    Reported-by: Markus Brunner
    Signed-off-by: Paul Mundt

    Paul Mundt
     

26 Jul, 2007

1 commit


09 May, 2007

3 commits


23 Jan, 2007

1 commit


12 Jan, 2007

1 commit