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/timex.h>
  17. #include <asm/processor.h>
  18. #include <asm/intctl-regs.h>
  19. #include <unit/smc91111.h>
  20. static struct resource smc91c111_resources[] = {
  21. [0] = {
  22. .start = SMC91111_BASE,
  23. .end = SMC91111_BASE_END,
  24. .flags = IORESOURCE_MEM,
  25. },
  26. [1] = {
  27. .start = SMC91111_IRQ,
  28. .end = SMC91111_IRQ,
  29. .flags = IORESOURCE_IRQ,
  30. },
  31. };
  32. static struct platform_device smc91c111_device = {
  33. .name = "smc91x",
  34. .id = 0,
  35. .num_resources = ARRAY_SIZE(smc91c111_resources),
  36. .resource = smc91c111_resources,
  37. };
  38. /*
  39. * add platform devices
  40. */
  41. static int __init unit_device_init(void)
  42. {
  43. platform_device_register(&smc91c111_device);
  44. return 0;
  45. }
  46. device_initcall(unit_device_init);