[PATCH linux dev-4.10] ARM: aspeed: witherspoon: Add reset tolerance for host power GPIOs

Andrew Jeffery andrew at aj.id.au
Fri Jul 7 17:25:44 AEST 2017


Enables the host to stay up across BMC reboots. This is a temporary
approach. Ultimately bindings support and reset tolerance capability
will be added to the GPIO driver, and the behaviour will be described
in the devicetree.

Signed-off-by: Andrew Jeffery <andrew at aj.id.au>
---
 arch/arm/mach-aspeed/aspeed.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/arch/arm/mach-aspeed/aspeed.c b/arch/arm/mach-aspeed/aspeed.c
index 74611a9c2c79..100805e8c263 100644
--- a/arch/arm/mach-aspeed/aspeed.c
+++ b/arch/arm/mach-aspeed/aspeed.c
@@ -177,7 +177,17 @@ static void __init do_zaius_setup(void)
 
 static void __init do_witherspoon_setup(void)
 {
+	unsigned long reg;
+
 	do_common_setup();
+
+	/* Reset tolerance for BMC_POWER_UP (GPIOD1) */
+	reg = readl(AST_IO(AST_BASE_GPIO | 0x01C));
+	writel(reg | BIT(25), AST_IO(AST_BASE_GPIO | 0x01C));
+
+	/* Reset tolerance for SOFTWARE_PGOOD (GPIOR1) */
+	reg = readl(AST_IO(AST_BASE_GPIO | 0x12C));
+	writel(reg | BIT(9), AST_IO(AST_BASE_GPIO | 0x12C));
 }
 
 static void __init do_romulus_setup(void)
-- 
2.11.0



More information about the openbmc mailing list