Search Linux Wireless

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Dec 06, 2021 at 07:47:05PM -0700, Ricardo Martinez wrote:
> From: Haijun Liu <haijun.liu@xxxxxxxxxxxx>
> 
> 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





[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux