db88f6281-bp-setup.c 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. /*
  2. * arch/arm/mach-kirkwood/db88f6281-bp-setup.c
  3. *
  4. * Marvell DB-88F6281-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/pci.h>
  14. #include <linux/irq.h>
  15. #include <linux/mtd/physmap.h>
  16. #include <linux/mtd/nand.h>
  17. #include <linux/timer.h>
  18. #include <linux/ata_platform.h>
  19. #include <linux/mv643xx_eth.h>
  20. #include <asm/mach-types.h>
  21. #include <asm/mach/arch.h>
  22. #include <asm/mach/pci.h>
  23. #include <mach/kirkwood.h>
  24. #include <plat/mvsdio.h>
  25. #include "common.h"
  26. #include "mpp.h"
  27. static struct mv643xx_eth_platform_data db88f6281_ge00_data = {
  28. .phy_addr = MV643XX_ETH_PHY_ADDR(8),
  29. };
  30. static struct mv_sata_platform_data db88f6281_sata_data = {
  31. .n_ports = 2,
  32. };
  33. static struct mvsdio_platform_data db88f6281_mvsdio_data = {
  34. .gpio_write_protect = 37,
  35. .gpio_card_detect = 38,
  36. };
  37. static unsigned int db88f6281_mpp_config[] __initdata = {
  38. MPP37_GPIO,
  39. MPP38_GPIO,
  40. 0
  41. };
  42. static void __init db88f6281_init(void)
  43. {
  44. /*
  45. * Basic setup. Needs to be called early.
  46. */
  47. kirkwood_init();
  48. kirkwood_mpp_conf(db88f6281_mpp_config);
  49. kirkwood_ehci_init();
  50. kirkwood_ge00_init(&db88f6281_ge00_data);
  51. kirkwood_rtc_init();
  52. kirkwood_sata_init(&db88f6281_sata_data);
  53. kirkwood_uart0_init();
  54. kirkwood_sdio_init(&db88f6281_mvsdio_data);
  55. }
  56. static int __init db88f6281_pci_init(void)
  57. {
  58. if (machine_is_db88f6281_bp())
  59. kirkwood_pcie_init();
  60. return 0;
  61. }
  62. subsys_initcall(db88f6281_pci_init);
  63. MACHINE_START(DB88F6281_BP, "Marvell DB-88F6281-BP Development Board")
  64. /* Maintainer: Saeed Bishara <saeed@marvell.com> */
  65. .phys_io = KIRKWOOD_REGS_PHYS_BASE,
  66. .io_pg_offst = ((KIRKWOOD_REGS_VIRT_BASE) >> 18) & 0xfffc,
  67. .boot_params = 0x00000100,
  68. .init_machine = db88f6281_init,
  69. .map_io = kirkwood_map_io,
  70. .init_irq = kirkwood_init_irq,
  71. .timer = &kirkwood_timer,
  72. MACHINE_END