diff options
Diffstat (limited to 'meta-yocto-bsp/recipes-kernel')
5 files changed, 152 insertions, 57 deletions
diff --git a/meta-yocto-bsp/recipes-kernel/linux/files/0001-Revert-serial-8250_omap-Drop-pm_runtime_irq_safe.patch b/meta-yocto-bsp/recipes-kernel/linux/files/0001-Revert-serial-8250_omap-Drop-pm_runtime_irq_safe.patch new file mode 100644 index 0000000000..8837dd2346 --- /dev/null +++ b/meta-yocto-bsp/recipes-kernel/linux/files/0001-Revert-serial-8250_omap-Drop-pm_runtime_irq_safe.patch | |||
@@ -0,0 +1,130 @@ | |||
1 | From cc255f5132cf39e9154340cf58780f8c763c6481 Mon Sep 17 00:00:00 2001 | ||
2 | From: Ross Burton <ross.burton@arm.com> | ||
3 | Date: Thu, 23 Jan 2025 17:06:08 +0000 | ||
4 | Subject: [PATCH] Revert "serial: 8250_omap: Drop pm_runtime_irq_safe()" | ||
5 | |||
6 | This reverts commit 8700a7ea5519fb0b3bad2362adfeac358c2119ce. | ||
7 | |||
8 | Upstream-Status: Inappropriate | ||
9 | Signed-off-by: Ross Burton <ross.burton@arm.com> | ||
10 | --- | ||
11 | drivers/tty/serial/8250/8250_omap.c | 29 ++++++++--------------------- | ||
12 | 1 file changed, 8 insertions(+), 21 deletions(-) | ||
13 | |||
14 | diff --git a/drivers/tty/serial/8250/8250_omap.c b/drivers/tty/serial/8250/8250_omap.c | ||
15 | index 0dd68bdbfbcf7..db24d7d1dcb67 100644 | ||
16 | --- a/drivers/tty/serial/8250/8250_omap.c | ||
17 | +++ b/drivers/tty/serial/8250/8250_omap.c | ||
18 | @@ -8,7 +8,6 @@ | ||
19 | * | ||
20 | */ | ||
21 | |||
22 | -#include <linux/atomic.h> | ||
23 | #include <linux/clk.h> | ||
24 | #include <linux/device.h> | ||
25 | #include <linux/io.h> | ||
26 | @@ -134,7 +133,6 @@ struct omap8250_priv { | ||
27 | |||
28 | u8 tx_trigger; | ||
29 | u8 rx_trigger; | ||
30 | - atomic_t active; | ||
31 | bool is_suspending; | ||
32 | int wakeirq; | ||
33 | u32 latency; | ||
34 | @@ -636,23 +634,14 @@ static irqreturn_t omap8250_irq(int irq, void *dev_id) | ||
35 | unsigned int iir, lsr; | ||
36 | int ret; | ||
37 | |||
38 | - pm_runtime_get_noresume(port->dev); | ||
39 | - | ||
40 | - /* Shallow idle state wake-up to an IO interrupt? */ | ||
41 | - if (atomic_add_unless(&priv->active, 1, 1)) { | ||
42 | - priv->latency = priv->calc_latency; | ||
43 | - schedule_work(&priv->qos_work); | ||
44 | - } | ||
45 | - | ||
46 | #ifdef CONFIG_SERIAL_8250_DMA | ||
47 | if (up->dma) { | ||
48 | ret = omap_8250_dma_handle_irq(port); | ||
49 | - pm_runtime_mark_last_busy(port->dev); | ||
50 | - pm_runtime_put(port->dev); | ||
51 | return IRQ_RETVAL(ret); | ||
52 | } | ||
53 | #endif | ||
54 | |||
55 | + serial8250_rpm_get(up); | ||
56 | lsr = serial_port_in(port, UART_LSR); | ||
57 | iir = serial_port_in(port, UART_IIR); | ||
58 | ret = serial8250_handle_irq(port, iir); | ||
59 | @@ -701,8 +690,7 @@ static irqreturn_t omap8250_irq(int irq, void *dev_id) | ||
60 | schedule_delayed_work(&up->overrun_backoff, delay); | ||
61 | } | ||
62 | |||
63 | - pm_runtime_mark_last_busy(port->dev); | ||
64 | - pm_runtime_put(port->dev); | ||
65 | + serial8250_rpm_put(up); | ||
66 | |||
67 | return IRQ_RETVAL(ret); | ||
68 | } | ||
69 | @@ -1314,8 +1302,11 @@ static int omap_8250_dma_handle_irq(struct uart_port *port) | ||
70 | u16 status; | ||
71 | u8 iir; | ||
72 | |||
73 | + serial8250_rpm_get(up); | ||
74 | + | ||
75 | iir = serial_port_in(port, UART_IIR); | ||
76 | if (iir & UART_IIR_NO_INT) { | ||
77 | + serial8250_rpm_put(up); | ||
78 | return IRQ_HANDLED; | ||
79 | } | ||
80 | |||
81 | @@ -1348,6 +1339,7 @@ static int omap_8250_dma_handle_irq(struct uart_port *port) | ||
82 | |||
83 | uart_unlock_and_check_sysrq(port); | ||
84 | |||
85 | + serial8250_rpm_put(up); | ||
86 | return 1; | ||
87 | } | ||
88 | |||
89 | @@ -1539,6 +1531,8 @@ static int omap8250_probe(struct platform_device *pdev) | ||
90 | if (!of_get_available_child_count(pdev->dev.of_node)) | ||
91 | pm_runtime_set_autosuspend_delay(&pdev->dev, -1); | ||
92 | |||
93 | + pm_runtime_irq_safe(&pdev->dev); | ||
94 | + | ||
95 | pm_runtime_get_sync(&pdev->dev); | ||
96 | |||
97 | omap_serial_fill_features_erratas(&up, priv); | ||
98 | @@ -1776,7 +1770,6 @@ static int omap8250_runtime_suspend(struct device *dev) | ||
99 | |||
100 | priv->latency = PM_QOS_CPU_LATENCY_DEFAULT_VALUE; | ||
101 | schedule_work(&priv->qos_work); | ||
102 | - atomic_set(&priv->active, 0); | ||
103 | |||
104 | return 0; | ||
105 | } | ||
106 | @@ -1786,10 +1779,6 @@ static int omap8250_runtime_resume(struct device *dev) | ||
107 | struct omap8250_priv *priv = dev_get_drvdata(dev); | ||
108 | struct uart_8250_port *up = NULL; | ||
109 | |||
110 | - /* Did the hardware wake to a device IO interrupt before a wakeirq? */ | ||
111 | - if (atomic_read(&priv->active)) | ||
112 | - return 0; | ||
113 | - | ||
114 | if (priv->line >= 0) | ||
115 | up = serial8250_get_port(priv->line); | ||
116 | |||
117 | @@ -1805,10 +1794,8 @@ static int omap8250_runtime_resume(struct device *dev) | ||
118 | uart_port_unlock_irq(&up->port); | ||
119 | } | ||
120 | |||
121 | - atomic_set(&priv->active, 1); | ||
122 | priv->latency = priv->calc_latency; | ||
123 | schedule_work(&priv->qos_work); | ||
124 | - | ||
125 | return 0; | ||
126 | } | ||
127 | |||
128 | -- | ||
129 | 2.43.0 | ||
130 | |||
diff --git a/meta-yocto-bsp/recipes-kernel/linux/linux-yocto-dev.bbappend b/meta-yocto-bsp/recipes-kernel/linux/linux-yocto-dev.bbappend index 6e5a129dd4..5b1b736b1c 100644 --- a/meta-yocto-bsp/recipes-kernel/linux/linux-yocto-dev.bbappend +++ b/meta-yocto-bsp/recipes-kernel/linux/linux-yocto-dev.bbappend | |||
@@ -1,13 +1,13 @@ | |||
1 | KBRANCH_genericx86 = "standard/base" | 1 | KBRANCH:genericx86 = "standard/base" |
2 | KBRANCH_genericx86-64 = "standard/base" | 2 | KBRANCH:genericx86-64 = "standard/base" |
3 | KBRANCH_edgerouter = "standard/edgerouter" | 3 | KBRANCH:beaglebone-yocto = "standard/beaglebone" |
4 | KBRANCH_beaglebone-yocto = "standard/beaglebone" | ||
5 | 4 | ||
6 | KMACHINE_genericx86 ?= "common-pc" | 5 | KMACHINE:genericarm64 ?= "genericarm64" |
7 | KMACHINE_genericx86-64 ?= "common-pc-64" | 6 | KMACHINE:genericx86 ?= "common-pc" |
8 | KMACHINE_beaglebone-yocto ?= "beaglebone" | 7 | KMACHINE:genericx86-64 ?= "common-pc-64" |
8 | KMACHINE:beaglebone-yocto ?= "beaglebone" | ||
9 | 9 | ||
10 | COMPATIBLE_MACHINE_genericx86 = "genericx86" | 10 | COMPATIBLE_MACHINE:genericarm64 = "genericarm64" |
11 | COMPATIBLE_MACHINE_genericx86-64 = "genericx86-64" | 11 | COMPATIBLE_MACHINE:genericx86 = "genericx86" |
12 | COMPATIBLE_MACHINE_edgerouter = "edgerouter" | 12 | COMPATIBLE_MACHINE:genericx86-64 = "genericx86-64" |
13 | COMPATIBLE_MACHINE_beaglebone-yocto = "beaglebone-yocto" | 13 | COMPATIBLE_MACHINE:beaglebone-yocto = "beaglebone-yocto" |
diff --git a/meta-yocto-bsp/recipes-kernel/linux/linux-yocto_5.10.bbappend b/meta-yocto-bsp/recipes-kernel/linux/linux-yocto_5.10.bbappend deleted file mode 100644 index 87e47352a6..0000000000 --- a/meta-yocto-bsp/recipes-kernel/linux/linux-yocto_5.10.bbappend +++ /dev/null | |||
@@ -1,23 +0,0 @@ | |||
1 | KBRANCH_genericx86 = "v5.10/standard/base" | ||
2 | KBRANCH_genericx86-64 = "v5.10/standard/base" | ||
3 | KBRANCH_edgerouter = "v5.10/standard/edgerouter" | ||
4 | KBRANCH_beaglebone-yocto = "v5.10/standard/beaglebone" | ||
5 | |||
6 | KMACHINE_genericx86 ?= "common-pc" | ||
7 | KMACHINE_genericx86-64 ?= "common-pc-64" | ||
8 | KMACHINE_beaglebone-yocto ?= "beaglebone" | ||
9 | |||
10 | SRCREV_machine_genericx86 ?= "cdca78778415b4b3bd64e8390ee8adf04bf7e17a" | ||
11 | SRCREV_machine_genericx86-64 ?= "cdca78778415b4b3bd64e8390ee8adf04bf7e17a" | ||
12 | SRCREV_machine_edgerouter ?= "2e1fb8f84f09ca768eb531f33a126a40bb90e791" | ||
13 | SRCREV_machine_beaglebone-yocto ?= "cdca78778415b4b3bd64e8390ee8adf04bf7e17a" | ||
14 | |||
15 | COMPATIBLE_MACHINE_genericx86 = "genericx86" | ||
16 | COMPATIBLE_MACHINE_genericx86-64 = "genericx86-64" | ||
17 | COMPATIBLE_MACHINE_edgerouter = "edgerouter" | ||
18 | COMPATIBLE_MACHINE_beaglebone-yocto = "beaglebone-yocto" | ||
19 | |||
20 | LINUX_VERSION_genericx86 = "5.10.12" | ||
21 | LINUX_VERSION_genericx86-64 = "5.10.12" | ||
22 | LINUX_VERSION_edgerouter = "5.10.12" | ||
23 | LINUX_VERSION_beaglebone-yocto = "5.10.12" | ||
diff --git a/meta-yocto-bsp/recipes-kernel/linux/linux-yocto_5.4.bbappend b/meta-yocto-bsp/recipes-kernel/linux/linux-yocto_5.4.bbappend deleted file mode 100644 index 35147d2da8..0000000000 --- a/meta-yocto-bsp/recipes-kernel/linux/linux-yocto_5.4.bbappend +++ /dev/null | |||
@@ -1,23 +0,0 @@ | |||
1 | KBRANCH_genericx86 = "v5.4/standard/base" | ||
2 | KBRANCH_genericx86-64 = "v5.4/standard/base" | ||
3 | KBRANCH_edgerouter = "v5.4/standard/edgerouter" | ||
4 | KBRANCH_beaglebone-yocto = "v5.4/standard/beaglebone" | ||
5 | |||
6 | KMACHINE_genericx86 ?= "common-pc" | ||
7 | KMACHINE_genericx86-64 ?= "common-pc-64" | ||
8 | KMACHINE_beaglebone-yocto ?= "beaglebone" | ||
9 | |||
10 | SRCREV_machine_genericx86 ?= "31db2b47ac7d8508080fbb7344399b501216de66" | ||
11 | SRCREV_machine_genericx86-64 ?= "31db2b47ac7d8508080fbb7344399b501216de66" | ||
12 | SRCREV_machine_edgerouter ?= "706efec4c1e270ec5dda92275898cd465dfdc7dd" | ||
13 | SRCREV_machine_beaglebone-yocto ?= "706efec4c1e270ec5dda92275898cd465dfdc7dd" | ||
14 | |||
15 | COMPATIBLE_MACHINE_genericx86 = "genericx86" | ||
16 | COMPATIBLE_MACHINE_genericx86-64 = "genericx86-64" | ||
17 | COMPATIBLE_MACHINE_edgerouter = "edgerouter" | ||
18 | COMPATIBLE_MACHINE_beaglebone-yocto = "beaglebone-yocto" | ||
19 | |||
20 | LINUX_VERSION_genericx86 = "5.4.94" | ||
21 | LINUX_VERSION_genericx86-64 = "5.4.94" | ||
22 | LINUX_VERSION_edgerouter = "5.4.58" | ||
23 | LINUX_VERSION_beaglebone-yocto = "5.4.58" | ||
diff --git a/meta-yocto-bsp/recipes-kernel/linux/linux-yocto_6.12.bbappend b/meta-yocto-bsp/recipes-kernel/linux/linux-yocto_6.12.bbappend new file mode 100644 index 0000000000..831cb556be --- /dev/null +++ b/meta-yocto-bsp/recipes-kernel/linux/linux-yocto_6.12.bbappend | |||
@@ -0,0 +1,11 @@ | |||
1 | COMPATIBLE_MACHINE:genericarm64 = "genericarm64" | ||
2 | COMPATIBLE_MACHINE:beaglebone-yocto = "beaglebone-yocto" | ||
3 | COMPATIBLE_MACHINE:genericx86 = "genericx86" | ||
4 | COMPATIBLE_MACHINE:genericx86-64 = "genericx86-64" | ||
5 | |||
6 | KMACHINE:beaglebone-yocto ?= "beaglebone" | ||
7 | KMACHINE:genericx86 ?= "common-pc" | ||
8 | KMACHINE:genericx86-64 ?= "common-pc-64" | ||
9 | |||
10 | FILESEXTRAPATHS:prepend:genericarm64 := "${THISDIR}/files:" | ||
11 | SRC_URI:append:genericarm64 = " file://0001-Revert-serial-8250_omap-Drop-pm_runtime_irq_safe.patch" | ||