mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] SPARC: Fix parport_pc support for 32-bit platforms
@ 2023-06-18 23:00 Maciej W. Rozycki
  2023-06-18 23:19 ` Randy Dunlap
  0 siblings, 1 reply; 3+ messages in thread
From: Maciej W. Rozycki @ 2023-06-18 23:00 UTC (permalink / raw)
  To: David S. Miller
  Cc: Randy Dunlap, Sudip Mukherjee, Sam Ravnborg, sparclinux,
	linux-parport, linux-kernel

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@orcam.me.uk>
Fixes: 66bcd06099bb ("parport_pc: Also enable driver for PCI systems")
Cc: stable@vger.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 */

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-06-18 23:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-18 23:00 [PATCH] SPARC: Fix parport_pc support for 32-bit platforms Maciej W. Rozycki
2023-06-18 23:19 ` Randy Dunlap
2023-06-18 23:45   ` Maciej W. Rozycki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®