[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.21.2306182347101.14084@angie.orcam.me.uk>
Date: Mon, 19 Jun 2023 00:00:40 +0100 (BST)
From: "Maciej W. Rozycki" <macro@...am.me.uk>
To: "David S. Miller" <davem@...emloft.net>
cc: Randy Dunlap <rdunlap@...radead.org>,
Sudip Mukherjee <sudipm.mukherjee@...il.com>,
Sam Ravnborg <sam@...nborg.org>, sparclinux@...r.kernel.org,
linux-parport@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: [PATCH] SPARC: Fix parport_pc support for 32-bit platforms
For 32-bit SPARC platforms PC-style parallel ports are only available as
PCI options. Adjust <asm/parport.h> accordingly, fixing build errors:
sparc-linux-gnu-ld: drivers/parport/parport_pc.o: in function `ecpp_remove':
parport_pc.c:(.text+0x8f0): undefined reference to `ebus_dma_irq_enable'
sparc-linux-gnu-ld: parport_pc.c:(.text+0x8f8): undefined reference to `ebus_dma_unregister'
sparc-linux-gnu-ld: drivers/parport/parport_pc.o: in function `parport_pc_fifo_write_block_dma':
parport_pc.c:(.text+0x1430): undefined reference to `ebus_dma_enable'
sparc-linux-gnu-ld: parport_pc.c:(.text+0x1444): undefined reference to `ebus_dma_prepare'
sparc-linux-gnu-ld: parport_pc.c:(.text+0x14e4): undefined reference to `ebus_dma_enable'
sparc-linux-gnu-ld: parport_pc.c:(.text+0x14f4): undefined reference to `ebus_dma_request'
sparc-linux-gnu-ld: parport_pc.c:(.text+0x1584): undefined reference to `ebus_dma_enable'
sparc-linux-gnu-ld: parport_pc.c:(.text+0x1594): undefined reference to `ebus_dma_residue'
sparc-linux-gnu-ld: parport_pc.c:(.text+0x1608): undefined reference to `ebus_dma_enable'
sparc-linux-gnu-ld: parport_pc.c:(.text+0x1618): undefined reference to `ebus_dma_residue'
sparc-linux-gnu-ld: drivers/parport/parport_pc.o: in function `ecpp_probe':
parport_pc.c:(.text+0x33a0): undefined reference to `ebus_dma_register'
sparc-linux-gnu-ld: parport_pc.c:(.text+0x33b8): undefined reference to `ebus_dma_irq_enable'
sparc-linux-gnu-ld: parport_pc.c:(.text+0x34b0): undefined reference to `ebus_dma_irq_enable'
sparc-linux-gnu-ld: parport_pc.c:(.text+0x34bc): undefined reference to `ebus_dma_unregister'
Signed-off-by: Maciej W. Rozycki <macro@...am.me.uk>
Fixes: 66bcd06099bb ("parport_pc: Also enable driver for PCI systems")
Cc: stable@...r.kernel.org # v5.18+
---
arch/sparc/include/asm/parport.h | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
linux-sparc32-parport-pc.diff
Index: linux-macro/arch/sparc/include/asm/parport.h
===================================================================
--- linux-macro.orig/arch/sparc/include/asm/parport.h
+++ linux-macro/arch/sparc/include/asm/parport.h
@@ -19,7 +19,9 @@
* While sparc64 doesn't have an ISA DMA API, we provide something that looks
* close enough to make parport_pc happy
*/
+#ifdef CONFIG_SPARC64
#define HAS_DMA
+#endif
#ifdef CONFIG_PARPORT_PC_FIFO
static DEFINE_SPINLOCK(dma_spin_lock);
@@ -249,7 +251,8 @@ static struct platform_driver ecpp_drive
static int parport_pc_find_nonpci_ports(int autoirq, int autodma)
{
- return platform_driver_register(&ecpp_driver);
+ return (IS_ENABLED(CONFIG_SPARC64) &&
+ platform_driver_register(&ecpp_driver));
}
#endif /* !(_ASM_SPARC64_PARPORT_H */
Powered by blists - more mailing lists