SAM460 shutdown command
Posted: Sat Jan 05, 2013 6:40 pm
Hi just bought a SAM460 and installed fine AmigaOS4.1 
Just wonder if there is a REBOOT comand a SHUTDOWN could be doable.
Lurking in uboot sources found in SAM460.c source:void do_shutdown(void)
#define CONFIG_SYS_FPGA_BASE 0xFF000000
{
u16 fpga_val;
fpga_val = 0x000f;
out_be16((void *)CONFIG_SYS_FPGA_BASE + 0x2E, fpga_val);
wait_ms(300);
fpga_val = 0x0000;
out_be16((void *)CONFIG_SYS_FPGA_BASE + 0x2E, fpga_val);
wait_ms(300);
fpga_val = 0x000f;
out_be16((void *)CONFIG_SYS_FPGA_BASE + 0x2E, fpga_val);
wait_ms(300);
fpga_val = 0x0010;
out_be16((void *)CONFIG_SYS_FPGA_BASE + 0x2E, fpga_val);
while(1); // never return
}
Could this be "ported" to a shutdown command (for AOS4.1) using the fpga resource?
Or I'm I mixing "internal" uboot+fpga registers with fpga resource in SDK?
TIA

Just wonder if there is a REBOOT comand a SHUTDOWN could be doable.
Lurking in uboot sources found in SAM460.c source:void do_shutdown(void)
#define CONFIG_SYS_FPGA_BASE 0xFF000000
{
u16 fpga_val;
fpga_val = 0x000f;
out_be16((void *)CONFIG_SYS_FPGA_BASE + 0x2E, fpga_val);
wait_ms(300);
fpga_val = 0x0000;
out_be16((void *)CONFIG_SYS_FPGA_BASE + 0x2E, fpga_val);
wait_ms(300);
fpga_val = 0x000f;
out_be16((void *)CONFIG_SYS_FPGA_BASE + 0x2E, fpga_val);
wait_ms(300);
fpga_val = 0x0010;
out_be16((void *)CONFIG_SYS_FPGA_BASE + 0x2E, fpga_val);
while(1); // never return
}
Could this be "ported" to a shutdown command (for AOS4.1) using the fpga resource?
Or I'm I mixing "internal" uboot+fpga registers with fpga resource in SDK?
TIA