summaryrefslogtreecommitdiffstats
path: root/include/linux/amba/bus.h
Commit message (Collapse)AuthorAgeFilesLines
* ARM: 7369/1: amba: add functions to add devices dynamicallyLinus Walleij2012-04-191-0/+8
| | | | | | | | | | | | Add two functions to add APB and AHB devices to the amba (PrimeCell) bus dynamically. This is modeled after the static definition macros recently introduced into <linux/amba/bus.h> and can help us in factoring out a bunch of code across the kernel. Since a lot of call sites seem to be using a returned struct amba device* pointer, let's use that. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* ARM: 7366/3: amba: Remove AMBA level regulator supportMark Brown2012-04-131-7/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* ARM: 7362/1: AMBA: Add module_amba_driver() helper macro for amba_driverviresh kumar2012-03-171-0/+9
| | | | | | | | | | | 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>
* ARM: amba: provide common initializers for static amba devicesRussell King2012-01-251-0/+33
| | | | | Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* ARM: amba: add amba_device allocation/add/put functionsRussell King2012-01-251-0/+3
| | | | | | | | 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>
* ARM: amba: Move definition of struct amba_id to mod_devicetable.hDave Martin2011-11-221-6/+1Star
| | | | | | | | | | | | 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>
* ARM: 6758/1: amba: support pm opsRabin Vincent2011-02-231-0/+2
| | | | | | | | | | | 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>
* ARM: amba: make amba_driver id_table constRussell King2011-02-231-1/+1
| | | | | | | 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>
* ARM: amba: make probe() functions take const id tablesRussell King2011-02-231-1/+1
| | | | | | | | 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>
* ARM: 6662/1: amba: make amba_bustype non-staticRob Herring2011-02-231-0/+2
| | | | | | | | 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>
* ARM: 6467/1: amba: optional PrimeCell core voltage switchLinus Walleij2010-11-261-0/+8
| | | | | | | | | | | | | | | | | | | | | 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>
* ARM: 6368/1: move the PrimeCell IDs to use macrosLinus Walleij2010-10-081-4/+11
| | | | | | | | | | 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>
* ARM: AMBA: Add pclk support to AMBA bus infrastructureRussell King2010-07-311-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* ARM: 5999/1: Including device.h and resource.h header files in linux/amba/bus.hviresh kumar2010-03-291-0/+3
| | | | | | | | | | | 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>
* ARM: 5951/1: ARM: fix documentation of the PrimeCell busLinus Walleij2010-02-201-1/+5
| | | | | | | | 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>
* ARM: 5636/1: Move vendor enum to AMBA includeLinus Walleij2009-09-121-0/+5
| | | | | | | | | | 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>
* [ARM] 5519/1: amba probe: pass "struct amba_id *" instead of void *Alessandro Rubini2009-05-211-1/+1
| | | | | | | | | | | | 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>
* [ARM] Move AMBA include files to include/linux/amba/Russell King2006-01-071-0/+55
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>