Age | Commit message (Collapse) | Author |
|
This reverts commit 4cc9ecff8ed1912ea679dc71b03a32045d88946a.
|
|
This reverts commit a3df42492aa8c216e83ca9dd5f537c24de0089a8.
|
|
The version call uses a separate buffer to return the version string,
and this address needs to be translated and sent via RPC.
To avoid breaking backwards compatibility, a new ioctl is used.
|
|
|
|
Signed-off-by: Andy Green <andy.green@linaro.org>
|
|
|
|
Signed-off-by: Andy Green <andy.green@linaro.org>
Signed-off-by: Vincent Stehlé <v-stehle@ti.com>
|
|
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
|
|
The error handling code w.r.t. idr usage looks inconsistent.
In the case of drm_mode_object_get() and drm_ctxbitmap_next() the error
handling is also incomplete.
Unify the code to follow the same pattern always.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
|
|
Do not leak memory by updating pointer with potentially
NULL realloc return value.
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Reviewed-by: Carsten Emde <C.Emde@osadl.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
|
|
|
|
The omap remoteproc driver, being a user of mailbox, needs to take
care of enabling/disabling mailbox properly in the pm resume/suspend
paths. This will allow the mailbox driver to save its context and
release any constraints in the disable path, and restore them back
in the enable path.
Change-Id: I0e33bf57b17eacc23e7374f07351b8e92626f3b2
Signed-off-by: Subramaniam Chanderashekarapuram <subramaniam.ca@ti.com>
|
|
Signed-off-by: Xavier Boudet <x-boudet@ti.com>
|
|
Signed-off-by: Xavier Boudet <x-boudet@ti.com>
|
|
The default CMA carveout size for DSP has been increased from
5MB to 7MB to accomodate adding new libraries to the DSP product
base-image. This change does not require any change in the CMA
start addresses as the increase is still within the CMA-aligned
8MB.
Change-Id: I7c0c81c6cbd7f29588c82b1a40079032364b31f2
Signed-off-by: Suman Anna <s-anna@ti.com>
|
|
The default CMA carveout size for OMAP4 IPU has been increased from
104MB to 106MB to allow the IPU heap to be increased by the same
amount. This change is being done to resolve failures in various
multimedia usecases due to heap memory exhaustion.
Change-Id: Iecc722a5871747dc0280e43b88cd57b16d43459d
Signed-off-by: Suman Anna <s-anna@ti.com>
|
|
The CMA carveout sizes used for OMAP4 & OMAP5 targets are
stale and outdated. These do not match the current memory
regions defined in the BIOS-side remote processor platform
files.
The IPU carveout sizes are adjusted to the correct sizes
after reducing an additional 1MB region used in older kernel
for secure usecases. The DSP carveout size is adjusted to
actually include the two separate 1MB regions used for the
IPC VRING & IPC DATA sections instead of a single 1MB as used
for both in the previous kernel.
This mismatch didn't cause any major issues because of the
8MB alignment enforced during the definition of the CMA regions.
Change-Id: I778d4bccbac44008873e6113a174de3cd75441a6
Signed-off-by: Suman Anna <s-anna@ti.com>
|
|
|
|
|
|
DSP firmware doesn't support context losses so we prevent the DSP
power domain from going Closed Switch Retention state.
Signed-off-by: Roger Quadros <rogerq@ti.com>
|
|
This patch fixes the following warnings if CONFIG_DMA_SHARED_BUFFER and
CONFIG_OMAP_ION are not enabled.
drivers/rpmsg/rpmsg_omx.c: In function '_rpmsg_omx_buffer_get':
drivers/rpmsg/rpmsg_omx.c:244: warning: unused variable 'omxserv'
drivers/rpmsg/rpmsg_omx.c: In function '_rpmsg_omx_buffer_put':
drivers/rpmsg/rpmsg_omx.c:287: warning: unused variable 'omxserv'
drivers/rpmsg/rpmsg_omx.c: At top level:
drivers/rpmsg/rpmsg_omx.c:143: warning: '_rpmsg_pa_to_da' defined but not used
Signed-off-by: Roger Quadros <rogerq@ti.com>
|
|
Since we support only one attach at a time, we can
simplify the reference counting code by incrementing
the refcount only if it was the first successful attach and
decrementing it on a successful detach.
So refcount can either be 0 or 1. This makes code much simpler.
Signed-off-by: Roger Quadros <rogerq@ti.com>
|
|
The call to iommu_enable/disable() which in turn calls
pm_runtime_get/put() take care of setting/resetting the pm_qos
constraints. This patch removes the unnecessary pm_qos calls.
Signed-off-by: Roger Quadros <rogerq@ti.com>
|
|
A latency constraint could be used to ensure that a device responds
within the latency value specified.
The dev_pm_qos and the pm_qos apis provide a way to set latency
constraints. Specifically, the dev_pm_qos can be used to hold
latency constraints on power domains other than core, while the
pm_qos API is used for core power domain.
The iommu module could transition to a lower power state anytime
after it is powered up depending on the activity associated with it.
The MMUs associated with DSP and IPU processor subsystems would lose
their context in OSWR and lower power states. A transition to such
power state could cause the remoteproc to behave in an unpredictable
way (AMMU fault or MMU fault due to loss of MMU register context). A
latency constraint is therefore enforced on the power domain
containing the iommu to preserve its context.
Signed-off-by: Subramaniam Chanderashekarapuram <subramaniam.ca@ti.com>
Signed-off-by: Paul Hunt <hunt@ti.com>
Signed-off-by: Fernando Guzman Lugo <fernando.lugo@ti.com>
Signed-off-by: Suman Anna <s-anna@ti.com>
|
|
The iommu, being part of the remoteproc, needs to be controlled
by the remoteproc for sleep transitions too. The associated iommu
can be put to a lower power state for sleep transitions that
happen for the remoteproc.
Helper functions that call the idle and activate functions on the
iommu domain have been implemented, and called appropriated in the
regular and runtime suspend and resume functions of a remoteproc.
Signed-off-by: Paul Hunt <hunt@ti.com>
Signed-off-by: Fernando Guzman Lugo <fernando.lugo@ti.com>
Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
Signed-off-by: Subramaniam Chanderashekarapuram <subramaniam.ca@ti.com>
|
|
The MMU registers for the remote processors lose their context
in Open Switch Retention (OSWR) or device OFF modes. Hence, the
context of the iommu needs to be saved before it is put to these
lower power state (OSWR/OFF) and restored before it is powered
up to ON again.
Device OFF support for omap iommu domain is implemented through
the .domain_activate and .domain_idle iommu ops. These in turn
call pm_runtime_get_sync and pm_runtime_put on the iommu device.
The PM runtime_suspend and runtime_resume callbacks are registered
with the driver. The IOMMU context is saved through the arch-specific
save context function in the pm_runtime_suspend callback function,
and restored through the existing arch-specific enable function in
the pm_runtime_resume callback.
NOTE: The current implementation is based on the assumption that
are no locked TLBs in use. Logic for saving and restoring locked
TLBs will be added in a future patch.
Signed-off-by: Paul Hunt <hunt@ti.com>
Signed-off-by: Fernando Guzman Lugo <fernando.lugo@ti.com>
Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
Signed-off-by: Subramaniam Chanderashekarapuram <subramaniam.ca@ti.com>
Signed-off-by: Suman Anna <s-anna@ti.com>
|
|
The MMUs associated with processors can reside in different power
domains, and may need the context to be saved when the associated
power domain is being put into OFF state.
Two new functions, iommu_domain_activate and iommu_domain_idle have
been added to the iommu domain, and call into the individual drivers
through a corresponding iommu_ops function. These functions allow the
individual driver implementations to perform the necessary operations
to preserve and restore the context of the iommu devices.
Signed-off-by: Paul Hunt <hunt@ti.com>
Signed-off-by: Fernando Guzman Lugo <fernando.lugo@ti.com>
Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
Signed-off-by: Subramaniam Chanderashekarapuram <subramaniam.ca@ti.com>
Signed-off-by: Suman Anna <s-anna@ti.com>
|
|
The OMAP rpmsg driver is currently getting the struct clk handle for
the ISS optional clock through the omap_get_clk_by_name function. This
function is currently not exported, and causes a build error if
omap_rpmsg_resmgr were to be built as a module. This function call is
moved to the mach-omap2/rpmsg_resmgr.c which is always built-in, and
the ISS optional clock struct clk is published to the generic rpmsg
omap resmgr layer through platform data to its omap driver.
Signed-off-by: Fernando Guzman Lugo <fernando.lugo@ti.com>
Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Roger Quadros <rogerq@ti.com>
|
|
No PDM clock output is generated when operating in cold temperatures.
The suggested workaround consists of resetting LPPLL and HPPLL after
Sleep/Deep-Sleep mode transitions, before entering in application
mode.
Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
Signed-off-by: Sebastien Jan <s-jan@ti.com>
|
|
Because of OMAP4 Silicon errata (i705), we have to turn off the
PBIAS and VMMC for SD card as soon as we get card disconnect
interrupt. Because of this, we don't wait for all higher layer
structures to be dismantled before turning off power. As a side
effect of this, we might end up getting a mmc_request
even after SD is removed and VMMC and PBIAS are turned off.
In that case, just fail the mmc_request and return immediately
Signed-off-by: Viswanath Puttagunta <vishp@ti.com>
Signed-off-by: Sebastien Jan <s-jan@ti.com>
|
|
Turning off IO & PBIAS cells and then SD card VMMC
as soon as we get disconnect interrupt. Failure to do
so is causing current spikes (latch-up issue)which
can potentially burn the I/O cells.
Enabled Debounce logic in TWL6030 so that erroneous
disconnect/connect interrupts will be suppressed.
This will also fix issue where SD card disconnect
event was not getting detected when SD card is very
slowly plugged out.
Signed-off-by: Viswanath Puttagunta <vishp@ti.com>
Conflicts:
drivers/mfd/twl6030-irq.c
drivers/mmc/host/omap_hsmmc.c
Signed-off-by: Sebastien Jan <s-jan@ti.com>
|
|
From OMAP4430 ES2.0 onwards if uart is configured in dma mode we need to set
uart tx threshold value using the new register UART_TX_DMA_THRESHOLD, this
register can used if UART_MDR3 bit(2) is set. We have to ensure
tx_threshold + tx_trigger <= 63 from es2.0 onwards. By default we are using
tx_trigger of 1 so we can set threshold to 62 to satisfy above criteria.
Without the threshold setting we hit dma_sync lost errors on tx channel
leading to data loss on rx side
Signed-off-by: Govindraj.R <govindraj.raja@ti.com>
Signed-off-by: Sebastien Jan <s-jan@ti.com>
|
|
|
|
Patch History (squashed), contributors initials follow history.
omaprpc: Adding OMAP Remote Procedure Call Driver to staging area of kernel. [ER]
omaprpc: Adding defines for CONFIG_DRM_OMAP and isolating Android parts. [ER]
omaprpc: Latest commit, compiles and produces a working kernel, no ducati/tesla to test with. [ER]
omaprpc: Added dependency on DMA_SHARED_BUFFER and changed some dev_info prints. [ER]
omaprpc: fixing omaprpc makefile to build omap_rpc.c. [GA]
omaprpc: commenting some debug in omap_rpc_dmabuf.c that doesn't compile. [GA]
omaprpc: enable OMAPRPC_INFO debug messages. [GA]
omaprpc: changing char dev creation procedure. [GA]
create_device() is now called in the probe() function.
omaprpc_device_create() and omaprpc_driver_cb() are commented, because not compiling.
omaprpc: fixing char dev name [GA]
omaprpc: renaming iMX to SIMCOP [ER]
omaprpc: Added dynamic dev node naming back, updated header files. kmaps still do not work correctly [AA][ER]
omaprpc: Added safety code to make sure dma_bufs behave well. Adjusted ranges for cpu_access [ER]
omaprpc: Updates to copyright and MODULE_DEVICE_TABLE. Also removed unneeded header [ER]
omaprpc: Fixes from Android [ER][AA]
omaprpc: Unified OMAP Remote Procedure Call Driver [ER]
omaprpc: Fixes to coding style [ER]
omaprpc: Added bootargs debug flag [ER]
omaprpc: Changed some formatting for readibility [ER]
omaprpc: Fix to forcefully unpin all dmabufs after a transaction [ER]
Signed-off By: Erik Rainey <erik.rainey@ti.com>
Signed-off By: Guillaume Aubertin <g-aubertin@ti.com>
Signed-off By: Alberto Aguirre <a-aguirre@ti.com>
Signed-off-by: Xavier Boudet <x-boudet@ti.com>
|
|
request_firmware() can return immediately e.g. if firmware file
is not present. Sleep before retrys so that we don't hog the
CPU if firmware is not available.
This patch also prevents console flooding with WARNINGS if the firmware
does not exist and the system is suspended.
[ 37.491149] ------------[ cut here ]------------
[ 37.491149] WARNING: at drivers/base/firmware_class.c:597 request_firmware+0x58/0xcc()
[ 37.491149] Modules linked in: omap_remoteproc remoteproc omap_rpmsg_resmgr rpmsg_resmgr virtio_rpmsg_bus arc4 wl12xx wlcore mac80211 cfg80211 wlcore_sdio
[ 37.491180] Backtrace:
[ 37.491180] [<c0012cb0>] (dump_backtrace+0x0/0x118) from [<c0497af0>] (dump_stack+0x20/0x24)
[ 37.491180] r6:c05d7c73 r5:00000255 r4:00000000 r3:00000000
[ 37.491210] [<c0497ad0>] (dump_stack+0x0/0x24) from [<c003e4f4>] (warn_slowpath_common+0x5c/0x74)
[ 37.491210] [<c003e498>] (warn_slowpath_common+0x0/0x74) from [<c003e538>] (warn_slowpath_null+0x2c/0x34)
[ 37.491241] r8:ed73e200 r7:fffffff5 r6:ed698c28 r5:c05b7e54 r4:edb57f8c
[ 37.491241] r3:00000009
[ 37.491241] [<c003e50c>] (warn_slowpath_null+0x0/0x34) from [<c02bcf20>] (request_firmware+0x58/0xcc)
[ 37.491271] [<c02bcec8>] (request_firmware+0x0/0xcc) from [<bf109d1c>] (rproc_loader_thread+0x74/0xf0 [remoteproc])
[ 37.491271] r8:ed698c30 r7:ffffb2a4 r6:ed698c28 r5:ed698c00 r4:fffffff5
[ 37.491302] [<bf109ca8>] (rproc_loader_thread+0x0/0xf0 [remoteproc]) from [<c005d900>] (kthread+0x98/0xa4)
[ 37.491333] r8:00000000 r7:bf109ca8 r6:edb57fc4 r5:ed698c00 r4:ed6f1da8
[ 37.491333] [<c005d868>] (kthread+0x0/0xa4) from [<c00425a8>] (do_exit+0x0/0x78c)
[ 37.491363] r7:00000013 r6:c00425a8 r5:c005d868 r4:ed6f1da8
[ 37.491363] ---[ end trace 267d532979540df3 ]---
Signed-off-by: Roger Quadros <rogerq@ti.com>
|
|
The remoteproc driver gets notified of a Watchdog error or a MMU Fault
directly through an interrupt, and other internal exceptions through
a mailbox message. The remote processors can also get an interrupt for
printing the back trace for all exceptions, and may end up in sending
a exception mailbox message for the same error to the kernel-side.
However, the error handler thread has to handle only the first error
and bail out if the processing of the first error message is still
ongoing. A check has therefore been added to verify that the rproc
state is not already RPROC_CRASHED or RPROC_OFFLINE.
Change-Id: If44432fe245dd733a7e7ce29128eed00eb921f49
Signed-off-by: Fernando Guzman Lugo <fernando.lugo@ti.com>
Signed-off-by: Suman Anna <s-anna@ti.com>
|
|
The last trace is a way of preserving the remoteproc traces past
remoteproc recovery. This is achieved by creating a new last_trace
debugfs entry during a crash for each trace entry, and copying the
trace buffer contents into the corresponding last trace entry. This
copy can then be read out using a debugfs entry. The trace entries
themselves are cleaned up after the copy and are recreated during
recovery.
Something like,
cat <debugfs root>/remoteproc/remoteprocX/traceX_last
should give the traces that were printed out just before the recovery
happened.
Change-Id: I2d6879421022a895dc34dfcc5c003ff33779128c
Signed-off-by: Subramaniam Chanderashekarapuram <subramaniam.ca@ti.com>
Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Fernando Guzman Lugo <fernando.lugo@ti.com>
|
|
Remote processors can be stuck in a loop, and may not be recoverable
if they do not have a built-in watchdog. The watchdog implementation
for OMAP remote processors uses external gptimers that can be used
to interrupt both the Linux host as well as the remote processor.
Each remote processor is responsible for refreshing the timer during
normal behavior - during OS task scheduling or entering the idle loop
properly. During a watchdog condition (executing a tight loop causing
no scheduling), the host processor gets interrupts and schedules a
recovery. The remote processor also gets interrupted to be able to
print a back trace
A menuconfig option has also been added to disable the Watchdog
functionality. This is useful for any JTAG debugging.
Change-Id: Ide8c137ec3df020e90b7b73b370aa2a1d65023ad
Signed-off-by: Subramaniam Chanderashekarapuram <subramaniam.ca@ti.com>
Signed-off-by: Shahid Akhtar <sakhtar@ti.com>
Signed-off-by: Fernando Guzman Lugo <fernando.lugo@ti.com>
Signed-off-by: Suman Anna <s-anna@ti.com>
|
|
There is a minor cleanup bug in the omap remoteproc driver start
code, where in the timers are not released if the device_enable
fails. The same has been fixed.
Some other minor comments have also been corrected.
Change-Id: I24561c4988a31241accf289f1ea23af7e3bdd253
Signed-off-by: Subramaniam Chanderashekarapuram <subramaniam.ca@ti.com>
Signed-off-by: Suman Anna <s-anna@ti.com>
|
|
The omap remoteproc driver detects device exceptions when a mailbox
crash message is sent by the remote core.
The omap remoteproc driver notifies the remoteproc core using the
rproc_error_reporter function to trigger a recovery in the event
of any device exceptions.
Change-Id: Ief557c7d34b28011bc520b0412752c5d28fce37d
Signed-off-by: Subramaniam Chanderashekarapuram <subramaniam.ca@ti.com>
|
|
This patch introduces two new error types for watchdog and
device exception.
Change-Id: Iad3aeb887427b43554bf6f83c17b600eceee0b17
Signed-off-by: Subramaniam Chanderashekarapuram <subramaniam.ca@ti.com>
|
|
The rproc_error_reporter function is currently being used to
report MMU faults and trigger a recovery. This is internal to
the remoteproc framework.
However, the function can be used to report errors other than
just iommu faults, like errors that a remoteproc detects and
notifies the remoteproc driver. The rproc_error_reporter
function therefore is now exported to allow other clients to
report an error.
Change-Id: Ib4efd8a70e2ae745afbaaea5bca11f33ba07ad0a
Signed-off-by: Subramaniam Chanderashekarapuram <subramaniam.ca@ti.com>
|
|
The omap remoteproc driver expects the bandwidth API (for memory
throughput requests) to be defined by the device platform data.
This is no longer required since the pm_qos API would be used
for requesting the same.
The patch removes the machine specific calls for throughput and
calls the pm_qos APIs from the omap remoteproc driver.
Change-Id: Iad71a08017171c818915963963099a576af040f9
Signed-off-by: Subramaniam Chanderashekarapuram <subramaniam.ca@ti.com>
|
|
The rpmsg_recv_done is the rpmsg transport layer function that
processes/retrieves the incoming messages from the rx virtqueue ring.
This function currently executes in a kthread context, and as such
can be preempted and deliver messages out of order w.r.t to the msg
order in the rx virtqueue ring. This can cause the state machine of
a recipient to go haywire.
The receive buffers delivery is serialized by locking the entire
routine.
Change-Id: I48d1a5bd6f6ec84103e6e8b3e7b92e81b060be12
Signed-off-by: Chandra Sekhar.Anagani <chandu@ti.com>
Signed-off-by: Suman Anna <s-anna@ti.com>
|
|
Support data request from remote processor. Currently only
maximum frequency query is available for ivahd, iss and fdif.
Change-Id: I9bc19f2a299e5756648b0e38aae25e7ce4ac6b02
Signed-off-by: Juan Gutierrez <jgutierrez@ti.com>
Signed-off-by: Paul Hunt <hunt@ti.com>
Signed-off-by: Fernando Guzman Lugo <fernando.lugo@ti.com>
|
|
The rpmsg resmgr driver expects the bandwidth API (for memory
throughput requests) to be defined by the device platform data.
This is no longer required since the pm_qos API would be used
for requesting memory throughput.
The patch removes the mach specific calls for throughput and
invokes the pm_qos APIs from the omap rpmsg resmgr driver for
all resources that support/require memory throughput on the
L3 bus.
Change-Id: I02c4ee51bdca99c62b02d0f2b7b5559098c63089
Signed-off-by: Subramaniam Chanderashekarapuram <subramaniam.ca@ti.com>
|
|
The _device_scale function in the rpmsg omap resmgr code was stubbed
out previously as DVFS framework was not available in the kernel. This
would be used by resources such as IVA and FDIF to request a frequency
scale constraint. The DVFS code/framework implementation has been
added lately, and the stubbed code has therefore been cleaned up to
allow the _device_scale to actually call the .device_scale ops hook
registered through the platform data.
Change-Id: If8154a99fbcf4d7ddb200e0fae5215ea398912e2
Signed-off-by: Subramaniam Chanderashekarapuram <subramaniam.ca@ti.com>
|
|
The timers associated with a remoteproc need to be running only
when the processor is active and executing, and need to be stopped
otherwise to allow the timer driver to reach low-power states. The
timers therefore are stopped and restarted appropriately in the
remoteproc's suspend and resume callbacks.
Signed-off-by: Subramaniam Chanderashekarapuram <subramaniam.ca@ti.com>
|
|
rdaemon uses a simple implementation of rpmsg to communicate
with a remotecore that instantiates the RTSC rdaemon library.
|
|
This reverts commit 180b5c412a6e2baad34bb8776f7c423b74582ad9.
|