Hi Finn, Daniel, On Thu, Oct 3, 2024 at 5:32 AM Finn Thain <fthain@xxxxxxxxxxxxxx> wrote:
From: Daniel Palmer <daniel@xxxxxxxx> Commit a38eaa07a0ce ("m68k/mvme147: config.c - Remove unused functions"), removed the console functionality for the mvme147 instead of wiring it up to an early console. Put the console write function back and wire it up like mvme16x does so it's possible to see Linux boot on this fine hardware once more.
Thanks for your patch!
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?
--- 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.
+ +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> Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds