Powerpc and ioremap

Sébastien Chrétien sebastien.chretien.enseirb at gmail.com
Thu Aug 7 22:56:51 EST 2008


Can we call ioremap() during udbg_early_init ?

2008/8/7, Sébastien Chrétien <sebastien.chretien.enseirb at gmail.com>:
>
> Thanks for your answer.
> But it doesn't work.
> I think ioremap create a kernel panic. But I can't see because i have no
> UART ready.
> Is there a way in order to trace the failure ?
>
> 2008/8/7, Juergen Beisert <j.beisert at pengutronix.de>:
>>
>> Am Donnerstag, 7. August 2008 11:54 schrieb Sébastien Chrétien:
>>
>> > Hello,
>> >
>> > I am trying to port linux on my Powerpc Board. I have used Linux 2.6.26
>> and
>> > gcc 3.4.5.
>> > I have used Uboot 1.2.
>> > Linux seems running from _start to udbg_early_init(). That's why I
>> > develloped a udbg_driver.
>> > It must write in a register which is located at 0x2001b044. So I wrote :
>> >
>> > void __iomem *p;
>> > p=ioremap(0x2001b044,4);
>> > iowrite32('O',p);
>> > iowrite32('K',p);
>>
>>
>> try
>>
>> p=ioremap(0x2001b000, 0x1000);
>> iowrite32('O',p + 0x44);
>> iowrite32('K',p + 0x44);
>>
>> instead.
>>
>> jbe
>>
>> --
>>   Dipl.-Ing. Juergen Beisert | http://www.pengutronix.de
>>   Pengutronix - Linux Solutions for Science and Industry
>>    Handelsregister:  Amtsgericht Hildesheim, HRA 2686
>>      Hannoversche Str. 2, 31134 Hildesheim, Germany
>>    Phone: +49-5121-206917-7 |  Fax: +49-5121-206917-9
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20080807/badfdd3a/attachment.htm>


More information about the Linuxppc-dev mailing list