Skip to contentSkip to conversation

bcm2835_aux: Swap RX and TX interrupt assignments

PATCH Applied Guenter Roeck 3 participants 7 messages Jun 18, 2018 – Jul 16, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bcm2835_aux: Swap RX and TX interrupt assignments

RX and TX interrupt bits were reversed, resulting in an endless sequence of serial interupts in the emulated system and the following repeated error message when booting Linux.

serial8250: too much work for irq61

This results in a boot failure most of the time.

Qemu command line used to reproduce the problem:

	qemu-system-aarch64 -M raspi3 -m 1024 \
	-kernel arch/arm64/boot/Image \
	--append "rdinit=/sbin/init console=ttyS1,115200"
	-initrd rootfs.cpio \
	-dtb arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dtb \
	-nographic -monitor null -serial null -serial stdio

This is with arm64:defconfig. The root file system was generated using buildroot.

---
 hw/char/bcm2835_aux.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
hw/char/bcm2835_aux.c +2 -2
index 370dc7e..0364596 100644
@@ -39,8 +39,8 @@
 #define AUX_MU_BAUD_REG 0x68
 
 /* bits in IER/IIR registers */
-#define TX_INT  0x1
-#define RX_INT  0x2
+#define RX_INT  0x1
+#define TX_INT  0x2
 
 static void bcm2835_aux_update(BCM2835AuxState *s)
 {
Signature · 1 line
2.7.4
#1 lore raw

ping ...

Quoted 40 lines · Guenter Roeck

RX and TX interrupt bits were reversed, resulting in an endless sequence of serial interupts in the emulated system and the following repeated error message when booting Linux.

serial8250: too much work for irq61

This results in a boot failure most of the time.

Qemu command line used to reproduce the problem:

	qemu-system-aarch64 -M raspi3 -m 1024 \
	-kernel arch/arm64/boot/Image \
	--append "rdinit=/sbin/init console=ttyS1,115200"
	-initrd rootfs.cpio \
	-dtb arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dtb \
	-nographic -monitor null -serial null -serial stdio

This is with arm64:defconfig. The root file system was generated using buildroot.

---
 hw/char/bcm2835_aux.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
hw/char/bcm2835_aux.c +2 -2
index 370dc7e..0364596 100644
@@ -39,8 +39,8 @@
 #define AUX_MU_BAUD_REG 0x68
 
 /* bits in IER/IIR registers */
-#define TX_INT  0x1
-#define RX_INT  0x2
+#define RX_INT  0x1
+#define TX_INT  0x2
 
 static void bcm2835_aux_update(BCM2835AuxState *s)
 {
#2 lore raw
Quoted 1 line · Guenter Roeck

ping ...

Queued, thanks.

Paolo

Quoted 41 lines · Guenter Roeck
Quoted 40 lines

RX and TX interrupt bits were reversed, resulting in an endless sequence of serial interupts in the emulated system and the following repeated error message when booting Linux.

serial8250: too much work for irq61

This results in a boot failure most of the time.

Qemu command line used to reproduce the problem:

	qemu-system-aarch64 -M raspi3 -m 1024 \
	-kernel arch/arm64/boot/Image \
	--append "rdinit=/sbin/init console=ttyS1,115200"
	-initrd rootfs.cpio \
	-dtb arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dtb \
	-nographic -monitor null -serial null -serial stdio

This is with arm64:defconfig. The root file system was generated using buildroot.

---
 hw/char/bcm2835_aux.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
hw/char/bcm2835_aux.c +2 -2
index 370dc7e..0364596 100644
@@ -39,8 +39,8 @@
 #define AUX_MU_BAUD_REG 0x68
 
 /* bits in IER/IIR registers */
-#define TX_INT  0x1
-#define RX_INT  0x2
+#define RX_INT  0x1
+#define TX_INT  0x2
 
 static void bcm2835_aux_update(BCM2835AuxState *s)
 {
#3 lore raw
In reply to Guenter Roeck
Quoted 17 lines · Guenter Roeck

RX and TX interrupt bits were reversed, resulting in an endless sequence of serial interupts in the emulated system and the following repeated error message when booting Linux.

serial8250: too much work for irq61

This results in a boot failure most of the time.

Qemu command line used to reproduce the problem:

        qemu-system-aarch64 -M raspi3 -m 1024 \
        -kernel arch/arm64/boot/Image \
        --append "rdinit=/sbin/init console=ttyS1,115200"
        -initrd rootfs.cpio \
        -dtb arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dtb \
        -nographic -monitor null -serial null -serial stdio
Quoted 2 lines

This is with arm64:defconfig. The root file system was generated using buildroot.

Worth mentioning in the commit message that there is an error in the BCM2835 datasheet for the TX_INT and RX_INT bits in the AUX_MU_IER_REG description (as per
https://elinux.org/BCM2835_datasheet_errata)

thanks
-- PMM

#4 lore raw
Quoted 18 lines · Peter Maydell
Quoted 17 lines · Guenter Roeck

RX and TX interrupt bits were reversed, resulting in an endless sequence of serial interupts in the emulated system and the following repeated error message when booting Linux.

serial8250: too much work for irq61

This results in a boot failure most of the time.

Qemu command line used to reproduce the problem:

         qemu-system-aarch64 -M raspi3 -m 1024 \
         -kernel arch/arm64/boot/Image \
         --append "rdinit=/sbin/init console=ttyS1,115200"
         -initrd rootfs.cpio \
         -dtb arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dtb \
         -nographic -monitor null -serial null -serial stdio
Quoted 8 lines
Quoted 2 lines

This is with arm64:defconfig. The root file system was generated using buildroot.

Worth mentioning in the commit message that there is an error in the BCM2835 datasheet for the TX_INT and RX_INT bits in the AUX_MU_IER_REG description (as per
https://elinux.org/BCM2835_datasheet_errata)

I didn't know that ;-). I found out the hard way.

Guenter

#5 lore raw
Quoted 25 lines · Guenter Roeck
Quoted 24 lines · Peter Maydell
Quoted 20 lines · Guenter Roeck

RX and TX interrupt bits were reversed, resulting in an endless sequence of serial interupts in the emulated system and the following repeated error message when booting Linux.

serial8250: too much work for irq61

This results in a boot failure most of the time.

Qemu command line used to reproduce the problem:

         qemu-system-aarch64 -M raspi3 -m 1024 \
         -kernel arch/arm64/boot/Image \
         --append "rdinit=/sbin/init console=ttyS1,115200"
         -initrd rootfs.cpio \
         -dtb arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dtb \
         -nographic -monitor null -serial null -serial stdio

This is with arm64:defconfig. The root file system was generated using buildroot.

Quoted 7 lines
Quoted 5 lines

Worth mentioning in the commit message that there is an error in the BCM2835 datasheet for the TX_INT and RX_INT bits in the AUX_MU_IER_REG description (as per
https://elinux.org/BCM2835_datasheet_errata)

I didn't know that ;-). I found out the hard way.

I'll take this through target-arm.next (I have some other patches for rc1 anyway) and adjust the commit message.

Paolo: you can drop it from your queue.

thanks
-- PMM

#6 lore raw
Quoted 5 lines · Peter Maydell
Quoted 1 line

I didn't know that ;-). I found out the hard way.

I'll take this through target-arm.next (I have some other patches for rc1 anyway) and adjust the commit message.

Paolo: you can drop it from your queue.

Done, thanks!

Paolo