ELDK 4.2/kilauea/3.5+ kernel broken
Mai La
mla at apm.com
Fri Oct 19 14:16:07 EST 2012
Hi,
My patch was:
@@ -150,12 +157,11 @@ static int ppc4xx_setup_pcieh_hw(struct
platform_device *dev,
if (!sdr_addr)
return -1;
- SDR0_WRITE(sdr_addr, (u64)res.start >> 32); /*HIGH addr */
- SDR0_WRITE(sdr_addr + 1, res.start & 0xFFFFFFFF); /* Low addr */
-
+ mtdcri(SDR0, *sdr_addr, upper_32_bits(res.start)); /*HIGH addr
*/
+ mtdcri(SDR0, *sdr_addr + 1, lower_32_bits(res.start)); /* Low addr
*/
msi->msi_dev = of_find_node_by_name(NULL, "ppc4xx-msi");
- if (msi->msi_dev)
+ if (!msi->msi_dev)
return -ENODEV;
msi->msi_regs = of_iomap(msi->msi_dev, 0);
1. The first few lines: change from SDR0_WRITE to mtdcri since the old one
cause crash. I use ELDK 4.2.
2. The second one should mean that: if not find any node then return error.
So it should be "!msi->msi_dev"
Regards,
Mai La.
On Fri, Oct 19, 2012 at 3:05 AM, Robert Berger <robert.karl.berger at gmail.com
> wrote:
> Hi,
>
> On 10/18/2012 10:03 PM, Benjamin Herrenschmidt wrote:
> > On Thu, 2012-10-18 at 20:45 +0300, Robert Berger wrote:
> >> - mtdcri(SDR0, *sdr_addr, upper_32_bits(res.start)); /*HIGH
> addr */
> >> - mtdcri(SDR0, *sdr_addr + 1, lower_32_bits(res.start)); /* Low
> addr */
> >> + SDR0_WRITE(sdr_addr, (u64)res.start >> 32); /*HIGH addr */
> >> + SDR0_WRITE(sdr_addr + 1, res.start & 0xFFFFFFFF); /* Low addr */
> >> +
> >>
> >> msi->msi_dev = of_find_node_by_name(NULL, "ppc4xx-msi");
> >> - if (!msi->msi_dev)
> >> + if (msi->msi_dev)
> >> return -ENODEV;
> >
> > The above changes look bad. The first one is stupid, the second one is
> clearly broken.
> >
> > The diff us from good to bad right ? Looks like somebody added a very
> busted patch.
>
> this (from 3.6) does not work:
>
> - mtdcri(SDR0, *sdr_addr, upper_32_bits(res.start)); /*HIGH
> addr */
> - mtdcri(SDR0, *sdr_addr + 1, lower_32_bits(res.start)); /* Low
> addr */
>
> The good old file (which works) is this:
>
> + SDR0_WRITE(sdr_addr, (u64)res.start >> 32); /*HIGH addr */
> + SDR0_WRITE(sdr_addr + 1, res.start & 0xFFFFFFFF); /* Low addr */
> +
>
> >
> > If I look at the code in current upstream, I see:
> >
> > mtdcri(SDR0, *sdr_addr, upper_32_bits(res.start)); /*HIGH
> addr */
> > mtdcri(SDR0, *sdr_addr + 1, lower_32_bits(res.start)); /* Low
> addr */
> >
> > msi->msi_dev = of_find_node_by_name(NULL, "ppc4xx-msi");
> > if (!msi->msi_dev)
> > return -ENODEV;
> >
> >
> > Which looks correct. So this might be something specific to ELDK ?
>
> I will be on the road from tomorrow for a week or so, but maybe I can
> isolate the exact lines which break it. I can also try a newer compiler
> to see if this changes anything.
>
> Is there someone out there with a kilauea board who can boot a 3.6.
> mainline kernel with a default config with a rootfs over nfs?
>
> >
> > Cheers,
> > Ben.
> >
> >
>
> Regards,
>
> Robert
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20121019/f58b3f3d/attachment.html>
More information about the Linuxppc-dev
mailing list