26 Jul, 2016

1 commit


20 May, 2016

1 commit


05 Sep, 2015

6 commits


05 Mar, 2015

1 commit

  • The IRQ line used by the RTC device is usually shared with the system timer
    (PIT) on at91 platforms.

    Since timers are registering their handlers with IRQF_NO_SUSPEND, we should
    expect being called in suspended state, and properly wake the system up
    when this is the case.

    Set IRQF_COND_SUSPEND flag when registering the IRQ handler to inform
    irq core that it can safely be called while the system is suspended.

    Signed-off-by: Boris Brezillon
    Reviewed-by: Alexandre Belloni
    Acked-by: Nicolas Ferre
    Acked-by: Mark Rutland
    Signed-off-by: Rafael J. Wysocki

    Boris BREZILLON
     

14 Feb, 2015

1 commit


15 Dec, 2014

1 commit

  • Pull driver core update from Greg KH:
    "Here's the set of driver core patches for 3.19-rc1.

    They are dominated by the removal of the .owner field in platform
    drivers. They touch a lot of files, but they are "simple" changes,
    just removing a line in a structure.

    Other than that, a few minor driver core and debugfs changes. There
    are some ath9k patches coming in through this tree that have been
    acked by the wireless maintainers as they relied on the debugfs
    changes.

    Everything has been in linux-next for a while"

    * tag 'driver-core-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (324 commits)
    Revert "ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries"
    fs: debugfs: add forward declaration for struct device type
    firmware class: Deletion of an unnecessary check before the function call "vunmap"
    firmware loader: fix hung task warning dump
    devcoredump: provide a one-way disable function
    device: Add dev__once variants
    ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries
    ath: use seq_file api for ath9k debugfs files
    debugfs: add helper function to create device related seq_file
    drivers/base: cacheinfo: remove noisy error boot message
    Revert "core: platform: add warning if driver has no owner"
    drivers: base: support cpu cache information interface to userspace via sysfs
    drivers: base: add cpu_device_create to support per-cpu devices
    topology: replace custom attribute macros with standard DEVICE_ATTR*
    cpumask: factor out show_cpumap into separate helper function
    driver core: Fix unbalanced device reference in drivers_probe
    driver core: fix race with userland in device_add()
    sysfs/kernfs: make read requests on pre-alloc files use the buffer.
    sysfs/kernfs: allow attributes to request write buffer be pre-allocated.
    fs: sysfs: return EGBIG on write if offset is larger than file size
    ...

    Linus Torvalds
     

13 Nov, 2014

6 commits

  • The RTT block is using the slow clock which is accessible through the clk
    API.
    Use the clk API to retrieve, enable and get the slow clk rate instead of
    the AT91_SLOW_CLOCK macro (which hardcodes the slow clk rate).
    Doing this allows us to reference the clk thus preventing the CCF from
    disabling it during the "disable unused" phase.

    Signed-off-by: Boris BREZILLON
    Acked-by: Alexandre Belloni
    Acked-by: Johan Hovold
    Acked-by: Arnd Bergmann
    Signed-off-by: Nicolas Ferre

    Boris BREZILLON
     
  • The GPBR registers are not part of the RTT block and thus should not be
    defined in the reg property of the rtt node.

    Use syscon to provide a proper DT representation and reference the GPBR
    syscon device in a new "atmel,rtt-rtc-time-reg" property which store both
    the syscon device phandle and the register offset within the GPBR block.

    When using non DT boards, we won't be able to retrieve the syscon regmap,
    hence we need to create our own regmap using the memory region defined
    in the 2nd memory resource assigned to the RTT platform device.

    Signed-off-by: Boris BREZILLON
    Acked-by: Alexandre Belloni
    Acked-by: Johan Hovold
    Acked-by: Arnd Bergmann
    Signed-off-by: Nicolas Ferre

    Boris BREZILLON
     
  • Add of_match_table to the existing driver so that rtt nodes defined in at91
    DTs can be attached to this driver.

    Signed-off-by: Boris BREZILLON
    Acked-by: Alexandre Belloni
    Acked-by: Johan Hovold
    Acked-by: Arnd Bergmann
    Signed-off-by: Nicolas Ferre

    Boris BREZILLON
     
  • Replace devm_ioremap calls by devm_ioremap_resource which already check
    resource consistency (resource != NULL) and print an error in case of
    failure.

    Signed-off-by: Boris BREZILLON
    Acked-by: Alexandre Belloni
    Acked-by: Johan Hovold
    Acked-by: Arnd Bergmann
    Signed-off-by: Nicolas Ferre

    Boris BREZILLON
     
  • Raw versions of writel and writel should not be directly used and should
    be replaced by their relaxed versions (readl/writel_relaxed), which take
    endianness conversion into account.

    In this driver we prefer the standard readl/writel function which add the
    appropriate memory barrier around the access (the performance penalty is
    negligible for this kind of application).

    Signed-off-by: Boris BREZILLON
    Acked-by: Alexandre Belloni
    Acked-by: Johan Hovold
    Acked-by: Arnd Bergmann
    Signed-off-by: Nicolas Ferre

    Boris BREZILLON
     
  • In order to support multi platform kernel drivers should not include
    machine specific headers.
    Copy RTT macros in the driver code and remove any machine specific
    headers.

    Signed-off-by: Boris BREZILLON
    Acked-by: Alexandre Belloni
    Acked-by: Johan Hovold
    Acked-by: Arnd Bergmann
    Signed-off-by: Nicolas Ferre

    Boris BREZILLON
     

20 Oct, 2014

1 commit


20 Dec, 2013

1 commit

  • The driver needs the symbol AT91_SLOW_CLOCK which is defined in
    arch/arm/mach-at91/include/mach/hardware.h. This file is included
    implicitly via linux/module.h -> linux/kmod.h -> linux/gfp.h ->
    linux/mmzone.h -> linux/memory_hotplug.h -> linux/notifier.h ->
    linux/srcu.h -> linux/workqueue.h -> linux/timer.h -> linux/ktime.h ->
    linux/jiffies.h -> linux/timex.h -> mach/timex.h -> mach/hardware.h .

    So better include it explicitly not only because the last link will go
    away soon.

    Acked-by: Nicolas Ferre
    Acked-by: Andrew Morton
    Signed-off-by: Uwe Kleine-König

    Uwe Kleine-König
     

04 Jul, 2013

1 commit

  • The driver core clears the driver data to NULL after device_release or
    on probe failure, since commit 0998d063100 ("device-core: Ensure drvdata
    = NULL when no driver is bound"). Thus, it is not needed to manually
    clear the device driver data to NULL.

    Signed-off-by: Jingoo Han
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jingoo Han
     

30 Apr, 2013

2 commits


04 Jan, 2013

1 commit

  • CONFIG_HOTPLUG is going away as an option. As a result, the __dev*
    markings need to be removed.

    This change removes the use of __devinit, __devexit_p, __devinitdata,
    __devinitconst, and __devexit from these drivers.

    Based on patches originally written by Bill Pemberton, but redone by me
    in order to handle some of the coding style issues better, by hand.

    Cc: Bill Pemberton
    Cc: Alessandro Zummo
    Cc: Srinidhi Kasagar
    Cc: Linus Walleij
    Cc: Mike Frysinger
    Cc: Wan ZongShun
    Cc: Guan Xuetao
    Cc: Mark Brown
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

06 Nov, 2012

1 commit


06 Oct, 2012

1 commit

  • This driver does seems to do only platform_driver_register in the init
    function and platform_driver_unregister in the exit function,

    so replace all this code including the module_init and module_exit with
    module_platform_driver macro...

    Signed-off-by: Devendra Naga
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Devendra Naga
     

23 Aug, 2012

1 commit


28 Mar, 2012

1 commit

  • Pull "ARM: device tree work" from Arnd Bergmann:
    "Most of these patches convert code from using static platform data to
    describing the hardware in the device tree. This is only the first
    half of the changes for v3.4 because a lot of patches for this topic
    came in the last week before the merge window.

    Signed-off-by: Arnd Bergmann "

    Fix up trivial conflicts in arch/arm/mach-vexpress/{Kconfig,core.h}

    * tag 'dt' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (86 commits)
    Document: devicetree: add OF documents for arch-mmp
    ARM: dts: append DTS file of pxa168
    ARM: mmp: append OF support on pxa168
    ARM: mmp: enable rtc clk in pxa168
    i2c: pxa: add OF support
    serial: pxa: add OF support
    arm/dts: mt_ventoux: very basic support for TeeJet Mt.Ventoux board
    ARM: OMAP2+: Remove extra ifdefs for board-generic
    ARM: OMAP2+: Fix build error when only ARCH_OMAP2/3 or 4 is selected
    ASoC: DT: Add digital microphone binding to PAZ00 board.
    ARM: dt: Add ARM PMU to tegra*.dtsi
    ARM: at91: at91sam9x5cm/dt: add leds support
    ARM: at91: usb_a9g20/dt: add gpio-keys support
    ARM: at91: at91sam9m10g45ek/dt: add gpio-keys support
    ARM: at91: at91sam9m10g45ek/dt: add leds support
    ARM: at91: usb_a9g20/dt: add leds support
    ARM: at91/pio: add new PIO3 features
    ARM: at91: add sam9_smc.o to at91sam9x5 build
    ARM: at91/tc/clocksource: Add 32 bit variant to Timer Counter
    ARM: at91/tc: add device tree support to atmel_tclib
    ...

    Linus Torvalds
     

24 Mar, 2012

1 commit

  • Since commit e58aa3d2d0cc ("genirq: run irq handlers with interrupts
    disabled") we run all interrupt handlers with interrupts disabled and we
    even check and yell when an interrupt handler returns with interrupts
    enabled - see commit b738a50a2026 ("genirq: warn when handler enables
    interrupts").

    So now this flag is a NOOP and can be removed.

    Signed-off-by: Yong Zhang
    Acked-by: Linus Walleij
    Acked-by: Wan ZongShun
    Cc: Alessandro Zummo
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Yong Zhang
     

23 Feb, 2012

3 commits


14 Feb, 2012

1 commit


10 Mar, 2011

1 commit

  • 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
     

26 Feb, 2011

1 commit


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
     

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
     

07 Mar, 2010

1 commit

  • Memset should be given the size of the structure, not the size of the
    pointer.

    The semantic patch that makes this change is as follows:
    (http://coccinelle.lip6.fr/)

    //
    @@
    type T;
    T *x;
    expression E;
    @@

    memset(x, E, sizeof(
    + *
    x))
    //

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

    Julia Lawall
     

25 Mar, 2009

1 commit


02 Dec, 2008

1 commit

  • The AT91CAP9 revC CPU has a few differences over the previous,
    revB CPU which was distributed in small quantities only (revA was
    an internal Atmel product only).

    This patch adds the detection routines to recognize the different
    AT91CAP9 revisions (based on the PMC subsystem version number), and
    uses them to:
    - activate a workaround for the external interrupts levels
    (on revB CPUs)
    - set the UDPHS_BYPASS bit (on revB CPUs)
    - set AT91_GPBR register address to the correct offset
    (0xfffffd50 on revB, 0xfffffd60 on revC)

    For debugging usage, the CPU revision can be found in /proc/cpuinfo
    on the 'Revision' line.

    This patch is extracted from Andrew Victor's -at91 patch (2.6.27-at91.patch)
    where it has been tested for the last 6 months.

    Signed-off-by: Stelian Pop
    Signed-off-by: Andrew Victor
    Signed-off-by: Russell King

    Stelian Pop
     

07 Aug, 2008

1 commit