* [U-Boot] [PATCH] Initilize IDE prior environment
@ 2017-06-19 14:56 Otavio Salvador
2017-06-20 17:42 ` [U-Boot] " Tom Rini
0 siblings, 1 reply; 7+ messages in thread
From: Otavio Salvador @ 2017-06-19 14:56 UTC (permalink / raw)
To: u-boot
To allow the loading of environment from IDE (for example, using FAT)
the initilization of IDE subsystem must come before the environment
one.
Successfully tested on QEMU x86.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---
common/board_r.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/common/board_r.c b/common/board_r.c
index adc1f1937e..247a6668fc 100644
--- a/common/board_r.c
+++ b/common/board_r.c
@@ -806,6 +806,9 @@ static init_fnc_t init_sequence_r[] = {
#ifdef CONFIG_MMC
initr_mmc,
#endif
+#if defined(CONFIG_IDE)
+ initr_ide,
+#endif
#ifdef CONFIG_HAS_DATAFLASH
initr_dataflash,
#endif
@@ -878,9 +881,6 @@ static init_fnc_t init_sequence_r[] = {
#if defined(CONFIG_CMD_PCMCIA) && !defined(CONFIG_IDE)
initr_pcmcia,
#endif
-#if defined(CONFIG_IDE)
- initr_ide,
-#endif
#ifdef CONFIG_LAST_STAGE_INIT
INIT_FUNC_WATCHDOG_RESET
/*
--
2.13.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [U-Boot] Initilize IDE prior environment
2017-06-19 14:56 [U-Boot] [PATCH] Initilize IDE prior environment Otavio Salvador
@ 2017-06-20 17:42 ` Tom Rini
2017-06-20 20:08 ` Otavio Salvador
0 siblings, 1 reply; 7+ messages in thread
From: Tom Rini @ 2017-06-20 17:42 UTC (permalink / raw)
To: u-boot
On Mon, Jun 19, 2017 at 11:56:04AM -0300, Otavio Salvador wrote:
> To allow the loading of environment from IDE (for example, using FAT)
> the initilization of IDE subsystem must come before the environment
> one.
>
> Successfully tested on QEMU x86.
>
> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
> ---
>
> common/board_r.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/common/board_r.c b/common/board_r.c
> index adc1f1937e..247a6668fc 100644
> --- a/common/board_r.c
> +++ b/common/board_r.c
> @@ -806,6 +806,9 @@ static init_fnc_t init_sequence_r[] = {
> #ifdef CONFIG_MMC
> initr_mmc,
> #endif
> +#if defined(CONFIG_IDE)
> + initr_ide,
> +#endif
> #ifdef CONFIG_HAS_DATAFLASH
> initr_dataflash,
> #endif
> @@ -878,9 +881,6 @@ static init_fnc_t init_sequence_r[] = {
> #if defined(CONFIG_CMD_PCMCIA) && !defined(CONFIG_IDE)
> initr_pcmcia,
> #endif
> -#if defined(CONFIG_IDE)
> - initr_ide,
> -#endif
> #ifdef CONFIG_LAST_STAGE_INIT
> INIT_FUNC_WATCHDOG_RESET
> /*
Looking at the gap between these two areas, I see that we would
initialize PCI between the two areas. So there's probably boards with
PCI IDE devices that'll regress if I take this now. What's the answer?
Long term, device model. Short term? Is there a specific upstream
platform that you're seeing the problem or, or just custom / out of
tree?
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170620/d7b14a5c/attachment.sig>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] Initilize IDE prior environment
2017-06-20 17:42 ` [U-Boot] " Tom Rini
@ 2017-06-20 20:08 ` Otavio Salvador
2017-06-20 23:19 ` Bin Meng
0 siblings, 1 reply; 7+ messages in thread
From: Otavio Salvador @ 2017-06-20 20:08 UTC (permalink / raw)
To: u-boot
On Tue, Jun 20, 2017 at 2:42 PM, Tom Rini <trini@konsulko.com> wrote:
> On Mon, Jun 19, 2017 at 11:56:04AM -0300, Otavio Salvador wrote:
>
>> To allow the loading of environment from IDE (for example, using FAT)
>> the initilization of IDE subsystem must come before the environment
>> one.
>>
>> Successfully tested on QEMU x86.
>>
>> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
>> ---
>>
>> common/board_r.c | 6 +++---
>> 1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/common/board_r.c b/common/board_r.c
>> index adc1f1937e..247a6668fc 100644
>> --- a/common/board_r.c
>> +++ b/common/board_r.c
>> @@ -806,6 +806,9 @@ static init_fnc_t init_sequence_r[] = {
>> #ifdef CONFIG_MMC
>> initr_mmc,
>> #endif
>> +#if defined(CONFIG_IDE)
>> + initr_ide,
>> +#endif
>> #ifdef CONFIG_HAS_DATAFLASH
>> initr_dataflash,
>> #endif
>> @@ -878,9 +881,6 @@ static init_fnc_t init_sequence_r[] = {
>> #if defined(CONFIG_CMD_PCMCIA) && !defined(CONFIG_IDE)
>> initr_pcmcia,
>> #endif
>> -#if defined(CONFIG_IDE)
>> - initr_ide,
>> -#endif
>> #ifdef CONFIG_LAST_STAGE_INIT
>> INIT_FUNC_WATCHDOG_RESET
>> /*
>
> Looking at the gap between these two areas, I see that we would
> initialize PCI between the two areas. So there's probably boards with
> PCI IDE devices that'll regress if I take this now. What's the answer?
> Long term, device model. Short term? Is there a specific upstream
> platform that you're seeing the problem or, or just custom / out of
> tree?
I am using this with QEMU. I enabled environment inside FAT and it
needs the IDE fix so the environment is properly loaded.
--
Otavio Salvador O.S. Systems
http://www.ossystems.com.br http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854 Mobile: +1 (347) 903-9750
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] Initilize IDE prior environment
2017-06-20 20:08 ` Otavio Salvador
@ 2017-06-20 23:19 ` Bin Meng
2017-06-22 16:05 ` Simon Glass
0 siblings, 1 reply; 7+ messages in thread
From: Bin Meng @ 2017-06-20 23:19 UTC (permalink / raw)
To: u-boot
+Simon
On Wed, Jun 21, 2017 at 4:08 AM, Otavio Salvador
<otavio.salvador@ossystems.com.br> wrote:
> On Tue, Jun 20, 2017 at 2:42 PM, Tom Rini <trini@konsulko.com> wrote:
>> On Mon, Jun 19, 2017 at 11:56:04AM -0300, Otavio Salvador wrote:
>>
>>> To allow the loading of environment from IDE (for example, using FAT)
>>> the initilization of IDE subsystem must come before the environment
>>> one.
>>>
>>> Successfully tested on QEMU x86.
>>>
>>> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
>>> ---
>>>
>>> common/board_r.c | 6 +++---
>>> 1 file changed, 3 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/common/board_r.c b/common/board_r.c
>>> index adc1f1937e..247a6668fc 100644
>>> --- a/common/board_r.c
>>> +++ b/common/board_r.c
>>> @@ -806,6 +806,9 @@ static init_fnc_t init_sequence_r[] = {
>>> #ifdef CONFIG_MMC
>>> initr_mmc,
>>> #endif
>>> +#if defined(CONFIG_IDE)
>>> + initr_ide,
>>> +#endif
>>> #ifdef CONFIG_HAS_DATAFLASH
>>> initr_dataflash,
>>> #endif
>>> @@ -878,9 +881,6 @@ static init_fnc_t init_sequence_r[] = {
>>> #if defined(CONFIG_CMD_PCMCIA) && !defined(CONFIG_IDE)
>>> initr_pcmcia,
>>> #endif
>>> -#if defined(CONFIG_IDE)
>>> - initr_ide,
>>> -#endif
>>> #ifdef CONFIG_LAST_STAGE_INIT
>>> INIT_FUNC_WATCHDOG_RESET
>>> /*
>>
>> Looking at the gap between these two areas, I see that we would
>> initialize PCI between the two areas. So there's probably boards with
>> PCI IDE devices that'll regress if I take this now. What's the answer?
>> Long term, device model. Short term? Is there a specific upstream
>> platform that you're seeing the problem or, or just custom / out of
>> tree?
I agree with Tom. Eventually we need convert IDE driver to driver model.
>
> I am using this with QEMU. I enabled environment inside FAT and it
> needs the IDE fix so the environment is properly loaded.
>
With driver model, IDE driver can be probed when U-Boot tries to load
environment from IDE.
For short term, not sure if we can accept this, Simon?
Regards,
Bin
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] Initilize IDE prior environment
2017-06-20 23:19 ` Bin Meng
@ 2017-06-22 16:05 ` Simon Glass
2017-06-22 23:49 ` Tom Rini
0 siblings, 1 reply; 7+ messages in thread
From: Simon Glass @ 2017-06-22 16:05 UTC (permalink / raw)
To: u-boot
Hi Bin,
On 20 June 2017 at 17:19, Bin Meng <bmeng.cn@gmail.com> wrote:
>
> +Simon
>
> On Wed, Jun 21, 2017 at 4:08 AM, Otavio Salvador
> <otavio.salvador@ossystems.com.br> wrote:
> > On Tue, Jun 20, 2017 at 2:42 PM, Tom Rini <trini@konsulko.com> wrote:
> >> On Mon, Jun 19, 2017 at 11:56:04AM -0300, Otavio Salvador wrote:
> >>
> >>> To allow the loading of environment from IDE (for example, using FAT)
> >>> the initilization of IDE subsystem must come before the environment
> >>> one.
> >>>
> >>> Successfully tested on QEMU x86.
> >>>
> >>> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
> >>> ---
> >>>
> >>> common/board_r.c | 6 +++---
> >>> 1 file changed, 3 insertions(+), 3 deletions(-)
> >>>
> >>> diff --git a/common/board_r.c b/common/board_r.c
> >>> index adc1f1937e..247a6668fc 100644
> >>> --- a/common/board_r.c
> >>> +++ b/common/board_r.c
> >>> @@ -806,6 +806,9 @@ static init_fnc_t init_sequence_r[] = {
> >>> #ifdef CONFIG_MMC
> >>> initr_mmc,
> >>> #endif
> >>> +#if defined(CONFIG_IDE)
> >>> + initr_ide,
> >>> +#endif
> >>> #ifdef CONFIG_HAS_DATAFLASH
> >>> initr_dataflash,
> >>> #endif
> >>> @@ -878,9 +881,6 @@ static init_fnc_t init_sequence_r[] = {
> >>> #if defined(CONFIG_CMD_PCMCIA) && !defined(CONFIG_IDE)
> >>> initr_pcmcia,
> >>> #endif
> >>> -#if defined(CONFIG_IDE)
> >>> - initr_ide,
> >>> -#endif
> >>> #ifdef CONFIG_LAST_STAGE_INIT
> >>> INIT_FUNC_WATCHDOG_RESET
> >>> /*
> >>
> >> Looking at the gap between these two areas, I see that we would
> >> initialize PCI between the two areas. So there's probably boards with
> >> PCI IDE devices that'll regress if I take this now. What's the answer?
> >> Long term, device model. Short term? Is there a specific upstream
> >> platform that you're seeing the problem or, or just custom / out of
> >> tree?
>
> I agree with Tom. Eventually we need convert IDE driver to driver model.
>
> >
> > I am using this with QEMU. I enabled environment inside FAT and it
> > needs the IDE fix so the environment is properly loaded.
> >
>
> With driver model, IDE driver can be probed when U-Boot tries to load
> environment from IDE.
>
> For short term, not sure if we can accept this, Simon?
If it does not break qemu and any platforms that use IDE (without PCI)
then I think it is fine.
It probably is not much work to convert IDE to driver model. Less if
we can remove more users :-)
Regards,
Simon
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] Initilize IDE prior environment
2017-06-22 16:05 ` Simon Glass
@ 2017-06-22 23:49 ` Tom Rini
2017-06-23 4:10 ` Heiko Schocher
0 siblings, 1 reply; 7+ messages in thread
From: Tom Rini @ 2017-06-22 23:49 UTC (permalink / raw)
To: u-boot
On Thu, Jun 22, 2017 at 10:05:48AM -0600, Simon Glass wrote:
> Hi Bin,
>
> On 20 June 2017 at 17:19, Bin Meng <bmeng.cn@gmail.com> wrote:
> >
> > +Simon
> >
> > On Wed, Jun 21, 2017 at 4:08 AM, Otavio Salvador
> > <otavio.salvador@ossystems.com.br> wrote:
> > > On Tue, Jun 20, 2017 at 2:42 PM, Tom Rini <trini@konsulko.com> wrote:
> > >> On Mon, Jun 19, 2017 at 11:56:04AM -0300, Otavio Salvador wrote:
> > >>
> > >>> To allow the loading of environment from IDE (for example, using FAT)
> > >>> the initilization of IDE subsystem must come before the environment
> > >>> one.
> > >>>
> > >>> Successfully tested on QEMU x86.
> > >>>
> > >>> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
> > >>> ---
> > >>>
> > >>> common/board_r.c | 6 +++---
> > >>> 1 file changed, 3 insertions(+), 3 deletions(-)
> > >>>
> > >>> diff --git a/common/board_r.c b/common/board_r.c
> > >>> index adc1f1937e..247a6668fc 100644
> > >>> --- a/common/board_r.c
> > >>> +++ b/common/board_r.c
> > >>> @@ -806,6 +806,9 @@ static init_fnc_t init_sequence_r[] = {
> > >>> #ifdef CONFIG_MMC
> > >>> initr_mmc,
> > >>> #endif
> > >>> +#if defined(CONFIG_IDE)
> > >>> + initr_ide,
> > >>> +#endif
> > >>> #ifdef CONFIG_HAS_DATAFLASH
> > >>> initr_dataflash,
> > >>> #endif
> > >>> @@ -878,9 +881,6 @@ static init_fnc_t init_sequence_r[] = {
> > >>> #if defined(CONFIG_CMD_PCMCIA) && !defined(CONFIG_IDE)
> > >>> initr_pcmcia,
> > >>> #endif
> > >>> -#if defined(CONFIG_IDE)
> > >>> - initr_ide,
> > >>> -#endif
> > >>> #ifdef CONFIG_LAST_STAGE_INIT
> > >>> INIT_FUNC_WATCHDOG_RESET
> > >>> /*
> > >>
> > >> Looking at the gap between these two areas, I see that we would
> > >> initialize PCI between the two areas. So there's probably boards with
> > >> PCI IDE devices that'll regress if I take this now. What's the answer?
> > >> Long term, device model. Short term? Is there a specific upstream
> > >> platform that you're seeing the problem or, or just custom / out of
> > >> tree?
> >
> > I agree with Tom. Eventually we need convert IDE driver to driver model.
> >
> > >
> > > I am using this with QEMU. I enabled environment inside FAT and it
> > > needs the IDE fix so the environment is properly loaded.
> > >
> >
> > With driver model, IDE driver can be probed when U-Boot tries to load
> > environment from IDE.
> >
> > For short term, not sure if we can accept this, Simon?
>
> If it does not break qemu and any platforms that use IDE (without PCI)
> then I think it is fine.
>
> It probably is not much work to convert IDE to driver model. Less if
> we can remove more users :-)
So, I see configs with both CONFIG_IDE and CONFIG_PCI set, so I'm not
going to take this patch. We can move env on qemu easily enough I
think. Sorry.
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170622/5f4d81f9/attachment.sig>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] Initilize IDE prior environment
2017-06-22 23:49 ` Tom Rini
@ 2017-06-23 4:10 ` Heiko Schocher
0 siblings, 0 replies; 7+ messages in thread
From: Heiko Schocher @ 2017-06-23 4:10 UTC (permalink / raw)
To: u-boot
Hello,
Am 23.06.2017 um 01:49 schrieb Tom Rini:
> On Thu, Jun 22, 2017 at 10:05:48AM -0600, Simon Glass wrote:
>> Hi Bin,
>>
>> On 20 June 2017 at 17:19, Bin Meng <bmeng.cn@gmail.com> wrote:
>>>
>>> +Simon
>>>
>>> On Wed, Jun 21, 2017 at 4:08 AM, Otavio Salvador
>>> <otavio.salvador@ossystems.com.br> wrote:
>>>> On Tue, Jun 20, 2017 at 2:42 PM, Tom Rini <trini@konsulko.com> wrote:
>>>>> On Mon, Jun 19, 2017 at 11:56:04AM -0300, Otavio Salvador wrote:
>>>>>
>>>>>> To allow the loading of environment from IDE (for example, using FAT)
>>>>>> the initilization of IDE subsystem must come before the environment
>>>>>> one.
>>>>>>
>>>>>> Successfully tested on QEMU x86.
>>>>>>
>>>>>> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
>>>>>> ---
>>>>>>
>>>>>> common/board_r.c | 6 +++---
>>>>>> 1 file changed, 3 insertions(+), 3 deletions(-)
>>>>>>
>>>>>> diff --git a/common/board_r.c b/common/board_r.c
>>>>>> index adc1f1937e..247a6668fc 100644
>>>>>> --- a/common/board_r.c
>>>>>> +++ b/common/board_r.c
>>>>>> @@ -806,6 +806,9 @@ static init_fnc_t init_sequence_r[] = {
>>>>>> #ifdef CONFIG_MMC
>>>>>> initr_mmc,
>>>>>> #endif
>>>>>> +#if defined(CONFIG_IDE)
>>>>>> + initr_ide,
>>>>>> +#endif
>>>>>> #ifdef CONFIG_HAS_DATAFLASH
>>>>>> initr_dataflash,
>>>>>> #endif
>>>>>> @@ -878,9 +881,6 @@ static init_fnc_t init_sequence_r[] = {
>>>>>> #if defined(CONFIG_CMD_PCMCIA) && !defined(CONFIG_IDE)
>>>>>> initr_pcmcia,
>>>>>> #endif
>>>>>> -#if defined(CONFIG_IDE)
>>>>>> - initr_ide,
>>>>>> -#endif
>>>>>> #ifdef CONFIG_LAST_STAGE_INIT
>>>>>> INIT_FUNC_WATCHDOG_RESET
>>>>>> /*
>>>>>
>>>>> Looking at the gap between these two areas, I see that we would
>>>>> initialize PCI between the two areas. So there's probably boards with
>>>>> PCI IDE devices that'll regress if I take this now. What's the answer?
>>>>> Long term, device model. Short term? Is there a specific upstream
>>>>> platform that you're seeing the problem or, or just custom / out of
>>>>> tree?
>>>
>>> I agree with Tom. Eventually we need convert IDE driver to driver model.
>>>
>>>>
>>>> I am using this with QEMU. I enabled environment inside FAT and it
>>>> needs the IDE fix so the environment is properly loaded.
>>>>
>>>
>>> With driver model, IDE driver can be probed when U-Boot tries to load
>>> environment from IDE.
Yup, that would be the best.
>>> For short term, not sure if we can accept this, Simon?
>>
>> If it does not break qemu and any platforms that use IDE (without PCI)
>> then I think it is fine.
>>
>> It probably is not much work to convert IDE to driver model. Less if
>> we can remove more users :-)
>
> So, I see configs with both CONFIG_IDE and CONFIG_PCI set, so I'm not
> going to take this patch. We can move env on qemu easily enough I
> think. Sorry.
May a short workaround ...
Why not loading an env.txt over ide after U-Boot is up and import it?
bye,
Heiko
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2017-06-23 4:10 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-19 14:56 [U-Boot] [PATCH] Initilize IDE prior environment Otavio Salvador
2017-06-20 17:42 ` [U-Boot] " Tom Rini
2017-06-20 20:08 ` Otavio Salvador
2017-06-20 23:19 ` Bin Meng
2017-06-22 16:05 ` Simon Glass
2017-06-22 23:49 ` Tom Rini
2017-06-23 4:10 ` Heiko Schocher
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.