aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAge
...
| * | | | IOMMU remove clock functions from iommu moduleRamesh Gupta Guntha2012-08-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch removes the clk_enable/disable functions for iommu functions, module auto idle should take care of this. Signed-off-by: Ramesh Gupta G<grgupta@ti.com>
| * | | | omap: iommu- twl and tlb fixesHari Kanigeri2012-08-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | omap: iommu-update irq mask to be specific about twl and tlb Revise the IRQ mask definitions to handle the MMU faults related to TWL fault as well as TLB miss fault. Signed-off-by: Hari Kanigeri <h-kanigeri2@ti.com> Signed-off-by: Hiroshi Doyu <Hiroshi.DOYU@nokia.com> omap: iommu-add functionality to get TLB miss interrupt In order to enable TLB miss interrupt, the TWL should be disabled. This patch provides the functionality to get the MMU fault interrupt for a TLB miss in the cases where the users are working with the locked TLB entries and with TWL disabled. New interface is added to select twl and to enable TLB miss interrupt. Signed-off-by: Hari Kanigeri <h-kanigeri2@ti.com> Signed-off-by: Ramesh Gupta <grgupta@ti.com> Signed-off-by: Hiroshi Doyu <Hiroshi.DOYU@nokia.com>
| * | | | syslink: ipu_pm: fix wdt and add resource cleanupMiguel Vadillo2012-08-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | wdt notification event was not being sent to the deh because if there are resources in use by IPU the assumption was that it is in a good state (not hanging) and the timer was being reloaded without catching the issue. This fix is avoiding that scenario adding an event PM_ALIVE, sent by ipu, that indicates there are resources in use but ipu wont hibernate, and the timer needs to be reloaded in kernel for hib_time seconds again. Also resources clean up is now done when the wd issue is catched. Change-Id: I34304763ce50ac51595a9a6b7c9305d95174f8f8 Signed-off-by: Miguel Vadillo <vadillo@ti.com> Signed-off-by: Juan Gutierrez <jgutierrez@ti.com>
| * | | | syslink:ipu_pm: Modifications for timer setup for WDTShahid Akhtar2012-08-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Modified to configure timer 3 that is used to trigger hibernation and it is also used as watch dog timer. Since both ducati cores can go to retention together and if one core is not responding both need to be reset, we only use 1 timer [Hari K] The free irq while freeing checks the dev_id as the token with the dev_id that it was registered earlier. To avoid the race condition as when the remote proc frees the dmtimer handle save the handle in ipu_pm to use it as a token when passing to free_irq A cleaner solution should be investigated for watchdog timer Change-Id: I15d3c0182d84861819cc36abf1f78cbc1674375f Signed-off-by: Shahid Akhtar <sakhtar@ti.com>
| * | | | SYSLINK:add build files to SyslinkHari Kanigeri2012-08-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds build related files Signed-off-by: Hari Kanigeri <h-kanigeri2@ti.com> Signed-off-by: Suman Anna <s-anna@ti.com> Signed-off-by: Ramesh Gupta G <grgupta@ti.com>
| * | | | omap: remoteproc: use gptimer 4 and 9 as ipu clkMiguel Vadillo2012-08-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enable gptimer 4 and 9 to be used as ipu clk. Gptimers will be requested when calling rproc_start() and released them when calling rproc_stop(), also when hibernating ipu the gptimers will be stop/start to ensure proper pm functionality. The gptimer numbers are configurable, currently 4 will be used by ipu_c0 and 9 by ipu_c1. Change-Id: I9424991e34e786ab2f57a1dc625ae801290fd7b6 Reported-by: Paul Hunt <hunt@ti.com> Signed-off-by: Miguel Vadillo <vadillo@ti.com>
| * | | | OMAP: rproc44xx: free dmtimer in proc stop caseHari Kanigeri2012-08-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current code is freeing dmtimer in proc stop only if the proc state is in RUNNING. But the proc stop could be called when the proc state is HIBERNATION. The fix is to free dmtimer without any check Change-Id: Ib9efbb38b8973f688013f3a8f4a94cae1469e390 Signed-off-by: Hari Kanigeri <h-kanigeri2@ti.com>
| * | | | KW: remoteproc: Move debug statement so rproc will be valid when dereferencedAxel Haslam2012-08-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Moved the debug print statement in omap_rproc_ioctl so that rproc will be valid when derefenced in the log statement Change-Id: Ib13c98b953d5254d5227a08631cea99a88c29cb1 Signed-off-by: Axel Haslam <axelhaslam@ti.com>
| * | | | omap: mach-omap2: adapt remoteproc to dmtimer context save / restorePaul Hunt2012-08-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The dmtimer module now supports the saving and restoration of timer registers which would otherwise be lost when going to OSWR or OFF. This patch adapts remoteproc to use omap_dm_timer_stop( ) and omap_dm_timer_start( ) which handle the save and restore respectively, instead of omap_dm_timer_disable( ) and omap_dm_timer_enable( ). Change-Id: Id13a3365a4ca8dca55178fbba90b11c480a6e2a4 Signed-off-by: Paul Hunt <hunt@ti.com>
| * | | | omap:remoteproc-Initial support for remote procHari Kanigeri2012-08-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch provides the inital series of commits for remote proc on omap omap:remoteproc-add remoteproc support Add remote proc support Signed-off-by: Hari Kanigeri <h-kanigeri2@ti.com> Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com> Singed-off-by: Angela Stegmaier <angelabaker@ti.com> omap:remoteproc-provide multi-omap support This patch resolves the build issues when trying to build with multi-omap configuration. Signed-off-by: Hari Kanigeri <h-kanigeri2@ti.com> omap:remoteproc-add mechanism to enable bios timer BIOS requires the GPTimer for handling the OS activities. This is to configuer the GPTimers that are required for the remote processors. Signed-off-by: Hari Kanigeri <h-kanigeri2@ti.com> Signed-off-by: Fernando Guzman Lugo <x0095840@ti.com> syslink: rproc - add support for START and STOP events Now apps can wait for remote proc START and STOP events Signed-off-by: Fernando Guzman Lugo <x0095840@ti.com> rproc: fix missing common proc args to match userspace Add the common proc args structure to store the status of the api in order to match userspace side. Signed-off-by: Fernando Guzman Lugo <x0095840@ti.com> rproc: add protection to rproc_eventdf_ntfy The list of fd handles most be protected while traversing Signed-off-by: Fernando Guzman Lugo <x0095840@ti.com> omap:remoteproc: disable gpt3&4 as bios timer source Each core sys/app were requesting gpt3/4, respectively, as bios timer source clock. This patch is disabling the use of those timers as bios timer source since now the internal M3 timers are set for this purpose. Anyway the mechanism to set any timer as bios timer source was kept. If a gptimer is set as bios timer source changes in Ducati side are needed. Signed-off-by: Miguel Vadillo <vadillo@ti.com> omap:remoteproc: enable gpt3&4 for ipu hibernation gptimer 3/4 are set to be use at the hibernation timers for IPU, both clocks are enabled and configured in rproc_start and disable in rproc_stop. When mpu is hibernating IPU the iommu and mbox context will be saved and then rproc_sleep will be called to disable each core and also the associated gptimer needed to allowed retention. Whenever a message is sent to IPU the ipu_pm_restore will check and wake up ipu, if needed, restoring the iommu and mbox context and calling rproc_wake that will enable ipu and the associated gptimer again. When disable, the hibernating process will only happen if the system suspend/resume path is sent, IPU self hibernation wont be executed. Also gpt3/4 won't be requested at all. Signed-off-by: Miguel Vadillo <vadillo@ti.com> Signed-off-by: Juan Gutierrez <jgutierrez@ti.com> Signed-off-by: Paul Hunt <hunt@ti.com> omap: remoteproc - fix sparse warnings in remote proc about static This patch fixes these warnings: arch/arm/plat-omap/remoteproc.c:45:6: warning: symbol 'rproc_eventfd_ntfy' was not declared. Should it be static? arch/arm/plat-omap/remoteproc.c:180:5: warning: symbol 'rproc_reg_user_event' was not declared. Should it be static? arch/arm/plat-omap/remoteproc.c:227:5: warning: symbol 'rproc_unreg_user_event' was not declared. Should it be static? Change-Id: Ie822bbf97dc9dbf4b76bff8e115b3e9063037710 Signed-off-by: Fernando Guzman Lugo <x0095840@ti.com> omap: remoteproc: CONFIG flag for self hibernation A new CONFIG flag is introduce to control IPU self hibernation the name of the new flag is CONFIG_SYSLINK_IPU_SELF_HIBERNATION when disable the timers used by IPU to hibernate and the flag in sh mem to allow hibernation of IPU are not set and IPU will hibernate only when sending the system suspend. On the other hand if the flag is set after N seconds of inactivity and if there is no resource requested by IPU (using ipu_pm) IPU will hibernate. Change-Id: I3f14257930a861c8784d7159a821228111b3ba37 Signed-off-by: Miguel Vadillo <vadillo@ti.com>
| * | | | omap3: hwmod: disable hwspinlocksG, Manjunath Kondaiah2012-08-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The hwspinlock hwmod is implemented only for omap4 and not supported for omap3 and omap2. This patch enable hwspinlocks only for omap4. Boot warning on omap3: [ 0.000000] ------------[ cut here ]------------ [ 0.000000] WARNING: at arch/arm/mach-omap2/hwspinlocks.c:61 hwspinlocks_init+0x24/0xbc() [ 0.000000] Modules linked in: [ 0.000000] [<c00470ec>] (unwind_backtrace+0x0/0xe4) from [<c0078978>] (warn_slowpath_common+0x4c/0x64) [ 0.000000] [<c0078978>] (warn_slowpath_common+0x4c/0x64) from [<c00789a8>] (warn_slowpath_null+0x18/0x1c) [ 0.000000] [<c00789a8>] (warn_slowpath_null+0x18/0x1c) from [<c0017040>] (hwspinlocks_init+0x24/0xbc) [ 0.000000] [<c0017040>] (hwspinlocks_init+0x24/0xbc) from [<c0041340>] (do_one_initcall+0x58/0x1b4) [ 0.000000] [<c0041340>] (do_one_initcall+0x58/0x1b4) from [<c0008574>] (kernel_init+0x98/0x150) [ 0.000000] [<c0008574>] (kernel_init+0x98/0x150) from [<c0042970>] (kernel_thread_exit+0x0/0x8) [ 0.000000] ---[ end trace 1b75b31a2719ed1c ]-- Signed-off-by: G, Manjunath Kondaiah <manjugk@ti.com>
| * | | | omap:hwspinlocks-ensure the order of registrationHari Kanigeri2012-08-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ensure that the hwspinlock driver is registered prior to I2C driver registration since I2C is dependent on hwspinlock. Signed-off-by: Hari Kanigeri <h-kanigeri2@ti.com>
| * | | | omap:hwspinlocks add pm_runtime_enableBalaji T K2012-08-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add pm_runtime_enable to hwspinlock_probe change pm_runtime_get to pm_runtime_get_sync Signed-off-by: Balaji T K <balajitk@ti.com>
| * | | | omap:hwspinlock-added hwspinlock driverSimon Que2012-08-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Created driver for OMAP hardware spinlock. This driver supports: - Reserved spinlocks for internal use - Dynamic allocation of unreserved locks - Lock, unlock, and trylock functions, with or without disabling irqs/preempt - Registered as a platform device driver The device initialization uses hwmod to configure the devices. One device will be created for each IP. It will pass spinlock register offset info to the driver. The device initialization file is: arch/arm/mach-omap2/hwspinlocks.c The driver takes in register offset info passed in device initialization. It uses hwmod to obtain the base address of the hardware spinlock module. Then it reads info from the registers. The function hwspinlock_probe() initializes the array of spinlock structures, each containing a spinlock register address calculated from the base address and lock offsets. The device driver file is: arch/arm/plat-omap/hwspinlock.c Here's an API summary: int hwspinlock_lock(struct hwspinlock *); Attempt to lock a hardware spinlock. If it is busy, the function will keep trying until it succeeds. This is a blocking function. int hwspinlock_trylock(struct hwspinlock *); Attempt to lock a hardware spinlock. If it is busy, the function will return BUSY. If it succeeds in locking, the function will return ACQUIRED. This is a non-blocking function. int hwspinlock_unlock(struct hwspinlock *); Unlock a hardware spinlock. struct hwspinlock *hwspinlock_request(void); Provides for "dynamic allocation" of a hardware spinlock. It returns the handle to the next available (unallocated) spinlock. If no more locks are available, it returns NULL. struct hwspinlock *hwspinlock_request_specific(unsigned int); Provides for "static allocation" of a specific hardware spinlock. This allows the system to use a specific spinlock, identified by an ID. If the ID is invalid or if the desired lock is already allocated, this will return NULL. Otherwise it returns a spinlock handle. int hwspinlock_free(struct hwspinlock *); Frees an allocated hardware spinlock (either reserved or unreserved). Signed-off-by: Simon Que <sque@ti.com> Signed-off-by: Hari Kanigeri <h-kanigeri2@ti.com>
| * | | | SYSLINK: ipc - ipc recovery related patchesFernando Guzman Lugo2012-08-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SYSLINK: ipc - move check for in recovery state per ipc submodule With this approach, now each submodule can allow which ioctl can go through when the IPC is in recovery state. It is done by exporting a new function in ipc. Change-Id: I3402f2f83cd3dddbdd6a0d8caf94bf061a5b981c Signed-off-by: Fernando Guzman Lugo <fernando.lugo@ti.com> SYSLINK: ipc - allow some ioctl go through in recovery state This api can go through even in recovery state: messageq_unblock messageq_delete messageq_close messageq_destroy Change-Id: If738b58c21f1d18c3ef1ba019bb598290096d32b Signed-off-by: Fernando Guzman Lugo <fernando.lugo@ti.com> SYSLINK: IPC- provide ipc start and stop notification Enable the notification of IPC start and stop, which devh can use to register/unregister for SYS-ERRORS. This also includes the changes to export ipc_recovery_schedule function. This function should be called by error handlers such as sys error and watchdog error. Change-Id: I436c37b9c4b74d00c771e88c480ea0e96a0268fd Signed-off-by: Hari Kanigeri <h-kanigeri2@ti.com> Signed-off-by: Wajahat Khan <w-khan@ti.com> syslink: ipc: fix compilation warnings Fixing the following compilation warning when including ipc.h and notify_ducatidriver.h in another module: warning: function declaration isn't a prototype Change-Id: Idbb0b5289a3e8406fbe0b86e70d63d55d7e3060f Reported-by: Ricardo Neri <ricardo.neri@ti.com> Signed-off-by: Miguel Vadillo <vadillo@ti.com>
| * | | | omap: mach-omap2: don't wake ipu from hibernation for suspendMiguel Vadillo2012-08-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the IPU subsystem has hibernated, there is no need to wake it up and forward suspend notifications. Also, resume notifications will not be forwarded to the IPU SS if it has hibernated. This is because self-hibernation only occurs when no resources are in use. In this case the SysLink PM context save/restore should be all that is needed. Change-Id: I892e58b569d922038db8fb8604d1432087235f75 Signed-off-by: Miguel Vadillo <vadillo@ti.com> Signed-off-by: Paul Hunt <hunt@ti.com> Signed-off-by: Juan Gutierrez <jgutierrez@ti.com> Signed-off-by: Axel Haslam <axelhaslam@ti.com>
| * | | | SYSLINK:ipu-pm: Refactor ipu-pm module and fix suspend/resumeMiguel Vadillo2012-08-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also has compiler warning fix in AUXCLK request function syslink: ipu_pm: refactor and cleanup functions Including: - ipu_pm module code was a reviewed and reworked to remove redundant code, simplify and enhance the implementation. - Change ipu_notifications to receive proc_id. - Add IOMMU_FAULT notifier callback function. - Function to release all resources when IOMMU_FAULT event is received or when detaching, this is called in a workqueue to avoid calling context problems in the case of the FAULT event and called directly in the case of detaching. - Add the possibility to select the SRC_CLK when requesting a gptimer. - Add pr_debug traces for debugging purpose: Previosly all the errors when requesting/releasing resources were just reported to IPU using notify_event in the payload. Now kernel is printing errors/warnings/ debug messages and also reporting the error back to IPU. This is needed because IPU could be dead and not able to see/print the error ipu_pm is reporting. Change-Id: I22614bafc7cb7e3070d5bf565be6138fca5a809b Signed-off-by: Miguel Vadillo <vadillo@ti.com> syslink: ipu_pm: fix suspend/resume when no IPU image loaded ipu_pm_drv_suspend and _resume were trying to notify ipu for suspend/resume without cheking if an image was loaded leading to an error in the suspend path. Checking the handle to each proc before sending the notification is avoiding this. Suspend/resume is working now with/without an image loaded in IPU. Change-Id: I55aca1674b1cdffba9fb3247e7da605b4082a521 Signed-off-by: Miguel Vadillo <vadillo@ti.com> SYSLINK: IPU-PM: clean up warning in AUXCLK request function clean up clk_disable( ) warning in AUXCLK request function: ipu_pm_get_aux_clk( ). Change-Id: I6bcc41e220f80f4e248bef65b3ed0fc379451d98 Signed-off-by: Paul Hunt <hunt@ti.com> SYSLINK: IPU-PM: restore IOMMU during ipu pm detach and mmu close The IPU PM during the Ducati hibernation is shutting down the IOMMU. If the User process that is using IOMMU is killed when the Ducati is in hibernation state, the board hangs due to access to IOMMU during resource cleanup. The issue was observed when the Syslink daemon is killed with Ducati in hibernation. Change-Id: Ia5bd05fe382488c33ac858657f05aee9e22a48ee Signed-off-by: Hari Kanigeri <h-kanigeri2@ti.com>
| * | | | syslink: procmgr: simulate suspend/resume pathMiguel Vadillo2012-08-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Call ipu_pm_save_ctx() to truly simulate system suspend, this is just for testing purpose and is intented to validate IPU suspend/resume cb's and proper restore of IPU. Change-Id: I63a957b5b2980e4c4f1f0443fd5ce541b2b3b281 Signed-off-by: Miguel Vadillo <vadillo@ti.com>
| * | | | SYSLINK: SysLink printks with pr_xxxHari Kanigeri2012-08-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SYSLINK: IPC-replace printks with pr_xxx Replace printk(KERN_ERR) with pr_err printk(KERN_INFO) with pr_info printk(KERN_WARNING) with pr_info Change-Id: Ic434b3ca34f131528c71f8f3fc6b5b51252db92c Signed-off-by: Hari Kanigeri <h-kanigeri2@ti.com> SYSLINK: notify-replace printks with pr_xxx Replace printk(KERN_ERR) with pr_err printk(KERN_INFO) with pr_info printk(KERN_WARNING) with pr_info Change-Id: Iad946fec668a2fa190ea4c54067f59378cb6f147 Signed-off-by: Hari Kanigeri <h-kanigeri2@ti.com> SYSLINK: notify-ducati-replace printks with pr_xxx Replace printk(KERN_ERR) with pr_err printk(KERN_INFO) with pr_info printk(KERN_WARNING) with pr_info Change-Id: Ic65782b709447033912a7b3fe76daa3548b1ad4c Signed-off-by: Hari Kanigeri <h-kanigeri2@ti.com> SYSLINK: PROCMGR-replace printks with pr_xxx Replace printk(KERN_ERR) with pr_err printk(KERN_INFO) with pr_info printk(KERN_WARNING) with pr_info Change-Id: Iee8c0a38dbb32dc33b42d4ba757a746f791a3047 Signed-off-by: Hari Kanigeri <h-kanigeri2@ti.com>
| * | | | SYSLINK: IPC - changes for messageQ unblockShahid Akhtar2012-08-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added a new command in messageq to unblock. A new variable is also added to the messageq object to unblock the messageq. The purpose of unblock is to unblock the messageq_get() when it is pending for a new message with MessageQ_FOREVER timeout. The messageq_unblock is intended for use before deletion of messageq and it unblocks messageq_get() with MessageQ_FOREVER timeout value for termination. Signed-off-by: Shahid Akhtar <sakhtar@ti.com>
| * | | | omap:ipu_pm: Patchset to introduce ipu_pm functionality. omap:ipu_pm: add ↵Paul Hunt2012-08-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ipu_dev header to mach-omap2 tree Header file needed fot mach-omap2/ipu_dev.c file Signed-off-by: Paul Hunt <hunt@ti.com> omap:ipu_pm: add ipu_utility to mach-omap2 tree IVAHD Sequencer WFI Boot Code for IPU PM Driver Signed-off-by: Paul Hunt <hunt@ti.com> omap:ipu_pm: add ipu_drv to mach-omap2 tree Add needed api for ipu_pm module Signed-off-by: Paul Hunt <hunt@ti.com> omap:ipu_pm: add ipu_dev to mach-omap2 tree. Platform Device handling for IPU PM Driver Includes: - ipu_pm_module_start - ipu_pm_module_stop - platform data definition for the following devices: + fdif + ipu + ipu_c0 + ipu_c1 + iss + iva + iva_seq0 + iva_seq1 + L3 + mpu -ipussdev_init to init all devices. Signed-off-by: Paul Hunt <hunt@ti.com> syslink:ipu_pm: add/remove ipu_pm_start/stop Add the calls to api that will enable: - iva_hd - iva_seq0 - iva_seq1 - fdif - iss modules using the hwmod implementation. Hibernation disabled. Gptimer3 used for hibernation was disabled. Setting CM_MPU_M3_CLKSTCTRL.CLKTRCTRL[1:0] = HW_AUTO Retention is disable by default. Signed-off-by: Paul Hunt <hunt@ti.com> syslink:ipu_pm: fix req/rel aux_clk/iss/iva/idle The current implementation was not meeting all the requiriments needed to properly enable and use aux_clk. Anyway this is a hack way to do it, the proper implementation is still pending. Signed-off-by: Miguel Vadillo <vadillo@ti.com> Temporary path using cmm_write_reg to enable CAM_PHY Signed-off-by: Paul Hunt <hunt@ti.com> Ivahd requesting was not fully working since sl2 was not being requested and that is needed for ivahd to be fully functional. In ipu_dev sl2 is initialized In ipu_pm the flow to request iva should be: - Requesting (ivaseq1 call is requesting sl2) ivahd>ivaseq0>(ivaseq1>sl2) - Releasing (iva call is first releasing sl2) ivaseq0>ivaseq1>(sl2>ivahd) Signed-off-by: Miguel Vadillo <vadillo@ti.com> Setting IdleAllowed flag that enables the idle mode in Ducati. WFI can be called in Ducati flag whenever this flag is set Signed-off-by: Juan Gutierrez <jgutierrez@ti.com> Fix a compile error related to iva/iss when trying to build with ES1.0 configuration. In ES1.0, the PM is not supported. Signed-off-by: Hari Kanigeri <h-kanigeri2@ti.com> Signed-off-by: Miguel Vadillo <vadillo@ti.com> syslink:ipu_pm: DFVS support for freq Fix bug in error message string referencing Signed-off-by: Paul Hunt <hunt@ti.com> Add platform data for DSP resource and fix attributes for MPU and L3 interconnect. Signed-off-by: Paul Hunt <hunt@ti.com> Provide internal APIs for performance and latency constraint frameworks to use to assert these constraints into the system power management. Signed-off-by: Paul Hunt <hunt@ti.com> MPU and CORE freq/lat cstrs Add special handling for MPU and CORE frequency and latency constraints. To specify a constraint to MPU or CORE the api needs to be called passing the following to the api: - IPUPM_SELF - IPUPM_MPU - IPUPM_CORE Signed-off-by: Paul Hunt <hunt@ti.com> DVFS support in ipu_pm Calling the dvfs apis per resource. Included: - ipu[perf|lat] - iss[perf|lat] - ivahd[perf|lat] - L3 bus[lat] - mpu[perf|lat] Pending: - fdif - dsp Note: Latency calls are working but hasnt been tested. Perf/rate calls are working. Signed-off-by: Miguel Vadillo <vadillo@ti.com> Signed-off-by: Paul Hunt <hunt@ti.com> (cherry picked from commit 3c1cdb45bb67d11eda14420a7b8eaacff0c24173) SYSLINK:IPU-PM-move iommu handles to attach and detach Move getting iommu handle to attach and detach from setup/destroy. Having the iommu get in setup is causing the mmu fault recovery fail since the iommu object gets incremented before the fault application closes the iommu handle which leads to failure in shutting down the iommu device completely. Signed-off-by: Hari Kanigeri <h-kanigeri2@ti.com> syslink:ipu_pm: add L3 bw and fdif cstr ipu_pm api to set the bandwidth constraint for L3 bus New api is: ipu_pm_module_set_bandwidth(rsrc, target_rsrc, bw); bw is received in KiB/s and converted into Hz Add support to set performance and latency cstrs to fdif. Signed-off-by: Miguel Vadillo <vadillo@ti.com> Signed-off-by: Paul Hunt <hunt@ti.com> Signed-off-by: Juan Gutierrez <jgutierrez@ti.com> syslink:ipu_pm: send pid_death just to appm3 ipu_pm_notification is broadcasting all events to both sys/app processors whenever an event is sent using that api. For PID_DEATH event the requirement is only to send the message to APPM3 since is the one that will be executing the resource manager; also because of that sending the message to SYSM3 is unnecessary. Signed-off-by: Miguel Vadillo <vadillo@ti.com> syslink:ipu_pm: allow IPU hibernation -IPU self hibernation- After 5 seconds of inactivity ipu will send a notification to MPU indicating it can be turned off, mpu can proceed to turn off IPU just if there is no message (notify_send_event) going to IPU, in that case hibernation will be aborted. IPU is prepared to abort hibernation when a message arrives to its mbox. When mpu is hibernating IPU the iommu and mbox context will be saved and then rproc_sleep will be called to disable each core and also the associated gptimer, that is needed to allow retention. Whenever a message is sent to IPU the ipu_pm_restore will check and wake up IPU, if needed, restoring the iommu and mbox context and calling rproc_wake that will enable IPU and the associated gptimer again. -MPU hibernating IPU- Whenever the system suspend is sent to ipu_drv the suspend_drv will send a SUSPEND notification to IPU, it will send back an ack to MPU and then start the hibernation proccess by it self following the same scheme mentioned above but without waiting the 5 seconds, once ipu_drv receives the suspend ack it will call ipu_pm_save_ctx() in order to wait for IPU to be hibernated and in really idle then turn IPU off. This will work even if self hibernation in IPU is disable. Signed-off-by: Miguel Vadillo <vadillo@ti.com> Signed-off-by: Juan Gutierrez <jgutierrez@ti.com> Signed-off-by: Paul Hunt <hunt@ti.com> IPU PM: adapt aux clk funcs to new framework entities Signed-off-by: Paul Hunt <hunt@ti.com> IPU PM: temporary workaround for missing MM AUX_CLK requests Signed-off-by: Paul Hunt <hunt@ti.com> syslink: ipu_pm: add support for all the auxclk Previously ipu_pm was only supporting the request of AUX_CLK_1/3 now all the available aux_clk 0-5 are supported and can be requested/released via ipu_pm. Also the base address of the AUX_CLK was fixed since it was assuming AUX_CLK_0 as AUX_CLK_1 leading to a misalignment when requesting. Signed-off-by: Miguel Vadillo <vadillo@ti.com> syslink: ipu_pm: add a core latency constraint when the ipu is running. Due to the enabling of C4 and C5 states IPU was being put in reset without allowing it to properly save the context leading to an invalid resume operation and an MMU fault by IPU side. Putting a latency constraint on IPU_CORE whenever IPU is up and running is avoiding this scenario. The constraint is released once the IPU has properly saved the context and requested again when resuming to avoid letting the ipu_core going to retention. Change-Id: Iced64ff0744b2d6b0a0ecfc1952ed26e9e560278 Signed-off-by: Miguel Vadillo <vadillo@ti.com> Signed-off-by: Paul Hunt <hunt@ti.com> omap:syslink: removing gpt4 as available Gptimers 3 & 4 are reserving for ipu_pm internal use gpt3 was removed in previous patch from the list of available gptimers that IPU can request but gpt4 was still in the list. This patch removes gpt4 from the list. Signed-off-by: Miguel Vadillo <vadillo@ti.com>
| * | | | SYSLINK:devh: adding devh to syslink treeAngela Stegmaier2012-08-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds devh to syslink tree Signed-off-by: Angela Stegmaier <angelabaker@ti.com> Signed-off-by: Hari Kanigeri <h-kanigeri2@ti.com> SYSLINK: Devh - Add device event handling and SYSERROR support for OMAP4 SYSLINK: Devh - Add event handling and SYSERROR support DSP exceptions that are unrecoverable need to be communicated to the host processor so that it can print debug information, do resource cleanup and ultimately reload DSP. The notification mechanism for sending events to the host processor has been consolidated in a new module named Device Error Handler on the remote processor. The notification mechanism relies on a NotifyShm event to know about error events on the remote cores. The support has been built into the existing Devh module which registers a call back for the previously agreed event id to be used for error events. Upon receving an error event, the module will notify other kernel modules which have registered with it. It will also notify userspace applicatios through an agreed fd event. This support will be built in a following patch. For now, the module uses event id 4 to receive notify messages from remote processor. Enhacements that will follow include using a reserved event for sending notify messages. Initialize the Device Error Handler functionality in Devh. Devh registers a callback for NotifyShm event to be triggered when an error occurs on the remote core. Devh module has the support for receiving notifications from remote cores about irrecoverble errors. Userspace processes need to be notified for such events as well in order to do cleanup and recovery. Besides, such notifications can also be used to output valuable debug information about error scenarios. [Suman A] Corrected err_event_id from 4 to use as err_event_id = (4 | (NOTIFY_SYSTEMKEY << 16)), Change-Id: I961d83e62e5ce21b32f5e2c461644e6f2bd8cb3c Signed-off-by: Wajahat Khan <w-khan@ti.com> Signed-off-by: Hari Kanigeri <h-kangieri2@ti.com> SYSLINK: devh - add possibility of register for specific events New paratemer is added to event register ioctl to allow users register for a specific event. Modified to register notifier for IPU_PM watch-dog timer [Hari K] Added the call to ipc_recover_schedule on sys error and watchdog timer Change-Id: I5fcfc28bc424a47f95c32104d2200ad946ef9027 Signed-off-by: Fernando Guzman Lugo <fernando.lugo@ti.com> Signed-off-by: Hari Kanigeri <h-kanigeri2@ti.com> SYSLINK: Devh - Add userspace events unregistration support Implement the unregister ioctl which lets an application unregister an fd it had registered with the module earlier. The call returns successfully even if no matching fd was present or duplicates were present. Also fixed traces because of addition of watch dog event. Change-Id: Idd075c6a96a5c5438e02cfc1efa19d3e3859c0af Signed-off-by: Wajahat Khan <w-khan@ti.com>
| * | | | SYSLINK:IPU-PM-add ipu pm to syslink treeMiguel Vadillo2012-08-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add ipu pm to syslink tree Signed-off-by: Miguel Vadillo <vadillo@ti.com> Signed-off-by: Juan Gutierrez <jgutierrez@ti.com> Signed-off-by: Paul Hunt <hunt@ti.com> Signed-off-by: Fernando Guzman Lugo <x0095840@ti.com> Signed-off-by: Hari Kanigeri <h-kanigeri2@ti.com> Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
| * | | | SYSLINK: add syslink headersHari Kanigeri2012-08-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add syslink headers Signed-off-by: Suman Anna <s-anna@ti.com> Signed-off-by: Miguel Vadillo <vadillo@ti.com> Signed-off-by: Juan Gutierrez <jgutierrez@ti.com> Signed-off-by: Paul Hunt <hunt@ti.com> Signed-off-by: Hari Kanigeri <h-kanigeri2@ti.com> Signed-off-by: Subramaniam C.A <subramaniam.ca@ti.com> Signed-off-by: Arun M G <arunmg@ti.com> Signed-off-by: Ramesh Gupta G <grgupta@ti.com> Signed-off-by: Jayan John <x00jayan@ti.com> Signed-off-by: Angela Stegmaier <angelabaker@ti.com> Signed-off-by: Arun Radhakrishnan <x0051460@ti.com> Signed-off-by: Subin Gangadharan <subin.kg@ti.com>
| * | | | SYSLINK:ipc-added multicore ipc module to syslinkSuman Anna2012-08-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add multicore ipc module to syslink. Signed-off-by: Suman Anna <s-anna@ti.com> Signed-off-by: Subramaniam C.A <subramaniam.ca@ti.com> Signed-off-by: Arun M G <arunmg@ti.com> Signed-off-by: Ramesh Gupta G <grgupta@ti.com> Signed-off-by: Jayan John <x00jayan@ti.com> Signed-off-by: Angela Stegmaier <angelabaker@ti.com> Signed-off-by: Hari Kanigeri <h-kanigeri2@ti.com> Signed-off-by: Arun Radhakrishnan <x0051460@ti.com> Signed-off-by: Subin Gangadharan <subin.kg@ti.com>
| * | | | SYSLINK:notify-add notify module to syslink with associated fixesRamesh Gupta2012-08-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SYSLINK:notify-add notify module to syslink add notify module to syslink Signed-off-by: Suman Anna <s-anna@ti.com> Signed-off-by: Ramesh Gupta G <grgupta@ti.com> Signed-off-by: Hari Kanigeri <h-kanigeri2@ti.com> Signed-off-by: Subramaniam C.A <subramaniam.ca@ti.com> SYSLINK:notify-added notify ducati driver to syslink Add notify ducati driver to syslink Signed-off-by: Suman Anna <s-anna@ti.com> Signed-off-by: Hari Kanigeri <h-kanigeri2@ti.com> Signed-off-by: Subramaniam C.A <subramaniam.ca@ti.com> Signed-off-by: Ramesh Gupta G <grgupta@ti.com> SYSLINK: notify - minor fix for error check copy_to_user returns a non-zero value in case of error. This patch fixes it and resolved an associated KW defect: Comparison of unsigned value against 0 is always false Signed-off-by: Suman Anna <s-anna@ti.com> omap:notify: call restore_ctx when send_event first time In notify.c when sending an event using notify_send_event() the funtion ipu_pm_restore_ctx() is called to enable just the first time idle and disable hibernation. Also is changing the ducati clock state transition control to HW_auto to allowed retention. The rest of the restore ctx remains under a menuconfig macro. Signed-off-by: Juan Gutierrez <jgutierrez@ti.com> SYSLINK: notify - reset notify registration chart correctly This patch fixes a minor bug in the notify driver unregistration process. The notify registration chart is an array and stores all the registered events in ascending order (dictates the notify event priorities). This array is compacted whenever an event is unregistered. The compaction is done shifting all the subsequent events to the left. Currently, the next element to the element being unregistered is not reset correctly, thereby leading to duplicate registrations in the array. This still leaves a valid duplicate event when that event is unregistered. This scenario happens when a lower event is unregistered while a higher event is also present. Change-Id: I47a04e4d01a5081099117280be286a51afa7d1cf Signed-off-by: Suman Anna <s-anna@ti.com> syslink: notifier - add a mutext per notify_object Critital section are per notify_object we not need to block other notify_object of other processors. Instead create a new mutex per notify_object to protect critical sections which belong to a specific processor. This would increase the performance. Also fix unprotected part while calling the registered callback fucntions that was causing a kernel panic. Change-Id: Ie99eef8eb5eca6a75d203df33c2a31981ce50489 Signed-off-by: Fernando Guzman Lugo <x0095840@ti.com> SYSLINK:IPC - Notify reserve events moved from 4 to 5 Making room for new reserved event for devh. Devh is using event 4 for sys error notifications. Change-Id: I545b3da56167d6f539092ab434d33f993129324f Signed-off-by: Shahid Akhtar <sakhtar@ti.com>
| * | | | SYSLINK:ProcMgr-Add ProcMgr to SyslinkHari Kanigeri2012-08-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add ProcMgr to Syslink Signed-off-by: Hari Kanigeri <h-kanigeri2@ti.com> Signed-off-by: Ramesh Gupta G <grgupta@ti.com> Signed-off-by: Suman Anna <s-anna@ti.com> Signed-off-by: Arun M G <arunmg@ti.com> Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
| * | | | mailbox: change full flag per mailbox queue instead of globalFernando Guzman Lugo2012-08-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As pointed by Ohad Ben-Cohen, the variable rq_full flag is a global variable, so if there are multiple mailbox users there will be conflics. Now there is a full flag per mailbox queue. Version 2: - Rebase to the latest. Reported-by: Ohad Ben-Cohen <ohad@wizery.com> Signed-off-by: Fernando Guzman Lugo <x0095840@ti.com>
| * | | | omap:mbox: save and restore supportMiguel Vadillo2012-08-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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 and calling the mbox_shutdown. - restore_context function is calling the mbox_startup and restoring just the irqs per user. mbox-startup function is setting all the rest of the register to the original state. There is no need to save the Messages. Currently ipu_pm is not taking in to consideration Tesla for disabling or not mbox. This patch depends on the following list of patches provided by Hari Kanigeri: - omap:change spinlock to mutexlock - omap:mailbox-add notification support for multiple readers - SYSLINK:notify-adapt to new mailbox interface Signed-off-by: Miguel Vadillo <vadillo@ti.com> Signed-off-by: Hari Kanigeri <h-kanigeri2@ti.com> Signed-off-by: Fernando Guzman Lugo <x0095840@ti.com> Signed-off-by: Juan Gutierrez <jgutierrez@ti.com> Signed-off-by: Paul Hunt <hunt@ti.com>
| * | | | omap:mailbox-resolve multiple receiver problemHari Kanigeri2012-08-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ISR is handling only the mailbox instance that was registered last. So if both mailbox instances are running at the same time, the first mailbox that registered wouldn't get the mailbox message. The same issue is present in Transmit Interrupt case too. Only the last registered mailbox is handled. The fix is to iterate through the list of mailbox that were registered. Signed-off-by: Hari Kanigeri <h-kanigeri2@ti.com> Signed-off-by: Ramesh Gupta <grgupta@ti.com> Signed-off-by: Subramaniam C.A <subramaniam.ca@ti.com>
| * | | | omap: mailbox: fix reverse likelinessOhad Ben-Cohen2012-08-17
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
| * | | | omap:mailbox-change spinlock to mutexlockHari Kanigeri2012-08-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | considering the number of variables need to be protected in mailbox module, it is better to use mutex than spinlock. spinlock's restriction of using it in atomic context makes the code more complicated. Signed-off-by: Hari Kanigeri <h-kanigeri2@ti.com>
| * | | | TILER: fix SSPtr default value to 1Sebastien Jan2012-08-17
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Sebastien Jan <s-jan@ti.com>
| * | | | OMAP:TILER: Add debugfs interfaces for TilerLajos Molnar2012-08-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added <debugfs>/tiler/map/2x1 file which contains the TILER container map subsampled 2x1. Reading this file will perform a dump of the tiler container. Added <debugfs/tiler/alloc_debug debugfs parameter. Setting this parameter to a non-zero value will cause debug prints for each area allocation and deallocation. Signed-off-by: Lajos Molnar <molnar@ti.com> Signed-off-by: Andy Gross<andy.gross@ti.com>
| * | | | TILER: Fix a use-after free errorIliyan Malchev2012-08-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removed errant usage of previously freed memory in unregister buffer ioctl. Signed-off-by: Iliyan Malchev <malchev@google.com> Signed-off-by: Andy Gross <andy.gross@ti.com>
| * | | | TILER: Make userspace API support a configurable optionAndy Gross2012-08-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added kernel configuration option for enabling userspace ioctl interfaces. If set, ioctl support will be enabled in the driver. Signed-off-by: Andy Gross <andy.gross@ti.com>
| * | | | TILER: Make tiler nv12 support a configuration optionAndy Gross2012-08-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The tiler driver now allows for configuring the nv12 support as a kernel configuration option. If enabled, nv12 support will be compiled into the driver. Signed-off-by: Andy Gross <andy.gross@ti.com>
| * | | | TILER: Refactor function names to resemble actual functionalityAndy Gross2012-08-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change references of mapping to pinning where applicable, so that the new function names resemble more closer to the actual functionality. Signed-off-by: Andy Gross <andy.gross@ti.com>
| * | | | OMAP: TILER: Added 1D area allocation + memory pinning operationsLajos Molnar2012-08-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added new tiler kernel methods: tiler_alloc_block_area() allocates a 1D container area of certain size tiler_pin_memory() can pin memory-backing to a 1D container area (or replace its previous mapping) tiler_unpin_memory() clears the memory-backing of a 1D container area tiler_free_block() can be still used to free the container area. Signed-off-by: Lajos Molnar <molnar@ti.com>
| * | | | OMAP: TILER: Expose 1D mapping/unmapping operationsLajos Molnar2012-08-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Expose kernel methods to map a set of physical pages into TILER 1D (reserve area + pin memory), and free those areas. Signed-off-by: Lajos Molnar <molnar@ti.com>
| * | | | OMAP: TILER: Pin the correct # of pages to 1D areas.Lajos Molnar2012-08-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We may want to pin less pages to a 1D area than the area size, when we will pre-allocate container areas to map arbitrary 1D memory to (to make it "physically" contiguous.) This patch makes this work. Signed-off-by: Lajos Molnar <molnar@ti.com>
| * | | | OMAP: TILER: Separate sub-tiler operations: mem-alloc, area-alloc, pinLajos Molnar2012-08-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Create common structure to hold memory backing of a tiler area (struct tiler_pa_info). Use this structure in struct mem_info. Separate alloc_block into: 1. area-alloc (alloc_block_area) 2. mem-alloc (get_new_pa) 3. pin (pin_memory) Similarly map_block becomes: 1. get memory backing (user_block_to_pa) 2. area-alloc 3. pin (using already allocated memory) This was in preparation for allowing to pin preallocated memory into tiler, which is now implemented by map_any_block(). Signed-off-by: Lajos Molnar <molnar@ti.com>
| * | | | OMAP: TILER: TCM-SITA: Fix bug in 1D area allocationLajos Molnar2012-08-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TCM-SiTA allocated 1 page more than necessary for every 1D area allocation. This is now fixed. Signed-off-by: Lajos Molnar <molnar@ti.com>
| * | | | TILER: Implement tcm_clear, and initialize TILER containerLajos Molnar2012-08-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement tcm_clear and initialize TILER container to a blank page. This eliminates problems from reading into an unmapped TILER page that can happen with 3rd party applications. Signed-off-by: Lajos Molnar <molnar@ti.com> Signed-off-by: Andy Gross <andy.gross@ti.com> Signed-off-by: Suman Anna <s-anna@ti.com>
| * | | | TILER: Add support for mapping kernel allocated buffers into TILERLajos Molnar2012-08-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | get_user_pages is not effective for kernel allocated buffers. We fall back to tiler_virt2phys() for those. Signed-off-by: Lajos Molnar <molnar@ti.com> Signed-off-by: Mark Tyler <mark.tyler@ti.com> Signed-off-by: Andy Gross <andy.gross@ti.com>
| * | | | TILER: Simplify TILIOC_GSSP ioctlSuman Anna2012-08-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Simplify the TILIOC_GSSP ioctl to use the common tiler_virt2phys function Signed-off-by: Lajos Molnar <molnar@ti.com> Signed-off-by: Suman Anna <s-anna@ti.com>
| * | | | TILER: Add tiler_virt2phys functionSuman Anna2012-08-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the virt2phys functionality into a common function, and export it so that it can be used by different drivers. Signed-off-by: Lajos Molnar <molnar@ti.com> Signed-off-by: Mark Tyler <mark.tyler@ti.com> Signed-off-by: Suman Anna <s-anna@ti.com>
| * | | | TILER: Fix NULL dereference when mapping kernel buffers with map_blockLajos Molnar2012-08-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | get_user_pages sets page to NULL for kernel allocated buffers, which we dereferenced. This patch fixes this. Signed-off-by: Lajos Molnar <molnar@ti.com>
| * | | | TILER: Add missing kfree for pointer elementsAndy Gross2012-08-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add missing kfree when cleaning up fast structure Signed-off-by: Andy Gross <andy.gross@ti.com>
| * | | | TILER: Include header when using mm_structDavid Sin2012-08-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Build fails without this when using omap3 defconfig. Signed-off-by: David Sin <davidsin@ti.com> TILER: Use unlocked ioctl Use .unlocked_ioctl and change return value to long Signed-off-by: David Sin <davidsin@ti.com> TILER: Add semi-colon to fix compile error Add semi-colon to fix error: two or more data types in declaration specifiers Signed-off-by: David Sin <davidsin@ti.com>