[PATCH v4 net-next 1/8] ptp: netc: use ioread64_lo_hi/iowrite64_lo_hi for 64-bit register access

Linus Walleij linusw at kernel.org
Wed Sep 30 06:26:48 PDT 2026


On Fri, Sep 18, 2026 at 9:24 AM <wei.fang at oss.nxp.com> wrote:

> From: Wei Fang <wei.fang at nxp.com>
>
> Replace the open-coded 64-bit register read/write sequences with
> ioread64_lo_hi() and iowrite64_lo_hi() helpers. Introduce two new macros
> netc_timer_rd64() and netc_timer_wr64() that wrap these helpers and use
> them throughout the driver. This reduces boilerplate and makes the intent
> of each operation clearer.
>
> The high-half register defines (NETC_TMR_*_H) are kept to document the
> register map; they are not used directly since netc_timer_rd/wr64()
> address the 64-bit register pair via the low-half offset, relying on the
> hardware layout where H is always at L + 4.
>
> Signed-off-by: Wei Fang <wei.fang at nxp.com>

That's neat.
Reviewed-by: Linus Walleij <linusw at kernel.org>

Yours,
Linus Walleij



More information about the linux-arm-kernel mailing list