board-dreamplug.c 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. /*
  2. * Copyright 2012 (C), Jason Cooper <jason@lakedaemon.net>
  3. *
  4. * arch/arm/mach-kirkwood/board-dreamplug.c
  5. *
  6. * Marvell DreamPlug Reference Board Init for drivers not converted to
  7. * flattened device tree yet.
  8. *
  9. * This file is licensed under the terms of the GNU General Public
  10. * License version 2. This program is licensed "as is" without any
  11. * warranty of any kind, whether express or implied.
  12. */
  13. #include <linux/kernel.h>
  14. #include <linux/init.h>
  15. #include <linux/platform_device.h>
  16. #include <linux/ata_platform.h>
  17. #include <linux/mv643xx_eth.h>
  18. #include <linux/of.h>
  19. #include <linux/of_address.h>
  20. #include <linux/of_fdt.h>
  21. #include <linux/of_irq.h>
  22. #include <linux/of_platform.h>
  23. #include <linux/gpio.h>
  24. #include <linux/mtd/physmap.h>
  25. #include <linux/spi/flash.h>
  26. #include <linux/spi/spi.h>
  27. #include <asm/mach-types.h>
  28. #include <asm/mach/arch.h>
  29. #include <asm/mach/map.h>
  30. #include <mach/kirkwood.h>
  31. #include <mach/bridge-regs.h>
  32. #include <linux/platform_data/mmc-mvsdio.h>
  33. #include "common.h"
  34. #include "mpp.h"
  35. static struct mv643xx_eth_platform_data dreamplug_ge00_data = {
  36. .phy_addr = MV643XX_ETH_PHY_ADDR(0),
  37. };
  38. static struct mv643xx_eth_platform_data dreamplug_ge01_data = {
  39. .phy_addr = MV643XX_ETH_PHY_ADDR(1),
  40. };
  41. static struct mvsdio_platform_data dreamplug_mvsdio_data = {
  42. /* unfortunately the CD signal has not been connected */
  43. };
  44. static unsigned int dreamplug_mpp_config[] __initdata = {
  45. MPP0_SPI_SCn,
  46. MPP1_SPI_MOSI,
  47. MPP2_SPI_SCK,
  48. MPP3_SPI_MISO,
  49. MPP47_GPIO, /* Bluetooth LED */
  50. MPP48_GPIO, /* Wifi LED */
  51. MPP49_GPIO, /* Wifi AP LED */
  52. 0
  53. };
  54. void __init dreamplug_init(void)
  55. {
  56. /*
  57. * Basic setup. Needs to be called early.
  58. */
  59. kirkwood_mpp_conf(dreamplug_mpp_config);
  60. kirkwood_ehci_init();
  61. kirkwood_ge00_init(&dreamplug_ge00_data);
  62. kirkwood_ge01_init(&dreamplug_ge01_data);
  63. kirkwood_sdio_init(&dreamplug_mvsdio_data);
  64. }