28 Nov, 2011

2 commits


08 Aug, 2011

1 commit


27 Jul, 2011

1 commit

  • This allows us to move duplicated code in
    (atomic_inc_not_zero() for now) to

    Signed-off-by: Arun Sharma
    Reviewed-by: Eric Dumazet
    Cc: Ingo Molnar
    Cc: David Miller
    Cc: Eric Dumazet
    Acked-by: Mike Frysinger
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arun Sharma
     

16 Nov, 2010

1 commit

  • While at it, fix two checkpatch errors.
    Several non-const struct instances constified by this patch were added after
    the introduction of platform_suspend_ops in checkpatch.pl's list of "should
    be const" structs (79404849e90a41ea2109bd0e2f7c7164b0c4ce73).

    Patch against mainline.
    Inspired by hunks of the grsecurity patch, updated for newer kernels.

    Signed-off-by: Lionel Debroux
    Acked-by: Ingo Molnar
    Signed-off-by: Jiri Kosina

    Lionel Debroux
     

26 Oct, 2010

2 commits


11 Nov, 2009

1 commit

  • This patch adds the support for cpuidle on AT91 SoCs, taken from the
    cpuidle support in mach-kirkwood.
    cpuidle needs sdram_selfrefresh_enable and _disable, so move their
    definition to a separate header file instead of duplicating the code
    already used in pm.c.

    Tested-by: Nicolas Ferre
    Signed-off-by: Albin Tonnerre
    Acked-by: Andrew Victor
    Signed-off-by: Russell King

    Albin Tonnerre
     

02 Jul, 2009

1 commit

  • From: Hong Xu

    Here are the modification to at91sam9261 files dedicated to the support of
    at91sam9g10. This direction has been adopted to minimize code duplication.

    All at91sam9261 drivers are enabled in _devices and board- files. Modificaton
    to peripherals that support at91sam9g10 will be added in future patches.

    Signed-off-by: Hong Xu
    Signed-off-by: Nicolas Ferre
    Acked-by: Andrew Victor
    Signed-off-by: Russell King

    Nicolas Ferre
     

02 Apr, 2009

1 commit

  • Change pr_debug to pr_err on error paths in the AT91 power management
    code. All of the errors will result in the cpu not going into the
    suspend state. This patch makes it possible to identify problems with
    suspend when power management debugging is not enabled.

    Signed-off-by: Ryan Mallon
    Acked-by: Andrew Victor
    Signed-off-by: Russell King

    Ryan Mallon
     

23 Feb, 2009

1 commit

  • We've discovered that our AT91SAM9260 board consumed too much power when
    returning from a slowclock low-power mode. RAM self-refresh is enabled in
    a bootloader in our case, this is how we saw a difference. Estimated ca.
    30mA more on 4V battery than the same state before powersaving.

    After a small research we found that there seems to be a bogus
    sdram_selfrefresh_disable() call at the end of at91_pm_enter() call, which
    overwrites the LPR register with uninitialized value. Please find the
    suggested patch attached.

    This patch fixes correct restoring of LPR register of the Atmel AT91 SDRAM
    controller when returning from a power saving mode.

    Signed-off-by: Andrei Birjukov
    Acked-by: Andrew Victor
    Signed-off-by: Andrew Morton
    Signed-off-by: Russell King

    Andrei Birjukov
     

06 Sep, 2008

1 commit


07 Aug, 2008

2 commits


10 Jul, 2008

1 commit

  • Support for the at91sam9g20 : Atmel 400Mhz ARM 926ej-s SOC.

    AT91sam9g20 is an evolution of the at91sam9260 with a faster clock
    speed.
    We created a new board for this device but based the chip support
    directly on 9260 files with little updates.
    Here is the chip page on Atmel wabsite:
    http://atmel.com/dyn/products/product_card.asp?part_id=4337

    Signed-off-by: Sedji Gaouaou
    Signed-off-by: Justin Waters
    Acked-by: Andrew Victor
    Signed-off-by: Russell King

    sedji gaouaou
     

29 Apr, 2008

1 commit

  • Build fix for power management on at91sam9263: it has two memory
    controllers instead of just one, so it might have two banks of
    DRAM to put into selfrefresh mode. For now we continue to assume
    only the first bank is populated.

    Signed-off-by: David Brownell
    Acked-by: Andrew Victor
    Signed-off-by: Russell King

    David Brownell
     

04 Apr, 2008

2 commits


02 Feb, 2008

1 commit

  • On ACPI systems the target state set by acpi_pm_set_target() is
    reset by acpi_pm_finish(), but that need not be called if the
    suspend fails.  All platforms that use the .set_target() global
    suspend callback are affected by analogous issues.

    For this reason, we need an additional global suspend callback that
    will reset the target state regardless of whether or not the suspend
    is successful.  Also, it is reasonable to rename the .set_target()
    callback, since it will be used for a different purpose on ACPI
    systems (due to ACPI 1.0x code ordering requirements).

    Introduce the global suspend callback .end() to be executed at the
    end of the suspend sequence and rename the .set_target() global
    suspend callback to .begin().

    Signed-off-by: Rafael J. Wysocki
    Signed-off-by: Len Brown

    Rafael J. Wysocki
     

26 Jan, 2008

1 commit


19 Oct, 2007

2 commits

  • The name of 'struct pm_ops' suggests that it is related to the power
    management in general, but in fact it is only related to suspend.  Moreover,
    its name should indicate what this structure is used for, so it seems
    reasonable to change it to 'struct platform_suspend_ops'.  In that case, the
    name of the global variable of this type used by the PM core and the names of
    related functions should be changed accordingly.

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Pavel Machek
    Cc: Len Brown
    Cc: Greg KH
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rafael J. Wysocki
     
  • Move the definition of 'struct pm_ops' and related functions from
    to .

    There are, at least, the following reasons to do that:
    * 'struct pm_ops' is specifically related to suspend and not to the power
    management in general.
    * As long as 'struct pm_ops' is defined in , any modification of it
    causes the entire kernel to be recompiled, which is unnecessary and annoying.
    * Some suspend-related features are already defined in , so it
    is logical to move the definition of 'struct pm_ops' into there.
    * 'struct hibernation_ops', being the hibernation-related counterpart of
    'struct pm_ops', is defined in .

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Pavel Machek
    Cc: Len Brown
    Cc: Greg KH
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rafael J. Wysocki
     

02 Jul, 2007

1 commit

  • Commit 52ade9b3b97fd3bea42842a056fe0786c28d0555 changed the suspend code
    ordering to execute pm_ops->prepare() after the device model per-device
    .suspend() calls in order to fix some ACPI-related issues. Unfortunately, it
    broke the at91 platform which assumed that pm_ops->prepare() would be called
    before suspending devices.

    at91 used pm_ops->prepare() to get notified of the target system sleep state,
    so that it could use this information while suspending devices. However, with
    the current suspend code ordering pm_ops->prepare() is called too late for
    this purpose. Thus, at91 needs an additional method in 'struct pm_ops' that
    will be used for notifying the platform of the target system sleep state.
    Moreover, in the future such a method will also be needed by ACPI.

    This patch adds the .set_target() method to 'struct pm_ops' and makes the
    suspend code call it, if implemented, before executing the device model
    per-device .suspend() calls. It also modifies the at91 code to use
    pm_ops->set_target() instead of pm_ops->prepare().

    Signed-off-by: Rafael J. Wysocki
    Acked-by: David Brownell
    Cc: Pavel Machek
    Cc: Johannes Berg
    Cc: Len Brown
    Cc: Greg KH
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rafael J. Wysocki
     

03 Jun, 2007

1 commit


01 May, 2007

1 commit

  • This patch series cleans up some misconceptions about pm_ops. Some users of
    the pm_ops structure attempt to use it to stop the user from entering suspend
    to disk, this, however, is not possible since the user can always use
    "shutdown" in /sys/power/disk and then the pm_ops are never invoked. Also,
    platforms that don't support suspend to disk simply should not allow
    configuring SOFTWARE_SUSPEND (read the help text on it, it only selects
    suspend to disk and nothing else, all the other stuff depends on PM).

    The pm_ops structure is actually intended to provide a way to enter
    platform-defined sleep states (currently supported states are "standby" and
    "mem" (suspend to ram)) and additionally (if SOFTWARE_SUSPEND is configured)
    allows a platform to support a platform specific way to enter low-power mode
    once everything has been saved to disk. This is currently only used by ACPI
    (S4).

    This patch:

    The pm_ops.pm_disk_mode is used in totally bogus ways since nobody really
    seems to understand what it actually does.

    This patch clarifies the pm_disk_mode description.

    It also removes all the arm and sh users that think they can veto suspend to
    disk via pm_ops; not so since the user can always do echo shutdown >
    /sys/power/disk, they need to find a better way involving Kconfig or such.

    ACPI is the only user left with a non-zero pm_disk_mode.

    The patch also sets the default mode to shutdown again, but when a new pm_ops
    is registered its pm_disk_mode is selected as default, that way the default
    stays for ACPI where it is apparently required.

    Signed-off-by: Johannes Berg
    Cc: David Brownell
    Acked-by: Pavel Machek
    Cc:
    Cc: Len Brown
    Acked-by: Russell King
    Cc: Greg KH
    Cc: "Rafael J. Wysocki"
    Acked-by: Paul Mundt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Johannes Berg
     

08 Feb, 2007

2 commits

  • Add support for the Atmel AT91SAM9263 processor. It is similar to the
    AT91SAM9260 but with more integrated peripherals, 5 GPIO banks, etc.

    Original patch from Nicolas Ferre.

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

    Andrew Victor
     
  • Now that Linux includes support for the Atmel AT91SAM9260 and
    AT91SAM9261 processors in addition to the original Atmel AT91RM9200
    (with support for more AT91 processors pending), the "mach-at91rm9200"
    and "arch-at91rm9200" directories should be renamed to indicate their
    more generic nature.

    The following git commands should be run BEFORE applying this patch:
    git-mv arch/arm/mach-at91rm9200 arch/arm/mach-at91
    git-mv include/asm-arm/arch-at91rm9200 include/asm-arm/arch-at91

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

    Andrew Victor