public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] Modifying the Device tree fields
@ 2013-06-21 17:26 Kamaraj P
  2013-06-21 18:59 ` Tom Rini
  2013-06-21 19:07 ` Scott Wood
  0 siblings, 2 replies; 4+ messages in thread
From: Kamaraj P @ 2013-06-21 17:26 UTC (permalink / raw)
  To: u-boot

Hello All,

In my device tree blob, i would like to add some interrupt to the
protected-source list dynamically in the u-boot before launching the linux
kernel.

 mpic: pic at 40000 {
            interrupt-controller;
            #address-cells = <0>;
            #interrupt-cells = <2>;
            reg = <0x40000 0x40000>;
            compatible = "chrp,open-pic";
            device_type = "open-pic";
            protected-sources = <
            16
             >

In the above DTS file,  i would like to add the other interrupts to the
 protected-sources dynamically.
I hope we need to use the device fdt APIs.  Could you please any pointers
or  reference for how to use those APIs in the u-boot ?


Thanks,
Kamaraj

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] Modifying the Device tree fields
  2013-06-21 17:26 [U-Boot] Modifying the Device tree fields Kamaraj P
@ 2013-06-21 18:59 ` Tom Rini
  2013-06-21 19:07 ` Scott Wood
  1 sibling, 0 replies; 4+ messages in thread
From: Tom Rini @ 2013-06-21 18:59 UTC (permalink / raw)
  To: u-boot

On Fri, Jun 21, 2013 at 10:56:33PM +0530, Kamaraj P wrote:
> Hello All,
> 
> In my device tree blob, i would like to add some interrupt to the
> protected-source list dynamically in the u-boot before launching the linux
> kernel.
> 
>  mpic: pic at 40000 {
>             interrupt-controller;
>             #address-cells = <0>;
>             #interrupt-cells = <2>;
>             reg = <0x40000 0x40000>;
>             compatible = "chrp,open-pic";
>             device_type = "open-pic";
>             protected-sources = <
>             16
>              >
> 
> In the above DTS file,  i would like to add the other interrupts to the
>  protected-sources dynamically.
> I hope we need to use the device fdt APIs.  Could you please any pointers
> or  reference for how to use those APIs in the u-boot ?

If you can do it with the fdt command, you can then work out what the C
API versions would look like.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130621/7d4f1d86/attachment.pgp>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] Modifying the Device tree fields
  2013-06-21 17:26 [U-Boot] Modifying the Device tree fields Kamaraj P
  2013-06-21 18:59 ` Tom Rini
@ 2013-06-21 19:07 ` Scott Wood
  2013-06-22  7:14   ` Kamaraj P
  1 sibling, 1 reply; 4+ messages in thread
From: Scott Wood @ 2013-06-21 19:07 UTC (permalink / raw)
  To: u-boot

On 06/21/2013 12:26:33 PM, Kamaraj P wrote:
> Hello All,
> 
> In my device tree blob, i would like to add some interrupt to the
> protected-source list dynamically in the u-boot before launching the  
> linux
> kernel.
> 
>  mpic: pic at 40000 {
>             interrupt-controller;
>             #address-cells = <0>;
>             #interrupt-cells = <2>;
>             reg = <0x40000 0x40000>;
>             compatible = "chrp,open-pic";
>             device_type = "open-pic";
>             protected-sources = <
>             16
>              >
> 
> In the above DTS file,  i would like to add the other interrupts to  
> the
>  protected-sources dynamically.

If you use the pic-no-reset property, you don't need protected-sources  
at all, unless you specifically want the error checking aspect of it.

> I hope we need to use the device fdt APIs.  Could you please any  
> pointers
> or  reference for how to use those APIs in the u-boot ?

fdt_appendprop looks like a good choice if you still want to do this.

-Scott

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] Modifying the Device tree fields
  2013-06-21 19:07 ` Scott Wood
@ 2013-06-22  7:14   ` Kamaraj P
  0 siblings, 0 replies; 4+ messages in thread
From: Kamaraj P @ 2013-06-22  7:14 UTC (permalink / raw)
  To: u-boot

Thanks for the suggestions..
Is there any code pointers(using fdt_appendprop()) to modify/add the
interrupt numbers to the existing protected-sources property under pic
controller ?

mpic: pic at 40000 {
            interrupt-controller;
            #address-cells = <0>;
            #interrupt-cells = <2>;
            reg = <0x40000 0x40000>;
            compatible = "chrp,open-pic";
            device_type = "open-pic";
            protected-sources = <
            16 , *0 , 28*
             >

Any help would be greatly appreciated

Thanks,
Kamaraj


On Sat, Jun 22, 2013 at 12:37 AM, Scott Wood <scottwood@freescale.com>wrote:

> On 06/21/2013 12:26:33 PM, Kamaraj P wrote:
>
>> Hello All,
>>
>> In my device tree blob, i would like to add some interrupt to the
>> protected-source list dynamically in the u-boot before launching the linux
>> kernel.
>>
>>  mpic: pic at 40000 {
>>             interrupt-controller;
>>             #address-cells = <0>;
>>             #interrupt-cells = <2>;
>>             reg = <0x40000 0x40000>;
>>             compatible = "chrp,open-pic";
>>             device_type = "open-pic";
>>             protected-sources = <
>>             16
>>              >
>>
>> In the above DTS file,  i would like to add the other interrupts to the
>>  protected-sources dynamically.
>>
>
> If you use the pic-no-reset property, you don't need protected-sources at
> all, unless you specifically want the error checking aspect of it.
>
>
>  I hope we need to use the device fdt APIs.  Could you please any pointers
>> or  reference for how to use those APIs in the u-boot ?
>>
>
> fdt_appendprop looks like a good choice if you still want to do this.
>
> -Scott
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-06-22  7:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-21 17:26 [U-Boot] Modifying the Device tree fields Kamaraj P
2013-06-21 18:59 ` Tom Rini
2013-06-21 19:07 ` Scott Wood
2013-06-22  7:14   ` Kamaraj P

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox