r6040: restore MIER register correctly when IRQ line is shared