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 <linux/gpio.h>
  16. #include <asm/mach-types.h>
  17. #include <asm/mach/arch.h>
  18. #include <mach/addr-map.h>
  19. #include <mach/mfp-pxa910.h>
  20. #include <mach/pxa910.h>
  21. #include <mach/irqs.h>
  22. #include "common.h"
  23. static unsigned long tavorevb_pin_config[] __initdata = {
  24. /* UART2 */
  25. GPIO47_UART2_RXD,
  26. GPIO48_UART2_TXD,
  27. /* SMC */
  28. SM_nCS0_nCS0,
  29. SM_ADV_SM_ADV,
  30. SM_SCLK_SM_SCLK,
  31. SM_SCLK_SM_SCLK,
  32. SM_BE0_SM_BE0,
  33. SM_BE1_SM_BE1,
  34. /* DFI */
  35. DF_IO0_ND_IO0,
  36. DF_IO1_ND_IO1,
  37. DF_IO2_ND_IO2,
  38. DF_IO3_ND_IO3,
  39. DF_IO4_ND_IO4,
  40. DF_IO5_ND_IO5,
  41. DF_IO6_ND_IO6,
  42. DF_IO7_ND_IO7,
  43. DF_IO8_ND_IO8,
  44. DF_IO9_ND_IO9,
  45. DF_IO10_ND_IO10,
  46. DF_IO11_ND_IO11,
  47. DF_IO12_ND_IO12,
  48. DF_IO13_ND_IO13,
  49. DF_IO14_ND_IO14,
  50. DF_IO15_ND_IO15,
  51. DF_nCS0_SM_nCS2_nCS0,
  52. DF_ALE_SM_WEn_ND_ALE,
  53. DF_CLE_SM_OEn_ND_CLE,
  54. DF_WEn_DF_WEn,
  55. DF_REn_DF_REn,
  56. DF_RDY0_DF_RDY0,
  57. };
  58. static struct smc91x_platdata tavorevb_smc91x_info = {
  59. .flags = SMC91X_USE_16BIT | SMC91X_NOWAIT,
  60. };
  61. static struct resource smc91x_resources[] = {
  62. [0] = {
  63. .start = SMC_CS1_PHYS_BASE + 0x300,
  64. .end = SMC_CS1_PHYS_BASE + 0xfffff,
  65. .flags = IORESOURCE_MEM,
  66. },
  67. [1] = {
  68. .start = MMP_GPIO_TO_IRQ(80),
  69. .end = MMP_GPIO_TO_IRQ(80),
  70. .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE,
  71. }
  72. };
  73. static struct platform_device smc91x_device = {
  74. .name = "smc91x",
  75. .id = 0,
  76. .dev = {
  77. .platform_data = &tavorevb_smc91x_info,
  78. },
  79. .num_resources = ARRAY_SIZE(smc91x_resources),
  80. .resource = smc91x_resources,
  81. };
  82. static void __init tavorevb_init(void)
  83. {
  84. mfp_config(ARRAY_AND_SIZE(tavorevb_pin_config));
  85. /* on-chip devices */
  86. pxa910_add_uart(1);
  87. platform_device_register(&pxa910_device_gpio);
  88. /* off-chip devices */
  89. platform_device_register(&smc91x_device);
  90. }
  91. MACHINE_START(TAVOREVB, "PXA910 Evaluation Board (aka TavorEVB)")
  92. .map_io = mmp_map_io,
  93. .init_irq = pxa910_init_irq,
  94. .timer = &pxa910_timer,
  95. .init_machine = tavorevb_init,
  96. .restart = mmp_restart,
  97. MACHINE_END