Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a1ec6003 authored by Paul Burton's avatar Paul Burton Committed by Ralf Baechle
Browse files

MIPS: SEAD3: Use generic restart-poweroff driver



Remove the custom platform code to restart when instructed to power off,
instead relying upon the generic restart-poweroff driver probed via DT
to do the same thing.

Remove also the halt implementation, which is incorrect. The generic
MIPS version will hang the system as halt should.

Signed-off-by: default avatarPaul Burton <paul.burton@imgtec.com>
Cc: Jacek Anaszewski <j.anaszewski@samsung.com>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: linux-mips@linux-mips.org
Cc: devicetree@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/14057/


Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent 70bfdcec
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
@@ -103,6 +103,10 @@
			offset = <0x50>;
			offset = <0x50>;
			mask = <0x4d>;
			mask = <0x4d>;
		};
		};

		poweroff {
			compatible = "restart-poweroff";
		};
	};
	};


	system-controller@1f000200 {
	system-controller@1f000200 {
+1 −0
Original line number Original line Diff line number Diff line
@@ -81,6 +81,7 @@ CONFIG_I2C_CHARDEV=y
# CONFIG_I2C_HELPER_AUTO is not set
# CONFIG_I2C_HELPER_AUTO is not set
CONFIG_SPI=y
CONFIG_SPI=y
CONFIG_POWER_RESET=y
CONFIG_POWER_RESET=y
CONFIG_POWER_RESET_RESTART=y
CONFIG_POWER_RESET_SYSCON=y
CONFIG_POWER_RESET_SYSCON=y
CONFIG_SENSORS_ADT7475=y
CONFIG_SENSORS_ADT7475=y
CONFIG_BACKLIGHT_LCD_SUPPORT=y
CONFIG_BACKLIGHT_LCD_SUPPORT=y
+0 −1
Original line number Original line Diff line number Diff line
@@ -13,6 +13,5 @@ obj-y += sead3-display.o
obj-y += sead3-dtshim.o
obj-y += sead3-dtshim.o
obj-y += sead3-init.o
obj-y += sead3-init.o
obj-y += sead3-int.o
obj-y += sead3-int.o
obj-y += sead3-reset.o
obj-y += sead3-setup.o
obj-y += sead3-setup.o
obj-y += sead3-time.o
obj-y += sead3-time.o

arch/mips/mti-sead3/sead3-reset.c

deleted100644 → 0
+0 −31
Original line number Original line Diff line number Diff line
/*
 * This file is subject to the terms and conditions of the GNU General Public
 * License.  See the file "COPYING" in the main directory of this archive
 * for more details.
 *
 * Copyright (C) 2012 MIPS Technologies, Inc.  All rights reserved.
 */
#include <linux/io.h>
#include <linux/pm.h>

#include <asm/reboot.h>

#define SOFTRES_REG	0x1f000050
#define GORESET		0x4d

static void mips_machine_halt(void)
{
	unsigned int __iomem *softres_reg =
		ioremap(SOFTRES_REG, sizeof(unsigned int));

	__raw_writel(GORESET, softres_reg);
}

static int __init mips_reboot_setup(void)
{
	_machine_halt = mips_machine_halt;
	pm_power_off = mips_machine_halt;

	return 0;
}
arch_initcall(mips_reboot_setup);