summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/udbg_16550.c
diff options
context:
space:
mode:
authorMichael Ellerman <mpe@ellerman.id.au>2022-09-19 07:27:55 +0200
committerMichael Ellerman <mpe@ellerman.id.au>2022-09-26 12:58:17 +0200
commit456c3005102b18cce6662b1915c6efffe7744dcc (patch)
tree7b2e920278de8e7b3b9a61f95ac9b6e6536c9526 /arch/powerpc/kernel/udbg_16550.c
parentpowerpc/64: Remove unused SYS_CALL_TABLE symbol (diff)
downloadlinux-456c3005102b18cce6662b1915c6efffe7744dcc.tar.xz
linux-456c3005102b18cce6662b1915c6efffe7744dcc.zip
powerpc/microwatt: Remove unused early debug code
The original microwatt submission[1] included some early debug code for using the Microwatt "potato" UART. The series that was eventually merged switched to using a standard UART, and so doesn't need any special early debug handling. But some of the original code was merged accidentally under the non-existent CONFIG_PPC_EARLY_DEBUG_MICROWATT. Drop the unused code. 1: https://lore.kernel.org/linuxppc-dev/20200509050340.GD1464954@thinks.paulus.ozlabs.org/ Fixes: 48b545b8018d ("powerpc/microwatt: Use standard 16550 UART for console") Reported-by: Lukas Bulwahn <lukas.bulwahn@gmail.com> Reviewed-by: Andrew Donnellan <ajd@linux.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20220919052755.800907-1-mpe@ellerman.id.au
Diffstat (limited to 'arch/powerpc/kernel/udbg_16550.c')
-rw-r--r--arch/powerpc/kernel/udbg_16550.c39
1 files changed, 0 insertions, 39 deletions
diff --git a/arch/powerpc/kernel/udbg_16550.c b/arch/powerpc/kernel/udbg_16550.c
index d3942de254c6..ddfbc74bf85f 100644
--- a/arch/powerpc/kernel/udbg_16550.c
+++ b/arch/powerpc/kernel/udbg_16550.c
@@ -296,42 +296,3 @@ void __init udbg_init_40x_realmode(void)
}
#endif /* CONFIG_PPC_EARLY_DEBUG_40x */
-
-#ifdef CONFIG_PPC_EARLY_DEBUG_MICROWATT
-
-#define UDBG_UART_MW_ADDR ((void __iomem *)0xc0002000)
-
-static u8 udbg_uart_in_isa300_rm(unsigned int reg)
-{
- uint64_t msr = mfmsr();
- uint8_t c;
-
- mtmsr(msr & ~(MSR_EE|MSR_DR));
- isync();
- eieio();
- c = __raw_rm_readb(UDBG_UART_MW_ADDR + (reg << 2));
- mtmsr(msr);
- isync();
- return c;
-}
-
-static void udbg_uart_out_isa300_rm(unsigned int reg, u8 val)
-{
- uint64_t msr = mfmsr();
-
- mtmsr(msr & ~(MSR_EE|MSR_DR));
- isync();
- eieio();
- __raw_rm_writeb(val, UDBG_UART_MW_ADDR + (reg << 2));
- mtmsr(msr);
- isync();
-}
-
-void __init udbg_init_debug_microwatt(void)
-{
- udbg_uart_in = udbg_uart_in_isa300_rm;
- udbg_uart_out = udbg_uart_out_isa300_rm;
- udbg_use_uart();
-}
-
-#endif /* CONFIG_PPC_EARLY_DEBUG_MICROWATT */