* [PATCH 1/2] soc: fsl: qe_ports_ic: Use generic I/O helper instead of specific powerPC ones
@ 2026-07-07 14:58 Christophe Leroy (CS GROUP)
2026-07-07 15:00 ` [PATCH 2/2] powerpc: Move CONFIG_QE_GPIO to SoC Christophe Leroy (CS GROUP)
2026-07-27 10:19 ` [PATCH 1/2] soc: fsl: qe_ports_ic: Use generic I/O helper instead of specific powerPC ones Christophe Leroy (CS GROUP)
0 siblings, 2 replies; 3+ messages in thread
From: Christophe Leroy (CS GROUP) @ 2026-07-07 14:58 UTC (permalink / raw)
To: Qiang Zhao, Madhavan Srinivasan, Christophe Leroy (CS GROUP)
Cc: linux-kernel, linuxppc-dev, linux-arm-kernel, Paul Louvel
Use ioread32be() and iowrite32be() instead of in_be32() and out_be32()
to allow build on other platforms than powerPC.
Signed-off-by: Christophe Leroy (CS GROUP) <chleroy@kernel.org>
---
drivers/soc/fsl/qe/qe_ports_ic.c | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/drivers/soc/fsl/qe/qe_ports_ic.c b/drivers/soc/fsl/qe/qe_ports_ic.c
index 9b0bba64e91e4..33ca1ddafe18c 100644
--- a/drivers/soc/fsl/qe/qe_ports_ic.c
+++ b/drivers/soc/fsl/qe/qe_ports_ic.c
@@ -23,36 +23,39 @@ struct qepic_data {
static void qepic_mask(struct irq_data *d)
{
struct qepic_data *data = irq_data_get_irq_chip_data(d);
+ u32 val = ioread32be(data->reg + CEPIMR);
- clrbits32(data->reg + CEPIMR, 1 << (31 - irqd_to_hwirq(d)));
+ iowrite32be(val & ~(1 << (31 - irqd_to_hwirq(d))), data->reg + CEPIMR);
}
static void qepic_unmask(struct irq_data *d)
{
struct qepic_data *data = irq_data_get_irq_chip_data(d);
+ u32 val = ioread32be(data->reg + CEPIMR);
- setbits32(data->reg + CEPIMR, 1 << (31 - irqd_to_hwirq(d)));
+ iowrite32be(val | 1 << (31 - irqd_to_hwirq(d)), data->reg + CEPIMR);
}
static void qepic_end(struct irq_data *d)
{
struct qepic_data *data = irq_data_get_irq_chip_data(d);
- out_be32(data->reg + CEPIER, 1 << (31 - irqd_to_hwirq(d)));
+ iowrite32be(1 << (31 - irqd_to_hwirq(d)), data->reg + CEPIER);
}
static int qepic_set_type(struct irq_data *d, unsigned int flow_type)
{
struct qepic_data *data = irq_data_get_irq_chip_data(d);
unsigned int vec = (unsigned int)irqd_to_hwirq(d);
+ u32 val = ioread32be(data->reg + CEPICR);
switch (flow_type & IRQ_TYPE_SENSE_MASK) {
case IRQ_TYPE_EDGE_FALLING:
- setbits32(data->reg + CEPICR, 1 << (31 - vec));
+ iowrite32be(val | 1 << (31 - vec), data->reg + CEPICR);
return 0;
case IRQ_TYPE_EDGE_BOTH:
case IRQ_TYPE_NONE:
- clrbits32(data->reg + CEPICR, 1 << (31 - vec));
+ iowrite32be(val & ~(1 << (31 - vec)), data->reg + CEPICR);
return 0;
}
return -EINVAL;
@@ -69,7 +72,7 @@ static struct irq_chip qepic = {
static int qepic_get_irq(struct irq_desc *desc)
{
struct qepic_data *data = irq_desc_get_handler_data(desc);
- u32 event = in_be32(data->reg + CEPIER);
+ u32 event = ioread32be(data->reg + CEPIER);
if (!event)
return -1;
--
2.54.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* [PATCH 2/2] powerpc: Move CONFIG_QE_GPIO to SoC
2026-07-07 14:58 [PATCH 1/2] soc: fsl: qe_ports_ic: Use generic I/O helper instead of specific powerPC ones Christophe Leroy (CS GROUP)
@ 2026-07-07 15:00 ` Christophe Leroy (CS GROUP)
2026-07-27 10:19 ` [PATCH 1/2] soc: fsl: qe_ports_ic: Use generic I/O helper instead of specific powerPC ones Christophe Leroy (CS GROUP)
1 sibling, 0 replies; 3+ messages in thread
From: Christophe Leroy (CS GROUP) @ 2026-07-07 15:00 UTC (permalink / raw)
To: Qiang Zhao, Madhavan Srinivasan, Christophe Leroy (CS GROUP)
Cc: linux-kernel, linuxppc-dev, linux-arm-kernel, Paul Louvel
Commit 7aa1aa6ecec2 ("QE: Move QE from arch/powerpc to drivers/soc")
moved QE into drivers/soc including gpio.c but left CONFIG_QE_GPIO
in powerpc's Kconfig.
Move it to SoC as well as it is the only place it is used:
drivers/soc/fsl/qe/Makefile:obj-$(CONFIG_QE_GPIO) += gpio.o qe_ports_ic.o
include/soc/fsl/qe/qe.h:#ifdef CONFIG_QE_GPIO
include/soc/fsl/qe/qe.h:#endif /* CONFIG_QE_GPIO */
Link: https://lore.kernel.org/r/16a187116511f5c844c43a12d09f263e77f4fd60.1780936729.git.chleroy@kernel.org
Signed-off-by: Christophe Leroy (CS GROUP) <chleroy@kernel.org>
---
arch/powerpc/platforms/Kconfig | 8 --------
drivers/soc/fsl/qe/Kconfig | 8 ++++++++
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/arch/powerpc/platforms/Kconfig b/arch/powerpc/platforms/Kconfig
index c4e61843d9d99..2f797ac6f1b3f 100644
--- a/arch/powerpc/platforms/Kconfig
+++ b/arch/powerpc/platforms/Kconfig
@@ -228,14 +228,6 @@ config TAU_AVERAGE
If in doubt, say N here.
-config QE_GPIO
- bool "QE GPIO support"
- depends on QUICC_ENGINE
- select GPIOLIB
- help
- Say Y here if you're going to use hardware that connects to the
- QE GPIOs.
-
config CPM2
bool "Enable support for the CPM2 (Communications Processor Module)"
depends on (FSL_SOC_BOOKE && PPC32) || PPC_82xx
diff --git a/drivers/soc/fsl/qe/Kconfig b/drivers/soc/fsl/qe/Kconfig
index eb03f42ab9781..b35a8fd30ebfb 100644
--- a/drivers/soc/fsl/qe/Kconfig
+++ b/drivers/soc/fsl/qe/Kconfig
@@ -67,3 +67,11 @@ config QE_USB
default y if USB_FSL_QE
help
QE USB Controller support
+
+config QE_GPIO
+ bool "QE GPIO support"
+ depends on QUICC_ENGINE
+ select GPIOLIB
+ help
+ Say Y here if you're going to use hardware that connects to the
+ QE GPIOs.
--
2.54.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH 1/2] soc: fsl: qe_ports_ic: Use generic I/O helper instead of specific powerPC ones
2026-07-07 14:58 [PATCH 1/2] soc: fsl: qe_ports_ic: Use generic I/O helper instead of specific powerPC ones Christophe Leroy (CS GROUP)
2026-07-07 15:00 ` [PATCH 2/2] powerpc: Move CONFIG_QE_GPIO to SoC Christophe Leroy (CS GROUP)
@ 2026-07-27 10:19 ` Christophe Leroy (CS GROUP)
1 sibling, 0 replies; 3+ messages in thread
From: Christophe Leroy (CS GROUP) @ 2026-07-27 10:19 UTC (permalink / raw)
To: Qiang Zhao, Madhavan Srinivasan, Christophe Leroy (CS GROUP)
Cc: linux-kernel, linuxppc-dev, linux-arm-kernel, Paul Louvel
On Tue, 07 Jul 2026 16:58:14 +0200, Christophe Leroy (CS GROUP) wrote:
> Use ioread32be() and iowrite32be() instead of in_be32() and out_be32()
> to allow build on other platforms than powerPC.
>
>
Applied, thanks!
[1/2] soc: fsl: qe_ports_ic: Use generic I/O helper instead of specific powerPC ones
(no commit info)
[2/2] powerpc: Move CONFIG_QE_GPIO to SoC
commit: 6599935a1e4be0354326086ea6c73dcb8f43b881
Best regards,
--
Christophe Leroy (CS GROUP) <chleroy@kernel.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-07-27 10:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-07 14:58 [PATCH 1/2] soc: fsl: qe_ports_ic: Use generic I/O helper instead of specific powerPC ones Christophe Leroy (CS GROUP)
2026-07-07 15:00 ` [PATCH 2/2] powerpc: Move CONFIG_QE_GPIO to SoC Christophe Leroy (CS GROUP)
2026-07-27 10:19 ` [PATCH 1/2] soc: fsl: qe_ports_ic: Use generic I/O helper instead of specific powerPC ones Christophe Leroy (CS GROUP)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox