tepla.c 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /*
  2. * File: arch/blackfin/mach-bf561/tepla.c
  3. *
  4. * Copyright 2004-2007 Analog Devices Inc.
  5. * Only SMSC91C1111 was registered, may do more later.
  6. *
  7. * Copyright 2005 National ICT Australia (NICTA), Aidan Williams <aidan@nicta.com.au>
  8. * Thanks to Jamey Hicks.
  9. *
  10. * This program is free software; you can redistribute it and/or modify
  11. * it under the terms of the GNU General Public License version 2 as
  12. * published by the Free Software Foundation.
  13. */
  14. #include <linux/device.h>
  15. #include <linux/platform_device.h>
  16. #include <linux/irq.h>
  17. char *bfin_board_name = "Tepla-BF561";
  18. /*
  19. * Driver needs to know address, irq and flag pin.
  20. */
  21. static struct resource smc91x_resources[] = {
  22. {
  23. .start = 0x2C000300,
  24. .end = 0x2C000320,
  25. .flags = IORESOURCE_MEM,
  26. }, {
  27. .start = IRQ_PROG_INTB,
  28. .end = IRQ_PROG_INTB,
  29. .flags = IORESOURCE_IRQ|IORESOURCE_IRQ_HIGHLEVEL,
  30. }, {
  31. /*
  32. * denotes the flag pin and is used directly if
  33. * CONFIG_IRQCHIP_DEMUX_GPIO is defined.
  34. */
  35. .start = IRQ_PF7,
  36. .end = IRQ_PF7,
  37. .flags = IORESOURCE_IRQ|IORESOURCE_IRQ_HIGHLEVEL,
  38. },
  39. };
  40. static struct platform_device smc91x_device = {
  41. .name = "smc91x",
  42. .id = 0,
  43. .num_resources = ARRAY_SIZE(smc91x_resources),
  44. .resource = smc91x_resources,
  45. };
  46. static struct platform_device *tepla_devices[] __initdata = {
  47. &smc91x_device,
  48. };
  49. static int __init tepla_init(void)
  50. {
  51. printk(KERN_INFO "%s(): registering device resources\n", __FUNCTION__);
  52. return platform_add_devices(tepla_devices, ARRAY_SIZE(tepla_devices));
  53. }
  54. arch_initcall(tepla_init);