mirror of
https://xff.cz/git/u-boot/
synced 2025-09-01 00:32:04 +02:00
Update MEM_SUPPORT_64BIT_DATA to be always defined
Define this macro always so we don't need the preprocessor to check it. Convert the users to #if instead of #ifdef. Note that '#if MEM_SUPPORT_64BIT_DATA' does not give an error if the macro is not define. It just assumes zero. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Stefan Roese <sr@denx.de>
This commit is contained in:
@@ -138,7 +138,7 @@ int print_buffer(ulong addr, const void *data, uint width, uint count,
|
||||
{
|
||||
/* linebuf as a union causes proper alignment */
|
||||
union linebuf {
|
||||
#ifdef MEM_SUPPORT_64BIT_DATA
|
||||
#if MEM_SUPPORT_64BIT_DATA
|
||||
uint64_t uq[MAX_LINE_LENGTH_BYTES/sizeof(uint64_t) + 1];
|
||||
#endif
|
||||
uint32_t ui[MAX_LINE_LENGTH_BYTES/sizeof(uint32_t) + 1];
|
||||
@@ -146,7 +146,7 @@ int print_buffer(ulong addr, const void *data, uint width, uint count,
|
||||
uint8_t uc[MAX_LINE_LENGTH_BYTES/sizeof(uint8_t) + 1];
|
||||
} lb;
|
||||
int i;
|
||||
#ifdef MEM_SUPPORT_64BIT_DATA
|
||||
#if MEM_SUPPORT_64BIT_DATA
|
||||
uint64_t __maybe_unused x;
|
||||
#else
|
||||
uint32_t __maybe_unused x;
|
||||
@@ -169,7 +169,7 @@ int print_buffer(ulong addr, const void *data, uint width, uint count,
|
||||
for (i = 0; i < thislinelen; i++) {
|
||||
if (width == 4)
|
||||
x = lb.ui[i] = *(volatile uint32_t *)data;
|
||||
#ifdef MEM_SUPPORT_64BIT_DATA
|
||||
#if MEM_SUPPORT_64BIT_DATA
|
||||
else if (width == 8)
|
||||
x = lb.uq[i] = *(volatile uint64_t *)data;
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user