UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Newbie alonz
Newbie
2,856 Views
Registered: ‎11-15-2009

How to use SystemACE to reboot ML510 board

I am using the following (hacky) patch to reboot an ML510 board using the SystemACE:

 

 

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);

 

Any chance of such a change (or an equivalent cleaned-up version :smileywink: going into the main Xilinx git?

 

0 Kudos
1 Reply
Xilinx Employee
Xilinx Employee
2,841 Views
Registered: ‎09-10-2008

Re: How to use SystemACE to reboot ML510 board

Is there some reason you don't want to clean it up and push it to the mainline?

 

I prefer not to put stuff into our tree if it can go into mainline as it's more for us to maintain when merging from mainline.

 

Thanks.

0 Kudos