[PATCH 2/3] clk: microchip: core: change asm nop calls to nop()

From: Brian Masney

Date: Sun Feb 22 2026 - 18:51:45 EST


In preparation for allowing this driver to be compiled on all
architectures, convert the direct asm nop calls to use the
nop() function that's available.

Signed-off-by: Brian Masney <bmasney@xxxxxxxxxx>
---
drivers/clk/microchip/clk-core.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/clk/microchip/clk-core.c b/drivers/clk/microchip/clk-core.c
index 2e86ad846a66cd5487f5412c09ab0ad25ebe3f79..4e90988f47d5d3a370bd1a8e74c5778e4f071038 100644
--- a/drivers/clk/microchip/clk-core.c
+++ b/drivers/clk/microchip/clk-core.c
@@ -3,6 +3,7 @@
* Purna Chandra Mandal,<purna.mandal@xxxxxxxxxxxxx>
* Copyright (C) 2015 Microchip Technology Inc. All rights reserved.
*/
+#include <asm/barrier.h>
#include <linux/clk-provider.h>
#include <linux/delay.h>
#include <linux/device.h>
@@ -77,11 +78,11 @@ static struct clk_hw *pic32_sclk_hw;
/* add instruction pipeline delay while CPU clock is in-transition. */
#define cpu_nop5() \
do { \
- __asm__ __volatile__("nop"); \
- __asm__ __volatile__("nop"); \
- __asm__ __volatile__("nop"); \
- __asm__ __volatile__("nop"); \
- __asm__ __volatile__("nop"); \
+ nop(); \
+ nop(); \
+ nop(); \
+ nop(); \
+ nop(); \
} while (0)

/* Perpheral bus clocks */

--
2.53.0