linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH/RFC] Booting Xilinx ML510 board using SystemACE
@ 2009-11-15  9:34 Alon Ziv
  2009-11-16 16:23 ` Stephen Neuendorffer
  0 siblings, 1 reply; 5+ messages in thread
From: Alon Ziv @ 2009-11-15  9:34 UTC (permalink / raw)
  To: linuxppc-dev

I am using locally the attached (hackish) patch; could someone propose a
way to make it acceptable to mainline (or should I just keep this
quiet)?

diff --git a/arch/powerpc/platforms/44x/virtex.c
b/arch/powerpc/platforms/44x/virtex.c
index cf96cca..749a330 100644
--- a/arch/powerpc/platforms/44x/virtex.c
+++ b/arch/powerpc/platforms/44x/virtex.c
@@ -51,6 +51,16 @@ static int __init virtex_probe(void)
 	return 1;
 }
=20
+void (*board_reset_system)(char *);
+EXPORT_SYMBOL(board_reset_system);
+
+static void virtex_reset_system(char *cmd)
+{
+	if (board_reset_system)
+		board_reset_system(cmd);
+	ppc4xx_reset_system(cmd);
+}
+
 define_machine(virtex) {
 	.name			=3D "Xilinx Virtex440",
 	.probe			=3D virtex_probe,
@@ -58,5 +68,5 @@ define_machine(virtex) {
 	.init_IRQ		=3D xilinx_intc_init_tree,
 	.get_irq		=3D xilinx_intc_get_irq,
 	.calibrate_decr		=3D generic_calibrate_decr,
-	.restart		=3D ppc4xx_reset_system,
+	.restart		=3D virtex_reset_system,
 };
diff --git a/drivers/block/xsysace.c b/drivers/block/xsysace.c
index b20abe1..f3b4ab9 100644
--- a/drivers/block/xsysace.c
+++ b/drivers/block/xsysace.c
@@ -950,6 +950,19 @@ static struct block_device_operations ace_fops =3D {
 	.getgeo =3D ace_getgeo,
 };
=20
+extern void (*board_reset_system)(char *);
+static struct ace_device *the_ace_device;
+
+/* --------------------------------------------------------------------
+ * Board reset using ACE (forced FPGA reconfigure)
+ */
+static void ace_reset_system(char *cmd)
+{
+	printk(KERN_EMERG "ace_reset_system: attempting suicide\n");
+	ace_out(the_ace_device, ACE_CTRL, ACE_CTRL_FORCECFGMODE |
+		ACE_CTRL_CFGMODE | ACE_CTRL_CFGSTART | ACE_CTRL_CFGSEL);
+}
+
 /* --------------------------------------------------------------------
  * SystemACE device setup/teardown code
  */
@@ -1040,6 +1053,9 @@ static int __devinit ace_setup(struct ace_device
*ace)
 	val |=3D ACE_CTRL_DATABUFRDYIRQ | ACE_CTRL_ERRORIRQ;
 	ace_out(ace, ACE_CTRL, val);
=20
+	board_reset_system =3D ace_reset_system;
+	the_ace_device =3D ace;
+
 	/* Print the identification */
 	dev_info(ace->dev, "Xilinx SystemACE revision %i.%i.%i\n",
 		 (version >> 12) & 0xf, (version >> 8) & 0x0f, version &
0xff);
*************************************************************************=
*********************
IMPORTANT: The contents of this email and any attachments are confidentia=
l. They are intended for the=20
named recipient(s) only.
If you have received this email in error, please notify the system manage=
r or the sender immediately and do=20
not disclose the contents to anyone or make copies thereof.

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-11-20 17:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-15  9:34 [PATCH/RFC] Booting Xilinx ML510 board using SystemACE Alon Ziv
2009-11-16 16:23 ` Stephen Neuendorffer
2009-11-19 12:57   ` Alon Ziv
2009-11-19 17:32     ` Stephen Neuendorffer
2009-11-20 17:25       ` Grant Likely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).