You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

3c529.c 1.4KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /*
  2. * Split out from 3c509.c to make build process more sane
  3. *
  4. */
  5. #include "etherboot.h"
  6. #include "mca.h"
  7. #include "isa.h"
  8. #include "nic.h"
  9. #include "3c509.h"
  10. /*
  11. * This table and several other pieces of the MCA support
  12. * code were shamelessly borrowed from the Linux kernel source.
  13. *
  14. * MCA support added by Adam Fritzler (mid@auk.cx)
  15. *
  16. */
  17. static struct mca_id el3_mca_adapters[] = {
  18. { "3Com 3c529 EtherLink III (10base2)", 0x627c },
  19. { "3Com 3c529 EtherLink III (10baseT)", 0x627d },
  20. { "3Com 3c529 EtherLink III (test mode)", 0x62db },
  21. { "3Com 3c529 EtherLink III (TP or coax)", 0x62f6 },
  22. { "3Com 3c529 EtherLink III (TP)", 0x62f7 },
  23. };
  24. static struct mca_driver t529_driver
  25. = MCA_DRIVER ( "3c529", el3_mca_adapters );
  26. ISA_ROM( "3c529", "3c529 == MCA 3c509" );
  27. static int t529_probe ( struct dev *dev ) {
  28. struct nic *nic = nic_device ( dev );
  29. struct mca_device *mca = mca_device ( dev );
  30. if ( ! find_mca_device ( mca, &t529_driver ) )
  31. return 0;
  32. /* Retrieve NIC parameters from MCA device parameters */
  33. nic->ioaddr = ( ( mca->pos[4] & 0xfc ) | 0x02 ) << 8;
  34. nic->irqno = mca->pos[5] & 0x0f;
  35. printf ( "%s board found on MCA at %#hx IRQ %d -",
  36. dev->name, nic->ioaddr, nic->irqno );
  37. /* Hand off to generic t5x9 probe routine */
  38. return t5x9_probe ( nic, MCA_ID ( mca ), 0xffff );
  39. }
  40. BOOT_DRIVER ( "3c529", t529_probe );