Commit b87eaec2 authored by Finn Thain's avatar Finn Thain Committed by Geert Uytterhoeven

nubus: Add expansion_type values for various Mac models

Add an expansion slot attribute to allow drivers to properly handle
cards like Comm Slot cards and PDS cards without declaration ROMs.
This clarifies the logic for the Centris 610 model which has no
Comm Slot but has an optional on-board SONIC device.

Cc: "David S. Miller" <davem@davemloft.net>
Tested-by: default avatarStan Johnson <userm57@yahoo.com>
Signed-off-by: default avatarFinn Thain <fthain@telegraphics.com.au>
Signed-off-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
parent 41b84816
...@@ -33,7 +33,7 @@ struct mac_model ...@@ -33,7 +33,7 @@ struct mac_model
char ide_type; char ide_type;
char scc_type; char scc_type;
char ether_type; char ether_type;
char nubus_type; char expansion_type;
char floppy_type; char floppy_type;
}; };
...@@ -73,8 +73,11 @@ struct mac_model ...@@ -73,8 +73,11 @@ struct mac_model
#define MAC_ETHER_SONIC 1 #define MAC_ETHER_SONIC 1
#define MAC_ETHER_MACE 2 #define MAC_ETHER_MACE 2
#define MAC_NO_NUBUS 0 #define MAC_EXP_NONE 0
#define MAC_NUBUS 1 #define MAC_EXP_PDS 1 /* Accepts only a PDS card */
#define MAC_EXP_NUBUS 2 /* Accepts only NuBus card(s) */
#define MAC_EXP_PDS_NUBUS 3 /* Accepts PDS card and/or NuBus card(s) */
#define MAC_EXP_PDS_COMM 4 /* Accepts PDS card or Comm Slot card */
#define MAC_FLOPPY_IWM 0 #define MAC_FLOPPY_IWM 0
#define MAC_FLOPPY_SWIM_ADDR1 1 #define MAC_FLOPPY_SWIM_ADDR1 1
......
This diff is collapsed.
...@@ -311,7 +311,7 @@ static int mac_onboard_sonic_probe(struct net_device *dev) ...@@ -311,7 +311,7 @@ static int mac_onboard_sonic_probe(struct net_device *dev)
{ {
struct sonic_local* lp = netdev_priv(dev); struct sonic_local* lp = netdev_priv(dev);
int sr; int sr;
int commslot = 0; bool commslot = macintosh_config->expansion_type == MAC_EXP_PDS_COMM;
if (!MACH_IS_MAC) if (!MACH_IS_MAC)
return -ENODEV; return -ENODEV;
...@@ -322,10 +322,7 @@ static int mac_onboard_sonic_probe(struct net_device *dev) ...@@ -322,10 +322,7 @@ static int mac_onboard_sonic_probe(struct net_device *dev)
Ethernet (BTW, the Ethernet *is* always at the same Ethernet (BTW, the Ethernet *is* always at the same
address, and nothing else lives there, at least if Apple's address, and nothing else lives there, at least if Apple's
documentation is to be believed) */ documentation is to be believed) */
if (macintosh_config->ident == MAC_MODEL_Q630 || if (commslot || macintosh_config->ident == MAC_MODEL_C610) {
macintosh_config->ident == MAC_MODEL_P588 ||
macintosh_config->ident == MAC_MODEL_P575 ||
macintosh_config->ident == MAC_MODEL_C610) {
int card_present; int card_present;
card_present = hwreg_present((void*)ONBOARD_SONIC_REGISTERS); card_present = hwreg_present((void*)ONBOARD_SONIC_REGISTERS);
...@@ -333,7 +330,6 @@ static int mac_onboard_sonic_probe(struct net_device *dev) ...@@ -333,7 +330,6 @@ static int mac_onboard_sonic_probe(struct net_device *dev)
printk("none.\n"); printk("none.\n");
return -ENODEV; return -ENODEV;
} }
commslot = 1;
} }
printk("yes\n"); printk("yes\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment