mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 17:25:35 +03:00
misc: tegra-cec: dump read/write buffer for debug
Dump read/write buffer with dev_dbg for debug. TDS-2199 Change-Id: I1fa3dec9e2ccd78023c464085fd2f6e3f49a87f2 Signed-off-by: Chun Xu <chunx@nvidia.com> Reviewed-on: http://git-master/r/1485394 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Prafull Suryawanshi <prafulls@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Spencer Sutterlin <ssutterlin@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
This commit is contained in:
committed by
Prafull Suryawanshi
parent
f79ab92d84
commit
74524fa09b
@@ -173,9 +173,11 @@ static ssize_t tegra_cec_write(struct file *file, const char __user *buf,
|
|||||||
mutex_unlock(&cec->tx_lock);
|
mutex_unlock(&cec->tx_lock);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
else
|
else {
|
||||||
|
dev_dbg(cec->dev, "%s: %*phC", __func__, (int)count, tx_buf);
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static ssize_t tegra_cec_read(struct file *file, char __user *buffer,
|
static ssize_t tegra_cec_read(struct file *file, char __user *buffer,
|
||||||
size_t count, loff_t *ppos)
|
size_t count, loff_t *ppos)
|
||||||
@@ -201,6 +203,8 @@ static ssize_t tegra_cec_read(struct file *file, char __user *buffer,
|
|||||||
if (copy_to_user(buffer, &(cec->rx_buffer), count))
|
if (copy_to_user(buffer, &(cec->rx_buffer), count))
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
|
|
||||||
|
dev_dbg(cec->dev, "%s: %*phC", __func__, (int)count,
|
||||||
|
&(cec->rx_buffer));
|
||||||
cec->rx_buffer = 0x0;
|
cec->rx_buffer = 0x0;
|
||||||
cec->rx_wake = 0;
|
cec->rx_wake = 0;
|
||||||
return count;
|
return count;
|
||||||
@@ -231,7 +235,7 @@ static irqreturn_t tegra_cec_irq_handler(int irq, void *data)
|
|||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
if (status & TEGRA_CEC_INT_STAT_TX_REGISTER_UNDERRUN) {
|
if (status & TEGRA_CEC_INT_STAT_TX_REGISTER_UNDERRUN) {
|
||||||
dev_err(dev, "tegra_cec: TX underrun, interrupt timing issue!\n");
|
dev_err(dev, "TX underrun, interrupt timing issue!\n");
|
||||||
|
|
||||||
tegra_cec_error_recovery(cec);
|
tegra_cec_error_recovery(cec);
|
||||||
writel(mask & ~TEGRA_CEC_INT_MASK_TX_REGISTER_EMPTY,
|
writel(mask & ~TEGRA_CEC_INT_MASK_TX_REGISTER_EMPTY,
|
||||||
@@ -271,7 +275,7 @@ static irqreturn_t tegra_cec_irq_handler(int irq, void *data)
|
|||||||
|
|
||||||
goto out;
|
goto out;
|
||||||
} else if (status & TEGRA_CEC_INT_STAT_TX_FRAME_OR_BLOCK_NAKD)
|
} else if (status & TEGRA_CEC_INT_STAT_TX_FRAME_OR_BLOCK_NAKD)
|
||||||
dev_warn(dev, "tegra_cec: TX NAKed on the fly!\n");
|
dev_warn(dev, "TX NAKed on the fly!\n");
|
||||||
|
|
||||||
if (status & TEGRA_CEC_INT_STAT_TX_REGISTER_EMPTY) {
|
if (status & TEGRA_CEC_INT_STAT_TX_REGISTER_EMPTY) {
|
||||||
if (cec->tx_buf_cur == cec->tx_buf_cnt)
|
if (cec->tx_buf_cur == cec->tx_buf_cnt)
|
||||||
@@ -492,8 +496,7 @@ static ssize_t cec_logical_addr_store(struct device *dev,
|
|||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
dev_info(dev, "set logical address: 0x%x\n", (u32)addr);
|
||||||
dev_dbg(dev, "tegra_cec: set logical address: 0x%x\n", (u32)addr);
|
|
||||||
cec->logical_addr = addr;
|
cec->logical_addr = addr;
|
||||||
state = readl(cec->cec_base + TEGRA_CEC_HW_CONTROL);
|
state = readl(cec->cec_base + TEGRA_CEC_HW_CONTROL);
|
||||||
state &= ~TEGRA_CEC_HWCTRL_RX_LADDR_MASK;
|
state &= ~TEGRA_CEC_HWCTRL_RX_LADDR_MASK;
|
||||||
|
|||||||
Reference in New Issue
Block a user