Submitter | Joseph Smith |
---|---|
Date | 2010-02-12 17:15:40 |
Message ID | <4B758CBC.70209@settoplinux.org> |
Download | mbox | patch |
Permalink | /patch/921/ |
State | Accepted |
Headers | show |
Comments
On Fri, Feb 12, 2010 at 10:15 AM, Joseph Smith <joe@settoplinux.org> wrote: > We have found variations of the Thomson IP1000 (IP1000T) that have 128MB > onboard memory instead of 64MB. This patch allows a Kconfig option to choose > between the two. > Does it have to be chosen at compile time? Is there no way to auto-detect it? Thanks, Myles
On 02/12/2010 12:34 PM, Myles Watson wrote: > > > On Fri, Feb 12, 2010 at 10:15 AM, Joseph Smith <joe@settoplinux.org > <mailto:joe@settoplinux.org>> wrote: > > We have found variations of the Thomson IP1000 (IP1000T) that have > 128MB onboard memory instead of 64MB. This patch allows a Kconfig > option to choose between the two. > > > Does it have to be chosen at compile time? Yes, unless you go in and change the hardcoded value before compile time... > Is there no way to auto-detect it? Nope, The onboard memory does not have SPD, hence the spd array.
On 02/12/2010 12:37 PM, Joseph Smith wrote: > On 02/12/2010 12:34 PM, Myles Watson wrote: >> >> >> On Fri, Feb 12, 2010 at 10:15 AM, Joseph Smith <joe@settoplinux.org >> <mailto:joe@settoplinux.org>> wrote: >> >> We have found variations of the Thomson IP1000 (IP1000T) that have >> 128MB onboard memory instead of 64MB. This patch allows a Kconfig >> option to choose between the two. >> >> >> Does it have to be chosen at compile time? > Yes, unless you go in and change the hardcoded value before compile time... > >> Is there no way to auto-detect it? > Nope, The onboard memory does not have SPD, hence the spd array. Sorry not array, I meant structure.
On Fri, Feb 12, 2010 at 10:37 AM, Joseph Smith <joe@settoplinux.org> wrote: > On 02/12/2010 12:34 PM, Myles Watson wrote: > >> >> >> On Fri, Feb 12, 2010 at 10:15 AM, Joseph Smith <joe@settoplinux.org >> <mailto:joe@settoplinux.org>> wrote: >> >> We have found variations of the Thomson IP1000 (IP1000T) that have >> 128MB onboard memory instead of 64MB. This patch allows a Kconfig >> option to choose between the two. >> >> >> Does it have to be chosen at compile time? >> > Yes, unless you go in and change the hardcoded value before compile time... > :) > Is there no way to auto-detect it? >> > Nope, The onboard memory does not have SPD, hence the spd array. I was hoping there was some other difference that wasn't related to the RAM. Acked-by: Myles Watson <mylesgw@gmail.com> Thanks, Myles
On 02/12/2010 12:54 PM, Myles Watson wrote:
> Acked-by: Myles Watson <mylesgw@gmail.com <mailto:mylesgw@gmail.com>>
Thanks r5122
Joseph Smith wrote: >> Is there no way to auto-detect it? > > Nope, The onboard memory does not have SPD, hence the spd array. First configure 128, then test if 65MB can store data, if not then fall back to 64. //Peter
On 02/12/2010 01:33 PM, Peter Stuge wrote: > Joseph Smith wrote: >>> Is there no way to auto-detect it? >> >> Nope, The onboard memory does not have SPD, hence the spd array. > > First configure 128, then test if 65MB can store data, if not then > fall back to 64. > I guess, but that seems like alot of wasted boot time.....
Joseph Smith wrote: >>>> Is there no way to auto-detect it? >>> >>> Nope, The onboard memory does not have SPD, hence the spd array. >> >> First configure 128, then test if 65MB can store data, if not then >> fall back to 64. > > I guess, but that seems like alot of wasted boot time..... What are the numbers? Ie. how long does it take to do one MC config, for 64 or 128? //Peter
On Fri, Feb 12, 2010 at 1:36 PM, Joseph Smith <joe@settoplinux.org> wrote: > On 02/12/2010 01:33 PM, Peter Stuge wrote: >> >> Joseph Smith wrote: >>>> >>>> Is there no way to auto-detect it? >>> >>> Nope, The onboard memory does not have SPD, hence the spd array. >> >> First configure 128, then test if 65MB can store data, if not then >> fall back to 64. >> > I guess, but that seems like alot of wasted boot time..... Been there. Done that. Works great! Cheers! Ty
On 02/12/2010 01:50 PM, Peter Stuge wrote: > Joseph Smith wrote: >>>>> Is there no way to auto-detect it? >>>> >>>> Nope, The onboard memory does not have SPD, hence the spd array. >>> >>> First configure 128, then test if 65MB can store data, if not then >>> fall back to 64. >> >> I guess, but that seems like alot of wasted boot time..... > > What are the numbers? Ie. how long does it take to do one MC config, > for 64 or 128? > > Well you would have to go though the whole raminit process to setup 128 then do a read/write at 65MB, if that fails go through the whole raminit process again and setup 64. So basically raminit would take twice as long......
Joseph Smith wrote:
> So basically raminit would take twice as long......
Right. Do you know how long that would be?
//Peter
On 02/12/2010 02:16 PM, Peter Stuge wrote: > Joseph Smith wrote: >> So basically raminit would take twice as long...... > > Right. Do you know how long that would be? > > It takes about 2 seconds to get through raminit..... so that would make it about 4 seconds. Anyways, in this situation I think it would really complicate things, because the onboard memory is the second socket (0x51) and the IP1000 has so-dimm first socket (0x50). SO, to get it to work you only want it to happen on the second socket.... I just think it is alot of unnecessary work and time when you can just set a setting at build time, it is not like you can change out onboard memory......
Joseph Smith wrote: >>> So basically raminit would take twice as long...... >> >> Right. Do you know how long that would be? > > It takes about 2 seconds to get through raminit..... so that would > make it about 4 seconds. That's really long. I completely agree that's not very nice. > I just think it is alot of unnecessary work and time when you can > just set a setting at build time, it is not like you can change out > onboard memory...... It would be great to have a single image that works on all systems. But two seconds makes it a difficult option. //Peter
Patch
Index: src/mainboard/thomson/Kconfig =================================================================== --- src/mainboard/thomson/Kconfig (revision 5121) +++ src/mainboard/thomson/Kconfig (working copy) @@ -6,3 +6,15 @@ endchoice +choice + prompt "IP1000 Onboard Memory" + default ONBOARD_MEMORY_64MB + depends on BOARD_THOMSON_IP1000 + +config ONBOARD_MEMORY_64MB + bool "IP1000-64MB" +config ONBOARD_MEMORY_128MB + bool "IP1000T-128MB" + +endchoice + Index: src/mainboard/thomson/ip1000/spd_table.h =================================================================== --- src/mainboard/thomson/ip1000/spd_table.h (revision 5121) +++ src/mainboard/thomson/ip1000/spd_table.h (working copy) @@ -20,6 +20,16 @@ #include <spd.h> +#if CONFIG_ONBOARD_MEMORY_64MB + +#define DENSITY 0x10 + +#elif CONFIG_ONBOARD_MEMORY_128MB + +#define DENSITY 0x20 + +#endif + struct spd_entry { unsigned int address; unsigned int data; @@ -36,5 +46,5 @@ {SPD_MODULE_DATA_WIDTH_LSB, 0x40}, /* Module data width (LSB) */ {SPD_MIN_CYCLE_TIME_AT_CAS_MAX, 0x75}, /* SDRAM cycle time (highest CAS latency), RAS access time (tRAC) */ {SPD_ACCESS_TIME_FROM_CLOCK, 0x54}, /* SDRAM access time from clock (highest CAS latency), CAS access time (Tac, tCAC) */ - {SPD_DENSITY_OF_EACH_ROW_ON_MODULE, 0x10}, /* Density of each row on module */ + {SPD_DENSITY_OF_EACH_ROW_ON_MODULE, DENSITY}, /* Density of each row on module */ };
We have found variations of the Thomson IP1000 (IP1000T) that have 128MB onboard memory instead of 64MB. This patch allows a Kconfig option to choose between the two. Signed-off-by: Joseph Smith <joe@settoplinux.org>