diff options
author | Leo C | 2014-10-16 11:08:47 +0200 |
---|---|---|
committer | Leo C | 2014-10-16 11:08:47 +0200 |
commit | 6dc26e92c20eedcfcba9e0b75a015a5b160748c5 (patch) | |
tree | a2a7c5a22b3353b4d26b8eb1b3a8caef7f6411ac /avr/cmd_boot.c | |
parent | 349c01b10d1f6e223f963c6cbdf6a94d0b618895 (diff) | |
parent | 8f23e84c6a08a384d25582f9cf79c4f5549bc852 (diff) | |
download | z180-stamp-6dc26e92c20eedcfcba9e0b75a015a5b160748c5.zip |
Merge branch 'master' into hostcomm_avr
Diffstat (limited to 'avr/cmd_boot.c')
-rw-r--r-- | avr/cmd_boot.c | 35 |
1 files changed, 2 insertions, 33 deletions
diff --git a/avr/cmd_boot.c b/avr/cmd_boot.c index 58c4f56..17ed746 100644 --- a/avr/cmd_boot.c +++ b/avr/cmd_boot.c @@ -4,11 +4,11 @@ */ #include "common.h" #include <stdlib.h> -#include <util/delay.h> #include <avr/pgmspace.h> #include "command.h" #include "z80-if.h" +//#include "debug.h" /* ugly hack to get Z180 loadfile into flash memory */ #define const const FLASH @@ -32,7 +32,7 @@ static void z80_load_mem(void) z80_bus_cmd(Request); z80_write_block((const FLASH unsigned char *) &hdrom[sec_base], /* src */ - hdrom_address[sec], /* dest */ + hdrom_address[sec], /* dest */ hdrom_length_of_sections[sec]); /* len */ z80_bus_cmd(Release); sec_base+=hdrom_length_of_sections[sec]; @@ -143,34 +143,3 @@ command_ret_t do_restart(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv return CMD_RET_SUCCESS; } - -command_ret_t do_clock(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) -{ - uint32_t freq; - - (void) cmdtp; (void) flag; - - if (argc == 2) { - freq = strtoul(argv[1], NULL, 10); - if (freq == 0) { - printf_P(PSTR("CPU clock cannot be 0\n")); - return CMD_RET_USAGE; - } - - if (freq > F_CPU / 2) { - printf_P(PSTR("Max CPU clock freq. is: %luHz\n"), F_CPU/2); - return CMD_RET_USAGE; - } - - if (z80_clock_set(freq) < 0) { - printf_P(PSTR("Setting CPU clock freq. to %luHz failed.\n"), - freq); - } - } - - printf_P(PSTR("CPU clock: %luHz\n"), z80_clock_get()); - - - return CMD_RET_SUCCESS; -} - |