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;
 }
 
+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                   = "Xilinx Virtex440",
        .probe                  = virtex_probe,
@@ -58,5 +68,5 @@ define_machine(virtex) {
        .init_IRQ               = xilinx_intc_init_tree,
        .get_irq                = xilinx_intc_get_irq,
        .calibrate_decr         = generic_calibrate_decr,
-       .restart                = ppc4xx_reset_system,
+       .restart                = 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 = {
        .getgeo = ace_getgeo,
 };
 
+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 |= ACE_CTRL_DATABUFRDYIRQ | ACE_CTRL_ERRORIRQ;
        ace_out(ace, ACE_CTRL, val);
 
+       board_reset_system = ace_reset_system;
+       the_ace_device = 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 confidential. 
They are intended for the 
named recipient(s) only.
If you have received this email in error, please notify the system manager or 
the sender immediately and do 
not disclose the contents to anyone or make copies thereof.


_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Reply via email to