Commit graph

16 commits

Author SHA1 Message Date
Duy Truong
04e554807c Update copyright to The Linux Foundation
Change-Id: Ibead64ce2e901dede2ddd1b86088b88f2350ce92
Signed-off-by: Duy Truong <dtruong@codeaurora.org>
2013-03-15 17:07:39 -07:00
Sagar Dharia
2b1883b70d slim: msm: Control interface clock if it's specified
Some platforms (e.g. 8974) have interface clock that is not ON by
default. Turn it ON during probe, and control it like core clock
if it needs to be controlled.

Change-Id: Ifffb4b7ea9afb5f3f1208b4b2b6638594ffca541
Signed-off-by: Sagar Dharia <sdharia@codeaurora.org>
(cherry picked from commit debc8b75c650751d6e2cd4e5565faed384758446)

Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
(cherry picked from commit 89d628644c5241a5ec37b6d7cceda3ae0ec978e5)
2013-03-07 15:20:02 -08:00
SathishKumar Mani
69428d8c04 slim_msm: Retry initial sequence messages
Initial sequence messages (logical address assignment, and master
capability message) are very important messages to enable the
devices. It is possible that the device may NACK these messages
initially if it is in process of acquiring sync.
If these type of messages fail, retry a few times before actually
deeming the device unresponsive. Log the registers in case of NACKs
to better analyze the reason.

Signed-off-by: SathishKumar Mani <smani@codeaurora.org>
2013-03-04 12:48:01 -08:00
SathishKumar Mani
6a232d83c9 slimbus: Avoid same channel definition, removal in same sequence
Do not add the channel removal request to the remove list
when the client sends it right after the channel definition
without sending reconfigure_now request. Also remove the
channel define request from define list. This avoids
channel definition count being inconsistent, which may
lead to slimbus driver going into wrong state.

Signed-off-by: SathishKumar Mani <smani@codeaurora.org>
2013-03-04 12:48:01 -08:00
SathishKumar Mani
2758b94dea slim_msm: Satellite channel should not be deallocated more than once
It is possible that satellite channel deallocation is requested more
than once. (e.g. if the satellite times out waiting for response from
previous removal, then it will request removal again during
channel deallocation from its side).
Make sure that does not result in deallocating the channel more than
once.

Signed-off-by: SathishKumar Mani <smani@codeaurora.org>
2013-03-04 12:48:00 -08:00
SathishKumar Mani
68ec8f921e slimbus: clear slimbus read transaction if synchronous read fails
Failed read transaction is removed from the table of active transactions if the
transaction fails.

Signed-off-by: SathishKumar Mani <smani@codeaurora.org>
Signed-off-by: Iliyan Malchev <malchev@google.com>
2013-03-04 12:47:59 -08:00
ehgrace.kim
f0f3c48835 mako: slimbus: fix the duplicated slimbus code
There were duplicated codes to check whether there are pending changes

Change-Id: I4554c6be94c42f236f487e335fa1dbe71b970c12
2013-03-04 12:47:04 -08:00
Ajay Dudani
2e7182dd46 slimbus: Decrement channel reference during reconfigure now
Slimbus clients can specify multiple add/remove channel requests
through control_ch API, followed by reconfiguration request (also
known as "commit request"). Clients may rely on the reconfiguration
request to actuate the channel activation/removal and not the
control-channel API.
So the channel reference should be decremented during reconfiguration
request, and not control_ch API.

CRs-Fixed: 389518
Change-Id: Id6ff57c6a4cad878e35004937fb08daf3b9afe7b
Signed-off-by: Sagar Dharia <sdharia@codeaurora.org>

Conflicts:

	drivers/slimbus/slimbus.c

Signed-off-by: Ajay Dudani <adudani@codeaurora.org>
2013-03-04 12:44:18 -08:00
Ajay Dudani
53b5d2616b slim_msm: Keep track of satellite reconfiguring a channel
With mutiple clients able to use the same channel, it is not correct
assumption that a channel was active due to satellite client's
reconfiguration only. So during sub-system restart of a satellite,
rely on satellite-reconfiguration vote for a channel instead of
channel status to remove channels that were setup by the satellite
before sub-system restart.

CRs-Fixed: 389514
Change-Id: I825381f15cb55396fece5b390d395c7f0a7580ff
Signed-off-by: Sagar Dharia <sdharia@codeaurora.org>
Signed-off-by: Ajay Dudani <adudani@codeaurora.org>
2013-03-04 12:44:17 -08:00
ehgrace.kim
aa2a2a6772 slim_msm: don't call completion after timeout
making the completion pointer to NULL, if the timeout
occurs before firing the interrupt. This is to avoid
calling the complete function from the interrupt
handler, if the interrupt fires after completion
timeout. It's from QCT

Change-Id: I31d4a74297e670711041d866de55e1b5350575c1
2013-03-04 12:43:56 -08:00
Sagar Dharia
9bde29db50 slimbus: Fix channel concurrent usage during reconfiguration sequence
Reconfiguration sequence can lead to changes in channel segment
distribution and state. Since multiple clients can use 1 channel,
make sure channels cannot be manipulated when reconfiguration
sequence is in progress, and make sure that client doesn't send
reconfiguration sequence when no changes are pending to be sent
in the sequence from it.

CRs-Fixed: 383406
Change-Id: Ib5f0bc32f67f51f118fa417a2e580c8dc87ef0d0
Signed-off-by: Sagar Dharia <sdharia@codeaurora.org>
2013-02-27 18:19:21 -08:00
Sagar Dharia
450560c84c slim:msm: Change to register access for RX path if required
MSM controller for slimbus usually uses a BAM pipe to receive control
data. However, some targets may not have a BAM pipe assinged for
receiving this data. In that case, RX data should be received using
direct register access instead.
Introduce a Device-Tree property to change this access.

Change-Id: I9bb1502f25e0e855937bc6fb4131f55348d04794
Signed-off-by: Sagar Dharia <sdharia@codeaurora.org>
2013-02-27 18:19:06 -08:00
Sagar Dharia
6823fb1a04 slimbus: Export clock pause function
Previously this function was left-out to be exported by mistake.
Exporting the function helps any caller driver to be a module.

Change-Id: I2b9caca62821caea5ae92123689c6f8ddf2b207a
Signed-off-by: Sagar Dharia <sdharia@codeaurora.org>
2013-02-27 18:18:42 -08:00
Sagar Dharia
052a7438a8 slimbus: Disconnect source port if source end is removed by client
If source end of a channel removes its vote, it should be allowed to
be reclaimed by other client (or by other source port by same client)
who wants to be the source for this channel.

CRs-Fixed: 376731
Change-Id: Ia30c6a4b07de7df98cde8bc928205b4f4598036d
Signed-off-by: Sagar Dharia <sdharia@codeaurora.org>
2013-02-27 18:17:11 -08:00
Sagar Dharia
e82e79bf76 slimbus: Modify check for empty slots
There was a corner case where the open slot count was going -ve
indicating that there are no slots left for messaging. The current
check to ensure non-zero messaging slots does not take that into
account. This commit fixes that check.

CRs-fixed: 370229
Change-Id: I832ce0a26f1919d3d03b4ef0311603a5a778685e
Signed-off-by: Sagar Dharia <sdharia@codeaurora.org>
2013-02-27 18:13:27 -08:00
David Brown
3db739bbbc slimbus: Add Qualcomm Slimbus driver
Signed-off-by: David Brown <davidb@codeaurora.org>
2013-02-25 11:32:56 -08:00