diff options
author | Sumit Semwal <sumit.semwal@linaro.org> | 2020-06-05 17:21:18 +0530 |
---|---|---|
committer | Sumit Semwal <sumit.semwal@linaro.org> | 2020-07-23 20:51:36 +0530 |
commit | 51a800d18eae089956e0ffb5194f6e7f05c16f19 (patch) | |
tree | 21d5e285a49b38b40f1972d803e117d3fe32e343 /drivers | |
parent | 8c97a81b630920fc38dbe24937063c3763d53beb (diff) |
of-dma: some debugs
Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>
Change-Id: I8c1902a6bff9ab990576e506688147e3844872a5
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/dma/of-dma.c | 14 | ||||
-rw-r--r-- | drivers/i2c/busses/i2c-qcom-geni.c | 7 |
2 files changed, 13 insertions, 8 deletions
diff --git a/drivers/dma/of-dma.c b/drivers/dma/of-dma.c index b2c2b5e8093c..30e9cd8a336d 100644 --- a/drivers/dma/of-dma.c +++ b/drivers/dma/of-dma.c @@ -33,10 +33,13 @@ static struct of_dma *of_dma_find_controller(struct of_phandle_args *dma_spec) { struct of_dma *ofdma; - list_for_each_entry(ofdma, &of_dma_list, of_dma_controllers) + list_for_each_entry(ofdma, &of_dma_list, of_dma_controllers) { +printk("SS: %s: ofdma name: %s\n", __func__, ofdma->of_node->name); if (ofdma->of_node == dma_spec->np) return ofdma; + } +printk("SS: %s: can't find DMA controller %pOF\n", __func__, dma_spec->np); pr_debug("%s: can't find DMA controller %pOF\n", __func__, dma_spec->np); @@ -247,18 +250,18 @@ struct dma_chan *of_dma_request_slave_channel(struct device_node *np, pr_err("%s: not enough information provided\n", __func__); return ERR_PTR(-ENODEV); } - +printk("SS: %s: name is ok %s\n", __func__, name); /* Silently fail if there is not even the "dmas" property */ if (!of_find_property(np, "dmas", NULL)) return ERR_PTR(-ENODEV); - +printk("SS: %s: dmas property found\n", __func__); count = of_property_count_strings(np, "dma-names"); if (count < 0) { pr_err("%s: dma-names property of node '%pOF' missing or empty\n", __func__, np); return ERR_PTR(-ENODEV); } - +printk("SS: %s: dma-names count: %d\n", __func__, count); /* * approximate an average distribution across multiple * entries with the same name @@ -269,13 +272,14 @@ struct dma_chan *of_dma_request_slave_channel(struct device_node *np, (i + start) % count, &dma_spec)) continue; - +printk("SS: %s:matching %d channel\n", __func__, i); mutex_lock(&of_dma_lock); ofdma = of_dma_find_controller(&dma_spec); if (ofdma) { chan = ofdma->of_dma_xlate(&dma_spec, ofdma); } else { +printk("SS: %s: ofdma not found\n", __func__); ret_no_channel = -EPROBE_DEFER; chan = NULL; } diff --git a/drivers/i2c/busses/i2c-qcom-geni.c b/drivers/i2c/busses/i2c-qcom-geni.c index 3795c4985dea..f037960d74ce 100644 --- a/drivers/i2c/busses/i2c-qcom-geni.c +++ b/drivers/i2c/busses/i2c-qcom-geni.c @@ -552,7 +552,7 @@ static int geni_i2c_gsi_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], gi2c->tx_c = dma_request_slave_channel(gi2c->se.dev, "tx"); if (!gi2c->tx_c) { dev_err(gi2c->se.dev, - "tx dma req slv chan ret :%d\n", ret); + "tx dma req slv chan ret :%d\n", PTR_ERR(gi2c->tx_c)); ret = -EIO; goto geni_i2c_gsi_xfer_out; } @@ -828,17 +828,18 @@ static int geni_i2c_xfer(struct i2c_adapter *adap, pm_runtime_set_suspended(gi2c->se.dev); return ret; } - +printk("SS: %s: \n", __func__); qcom_geni_i2c_conf(gi2c); if (gi2c->se_mode == GSI_ONLY) { +printk("SS: %s: calling geni_i2c_gsi_xfer\n", __func__); ret = geni_i2c_gsi_xfer(adap, msgs, num); goto geni_i2c_txn_ret; } else { /* Don't set shared flag in non-GSI mode */ gi2c->is_shared = false; } - +printk("SS: %s: geni_i2c_gsi_xfer NOT Called\n", __func__); for (i = 0; i < num; i++) { u32 m_param = i < (num - 1) ? STOP_STRETCH : 0; |