1 // SPDX-License-Identifier: GPL-2.0
3 * arch/m32r/boot/compressed/m32r_sio.c
5 * 2003-02-12: Takeo Takahashi
6 * 2006-11-30: OPSPUT support by Kazuhiro Inaoka
10 #include <asm/processor.h>
12 static void m32r_putc(char c
);
14 static int puts(const char *s
)
22 #if defined(CONFIG_PLAT_M32700UT) || defined(CONFIG_PLAT_OPSPUT)
26 #define USE_FPGA_MAP 0
30 * fpga configuration program uses MMU, and define map as same as
31 * M32104 uT-Engine board.
33 #define BOOT_SIO0STS (volatile unsigned short *)(0x02c00000 + 0x20006)
34 #define BOOT_SIO0TXB (volatile unsigned short *)(0x02c00000 + 0x2000c)
37 #if defined(CONFIG_PLAT_OPSPUT)
38 #define PLD_BASE 0x1cc00000
40 #define PLD_BASE 0xa4c00000
42 #define BOOT_SIO0STS PLD_ESIO0STS
43 #define BOOT_SIO0TXB PLD_ESIO0TXB
46 static void m32r_putc(char c
)
48 while ((*BOOT_SIO0STS
& 0x3) != 0x3)
52 while ((*BOOT_SIO0STS
& 0x3) != 0x3)
57 #else /* !(CONFIG_PLAT_M32700UT) */
58 #if defined(CONFIG_PLAT_MAPPI2)
59 #define SIO0STS (volatile unsigned short *)(0xa0efd000 + 14)
60 #define SIO0TXB (volatile unsigned short *)(0xa0efd000 + 30)
62 #define SIO0STS (volatile unsigned short *)(0x00efd000 + 14)
63 #define SIO0TXB (volatile unsigned short *)(0x00efd000 + 30)
66 static void m32r_putc(char c
)
68 while ((*SIO0STS
& 0x1) == 0)
72 while ((*SIO0STS
& 0x1) == 0)