aspenite.c 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. /*
  2. * linux/arch/arm/mach-mmp/aspenite.c
  3. *
  4. * Support for the Marvell PXA168-based Aspenite and Zylonite2
  5. * Development Platform.
  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 version 2 as
  9. * publishhed by the Free Software Foundation.
  10. */
  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-pxa168.h>
  19. #include <mach/pxa168.h>
  20. #include <mach/gpio.h>
  21. #include "common.h"
  22. static unsigned long common_pin_config[] __initdata = {
  23. /* Data Flash Interface */
  24. GPIO0_DFI_D15,
  25. GPIO1_DFI_D14,
  26. GPIO2_DFI_D13,
  27. GPIO3_DFI_D12,
  28. GPIO4_DFI_D11,
  29. GPIO5_DFI_D10,
  30. GPIO6_DFI_D9,
  31. GPIO7_DFI_D8,
  32. GPIO8_DFI_D7,
  33. GPIO9_DFI_D6,
  34. GPIO10_DFI_D5,
  35. GPIO11_DFI_D4,
  36. GPIO12_DFI_D3,
  37. GPIO13_DFI_D2,
  38. GPIO14_DFI_D1,
  39. GPIO15_DFI_D0,
  40. /* Static Memory Controller */
  41. GPIO18_SMC_nCS0,
  42. GPIO34_SMC_nCS1,
  43. GPIO23_SMC_nLUA,
  44. GPIO25_SMC_nLLA,
  45. GPIO28_SMC_RDY,
  46. GPIO29_SMC_SCLK,
  47. GPIO35_SMC_BE1,
  48. GPIO36_SMC_BE2,
  49. GPIO27_GPIO, /* Ethernet IRQ */
  50. /* UART1 */
  51. GPIO107_UART1_RXD,
  52. GPIO108_UART1_TXD,
  53. };
  54. static struct smc91x_platdata smc91x_info = {
  55. .flags = SMC91X_USE_16BIT | SMC91X_NOWAIT,
  56. };
  57. static struct resource smc91x_resources[] = {
  58. [0] = {
  59. .start = SMC_CS1_PHYS_BASE + 0x300,
  60. .end = SMC_CS1_PHYS_BASE + 0xfffff,
  61. .flags = IORESOURCE_MEM,
  62. },
  63. [1] = {
  64. .start = gpio_to_irq(27),
  65. .end = gpio_to_irq(27),
  66. .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE,
  67. }
  68. };
  69. static struct platform_device smc91x_device = {
  70. .name = "smc91x",
  71. .id = 0,
  72. .dev = {
  73. .platform_data = &smc91x_info,
  74. },
  75. .num_resources = ARRAY_SIZE(smc91x_resources),
  76. .resource = smc91x_resources,
  77. };
  78. static void __init common_init(void)
  79. {
  80. mfp_config(ARRAY_AND_SIZE(common_pin_config));
  81. /* on-chip devices */
  82. pxa168_add_uart(1);
  83. /* off-chip devices */
  84. platform_device_register(&smc91x_device);
  85. }
  86. MACHINE_START(ASPENITE, "PXA168-based Aspenite Development Platform")
  87. .phys_io = APB_PHYS_BASE,
  88. .boot_params = 0x00000100,
  89. .io_pg_offst = (APB_VIRT_BASE >> 18) & 0xfffc,
  90. .map_io = pxa_map_io,
  91. .init_irq = pxa168_init_irq,
  92. .timer = &pxa168_timer,
  93. .init_machine = common_init,
  94. MACHINE_END
  95. MACHINE_START(ZYLONITE2, "PXA168-based Zylonite2 Development Platform")
  96. .phys_io = APB_PHYS_BASE,
  97. .boot_params = 0x00000100,
  98. .io_pg_offst = (APB_VIRT_BASE >> 18) & 0xfffc,
  99. .map_io = pxa_map_io,
  100. .init_irq = pxa168_init_irq,
  101. .timer = &pxa168_timer,
  102. .init_machine = common_init,
  103. MACHINE_END