Message ID | 1302686741-11090-1-git-send-email-biessmann@corscience.de |
---|---|
State | Accepted |
Commit | 24890f11980eb70d835ca7e0b00d32284d8f546c |
Delegated to: | Reinhard Meyer |
Headers | show |
Dear =?UTF-8?q?Andreas=20Bie=C3=9Fmann?=, In message <1302686741-11090-1-git-send-email-biessmann@corscience.de> you wrote: > This patch adds a new ATAG_BORADINFO to U-Boot. This tag is intended to hand > over the bd->bi_board_number to the linux kernel for early stage board > information like a board revision or other kind of board specific decisions > necessary before the linux peripherial drivers are up. Is this ATAG_BOARDINFO already supported by the ARM Linux kernel? I cannot find it there, nor can I find any postings referencing it on linux-arm-kernel I think it's a fundamentally wrong approach to take, like the MACH-ID's have been right from day one. By now we should have learned that lesson and not repeat it again. ARM Linux is in the process of being converted to using the Device Tree for description of hardware specifics, so this is the way to go for new things. From my point of view, I would like to reject this patch. If you however manage to get this accepted for mainline Linux, then maybe I reconsider. Sorry. Wolfgang Denk
Dear Wolfgang Denk, Am 13.04.2011 13:44, schrieb Wolfgang Denk: > Dear =?UTF-8?q?Andreas=20Bie=C3=9Fmann?=, > > In message <1302686741-11090-1-git-send-email-biessmann@corscience.de> you wrote: >> This patch adds a new ATAG_BORADINFO to U-Boot. This tag is intended to hand >> over the bd->bi_board_number to the linux kernel for early stage board >> information like a board revision or other kind of board specific decisions >> necessary before the linux peripherial drivers are up. > > Is this ATAG_BOARDINFO already supported by the ARM Linux kernel? I > cannot find it there, nor can I find any postings referencing it on > linux-arm-kernel No, it is avr32! Please see http://lists.avr32linux.org/pipermail/kernel/2011-April/005593.html and http://article.gmane.org/gmane.linux.kernel/1125654 > I think it's a fundamentally wrong approach to take, like the > MACH-ID's have been right from day one. By now we should have learned > that lesson and not repeat it again. Well, there is no fixed mechanism planed for using this information in linux kernel. But we use it in our (not mainline) product. In one comment in mentioned threads above I explain why this is needed. In short I like to pin that ATAG key value to that function to have it reserved if one other thinks to introduce another ATAG key not using that one. > ARM Linux is in the process of being converted to using the Device > Tree for description of hardware specifics, so this is the way to go > for new things. Well, you may be right here, but I don't think we get so much AVR32 SoC or boards in future as we have on ARM side. > From my point of view, I would like to reject this patch. If you > however manage to get this accepted for mainline Linux, then maybe I > reconsider. For now this submission is mostly to reference from linux-list to have a test basis for other users. I will resend or trigger the list, if my patch in linux tree will be accepted. regards Andreas Bießmann
Dear Wolfgang Denk, Am 13.04.2011 13:44, schrieb Wolfgang Denk: > Dear =?UTF-8?q?Andreas=20Bie=C3=9Fmann?=, > From my point of view, I would like to reject this patch. If you > however manage to get this accepted for mainline Linux, then maybe I > reconsider. The patch was accepted in kernel mainline (see http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=24a1a47562b0fbb97321191dcc3a67b337b20f8f ) Please consider accepting this patch in u-boot. regards Andreas Bießmann
Dear "=?ISO-8859-1?Q?Andreas_Bie=DFmann?=", In message <4DA6B173.2010506@gmail.com> you wrote: > > > From my point of view, I would like to reject this patch. If you > > however manage to get this accepted for mainline Linux, then maybe I > > reconsider. > > The patch was accepted in kernel mainline (see > http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=24a1a47562b0fbb97321191dcc3a67b337b20f8f > ) Ouch... oooouchh! > Please consider accepting this patch in u-boot. Guess I have no other choice now, but you owe me a new keyboard. Best regards, Wolfgang Denk
Dear Wolfgang Denk: > Dear "=?ISO-8859-1?Q?Andreas_Bie=DFmann?=", > > In message <4DA6B173.2010506@gmail.com> you wrote: >> >>> From my point of view, I would like to reject this patch. If you >>> however manage to get this accepted for mainline Linux, then maybe I >>> reconsider. >> >> The patch was accepted in kernel mainline (see >> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=24a1a47562b0fbb97321191dcc3a67b337b20f8f >> ) > > Ouch... oooouchh! > >> Please consider accepting this patch in u-boot. > > Guess I have no other choice now, but you owe me a new keyboard. I'm busy right now, but I will take this (and other stuff) in during the upcoming weekend. Best Regards, Reinhard
Dear Reinhard Meyer, In message <4DA6EDAB.8040603@emk-elektronik.de> you wrote: > > > Guess I have no other choice now, but you owe me a new keyboard. > I'm busy right now, but I will take this (and other stuff) in during the upcoming weekend. Thanks. Best regards, Wolfgang Denk
Dear Wolfgang Denk, > Dear Reinhard Meyer, > > In message <4DA6EDAB.8040603@emk-elektronik.de> you wrote: >> >>> Guess I have no other choice now, but you owe me a new keyboard. >> I'm busy right now, but I will take this (and other stuff) in during the upcoming weekend. Applied to u-boot-atmel/next. Best Regards, Reinhard
diff --git a/arch/avr32/include/asm/setup.h b/arch/avr32/include/asm/setup.h index e6ef8d6..7f5d883 100644 --- a/arch/avr32/include/asm/setup.h +++ b/arch/avr32/include/asm/setup.h @@ -107,6 +107,13 @@ struct tag_ethernet { #define AETH_INVALID_PHY 0xff +/* board information information */ +#define ATAG_BOARDINFO 0x54410008 + +struct tag_boardinfo { + u32 board_number; +}; + struct tag { struct tag_header hdr; union { @@ -115,6 +122,7 @@ struct tag { struct tag_cmdline cmdline; struct tag_clock clock; struct tag_ethernet ethernet; + struct tag_boardinfo boardinfo; } u; }; diff --git a/arch/avr32/lib/bootm.c b/arch/avr32/lib/bootm.c index 8a47cfe..c9a55ff 100644 --- a/arch/avr32/lib/bootm.c +++ b/arch/avr32/lib/bootm.c @@ -165,6 +165,16 @@ static struct tag *setup_ethernet_tags(struct tag *params) return params; } +static struct tag *setup_boardinfo_tag(struct tag *params) +{ + params->hdr.tag = ATAG_BOARDINFO; + params->hdr.size = tag_size(tag_boardinfo); + + params->u.boardinfo.board_number = gd->bd->bi_board_number; + + return tag_next(params); +} + static void setup_end_tag(struct tag *params) { params->hdr.tag = ATAG_NONE; @@ -195,6 +205,7 @@ int do_bootm_linux(int flag, int argc, char * const argv[], bootm_headers_t *ima params = setup_commandline_tag(params, commandline); params = setup_clock_tags(params); params = setup_ethernet_tags(params); + params = setup_boardinfo_tag(params); setup_end_tag(params); printf("\nStarting kernel at %p (params at %p)...\n\n",
This patch adds a new ATAG_BORADINFO to U-Boot. This tag is intended to hand over the bd->bi_board_number to the linux kernel for early stage board information like a board revision or other kind of board specific decisions necessary before the linux peripherial drivers are up. Signed-off-by: Andreas Bießmann <biessmann@corscience.de> --- I try to get this information interchange in mainline to have the ATAG key value reserved for that intended use. Please see http://lists.avr32linux.org/pipermail/kernel/2011-April/005593.html and http://article.gmane.org/gmane.linux.kernel/1125654 for more information. arch/avr32/include/asm/setup.h | 8 ++++++++ arch/avr32/lib/bootm.c | 11 +++++++++++ 2 files changed, 19 insertions(+), 0 deletions(-)