#define _INLINE_ inline
+#ifdef CONFIG_M5282
+#define IRQBASE 77
+#else
#define IRQBASE 73
+#endif
/*
* Configuration table, UARTs to look for at startup.
receive_chars(info, regs, isr);
if (isr & MCFUART_UIR_TXREADY)
transmit_chars(info);
-#if 0
- if (isr & MCFUART_UIR_DELTABREAK) {
- printk("%s(%d): delta break!\n", __FILE__, __LINE__);
- receive_chars(info, regs, isr);
- }
-#endif
-
return;
}
#if 0
printk("%s(%d): mcfrs_write(tty=%x,from_user=%d,buf=%x,count=%d)\n",
- __FILE__, __LINE__, tty, from_user, buf, count);
+ __FILE__, __LINE__, (int)tty, from_user, (int)buf, count);
#endif
if (serial_paranoia_check(info, tty->name, "mcfrs_write"))
{
struct mcf_serial *info = (struct mcf_serial *)tty->driver_data;
int ret;
-
+
if (serial_paranoia_check(info, tty->name, "mcfrs_write_room"))
return 0;
ret = SERIAL_XMIT_SIZE - info->xmit_cnt - 1;
static int mcfrs_chars_in_buffer(struct tty_struct *tty)
{
struct mcf_serial *info = (struct mcf_serial *)tty->driver_data;
-
+
if (serial_paranoia_check(info, tty->name, "mcfrs_chars_in_buffer"))
return 0;
return info->xmit_cnt;
{
struct mcf_serial *info = (struct mcf_serial *)tty->driver_data;
unsigned long flags;
-
+
if (serial_paranoia_check(info, tty->name, "mcfrs_flush_buffer"))
return;
*/
static void mcfrs_irqinit(struct mcf_serial *info)
{
-#ifdef CONFIG_M5272
+#if defined(CONFIG_M5272)
volatile unsigned long *icrp;
volatile unsigned long *portp;
volatile unsigned char *uartp;
*portp = (*portp & ~0x000000ff) | 0x00000055;
portp = (volatile unsigned long *) (MCF_MBAR + MCFSIM_PDCNT);
*portp = (*portp & ~0x000003fc) | 0x000002a8;
+#elif defined(CONFIG_M5282)
+ volatile unsigned char *icrp, *uartp;
+ volatile unsigned long *imrp;
+
+ uartp = (volatile unsigned char *) info->addr;
+
+ icrp = (volatile unsigned char *) (MCF_MBAR + MCFICM_INTC0 +
+ MCFINTC_ICR0 + MCFINT_UART0 + info->line);
+ *icrp = 0x33; /* UART0 with level 6, priority 3 */
+
+ imrp = (volatile unsigned long *) (MCF_MBAR + MCFICM_INTC0 +
+ MCFINTC_IMRL);
+ *imrp &= ~((1 << (info->irq - 64)) | 1);
#else
volatile unsigned char *icrp, *uartp;