History log of /include/linux/amba/bus.h
Revision Date Author Comments
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>
9e5ed094c89e55fbf11d2e81d60be98eb12346c0 15-Mar-2012 viresh kumar <viresh.kumar@st.com> ARM: 7362/1: AMBA: Add module_amba_driver() helper macro for amba_driver

For simple modules that contain a single amba_driver without any
additional setup code then ends up being a block of duplicated
boilerplate. This patch adds a new macro, module_amba_driver(),
which replaces the module_init()/module_exit() registrations with
template functions.

Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
cc6e75af8df7aa40019ff58357170c8dd960281f 18-Dec-2011 Russell King <rmk+kernel@arm.linux.org.uk> ARM: amba: provide common initializers for static amba devices

Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
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>
1e5f9a23430e64fb56d9d5d8e1ca165ba1cfeb75 05-Oct-2011 Dave Martin <dave.martin@linaro.org> ARM: amba: Move definition of struct amba_id to mod_devicetable.h

The general kernel infrastructure for adding module alises during
module post processing expects the affected device type
identification structures in a common header
<linux/mod_devicetable.h>.

This patch simple moves struct amba_id to the common header, and
adds the appropriate include in <linux/amba/bus.h>.

Signed-off-by: Dave Martin <dave.martin@linaro.org>
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>
2d00880fa842e7dd34f5bb5eb3b5f8337b068be5 19-Feb-2011 Russell King <rmk+kernel@arm.linux.org.uk> ARM: amba: make amba_driver id_table const

Now that the bus level code deals with a const id table, we can also
make the ID table in the amba_driver structure also const.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
aa25afad2ca60d19457849ea75e9c31236f4e174 19-Feb-2011 Russell King <rmk+kernel@arm.linux.org.uk> ARM: amba: make probe() functions take const id tables

Make Primecell driver probe functions take a const pointer to their
ID tables. Drivers should never modify their ID tables in their
probe handler.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
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>
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>
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>
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>
c36207a4624f15020f2918324405c1c88a5d4cbc 29-Mar-2010 viresh kumar <viresh.kumar@st.com> ARM: 5999/1: Including device.h and resource.h header files in linux/amba/bus.h

linux/amba/bus.h have dependencies on linux/device.h and linux/resource.h, but
it doesn't include them. We get compilation errors in our files which include
bus.h but doesn't include device.h and resource.h. This patch includes device.h
and resource.h in linux/amba/bus.h file.

Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
Acked-by: Linux Walleij <linux.ml.walleij@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
4e10ae11317b238609fc3ec9d50a5dee9473e045 20-Feb-2010 Linus Walleij <linus.walleij@stericsson.com> ARM: 5951/1: ARM: fix documentation of the PrimeCell bus

This fixes the filepath encoded in <linux/amba/bus.h> and adds
some documentation as to what this bus really means.

Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
f17a1f06d2fa93f4825be572622eb02c4894db4e 04-Aug-2009 Linus Walleij <linus.walleij@stericsson.com> ARM: 5636/1: Move vendor enum to AMBA include

This moves the primecell vendor enum definition inside vic.c
out to linux/amba/bus.h where it belongs and replace any
occurances of specific vendor ID:s with the respective enums
instead.

Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
03fbdb15c14e9746c63168e3ff2c64b9c8336d33 20-May-2009 Alessandro Rubini <rubini@gnudd.com> [ARM] 5519/1: amba probe: pass "struct amba_id *" instead of void *

The second argument of the probe method points to the amba_id
structure, so it's better passed with the correct type. None of the
current in-tree drivers uses the pointer, so they have only been
checked for a clean compile.

Change suggested by Russell King.

Signed-off-by: Alessandro Rubini <rubini@unipv.it>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
a62c80e559809e6c7851ec04d30575e85ad6f6ed 07-Jan-2006 Russell King <rmk@dyn-67.arm.linux.org.uk> [ARM] Move AMBA include files to include/linux/amba/

Since the ARM AMBA bus is used on MIPS as well as ARM, we need
to make the bus available for other architectures to use. Move
the AMBA include files from include/asm-arm/hardware/ to
include/linux/amba/

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>