Commit Graph

14 Commits

Author SHA1 Message Date
Venkatesh Yadav Abbarapu 351c15ac8b ssbi: Update GENI firmware
Update Geni firmware to fix PVC write issues with SSBI2.

Change-Id: I94bebd1130865af23f9f305cba4724417e6cc217
Acked-by: Edward Rodrigues <erodrigu@qti.qualcomm.com>
Signed-off-by: Venkatesh Yadav Abbarapu <quicvenkat@codeaurora.org>
2014-07-14 18:27:14 +05:30
Venkatesh Yadav Abbarapu 34d8f16491 ssbi: Add null pointer check
Add null pointer check for ssbi_read and ssbi_write

Change-Id: I00d0547e5392d2dc079610f31e2e9d7e1ed4e199
Acked-by: Edward Rodrigues <erodrigu@qti.qualcomm.com>
Signed-off-by: Venkatesh Yadav Abbarapu <quicvenkat@codeaurora.org>
2014-05-28 18:23:09 +05:30
Rohit Vaswani fc53f4ff3c ssbi: Move ssbi struct to header file
Add support to use SSBI1 and SSBI2 from a single driver.

Change-Id: I673adc3633851dd76d2deb5ffbb4182ece578029
Acked-by: Edward Rodrigues <erodrigu@qti.qualcomm.com>
Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
2014-03-17 19:09:42 -07:00
Rohit Vaswani 7570a03a00 ssbi: Fix SSBI2 write bug
Fixed ssbi2.0 write by changing RD to WR

Change-Id: Id9048779d9026d6b085cf15f11a6722d828629c8
Acked-by: Edward Rodrigues <erodrigu@qti.qualcomm.com>
Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
2014-01-30 18:35:42 -08:00
Rohit Vaswani b7dceff43a ssbi: Add geni ssbi arbiter changes
These changes are needed to support new geni ssbi arbiter.

Change-Id: Id348e20e131ffba1fd8259b3b89b078dfa9d9ca2
Acked-by: Kaushik Sikdar <ksikdar@qti.qualcomm.com>
Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
2013-10-15 19:29:03 -07:00
David Brown ce44bf5b55 SSBI: Remove MSM_ prefix from SSBI drivers
Although the SSBI sub is currently only used on MSM SoCs, it is still
a bus in its own right.  Remove this msm_ prefix from the driver and
it's symbols.  Clients can now refer directly to ssbi_write() and
ssbi_read().

Signed-off-by: David Brown <davidb@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-25 10:39:40 -07:00
David Brown 37799ef4fa ssbi: Remove extraneous logging
Remove some unhelpful error logs.  This also removes the necessity of
having a pointer back to the struct device within the ssbi-specific
structure

Signed-off-by: David Brown <davidb@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-25 10:39:40 -07:00
David Brown 90f2d32ca5 ssbi: Use regular init level
With device tree, and deferred probe, it is no longer necessary to
make sure that the ssbi bus driver is initialized very early.  Restore
to a regular module_init().

Signed-off-by: David Brown <davidb@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-25 10:39:40 -07:00
David Brown 3f7a73b57c ssbi: Comment the use of udelay()
The ssbi driver uses a busywait loop to read its status register.  Add
a comment explaining the timing of the device itself so that future
developers can better understand this delay, and possibly diagnose any
problems.

Signed-off-by: David Brown <davidb@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-25 10:39:40 -07:00
David Brown 97f00f7120 SSBI: Convert SSBI to device tree
The SSBI bus is exclusive to the Qualcomm MSM targets, and all SoCs
using it will be using device tree.  Convert this driver to indentify
with device tree.

This makes the bus probing a good bit simpler, since the attaching of
child nodes can be represented directly in the devicetree, rather than
having to be inferred by name.

Signed-off-by: David Brown <davidb@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-25 10:39:40 -07:00
David Brown 4a6692e2ac ssbi: Allow compilation as a module
The ssbi driver's read/write entry points are protected with wrappers
in the case when the driver isn't enabled.  These wrappers don't make
any sense, since a client of the SSBI bus won't work without it.  Make
these just regular functions, so that the SSBI driver can be built as
a module.

Signed-off-by: David Brown <davidb@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-25 10:37:21 -07:00
David Brown 7b67d56108 ssbi: Fix exit mismatch in remove function
msm_ssbi_remove is referenced with __exit_p, but not declared with
__exit.  This causes a warning when the driver is not built as a
module:

drivers/ssbi/ssbi.c:341:23: warning: 'msm_ssbi_remove' defined but not used [-Wunused-function]

The remove is needed for unbinding to work, even if not compiled as a
module, so just remove it.

Signed-off-by: David Brown <davidb@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-25 10:37:21 -07:00
David Brown a1a906c572 fix: Use EXPORT_SYMBOL_GPL
Signed-off-by: David Brown <davidb@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-25 10:37:20 -07:00
Kenneth Heitke e44b0ceee4 add single-wire serial bus interface (SSBI) driver
SSBI is the Qualcomm single-wire serial bus interface used to connect
the MSM devices to the PMIC and other devices.

Since SSBI only supports a single slave, the driver gets the name of the
slave device passed in from the board file through the master device's
platform data.

SSBI registers pretty early (postcore), so that the PMIC can come up
before the board init. This is useful if the board init requires the
use of gpios that are connected through the PMIC.

Based on a patch by Dima Zavin <dima@android.com> that can be found at:
http://android.git.kernel.org/?p=kernel/msm.git;a=commitdiff;h=eb060bac4

This patch adds PMIC Arbiter support for the MSM8660. The PMIC Arbiter
is a hardware wrapper around the SSBI 2.0 controller that is designed to
overcome concurrency issues and security limitations.  A controller_type
field is added to the platform data to specify the type of the SSBI
controller (1.0, 2.0, or PMIC Arbiter).

[davidb@codeaurora.org:
 I've moved this driver into drivers/ssbi/ and added an include for
 linux/module.h so that it will compile]

Signed-off-by: Kenneth Heitke <kheitke@codeaurora.org>
Signed-off-by: David Brown <davidb@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-25 10:33:56 -07:00