diff mbox

[U-Boot,v4,03/16] sandbox: config: Don't use 64-bit physical memory

Message ID 1382135604-31828-4-git-send-email-sjg@chromium.org
State Superseded
Delegated to: Tom Rini
Headers show

Commit Message

Simon Glass Oct. 18, 2013, 10:33 p.m. UTC
Sandbox uses an emulated memory map which is quite small. We don't need the
CONFIG_PHYS_64BIT option since we can address memory with a 32-bit offset
into our ram_buf.

Adjust the phys_addr_t and phys_size_t types accordingly.

Signed-off-by: Simon Glass <sjg@chromium.org>
---
Changes in v4: None
Changes in v3: None
Changes in v2: None

 arch/sandbox/include/asm/types.h | 4 ++--
 include/configs/sandbox.h        | 1 -
 2 files changed, 2 insertions(+), 3 deletions(-)

Comments

Marek Vasut Oct. 20, 2013, 5:08 a.m. UTC | #1
Dear Simon Glass,

> Sandbox uses an emulated memory map which is quite small. We don't need the
> CONFIG_PHYS_64BIT option since we can address memory with a 32-bit offset
> into our ram_buf.
> 
> Adjust the phys_addr_t and phys_size_t types accordingly.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>

Do we support AMD64 ? I guess not ;-)

btw. is there any real need to mix sandbox patches and DM patches ?

Best regards,
Marek Vasut
Simon Glass Oct. 20, 2013, 5:13 a.m. UTC | #2
Hi Marek,

On Oct 19, 2013 11:08 PM, "Marek Vasut" <marex@denx.de> wrote:
>
> Dear Simon Glass,
>
> > Sandbox uses an emulated memory map which is quite small. We don't need
the
> > CONFIG_PHYS_64BIT option since we can address memory with a 32-bit
offset
> > into our ram_buf.
> >
> > Adjust the phys_addr_t and phys_size_t types accordingly.
> >
> > Signed-off-by: Simon Glass <sjg@chromium.org>
>
> Do we support AMD64 ? I guess not ;-)

Yes, but even on that sandbox only supports a limited amount of RAM.

>
> btw. is there any real need to mix sandbox patches and DM patches ?

At present DM needs sandbox since it is the only way to test. It could be a
separate dependent series I suppose.

Regards,
Simon

>
> Best regards,
> Marek Vasut
diff mbox

Patch

diff --git a/arch/sandbox/include/asm/types.h b/arch/sandbox/include/asm/types.h
index 88c84ba..6d3eb1f 100644
--- a/arch/sandbox/include/asm/types.h
+++ b/arch/sandbox/include/asm/types.h
@@ -48,8 +48,8 @@  typedef unsigned long long u64;
 #define BITS_PER_LONG	CONFIG_SANDBOX_BITS_PER_LONG
 
 typedef unsigned long dma_addr_t;
-typedef unsigned long phys_addr_t;
-typedef unsigned long phys_size_t;
+typedef u32 phys_addr_t;
+typedef u32 phys_size_t;
 
 #endif /* __KERNEL__ */
 
diff --git a/include/configs/sandbox.h b/include/configs/sandbox.h
index 4027030..d6b6c75 100644
--- a/include/configs/sandbox.h
+++ b/include/configs/sandbox.h
@@ -72,7 +72,6 @@ 
 #define CONFIG_SYS_LOAD_ADDR		0x00000000
 #define CONFIG_SYS_MEMTEST_START	0x00100000
 #define CONFIG_SYS_MEMTEST_END		(CONFIG_SYS_MEMTEST_START + 0x1000)
-#define CONFIG_PHYS_64BIT
 #define CONFIG_SYS_FDT_LOAD_ADDR	0x1000000
 
 /* Size of our emulated memory */