On Tue, 5 Nov 2024, Geert Uytterhoeven wrote:
Cc: Daniel Palmer <daniel@xxxxxxxx>
Cc: stable@xxxxxxxxxx
Fixes: a38eaa07a0ce ("m68k/mvme147: config.c - Remove unused functions")
Signed-off-by: Daniel Palmer <daniel@xxxxxxxx>
Reviewed-by: Finn Thain <fthain@xxxxxxxxxxxxxx>
As this patch differs from Daniel's original, I guess you want
Co-deloped-by: Daniel Palmer <daniel@xxxxxxxx>
Signed-off-by: Daniel Palmer <daniel@xxxxxxxx>
Co-deloped-by: Finn Thain <fthain@xxxxxxxxxxxxxx>
Signed-off-by: Finn Thain <fthain@xxxxxxxxxxxxxx>
instead?
No problem.
--- a/arch/m68k/mvme147/config.c
+++ b/arch/m68k/mvme147/config.c
@@ -33,6 +33,7 @@
#include <asm/mvme147hw.h>
#include <asm/config.h>
+#include "mvme147.h"
static void mvme147_get_model(char *model);
extern void mvme147_sched_init(void);
@@ -177,3 +178,29 @@ static u64 mvme147_read_clk(struct clocksource *cs)
return ticks;
}
+
+#define SCC_DELAY do { __asm__ __volatile__ ("nop; nop;"); } while (0)
Please keep on using a static (inline) function instead of a macro.
Will do.
+
+static void scc_write(char ch)
+{
+ do {
+ SCC_DELAY;
+ } while (!(in_8(M147_SCC_A_ADDR) & BIT(2)));
+ SCC_DELAY;
+ out_8(M147_SCC_A_ADDR, 8);
+ SCC_DELAY;
+ out_8(M147_SCC_A_ADDR, ch);
+}
The rest LGTM, so
Reviewed-by: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
Thanks.