* how do i add the defn for the beagle xM to barebox?
@ 2012-02-05 11:52 Robert P. J. Day
2012-02-05 14:52 ` Eric Bénard
0 siblings, 1 reply; 11+ messages in thread
From: Robert P. J. Day @ 2012-02-05 11:52 UTC (permalink / raw)
To: U-Boot Version 2 (barebox)
just about to start reading the barebox docs to see if it's
explained there but here's what i want to do -- i want to specifically
add support for the beagleboard xM to barebox.
i can see there is already classic beagle support:
http://wiki.barebox.org/doku.php?id=boards:omap
and as a test, i build both the MLO and loader for a *regular* beagle
using barebox and replaced those files in a basic validation image for
the xM. happily, it booted to the barebox loader, which proves that
the current barebox beagle support represents at least a viable
starting point for the xM.
there were, of course, some diagnostics based on the differences,
such as:
... snip ...
NAND type unknown: ff,ff
No NAND device found (-19)!
... snip ...
that's not surprising since the beagle has NAND flash while the xM
doesn't, so i'm assuming that my first mod would be something like, in
the xload file, replacing all of:
CONFIG_MTD=y
# CONFIG_MTD_WRITE is not set
# CONFIG_MTD_OOB_DEVICE is not set
CONFIG_NAND=y
# CONFIG_NAND_ECC_SOFT is not set
# CONFIG_NAND_ECC_HW_SYNDROME is not set
# CONFIG_NAND_ECC_HW_NONE is not set
# CONFIG_NAND_INFO is not set
# CONFIG_NAND_BBT is not set
CONFIG_NAND_OMAP_GPMC=y
with:
CONFIG_MTD=n
CONFIG_MAND=n
and in the loader defconfig file, replacing:
CONFIG_MTD=y
CONFIG_NAND=y
CONFIG_NAND_OMAP_GPMC=y
with the same thing, is that it?
in any event, unless someone has already done this, i'm willing to
start with the existing beagle defconfig files, perhaps even add them
to barebox as is, then start submitting patches that handle the
differences one by one. is this a reasonable plan? i'm sure i won't
come up with the final correct defconfig file all in one shot, so i'll
definitely be tweaking and submitting and converging to the correct
solution.
thoughts? i'd actually like to make the tweaks one at a time so
that the git log shows clearly how the two boards differ one feature
at a time.
rday
--
========================================================================
Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca
Twitter: http://twitter.com/rpjday
LinkedIn: http://ca.linkedin.com/in/rpjday
========================================================================
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: how do i add the defn for the beagle xM to barebox?
2012-02-05 11:52 how do i add the defn for the beagle xM to barebox? Robert P. J. Day
@ 2012-02-05 14:52 ` Eric Bénard
2012-02-05 14:58 ` Robert P. J. Day
2012-02-05 15:37 ` Robert P. J. Day
0 siblings, 2 replies; 11+ messages in thread
From: Eric Bénard @ 2012-02-05 14:52 UTC (permalink / raw)
To: barebox
Hi Robert,
Le Sun, 5 Feb 2012 06:52:28 -0500 (EST),
"Robert P. J. Day" <rpjday@crashcourse.ca> a écrit :
> thoughts? i'd actually like to make the tweaks one at a time so
> that the git log shows clearly how the two boards differ one feature
> at a time.
By sensing a few GPIO, you can easily check which board you are running
barebox on and thus have ony binary which supports all beagleboards
(as already done in u-boot).
Check around line 108 in u-boot's beagle support for the details :
http://git.denx.de/?p=u-boot.git;a=blob;f=board/ti/beagle/beagle.c;h=5c04b34e1ab0140aca93e7752c8672ce7aebc0b9;hb=HEAD
So in the end you can register the nand support only if you run on a
board which has a NAND flash and have one defconfig for all
beagleboards (some tweaks in the clock settings may be nedded -
especially for USB IIRC - as beagle XM is built around a DM3730 which
can run at 1GHz when older beagles had older OMAP3530 limited to
720MHz).
Eric
--
http://eukrea.com/en/news/104-2012
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: how do i add the defn for the beagle xM to barebox?
2012-02-05 14:52 ` Eric Bénard
@ 2012-02-05 14:58 ` Robert P. J. Day
2012-02-05 15:37 ` Robert P. J. Day
1 sibling, 0 replies; 11+ messages in thread
From: Robert P. J. Day @ 2012-02-05 14:58 UTC (permalink / raw)
To: Eric Bénard; +Cc: barebox
[-- Attachment #1: Type: TEXT/PLAIN, Size: 1681 bytes --]
On Sun, 5 Feb 2012, Eric Bénard wrote:
> Hi Robert,
>
> Le Sun, 5 Feb 2012 06:52:28 -0500 (EST),
> "Robert P. J. Day" <rpjday@crashcourse.ca> a écrit :
> > thoughts? i'd actually like to make the tweaks one at a time so
> > that the git log shows clearly how the two boards differ one feature
> > at a time.
>
> By sensing a few GPIO, you can easily check which board you are running
> barebox on and thus have ony binary which supports all beagleboards
> (as already done in u-boot).
>
> Check around line 108 in u-boot's beagle support for the details :
> http://git.denx.de/?p=u-boot.git;a=blob;f=board/ti/beagle/beagle.c;h=5c04b34e1ab0140aca93e7752c8672ce7aebc0b9;hb=HEAD
>
> So in the end you can register the nand support only if you run on a
> board which has a NAND flash and have one defconfig for all
> beagleboards (some tweaks in the clock settings may be nedded -
> especially for USB IIRC - as beagle XM is built around a DM3730 which
> can run at 1GHz when older beagles had older OMAP3530 limited to
> 720MHz).
ah, thank you, that might be what i'm after. we'll see if that's
enough to handle all of the differences. i may very well be back with
more questions later. in fact, count on it. :-)
rday
--
========================================================================
Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca
Twitter: http://twitter.com/rpjday
LinkedIn: http://ca.linkedin.com/in/rpjday
========================================================================
[-- Attachment #2: Type: text/plain, Size: 149 bytes --]
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: how do i add the defn for the beagle xM to barebox?
2012-02-05 14:52 ` Eric Bénard
2012-02-05 14:58 ` Robert P. J. Day
@ 2012-02-05 15:37 ` Robert P. J. Day
2012-02-05 17:43 ` Eric Bénard
1 sibling, 1 reply; 11+ messages in thread
From: Robert P. J. Day @ 2012-02-05 15:37 UTC (permalink / raw)
To: Eric Bénard; +Cc: barebox
[-- Attachment #1: Type: TEXT/PLAIN, Size: 5035 bytes --]
On Sun, 5 Feb 2012, Eric Bénard wrote:
> Hi Robert,
>
> Le Sun, 5 Feb 2012 06:52:28 -0500 (EST),
> "Robert P. J. Day" <rpjday@crashcourse.ca> a écrit :
> > thoughts? i'd actually like to make the tweaks one at a time so
> > that the git log shows clearly how the two boards differ one feature
> > at a time.
>
> By sensing a few GPIO, you can easily check which board you are running
> barebox on and thus have ony binary which supports all beagleboards
> (as already done in u-boot).
>
> Check around line 108 in u-boot's beagle support for the details :
> http://git.denx.de/?p=u-boot.git;a=blob;f=board/ti/beagle/beagle.c;h=5c04b34e1ab0140aca93e7752c8672ce7aebc0b9;hb=HEAD
>
> So in the end you can register the nand support only if you run on a
> board which has a NAND flash and have one defconfig for all
> beagleboards (some tweaks in the clock settings may be nedded -
> especially for USB IIRC - as beagle XM is built around a DM3730 which
> can run at 1GHz when older beagles had older OMAP3530 limited to
> 720MHz).
hmmmm ... i see one possible problem that maybe means i just haven't
read far enough. in u-boot, in that beagle.c file, here's a chunk of
code that identifies the NAND chip, of which there is none on the xM:
/*
* We need to identify what PoP memory is on the board so that
* we know what timings to use. If we can't identify it then
* we know it's an xM. To map the ID values please see nand_ids.c
*/
identify_nand_chip(&pop_mfr, &pop_id);
*mr = MICRON_V_MR_165;
switch (get_board_revision()) {
case REVISION_C4:
if (pop_mfr == NAND_MFR_STMICRO && pop_id == 0xba) {
/* 512MB DDR */
*mcfg = NUMONYX_V_MCFG_165(512 << 20);
*ctrla = NUMONYX_V_ACTIMA_165;
*ctrlb = NUMONYX_V_ACTIMB_165;
*rfr_ctrl = SDP_3430_SDRC_RFR_CTRL_165MHz;
break;
} else if (pop_mfr == NAND_MFR_MICRON && pop_id == 0xbc) {
/* Beagleboard Rev C5, 256MB DDR */
*mcfg = MICRON_V_MCFG_200(256 << 20);
*ctrla = MICRON_V_ACTIMA_200;
*ctrlb = MICRON_V_ACTIMB_200;
*rfr_ctrl = SDP_3430_SDRC_RFR_CTRL_200MHz;
break;
}
case REVISION_XM_A:
case REVISION_XM_B:
case REVISION_XM_C:
if (pop_mfr == 0) {
/* 256MB DDR */
*mcfg = MICRON_V_MCFG_200(256 << 20);
*ctrla = MICRON_V_ACTIMA_200;
*ctrlb = MICRON_V_ACTIMB_200;
*rfr_ctrl = SDP_3430_SDRC_RFR_CTRL_200MHz;
} else {
/* 512MB DDR */
*mcfg = NUMONYX_V_MCFG_165(512 << 20);
*ctrla = NUMONYX_V_ACTIMA_165;
*ctrlb = NUMONYX_V_ACTIMB_165;
*rfr_ctrl = SDP_3430_SDRC_RFR_CTRL_165MHz;
}
break;
... snip ...
ok, i can see how that works, but if you need to test this way, it
means that you'll constantly be overriding the CONFIG settings in the
beagle defconfig file.
if i read you correctly, then one should be able to use the same
defconfig file for both a regular beagle and an xM. but the current
barebox beagle xload defconfig file contains stuff like:
CONFIG_MTD=y
# CONFIG_MTD_WRITE is not set
# CONFIG_MTD_OOB_DEVICE is not set
CONFIG_NAND=y
# CONFIG_NAND_ECC_SOFT is not set
# CONFIG_NAND_ECC_HW_SYNDROME is not set
# CONFIG_NAND_ECC_HW_NONE is not set
# CONFIG_NAND_INFO is not set
# CONFIG_NAND_BBT is not set
CONFIG_NAND_OMAP_GPMC=y
which is fine for a regular beagle but totally wrong for an xM. does
this mean that, with an xM, i'd include the same (incorrect) defconfig
file, and have to be constantly overriding some of those settings?
i can see how getting the board revision lets you test how to do
things differently across a related set of boards. but the difference
between a regular beagle and an xM is *sizable* when you're talking
about NAND versus no NAND. ideally, i'd like to have that board
revision test available in the defconfig file itself. :-)
in any event, what's the proper approach to this? am i making
sense? is the solution to have different defconfig files for an xM?
rday
--
========================================================================
Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca
Twitter: http://twitter.com/rpjday
LinkedIn: http://ca.linkedin.com/in/rpjday
========================================================================
[-- Attachment #2: Type: text/plain, Size: 149 bytes --]
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: how do i add the defn for the beagle xM to barebox?
2012-02-05 15:37 ` Robert P. J. Day
@ 2012-02-05 17:43 ` Eric Bénard
2012-02-05 18:00 ` Robert P. J. Day
0 siblings, 1 reply; 11+ messages in thread
From: Eric Bénard @ 2012-02-05 17:43 UTC (permalink / raw)
To: Robert P. J. Day; +Cc: barebox
Le Sun, 5 Feb 2012 10:37:59 -0500 (EST),
"Robert P. J. Day" <rpjday@crashcourse.ca> a écrit :
> On Sun, 5 Feb 2012, Eric Bénard wrote:
>
> > Hi Robert,
> >
> > Le Sun, 5 Feb 2012 06:52:28 -0500 (EST),
> > "Robert P. J. Day" <rpjday@crashcourse.ca> a écrit :
> > > thoughts? i'd actually like to make the tweaks one at a time so
> > > that the git log shows clearly how the two boards differ one feature
> > > at a time.
> >
> > By sensing a few GPIO, you can easily check which board you are running
> > barebox on and thus have ony binary which supports all beagleboards
> > (as already done in u-boot).
> >
> > Check around line 108 in u-boot's beagle support for the details :
> > http://git.denx.de/?p=u-boot.git;a=blob;f=board/ti/beagle/beagle.c;h=5c04b34e1ab0140aca93e7752c8672ce7aebc0b9;hb=HEAD
> >
> > So in the end you can register the nand support only if you run on a
> > board which has a NAND flash and have one defconfig for all
> > beagleboards (some tweaks in the clock settings may be nedded -
> > especially for USB IIRC - as beagle XM is built around a DM3730 which
> > can run at 1GHz when older beagles had older OMAP3530 limited to
> > 720MHz).
>
> hmmmm ... i see one possible problem that maybe means i just haven't
> read far enough. in u-boot, in that beagle.c file, here's a chunk of
> code that identifies the NAND chip, of which there is none on the xM:
>
> /*
> * We need to identify what PoP memory is on the board so that
> * we know what timings to use. If we can't identify it then
> * we know it's an xM. To map the ID values please see nand_ids.c
> */
> identify_nand_chip(&pop_mfr, &pop_id);
>
> *mr = MICRON_V_MR_165;
> switch (get_board_revision()) {
> case REVISION_C4:
> if (pop_mfr == NAND_MFR_STMICRO && pop_id == 0xba) {
> /* 512MB DDR */
> *mcfg = NUMONYX_V_MCFG_165(512 << 20);
> *ctrla = NUMONYX_V_ACTIMA_165;
> *ctrlb = NUMONYX_V_ACTIMB_165;
> *rfr_ctrl = SDP_3430_SDRC_RFR_CTRL_165MHz;
> break;
> } else if (pop_mfr == NAND_MFR_MICRON && pop_id == 0xbc) {
> /* Beagleboard Rev C5, 256MB DDR */
> *mcfg = MICRON_V_MCFG_200(256 << 20);
> *ctrla = MICRON_V_ACTIMA_200;
> *ctrlb = MICRON_V_ACTIMB_200;
> *rfr_ctrl = SDP_3430_SDRC_RFR_CTRL_200MHz;
> break;
> }
> case REVISION_XM_A:
> case REVISION_XM_B:
> case REVISION_XM_C:
> if (pop_mfr == 0) {
> /* 256MB DDR */
> *mcfg = MICRON_V_MCFG_200(256 << 20);
> *ctrla = MICRON_V_ACTIMA_200;
> *ctrlb = MICRON_V_ACTIMB_200;
> *rfr_ctrl = SDP_3430_SDRC_RFR_CTRL_200MHz;
> } else {
> /* 512MB DDR */
> *mcfg = NUMONYX_V_MCFG_165(512 << 20);
> *ctrla = NUMONYX_V_ACTIMA_165;
> *ctrlb = NUMONYX_V_ACTIMB_165;
> *rfr_ctrl = SDP_3430_SDRC_RFR_CTRL_165MHz;
> }
> break;
> ... snip ...
>
> ok, i can see how that works, but if you need to test this way, it
> means that you'll constantly be overriding the CONFIG settings in the
> beagle defconfig file.
>
> if i read you correctly, then one should be able to use the same
> defconfig file for both a regular beagle and an xM. but the current
> barebox beagle xload defconfig file contains stuff like:
>
> CONFIG_MTD=y
> # CONFIG_MTD_WRITE is not set
> # CONFIG_MTD_OOB_DEVICE is not set
> CONFIG_NAND=y
> # CONFIG_NAND_ECC_SOFT is not set
> # CONFIG_NAND_ECC_HW_SYNDROME is not set
> # CONFIG_NAND_ECC_HW_NONE is not set
> # CONFIG_NAND_INFO is not set
> # CONFIG_NAND_BBT is not set
> CONFIG_NAND_OMAP_GPMC=y
>
> which is fine for a regular beagle but totally wrong for an xM. does
> this mean that, with an xM, i'd include the same (incorrect) defconfig
> file, and have to be constantly overriding some of those settings?
>
> i can see how getting the board revision lets you test how to do
> things differently across a related set of boards. but the difference
> between a regular beagle and an xM is *sizable* when you're talking
> about NAND versus no NAND. ideally, i'd like to have that board
> revision test available in the defconfig file itself. :-)
>
This is the case where u-boot is built with SPL thus reoplacing
x-load : they always read NAND ID as some XM boards were mounted with
Numonyx POP which includes NAND and 166MHz RAM when mot XM boards have
a POP with only 200MHz DDR (and in that case manufacturer ID is 0). So
even on a XM you need to check the NAND ID to set the right RAM
settings.
Eric
--
http://eukrea.com/en/news/104-2012
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: how do i add the defn for the beagle xM to barebox?
2012-02-05 17:43 ` Eric Bénard
@ 2012-02-05 18:00 ` Robert P. J. Day
2012-02-05 19:44 ` Eric Bénard
0 siblings, 1 reply; 11+ messages in thread
From: Robert P. J. Day @ 2012-02-05 18:00 UTC (permalink / raw)
To: Eric Bénard; +Cc: barebox
[-- Attachment #1: Type: TEXT/PLAIN, Size: 1362 bytes --]
On Sun, 5 Feb 2012, Eric Bénard wrote:
> This is the case where u-boot is built with SPL thus reoplacing
> x-load : they always read NAND ID as some XM boards were mounted
> with Numonyx POP which includes NAND and 166MHz RAM when mot XM
> boards have a POP with only 200MHz DDR (and in that case
> manufacturer ID is 0). So even on a XM you need to check the NAND ID
> to set the right RAM settings.
ah, got it. but what about in a more general case? what if you
have a current, accurate definition for an existing board? then a
*slight* variant of that board comes along, for which some settings in
the defconfig file are simply wrong?
are there any examples of that in barebox right now? and if not,
how would one handle them? put another way, what if *all* xM boards
had no NAND? then we'd be back to my original question, and it's
still not clear how you'd define that new board for barebox.
rday
--
========================================================================
Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca
Twitter: http://twitter.com/rpjday
LinkedIn: http://ca.linkedin.com/in/rpjday
========================================================================
[-- Attachment #2: Type: text/plain, Size: 149 bytes --]
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: how do i add the defn for the beagle xM to barebox?
2012-02-05 18:00 ` Robert P. J. Day
@ 2012-02-05 19:44 ` Eric Bénard
2012-02-05 21:04 ` Robert P. J. Day
0 siblings, 1 reply; 11+ messages in thread
From: Eric Bénard @ 2012-02-05 19:44 UTC (permalink / raw)
To: Robert P. J. Day; +Cc: barebox
Le Sun, 5 Feb 2012 13:00:13 -0500 (EST),
"Robert P. J. Day" <rpjday@crashcourse.ca> a écrit :
> On Sun, 5 Feb 2012, Eric Bénard wrote:
>
> > This is the case where u-boot is built with SPL thus reoplacing
> > x-load : they always read NAND ID as some XM boards were mounted
> > with Numonyx POP which includes NAND and 166MHz RAM when mot XM
> > boards have a POP with only 200MHz DDR (and in that case
> > manufacturer ID is 0). So even on a XM you need to check the NAND ID
> > to set the right RAM settings.
>
> ah, got it. but what about in a more general case? what if you
> have a current, accurate definition for an existing board? then a
> *slight* variant of that board comes along, for which some settings in
> the defconfig file are simply wrong?
>
> are there any examples of that in barebox right now? and if not,
> how would one handle them? put another way, what if *all* xM boards
> had no NAND? then we'd be back to my original question, and it's
> still not clear how you'd define that new board for barebox.
>
if no XM board had NAND, you would simply check the board type using the
GPIO sampled and you wouldn't register the nand (line 305 in
board-beagle.c) and the fact that the nand driver is enabled is not a
problem if the device is not registrered the driver won't be used.
Eric
--
http://eukrea.com/en/news/104-2012
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: how do i add the defn for the beagle xM to barebox?
2012-02-05 19:44 ` Eric Bénard
@ 2012-02-05 21:04 ` Robert P. J. Day
2012-02-06 9:33 ` Eric Bénard
2012-02-06 11:29 ` Sascha Hauer
0 siblings, 2 replies; 11+ messages in thread
From: Robert P. J. Day @ 2012-02-05 21:04 UTC (permalink / raw)
To: Eric Bénard; +Cc: barebox
[-- Attachment #1: Type: TEXT/PLAIN, Size: 2661 bytes --]
On Sun, 5 Feb 2012, Eric Bénard wrote:
> Le Sun, 5 Feb 2012 13:00:13 -0500 (EST),
> "Robert P. J. Day" <rpjday@crashcourse.ca> a écrit :
>
> > On Sun, 5 Feb 2012, Eric Bénard wrote:
> >
> > > This is the case where u-boot is built with SPL thus reoplacing
> > > x-load : they always read NAND ID as some XM boards were mounted
> > > with Numonyx POP which includes NAND and 166MHz RAM when mot XM
> > > boards have a POP with only 200MHz DDR (and in that case
> > > manufacturer ID is 0). So even on a XM you need to check the NAND ID
> > > to set the right RAM settings.
> >
> > ah, got it. but what about in a more general case? what if you
> > have a current, accurate definition for an existing board? then a
> > *slight* variant of that board comes along, for which some settings in
> > the defconfig file are simply wrong?
> >
> > are there any examples of that in barebox right now? and if not,
> > how would one handle them? put another way, what if *all* xM boards
> > had no NAND? then we'd be back to my original question, and it's
> > still not clear how you'd define that new board for barebox.
> >
> if no XM board had NAND, you would simply check the board type using the
> GPIO sampled and you wouldn't register the nand (line 305 in
> board-beagle.c) and the fact that the nand driver is enabled is not a
> problem if the device is not registrered the driver won't be used.
not to put too fine a point on it but ... yuck. don't get me wrong,
i certainly see the value in testing things like board versions so the
code knows how to handle small differences between similar boards
(memory speed, flash types or sizes and so on).
but this isn't a small difference -- this represents potentially an
entire subsystem (NAND) that i want the ability to de-activate. in a
perfect world, i want the ability to say concisely that i have a
beagle but i have no NAND flash, period. i don't want any of the NAND
code compiled, i don't want it included in the binary, so obviously i
don't want any of that code to run, only to realize it has nothing to
do.
i haven't finished reading the docs, but i'm assuming there's no way
to do that trivially easily.
rday
--
========================================================================
Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca
Twitter: http://twitter.com/rpjday
LinkedIn: http://ca.linkedin.com/in/rpjday
========================================================================
[-- Attachment #2: Type: text/plain, Size: 149 bytes --]
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: how do i add the defn for the beagle xM to barebox?
2012-02-05 21:04 ` Robert P. J. Day
@ 2012-02-06 9:33 ` Eric Bénard
2012-02-06 11:29 ` Sascha Hauer
1 sibling, 0 replies; 11+ messages in thread
From: Eric Bénard @ 2012-02-06 9:33 UTC (permalink / raw)
To: Robert P. J. Day; +Cc: barebox
Le Sun, 5 Feb 2012 16:04:07 -0500 (EST),
"Robert P. J. Day" <rpjday@crashcourse.ca> a écrit :
> but this isn't a small difference -- this represents potentially an
> entire subsystem (NAND) that i want the ability to de-activate. in a
> perfect world, i want the ability to say concisely that i have a
> beagle but i have no NAND flash, period. i don't want any of the NAND
> code compiled, i don't want it included in the binary, so obviously i
> don't want any of that code to run, only to realize it has nothing to
> do.
>
well it obvious that is you don't want the NAND code to be compiled in,
you simply need to unselect the options which enables it !
Eric
--
http://eukrea.com/en/news/104-2012
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: how do i add the defn for the beagle xM to barebox?
2012-02-05 21:04 ` Robert P. J. Day
2012-02-06 9:33 ` Eric Bénard
@ 2012-02-06 11:29 ` Sascha Hauer
2012-02-06 11:33 ` Robert P. J. Day
1 sibling, 1 reply; 11+ messages in thread
From: Sascha Hauer @ 2012-02-06 11:29 UTC (permalink / raw)
To: Robert P. J. Day; +Cc: barebox
On Sun, Feb 05, 2012 at 04:04:07PM -0500, Robert P. J. Day wrote:
> On Sun, 5 Feb 2012, Eric Bénard wrote:
>
> > Le Sun, 5 Feb 2012 13:00:13 -0500 (EST),
> > "Robert P. J. Day" <rpjday@crashcourse.ca> a écrit :
> >
> > > On Sun, 5 Feb 2012, Eric Bénard wrote:
> > >
> > > > This is the case where u-boot is built with SPL thus reoplacing
> > > > x-load : they always read NAND ID as some XM boards were mounted
> > > > with Numonyx POP which includes NAND and 166MHz RAM when mot XM
> > > > boards have a POP with only 200MHz DDR (and in that case
> > > > manufacturer ID is 0). So even on a XM you need to check the NAND ID
> > > > to set the right RAM settings.
> > >
> > > ah, got it. but what about in a more general case? what if you
> > > have a current, accurate definition for an existing board? then a
> > > *slight* variant of that board comes along, for which some settings in
> > > the defconfig file are simply wrong?
> > >
> > > are there any examples of that in barebox right now? and if not,
> > > how would one handle them? put another way, what if *all* xM boards
> > > had no NAND? then we'd be back to my original question, and it's
> > > still not clear how you'd define that new board for barebox.
> > >
> > if no XM board had NAND, you would simply check the board type using the
> > GPIO sampled and you wouldn't register the nand (line 305 in
> > board-beagle.c) and the fact that the nand driver is enabled is not a
> > problem if the device is not registrered the driver won't be used.
>
> not to put too fine a point on it but ... yuck. don't get me wrong,
> i certainly see the value in testing things like board versions so the
> code knows how to handle small differences between similar boards
> (memory speed, flash types or sizes and so on).
>
> but this isn't a small difference -- this represents potentially an
> entire subsystem (NAND) that i want the ability to de-activate. in a
> perfect world, i want the ability to say concisely that i have a
> beagle but i have no NAND flash, period. i don't want any of the NAND
> code compiled, i don't want it included in the binary, so obviously i
> don't want any of that code to run, only to realize it has nothing to
> do.
The mentioned U-Boot code does not use any of the nand layer but only
some omap specific function to detect the nand id (identify_nand_chip).
This means that you can add this code to barebox and still disable nand
support.
If you still want to have a more fine grained config we can add a
config MACH_PANDA_XM_VARIANT
bool
config MACH_PANDA_XM_DETECT_RAM_TYPE
bool
But we should add such options with care. Generally I don't really
like to ask the user complicated questions for things that can be
autodetected.
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: how do i add the defn for the beagle xM to barebox?
2012-02-06 11:29 ` Sascha Hauer
@ 2012-02-06 11:33 ` Robert P. J. Day
0 siblings, 0 replies; 11+ messages in thread
From: Robert P. J. Day @ 2012-02-06 11:33 UTC (permalink / raw)
To: Sascha Hauer; +Cc: barebox
On Mon, 6 Feb 2012, Sascha Hauer wrote:
... snip ...
> The mentioned U-Boot code does not use any of the nand layer but
> only some omap specific function to detect the nand id
> (identify_nand_chip). This means that you can add this code to
> barebox and still disable nand support.
>
> If you still want to have a more fine grained config we can add a
>
> config MACH_PANDA_XM_VARIANT
> bool
>
> config MACH_PANDA_XM_DETECT_RAM_TYPE
> bool
>
> But we should add such options with care. Generally I don't really
> like to ask the user complicated questions for things that can be
> autodetected.
don't take me too seriously yet as i'm still wandering around the
code base figuring out how things work. :-) thanks to eric for
clearing up a number of things for me, i now have a much better idea
of what's worth considering and what isn't.
rday
--
========================================================================
Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca
Twitter: http://twitter.com/rpjday
LinkedIn: http://ca.linkedin.com/in/rpjday
========================================================================
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2012-02-06 11:34 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-05 11:52 how do i add the defn for the beagle xM to barebox? Robert P. J. Day
2012-02-05 14:52 ` Eric Bénard
2012-02-05 14:58 ` Robert P. J. Day
2012-02-05 15:37 ` Robert P. J. Day
2012-02-05 17:43 ` Eric Bénard
2012-02-05 18:00 ` Robert P. J. Day
2012-02-05 19:44 ` Eric Bénard
2012-02-05 21:04 ` Robert P. J. Day
2012-02-06 9:33 ` Eric Bénard
2012-02-06 11:29 ` Sascha Hauer
2012-02-06 11:33 ` Robert P. J. Day
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox