Thread (35 messages) 35 messages, 5 authors, 2022-01-13

Re: [PATCH net-next v3 06/12] net: wwan: t7xx: Data path HW layer

From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Date: 2021-12-07 12:00:30
Also in: netdev

On Mon, Dec 06, 2021 at 07:47:05PM -0700, Ricardo Martinez wrote:
From: Haijun Liu <haijun.liu@mediatek.com>

Data Path Modem AP Interface (DPMAIF) HW layer provides HW abstraction
for the upper layer (DPMAIF HIF). It implements functions to do the HW
configuration, TX/RX control and interrupt handling.
...
+	ret = readx_poll_timeout_atomic(ioread32, hw_info->pcie_base + DPMAIF_AO_UL_AP_L2TIMR0,
+					value, (value & ul_intr_enable) != ul_intr_enable, 0,
+					DPMAIF_CHECK_INIT_TIMEOUT_US);
+	if (ret)
+		return ret;
...
+	ret = readx_poll_timeout_atomic(ioread32, hw_info->pcie_base + DPMAIF_AO_UL_APDL_L2TIMR0,
+					value, (value & ul_intr_enable) != ul_intr_enable, 0,
+					DPMAIF_CHECK_INIT_TIMEOUT_US);
+	if (ret)
+		return ret;
...
+	ret = readx_poll_timeout_atomic(ioread32, hw_info->pcie_base + DPMAIF_AO_UL_AP_L2TIMR0,
+					value, (value & ul_int_que_done) == ul_int_que_done, 0,
+					DPMAIF_CHECK_TIMEOUT_US);
+	if (ret)
+		dev_err(dpmaif_ctrl->dev,
+			"Could not mask the UL interrupt. DPMAIF_AO_UL_AP_L2TIMR0 is 0x%x\n",
+			value);
I would recommend to add a small patch that extends iopoll.h by ioreadXX() variants.

Or as alternative just define it here at the top of the file (or in one of the
header if it's used more than in one module) so we may move it to the iopoll.h
in the future:


#define ioread32_poll_timeout_atomic(addr, val, cond, delay_us, timeout_us) \
	readx_poll_timeout_atomic(ioread32, addr, val, cond, delay_us, timeout_us)


-- 
With Best Regards,
Andy Shevchenko

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help