smc91111.c 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /* ASB2303 initialisation
  2. *
  3. * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
  4. * Written by David Howells (dhowells@redhat.com)
  5. *
  6. * This program is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU General Public Licence
  8. * as published by the Free Software Foundation; either version
  9. * 2 of the Licence, or (at your option) any later version.
  10. */
  11. #include <linux/kernel.h>
  12. #include <linux/param.h>
  13. #include <linux/init.h>
  14. #include <linux/platform_device.h>
  15. #include <asm/io.h>
  16. #include <asm/irq.h>
  17. #include <asm/timex.h>
  18. #include <asm/processor.h>
  19. #include <asm/intctl-regs.h>
  20. #include <unit/smc91111.h>
  21. static struct resource smc91c111_resources[] = {
  22. [0] = {
  23. .start = SMC91111_BASE,
  24. .end = SMC91111_BASE_END,
  25. .flags = IORESOURCE_MEM,
  26. },
  27. [1] = {
  28. .start = SMC91111_IRQ,
  29. .end = SMC91111_IRQ,
  30. .flags = IORESOURCE_IRQ,
  31. },
  32. };
  33. static struct platform_device smc91c111_device = {
  34. .name = "smc91x",
  35. .id = 0,
  36. .num_resources = ARRAY_SIZE(smc91c111_resources),
  37. .resource = smc91c111_resources,
  38. };
  39. /*
  40. * add platform devices
  41. */
  42. static int __init unit_device_init(void)
  43. {
  44. platform_device_register(&smc91c111_device);
  45. return 0;
  46. }
  47. device_initcall(unit_device_init);