I have succeded in making an interrupt driven UART. Tip I picked up somewhere else in this forum: make sure interrupt priorities and levels are unique for all sources (in the INTC0_ICR and INTC1_ICR registers). All example code from Freescale, CodeSourcery and Interniche seems to have this implemented incorrectly.
Practical example of relevant part when initialising UART:
// Initialize the UART interrupts.
if (portno == 0) {
MCF_INTC0_ICR13 = MCF_INTC_ICR_IL(2) | MCF_INTC_ICR_IP(3);
MCF_INTC0_IMRL &= ~MCF_INTC_IMRL_MASK13;
} else if (portno == 1) {
MCF_INTC0_ICR14 = MCF_INTC_ICR_IL(2) | MCF_INTC_ICR_IP(4);
MCF_INTC0_IMRL &= ~MCF_INTC_IMRL_MASK14;
} else {
MCF_INTC0_ICR15 = MCF_INTC_ICR_IL(2) | MCF_INTC_ICR_IP(5);
MCF_INTC0_IMRL &= ~MCF_INTC_IMRL_MASK15;
}
All ICR registers should contain unique numbers according to the reference manual.