Skip to contentSkip to conversation

omap4: utility function to identify the context of hw init

PATCH Aneesh V 1 participant 1 message May 17, 2011

lore
Share & tools
lore

Aneesh V

author
#0 lore raw

Copying to the list.
Accidentally missed it last time.

-------- Original Message --------
Subject: Re: [U-Boot] [PATCH v2 10/22] omap4: utility function to identify the context of hw init
Date: Mon, 16 May 2011 20:03:52 +0530
From: Aneesh V <[email protected]>
To: Wolfgang Denk <[email protected]>

Hi Wolfgang,

Quoted 10 lines · Wolfgang Denk

Dear Aneesh V,

Quoted 7 lines · In message<[email protected]> you wrote:

The basic hardware init of OMAP4(s_init()) can happen in 4 different contexts:
1. SPL running from SRAM
2. U-Boot running from FLASH
3. Non-XIP U-Boot loaded to SDRAM by SPL
4. Non-XIP U-Boot loaded to SDRAM by ROM code using the Configuration Header feature

Quoted 8 lines

...

Review

Quoted 4 lines
(quoted diff) +4 -0
+	if (uboot_loaded_by_spl())
+		return OMAP_INIT_CONTEXT_UBOOT_LOADED_BY_SPL;
+	else if (running_from_sdram())
+		return OMAP_INIT_CONTEXT_UBOOT_LOADED_BY_CH;

For reasons of consistency, should this not better be OMAP_INIT_CONTEXT_UBOOT_LOADED_BY_ROM ?

Ok.

Quoted 7 lines

Review

Quoted 2 lines
(quoted diff) +1 -0
+		return OMAP_INIT_CONTEXT_XIP_UBOOT;

What exactly is OMAP_INIT_CONTEXT_XIP_UBOOT?

Do you mean the situation when booting from NOR flash, before relocation?

Yes, this is for the NOR case.

Quoted 3 lines

Eventually the "loaded by" definition is not so good, as it does not really cover the NOR boot case.

Please note that "loaded by" definition is not there for all the options. The definition is the 'context' in which the init code is executing.

Quoted 14 lines

Review

Quoted 7 lines
(quoted diff) +5 -0
+/* HW Init Context */
+#define OMAP_INIT_CONTEXT_SPL			0
+#define OMAP_INIT_CONTEXT_XIP_UBOOT		1
+#define OMAP_INIT_CONTEXT_UBOOT_LOADED_BY_SPL	2
+#define OMAP_INIT_CONTEXT_UBOOT_LOADED_BY_CH	3

Boot from NOR?

Best regards,

Wolfgang Denk