From 879c074656983784ba76d22c4e7663c42374194c Mon Sep 17 00:00:00 2001 From: Bertrik Sikken Date: Thu, 10 Apr 2008 22:28:18 +0000 Subject: [PATCH] Properly clear clear-on-write bits in the PP502x USB controller git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17066 a1c6a512-1295-4272-9138-f99709370657 --- firmware/target/arm/usb-drv-pp502x.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/firmware/target/arm/usb-drv-pp502x.c b/firmware/target/arm/usb-drv-pp502x.c index 62addc164e..af7628f992 100644 --- a/firmware/target/arm/usb-drv-pp502x.c +++ b/firmware/target/arm/usb-drv-pp502x.c @@ -428,7 +428,7 @@ void usb_drv_int(void) /* usb transaction interrupt */ if (status & USBSTS_INT) { - REG_USBSTS |= USBSTS_INT; + REG_USBSTS = USBSTS_INT; /* a control packet? */ if (REG_ENDPTSETUPSTAT & EPSETUP_STATUS_EP0) { @@ -441,20 +441,20 @@ void usb_drv_int(void) /* error interrupt */ if (status & USBSTS_ERR) { - REG_USBSTS |= USBSTS_ERR; + REG_USBSTS = USBSTS_ERR; logf("usb error int"); } /* reset interrupt */ if (status & USBSTS_RESET) { - REG_USBSTS |= USBSTS_RESET; + REG_USBSTS = USBSTS_RESET; bus_reset(); usb_core_bus_reset(); /* tell mom */ } /* port change */ if (status & USBSTS_PORT_CHANGE) { - REG_USBSTS |= USBSTS_PORT_CHANGE; + REG_USBSTS = USBSTS_PORT_CHANGE; } } @@ -688,7 +688,7 @@ static void control_received(void) tmp[1] = qh_array[0].setup_buffer[1]; /* acknowledge packet recieved */ - REG_ENDPTSETUPSTAT |= EPSETUP_STATUS_EP0; + REG_ENDPTSETUPSTAT = EPSETUP_STATUS_EP0; /* Stop pending control transfers */ for(i=0;i<2;i++) { @@ -706,7 +706,7 @@ static void transfer_completed(void) { int ep; unsigned int mask = REG_ENDPTCOMPLETE; - REG_ENDPTCOMPLETE |= mask; + REG_ENDPTCOMPLETE = mask; for (ep=0; ep