summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2011-10-25omap:iodmm-cleanup and fixesHari Kanigeri
This patch handles the following: 1. cleaned the switch statement in dmm_user.c to move the copy_from_user to individual functions. 2. Seperated the building of Scatter gather list to Map function. The list is created when the Map function is created and deleted when the unmap function is called. Previously this list was created during flush function and deleted during the invalidate function. The previous implementation would fail if the Users call the invalidate function directly without calling flush function, as it would require calling flush function prior to calling invalidate function. The previous implementation also includes the overhead in creating and deleting the SG list for every flush and invalidate calls. 3. Changed the logic to track mapping object based on MPU VA instead of page aligned MPU VA. This is because if there are 2 MPU buffers with virtual addresses within the Page boundary, then there would be 2 Mapping objects with same virtual address. 4. Delete the DMM pools only when all the handles to IODMM are closed. The ioctl DMM_IOCDELETEPOOL can be deprecated with this change. 5. Added the SYS ADMIN check for create dmm pools, and set tlb entry ioctls. This code is currently kept commented out. 6. DMA Flush APIs are still optionally selected using CONFIG_DMM_DMA_API option. This is not selected by default. Signed-off-by: Hari Kanigeri <h-kanigeri2@ti.com> omap:iodmm-send notification on close only when resources not free Instead of sending the notification on every IOMMU close, send it only when there are still mapped resources to avoid the remote processor accessing these resources. After compelting the notification, the iommu release function can safely remove the mapped entries. Change-Id: Ib162bb4aa4ec0ed287a4b7484f54b0712871804e Signed-off-by: Hari Kanigeri <h-kanigeri2@ti.com>
2011-10-25omap:iommu: restore just the prsvd tlb entriesMiguel Vadillo
Previously, when restoring the iommu context, all the TLB entries marked valid were being reloaded. Reading dynamically loaded TLBs back from the MMU registers during a context save operation returned addresses that were not aligned to the boundaries of the page sizes indicated in the respective fields. Attempting to restore these unaligned entries in the MMU resulted in warnings from the restore routines. Since only the locked TLB entries need to be loaded before restarting the processor, we are now restoring only those. (All the locked entries were marked as protected/preserved when they were initially loaded.) We are still investigating the root cause of why the alignment appears wrong in the TLB entries loaded as a result of a TLB miss by the table walking logic. Signed-off-by: Miguel Vadillo <vadillo@ti.com>
2011-10-25omap:iommu-event notification shouldn't be blocking callHari Kanigeri
iommu_notify_event function is called from interrupt context, and this function is using internally blocking_notifier_call_chain call that could sleep. The fix is changing blocking_notifier to raw_notifier and let the callers of the iommu_notify_event handle the protection. iommu_notify_event is used for 2 purposes. One is for MMU FAULT notification to the device handler where the devh sets the error state to Fault and prevents the broadcasting of any iommu close notifications. This shouldn't be blocking. Second, it is used to broadcast the notifications of the Process ID that closed the iommu handle to remote processor. This could be blocking. Reported by Hari Nagalla Signed-off-by: Hari Kanigeri <h-kanigeri2@ti.com> Signed-off-by: Hari Nagalla <hnagalla@ti.com>
2011-10-25omap:iommu-handle the omap_hwmod_lookup value gracefullyHari Kanigeri
In case omap_hwmod_lookup returns NULL, don't proceed further for this instance and continue with next device. Reported by: Rajendra Nayak Signed-off-by: Hari Kanigeri <h-kanigeri2@ti.com>
2011-10-25omap:iodmm-make dma call for flushing configurableHari Kanigeri
Use dma calls for cache flushing under a configurable flag. Use this option until Multimedia integration issues are sorted out. Signed-off-by: Hari Kanigeri <h-kanigeri2@ti.com>
2011-10-25omap:iommu: early registeration of iommu to handle hwmod dependency.Hari Kanigeri
The DVFS framework for DSP is dependent on hwmod registeration completed for DSP in iommu driver. This patch moves the iommu initialization to post-core init to ensure the registeration is completed prior to DVFS stuff. Without this fix, the following warning was observed during boot-up. ------------[ cut here ]------------ WARNING: at arch/arm/mach-omap2/pm.c:54 omap4_get_dsp_device+0x34/0x50() Modules linked in: Backtrace: [<c0039f9c>] (dump_backtrace+0x0/0x110) from [<c0380ce8>] (dump_stack+0x18/0x1c) r7:00000000 r6:c0041f70 r5:c044ba64 r4:00000036 [<c0380cd0>] (dump_stack+0x0/0x1c) from [<c006fde0>] (warn_slowpath_common+0x54/ 0x6c) [<c006fd8c>] (warn_slowpath_common+0x0/0x6c) from [<c006fe1c>] (warn_slowpath_nu ll+0x24/0x2c) r9:00000000 r8:00000000 r7:00000001 r6:c000f708 r5:c0508784 r4:c0503024 [<c006fdf8>] (warn_slowpath_null+0x0/0x2c) from [<c0041f70>] (omap4_get_dsp_devi ce+0x34/0x50) [<c0041f3c>] (omap4_get_dsp_device+0x0/0x50) from [<c001137c>] (omap4_pm_init_op p_table+0x144/0x244) r5:c0508784 r4:c050326c [<c0011238>] (omap4_pm_init_opp_table+0x0/0x244) from [<c000f79c>] (omap2_common _pm_init+0x94/0xbc) r5:c0508784 r4:c0503024 [<c000f708>] (omap2_common_pm_init+0x0/0xbc) from [<c003558c>] (do_one_initcall+ 0x64/0x1bc) r5:c0508784 r4:c002b5bc [<c0035528>] (do_one_initcall+0x0/0x1bc) from [<c0008644>] (kernel_init+0x168/0x 238) r7:c050877c r6:c04ca560 r5:c0508784 r4:c002b5bc [<c00084dc>] (kernel_init+0x0/0x238) from [<c00736f0>] (do_exit+0x0/0x5f0) r7:00000013 r6:c00736f0 r5:c00084dc r4:00000000 ---[ end trace dec6997083161631 ]--- Signed-off-by: Hari Kanigeri <h-kanigeri2@ti.com> Signed-off-by: Paul Hunt <hunt@ti.com>
2011-10-25omap:iodmm Refactor iodmm code and fix compilation issue. Allow cache flushHari Kanigeri
omap:iodmm-dmm code moved to new file and fixes The patch handles the following 1. Moved the code out of iovmm to new file. 2. Removed the config option related to IOVMM in makefile 3. Moved the DMM pool creation part to iodmm.c 4. Removed the hacks that were made to handle Tiler buffers. 5. Only buffers that are mapped would be permittted for flushing. 6. Removed the ioctl to program PTE entries directly from userspace. Regular DMM should be used to program the PTE entries. This requires userspace change 7. Removed unused functions. 8. Provided the support to map Anonymous buffers. 9. Provided the support to map Physical address if passed. 10. Replaced the local spinlock with global mutex lock for critical critical sections. Signed-off-by: Hari Kanigeri <h-kanigeri2@ti.com> omap:iodmm-resolve compilation issue This patch resolves the following build issue that was observed when build with omap3 defcofig. arch/arm/plat-omap/iodmm.c: In function 'user_to_device_map': arch/arm/plat-omap/iodmm.c:425: error: dereferencing pointer to incomplete type arch/arm/plat-omap/iodmm.c: In function 'dmm_user': arch/arm/plat-omap/iodmm.c:655: error: dereferencing pointer to incomplete type arch/arm/plat-omap/iodmm.c:744: error: dereferencing pointer to incomplete type make[1]: *** [arch/arm/plat-omap/iodmm.o] Error 1 m Signed-off-by: Hari Kanigeri <h-kanigeri2@ti.com> omap:iodmm-allow unconditional cache flush This patch reverts back Russell King's patch to do the userspace buffer cache flush. This allows unconditional cache operations and this patch is considered as a hack patch until the new API is alinged with MM team Signed-off-by: Hari Kanigeri <h-kanigeri2@ti.com>
2011-10-25omap:iommu: save/restore changes for iommuMiguel Vadillo
omap:iommu: save/restore tlbs entries Introduce a way to save/restore the tlbs entries. When saving is call all 32 entries are saved. When restoring just the valid ones are restored. A new member in iommu obj was added to save/restore the tlbs - iommu tlbs context: saved area struct iotlb_entry *tlbs_e 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:iommu: Change in iommu to save/restore To save the context the tlbs are being saved using iommu_save_tlb_entries() then the iommu is disable. To restore the context the tlbs are being restored using iommu_restore_tlb_entries() then the iommu is enable. There is no need to save the registers that is why ctx was removed from the iommu struct. omap2_save/restore function were removed. 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:iommu: dump ctx for omap4 Adding the two new registers just for omap4 in the dumping context function. 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:iommu: iommu_debug fix due to api change New function to get the version of IOMMU was added since now there is a need to determine if its tesla or ducati. iommu_debug.c was updated to use this API 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:iommu: set MMU_GP_REG to force a bus error upon MMU fault MMU_GP_REG[0] determines the behavior of Ducati cores upon hitting an MMU fault (address is not mapped in L2MMU). If it is not set, the cores are hung preventing the fault handler to run. If one introduces a bus error, the fault handler gets to run and prints state information which is useful for debug. Signed-off-by: Wajahat Khan <w-khan@ti.com> Signed-off-by: Hari Kanigeri <h-kanigeri2@ti.com>
2011-10-25omap:iodmm Various fixes for iodmmHari Kanigeri
omap:iodmm-fixes to unmap and general cleanup Following fixes are handled by this patch. - Unmapping of buffers - Pages were allocated on 1K boundary instead of 4K - Use VM_IO to detect IO buffers (eg: Tiler) - Page_cache_release calls were missing for unmapping part. - find_containing_mapping function is extended to check based on da address as well. This is needed during unmap part - Cleanup of unused header files in iodmm.c - Cleanup of unused case to clear PTE entries. PTE entries would get cleaned during device release - Added function headers with description - Uncommented omap_delete_vmm_pool code. This patch still has a hack code to handle Tiler buffer. Tiler buffer should be handle dby VM_IO itself and doesn't need to depend on flags. Signed-off-by: Hari Kanigeri <h-kanigeri2@ti.com> omap:iodmm-exclude Tiler buffers from mapped information Exclude Tiler buffers from getting added to runtime mapped information since they are already pre-mapped in TLB. By including them in runtime leads to MMU fault during the process shutdown. Signed-off-by: Hari Kanigeri <h-kanigeri2@ti.com>
2011-10-25omap:iommu-enable user to va supportHari Kanigeri
Enabled the support to map the buffer that is passed through mmap. Also comment out the vmm delete pool function as this is broken. Signed-off-by: Hari Kanigeri <h-kanigeri2@ti.com>
2011-10-25omap:iommu-add spinlock protection to event list accessAngela Stegmaier
This patch adds spinlock protection to event list accesses in order to avoid list corruption. Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
2011-10-25omap:iommu-dmm fixesHari Kanigeri
This fixes the following: 1. pgd and pte entries weren't getting flushed out leading to MMU faults. 2. Cache invalidate was setting wrong size parameter to memory_regain_ownership leading cache invalidate function to fail. Signed-off-by: Hari Kanigeri <h-kanigeri2@ti.com>
2011-10-25omap:iommu-use platform device for iovmmHari Kanigeri
use platform device instead of omap device for iovmm. Signed-off-by: Hari Kanigeri <h-kanigeri2@ti.com>
2011-10-25omap:iommu-disable TWL for ES1.0 by checking the CPU RevisionRamesh Gupta Guntha
Disable TWL for ES1.0 by checking the CPU Revision [Hari] - Amended the patch to move enabling/disabling of TWL part to iommu_get function since this needs to be executed only once. Signed-off-by: Ramesh Gupta G <grgupta@ti.com> Signed-off-by: Hari Kanigeri <h-kanigeri2@ti.com>
2011-10-25IOVMM add flush invalidate support for userspace buffersRamesh Gupta Guntha
Add flush and invalidate suppor for userspace buffers. Signed-of-by: Ramesh Gupta G <grgupta@ti.com> Signed-off-by: Hari Kanigeri <h-kanigeri2@ti.com>
2011-10-25omap:iommu-notifier callback mechanism for mmu eventsHari Kanigeri
Implement notifier callback mechanism for IOMMU events such as MMU fault and file close. The Error handler that hooks to this registration would notify the remote processor whenever a process closed the iommu. This is to ensure that the Processes on Remote process stop accessing the buffers mapped by the terminating Process Signed-off-by: Hari Kanigeri <h-kanigeri2@ti.com> Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
2011-10-25omap:iommu-disable the MMU interrupts in fault ISRAngela Stegmaier
Instead of disabling the MMU device, just disable the MMU interrupts when the MMU fault occurs. This change is required because the user applications might be releasing the MMU resources after the MMU fault recovery and this requires MMU to be in enabled state. MMU will be disabled after all the open handles to IOMMU are closed. Signed-off-by: Hari Kanigeri <h-kanigeri2@ti.com> Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
2011-10-25omap:iommu -Inital support for DMM using iommuHari Kanigeri
omap:iommu-ported dspbridge's dmm code to iommu This patch ports the dspbridge's dmm code to iommu location. Signed-off-by: Hari Kanigeri <h-kanigeri2@ti.com> Signed-off-by: Ramesh Gupta <grgupta@ti.com> omap:iommu-added cache flushing operation for L2 cache Signed-off-by: Ramesh Gupta <grgupta@ti.com> Signed-off-by: Hari Kanigeri <h-kanigeri2@ti.com> omap:iovmm-add interface to userspace DMM signed-off-by: Hari Kanigeri <h-kanigeri2@ti.com> signed-off-by: Ramesh Gupta <grgupta@ti.com> omap:iommu-event notification to userspace Implement iommu event notifications to userspace using eventfd Signed-off-by: Hari Kanigeri <h-kanigeri2@ti.com> Signed-off-by: Angela Stegmaier <angelabaker@ti.com> IODMM add support for unmap functionality Adds unmap functionality , adds the map information of loadable sections to the mapped list. Signed-off-by: Ramesh Gupta G <grgupta@ti.com>
2011-10-25omap:iommu-adapt to hwmod implementationHari Kanigeri
This patch adapts iommu to hwmod implementation for OMAP4. Work needs to be done for OMAP3 Signed-off-by: Hari Kanigeri <h-kanigeri2@ti.com>
2011-10-25IOMMU remove clock functions from iommu moduleRamesh Gupta Guntha
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>
2011-10-25omap: iommu- twl and tlb fixesHari Kanigeri
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>
2011-10-25syslink: ipu_pm: fix wdt and add resource cleanupMiguel Vadillo
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>
2011-10-25syslink:ipu_pm: Modifications for timer setup for WDTShahid Akhtar
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>
2011-10-25SYSLINK:add build files to SyslinkHari Kanigeri
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>
2011-10-25omap: remoteproc: use gptimer 4 and 9 as ipu clkMiguel Vadillo
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>
2011-10-25OMAP: rproc44xx: free dmtimer in proc stop caseHari Kanigeri
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>
2011-10-25KW: remoteproc: Move debug statement so rproc will be valid when dereferencedAxel Haslam
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>
2011-10-25omap: mach-omap2: adapt remoteproc to dmtimer context save / restorePaul Hunt
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>
2011-10-25omap:remoteproc-Initial support for remote procHari Kanigeri
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>
2011-10-25omap3: hwmod: disable hwspinlocksG, Manjunath Kondaiah
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>
2011-10-25omap:hwspinlocks-ensure the order of registrationHari Kanigeri
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>
2011-10-25omap:hwspinlocks add pm_runtime_enableBalaji T K
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>
2011-10-25omap:hwspinlock-added hwspinlock driverSimon Que
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>
2011-10-25SYSLINK: ipc - ipc recovery related patchesFernando Guzman Lugo
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>
2011-10-25omap: mach-omap2: don't wake ipu from hibernation for suspendMiguel Vadillo
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>
2011-10-25SYSLINK:ipu-pm: Refactor ipu-pm module and fix suspend/resumeMiguel Vadillo
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>
2011-10-25syslink: procmgr: simulate suspend/resume pathMiguel Vadillo
- 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>
2011-10-25SYSLINK: SysLink printks with pr_xxxHari Kanigeri
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>
2011-10-25SYSLINK: IPC - changes for messageQ unblockShahid Akhtar
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>
2011-10-25omap:ipu_pm: Patchset to introduce ipu_pm functionality. omap:ipu_pm: add ↵Paul Hunt
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>
2011-10-25SYSLINK:devh: adding devh to syslink treeAngela Stegmaier
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>
2011-10-25SYSLINK:IPU-PM-add ipu pm to syslink treeMiguel Vadillo
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>
2011-10-25SYSLINK: add syslink headersHari Kanigeri
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>
2011-10-25SYSLINK:ipc-added multicore ipc module to syslinkSuman Anna
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>
2011-10-25SYSLINK:notify-add notify module to syslink with associated fixesRamesh Gupta
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>
2011-10-25SYSLINK:ProcMgr-Add ProcMgr to SyslinkHari Kanigeri
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>
2011-10-25mailbox: change full flag per mailbox queue instead of globalFernando Guzman Lugo
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>
2011-10-25omap:mbox: save and restore supportMiguel Vadillo
- 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>
2011-10-25omap:mailbox-resolve multiple receiver problemHari Kanigeri
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>
2011-10-25omap: mailbox: fix reverse likelinessOhad Ben-Cohen
Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>