aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/mailbox.c
Commit message (Collapse)AuthorAgeFilesLines
* omap: mailbox: relax constraint to allow powerdomain to go to CSWRMiguel Vadillo2014-10-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | The mailbox registers can be accessed and configured by other remote processor initiators, and hence the driver has to be responsible for maintaining the register context when they are active. This is achieved by the mailbox driver by requesting a latency constraint on the power domain that it belongs to. The current constraint value (10) is high and restricts the power domain to remain in ON state as long as a remote processor is active. This value is relaxed to 400 to allow a lower power CSWR state that can still retain the context during cpuidle path and a remote processor is active. The constraint is completely removed when the remote processor is suspended. The mailbox context is saved and restored properly when suspending the remote processor. Change-Id: I152b57e982dc8e5739808cbbbe8bd5cc96223ffa Signed-off-by: Miguel Vadillo <vadillo@ti.com> Signed-off-by: Suman Anna <s-anna@ti.com>
* omap: mailbox: add pm constraint field to mbox structureSubramaniam C.A2014-10-011-6/+10
| | | | | | | | | | By adding this field, the pm qos apis can be selectively applied only if the pm constraint is set to a +ve value. Change-Id: I3b6930e85f65f7354826813798dec76b25149370 Signed-off-by: Subramaniam C.A <subramaniam.ca@ti.com> Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com> Signed-off-by: Suman Anna <s-anna@ti.com>
* omap: mailbox: enable mailbox irq per instanceJuan Gutierrez2014-10-011-2/+0
| | | | | | | | | | | | | | | The machine-specific omap2_mbox_startup is called only once to initialize the whole mbox module. Enabling mbox irq at startup is only enabling the irq of the very first mailbox instance created. The enable_irq function should be called every time a new mbox instance is created, in the generic platform mailbox layer. Change-Id: I1b7148fd0342a335e3b45cfe349c43a8491ae5c1 Signed-off-by: Juan Gutierrez <jgutierrez@ti.com> Signed-off-by: Suman Anna <s-anna@ti.com>
* omap: mailbox: check iomem resource before dereferencing itFernando Guzman Lugo2011-11-031-0/+3
| | | | | | | Add a NULL check for iomem resource in mailbox probe functions Change-Id: Ib277fbe5a69a0070416b9b8c6d0f7094da0a8bda Signed-off-by: Fernando Guzman Lugo <fernando.lugo@ti.com>
* omap: mailbox: wait for reset completionSuman Anna2011-10-191-0/+7
| | | | | | | | | mailbox is being reset during every startup, so wait for the reset completion confirmation before proceeding with the context restore or interrupt programming. Change-Id: I47a5a240f1180100232278f2a6be6125605170d2 Signed-off-by: Suman Anna <s-anna@ti.com>
* omap: mailbox: reset mailbox every startup.Fernando Guzman Lugo2011-10-181-0/+4
| | | | | | | That way old messages does not affect to the new user. Change-Id: If0640570924818f3b7a9fe321abdc6086a20aa54 Signed-off-by: Fernando Guzman Lugo <fernando.lugo@ti.com>
* omap: mbox: save, restore and off supportMiguel Vadillo2011-09-141-53/+77
| | | | | | | | | | | | | | | | | - Fix an issue related with the offsets of the registers - Each user (Ducati, Tesla ...) should not have its own ctx memory since the mbox module is one for all of them. A share ctx is created to store the needed registers when saving. - save_context function is saving just the irqs per user currently that is the only thing needed. - restore_context function is restoring just the irqs per user. mbox_startup function is setting all the rest of the register to the original state. - Add a pm_qos constraint when calling the first get and release it when the last put is calling, this is to support off mode. Change-Id: I90cd5a8baa2c6343b6f3701a6accf14d5fcc3cf9 Signed-off-by: Miguel Vadillo <vadillo@ti.com>
* Merge branch 'for_2.6.39/pm-misc' of ↵Tony Lindgren2011-03-101-4/+6
|\ | | | | | | ssh://master.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap-pm into omap-for-linus
| * omap: mailbox: resolve hang issueHari Kanigeri2011-03-031-4/+6
| | | | | | | | | | | | | | | | | | | | | | omap4 interrupt disable bits is different. On rx kfifo full, the mbox rx interrupts wasn't getting disabled, and this is causing the rcm stress tests to hang. Signed-off-by: Hari Kanigeri <h-kanigeri2@ti.com> Signed-off-by: Armando Uribe <x0095078@ti.com> Signed-off-by: Fernando Guzman Lugo <fernando.lugo@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
| |
| \
*-. \ Merge branches 'devel-iommu-mailbox', 'devel-mcbsp', 'devel-board' and ↵Tony Lindgren2011-03-021-64/+8
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | 'devel-hsmmc' into omap-for-linus Conflicts: arch/arm/mach-omap2/omap_hwmod_44xx_data.c
| * | | OMAP: mailbox: use runtime pm for clk and sysc handlingOmar Ramirez Luna2011-02-241-60/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use runtime pm APIs to enable/disable mailbox clocks and to configure SYSC register. Based on the patch sent by Felipe Contreras: https://patchwork.kernel.org/patch/101662/ Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
| * | | OMAP: mailbox: build device using omap_device/omap_hwmodFelipe Contreras2011-02-241-4/+3
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove static platform_device and resource data within omap mailbox driver; use the one defined in the hwmod database along with omap_device framework for device build and registration. Add device latency functions to be used, so clock can be enabled and sysconfig is configured. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
* | | Merge branch 'devel-cleanup' into omap-for-linusTony Lindgren2011-03-021-1/+1
|\ \ \ | |/ / |/| / | |/ | | Conflicts: arch/arm/mach-omap2/timer-gp.c
| * OMAP2420: mailbox: fix IVA vs DSP IRQ numberingKevin Hilman2011-02-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | The IRQ numbering for the IVA and DSP mailboxes was switched due to the wrong ordering in the OMAP2 mbox list. Switch the ordering so DSP is first and matches all the other SoCs. Tested on OMAP2420/n810. Signed-off-by: Kevin Hilman <khilman@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
* | omap: Start using CONFIG_SOC_OMAPTony Lindgren2011-01-271-1/+1
|/ | | | | | | | | | | | | | | | | We want to have just CONFIG_ARCH_OMAP2, 3 and 4. The rest are nowadays just subcategories of these. Search and replace the following: ARCH_OMAP2420 SOC_OMAP2420 ARCH_OMAP2430 SOC_OMAP2430 ARCH_OMAP3430 SOC_OMAP3430 No functional changes. Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Thomas Weber <weber@corscience.de> Acked-by: Sourav Poddar <sourav.poddar@ti.com>
* OMAP: mailbox: fix detection for previously supported chipsOmar Ramirez Luna2010-12-021-6/+10
| | | | | | | | | | | Fix the mailbox detection for OMAP3630 and 2430, also minor cleanup on conditional ifdef's that could affect it. Given that 2430 has an iva too, include it, as the same steps for omap3 apply. Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com> Acked-by: Hiroshi Doyu <hiroshi.doyu@nokia.com>
* OMAP: mailbox: remove unreachable returnOmar Ramirez Luna2010-12-021-2/+1
| | | | | | | | Remove unreachable return statement. Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com> Acked-by: Benoit Cousson <b-cousson@ti.com> Acked-by: Hiroshi Doyu <hiroshi.doyu@nokia.com>
* arm: remove cast from void*matt mooney2010-09-281-4/+4
| | | | | | | | Unnecessary cast from void* in assignment. Signed-off-by: matt mooney <mfm@muteddisk.com> Acked-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
* omap: mailbox: reorganize headersFelipe Contreras2010-08-041-1/+0
| | | | | | | | | | Remove kernel.h and module.h since they are not used correctly anyway. Also, remove device.h since it comes along with platform_device.h (always will I guess). Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
* omap: mailbox: standarize on 'omap-mailbox'Felipe Contreras2010-08-041-4/+2
| | | | | | | omap{1,2}-mailbox are modules that provide the 'omap-mailbox' driver. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
* omap: mailbox: only compile for configured archsFelipe Contreras2010-08-041-2/+13
| | | | | Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
* omap: mailbox: simplify omap_mbox_register()Felipe Contreras2010-08-041-16/+6
| | | | | | | No need to dynamically register mailboxes one by one. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
* omap: mailbox: reorganize registeringFelipe Contreras2010-08-041-63/+44
| | | | | | | It's more extensible this way. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
* omap: mailbox: don't export unecessary symbolsFelipe Contreras2010-08-041-3/+0
| | | | | Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
* omap: mailbox: 2420 should be detected at run-timeFelipe Contreras2010-08-041-1/+2
| | | | | Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
* omap: mailbox: reorganize structuresFelipe Contreras2010-08-041-33/+35
| | | | | | | OMAP4 ones messed up the organization. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
* omap: mailbox: trivial cleanupsFelipe Contreras2010-08-041-4/+6
| | | | | | | And fix a few compilation warnings. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
* omap: mailbox cleanup: split MODULE_AUTHOR lineOhad Ben-Cohen2010-08-041-1/+2
| | | | | | | use multiple MODULE_AUTHOR lines for multiple authors Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com> Signed-off-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
* omap2/3/4: mailbox: remove compiler warningSuman Anna2010-03-111-6/+6
| | | | | | | | Remove a compiler warning in device-specific mailbox module. Signed-off-by: Suman Anna <s-anna@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
* omap: mailbox: correct OMAP4 SIDLEMODE logicSuman Anna2010-02-231-1/+6
| | | | | | | | | | OMAP4 mailbox has a different MAILBOX_SYSCONFIG register. There is now no AutoIdle. The SIDLEMODE bits have been right-shifted by 1 bit and now occupy bits 2 & 3. Signed-off-by: Suman Anna <s-anna@ti.com> Acked-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
* omap: mailbox: correct OMAP4 reset logicSuman Anna2010-02-231-11/+27
| | | | | | | | | | | | | OMAP4 mailbox has a different register set. There is no MAILBOX_SYSSTATUS register. The reset is indicated with the SOFTRESET bit of the MAILBOX_SYSCONFIG register itself. This bit should read 0 for a successful Reset. Also, the SOFTRESET bit occupies bit0 and not bit1 as with previous generations. Signed-off-by: Suman Anna <s-anna@ti.com> Acked-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
* omap2/3/4: mailbox: kill compile warning in mailbox.cFelipe Balbi2010-02-151-1/+1
| | | | | | | Change %d to %ld to avoid the compile warning. Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
* omap: mailbox: Adds code changes to support OMAP4 mailboxC A Subramaniam2009-11-221-24/+116
| | | | | | | | | | | This patch adds code changes in the mailbox driver module to add support for OMAP4 mailbox. Signed-off-by: Hari Kanigeri <h-kanigeri2@ti.com> Signed-off-by: C A Subramaniam <subramaniam.ca@ti.com> Signed-off-by: Ramesh Gupta G <grgupta@ti.com> Signed-off-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
* Merge 7xx-iosplit-plat-merge with omap-fixesTony Lindgren2009-11-221-1/+1
|\ | | | | | | Merge branch '7xx-iosplit-plat-merge' into omap-for-linus
| * omap: headers: Move remaining headers from include/mach to include/platTony Lindgren2009-10-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the remaining headers under plat-omap/include/mach to plat-omap/include/plat. Also search and replace the files using these headers to include using the right path. This was done with: #!/bin/bash mach_dir_old="arch/arm/plat-omap/include/mach" plat_dir_new="arch/arm/plat-omap/include/plat" headers=$(cd $mach_dir_old && ls *.h) omap_dirs="arch/arm/*omap*/ \ drivers/video/omap \ sound/soc/omap" other_files="drivers/leds/leds-ams-delta.c \ drivers/mfd/menelaus.c \ drivers/mfd/twl4030-core.c \ drivers/mtd/nand/ams-delta.c" for header in $headers; do old="#include <mach\/$header" new="#include <plat\/$header" for dir in $omap_dirs; do find $dir -type f -name \*.[chS] | \ xargs sed -i "s/$old/$new/" done find drivers/ -type f -name \*omap*.[chS] | \ xargs sed -i "s/$old/$new/" for file in $other_files; do sed -i "s/$old/$new/" $file done done for header in $(ls $mach_dir_old/*.h); do git mv $header $plat_dir_new/ done Signed-off-by: Tony Lindgren <tony@atomide.com>
* | omap: Use resource_sizeTobias Klauser2009-11-101-1/+1
|/ | | | | | | | | Use the resource_size function instead of manually calculating the resource size. This reduces the chance of introducing off-by-one errors and actually fixes one in mailbox.c. Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Signed-off-by: Tony Lindgren <tony@atomide.com>
* omap: Fix wrong condition check in while loop for mailbox and iommu2Hiroshi DOYU2009-09-281-1/+1
| | | | | | | | | It's worked fine so far since reset is done for the first time. Reported-by: Juha Leppanen <juha_motorsportcom@luukku.com> Signed-off-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com> Signed-off-by: Juha Leppanen <juha_motorsportcom@luukku.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
* omap: mailbox: Flush posted write when acking mailbox irqHiroshi DOYU2009-09-241-0/+3
| | | | | | | | | | | | | | | | The only way to flush posted write to L4 bus is to do a read back of the same register right after the write. This seems to be mostly needed in interrupt handlers to avoid causing spurious interrupts. The earlier fix has been to mark the L4 bus as strongly ordered memory, which solves the problem, but causes performance penalties. Similar to the fix, 03803a71041e3bc3c077f4e7b92f6ceaa9426df3 Signed-off-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
* omap: mailbox: Execute softreset at startupHiroshi DOYU2009-09-241-5/+25
| | | | | | | | The softreset at startup is introduced as TRM describes and also some register bit definitions are added instead of magic number. Signed-off-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
* OMAP2/3: omap mailbox: platform_get_irq() error ignoredRoel Kluin2009-06-231-3/+3
| | | | | | | | | platform_get_irq may return -ENXIO. but struct omap_mbox mbox_dsp_info.irq is unsigned, so the error was not noticed. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
* omap mailbox: add save_/restore_ctx() for PMHiroshi DOYU2009-03-231-0/+32
| | | | | | | To preserve the registers during off-mode Signed-off-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
* omap mailbox: fix empty struct device for omap2Hiroshi DOYU2009-03-231-6/+7
| | | | | Signed-off-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
* omap mailbox: print hardware revision at startupHiroshi DOYU2009-03-231-0/+3
| | | | | Signed-off-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
* omap mailbox: add initial omap3 supportHiroshi DOYU2009-03-231-28/+42
| | | | | Signed-off-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
* omap mailbox: cleanup omap2 register definition with macroHiroshi DOYU2009-03-231-48/+29
| | | | | Signed-off-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
* [ARM] Convert asm/io.h to linux/io.hRussell King2008-09-061-1/+1
| | | | Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] Move include/asm-arm/arch-* to arch/arm/*/include/machRussell King2008-08-071-2/+2
| | | | | | This just leaves include/asm-arm/plat-* to deal with. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* ARM: OMAP: Fix Unbalanced enable for IRQ in omap mailboxHiroshi DOYU2008-05-091-10/+15
| | | | | Signed-off-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
* ARM: OMAP: Add mailbox support for IVAHiroshi DOYU2007-05-091-0/+318
This patch adds a generic mailbox interface for for DSP and IVA (Image Video Accelerator). This patch itself doesn't contain any IVA driver. Signed-off-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com> Signed-off-by: Juha Yrjola <juha.yrjola@solidboot.com> Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>