ARM: Kirkwood: Convert LSXL to restart-poweroff driver.
Add a device tree node and remove the C code. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Tested-by: Michael Walle <michael@walle.cc> Signed-off-by: Jason Cooper <jason@lakedaemon.net>
This commit is contained in:
committed by
Jason Cooper
parent
4350a47bba
commit
391a16c778
@@ -172,6 +172,10 @@
|
|||||||
alarm-gpios = <&gpio1 8 0>;
|
alarm-gpios = <&gpio1 8 0>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
restart_poweroff {
|
||||||
|
compatible = "restart-poweroff";
|
||||||
|
};
|
||||||
|
|
||||||
regulators {
|
regulators {
|
||||||
compatible = "simple-bus";
|
compatible = "simple-bus";
|
||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
|
@@ -227,6 +227,7 @@ config MACH_KM_KIRKWOOD_DT
|
|||||||
config MACH_LSXL_DT
|
config MACH_LSXL_DT
|
||||||
bool "Buffalo Linkstation LS-XHL, LS-CHLv2 (Flattened Device Tree)"
|
bool "Buffalo Linkstation LS-XHL, LS-CHLv2 (Flattened Device Tree)"
|
||||||
select ARCH_KIRKWOOD_DT
|
select ARCH_KIRKWOOD_DT
|
||||||
|
select POWER_RESET_RESTART
|
||||||
help
|
help
|
||||||
Say 'Y' here if you want your kernel to support the
|
Say 'Y' here if you want your kernel to support the
|
||||||
Buffalo Linkstation LS-XHL & LS-CHLv2 devices, using
|
Buffalo Linkstation LS-XHL & LS-CHLv2 devices, using
|
||||||
|
@@ -25,19 +25,6 @@ static struct mv643xx_eth_platform_data lsxl_ge01_data = {
|
|||||||
.phy_addr = MV643XX_ETH_PHY_ADDR(8),
|
.phy_addr = MV643XX_ETH_PHY_ADDR(8),
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
|
||||||
* On the LS-XHL/LS-CHLv2, the shutdown process is following:
|
|
||||||
* - Userland monitors key events until the power switch goes to off position
|
|
||||||
* - The board reboots
|
|
||||||
* - U-boot starts and goes into an idle mode waiting for the user
|
|
||||||
* to move the switch to ON position
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
static void lsxl_power_off(void)
|
|
||||||
{
|
|
||||||
kirkwood_restart('h', NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
void __init lsxl_init(void)
|
void __init lsxl_init(void)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
@@ -46,7 +33,4 @@ void __init lsxl_init(void)
|
|||||||
|
|
||||||
kirkwood_ge00_init(&lsxl_ge00_data);
|
kirkwood_ge00_init(&lsxl_ge00_data);
|
||||||
kirkwood_ge01_init(&lsxl_ge01_data);
|
kirkwood_ge01_init(&lsxl_ge01_data);
|
||||||
|
|
||||||
/* register power-off method */
|
|
||||||
pm_power_off = lsxl_power_off;
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user