board-lsxl.c 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /*
  2. * Copyright 2012 (C), Michael Walle <michael@walle.cc>
  3. *
  4. * arch/arm/mach-kirkwood/board-lsxl.c
  5. *
  6. * Buffalo Linkstation LS-XHL and LS-CHLv2 init for drivers not
  7. * converted to 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/mtd/partitions.h>
  17. #include <linux/ata_platform.h>
  18. #include <linux/spi/flash.h>
  19. #include <linux/spi/spi.h>
  20. #include <linux/mv643xx_eth.h>
  21. #include "common.h"
  22. static struct mv643xx_eth_platform_data lsxl_ge00_data = {
  23. .phy_addr = MV643XX_ETH_PHY_ADDR(0),
  24. };
  25. static struct mv643xx_eth_platform_data lsxl_ge01_data = {
  26. .phy_addr = MV643XX_ETH_PHY_ADDR(8),
  27. };
  28. /*
  29. * On the LS-XHL/LS-CHLv2, the shutdown process is following:
  30. * - Userland monitors key events until the power switch goes to off position
  31. * - The board reboots
  32. * - U-boot starts and goes into an idle mode waiting for the user
  33. * to move the switch to ON position
  34. *
  35. */
  36. static void lsxl_power_off(void)
  37. {
  38. kirkwood_restart('h', NULL);
  39. }
  40. void __init lsxl_init(void)
  41. {
  42. /*
  43. * Basic setup. Needs to be called early.
  44. */
  45. kirkwood_ge00_init(&lsxl_ge00_data);
  46. kirkwood_ge01_init(&lsxl_ge01_data);
  47. /* register power-off method */
  48. pm_power_off = lsxl_power_off;
  49. }