it8212F pci card problem in ppc405ep bubinga board

tony hangtoo at 163.com
Mon Apr 16 17:33:47 EST 2007


Dear all
        This days I came to a problem like this:
        Environment:linux kernel 2.6.20, PPC 405EP bubinga demo board.
        We have tested two PCI2IDE cards in this board,A)silicon Image's (cpu:cmd649);B)IT8212F's.The A card with a harddisk,which is well recognised by the demo board;but the same harddisk in B card, can't be recognised by the board,only recognised the PCI card.We trace the kernel,found something different in this funtion in the file linux-2.6.20/drivers/ide/ide-iops.c:
++++++++++++++++++++++++++++++++++++++++++
int ide_wait_not_busy(ide_hwif_t *hwif, unsigned long timeout)
{
 u8 stat = 0;
 u8 i = 0;
 while(timeout--) {
  /*
   * Turn this into a schedule() sleep once I'm sure
   * about locking issues (2.5 work ?).
   * hwif->io_ports[IDE_STATUS_OFFSET] = 0xFFEF
   */
  mdelay(1);
  
  stat = hwif->INB(hwif->io_ports[IDE_STATUS_OFFSET]);
  printk(KERN_INFO "hwif->io_ports[IDE_STATUS_OFFSET] ==> %4x, 222222STAT ==> %4x\n",hwif->io_ports[IDE_STATUS_OFFSET],stat);
  if ((stat & BUSY_STAT) == 0){
   printk(KERN_INFO "BUSYING................\n");
   return 0;
  }
  /*
   * Assume a value of 0xff means nothing is connected to
   * the interface and it doesn't implement the pull-down
   * resistor on D7.n        isa_io_base = e7fee000
   */
  if (stat == 0xff){
   printk(KERN_INFO "NODEV................  \n");
   return -ENODEV;
  }
  touch_softlockup_watchdog();
  touch_nmi_watchdog();
 }
 return -EBUSY;
}
+++++++++++++++++++++++++++++++++++++++++++++++++++
stat = hwif->INB(hwif->io_ports[IDE_STATUS_OFFSET]);
  printk(KERN_INFO "hwif->io_ports[IDE_STATUS_OFFSET] ==> %4x, 222222STAT ==> %4x\n",hwif->io_ports[IDE_STATUS_OFFSET],stat);
By printing this two parameters, we found that the former parameter is the same in two cards,but the value of "stat" varies between the two 
cards.A card,stat equals to 0x50;B card,stat equals to 0xFF,and it keeps the same,won't change.
        I'm puzzled about this.Is it about the driver of IT821x.c in the kernel?or something else?
        Any advise is welcomed.Thank you.




Sincerely
Tony

               
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://ozlabs.org/pipermail/linuxppc-embedded/attachments/20070416/8e8655bd/attachment.htm 


More information about the Linuxppc-embedded mailing list