* [U-Boot-Users] Do we enable Interrupts in U-Boot?
@ 2008-01-08 12:11 Chetan Nanda
2008-01-08 12:34 ` Stefan Roese
2008-01-08 12:47 ` Wolfgang Denk
0 siblings, 2 replies; 10+ messages in thread
From: Chetan Nanda @ 2008-01-08 12:11 UTC (permalink / raw)
To: u-boot
Hi All,
I am using a custom board (similar to MALTA) with MIPS - 4KEC processor on it.
I use u-boot to load linux on our board.
My Question is :
Do we enable interrupt in u-boot code for UART and ETHERNET or we
have running in Polling Mode?
Thanks,
nandac
^ permalink raw reply [flat|nested] 10+ messages in thread
* [U-Boot-Users] Do we enable Interrupts in U-Boot?
2008-01-08 12:11 [U-Boot-Users] Do we enable Interrupts in U-Boot? Chetan Nanda
@ 2008-01-08 12:34 ` Stefan Roese
2008-01-08 12:52 ` Chetan Nanda
2008-01-08 12:47 ` Wolfgang Denk
1 sibling, 1 reply; 10+ messages in thread
From: Stefan Roese @ 2008-01-08 12:34 UTC (permalink / raw)
To: u-boot
On Tuesday 08 January 2008, Chetan Nanda wrote:
> I am using a custom board (similar to MALTA) with MIPS - 4KEC processor on
> it. I use u-boot to load linux on our board.
>
> My Question is :
> Do we enable interrupt in u-boot code for UART and ETHERNET or we
> have running in Polling Mode?
Normally all this is done in polling mode.
Best regards,
Stefan
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================
^ permalink raw reply [flat|nested] 10+ messages in thread
* [U-Boot-Users] Do we enable Interrupts in U-Boot?
2008-01-08 12:34 ` Stefan Roese
@ 2008-01-08 12:52 ` Chetan Nanda
2008-01-08 13:03 ` Andreas Schweigstill
2008-01-08 13:27 ` Stefan Roese
0 siblings, 2 replies; 10+ messages in thread
From: Chetan Nanda @ 2008-01-08 12:52 UTC (permalink / raw)
To: u-boot
In that case there must be some threads that continuously check for
pending requests from UART, ETHERNET or so ..
But I don't find any sort of threading inside u-boot code
On Jan 8, 2008 6:04 PM, Stefan Roese <sr@denx.de> wrote:
>
> On Tuesday 08 January 2008, Chetan Nanda wrote:
> > I am using a custom board (similar to MALTA) with MIPS - 4KEC processor on
> > it. I use u-boot to load linux on our board.
> >
> > My Question is :
> > Do we enable interrupt in u-boot code for UART and ETHERNET or we
> > have running in Polling Mode?
>
> Normally all this is done in polling mode.
>
> Best regards,
> Stefan
>
> =====================================================================
> DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
> =====================================================================
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* [U-Boot-Users] Do we enable Interrupts in U-Boot?
2008-01-08 12:52 ` Chetan Nanda
@ 2008-01-08 13:03 ` Andreas Schweigstill
2008-01-08 13:08 ` Andreas Schweigstill
2008-01-08 13:27 ` Stefan Roese
1 sibling, 1 reply; 10+ messages in thread
From: Andreas Schweigstill @ 2008-01-08 13:03 UTC (permalink / raw)
To: u-boot
Hello!
Chetan Nanda schrieb:
> In that case there must be some threads that continuously check for
> pending requests from UART, ETHERNET or so ..
> But I don't find any sort of threading inside u-boot code
No, the peripherals get only polled when they are used. That's why
a device running U-Boot usually won't respond to ping/ICMP echo.
Network driver polling only occurs from NetLoop(); this function will
be used only for most (all?) network commands.
U-Boot doesn't implement any kind of threading. Keep in mind that U-Boot
is *not* an operating system but only a bootloader.
There have been lots of requests for some kind of multitasking but it
would be quite time-consuming to implement this without breaking
compatibility with many software parts why rely on the fact that they
have full control over the system when running.
Regards
Andreas Schweigstill
--
Dipl.-Phys. Andreas Schweigstill
Schweigstill IT | Embedded Systems
Schauenburgerstra?e 116, D-24118 Kiel, Germany
Phone: (+49) 431 5606-435, Fax: (+49) 431 5606-436
Mobile: (+49) 171 6921973, Web: http://www.schweigstill.de/
^ permalink raw reply [flat|nested] 10+ messages in thread
* [U-Boot-Users] Do we enable Interrupts in U-Boot?
2008-01-08 13:03 ` Andreas Schweigstill
@ 2008-01-08 13:08 ` Andreas Schweigstill
0 siblings, 0 replies; 10+ messages in thread
From: Andreas Schweigstill @ 2008-01-08 13:08 UTC (permalink / raw)
To: u-boot
Hello!
Andreas Schweigstill schrieb:
> There have been lots of requests for some kind of multitasking but it
> would be quite time-consuming to implement this without breaking
> compatibility with many software parts why rely on the fact that they
> have full control over the system when running.
And I also forgot to mention that sometimes it is a really big advantage
to rely on no interrupt handlers running in the background. If I want to
test some hardware I usually write a small test program as a U-Boot
command and don't write a Linux or RTOS driver because I need a "bare"
system with a command line processor.
Regards
Andreas Schweigstill
--
Dipl.-Phys. Andreas Schweigstill
Schweigstill IT | Embedded Systems
Schauenburgerstra?e 116, D-24118 Kiel, Germany
Phone: (+49) 431 5606-435, Fax: (+49) 431 5606-436
Mobile: (+49) 171 6921973, Web: http://www.schweigstill.de/
^ permalink raw reply [flat|nested] 10+ messages in thread
* [U-Boot-Users] Do we enable Interrupts in U-Boot?
2008-01-08 12:52 ` Chetan Nanda
2008-01-08 13:03 ` Andreas Schweigstill
@ 2008-01-08 13:27 ` Stefan Roese
2008-01-08 15:27 ` Chetan Nanda
1 sibling, 1 reply; 10+ messages in thread
From: Stefan Roese @ 2008-01-08 13:27 UTC (permalink / raw)
To: u-boot
On Tuesday 08 January 2008, Chetan Nanda wrote:
> In that case there must be some threads that continuously check for
> pending requests from UART, ETHERNET or so ..
Threads? U-Boot is not an full blown OS. No threads are needed in this
bootloader.
> But I don't find any sort of threading inside u-boot code
U-Boot "sits" there and waits for some input from the console, or for an
ethernet reply packet. This can be done using polling without any performance
penalty.
Best regards,
Stefan
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================
^ permalink raw reply [flat|nested] 10+ messages in thread
* [U-Boot-Users] Do we enable Interrupts in U-Boot?
2008-01-08 13:27 ` Stefan Roese
@ 2008-01-08 15:27 ` Chetan Nanda
2008-01-08 15:35 ` Ben Warren
2008-01-08 17:51 ` Andreas Schweigstill
0 siblings, 2 replies; 10+ messages in thread
From: Chetan Nanda @ 2008-01-08 15:27 UTC (permalink / raw)
To: u-boot
On 1/8/08, Stefan Roese <sr@denx.de> wrote:
> On Tuesday 08 January 2008, Chetan Nanda wrote:
> > In that case there must be some threads that continuously check for
> > pending requests from UART, ETHERNET or so ..
>
> Threads? U-Boot is not an full blown OS. No threads are needed in this
> bootloader.
>
> > But I don't find any sort of threading inside u-boot code
>
> U-Boot "sits" there and waits for some input from the console, or for an
> ethernet reply packet. This can be done using polling without any performance
> penalty.
>
Thanks, for explaining the things,
But how can we wait for two events simultaneously (that is also under
a single thread of execution)? Can you give me pointer to the code ?
> Best regards,
> Stefan
>
> =====================================================================
> DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
> =====================================================================
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* [U-Boot-Users] Do we enable Interrupts in U-Boot?
2008-01-08 15:27 ` Chetan Nanda
@ 2008-01-08 15:35 ` Ben Warren
2008-01-08 17:51 ` Andreas Schweigstill
1 sibling, 0 replies; 10+ messages in thread
From: Ben Warren @ 2008-01-08 15:35 UTC (permalink / raw)
To: u-boot
Chetan Nanda wrote:
> On 1/8/08, Stefan Roese <sr@denx.de> wrote:
>
>> On Tuesday 08 January 2008, Chetan Nanda wrote:
>>
>>> In that case there must be some threads that continuously check for
>>> pending requests from UART, ETHERNET or so ..
>>>
>> Threads? U-Boot is not an full blown OS. No threads are needed in this
>> bootloader.
>>
>>
>>> But I don't find any sort of threading inside u-boot code
>>>
>> U-Boot "sits" there and waits for some input from the console, or for an
>> ethernet reply packet. This can be done using polling without any performance
>> penalty.
>>
>>
> Thanks, for explaining the things,
> But how can we wait for two events simultaneously (that is also under
> a single thread of execution)? Can you give me pointer to the code ?
>
We don't. Everything's single-threaded and poll-based.
regards,
Ben
^ permalink raw reply [flat|nested] 10+ messages in thread
* [U-Boot-Users] Do we enable Interrupts in U-Boot?
2008-01-08 15:27 ` Chetan Nanda
2008-01-08 15:35 ` Ben Warren
@ 2008-01-08 17:51 ` Andreas Schweigstill
1 sibling, 0 replies; 10+ messages in thread
From: Andreas Schweigstill @ 2008-01-08 17:51 UTC (permalink / raw)
To: u-boot
Hello!
Chetan Nanda schrieb:
> Thanks, for explaining the things,
> But how can we wait for two events simultaneously (that is also under
> a single thread of execution)? Can you give me pointer to the code ?
As mentioned before, U-Boot is not an operating system which provides
such means. It doesn't have a driver layer with file operations similar
to Linux. The only way to wait for events exactly simultaneously is
using a hardware which provides these events in one hardware register.
Usually one would poll the event sources:
...
while (1) {
if (driver_a_check_data_available()) {
driver_a_read_data();
}
if (driver_b_check_data_available()) {
driver_b_read_data();
}
}
if this will be implemented in an U-Boot command, you probably want
this loop also to be left, e.g. by pressing Ctrl-C:
while (!ctrlc()) {
...
}
Regards
Andreas Schweigstill
--
Dipl.-Phys. Andreas Schweigstill
Schweigstill IT | Embedded Systems
Schauenburgerstra?e 116, D-24118 Kiel, Germany
Phone: (+49) 431 5606-435, Fax: (+49) 431 5606-436
Mobile: (+49) 171 6921973, Web: http://www.schweigstill.de/
^ permalink raw reply [flat|nested] 10+ messages in thread
* [U-Boot-Users] Do we enable Interrupts in U-Boot?
2008-01-08 12:11 [U-Boot-Users] Do we enable Interrupts in U-Boot? Chetan Nanda
2008-01-08 12:34 ` Stefan Roese
@ 2008-01-08 12:47 ` Wolfgang Denk
1 sibling, 0 replies; 10+ messages in thread
From: Wolfgang Denk @ 2008-01-08 12:47 UTC (permalink / raw)
To: u-boot
In message <7f245da80801080411g4f8e4f82xdb0f6271a8b20f5a@mail.gmail.com> you wrote:
>
> Do we enable interrupt in u-boot code for UART and ETHERNET or we
> have running in Polling Mode?
I don;t know what you are doing, but I usually use polling mode.
Please see also http://www.denx.de/wiki/view/UBoot/DesignRequirements
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
######## This message was made from 100% recycled electrons. ########
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2008-01-08 17:51 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-08 12:11 [U-Boot-Users] Do we enable Interrupts in U-Boot? Chetan Nanda
2008-01-08 12:34 ` Stefan Roese
2008-01-08 12:52 ` Chetan Nanda
2008-01-08 13:03 ` Andreas Schweigstill
2008-01-08 13:08 ` Andreas Schweigstill
2008-01-08 13:27 ` Stefan Roese
2008-01-08 15:27 ` Chetan Nanda
2008-01-08 15:35 ` Ben Warren
2008-01-08 17:51 ` Andreas Schweigstill
2008-01-08 12:47 ` Wolfgang Denk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox