Device tree question

Steven A. Falco sfalco at harris.com
Tue Aug 12 00:05:11 EST 2008


Benjamin Herrenschmidt wrote:
> On Thu, 2008-08-07 at 15:56 -0400, Steven A. Falco wrote:
>   
>> I have added a compact flash to the external bus of a Sequoia
>> (PPC440EPx) evaluation board.  It is wired to CS1, and U-boot is set to
>> configure CS1 to be at address 0xc1000000.  U-boot can access the
>> device, and reports the correct partition table, etc. so I believe the
>> hardware is ok.
>>
>> I've created a device-tree entry under the EBC0 section of the
>> sequoia.dts file:
>>
>>                 pata at 1,0 {
>>                     compatible = "harris,hydra_temp-pata", "ata-generic";
>>                     bank-width = <2>;
>>                     reg = <1 0 20 1 80 20>;
>>                     reg-shift = <4>;
>>                     pio-mode = <4>;
>>                     interrupts = <27 4>;
>>                     interrupt-parent = <&UIC0>;
>>                 };
>>             };
>>
>> This seems to be correct, because if I turn on debug in prom_parse, I
>> see a translation that looks reasonable:
>>     
>
> Did you check that the resulting physical address was indeed where you
> device is supposed to be addressed ?
>
> Ben
>   

They were wrong - I misinterpreted the reg-shift to be like the "stride"
used by u-boot.  But u-boot uses it as a multiplier, and reg-shift is
truly a shift.  So, I changed the shift to "2", and now the addresses
are correct.  I'm still having problems, but I'll start a new thread,
because the new problem concerns interrupts.

    Thanks,
    Steve

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20080811/ccef9e1e/attachment.htm>


More information about the Linuxppc-dev mailing list