board-lsxl.c 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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/mv643xx_eth.h>
  17. #include "common.h"
  18. static struct mv643xx_eth_platform_data lsxl_ge00_data = {
  19. .phy_addr = MV643XX_ETH_PHY_ADDR(0),
  20. };
  21. static struct mv643xx_eth_platform_data lsxl_ge01_data = {
  22. .phy_addr = MV643XX_ETH_PHY_ADDR(8),
  23. };
  24. /*
  25. * On the LS-XHL/LS-CHLv2, the shutdown process is following:
  26. * - Userland monitors key events until the power switch goes to off position
  27. * - The board reboots
  28. * - U-boot starts and goes into an idle mode waiting for the user
  29. * to move the switch to ON position
  30. *
  31. */
  32. static void lsxl_power_off(void)
  33. {
  34. kirkwood_restart('h', NULL);
  35. }
  36. void __init lsxl_init(void)
  37. {
  38. /*
  39. * Basic setup. Needs to be called early.
  40. */
  41. kirkwood_ge00_init(&lsxl_ge00_data);
  42. kirkwood_ge01_init(&lsxl_ge01_data);
  43. /* register power-off method */
  44. pm_power_off = lsxl_power_off;
  45. }