History log of /drivers/amba/bus.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
1e45860f541497d73162305d48b638d9b87e1ae3 13-Apr-2012 Mark Brown <broonie@sirena.org.uk> ARM: 7366/3: amba: Remove AMBA level regulator support

The AMBA bus regulator support is being used to model on/off switches
for power domains which isn't terribly idiomatic for modern kernels with
the generic power domain code and creates integration problems on platforms
which don't use regulators for their power domains as it's hard to tell
the difference between a regulator that is needed but failed to be provided
and one that isn't supposed to be there (though DT does make that easier).

Platforms that wish to use the regulator API to manage their power domains
can indirect via the power domain interface.

This feature is only used with the vape supply of the db8500 PRCMU
driver which supplies the UARTs and MMC controllers, none of which have
support for managing vcore at runtime in mainline (only pl022 SPI
controller does). Update that supply to have an always_on constraint
until the power domain support for the system is updated so that it is
enabled for these users, this is likely to have no impact on practical
systems as probably at least one of these devices will be active and
cause AMBA to hold the supply on anyway.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Tested-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
/drivers/amba/bus.c
2eac58d5026e4ec8b17ff8b62877fea9e1d2f1b3 18-Dec-2011 Russell King <rmk+kernel@arm.linux.org.uk> ARM: amba: make use of -1 IRQs warn

Make the core warn about the use of -1 (NO_IRQ)

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
/drivers/amba/bus.c
023f117c547719fbc087ad72276aec5a026370df 18-Dec-2011 Russell King <rmk+kernel@arm.linux.org.uk> ARM: amba: make irq 0 invalid

Fix core bus and MMCI such that irq 0 means that there is no IRQ
attached.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
/drivers/amba/bus.c
d5dc9271b25822f36d299f8cab985379743424b9 18-Dec-2011 Russell King <rmk+kernel@arm.linux.org.uk> ARM: amba: add amba_device allocation/add/put functions

Add functions to allocate and initialize AMBA device structures, and
add them to the Linux device manager. This allows us to kill this
type of operation from individual platforms, moving it to core code.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
/drivers/amba/bus.c
eb59c505f8a5906ad2e053d14fab50eb8574fd6f 08-Jan-2012 Linus Torvalds <torvalds@linux-foundation.org> Merge branch 'pm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

* 'pm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (76 commits)
PM / Hibernate: Implement compat_ioctl for /dev/snapshot
PM / Freezer: fix return value of freezable_schedule_timeout_killable()
PM / shmobile: Allow the A4R domain to be turned off at run time
PM / input / touchscreen: Make st1232 use device PM QoS constraints
PM / QoS: Introduce dev_pm_qos_add_ancestor_request()
PM / shmobile: Remove the stay_on flag from SH7372's PM domains
PM / shmobile: Don't include SH7372's INTCS in syscore suspend/resume
PM / shmobile: Add support for the sh7372 A4S power domain / sleep mode
PM: Drop generic_subsys_pm_ops
PM / Sleep: Remove forward-only callbacks from AMBA bus type
PM / Sleep: Remove forward-only callbacks from platform bus type
PM: Run the driver callback directly if the subsystem one is not there
PM / Sleep: Make pm_op() and pm_noirq_op() return callback pointers
PM/Devfreq: Add Exynos4-bus device DVFS driver for Exynos4210/4212/4412.
PM / Sleep: Merge internal functions in generic_ops.c
PM / Sleep: Simplify generic system suspend callbacks
PM / Hibernate: Remove deprecated hibernation snapshot ioctls
PM / Sleep: Fix freezer failures due to racy usermodehelper_is_disabled()
ARM: S3C64XX: Implement basic power domain support
PM / shmobile: Use common always on power domain governor
...

Fix up trivial conflict in fs/xfs/xfs_buf.c due to removal of unused
XBT_FORCE_SLEEP bit
8114ab763b2d297c8af49bf380a093d76e929692 18-Dec-2011 Rafael J. Wysocki <rjw@sisk.pl> PM / Sleep: Remove forward-only callbacks from AMBA bus type

The forward-only PM callbacks provided by the AMBA bus type are not
necessary any more, because the PM core executes driver callbacks
when the corresponding subsystem callbacks are not present, so drop
them.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
/drivers/amba/bus.c
523817bd22617cd62199ae4ca2a6f5e1aa250654 05-Oct-2011 Dave Martin <dave.martin@linaro.org> ARM: amba: Auto-generate AMBA driver module aliases during modpost

This patch adds the necessary support in file2alias.c to define
suitable aliases based on the amba_id table in AMBA driver modules.

This should be sufficient to allow such modules to be auto-loaded
via udev. The AMBA bus driver's uevent hotplug code is also
modified to pass an approriate MODALIAS string in the event.

For simplicity, the AMBA ID is treated an an opaque 32-bit numeber.
Module alises use patterns as appropriate to describe the value-
mask pairs described in the driver's amba_id list.

The proposed alias format is (extended regex):

^amba:d(HEX){8}$

Where HEX is a single upper-case HEX digit or a pattern (? or []
expression) matching a single upper-case HEX digit, as expected by
udev.

"d" is short for "device", following existing alias naming
conventions for other device types. This adds some flexibility for
unambiguously extending the alias format in the future by adding
additional leading and trailing fields, if this turns out to be
necessary.

Signed-off-by: Dave Martin <dave.martin@linaro.org>
Acked-by: Pawel Moll <pawel.moll@arm.com>
/drivers/amba/bus.c
ac3e2fa6770052a82d42fc4db194a27317518c97 22-Sep-2011 Russell King <rmk+kernel@arm.linux.org.uk> clk: amba bus: convert to clk_prepare()/clk_unprepare()

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
/drivers/amba/bus.c
92b97f0aaccbf9de4a29696e6253bf82e8850d1d 14-Aug-2011 Russell King <rmk+kernel@arm.linux.org.uk> PM: add runtime PM support to core Primecell driver

Add runtime PM support to the core Primecell driver, following the PCI
model of how this is done.

Rather than having every driver fiddle about with enabling runtime PM,
that's dealt with in the core and instead, drivers just do a put() in
their probe and a balancing get() in their remove function to activate
runtime PM for the device.

As we're dealing with enabling runtime PM in the core, fix up spi-pl022
as it must not enable and disable runtime PM itself anymore.

Tested-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
/drivers/amba/bus.c
97ceed1fc29b601e64af98fd785e25fec4383b12 24-Mar-2011 Linus Walleij <linus.walleij@linaro.org> ARM: 6829/1: amba: make hardcoded periphid override hardware

This makes a hardcoded periphid from the platform override any
magic number found in the hardware. This shall henceforth be used
when the information found in the hardware is either missing,
i.e. not encoding the CID with the magic cookie 0xb105f00d, or
incorrect such that the revision number should have been bumped in
hardware, but the silicon designer has failed to do so.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
/drivers/amba/bus.c
1f112cee07b314e244ee9e71d9c1e6950dc13327 11-Apr-2011 Rafael J. Wysocki <rjw@sisk.pl> PM / Hibernate: Introduce CONFIG_HIBERNATE_CALLBACKS

Xen save/restore is going to use hibernate device callbacks for
quiescing devices and putting them back to normal operations and it
would need to select CONFIG_HIBERNATION for this purpose. However,
that also would cause the hibernate interfaces for user space to be
enabled, which might confuse user space, because the Xen kernels
don't support hibernation. Moreover, it would be wasteful, as it
would make the Xen kernels include a substantial amount of code that
they would never use.

To address this issue introduce new power management Kconfig option
CONFIG_HIBERNATE_CALLBACKS, such that it will only select the code
that is necessary for the hibernate device callbacks to work and make
CONFIG_HIBERNATION select it. Then, Xen save/restore will be able to
select CONFIG_HIBERNATE_CALLBACKS without dragging the entire
hibernate code along with it.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Tested-by: Shriram Rajagopalan <rshriram@cs.ubc.ca>
/drivers/amba/bus.c
25985edcedea6396277003854657b5f3cb31a628 31-Mar-2011 Lucas De Marchi <lucas.demarchi@profusion.mobi> Fix common misspellings

Fixes generated by 'codespell' and manually reviewed.

Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
/drivers/amba/bus.c
ba74ec7f6b2bf9e1b5d0f2c5cef08766944cb2c8 23-Feb-2011 Rabin Vincent <rabin.vincent@stericsson.com> ARM: 6758/1: amba: support pm ops

Support pm_ops in the AMBA bus, required to allow drivers to use runtime pm.
The implementation of AMBA bus pm ops is based on the platform bus
implementation.

Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
/drivers/amba/bus.c
c862aab0bc14060bfa8351ff1e93cbce9669abcf 19-Feb-2011 Russell King <rmk+kernel@arm.linux.org.uk> ARM: amba: make internal ID table handling const

As all probe() functions now take a const pointer, we can make the bus
level code deal with const pointers too.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
/drivers/amba/bus.c
394d5aefcdecb51bbf7d6df757e73559c9692a08 12-Feb-2011 Rob Herring <rob.herring@calxeda.com> ARM: 6662/1: amba: make amba_bustype non-static

Export amba_bustype struct so it can be used for things like registering
bus notifiers.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
/drivers/amba/bus.c
65500fa94aaeb3475e39c0c5180f188014164ca4 04-Nov-2010 Linus Walleij <linus.walleij@stericsson.com> ARM: 6467/1: amba: optional PrimeCell core voltage switch

On some contemporary sub-micron SoCs, peripherals on the chip have
power domain switches, i.e. the voltage to the core may be turned
off to conserve power. In the Ux500 we have this for out PrimeCell
derivates.

This patch makes it possible to specify an (optional) regulator to
handle the voltage domain switch on AMBA PrimeCells, modeled very
similar to how block clocks are handled.

Additional amba_vcore_[enable|disable] calls are supplied to make
it possible introduce optional powering off of the core voltage.
Using this will require code to spool/unspool any core HW state.

Cc: Rabin Vincent <rabin.vincent@stericsson.com>
Cc: Bengt Jonsson <bengt.g.jonsson@stericsson.com>
Cc: Jonas Aaberg <jonas.aberg@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
/drivers/amba/bus.c
01723a9566f9e9ce4c75e5c4c9f6dc20600871a7 07-Sep-2010 Linus Walleij <linus.walleij@stericsson.com> ARM: 6368/1: move the PrimeCell IDs to use macros

This make four macros for the PrimeCell ID register available to
drivers that use them witout using the PrimeCell/AMBA bus
abstraction and struct amba_device. It also moves the magic
PrimeCell CID "B105F00D" to the bus.h header file.

Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
/drivers/amba/bus.c
7cfe249475fdd82ad3c2767a9b906cc775dab868 15-Jul-2010 Russell King <rmk+kernel@arm.linux.org.uk> ARM: AMBA: Add pclk support to AMBA bus infrastructure

Some platforms gate the pclk (APB - the bus - clock) to the peripherals
for power saving, along with the functional clock. When devices are
accessed without pclk enabled, the kernel will oops.

This gives them two options:

1. Leave all clocks on all the time.
2. Attempt to gate pclk along with the functional clock.

(With some hardware, pclk and the functional clock are gated by a single
bit in a register.)

(1) has the disadvantage that it causes increased power usage, which is
bad news for battery operated devices. (2) can lead to kernel oops if
registers are accessed without the functional clock being enabled.

So, introduce the apb_pclk signal in such a way existing drivers don't
need to be updated. Essentially, this means we guarantee that:

1. pclk will be enabled whenever the driver is bound to a device -
from probe() to remove() time.
2. pclk will also be enabled when reading the primecell IDs from the device.

In order to allow drivers to be incrementally updated to achieve greater
power savings, we provide two additional calls to allow drivers to
manage the pclk - amba_pclk_enable()/amba_pclk_disable().

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
/drivers/amba/bus.c
cf7a2b4fb6a9b86779930a0a123b0df41aa9208f 12-Sep-2009 Russell King <rmk@dyn-67.arm.linux.org.uk> Merge branches 'arm', 'at91', 'bcmring', 'ep93xx', 'mach-types', 'misc' and 'w90x900' into devel
8afe0b96b36bb967a00658003736ffa97967ee80 29-Jul-2009 Leo Chen <leochen@broadcom.com> ARM: 5625/1: fix hard coded 4K resource size in amba bus detection

This patch modifies the amba bus detection logic in the kernel
to detect the AMBA devices using the calculated resource
size information rather than the hard coded 4K size.

It also calculates the resource size when request mem region
and release mem region.

Signed-off-by: Leo Chen <leochen@broadcom.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
/drivers/amba/bus.c
557dca5f48a45df88a73e69ee0700cfd4e2358c9 05-Jul-2009 Russell King <rmk@dyn-67.arm.linux.org.uk> [ARM] amba: fix amba device resources

AMBA device resources were being reported as:

10004000-10004fff : <BAD>

This is because dev_name() was returning NULL prior to device_register.
Ensure that the struct device is properly initialized, and the name is
set before adding it to the device tree.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
/drivers/amba/bus.c
9d6b4c82bffbe6de624ff86cb279166867f46365 25-Mar-2009 Kay Sievers <kay.sievers@vrfy.org> amba: struct device - replace bus_id with dev_name(), dev_set_name()

Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
/drivers/amba/bus.c
934848daa34af53de16cd8125d04346dffee9e87 08-Jan-2009 Russell King <rmk@dyn-67.arm.linux.org.uk> [ARM] Fix realview build

arch/arm/mach-realview/platsmp.c:140: error: 'jiffies' undeclared (first use in this function)
drivers/amba/bus.c:246: error: 'NO_IRQ' undeclared (first use in this function)

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
/drivers/amba/bus.c
7eff2e7a8b65c25920207324e56611150eb1cd9a 14-Aug-2007 Kay Sievers <kay.sievers@vrfy.org> Driver core: change add_uevent_var to use a struct

This changes the uevent buffer functions to use a struct instead of a
long list of parameters. It does no longer require the caller to do the
proper buffer termination and size accounting, which is currently wrong
in some places. It fixes a known bug where parts of the uevent
environment are overwritten because of wrong index calculations.

Many thanks to Mathieu Desnoyers for finding bugs and improving the
error handling.

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Cc: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/amba/bus.c
bf62456eb91f3d2ef0736081583d09b0b3c8b7ea 31-Mar-2007 Eric Rannaud <eric.rannaud@gmail.com> uevent: use add_uevent_var() instead of open coding it

Make use of add_uevent_var() instead of (often incorrectly) open coding it.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Eric Rannaud <eric.rannaud@gmail.com>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Cc: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/amba/bus.c
96b13f5c074fab56797109aedacc2405544d6f95 30-Nov-2006 Russell King <rmk@dyn-67.arm.linux.org.uk> [ARM] Fix __must_check warnings in drivers/bus/amba.c

Fix driver model __must_check warnings in drivers/bus/amba.c by
rearranging how we add attributes to devices.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
/drivers/amba/bus.c
e29419fffceb8ec36def3c922040e1ca7bcd3de5 13-Jun-2006 Greg Kroah-Hartman <gregkh@suse.de> [PATCH] 64bit resource: fix up printks for resources in misc drivers

This is needed if we wish to change the size of the resource structures.

Based on an original patch from Vivek Goyal <vgoyal@in.ibm.com>

Cc: Vivek Goyal <vgoyal@in.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/amba/bus.c
e9368f8288338c25d8a339c91b15e17ebf33752d 09-Jan-2006 Russell King <rmk@dyn-67.arm.linux.org.uk> [ARM] Remove asm/irq.h includes from ARM drivers

Many ARM drivers do not need to include asm/irq.h - remove this
unnecessary include from some ARM drivers.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
/drivers/amba/bus.c
de1d815fccee1f4766a7e56054ab0ec3f6f3a7db 07-Jan-2006 Russell King <rmk@dyn-67.arm.linux.org.uk> [ARM] Move AMBA bus code to drivers/amba/

Make the AMBA bus code visible to other architectures.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
/drivers/amba/bus.c