Skip to contentSkip to conversation

CONFIG_SERIAL_TAG and CONFIG_REVISION_TAG ???

U-Boot-Users Steven Scholz 1 participant 2 messages Mar 11, 2005 – Apr 6, 2005

lore
Share & tools
lore
#0 lore raw

Hi there,

for ARM boards CONFIG_SERIAL_TAG and CONFIG_REVISION_TAG can be used to pass the board's serial nummber and revision to a linux kernel.

For now setup_serial_tag() has to be defined in board specific files. But setup_revision_tag() is defined in armlinux.c like

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;
	params = tag_next (params);
}

I'd love to make this consistent. So either do it like setup_serial_tag() or like setup_serial_tag() ...

Since I don't like board specific defines like "#ifdef CONFIG_OMAP2420H4" in common files we should move that out.

So the question is:

shell we implement board specific get_board_rev() and get_board_serial() and have the params->hdr.* stuff in armlinux.c?

or

shell we implement setup_serial_tag() and setup_serial_tag() in board specific files and do the params->hdr.* stuff there?

Comments please.

Thanks,

Steven

#1 lore raw

Hi there,

Quoted 28 lines · I wrote:

for ARM boards CONFIG_SERIAL_TAG and CONFIG_REVISION_TAG can be used to pass the board's serial nummber and revision to a linux kernel.

For now setup_serial_tag() has to be defined in board specific files. But setup_revision_tag() is defined in armlinux.c like

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;
    params = tag_next (params);
}

I'd love to make this consistent. So either do it like setup_serial_tag() or like setup_revision_tag() ...

Since I don't like board specific defines like "#ifdef CONFIG_OMAP2420H4" in common files we should move that out.

So the question is:

Quoted 7 lines

shell we implement board specific get_board_rev() and get_board_serial() and have the params->hdr.* stuff in armlinux.c?

or

shell we implement setup_serial_tag() and setup_revision_tag() in board specific files and do the params->hdr.* stuff there?

I vote for "implement board specific get_board_rev() and get_board_serial()"! Any comments?
I am ready to send patches.

--
Steven