Re: PPC & 2.6.0-test3: wrong mem size & hang on ifconfig

Tom Rini
2003-12-24T21:20:26Z

On Thu, Dec 11, 2003 at 03:51:34PM +0200, Meelis Roos wrote:
> > ===== arch/ppc/boot/prep/misc.c 1.14 vs edited =====
> > --- 1.14/arch/ppc/boot/prep/misc.c Mon Oct 20 11:49:35 2003
> > +++ edited/arch/ppc/boot/prep/misc.c Wed Dec 10 09:11:05 2003
> > @@ -251,15 +251,21 @@
> > {
> > phandle dev_handle;
> > int mem_info[2];
> > + int n;
> > + puts("Trying OF\n");
> >
> > /* get handle to memory description */
> > if (!(dev_handle = finddevice("/memory@0")))
> > break;
> > + puts("Found /memory@0\n");
> >
> > /* get the info */
> > if (getprop(dev_handle, "reg", mem_info,
> > - sizeof(mem_info) != 8))
> > + sizeof(mem_info) != 8)) {
> > + puts("n = 0x");puthex(n);puts("\n");
> > break;
> > + }
> > + puts("Found reg prop\n");
>
> Are you sure that n really gets a value?
>
> It prints
> Found /memory@0
> n = 0x00000000
>
> and nothinf about reg prop as the code tells. What do you actually mean
> by n?

Sorry for such a late reply. What I ment to do in there was:
if ((n = getprop(dev_handle, "reg", mem_info, sizeof(mem_info))
!= 8) {
puts("n = 0x";puthex(n);puts("\n");
break;
}