Aleš Nesrsta wrote: > I will test the usb.diff soon and than I try to more study EHCI > specification. On my PC is OHCI detected properly but I have very old > machine Toshiba Satellite 2140CDS (i586 at 450MHz) with one OHCI only > interface. I.e. it looks like problem appears only on combined OHCI-EHCI > interfaces. I have also plan to debug GRUB2 USB support on other, newer > machine with OHCI-EHCI interfaces. > I will inform You there if I will discover something interesting... > > I discovered something. It looks like on Yeeloong the problem is caused by the skipped step of initialising of timings and power management. Quick and dirty fix: === modified file 'bus/usb/ohci.c' --- bus/usb/ohci.c 2010-01-20 19:40:30 +0000 +++ bus/usb/ohci.c 2010-04-16 16:32:38 +0000 @@ -91,10 +93,15 @@ GRUB_OHCI_REG_BULKCURR, GRUB_OHCI_REG_DONEHEAD, GRUB_OHCI_REG_FRAME_INTERVAL, + GRUB_OHCI_REG_PERIODIC_START = 16, GRUB_OHCI_REG_RHUBA = 18, GRUB_OHCI_REG_RHUBPORT = 21 } grub_ohci_reg_t; +#define GRUB_OHCI_RHUB_PORT_POWER_MASK 0x300 +#define GRUB_OHCI_RHUB_PORT_ALL_POWERED 0x200 + + static grub_uint32_t grub_ohci_readreg32 (struct grub_ohci *o, grub_ohci_reg_t reg) { @@ -166,6 +215,11 @@ if ((revision & 0xFF) != 0x10) goto fail; + grub_ohci_writereg32 (o, GRUB_OHCI_REG_RHUBA, + (grub_ohci_readreg32 (o, GRUB_OHCI_REG_RHUBA) + & ~GRUB_OHCI_RHUB_PORT_POWER_MASK) + | GRUB_OHCI_RHUB_PORT_ALL_POWERED); + /* Backup the frame interval register. */ frame_interval = grub_ohci_readreg32 (o, GRUB_OHCI_REG_FRAME_INTERVAL); @@ -175,10 +229,14 @@ grub_dprintf ("ohci", "OHCI reset\n"); /* Restore the frame interval register. */ + /* FIXME: is this choice of timings sane? */ + frame_interval = (frame_interval & 0xffff) | 0x27780000; grub_ohci_writereg32 (o, GRUB_OHCI_REG_FRAME_INTERVAL, frame_interval); + grub_ohci_writereg32 (o, GRUB_OHCI_REG_PERIODIC_START, 0x257f); + /* Setup the HCCA. */ - grub_ohci_writereg32 (o, GRUB_OHCI_REG_HCCA, (grub_uint32_t) o->hcca); + grub_ohci_writereg32 (o, GRUB_OHCI_REG_HCCA, (grub_uint32_t) o->hcca); grub_dprintf ("ohci", "OHCI HCCA\n"); /* Enable the OHCI. */
> Best regards > Ales > > > > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > http://lists.gnu.org/mailman/listinfo/grub-devel > > -- Regards Vladimir 'φ-coder/phcoder' Serbinenko
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel