[Pdbg] [PATCH 5/5] main: Implement putcfam with mask
Amitay Isaacs
amitay at ozlabs.org
Fri Jul 19 16:03:48 AEST 2019
Signed-off-by: Amitay Isaacs <amitay at ozlabs.org>
---
src/cfam.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/cfam.c b/src/cfam.c
index 19c2b07..32a17b6 100644
--- a/src/cfam.c
+++ b/src/cfam.c
@@ -47,7 +47,7 @@ static int getcfam(uint32_t addr)
}
OPTCMD_DEFINE_CMD_WITH_ARGS(getcfam, getcfam, (ADDRESS32));
-static int putcfam(uint32_t addr, uint32_t data)
+static int putcfam(uint32_t addr, uint32_t data, uint32_t mask)
{
struct pdbg_target *target;
int count = 0;
@@ -56,7 +56,7 @@ static int putcfam(uint32_t addr, uint32_t data)
if (pdbg_target_status(target) != PDBG_TARGET_ENABLED)
continue;
- if (fsi_write(target, addr, data)) {
+ if (fsi_write_mask(target, addr, data, mask)) {
printf("p%d: failed\n", pdbg_target_index(target));
continue;
}
@@ -66,4 +66,4 @@ static int putcfam(uint32_t addr, uint32_t data)
return count;
}
-OPTCMD_DEFINE_CMD_WITH_ARGS(putcfam, putcfam, (ADDRESS32, DATA32));
+OPTCMD_DEFINE_CMD_WITH_ARGS(putcfam, putcfam, (ADDRESS32, DATA32, DEFAULT_DATA32("0xffffffff")));
--
2.21.0
More information about the Pdbg
mailing list