Page 23 of 124
Re: New kernels
Posted: Thu Jun 16, 2022 6:55 pm
by xeno74
xeno74 wrote: Tue Jun 14, 2022 5:07 pm
The keyboard and mouse issue still exists. We still need our
of.patch.
We tried a new patch but without any success.
Code: Select all
--- a/drivers/usb/host/fsl-mph-dr-of.c 2022-06-06 02:18:54.000000000 +0200
+++ b/drivers/usb/host/fsl-mph-dr-of.c 2022-06-09 19:31:50.135472793 +0200
@@ -80,8 +80,6 @@ static struct platform_device *fsl_usb2_
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);
@@ -105,12 +103,8 @@ static struct platform_device *fsl_usb2_
retval = platform_device_add_data(pdev, pdata, sizeof(*pdata));
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;
+ pdev->dev.of_node_reused = true;
retval = platform_device_add(pdev);
if (retval)
Link to the thread:
[FSL P50x0] Keyboard and mouse don't work anymore after the devicetree updates for 5.19
dmesg:
dmesg_FSL_P5040_Void_PPC-2.txt
Re: New kernels
Posted: Sat Jun 18, 2022 8:25 pm
by daz
Hi Christian,
Please try the following patch: I've just booted by X5000 with it.
Code: Select all
diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c
index 385be30..d0bf7fb 100644
--- a/drivers/usb/host/ehci-fsl.c
+++ b/drivers/usb/host/ehci-fsl.c
@@ -23,6 +23,7 @@
#include <linux/platform_device.h>
#include <linux/fsl_devices.h>
#include <linux/of_platform.h>
+#include <linux/of_address.h>
#include <linux/io.h>
#include "ehci.h"
@@ -46,9 +47,10 @@ static struct hc_driver __read_mostly fsl_ehci_hc_driver;
*/
static int fsl_ehci_drv_probe(struct platform_device *pdev)
{
+ struct device_node *dn = pdev->dev.of_node;
struct fsl_usb2_platform_data *pdata;
struct usb_hcd *hcd;
- struct resource *res;
+ struct resource res;
int irq;
int retval;
u32 tmp;
@@ -76,14 +78,10 @@ static int fsl_ehci_drv_probe(struct platform_device *pdev)
return -ENODEV;
}
- res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
- if (!res) {
- dev_err(&pdev->dev,
- "Found HC with no IRQ. Check %s setup!\n",
- dev_name(&pdev->dev));
- return -ENODEV;
+ irq = platform_get_irq(pdev, 0);
+ if (irq < 0) {
+ return irq;
}
- irq = res->start;
hcd = __usb_create_hcd(&fsl_ehci_hc_driver, pdev->dev.parent,
&pdev->dev, dev_name(&pdev->dev), NULL);
@@ -92,15 +90,21 @@ static int fsl_ehci_drv_probe(struct platform_device *pdev)
goto err1;
}
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- hcd->regs = devm_ioremap_resource(&pdev->dev, res);
+ platform_set_drvdata(pdev, hcd);
+ pdev->dev.platform_data = pdata;
+
+ tmp = of_address_to_resource(dn, 0, &res);
+ if (tmp)
+ return tmp;
+
+ hcd->regs = devm_ioremap_resource(&pdev->dev, &res);
if (IS_ERR(hcd->regs)) {
retval = PTR_ERR(hcd->regs);
goto err2;
}
- hcd->rsrc_start = res->start;
- hcd->rsrc_len = resource_size(res);
+ hcd->rsrc_start = res.start;
+ hcd->rsrc_len = resource_size(&res);
pdata->regs = hcd->regs;
diff --git a/drivers/usb/host/fsl-mph-dr-of.c b/drivers/usb/host/fsl-mph-dr-of.c
index 44a7e58..766e4ab 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,8 @@ 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;
+ pdev->dev.of_node_reused = true;
retval = platform_device_add(pdev);
if (retval)
Don't know if Rob's patch is needed... haven't had time to test.
Please Test.
Darren
Re: New kernels
Posted: Sun Jun 19, 2022 1:11 pm
by xeno74
daz wrote: Sat Jun 18, 2022 8:25 pm
Don't know if Rob's patch is needed... haven't had time to test.
Please Test.
Darren
Hi Darren,
I tested it today and your patch works. I don't need Rob's patch. I will test it further with the RC3 next week.
Thanks,
Christian
Re: New kernels
Posted: Mon Jun 20, 2022 8:47 am
by Skateman
Kernel 5.19 RC2 up and running on my AmigaOne X5000
Big picture
https://www.skateman.nl/wp-content/uplo ... -42-51.png
Re: New kernels
Posted: Mon Jun 20, 2022 3:24 pm
by xeno74
Skateman wrote: Mon Jun 20, 2022 8:47 am
Kernel 5.19 RC2 up and running on my AmigaOne X5000
Hi Skateman,
Many thanks for testing!
Cheers,
Christian
Re: New kernels
Posted: Mon Jun 20, 2022 8:22 pm
by xeno74
Hi All,
I released the
RC3 of kernel
5.19 for the X1000 and X5000 today.
New:
Download:
linux-image-5.19-rc3-X1000_X5000.tar.gz
@Darren
Could you please submit your patch to the kernel developers?
@All
Please test the kernels.
Thanks,
Christian
Re: New kernels
Posted: Wed Jun 22, 2022 12:04 am
by Skateman
Kernel 5.19 RC3 is running fine on my AmigaOne X5000
Big picture
https://www.skateman.nl/wp-content/uplo ... -00-47.png
Re: New kernels
Posted: Wed Jun 22, 2022 5:28 am
by xeno74
Skateman wrote: Wed Jun 22, 2022 12:04 am
Kernel 5.19 RC3 is running fine on my AmigaOne X5000
Great! Thanks a lot for testing!
BTW, Darren has submitted his patch because of the keyboard and mouse issues to the kernel developers.
Link:
[PATCH RFC] drivers/usb/ehci-fsl: Fix interrupt setup in host mode
Re: New kernels
Posted: Sun Jun 26, 2022 1:31 pm
by xeno74
Hi All,
I released the
stable longterm kernel
5.10.124 for the X1000 and X5000 today.
It's suitable for old Linux distributions which don't work with the latest kernels for example Ubuntu 10.04. It's also suitable if you have some issues with the latest kernels.
Download:
linux-image-5.10.124-X1000_X5000.tar.gz
BTW, I compiled Open Sonic on Ubuntu 10.04 yesterday and it works great on it. Unfortunately it's a very old game and there are some sound issues on modern Linux distributions.
Download:
opensnc-linux-powerpc.tar.gz
Please test the kernel.
Cheers,
Christian
Re: New kernels
Posted: Thu Jun 30, 2022 7:25 am
by xeno74
Hi All,
Here is the
RC4 of kernel
5.19 for testing.
New:
Download:
linux-image-5.19-rc4-X1000_X5000.tar.gz
Screenshots of the new
RC4 with
OPEN SONIC (native), SONIC THE HEDGEHOG (C64 version emulated with
VICE), and SONIC THE HEDGEHOG (GameCube version via
TV card):
Please test,
Christian