Thread (2 messages) 2 messages, 2 authors, 2018-05-03

Re: [PATCH NEXT 3/4] powerpc/pasemi: Add Nemo board device init code.

From: Michael Ellerman <mpe@ellerman.id.au>
Date: 2018-05-03 13:06:23

Darren Stevens [off-list ref] writes:
quoted hunk ↗ jump to hunk
diff --git a/arch/powerpc/platforms/pasemi/setup.c b/arch/powerpc/platforms/pasemi/setup.c
index c583c17..8d3664f 100644
--- a/arch/powerpc/platforms/pasemi/setup.c
+++ b/arch/powerpc/platforms/pasemi/setup.c
@@ -73,6 +73,19 @@ static void __noreturn pas_restart(char *cmd)
 		out_le32(reset_reg, 0x6000000);
 }
 
+#ifdef CONFIG_PPC_PASEMI_NEMO
+/* A flag to indicate we are running on Nemo */
+static bool nemo_board = false;
+
+void pas_shutdown(void)
+{
+	/* Set the PLD bit that makes the SB600 think the power button is being pressed */
+	void __iomem *pld_map = ioremap(0xf5000000,4096);
I guess that's not in the device tree anywhere?
quoted hunk ↗ jump to hunk
+	while (1)
+		out_8(pld_map+7,0x01);
+}
+#endif
+
 #ifdef CONFIG_SMP
 static arch_spinlock_t timebase_lock;
 static unsigned long timebase;
@@ -492,6 +505,20 @@ static inline void pasemi_pcmcia_init(void)
 	{},
 };
 
+#ifdef CONFIG_PPC_PASEMI_NEMO
+static struct resource rtc_resource[] = {{
+	.name = "rtc",
+	.start = 0x70,
+	.end = 0x71,
+	.flags = IORESOURCE_IO,
+}, {
+	.name = "rtc",
+	.start = 8,
+	.end = 8,
+	.flags = IORESOURCE_IRQ,
+}};
+#endif
Same question?

cheers
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help