Skip to content

Commit 9d06115

Browse files
kartbenjhedberg
authored andcommitted
Revert "shell: modules: devmem: support 64-bit read & write"
This reverts commit 5149463 which causes issue for ARC64 architectures in main Signed-off-by: Benjamin Cabé <[email protected]>
1 parent 5e590e4 commit 9d06115

File tree

1 file changed

+5
-15
lines changed

1 file changed

+5
-15
lines changed

subsys/shell/modules/devmem_service.c

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ static int cmd_load(const struct shell *sh, size_t argc, char **argv)
253253

254254
static int memory_read(const struct shell *sh, mem_addr_t addr, uint8_t width)
255255
{
256-
uint64_t value;
256+
uint32_t value;
257257
int err = 0;
258258

259259
switch (width) {
@@ -266,19 +266,14 @@ static int memory_read(const struct shell *sh, mem_addr_t addr, uint8_t width)
266266
case 32:
267267
value = sys_read32(addr);
268268
break;
269-
#ifdef CONFIG_64BIT
270-
case 64:
271-
value = sys_read64(addr);
272-
break;
273-
#endif /* CONFIG_64BIT */
274269
default:
275270
shell_fprintf(sh, SHELL_NORMAL, "Incorrect data width\n");
276271
err = -EINVAL;
277272
break;
278273
}
279274

280275
if (err == 0) {
281-
shell_fprintf(sh, SHELL_NORMAL, "Read value 0x%llx\n", value);
276+
shell_fprintf(sh, SHELL_NORMAL, "Read value 0x%x\n", value);
282277
}
283278

284279
return err;
@@ -298,11 +293,6 @@ static int memory_write(const struct shell *sh, mem_addr_t addr, uint8_t width,
298293
case 32:
299294
sys_write32(value, addr);
300295
break;
301-
#ifdef CONFIG_64BIT
302-
case 64:
303-
sys_write64(value, addr);
304-
break;
305-
#endif /* CONFIG_64BIT */
306296
default:
307297
shell_fprintf(sh, SHELL_NORMAL, "Incorrect data width\n");
308298
err = -EINVAL;
@@ -316,7 +306,7 @@ static int memory_write(const struct shell *sh, mem_addr_t addr, uint8_t width,
316306
static int cmd_devmem(const struct shell *sh, size_t argc, char **argv)
317307
{
318308
mem_addr_t phys_addr, addr;
319-
uint64_t value = 0;
309+
uint32_t value = 0;
320310
uint8_t width;
321311

322312
phys_addr = strtoul(argv[1], NULL, 16);
@@ -345,9 +335,9 @@ static int cmd_devmem(const struct shell *sh, size_t argc, char **argv)
345335
* this value at the address provided
346336
*/
347337

348-
value = (uint64_t)strtoull(argv[3], NULL, 16);
338+
value = strtoul(argv[3], NULL, 16);
349339

350-
shell_fprintf(sh, SHELL_NORMAL, "Writing value 0x%llx\n", value);
340+
shell_fprintf(sh, SHELL_NORMAL, "Writing value 0x%x\n", value);
351341

352342
return memory_write(sh, addr, width, value);
353343
}

0 commit comments

Comments
 (0)