[prev in list] [next in list] [prev in thread] [next in thread]
List: linux-m68k
Subject: [PATCH 4/11] Atari: fix EtherNAT interrupt; conditonal platform device register
From: Michael Schmitz <schmitz () zirkon ! biophys ! uni-duesseldorf ! de>
Date: 2012-05-24 0:48:15
Message-ID: E1SXMDv-0002Xe-6F () zirkon ! biophys ! uni-duesseldorf ! de
[Download RAW message or body]
From 15da61fd8cb166dd9402b98eb9c835e0e29b5ae0 Mon Sep 17 00:00:00 2001
From: Michael Schmitz <schmitz@debian.org>
Date: Wed, 23 May 2012 20:19:39 +1200
Subject: [PATCH 04/11] [m68k] Atari: fix EtherNAT interrupt number; conditionalize \
EtherNAT platform device register
---
arch/m68k/atari/config.c | 17 ++++++++++++++---
1 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/arch/m68k/atari/config.c b/arch/m68k/atari/config.c
index 4fc7396..9a83537 100644
--- a/arch/m68k/atari/config.c
+++ b/arch/m68k/atari/config.c
@@ -662,7 +662,7 @@ static void atari_get_hardware_list(struct seq_file *m)
*/
#define ATARI_ETHERNAT_PHYS_ADDR 0x80000000
-#define ATARI_ETHERNAT_IRQ 0xc3
+#define ATARI_ETHERNAT_IRQ 140
static struct resource smc91x_resources[] = {
[0] = {
@@ -686,16 +686,27 @@ static struct platform_device smc91x_device = {
.resource = smc91x_resources,
};
-static struct platform_device *atari_platform_devices[] __initdata = {
+static struct platform_device *atari_ethernat_devices[] __initdata = {
&smc91x_device
};
int __init atari_platform_init(void)
{
+ unsigned char *enatc_virt;
+ int rv = -ENODEV;
+
if (!MACH_IS_ATARI)
return -ENODEV;
- return platform_add_devices(atari_platform_devices, \
ARRAY_SIZE(atari_platform_devices)); +#if IS_ENABLED(CONFIG_ATARI_ETHERNAT_OLD)
+ enatc_virt = (unsigned char *)ioremap((ATARI_ETHERNAT_PHYS_ADDR+0x23), 0xf);
+ if (hwreg_present(enatc_virt)) {
+ *enatc_virt |= 0x2; /* enable SMC91C111 interrupt */
+ rv = platform_add_devices(atari_ethernat_devices, \
ARRAY_SIZE(atari_ethernat_devices)); + }
+#endif
+
+ return rv;
}
arch_initcall(atari_platform_init);
--
1.7.0.4
--
To unsubscribe from this list: send the line "unsubscribe linux-m68k" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic