|
@@ -67,8 +67,7 @@ uart_rd(unsigned int reg)
|
|
* waiting for tx to happen...
|
|
* waiting for tx to happen...
|
|
*/
|
|
*/
|
|
|
|
|
|
-static void
|
|
|
|
-putc(char ch)
|
|
|
|
|
|
+static void putc(int ch)
|
|
{
|
|
{
|
|
int cpuid = S3C2410_GSTATUS1_2410;
|
|
int cpuid = S3C2410_GSTATUS1_2410;
|
|
|
|
|
|
@@ -77,9 +76,6 @@ putc(char ch)
|
|
cpuid &= S3C2410_GSTATUS1_IDMASK;
|
|
cpuid &= S3C2410_GSTATUS1_IDMASK;
|
|
#endif
|
|
#endif
|
|
|
|
|
|
- if (ch == '\n')
|
|
|
|
- putc('\r'); /* expand newline to \r\n */
|
|
|
|
-
|
|
|
|
if (uart_rd(S3C2410_UFCON) & S3C2410_UFCON_FIFOMODE) {
|
|
if (uart_rd(S3C2410_UFCON) & S3C2410_UFCON_FIFOMODE) {
|
|
int level;
|
|
int level;
|
|
|
|
|
|
@@ -101,19 +97,16 @@ putc(char ch)
|
|
} else {
|
|
} else {
|
|
/* not using fifos */
|
|
/* not using fifos */
|
|
|
|
|
|
- while ((uart_rd(S3C2410_UTRSTAT) & S3C2410_UTRSTAT_TXE) != S3C2410_UTRSTAT_TXE);
|
|
|
|
|
|
+ while ((uart_rd(S3C2410_UTRSTAT) & S3C2410_UTRSTAT_TXE) != S3C2410_UTRSTAT_TXE)
|
|
|
|
+ barrier();
|
|
}
|
|
}
|
|
|
|
|
|
/* write byte to transmission register */
|
|
/* write byte to transmission register */
|
|
uart_wr(S3C2410_UTXH, ch);
|
|
uart_wr(S3C2410_UTXH, ch);
|
|
}
|
|
}
|
|
|
|
|
|
-static void
|
|
|
|
-putstr(const char *ptr)
|
|
|
|
|
|
+static inline void flush(void)
|
|
{
|
|
{
|
|
- for (; *ptr != '\0'; ptr++) {
|
|
|
|
- putc(*ptr);
|
|
|
|
- }
|
|
|
|
}
|
|
}
|
|
|
|
|
|
#define __raw_writel(d,ad) do { *((volatile unsigned int *)(ad)) = (d); } while(0)
|
|
#define __raw_writel(d,ad) do { *((volatile unsigned int *)(ad)) = (d); } while(0)
|