* [U-Boot] PrimeCell Peripherals
@ 2008-09-23 12:56 Roman Mashak
2008-09-23 14:17 ` Hebbar
0 siblings, 1 reply; 14+ messages in thread
From: Roman Mashak @ 2008-09-23 12:56 UTC (permalink / raw)
To: u-boot
Hello all,
the board I'm porting U-Boot on, has several peripheral devices, which
are, according to datasheet, are based on PrimeCell PLxx blocks (for
example, vector interrupt controller is PL190 based; GPIOs are based
on PL061 block and so on). I understand that PrimeCells are IP cores,
which build up a variety of controllers for peripherals.
Therefore I wonder, how well does U-Boot support ARM's PrimeCell
peripherals? Greping sources gave only a couple of hits. I think these
basic controllers like GPIO, interrupt controller etc., which are
widely used on many ARM based platforms (i.e. (AMBA bus-compliant),
but marked in U-Boot sources with different names or so ?
Thanks in advance.
--
Roman Mashak
^ permalink raw reply [flat|nested] 14+ messages in thread
* [U-Boot] PrimeCell Peripherals
2008-09-23 12:56 [U-Boot] PrimeCell Peripherals Roman Mashak
@ 2008-09-23 14:17 ` Hebbar
2008-09-23 23:45 ` Roman Mashak
0 siblings, 1 reply; 14+ messages in thread
From: Hebbar @ 2008-09-23 14:17 UTC (permalink / raw)
To: u-boot
Hi,
>>how well does U-Boot support ARM's PrimeCell peripherals?
What do u mean by support.
I use U-booot as The Primary Bootloader on arm926ej-s based Board.
By Default U-boot supports few Primecell peripherals drivers like PL0x1
UART.
I developed few others my self, like pl18x mmc, rtc, gpio.
I recently sent a patch for RTC pl031.
U too can contribute if u can send patch's for other peripherals.
Regards
Gururaja
--
View this message in context: http://www.nabble.com/-U-Boot--PrimeCell-Peripherals-tp19627089p19628769.html
Sent from the Uboot - Users mailing list archive at Nabble.com.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [U-Boot] PrimeCell Peripherals
2008-09-23 14:17 ` Hebbar
@ 2008-09-23 23:45 ` Roman Mashak
2008-09-24 0:07 ` Gururaja Hebbar K R
0 siblings, 1 reply; 14+ messages in thread
From: Roman Mashak @ 2008-09-23 23:45 UTC (permalink / raw)
To: u-boot
Hello,
2008/9/23 Hebbar <gururajakr@sanyo.co.in>:
> I use U-booot as The Primary Bootloader on arm926ej-s based Board.
>
> By Default U-boot supports few Primecell peripherals drivers like PL0x1
> UART.
Right, that's what I've found in the U-Boot sources. How come that
widely used interrupt controllers like PL19x are not supported by
default?
> I developed few others my self, like pl18x mmc, rtc, gpio.
>
> I recently sent a patch for RTC pl031.
Yes, I saw that patch. Are you planning to send patch for GPIO as well?
--
Roman Mashak
^ permalink raw reply [flat|nested] 14+ messages in thread
* [U-Boot] PrimeCell Peripherals
2008-09-23 23:45 ` Roman Mashak
@ 2008-09-24 0:07 ` Gururaja Hebbar K R
2008-09-24 1:12 ` Roman Mashak
2008-09-24 1:18 ` Roman Mashak
0 siblings, 2 replies; 14+ messages in thread
From: Gururaja Hebbar K R @ 2008-09-24 0:07 UTC (permalink / raw)
To: u-boot
Hi,
> From: Roman Mashak [mailto:romez777 at gmail.com]
> Subject: Re: [U-Boot] PrimeCell Peripherals
>
> Right, that's what I've found in the U-Boot sources. How come
> that widely used interrupt controllers like PL19x are not
> supported by default?
Thats because Most of the ARM based boards doesnt use Interrupts. Atleast as far as i have seen.
IIRC U-boot is a single process bootloader & hence Interrupts are not so much supported.
Is there any interrupt related drivers in U-boot for other platforms?
> > I recently sent a patch for RTC pl031.
> Yes, I saw that patch. Are you planning to send patch for
> GPIO as well?
I havent done any Framework kind of a driver for GPIO. For me, it just works like a standalone & hence i cannot submit the same.
Later when i get time. I will prepare a GPIO Framework and submit for RFC in ML
Regards
Gururaja
^ permalink raw reply [flat|nested] 14+ messages in thread
* [U-Boot] PrimeCell Peripherals
2008-09-24 0:07 ` Gururaja Hebbar K R
@ 2008-09-24 1:12 ` Roman Mashak
2008-09-24 1:56 ` Gururaja Hebbar K R
2008-09-24 1:18 ` Roman Mashak
1 sibling, 1 reply; 14+ messages in thread
From: Roman Mashak @ 2008-09-24 1:12 UTC (permalink / raw)
To: u-boot
Hello,
2008/9/23 Gururaja Hebbar K R <gururajakr@sanyo.co.in>:
> Thats because Most of the ARM based boards doesnt use Interrupts. Atleast as far as i have seen.
> IIRC U-boot is a single process bootloader & hence Interrupts are not so much supported.
> Is there any interrupt related drivers in U-boot for other platforms?
In U-Boot source tree there are number of drivers with interrupt
service routines running (for example,
$(U_BOOT)/drivers/net/bcm570x.c) as well as various interrupts related
macros (some of them not used thought), if this is what you mean.
Perhaps these definitions are for future ?
--
Roman Mashak
^ permalink raw reply [flat|nested] 14+ messages in thread
* [U-Boot] PrimeCell Peripherals
2008-09-24 1:12 ` Roman Mashak
@ 2008-09-24 1:56 ` Gururaja Hebbar K R
2008-09-24 2:23 ` Roman Mashak
0 siblings, 1 reply; 14+ messages in thread
From: Gururaja Hebbar K R @ 2008-09-24 1:56 UTC (permalink / raw)
To: u-boot
Hi,
> In U-Boot source tree there are number of drivers with
> interrupt service routines running (for example,
> $(U_BOOT)/drivers/net/bcm570x.c) as well as various
> interrupts related macros (some of them not used thought), if
> this is what you mean.
> Perhaps these definitions are for future ?
At $(U_BOOT)/drivers/net/bcm570x.c files header, it says
* Broadcom BCM570x Ethernet Driver for U-Boot.
* Support 5701, 5702, 5703, and 5704. Single instance driver.
--> Single Instance Driver. Does this mean it doesn't handle Interrupt.
Sorry I cannot say more as I don't have any knowledge abt this
Also,
CONFIG_BCM570x is used in $(U_BOOT)/include/configs/BMW.h which is a MPC based Board.
May be MPC uses interrupts for its operation inside U-Boot.
Regards
Gururaja
^ permalink raw reply [flat|nested] 14+ messages in thread
* [U-Boot] PrimeCell Peripherals
2008-09-24 1:56 ` Gururaja Hebbar K R
@ 2008-09-24 2:23 ` Roman Mashak
0 siblings, 0 replies; 14+ messages in thread
From: Roman Mashak @ 2008-09-24 2:23 UTC (permalink / raw)
To: u-boot
Hi,
2008/9/23 Gururaja Hebbar K R <gururajakr@sanyo.co.in>:
> At $(U_BOOT)/drivers/net/bcm570x.c files header, it says
>
> * Broadcom BCM570x Ethernet Driver for U-Boot.
> * Support 5701, 5702, 5703, and 5704. Single instance driver.
>
> --> Single Instance Driver. Does this mean it doesn't handle Interrupt.
> Sorry I cannot say more as I don't have any knowledge abt this
>
> Also,
>
> CONFIG_BCM570x is used in $(U_BOOT)/include/configs/BMW.h which is a MPC based Board.
>
> May be MPC uses interrupts for its operation inside U-Boot.
Probably you're right and interrupts related stuff is meanugful on PPC
platform; moreover README says about interrupts mainly in PPC or
PowerPC marked sections.
--
Roman Mashak
^ permalink raw reply [flat|nested] 14+ messages in thread
* [U-Boot] PrimeCell Peripherals
2008-09-24 0:07 ` Gururaja Hebbar K R
2008-09-24 1:12 ` Roman Mashak
@ 2008-09-24 1:18 ` Roman Mashak
2008-09-24 2:42 ` Gururaja Hebbar K R
1 sibling, 1 reply; 14+ messages in thread
From: Roman Mashak @ 2008-09-24 1:18 UTC (permalink / raw)
To: u-boot
To add a bit to my previous message.
2008/9/23 Gururaja Hebbar K R <gururajakr@sanyo.co.in>:
> Thats because Most of the ARM based boards doesnt use Interrupts. Atleast as far as i have seen.
As far as I understood from U-Boot's README, a standalone mode can and
may want to use interrupts -- so it'd reasonable to have interrupts
controllers support, isn't it? Correct me if I'm wrong, just trying to
understand the architecture of U-Boot more deeply.
> IIRC U-boot is a single process bootloader & hence Interrupts are not so much supported.
> Is there any interrupt related drivers in U-boot for other platforms?
--
Roman Mashak
^ permalink raw reply [flat|nested] 14+ messages in thread
* [U-Boot] PrimeCell Peripherals
2008-09-24 1:18 ` Roman Mashak
@ 2008-09-24 2:42 ` Gururaja Hebbar K R
2008-09-24 7:44 ` Roman Mashak
0 siblings, 1 reply; 14+ messages in thread
From: Gururaja Hebbar K R @ 2008-09-24 2:42 UTC (permalink / raw)
To: u-boot
HI,
> From: Roman Mashak [mailto:romez777 at gmail.com]
> Subject: Re: [U-Boot] PrimeCell Peripherals
>
> To add a bit to my previous message.
>
> As far as I understood from U-Boot's README, a standalone
> mode can and may want to use interrupts -- so it'd reasonable
> to have interrupts controllers support, isn't it? Correct me
> if I'm wrong, just trying to understand the architecture of
> U-Boot more deeply.
U-boots readme is general for all platforms.
Yes, U-boot ARM supports interrupt mode, but generally not used.
Also standalone can use interrupt mode if the u-boot it is running on is configured to support irq
i.e., CONFIG_USE_IRQ is defined.
Then the user has to also define a do_irq command to support the same
Kindly look at below file for do_irq function definitions & its usage.
uboot\cpu\arm720t\interrupts.c
uboot\cpu\arm920t\interrupts.c
i havent seen this function definitions for arm926ej-s except
#ifndef CONFIG_USE_IRQ
void do_irq (struct pt_regs *pt_regs)
{
...
Regards
Gururaja
^ permalink raw reply [flat|nested] 14+ messages in thread* [U-Boot] PrimeCell Peripherals
2008-09-24 2:42 ` Gururaja Hebbar K R
@ 2008-09-24 7:44 ` Roman Mashak
2008-09-24 8:31 ` Gururaja Hebbar K R
0 siblings, 1 reply; 14+ messages in thread
From: Roman Mashak @ 2008-09-24 7:44 UTC (permalink / raw)
To: u-boot
Hello,
2008/9/23 Gururaja Hebbar K R <gururajakr@sanyo.co.in>:
[skip]
> Then the user has to also define a do_irq command to support the same
>
> Kindly look at below file for do_irq function definitions & its usage.
>
> uboot\cpu\arm720t\interrupts.c
> uboot\cpu\arm920t\interrupts.c
>
> i havent seen this function definitions for arm926ej-s except
>
> #ifndef CONFIG_USE_IRQ
> void do_irq (struct pt_regs *pt_regs)
> {
> ...
I'm a bit confused: 'do_irq' is defined in several files, including
CPU-specific (arm920t, 720t etc.) and ARM architecture library
($(U_BOOT)/lib_arm). So if we build for arm920t-based platform
(provided that CONFIG_USE_IRQ is defined), then which one will be
actually compiled in resulting image?
Thanks.
--
Roman Mashak
^ permalink raw reply [flat|nested] 14+ messages in thread* [U-Boot] PrimeCell Peripherals
2008-09-24 7:44 ` Roman Mashak
@ 2008-09-24 8:31 ` Gururaja Hebbar K R
2008-09-25 1:09 ` Roman Mashak
0 siblings, 1 reply; 14+ messages in thread
From: Gururaja Hebbar K R @ 2008-09-24 8:31 UTC (permalink / raw)
To: u-boot
Hi,
> From: Roman Mashak [mailto:romez777 at gmail.com]
> Subject: Re: [U-Boot] PrimeCell Peripherals
>
> I'm a bit confused: 'do_irq' is defined in several files,
> including CPU-specific (arm920t, 720t etc.) and ARM
> architecture library ($(U_BOOT)/lib_arm). So if we build for
> arm920t-based platform (provided that CONFIG_USE_IRQ is
> defined), then which one will be actually compiled in resulting image?
Looking at uboot\cpu\arm920t\interrupts.c
a. If ARM920_IRQ_CALLBACK is defined (which is only used in s3c2410), function is called which points to s3c2410_irq()
b. if the platform is CONFIG_ARCH_INTEGRATOR, then it is assumed that it is
for timer interrupt (which is not necessary be since timer interrupt is not enabled in integrator)
Looking at uboot\cpu\arm720t\interrupts.c
a. if CONFIG_S3C4510B is defined then platform specific interrupt handler is called ( IRQ_HANDLER[pending>>2].m_func() )
b. Noting for integrator
c here is the interesting part
Since LPC2292 uses the interrupt controller similar to VIC, It uses the VICVectAddr to get the respective function address & jumps to it.
So, a similar function i.e., do_irq is needed for arm926ej-s. Again inside it, a similar steps as in lpc2292 can be done to jump to respective function.
But i am not seeing anyone using this function yet.
Regards
Gururaja
^ permalink raw reply [flat|nested] 14+ messages in thread
* [U-Boot] PrimeCell Peripherals
2008-09-24 8:31 ` Gururaja Hebbar K R
@ 2008-09-25 1:09 ` Roman Mashak
2008-09-25 3:54 ` Gururaja Hebbar K R
0 siblings, 1 reply; 14+ messages in thread
From: Roman Mashak @ 2008-09-25 1:09 UTC (permalink / raw)
To: u-boot
Hello,
2008/9/24 Gururaja Hebbar K R <gururajakr@sanyo.co.in>:
>> I'm a bit confused: 'do_irq' is defined in several files,
>> including CPU-specific (arm920t, 720t etc.) and ARM
>> architecture library ($(U_BOOT)/lib_arm). So if we build for
>> arm920t-based platform (provided that CONFIG_USE_IRQ is
>> defined), then which one will be actually compiled in resulting image?
[skip]
I must've confused you with the question. Let me try again: suppose we
build U-Boot for arm920t based target, in such a case, two files
defining 'do_irq' routine will be in compiled in --
$(UBOOT)/lib_arm/interrupts.c and $(UBOOT)/cpu/arm920t/interrupts.c.
Therefore I was wondering how it turns out that in the target image
one 'do_irq' function exists? Perhaps it's u-boot irrelevant question
and rather concern GNU toolchains behavior?
Thanks.
--
Roman Mashak
^ permalink raw reply [flat|nested] 14+ messages in thread
* [U-Boot] PrimeCell Peripherals
2008-09-25 1:09 ` Roman Mashak
@ 2008-09-25 3:54 ` Gururaja Hebbar K R
2008-09-25 4:05 ` Roman Mashak
0 siblings, 1 reply; 14+ messages in thread
From: Gururaja Hebbar K R @ 2008-09-25 3:54 UTC (permalink / raw)
To: u-boot
Hi,
> From: Roman Mashak [mailto:romez777 at gmail.com]
> Subject: Re: [U-Boot] PrimeCell Peripherals
> I must've confused you with the question.
No u havent. Sorry to say that u havent checked the code properly
> suppose we build U-Boot for arm920t based target, in such a
> case, two files defining 'do_irq' routine will be in compiled
No it will not be.
in $(UBOOT)/lib_arm/interrupts.c
#ifndef CONFIG_USE_IRQ ---> if not defined
void do_irq (struct pt_regs *pt_regs)
{
....
....
in $(UBOOT)/cpu/arm920t/interrupts.c
#ifdef CONFIG_USE_IRQ ---> if defined
#include <asm/proc-armv/ptrace.h>
void do_irq (struct pt_regs *pt_regs)
{
...
...
So both are mutual exclusive and finally only one will be compiled.
> Therefore I was wondering how it turns out that in the target
> image one 'do_irq' function exists? Perhaps it's u-boot
> irrelevant question and rather concern GNU toolchains behavior?
Its U-boot code style & GNU Toolchain compiler procedure in handling preprocessor statements.
Regards
Gururaja
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2008-09-25 4:05 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-23 12:56 [U-Boot] PrimeCell Peripherals Roman Mashak
2008-09-23 14:17 ` Hebbar
2008-09-23 23:45 ` Roman Mashak
2008-09-24 0:07 ` Gururaja Hebbar K R
2008-09-24 1:12 ` Roman Mashak
2008-09-24 1:56 ` Gururaja Hebbar K R
2008-09-24 2:23 ` Roman Mashak
2008-09-24 1:18 ` Roman Mashak
2008-09-24 2:42 ` Gururaja Hebbar K R
2008-09-24 7:44 ` Roman Mashak
2008-09-24 8:31 ` Gururaja Hebbar K R
2008-09-25 1:09 ` Roman Mashak
2008-09-25 3:54 ` Gururaja Hebbar K R
2008-09-25 4:05 ` Roman Mashak
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox