From patchwork Sun Nov 15 09:34:26 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alon Ziv X-Patchwork-Id: 38447 X-Patchwork-Delegate: grant.likely@secretlab.ca Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from bilbo.ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id 6A1ED100816 for ; Sun, 15 Nov 2009 22:03:21 +1100 (EST) Received: from mail.discretix.com (mail.discretix.com [192.116.217.178]) by ozlabs.org (Postfix) with SMTP id 73C15B7B60 for ; Sun, 15 Nov 2009 20:45:50 +1100 (EST) Received: from Exchange.discretix.com ([192.116.217.170]) by eSafe SMTP Relay 1256458625; Sun, 15 Nov 2009 11:32:35 +0200 X-MimeOLE: Produced By Microsoft Exchange V6.5 MIME-Version: 1.0 x-cr-puzzleid: {71E30DBB-4FC8-49E5-8745-EF73C1723D0E} x-cr-hashedpuzzle: sEk= AthN A82z BKUZ Baem CrHZ C1Ar DFqS DiWE EKSB Go7K Gwok HXQv H1JV IMST IYWJ; 1; bABpAG4AdQB4AHAAcABjAC0AZABlAHYAQABsAGkAcwB0AHMALgBvAHoAbABhAGIAcwAuAG8AcgBnAA==; Sosha1_v1; 7; {71E30DBB-4FC8-49E5-8745-EF73C1723D0E}; YQBsAG8AbgB6AEAAZABpAHMAYwByAGUAdABpAHgALgBjAG8AbQA=; Sun, 15 Nov 2009 09:34:26 GMT; WwBQAEEAVABDAEgALwBSAEYAQwBdACAAQgBvAG8AdABpAG4AZwAgAFgAaQBsAGkAbgB4ACAATQBMADUAMQAwACAAYgBvAGEAcgBkACAAdQBzAGkAbgBnACAAUwB5AHMAdABlAG0AQQBDAEUA Content-class: urn:content-classes:message Subject: [PATCH/RFC] Booting Xilinx ML510 board using SystemACE Date: Sun, 15 Nov 2009 11:34:26 +0200 Message-ID: <8B957E110B62714A84290A01A597805F05CA0AA1@Exchange.discretix.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [PATCH/RFC] Booting Xilinx ML510 board using SystemACE Thread-Index: Acpl1tKTHdTVYm9BTsunOZcr9vEGVA== From: "Alon Ziv" To: "linuxppc-dev" X-ESAFE-STATUS: Mail clean X-ESAFE-DETAILS: X-Mailman-Approved-At: Sun, 15 Nov 2009 22:03:05 +1100 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org 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)? (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. 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",