[U-Boot-Users] [PATCH] support for CONFIG_SERIAL_TAG on ARM boards

19 May
2005
19 May
'05
4:18 p.m.
Hi,
please consider this:
* Patch by Steven Scholz, 19 May 2005: Add support for CONFIG_SERIAL_TAG on ARM baords
If someone wants to pass the board's serial number to the ARM linux kernel using the ATAG_SERIAL mechanism, all she has to do is
#define CONFIG_REVISION_TAG
in the board config file and implement a trivial, board specific
#ifdef CONFIG_SERIAL_TAG void get_board_serial(struct tag_serialnr *serialnr) { serialnr->low = (u32) sernum; serialnr->high= (u32) 0; } #endif
Same goes for CONFIG_REVISION_TAG.
Thanks a million!
--
Steven Scholz
imc Measurement & Control
Index: u-boot/lib_arm/armlinux.c
===================================================================
RCS file: /cvsroot/u-boot/u-boot/lib_arm/armlinux.c,v
retrieving revision 1.16
diff -u -r1.16 armlinux.c
--- u-boot/lib_arm/armlinux.c 12 Jan 2005 00:15:17 -0000 1.16
+++ u-boot/lib_arm/armlinux.c 19 May 2005 14:12:07 -0000
@@ -377,15 +377,30 @@
}
#endif /* CONFIG_VFD || CONFIG_LCD */
+#ifdef CONFIG_SERIAL_TAG
+void setup_serial_tag (struct tag **tmp)
+{
+ struct tag *params = *tmp;
+ struct tag_serialnr serialnr;
+ void get_board_serial(struct tag_serialnr *serialnr);
+
+ get_board_serial(&serialnr);
+ params->hdr.tag = ATAG_SERIAL;
+ params->hdr.size = tag_size (tag_serialnr);
+ params->u.serialnr.low = serialnr.low;
+ params->u.serialnr.high= serialnr.high;
+ params = tag_next (params);
+ *tmp = params;
+}
+#endif
+
#ifdef CONFIG_REVISION_TAG
void setup_revision_tag(struct tag **in_params)
{
u32 rev = 0;
-#ifdef CONFIG_OMAP2420H4
u32 get_board_rev(void);
rev = get_board_rev();
-#endif
params->hdr.tag = ATAG_REVISION;
params->hdr.size = tag_size (tag_revision);
params->u.revision.rev = rev;

20 May
20 May
12:18 a.m.
In message 428CA028.2050904@imc-berlin.de you wrote:
- Patch by Steven Scholz, 19 May 2005: Add support for CONFIG_SERIAL_TAG on ARM baords
Checked in, thanks.
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
Any sufficiently advanced technology is indistinguishable from magic.
- Arthur C. Clarke
7293
Age (days ago)
7293
Last active (days ago)
1 comments
2 participants
participants (2)
-
Steven Scholz
-
Wolfgang Denk