Thread (24 messages) 24 messages, 4 authors, 2022-06-16

Re: [FSL P50x0] Keyboard and mouse don't work anymore after the devicetree updates for 5.19

From: Christian Zigotzky <hidden>
Date: 2022-05-28 10:02:12

On 28 May 2022 at 10:05 am, Christian Zigotzky wrote:
On 27 May 2022 at 04:23 am, Rob Herring wrote:
quoted
The issue is in drivers/usb/host/fsl-mph-dr-of.c which copies the
resources to a child platform device. Can you try the following
change:
diff --git a/drivers/usb/host/fsl-mph-dr-of.c 
b/drivers/usb/host/fsl-mph-dr-of.c
index 44a7e58a26e3..47d9b7be60da 100644
--- a/drivers/usb/host/fsl-mph-dr-of.c
+++ b/drivers/usb/host/fsl-mph-dr-of.c
@@ -80,8 +80,6 @@ static struct platform_device 
*fsl_usb2_device_register(
                                         const char *name, int id)
  {
         struct platform_device *pdev;
-       const struct resource *res = ofdev->resource;
-       unsigned int num = ofdev->num_resources;
         int retval;

         pdev = platform_device_alloc(name, id);
@@ -106,11 +104,7 @@ static struct platform_device 
*fsl_usb2_device_register(
         if (retval)
                 goto error;

-       if (num) {
-               retval = platform_device_add_resources(pdev, res, num);
-               if (retval)
-                       goto error;
-       }
+       pdev->dev.of_node = ofdev->dev.of_node;

         retval = platform_device_add(pdev);
         if (retval)
Hi Rob,

Thanks a lot for your patch! :-)

First attempt with the latest git kernel:

patching file a/drivers/usb/host/fsl-mph-dr-of.c
Hunk #1 FAILED at 80.
Hunk #2 FAILED at 106.
2 out of 2 hunks FAILED -- saving rejects to file 
a/drivers/usb/host/fsl-mph-dr-of.c.rej

I created a new patch with your modifications. (see attachment)

Unfortunately I can't test it. The git kernel doesn't compile currently.

powerpc-linux-gnu-ld: net/rds/tcp_stats.o:(.bss+0x0): multiple 
definition of `____cacheline_aligned'; init/version.o:(.bss+0x0): 
first defined here
powerpc-linux-gnu-ld: net/wireless/wext-spy.o:(.bss+0x0): multiple 
definition of `____cacheline_aligned'; init/version.o:(.bss+0x0): 
first defined here
powerpc-linux-gnu-ld: net/wireless/wext-priv.o:(.bss+0x0): multiple 
definition of `____cacheline_aligned'; init/version.o:(.bss+0x0): 
first defined here
powerpc-linux-gnu-ld: net/tipc/bcast.o:(.bss+0x0): multiple definition 
of `____cacheline_aligned'; init/version.o:(.bss+0x0): first defined here
powerpc-linux-gnu-ld: net/tipc/bearer.o:(.bss+0x0): multiple 
definition of `____cacheline_aligned'; init/version.o:(.bss+0x0): 
first defined here
powerpc-linux-gnu-ld: net/tipc/core.o:(.bss+0x0): multiple definition 
of `____cacheline_aligned'; init/version.o:(.bss+0x0): first defined here
powerpc-linux-gnu-ld: net/tipc/link.o:(.bss+0x0): multiple definition 
of `____cacheline_aligned'; init/version.o:(.bss+0x0): first defined here
powerpc-linux-gnu-ld: net/tipc/discover.o:(.bss+0x0): multiple 
definition of `____cacheline_aligned'; init/version.o:(.bss+0x0): 
first defined here
powerpc-linux-gnu-ld: net/tipc/msg.o:(.bss+0x0): multiple definition 
of `____cacheline_aligned'; init/version.o:(.bss+0x0): first defined here
powerpc-linux-gnu-ld: net/tipc/name_distr.o:(.bss+0x0): multiple 
definition of `____cacheline_aligned'; init/version.o:(.bss+0x0): 
first defined here
powerpc-linux-gnu-ld: net/tipc/subscr.o:(.bss+0x0): multiple 
definition of `____cacheline_aligned'; init/version.o:(.bss+0x0): 
first defined here
powerpc-linux-gnu-ld: net/tipc/name_table.o:(.bss+0x0): multiple 
definition of `____cacheline_aligned'; init/version.o:(.bss+0x0): 
first defined here
powerpc-linux-gnu-ld: net/tipc/net.o:(.bss+0x0): multiple definition 
of `____cacheline_aligned'; init/version.o:(.bss+0x0): first defined here
powerpc-linux-gnu-ld: net/tipc/netlink.o:(.bss+0x0): multiple 
definition of `____cacheline_aligned'; init/version.o:(.bss+0x0): 
first defined here
powerpc-linux-gnu-ld: net/tipc/netlink_compat.o:(.bss+0x0): multiple 
definition of `____cacheline_aligned'; init/version.o:(.bss+0x0): 
first defined here
powerpc-linux-gnu-ld: net/tipc/node.o:(.bss+0x0): multiple definition 
of `____cacheline_aligned'; init/version.o:(.bss+0x0): first defined here
powerpc-linux-gnu-ld: net/tipc/eth_media.o:(.bss+0x0): multiple 
definition of `____cacheline_aligned'; init/version.o:(.bss+0x0): 
first defined here
powerpc-linux-gnu-ld: net/tipc/topsrv.o:(.bss+0x0): multiple 
definition of `____cacheline_aligned'; init/version.o:(.bss+0x0): 
first defined here
powerpc-linux-gnu-ld: net/tipc/group.o:(.bss+0x0): multiple definition 
of `____cacheline_aligned'; init/version.o:(.bss+0x0): first defined here
powerpc-linux-gnu-ld: net/tipc/trace.o:(.bss+0x0): multiple definition 
of `____cacheline_aligned'; init/version.o:(.bss+0x0): first defined here
powerpc-linux-gnu-ld: net/tipc/udp_media.o:(.bss+0x0): multiple 
definition of `____cacheline_aligned'; init/version.o:(.bss+0x0): 
first defined here
powerpc-linux-gnu-ld: net/tipc/sysctl.o:(.bss+0x40): multiple 
definition of `____cacheline_aligned'; init/version.o:(.bss+0x0): 
first defined here
powerpc-linux-gnu-ld: net/tipc/crypto.o:(.bss+0x0): multiple 
definition of `____cacheline_aligned'; init/version.o:(.bss+0x0): 
first defined here
powerpc-linux-gnu-ld: net/tipc/diag.o:(.bss+0x0): multiple definition 
of `____cacheline_aligned'; init/version.o:(.bss+0x0): first defined here
powerpc-linux-gnu-ld: net/9p/trans_common.o:(.bss+0x0): multiple 
definition of `____cacheline_aligned'; init/version.o:(.bss+0x0): 
first defined here
powerpc-linux-gnu-ld: net/9p/trans_virtio.o:(.bss+0x40): multiple 
definition of `____cacheline_aligned'; init/version.o:(.bss+0x0): 
first defined here
powerpc-linux-gnu-ld: net/6lowpan/ndisc.o:(.bss+0x0): multiple 
definition of `____cacheline_aligned'; init/version.o:(.bss+0x0): 
first defined here
powerpc-linux-gnu-ld: net/sysctl_net.o:(.bss+0x80): multiple 
definition of `____cacheline_aligned'; init/version.o:(.bss+0x0): 
first defined here
make: *** [Makefile:1160: vmlinux] Error 1

@All
Could you please check the multiple definition of 
`____cacheline_aligned'?

Thanks,
Christian
Fix at
https://patchwork.ozlabs.org/project/linuxppc-dev/patch/20220527112035.2842155-1-mpe@ellerman.id.au/

Christophe

------

Thank you for your hint. It compiles with the paca.patch.

@Rob
Unfortunately with your modifications I get a boot loop.

I compiled it also with the reverting patch (see attachment) and then it 
boots and works.

Thanks,
Christian

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help