From: Paul Burton <paul.burton@imgtec.com>
To: linux-mips@linux-mips.org, Ralf Baechle <ralf@linux-mips.org>
Cc: Paul Burton <paul.burton@imgtec.com>,
devicetree@vger.kernel.org,
Jacek Anaszewski <j.anaszewski@samsung.com>,
linux-kernel@vger.kernel.org, Rob Herring <robh+dt@kernel.org>,
Mark Rutland <mark.rutland@arm.com>
Subject: [PATCH v2 12/19] MIPS: SEAD3: Use generic restart-poweroff driver
Date: Fri, 26 Aug 2016 15:17:44 +0100 [thread overview]
Message-ID: <20160826141751.13121-13-paul.burton@imgtec.com> (raw)
In-Reply-To: <20160826141751.13121-1-paul.burton@imgtec.com>
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: Paul Burton <paul.burton@imgtec.com>
---
Changes in v2: None
arch/mips/boot/dts/mti/sead3.dts | 4 ++++
arch/mips/configs/sead3_defconfig | 1 +
arch/mips/mti-sead3/Makefile | 1 -
arch/mips/mti-sead3/sead3-reset.c | 31 -------------------------------
4 files changed, 5 insertions(+), 32 deletions(-)
delete mode 100644 arch/mips/mti-sead3/sead3-reset.c
diff --git a/arch/mips/boot/dts/mti/sead3.dts b/arch/mips/boot/dts/mti/sead3.dts
index 047ff7a..32a5ab9 100644
--- a/arch/mips/boot/dts/mti/sead3.dts
+++ b/arch/mips/boot/dts/mti/sead3.dts
@@ -103,6 +103,10 @@
offset = <0x50>;
mask = <0x4d>;
};
+
+ poweroff {
+ compatible = "restart-poweroff";
+ };
};
system-controller@1f000200 {
diff --git a/arch/mips/configs/sead3_defconfig b/arch/mips/configs/sead3_defconfig
index 055af30..ab4c465 100644
--- a/arch/mips/configs/sead3_defconfig
+++ b/arch/mips/configs/sead3_defconfig
@@ -81,6 +81,7 @@ CONFIG_I2C_CHARDEV=y
# CONFIG_I2C_HELPER_AUTO is not set
CONFIG_SPI=y
CONFIG_POWER_RESET=y
+CONFIG_POWER_RESET_RESTART=y
CONFIG_POWER_RESET_SYSCON=y
CONFIG_SENSORS_ADT7475=y
CONFIG_BACKLIGHT_LCD_SUPPORT=y
diff --git a/arch/mips/mti-sead3/Makefile b/arch/mips/mti-sead3/Makefile
index 04ea002..ad722c8 100644
--- a/arch/mips/mti-sead3/Makefile
+++ b/arch/mips/mti-sead3/Makefile
@@ -13,6 +13,5 @@ obj-y += sead3-display.o
obj-y += sead3-dtshim.o
obj-y += sead3-init.o
obj-y += sead3-int.o
-obj-y += sead3-reset.o
obj-y += sead3-setup.o
obj-y += sead3-time.o
diff --git a/arch/mips/mti-sead3/sead3-reset.c b/arch/mips/mti-sead3/sead3-reset.c
deleted file mode 100644
index 8f548f0..0000000
--- a/arch/mips/mti-sead3/sead3-reset.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * 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);
--
2.9.3
next prev parent reply other threads:[~2016-08-26 14:17 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-26 14:17 [PATCH v2 00/19] MIPS: SEAD3 device tree conversion Paul Burton
2016-08-26 14:17 ` [PATCH v2 02/19] MIPS: SEAD3: Probe interrupt controllers using DT Paul Burton
2016-08-26 14:17 ` [PATCH v2 03/19] MIPS: SEAD3: Probe UARTs " Paul Burton
2016-08-26 14:17 ` [PATCH v2 05/19] MIPS: SEAD3: Probe ethernet controller " Paul Burton
2016-08-26 14:17 ` [PATCH v2 06/19] MIPS: SEAD3: Probe EHCI " Paul Burton
2016-08-26 14:17 ` [PATCH v2 08/19] SEAD3: Probe parallel flash via DT Paul Burton
2016-08-26 14:17 ` [PATCH v2 09/19] MIPS: SEAD3: Use register-bit-led driver via DT for LEDs Paul Burton
2016-08-26 14:17 ` [PATCH v2 11/19] MIPS: SEAD3: Reset via generic syscon-reboot driver & DT Paul Burton
2016-08-26 14:17 ` Paul Burton [this message]
2016-08-26 14:17 ` [PATCH v2 16/19] dt-bindings: img-ascii-lcd: Document a binding for simple ASCII LCDs Paul Burton
[not found] ` <20160826141751.13121-17-paul.burton-1AXoQHu6uovQT0dZR+AlfA@public.gmane.org>
2016-08-31 16:18 ` Rob Herring
2016-08-26 14:17 ` [PATCH v2 18/19] MIPS: SEAD3: Use img-ascii-lcd driver Paul Burton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160826141751.13121-13-paul.burton@imgtec.com \
--to=paul.burton@imgtec.com \
--cc=devicetree@vger.kernel.org \
--cc=j.anaszewski@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=mark.rutland@arm.com \
--cc=ralf@linux-mips.org \
--cc=robh+dt@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox