From 508bbf5c1567ecc0b4cf40aaff7499c9ba6ff18d Mon Sep 17 00:00:00 2001 From: Bernhard Urban Date: Fri, 18 Sep 2009 23:56:25 +0200 Subject: [PATCH] tmp commit --- usb/host/ohci.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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(); } -- 2.25.1