[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [PATCH] ppc: Fix sam460ex devicetree when booting the Lin
From: |
Guenter Roeck |
Subject: |
Re: [Qemu-ppc] [PATCH] ppc: Fix sam460ex devicetree when booting the Linux kernel |
Date: |
Fri, 22 Jun 2018 19:34:20 -0700 |
User-agent: |
Mutt/1.5.24 (2015-08-30) |
On Fri, Jun 22, 2018 at 11:37:30PM +0200, BALATON Zoltan wrote:
>
> >>The version of the Linux kernel I've tried (which is from the Linux CD
> >>on ACube's site) did not try to access the power management register,
> >>neither any guest OSes I've tested with. Looks like it may be specific
> >>to the kernel config you're using.
> >>
> >Interesting. This is with the standard upstream kernel, using
> >canyonlands_defconfig.
> >The code seems to have been in the upstream kernel forever.
>
> Maybe the Sam460ex specific image has some patches not in upstream kernel.
>
Yes, it does. To start with, the DesignWare sata driver is different.
This is not the reason for the problem, though. canyonlands_defconfig
in the upstream kernel has CONFIG_SUSPEND enabled, but the configuration
used by aCube doesn't. The kernel code accessing the power management
registers is only enabled with CONFIG_SUSPEND.
> >>By the way, when I've tried with a more recent Linux kernel (4.15.10)
> >>I've noticed that the sm501 driver seemed like having endianness
> >>problems and thus did not find the chip, while it works with other older
> >>kernels made for sam460ex. I did not try to debug or bisect this yet. Do
> >>you know anything about that?
> >>
> >
> >No, I had not noticed. SM501 is disabled in the latest canyonlands_defconfig,
> >and I only use the serial console for my testing. It fails as far back as
> >3.18.y,
> >so I am not sure if this is a Linux or a qemu problem, or if it is a
> >problem that
> >was never fixed in the upstream kernel. What kernels did you try ?
>
The problem is this (from the kernel diffs provided by aCube):
#if defined(CONFIG_PPC32)
-#define smc501_readl(addr) ioread32be((addr))
-#define smc501_writel(val, addr) iowrite32be((val), (addr))
+#define smc501_readl(addr) ioread32((addr))
+#define smc501_writel(val, addr) iowrite32((val), (addr))
#else
#define smc501_readl(addr) readl(addr)
#define smc501_writel(val, addr) writel(val, addr)
This is a bit fishy since the cpu is big endian and iowrite32be()
should be identical to iowrite32(), but apparently that is not the
case here. I don't think I'll have time to track this down, though.
Guenter
- [Qemu-ppc] [PATCH] ppc: Fix sam460ex devicetree when booting the Linux kernel, Guenter Roeck, 2018/06/22
- Re: [Qemu-ppc] [PATCH] ppc: Fix sam460ex devicetree when booting the Linux kernel, David Gibson, 2018/06/22
- Re: [Qemu-ppc] [PATCH] ppc: Fix sam460ex devicetree when booting the Linux kernel, BALATON Zoltan, 2018/06/22
- Re: [Qemu-ppc] [PATCH] ppc: Fix sam460ex devicetree when booting the Linux kernel, Guenter Roeck, 2018/06/22
- Re: [Qemu-ppc] [PATCH] ppc: Fix sam460ex devicetree when booting the Linux kernel, BALATON Zoltan, 2018/06/22
- Re: [Qemu-ppc] [PATCH] ppc: Fix sam460ex devicetree when booting the Linux kernel,
Guenter Roeck <=
- Re: [Qemu-ppc] [PATCH] ppc: Fix sam460ex devicetree when booting the Linux kernel, BALATON Zoltan, 2018/06/23
- Re: [Qemu-ppc] [PATCH] ppc: Fix sam460ex devicetree when booting the Linux kernel, Guenter Roeck, 2018/06/23
- Re: [Qemu-ppc] [PATCH] ppc: Fix sam460ex devicetree when booting the Linux kernel, BALATON Zoltan, 2018/06/23