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