aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
Commit message (Collapse)AuthorAge
* Apply RTC-TWL patches.Christopher Kenna2012-09-20
| | | | | rtc: twl: Use threaded IRQ, remove IRQ enable in interrupt handler twl: add missing IRQF_ONESHOT
* Revert "DRM: OMAP: Fixing PVR kernel module name"Sebastien Jan2012-08-17
| | | | | | This reverts commit 13312d2e5bae87b72f030290e6675e07833b3db0. Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
* Revert "Staging: OMAPDRM: Changing driver's name to be compatible with ↵Sebastien Jan2012-08-17
| | | | | | | | userspace" This reverts commit e3e5280a1cb7c90b1a208ffd8cd3c9918cc24d57. Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
* usb: ehci: make HC see up-to-date qh/qtd descriptor ASAPMing Lei2012-08-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch introduces the helper of ehci_sync_mem to flush qtd/qh into memory immediately on some ARM, so that HC can see the up-to-date qtd/qh descriptor asap. This patch fixs one performance bug on ARM Cortex A9 dual core platform, which has been reported on quite a few ARM machines (OMAP4, Tegra 2, snowball...), see details from link of https://bugs.launchpad.net/bugs/709245. The patch has been tested ok on OMAP4 panda A1 board, and the performance of 'dd' over usb mass storage can be increased from 4~5MB/sec to 14~16MB/sec after applying this patch. SRU Justification: Impact: - without the patch, 'dd' over usb mass storage is about 4~5MB/sec. Fix: - After applying the patch, 'dd' over usb mass storage is about 14~16MB/sec. BugLink: http://bugs.launchpad.net/bugs/709245 upstream discusstion: https://patchwork.kernel.org/patch/1113332/ Signed-off-by: Ming Lei <ming.lei@canonical.com> Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
* Revert "usb: ehci: fix update qtd->token in qh_append_tds"Paolo Pisati2012-08-17
| | | | | | This reverts commit fc517b54e0cc527c5341bf0aa6fd7cc31740d65c. Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
* DRM: Revert one DRM change to make SGX work.Vincent Stehlé2012-08-17
| | | | | | | | Signed-off-by: Vincent Stehlé <v-stehle@ti.com> Signed-off-by: Ricardo Salveti de Araujo <ricardo.salveti@canonical.com> Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com> Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
* Staging: OMAPDRM: Changing driver's name to be compatible with userspaceRicardo Salveti de Araujo2012-08-17
| | | | Signed-off-by: Ricardo Salveti de Araujo <ricardo.salveti@linaro.org>
* DRM: OMAP: Fixing PVR kernel module nameRicardo Salveti de Araujo2012-08-17
| | | | | | | | We currently expect it to be "pvrsrvkm" and not "omap_gpu_pvr", so change it to load the correct driver. Signed-off-by: Ricardo Salveti de Araujo <ricardo.salveti@canonical.com> Signed-off-by: Ricardo Salveti de Araujo <ricardo.salveti@linaro.org>
* KS8851: Add support for EEPROM MAC AddressBen Dooks2012-08-17
| | | | | | | | | Add support for reading the MAC address from the system registers if there is an EEPROM present. This involves caching the KS_CCR register for later use (will also be useful for ETHTOOL support) and adding a print to say that there is an EEPROM present. Signed-off-by: Abraham Arce <x0066660@ti.com>
* Tiler: Change tiler_mmap from uncached to writecombineSebastien Jan2012-08-17
| | | | | | | This is a suggestion from Rob Clark. Purpose is to reduce load for copying bitstream into codec input buffer. Signed-off-by: Sebastien Jan <s-jan@ti.com>
* omapdrm connector max edid 512Andy Green2012-08-17
| | | | Signed-off-by: Andy Green <andy.green@linaro.org>
* syslink: notify: process both cores ipc stack for each mailbox interruptSubin K G2012-08-17
| | | | | | | | | | | | | For each mailbox interrupt,process both cores(sysm3 and appm3) ipc stack. This is to fix the issue of message being dropped, when both cores tries to put the message at the same time. For example both sysm3 and appm3 are trying to write into MBX and appm3 sees that there is already a message pending by SYSM3.In this case appm3 will not interrupt A9.But A9 will only process sysm3 ipc stack.So to take care of this,process both cores ipc stack for each MBX interrupt. Change-Id: I209db12d54204818f6c4b24aab162263bbd53d3b Signed-off-by: Subin K G <subin.kg@ti.com>
* syslink: ipc: limit the retry count for ipc attachSubin K G2012-08-17
| | | | | | | | | | | | Currenlty ipc_attach is whiling inside the kernel till it become success.This has been changed to a retry for 500ms, after that it will report failure to userspace. This change is to avoid rebooting of the board, in case if ipc_attach fails. Change-Id: Ie47043c54858140e198af7354b9441232a117760 Signed-off-by: Subin K G <subin.kg@ti.com>
* syslink: procmgr: initialize is_cached parameter before unmapBryan Honza2012-08-17
| | | | | | | | | | The is_cached parameter is not initialized prior to calling platform_mem_unmap from proc4430_detach. This change sets the is_cached parameter to false to match the value used when mapped so that the memory entries are now unmapped consistently. Change-Id: I7690d317093cd82c13c9894e8cbc0fb2432dff02 Signed-off-by: Bryan Honza <honza@ti.com>
* syslink: procmgr: initialize attach_countBryan Honza2012-08-17
| | | | | | | | | | | | atomic_cmpmask_and_set() is operating on an uninitialized attach_count which can pass the cmpmask as if it has been initialized resulting in the cmpmask_and_set() not initializing the attach_count. For instance, if the uninitialized attach_count happens to be 0xffffffff, atomic_cmpmask_and_set() will not change the attach_count. This attach_count is allocated on the heap. Change-Id: Iaadc3f093287d965ff4d00f8d3f9c63ce596a6d4 Signed-off-by: Bryan Honza <honza@ti.com>
* syslink: devh: Fix build break with SYSLINK_RECOVERY disabledShivananda Hebbar2012-08-17
| | | | | | | | | | | | | | | | | | If we disable SYSLINK_RECOVERY option in drivers->syslink ->SYSLINK_RECOVERY, build breaks with below errors drivers/built-in.o: In function `devh_notification_handler': drivers/dsp/syslink/devh/44xx/devh44xx.c:103: undefined reference to `ipc_recover_schedule' drivers/built-in.o: In function `devh44xx_wdt_ipc_notifier_call': drivers/dsp/syslink/devh/44xx/devh44xx.c:244: undefined reference to `ipc_recover_schedule' make: *** [.tmp_vmlinux1] Error 1 Fixed by moving ipc_revover_schedule function under SYSLINK_RECOVERY Flag. Change-Id: Idb4de38bbe1e2586eebac9f76150616ea93d56f3 Signed-off-by: Shivananda Hebbar <x0hebbar@ti.com>
* syslink: ipc: store pid in ipc drivers private dataSubin K G2012-08-17
| | | | | | | | | | | Store the pid of process who call the ipc_open in it's private data so at the time of release it can use this to send death notification instead of using current pid whenever ipc release has been called. Change-Id: I86429112bd9668869ceeae43195309be2311ab5d Signed-off-by: Subin K G <subin.kg@ti.com> Signed-off-by: Fernando Guzman Lugo <fernando.lugo@ti.com>
* syslink: devh: use the pid passed to the devhSubin K G2012-08-17
| | | | | | | | | | | Instead of using the current pid use the pid passed to the devh.This is the required since the process who opens the driver handle (iommu, tiler, ipc),may not the one releasing the handle.And in turn devh will be giving the wrong pid to ipu pm. Change-Id: I153ef85cbc0b5d671b82cfa5f07bbb1e99c39531 Signed-off-by: Subin K G <subin.kg@ti.com>
* syslink: notify: add missing protection to register/unregisterFernando Guzman Lugo2012-08-17
| | | | | | | | There were parts not protected when register/unregister single events. Change-Id: I53d99659b91abbbcef66117bca7c37bf73e7aa97 Signed-off-by: Fernando Guzman Lugo <fernando.lugo@ti.com>
* syslink: notify: add a mutext to protect notify drivers_handlesFernando Guzman Lugo2012-08-17
| | | | | | | Add protection againts adding/removing notify drivers_handles. Change-Id: I53f391d97b9b115ac64d007cc0a0d8ef7cc80a3b Signed-off-by: Fernando Guzman Lugo <fernando.lugo@ti.com>
* syslink: ipc: unregister notify cbk before destroying transportshmFernando Guzman Lugo2012-08-17
| | | | | | | | | if you don't unregister the callback for notify events first, the transportshm object can be dereferenced in the callback causing a kerner panic. Change-Id: I0f55e2b5070bec7c617392b3080914c0372f98bf Signed-off-by: Fernando Guzman Lugo <fernando.lugo@ti.com>
* SYSLINK: ipu-pm ported changes specific for 2.6.38 vanilla l-o kernel.Subramaniam C.A2012-08-17
| | | | | | | | | | | | | | This patch adds vanilla l-o 2.6.38 specific changes. The patch might get redundant once the OMAP_PM specific changes/ baseport changes go in. Check the return value of kfifo_out ti avoid a warning Do not use any constraint req/rel since the fwk is not ready yet. Signed-off-by: Miguel Vadillo <vadillo@ti.com> Signed-off-by: Subramaniam C.A <subramaniam.ca@ti.com> Signed-off-by: Cris Jansson <cjansson@ti.com>
* syslink: ipu_pm: hack to sofreset iss & fdifMiguel Vadillo2012-08-17
| | | | | | | | | | | | | | | | After an iommufault iss and fdif need to be reset for the proper reuse of both. The proper api to call is _softreset() but for that sysc struct in hwmod needs to be enabled but that part is not ready. This is hack until the proper fix is done in sysc and the proper api can be used to softreset. Change-Id: I7568308bcd49697946a08a1b03b6a846dd0c9f5d Signed-off-by: Miguel Vadillo <vadillo@ti.com> Signed-off-by: Juan Gutierrez <jgutierrez@ti.com>
* SYSLINK: Use unlocked_ioctl instead of ioctlSubramaniam C.A2012-08-17
| | | | | | | This patch uses unlocked_ioctl instead of ioctl in all SysLink drivers. The support for ioctl was removed since BKL is not to be used anymore. Signed-off-by: Subramaniam C.A <subramaniam.ca@ti.com>
* SYSLINK: Migrate build changes for adding iommu-debug and enable hibernationSubramaniam C.A2012-08-17
| | | | | | | | | | This patch enables hibernation by default and also adds build support for iommu-debug.The patch is a port of these additions from 2.6.35 omap android kernel. Signed-off-by: Miguel Vadillo <vadillo@ti.com> Signed-off-by: Leed Aguilar <leed.aguilar@ti.com> Signed-off-by: C A Subramaniam <subramaniam.ca@ti.com>
* syslink: ipu_pm: fix ret in idle path after recoveryMiguel Vadillo2012-08-17
| | | | | | | | | | | | | | | | | | | After recovery the mechanism to release all the resources and constraints was not taking in to consideration the IPU that is created behind the scenes to handle the sys and app constraints and as a consequence all the constraints attached to it were not released leading to not hit retention in idle path. That IPU behind scenes is a special rcb slot that only has constraints; the fix is taking care of this case and releases only the constraints. If the IPU is explicitly requested then it will be consider as a normal resource. Change-Id: I49a7ab05912bcc4de4e61c223ba0f4dd4c7a2d83 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:iodmm-make dma call for flushing configurableHari Kanigeri2012-08-17
| | | | | | | 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>
* 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>
* 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: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>
* 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>