summaryrefslogtreecommitdiff
path: root/firmware/src/dfu
diff options
context:
space:
mode:
authorlaforge <laforge@6dc7ffe9-61d6-0310-9af1-9938baff3ed1>2006-09-21 09:48:49 +0000
committerlaforge <laforge@6dc7ffe9-61d6-0310-9af1-9938baff3ed1>2006-09-21 09:48:49 +0000
commitb0ec57cfec195e22f7b37d59f18d8ebefde0c99c (patch)
tree5a231ec2747ec484faa12a16457e3ef55b7eda88 /firmware/src/dfu
parentbe2a03b5a7ee45ff1b36382ef1f9790132bdc787 (diff)
add some debugging output to flash_page()
git-svn-id: https://svn.openpcd.org:2342/trunk@212 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
Diffstat (limited to 'firmware/src/dfu')
-rw-r--r--firmware/src/dfu/flash.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/firmware/src/dfu/flash.c b/firmware/src/dfu/flash.c
index 8806bae..1a40627 100644
--- a/firmware/src/dfu/flash.c
+++ b/firmware/src/dfu/flash.c
@@ -1,6 +1,7 @@
#include <sys/types.h>
#include <lib_AT91SAM7.h>
#include <AT91SAM7.h>
+#include <dfu/dbgu.h>
#define EFCS_CMD_WRITE_PAGE 0x01
#define EFCS_CMD_SET_LOCK_BIT 0x02
@@ -38,10 +39,14 @@ static void unlock_page(u_int16_t page)
void flash_page(u_int8_t *addr)
{
u_int16_t page = page_from_ramaddr(addr);
+ DEBUGP("flash_page(0x%x=%u) ", addr, page);
- if (is_page_locked(page))
+ if (is_page_locked(page)) {
+ DEBUGP("unlocking ");
unlock_page(page);
+ }
+ DEBUGP("performing start_prog ");
AT91F_MC_EFC_PerformCmd(AT91C_BASE_MC, AT91C_MC_FCMD_START_PROG |
AT91C_MC_CORRECT_KEY | page);
}
personal git repositories of Harald Welte. Your mileage may vary