sead3-net.c 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /*
  2. * This file is subject to the terms and conditions of the GNU General Public
  3. * License. See the file "COPYING" in the main directory of this archive
  4. * for more details.
  5. *
  6. * Copyright (C) 2012 MIPS Technologies, Inc. All rights reserved.
  7. */
  8. #include <linux/module.h>
  9. #include <linux/irq.h>
  10. #include <linux/platform_device.h>
  11. #include <linux/smsc911x.h>
  12. static struct smsc911x_platform_config sead3_smsc911x_data = {
  13. .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW,
  14. .irq_type = SMSC911X_IRQ_TYPE_PUSH_PULL,
  15. .flags = SMSC911X_USE_32BIT | SMSC911X_SAVE_MAC_ADDRESS,
  16. .phy_interface = PHY_INTERFACE_MODE_MII,
  17. };
  18. struct resource sead3_net_resourcess[] = {
  19. {
  20. .start = 0x1f010000,
  21. .end = 0x1f01ffff,
  22. .flags = IORESOURCE_MEM
  23. },
  24. {
  25. .start = MIPS_CPU_IRQ_BASE + 6,
  26. .flags = IORESOURCE_IRQ
  27. }
  28. };
  29. static struct platform_device sead3_net_device = {
  30. .name = "smsc911x",
  31. .id = 0,
  32. .dev = {
  33. .platform_data = &sead3_smsc911x_data,
  34. },
  35. .num_resources = ARRAY_SIZE(sead3_net_resourcess),
  36. .resource = sead3_net_resourcess
  37. };
  38. static int __init sead3_net_init(void)
  39. {
  40. return platform_device_register(&sead3_net_device);
  41. }
  42. module_init(sead3_net_init);
  43. MODULE_AUTHOR("Chris Dearman <chris@mips.com>");
  44. MODULE_LICENSE("GPL");
  45. MODULE_DESCRIPTION("Network probe driver for SEAD-3");