edb9315a.c 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. /*
  2. * arch/arm/mach-ep93xx/edb9315a.c
  3. * Cirrus Logic EDB9315A support.
  4. *
  5. * Copyright (C) 2006 Lennert Buytenhek <buytenh@wantstofly.org>
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation; either version 2 of the License, or (at
  10. * your option) any later version.
  11. */
  12. #include <linux/config.h>
  13. #include <linux/kernel.h>
  14. #include <linux/init.h>
  15. #include <linux/mm.h>
  16. #include <linux/sched.h>
  17. #include <linux/interrupt.h>
  18. #include <linux/ioport.h>
  19. #include <linux/mtd/physmap.h>
  20. #include <linux/platform_device.h>
  21. #include <asm/io.h>
  22. #include <asm/hardware.h>
  23. #include <asm/mach-types.h>
  24. #include <asm/mach/arch.h>
  25. static struct physmap_flash_data edb9315a_flash_data = {
  26. .width = 2,
  27. };
  28. static struct resource edb9315a_flash_resource = {
  29. .start = 0x60000000,
  30. .end = 0x60ffffff,
  31. .flags = IORESOURCE_MEM,
  32. };
  33. static struct platform_device edb9315a_flash = {
  34. .name = "physmap-flash",
  35. .id = 0,
  36. .dev = {
  37. .platform_data = &edb9315a_flash_data,
  38. },
  39. .num_resources = 1,
  40. .resource = &edb9315a_flash_resource,
  41. };
  42. static struct ep93xx_eth_data edb9315a_eth_data = {
  43. .phy_id = 1,
  44. };
  45. static struct resource edb9315a_eth_resource[] = {
  46. {
  47. .start = EP93XX_ETHERNET_PHYS_BASE,
  48. .end = EP93XX_ETHERNET_PHYS_BASE + 0xffff,
  49. .flags = IORESOURCE_MEM,
  50. }, {
  51. .start = IRQ_EP93XX_ETHERNET,
  52. .end = IRQ_EP93XX_ETHERNET,
  53. .flags = IORESOURCE_IRQ,
  54. }
  55. };
  56. static struct platform_device edb9315a_eth_device = {
  57. .name = "ep93xx-eth",
  58. .id = -1,
  59. .dev = {
  60. .platform_data = &edb9315a_eth_data,
  61. },
  62. .num_resources = 2,
  63. .resource = edb9315a_eth_resource,
  64. };
  65. static void __init edb9315a_init_machine(void)
  66. {
  67. ep93xx_init_devices();
  68. platform_device_register(&edb9315a_flash);
  69. memcpy(edb9315a_eth_data.dev_addr,
  70. (void *)(EP93XX_ETHERNET_BASE + 0x50), 6);
  71. platform_device_register(&edb9315a_eth_device);
  72. }
  73. MACHINE_START(EDB9315A, "Cirrus Logic EDB9315A Evaluation Board")
  74. /* Maintainer: Lennert Buytenhek <buytenh@wantstofly.org> */
  75. .phys_io = EP93XX_APB_PHYS_BASE,
  76. .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc,
  77. .boot_params = 0xc0000100,
  78. .map_io = ep93xx_map_io,
  79. .init_irq = ep93xx_init_irq,
  80. .timer = &ep93xx_timer,
  81. .init_machine = edb9315a_init_machine,
  82. MACHINE_END