tavorevb.c 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. /*
  2. * linux/arch/arm/mach-mmp/tavorevb.c
  3. *
  4. * Support for the Marvell PXA910-based TavorEVB Development Platform.
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License version 2 as
  8. * publishhed by the Free Software Foundation.
  9. */
  10. #include <linux/gpio.h>
  11. #include <linux/init.h>
  12. #include <linux/kernel.h>
  13. #include <linux/platform_device.h>
  14. #include <linux/smc91x.h>
  15. #include <asm/mach-types.h>
  16. #include <asm/mach/arch.h>
  17. #include <mach/addr-map.h>
  18. #include <mach/mfp-pxa910.h>
  19. #include <mach/pxa910.h>
  20. #include <mach/irqs.h>
  21. #include "common.h"
  22. static unsigned long tavorevb_pin_config[] __initdata = {
  23. /* UART2 */
  24. GPIO47_UART2_RXD,
  25. GPIO48_UART2_TXD,
  26. /* SMC */
  27. SM_nCS0_nCS0,
  28. SM_ADV_SM_ADV,
  29. SM_SCLK_SM_SCLK,
  30. SM_SCLK_SM_SCLK,
  31. SM_BE0_SM_BE0,
  32. SM_BE1_SM_BE1,
  33. /* DFI */
  34. DF_IO0_ND_IO0,
  35. DF_IO1_ND_IO1,
  36. DF_IO2_ND_IO2,
  37. DF_IO3_ND_IO3,
  38. DF_IO4_ND_IO4,
  39. DF_IO5_ND_IO5,
  40. DF_IO6_ND_IO6,
  41. DF_IO7_ND_IO7,
  42. DF_IO8_ND_IO8,
  43. DF_IO9_ND_IO9,
  44. DF_IO10_ND_IO10,
  45. DF_IO11_ND_IO11,
  46. DF_IO12_ND_IO12,
  47. DF_IO13_ND_IO13,
  48. DF_IO14_ND_IO14,
  49. DF_IO15_ND_IO15,
  50. DF_nCS0_SM_nCS2_nCS0,
  51. DF_ALE_SM_WEn_ND_ALE,
  52. DF_CLE_SM_OEn_ND_CLE,
  53. DF_WEn_DF_WEn,
  54. DF_REn_DF_REn,
  55. DF_RDY0_DF_RDY0,
  56. };
  57. static struct smc91x_platdata tavorevb_smc91x_info = {
  58. .flags = SMC91X_USE_16BIT | SMC91X_NOWAIT,
  59. };
  60. static struct resource smc91x_resources[] = {
  61. [0] = {
  62. .start = SMC_CS1_PHYS_BASE + 0x300,
  63. .end = SMC_CS1_PHYS_BASE + 0xfffff,
  64. .flags = IORESOURCE_MEM,
  65. },
  66. [1] = {
  67. .start = MMP_GPIO_TO_IRQ(80),
  68. .end = MMP_GPIO_TO_IRQ(80),
  69. .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE,
  70. }
  71. };
  72. static struct platform_device smc91x_device = {
  73. .name = "smc91x",
  74. .id = 0,
  75. .dev = {
  76. .platform_data = &tavorevb_smc91x_info,
  77. },
  78. .num_resources = ARRAY_SIZE(smc91x_resources),
  79. .resource = smc91x_resources,
  80. };
  81. static void __init tavorevb_init(void)
  82. {
  83. mfp_config(ARRAY_AND_SIZE(tavorevb_pin_config));
  84. /* on-chip devices */
  85. pxa910_add_uart(1);
  86. platform_device_register(&pxa910_device_gpio);
  87. /* off-chip devices */
  88. platform_device_register(&smc91x_device);
  89. }
  90. MACHINE_START(TAVOREVB, "PXA910 Evaluation Board (aka TavorEVB)")
  91. .map_io = mmp_map_io,
  92. .nr_irqs = MMP_NR_IRQS,
  93. .init_irq = pxa910_init_irq,
  94. .timer = &pxa910_timer,
  95. .init_machine = tavorevb_init,
  96. .restart = mmp_restart,
  97. MACHINE_END