.. | .. |
---|
908 | 908 | spin_unlock_irqrestore(&port->lock, flags); |
---|
909 | 909 | } |
---|
910 | 910 | |
---|
| 911 | +#ifdef CONFIG_RAW_PRINTK |
---|
| 912 | + |
---|
| 913 | +static void asc_console_write_raw(struct console *co, |
---|
| 914 | + const char *s, unsigned int count) |
---|
| 915 | +{ |
---|
| 916 | + struct uart_port *port = &asc_ports[co->index].port; |
---|
| 917 | + unsigned long timeout = 1000000; |
---|
| 918 | + u32 intenable; |
---|
| 919 | + |
---|
| 920 | + intenable = asc_in(port, ASC_INTEN); |
---|
| 921 | + asc_out(port, ASC_INTEN, 0); |
---|
| 922 | + (void)asc_in(port, ASC_INTEN); /* Defeat bus write posting */ |
---|
| 923 | + |
---|
| 924 | + uart_console_write(port, s, count, asc_console_putchar); |
---|
| 925 | + |
---|
| 926 | + while (timeout-- && !asc_txfifo_is_empty(port)) |
---|
| 927 | + cpu_relax(); /* wait shorter */ |
---|
| 928 | + |
---|
| 929 | + asc_out(port, ASC_INTEN, intenable); |
---|
| 930 | +} |
---|
| 931 | + |
---|
| 932 | +#endif |
---|
| 933 | + |
---|
911 | 934 | static int asc_console_setup(struct console *co, char *options) |
---|
912 | 935 | { |
---|
913 | 936 | struct asc_port *ascport; |
---|
.. | .. |
---|
940 | 963 | .name = ASC_SERIAL_NAME, |
---|
941 | 964 | .device = uart_console_device, |
---|
942 | 965 | .write = asc_console_write, |
---|
| 966 | +#ifdef CONFIG_RAW_PRINTK |
---|
| 967 | + .write_raw = asc_console_write_raw, |
---|
| 968 | +#endif |
---|
943 | 969 | .setup = asc_console_setup, |
---|
944 | 970 | .flags = CON_PRINTBUFFER, |
---|
945 | 971 | .index = -1, |
---|