slimbus: Use physical address type where physical address is used

Use physical address type for buffers using physical address.
(e.g. interaction with data-mover engine)

Change-Id: If0c02f13562c762c6effcea82a1e3c351ec2e288
Signed-off-by: Sagar Dharia <sdharia@codeaurora.org>
This commit is contained in:
Sagar Dharia 2014-02-07 19:40:12 -07:00
parent 0bd06ffe30
commit 1f66f596a0
4 changed files with 15 additions and 15 deletions

View File

@ -305,7 +305,7 @@ void msm_dealloc_port(struct slim_controller *ctrl, u8 pn)
}
enum slim_port_err msm_slim_port_xfer_status(struct slim_controller *ctr,
u8 pn, u8 **done_buf, u32 *done_len)
u8 pn, phys_addr_t *done_buf, u32 *done_len)
{
struct msm_slim_ctrl *dev = slim_get_ctrldata(ctr);
struct sps_iovec sio;
@ -313,7 +313,7 @@ enum slim_port_err msm_slim_port_xfer_status(struct slim_controller *ctr,
if (done_len)
*done_len = 0;
if (done_buf)
*done_buf = NULL;
*done_buf = 0;
if (!dev->pipes[pn].connected)
return SLIM_P_DISCONNECT;
ret = sps_get_iovec(dev->pipes[pn].sps, &sio);
@ -321,7 +321,7 @@ enum slim_port_err msm_slim_port_xfer_status(struct slim_controller *ctr,
if (done_len)
*done_len = sio.size;
if (done_buf)
*done_buf = (u8 *)sio.addr;
*done_buf = (phys_addr_t)sio.addr;
}
dev_dbg(dev->dev, "get iovec returned %d\n", ret);
return SLIM_P_INPROGRESS;
@ -346,7 +346,7 @@ static void msm_slim_port_cb(struct sps_event_notify *ev)
complete(comp);
}
int msm_slim_port_xfer(struct slim_controller *ctrl, u8 pn, u8 *iobuf,
int msm_slim_port_xfer(struct slim_controller *ctrl, u8 pn, phys_addr_t iobuf,
u32 len, struct completion *comp)
{
struct sps_register_event sreg;
@ -366,7 +366,7 @@ int msm_slim_port_xfer(struct slim_controller *ctrl, u8 pn, u8 *iobuf,
dev_dbg(dev->dev, "sps register event error:%x\n", ret);
return ret;
}
ret = sps_transfer_one(dev->pipes[pn].sps, (u32)iobuf, len, comp,
ret = sps_transfer_one(dev->pipes[pn].sps, iobuf, len, comp,
SPS_IOVEC_FLAG_INT);
dev_dbg(dev->dev, "sps submit xfer error code:%x\n", ret);
if (!ret) {

View File

@ -310,8 +310,8 @@ int msm_alloc_port(struct slim_controller *ctrl, u8 pn);
void msm_dealloc_port(struct slim_controller *ctrl, u8 pn);
int msm_slim_connect_pipe_port(struct msm_slim_ctrl *dev, u8 pn);
enum slim_port_err msm_slim_port_xfer_status(struct slim_controller *ctr,
u8 pn, u8 **done_buf, u32 *done_len);
int msm_slim_port_xfer(struct slim_controller *ctrl, u8 pn, u8 *iobuf,
u8 pn, phys_addr_t *done_buf, u32 *done_len);
int msm_slim_port_xfer(struct slim_controller *ctrl, u8 pn, phys_addr_t iobuf,
u32 len, struct completion *comp);
int msm_send_msg_buf(struct msm_slim_ctrl *dev, u32 *buf, u8 len, u32 tx_reg);
u32 *msm_get_msg_buf(struct msm_slim_ctrl *dev, int len);

View File

@ -1469,7 +1469,7 @@ EXPORT_SYMBOL_GPL(slim_disconnect_ports);
* Client will call slim_port_get_xfer_status to get error and/or number of
* bytes transferred if used asynchronously.
*/
int slim_port_xfer(struct slim_device *sb, u32 ph, u8 *iobuf, u32 len,
int slim_port_xfer(struct slim_device *sb, u32 ph, phys_addr_t iobuf, u32 len,
struct completion *comp)
{
struct slim_controller *ctrl = sb->ctrl;
@ -1499,7 +1499,7 @@ EXPORT_SYMBOL_GPL(slim_port_xfer);
* processed from the multiple transfers.
*/
enum slim_port_err slim_port_get_xfer_status(struct slim_device *sb, u32 ph,
u8 **done_buf, u32 *done_len)
phys_addr_t *done_buf, u32 *done_len)
{
struct slim_controller *ctrl = sb->ctrl;
u8 pn = SLIM_HDL_TO_PORT(ph);
@ -1512,7 +1512,7 @@ enum slim_port_err slim_port_get_xfer_status(struct slim_device *sb, u32 ph,
*/
if (la != SLIM_LA_MANAGER) {
if (done_buf)
*done_buf = NULL;
*done_buf = 0;
if (done_len)
*done_len = 0;
return SLIM_P_NOT_OWNED;

View File

@ -569,10 +569,10 @@ struct slim_controller {
int (*framer_handover)(struct slim_controller *ctrl,
struct slim_framer *new_framer);
int (*port_xfer)(struct slim_controller *ctrl,
u8 pn, u8 *iobuf, u32 len,
u8 pn, phys_addr_t iobuf, u32 len,
struct completion *comp);
enum slim_port_err (*port_xfer_status)(struct slim_controller *ctr,
u8 pn, u8 **done_buf, u32 *done_len);
u8 pn, phys_addr_t *done_buf, u32 *done_len);
int (*xfer_user_msg)(struct slim_controller *ctrl,
u8 la, u8 mt, u8 mc,
struct slim_ele_access *msg, u8 *buf, u8 len);
@ -802,8 +802,8 @@ extern int slim_dealloc_mgrports(struct slim_device *sb, u32 *hdl, int hsz);
* Client will call slim_port_get_xfer_status to get error and/or number of
* bytes transferred if used asynchronously.
*/
extern int slim_port_xfer(struct slim_device *sb, u32 ph, u8 *iobuf, u32 len,
struct completion *comp);
extern int slim_port_xfer(struct slim_device *sb, u32 ph, phys_addr_t iobuf,
u32 len, struct completion *comp);
/*
* slim_port_get_xfer_status: Poll for port transfers, or get transfer status
@ -825,7 +825,7 @@ extern int slim_port_xfer(struct slim_device *sb, u32 ph, u8 *iobuf, u32 len,
* processed from the multiple transfers.
*/
extern enum slim_port_err slim_port_get_xfer_status(struct slim_device *sb,
u32 ph, u8 **done_buf, u32 *done_len);
u32 ph, phys_addr_t *done_buf, u32 *done_len);
/*
* slim_connect_src: Connect source port to channel.