- while (1) ; /* Not reached */
-
- } else if (strcmp(argv[1], "altbank") == 0) {
-
- /*
- * Reset using alternate flash bank:
- */
- if (argv[2] == 0) {
- /*
- * Reset from alternate bank without changing
- * frequency and without watchdog timer enabled.
- * altbank
- */
- read_from_px_regs(0);
- read_from_px_regs_altbank(0);
- if (argc > 2) {
- puts(cmdtp->usage);
- return 1;
- }
- puts("Setting registers VCFGNE1, VBOOT, and VCTL\n");
- set_altbank();
- read_from_px_regs_altbank(1);
- puts("Resetting board to boot from the other bank.\n");
- set_px_go();
-
- } else if (strcmp(argv[2], "cf") == 0) {
- /*
- * Reset with frequency changed
- * altbank cf <SYSCLK freq> <COREPLL ratio>
- * <MPXPLL ratio>
- */
- read_from_px_regs(0);
- read_from_px_regs_altbank(0);
- val = set_px_sysclk(simple_strtoul(argv[3], NULL, 10));
- corepll = strfractoint((uchar *)argv[4]);
- val = val + set_px_corepll(corepll);
- val = val + set_px_mpxpll(simple_strtoul(argv[5],
- NULL, 10));
- if (val == 3) {
- puts("Setting registers VCFGEN0, VCFGEN1, VBOOT, and VCTL\n");
- set_altbank();
- read_from_px_regs(1);
- read_from_px_regs_altbank(1);
- puts("Enabling watchdog timer on the FPGA\n");
- puts("Resetting board with values from ");
- puts("VSPEED0, VSPEED1, VCLKH and VCLKL ");
- puts("to boot from the other bank.\n");
- set_px_go_with_watchdog();
- } else {
- puts(cmdtp->usage);
- return 1;
- }