Re: [PATCH] memsize: Make get_ram_size() work with arbitary RAM size

2020-07-20 Thread Wolfgang Denk
Dear Heinrich, In message <4d5aaf77-378d-4ac2-0008-599ceeeb9...@gmx.de> you wrote: > > > Are you sure? How is this supposed to work? > > > > Running it with start = 0 and size = 0xC000 it will test the > > memory locations > > > > 0x8000 > > 0xA000 > > 0xB0

Re: [PATCH] memsize: Make get_ram_size() work with arbitary RAM size

2020-07-16 Thread Heinrich Schuchardt
On 7/14/20 6:09 PM, Wolfgang Denk wrote: > Dear Heinrich, > > In message <53dad1c7-7684-f975-1567-6ec5e03fa...@gmx.de> you wrote: >> >> If we want a fast algorithm to determine the last supported address even >> if the start or size is not a power of two: > > Are you sure? How is this supposed to

Re: [PATCH] memsize: Make get_ram_size() work with arbitary RAM size

2020-07-16 Thread Bin Meng
Hi Wolfgang, On Tue, Jul 14, 2020 at 8:28 PM Wolfgang Denk wrote: > > Dear Bin Meng, > > In message > you > wrote: > > > > > I'm afraid I don't understand this change, Can you please explain a > > > bit more detailed what "any RAM size" means? > > > > I meant "any RAM size" that is not power

Re: [PATCH] memsize: Make get_ram_size() work with arbitary RAM size

2020-07-14 Thread Wolfgang Denk
Dear Heinrich, In message <53dad1c7-7684-f975-1567-6ec5e03fa...@gmx.de> you wrote: > > If we want a fast algorithm to determine the last supported address even > if the start or size is not a power of two: Are you sure? How is this supposed to work? Running it with start = 0 and size = 0xC0

Re: [PATCH] memsize: Make get_ram_size() work with arbitary RAM size

2020-07-14 Thread Heinrich Schuchardt
On 14.07.20 12:35, Bin Meng wrote: > Hi Wolfgang, > > On Tue, Jul 14, 2020 at 1:18 AM Wolfgang Denk wrote: >> >> Dear Bin Meng, >> >> In message <1594378641-26360-1-git-send-email-bmeng...@gmail.com> you wrote: >>> >>> Currently get_ram_size() only works with certain RAM size like 1GiB, >>> 2GiB,

Re: [PATCH] memsize: Make get_ram_size() work with arbitary RAM size

2020-07-14 Thread Wolfgang Denk
Dear Bin Meng, In message you wrote: > > > I'm afraid I don't understand this change, Can you please explain a > > bit more detailed what "any RAM size" means? > > I meant "any RAM size" that is not power of two. I was afraid you meant this. > > The existing code should work fine with any RAM

Re: [PATCH] memsize: Make get_ram_size() work with arbitary RAM size

2020-07-14 Thread Bin Meng
Hi Wolfgang, On Tue, Jul 14, 2020 at 1:18 AM Wolfgang Denk wrote: > > Dear Bin Meng, > > In message <1594378641-26360-1-git-send-email-bmeng...@gmail.com> you wrote: > > > > Currently get_ram_size() only works with certain RAM size like 1GiB, > > 2GiB, 4GiB, 8GiB, etc. Chanage the codes to work w

Re: [PATCH] memsize: Make get_ram_size() work with arbitary RAM size

2020-07-13 Thread Wolfgang Denk
Dear Bin Meng, In message <1594378641-26360-1-git-send-email-bmeng...@gmail.com> you wrote: > > Currently get_ram_size() only works with certain RAM size like 1GiB, > 2GiB, 4GiB, 8GiB, etc. Chanage the codes to work with any RAM size. I'm afraid I don't understand this change, Can you please exp

[PATCH] memsize: Make get_ram_size() work with arbitary RAM size

2020-07-10 Thread Bin Meng
From: Bin Meng Currently get_ram_size() only works with certain RAM size like 1GiB, 2GiB, 4GiB, 8GiB, etc. Chanage the codes to work with any RAM size. Signed-off-by: Bin Meng --- common/memsize.c | 28 +--- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git