DECLARE_GLOBAL_DATA_PTR;
/* Create a compile-time value */
-#ifdef MEM_SUPPORT_64BIT_DATA
-#define SUPPORT_64BIT_DATA 1
+#if MEM_SUPPORT_64BIT_DATA
#define HELP_Q ", .q"
#else
-#define SUPPORT_64BIT_DATA 0
#define HELP_Q ""
#endif
static int do_mem_mw(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
{
- ulong writeval; /* 64-bit if SUPPORT_64BIT_DATA */
+ ulong writeval; /* 64-bit if MEM_SUPPORT_64BIT_DATA */
ulong addr, count;
int size;
void *buf, *start;
/* Get the value to write.
*/
- if (SUPPORT_64BIT_DATA)
+ if (MEM_SUPPORT_64BIT_DATA)
writeval = simple_strtoull(argv[2], NULL, 16);
else
writeval = hextoul(argv[2], NULL);
while (count-- > 0) {
if (size == 4)
*((u32 *)buf) = (u32)writeval;
- else if (SUPPORT_64BIT_DATA && size == 8)
+ else if (MEM_SUPPORT_64BIT_DATA && size == 8)
*((ulong *)buf) = writeval;
else if (size == 2)
*((u16 *)buf) = (u16)writeval;
int rcode = 0;
const char *type;
const void *buf1, *buf2, *base;
- ulong word1, word2; /* 64-bit if SUPPORT_64BIT_DATA */
+ ulong word1, word2; /* 64-bit if MEM_SUPPORT_64BIT_DATA */
if (argc != 4)
return CMD_RET_USAGE;
if (size == 4) {
word1 = *(u32 *)buf1;
word2 = *(u32 *)buf2;
- } else if (SUPPORT_64BIT_DATA && size == 8) {
+ } else if (MEM_SUPPORT_64BIT_DATA && size == 8) {
word1 = *(ulong *)buf1;
word2 = *(ulong *)buf2;
} else if (size == 2) {
{
ulong addr, length, i, bytes;
int size;
- volatile ulong *llp; /* 64-bit if SUPPORT_64BIT_DATA */
+ volatile ulong *llp; /* 64-bit if MEM_SUPPORT_64BIT_DATA */
volatile u32 *longp;
volatile u16 *shortp;
volatile u8 *cp;
* If we have only one object, just run infinite loops.
*/
if (length == 1) {
- if (SUPPORT_64BIT_DATA && size == 8) {
+ if (MEM_SUPPORT_64BIT_DATA && size == 8) {
llp = (ulong *)buf;
for (;;)
i = *llp;
i = *cp;
}
- if (SUPPORT_64BIT_DATA && size == 8) {
+ if (MEM_SUPPORT_64BIT_DATA && size == 8) {
for (;;) {
llp = (ulong *)buf;
i = length;
{
ulong addr, length, i, bytes;
int size;
- volatile ulong *llp; /* 64-bit if SUPPORT_64BIT_DATA */
- ulong data; /* 64-bit if SUPPORT_64BIT_DATA */
+ volatile ulong *llp; /* 64-bit if MEM_SUPPORT_64BIT_DATA */
+ ulong data; /* 64-bit if MEM_SUPPORT_64BIT_DATA */
volatile u32 *longp;
volatile u16 *shortp;
volatile u8 *cp;
length = hextoul(argv[2], NULL);
/* data to write */
- if (SUPPORT_64BIT_DATA)
+ if (MEM_SUPPORT_64BIT_DATA)
data = simple_strtoull(argv[3], NULL, 16);
else
data = hextoul(argv[3], NULL);
* If we have only one object, just run infinite loops.
*/
if (length == 1) {
- if (SUPPORT_64BIT_DATA && size == 8) {
+ if (MEM_SUPPORT_64BIT_DATA && size == 8) {
llp = (ulong *)buf;
for (;;)
*llp = data;
*cp = data;
}
- if (SUPPORT_64BIT_DATA && size == 8) {
+ if (MEM_SUPPORT_64BIT_DATA && size == 8) {
for (;;) {
llp = (ulong *)buf;
i = length;
char *const argv[])
{
ulong addr;
- ulong i; /* 64-bit if SUPPORT_64BIT_DATA */
+ ulong i; /* 64-bit if MEM_SUPPORT_64BIT_DATA */
int nbytes, size;
void *ptr = NULL;
printf("%08lx:", addr);
if (size == 4)
printf(" %08x", *((u32 *)ptr));
- else if (SUPPORT_64BIT_DATA && size == 8)
+ else if (MEM_SUPPORT_64BIT_DATA && size == 8)
printf(" %0lx", *((ulong *)ptr));
else if (size == 2)
printf(" %04x", *((u16 *)ptr));
#endif
else {
char *endp;
- if (SUPPORT_64BIT_DATA)
+ if (MEM_SUPPORT_64BIT_DATA)
i = simple_strtoull(console_buffer, &endp, 16);
else
i = hextoul(console_buffer, &endp);
bootretry_reset_cmd_timeout();
if (size == 4)
*((u32 *)ptr) = i;
- else if (SUPPORT_64BIT_DATA && size == 8)
+ else if (MEM_SUPPORT_64BIT_DATA && size == 8)
*((ulong *)ptr) = i;
else if (size == 2)
*((u16 *)ptr) = i;