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:05:40
Also in
linux-wireless
Reply to
Andy Shevchenko, 2021-12-07
+Cc: people from "[PATCH v7 1/2] iopoll: Introduce memory-mapped IO polling macros"

Any idea why ioreadXX() doomed between v7 and v10 of that series?
Any further work is going on?

On Tue, Dec 07, 2021 at 01:59:18PM +0200, Andy Shevchenko wrote:
On Mon, Dec 06, 2021 at 07:47:05PM -0700, Ricardo Martinez wrote:
quoted
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.
...
quoted
+	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;
...
quoted
+	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;
...
quoted
+	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
-- 
With Best Regards,
Andy Shevchenko

Thread (35 messages) 35 messages, 5 authors, last reply 2022-01-13
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help