Date:2015-03-17 15:30:42 (4 years 5 months ago)
Author:Stefan Schmidt
Commit:464ab40e3932a83b30626b99c4b658b4916fc24c
Message:Revert "atusb/fw/usb/: enable MCU reset on USB bus reset after config selection"

This reverts commit 9b2696b8488dbc39b0fdcdefdfad775913cb6e2d.

With this patch ATUSB resets constantly when I use it in QEMU with USB
poassthrough.
Files: atusb/fw/usb/atu2.c (2 diffs)
atusb/fw/usb/usb.c (1 diff)
atusb/fw/usb/usb.h (1 diff)

Change Details

atusb/fw/usb/atu2.c
247247}
248248
249249
250void usb_enable_bus_reset(void)
251{
252    UDCON |= 1 << RSTCPU; /* reset CPU on bus reset */
253}
254
255
256250void usb_init(void)
257251{
258252    USBCON |= 1 << FRZCLK; /* freeze the clock */
...... 
269263
270264    UDCON &= ~(1 << DETACH); /* attach the pull-up */
271265    UDIEN = 1 << EORSTE; /* enable device interrupts */
266// UDCON |= 1 << RSTCPU; /* reset CPU on bus reset */
272267
273268    ep_init();
274269}
atusb/fw/usb/usb.c
119119    case TO_DEVICE(SET_CONFIGURATION):
120120        if (setup->wValue != config_descriptor[5])
121121            return 0;
122        usb_enable_bus_reset();
123122        break;
124123
125124    /*
atusb/fw/usb/usb.h
182182void set_addr(uint8_t addr);
183183void usb_ep_change(struct ep_descr *ep);
184184void usb_reset(void);
185void usb_enable_bus_reset(void);
186185void usb_init(void);
187186
188187#endif /* !USB_H */

Archive Download the corresponding diff file



interactive