From: Bernhard Urban Date: Fri, 18 Sep 2009 21:56:25 +0000 (+0200) Subject: tmp commit X-Git-Tag: firstresponse~15 X-Git-Url: http://wien.tomnetworks.com/gitweb/?p=ppcskel.git;a=commitdiff_plain;h=508bbf5c1567ecc0b4cf40aaff7499c9ba6ff18d tmp commit --- diff --git a/usb/host/ohci.c b/usb/host/ohci.c index 8a2eff6..5a0d8a7 100644 --- a/usb/host/ohci.c +++ b/usb/host/ohci.c @@ -365,9 +365,8 @@ void hcdi_init() write32(OHCI0_HC_INT_STATUS, ~0); write32(OHCI0_HC_INT_ENABLE, OHCI_INTR_INIT); - irq_restore(cookie); - configure_ports((u8)1); + irq_restore(cookie); dbg_op_state(); } @@ -382,28 +381,29 @@ static void configure_ports(u8 from_init) setup_port(OHCI0_HC_RH_PORT_STATUS_1, from_init); setup_port(OHCI0_HC_RH_PORT_STATUS_2, from_init); + printf("configure_ports done\n"); } static void setup_port(u32 reg, u8 from_init) { u32 port = read32(reg); if((port & RH_PS_CCS) && ((port & RH_PS_CSC) || from_init)) { - if(!from_init) - write32(reg, RH_PS_CSC); + write32(reg, RH_PS_CSC); wait_ms(100); /* clear CSC flag, set PES and start port reset (PRS) */ write32(reg, RH_PS_PES); + port = read32(reg); write32(reg, RH_PS_PRS); /* spin until port reset is complete */ port = read32(reg); while(!(port & RH_PS_PRSC)) { - udelay(2); - printf("fuck\n"); + udelay(1); port = read32(reg); } + printf("loop done\n"); (void) usb_add_device(); }