dove-db-setup.c 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. /*
  2. * arch/arm/mach-dove/dove-db-setup.c
  3. *
  4. * Marvell DB-MV88AP510-BP Development Board Setup
  5. *
  6. * This file is licensed under the terms of the GNU General Public
  7. * License version 2. This program is licensed "as is" without any
  8. * warranty of any kind, whether express or implied.
  9. */
  10. #include <linux/kernel.h>
  11. #include <linux/init.h>
  12. #include <linux/platform_device.h>
  13. #include <linux/irq.h>
  14. #include <linux/mtd/physmap.h>
  15. #include <linux/mtd/rawnand.h>
  16. #include <linux/timer.h>
  17. #include <linux/ata_platform.h>
  18. #include <linux/mv643xx_eth.h>
  19. #include <linux/i2c.h>
  20. #include <linux/pci.h>
  21. #include <linux/spi/spi.h>
  22. #include <linux/spi/flash.h>
  23. #include <linux/gpio.h>
  24. #include <asm/mach-types.h>
  25. #include <asm/mach/arch.h>
  26. #include <mach/dove.h>
  27. #include "common.h"
  28. static struct mv643xx_eth_platform_data dove_db_ge00_data = {
  29. .phy_addr = MV643XX_ETH_PHY_ADDR_DEFAULT,
  30. };
  31. static struct mv_sata_platform_data dove_db_sata_data = {
  32. .n_ports = 1,
  33. };
  34. /*****************************************************************************
  35. * SPI Devices:
  36. * SPI0: 4M Flash ST-M25P32-VMF6P
  37. ****************************************************************************/
  38. static const struct flash_platform_data dove_db_spi_flash_data = {
  39. .type = "m25p64",
  40. };
  41. static struct spi_board_info __initdata dove_db_spi_flash_info[] = {
  42. {
  43. .modalias = "m25p80",
  44. .platform_data = &dove_db_spi_flash_data,
  45. .irq = -1,
  46. .max_speed_hz = 20000000,
  47. .bus_num = 0,
  48. .chip_select = 0,
  49. },
  50. };
  51. /*****************************************************************************
  52. * PCI
  53. ****************************************************************************/
  54. static int __init dove_db_pci_init(void)
  55. {
  56. if (machine_is_dove_db())
  57. dove_pcie_init(1, 1);
  58. return 0;
  59. }
  60. subsys_initcall(dove_db_pci_init);
  61. /*****************************************************************************
  62. * Board Init
  63. ****************************************************************************/
  64. static void __init dove_db_init(void)
  65. {
  66. /*
  67. * Basic Dove setup. Needs to be called early.
  68. */
  69. dove_init();
  70. dove_ge00_init(&dove_db_ge00_data);
  71. dove_ehci0_init();
  72. dove_ehci1_init();
  73. dove_sata_init(&dove_db_sata_data);
  74. dove_sdio0_init();
  75. dove_sdio1_init();
  76. dove_spi0_init();
  77. dove_spi1_init();
  78. dove_uart0_init();
  79. dove_uart1_init();
  80. dove_i2c_init();
  81. spi_register_board_info(dove_db_spi_flash_info,
  82. ARRAY_SIZE(dove_db_spi_flash_info));
  83. }
  84. MACHINE_START(DOVE_DB, "Marvell DB-MV88AP510-BP Development Board")
  85. .atag_offset = 0x100,
  86. .nr_irqs = DOVE_NR_IRQS,
  87. .init_machine = dove_db_init,
  88. .map_io = dove_map_io,
  89. .init_early = dove_init_early,
  90. .init_irq = dove_init_irq,
  91. .init_time = dove_timer_init,
  92. .restart = dove_restart,
  93. MACHINE_END