* [U-Boot] [PATCH] avr32: add ATAG_BOARDINFO
@ 2011-04-13 9:25 Andreas Bießmann
2011-04-13 11:44 ` Wolfgang Denk
0 siblings, 1 reply; 8+ messages in thread
From: Andreas Bießmann @ 2011-04-13 9:25 UTC (permalink / raw)
To: u-boot
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(-)
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",
--
1.7.2.5
^ permalink raw reply related [flat|nested] 8+ messages in thread* [U-Boot] [PATCH] avr32: add ATAG_BOARDINFO
2011-04-13 9:25 [U-Boot] [PATCH] avr32: add ATAG_BOARDINFO Andreas Bießmann
@ 2011-04-13 11:44 ` Wolfgang Denk
2011-04-13 12:49 ` Andreas Bießmann
2011-04-14 8:33 ` Andreas Bießmann
0 siblings, 2 replies; 8+ messages in thread
From: Wolfgang Denk @ 2011-04-13 11:44 UTC (permalink / raw)
To: u-boot
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.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH] avr32: add ATAG_BOARDINFO
2011-04-13 11:44 ` Wolfgang Denk
@ 2011-04-13 12:49 ` Andreas Bießmann
2011-04-14 8:33 ` Andreas Bießmann
1 sibling, 0 replies; 8+ messages in thread
From: Andreas Bießmann @ 2011-04-13 12:49 UTC (permalink / raw)
To: u-boot
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
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH] avr32: add ATAG_BOARDINFO
2011-04-13 11:44 ` Wolfgang Denk
2011-04-13 12:49 ` Andreas Bießmann
@ 2011-04-14 8:33 ` Andreas Bießmann
2011-04-14 12:00 ` Wolfgang Denk
1 sibling, 1 reply; 8+ messages in thread
From: Andreas Bießmann @ 2011-04-14 8:33 UTC (permalink / raw)
To: u-boot
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
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH] avr32: add ATAG_BOARDINFO
2011-04-14 8:33 ` Andreas Bießmann
@ 2011-04-14 12:00 ` Wolfgang Denk
2011-04-14 12:50 ` Reinhard Meyer
0 siblings, 1 reply; 8+ messages in thread
From: Wolfgang Denk @ 2011-04-14 12:00 UTC (permalink / raw)
To: u-boot
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
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
There are always alternatives.
-- Spock, "The Galileo Seven", stardate 2822.3
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH] avr32: add ATAG_BOARDINFO
2011-04-14 12:00 ` Wolfgang Denk
@ 2011-04-14 12:50 ` Reinhard Meyer
2011-04-14 23:02 ` Wolfgang Denk
0 siblings, 1 reply; 8+ messages in thread
From: Reinhard Meyer @ 2011-04-14 12:50 UTC (permalink / raw)
To: u-boot
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
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH] avr32: add ATAG_BOARDINFO
2011-04-14 12:50 ` Reinhard Meyer
@ 2011-04-14 23:02 ` Wolfgang Denk
2011-04-19 16:37 ` Reinhard Meyer
0 siblings, 1 reply; 8+ messages in thread
From: Wolfgang Denk @ 2011-04-14 23:02 UTC (permalink / raw)
To: u-boot
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
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Q: Why do PCs have a reset button on the front?
A: Because they are expected to run Microsoft operating systems.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH] avr32: add ATAG_BOARDINFO
2011-04-14 23:02 ` Wolfgang Denk
@ 2011-04-19 16:37 ` Reinhard Meyer
0 siblings, 0 replies; 8+ messages in thread
From: Reinhard Meyer @ 2011-04-19 16:37 UTC (permalink / raw)
To: u-boot
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
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2011-04-19 16:37 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-13 9:25 [U-Boot] [PATCH] avr32: add ATAG_BOARDINFO Andreas Bießmann
2011-04-13 11:44 ` Wolfgang Denk
2011-04-13 12:49 ` Andreas Bießmann
2011-04-14 8:33 ` Andreas Bießmann
2011-04-14 12:00 ` Wolfgang Denk
2011-04-14 12:50 ` Reinhard Meyer
2011-04-14 23:02 ` Wolfgang Denk
2011-04-19 16:37 ` Reinhard Meyer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox