From: Andreas Tobler <toa@pop.agri.ch>
To: rboder@grn.georet.net
Cc: linuxppc-dev@lists.linuxppc.org
Subject: Re: PowerMac G4 and pcmcia flash cards
Date: Wed, 23 Feb 2000 08:22:17 +0100 [thread overview]
Message-ID: <38B38AA3.8D4ECC2C@pop.agri.ch> (raw)
In-Reply-To: 38B341A7.9F6E5DEC@grn.georet.net
[-- Attachment #1: Type: text/plain, Size: 866 bytes --]
Hi,
Ryan Boder wrote:
>
> Hi,
>
> need to write a little boot prom and I would like to use my G4 to put it
> on a flash card. I have tried using pcmcia card services by David Hinds
> and it won't even install. This is no surprise since he claims in the
> HOWTO that Macs are not supproted yet. How you guys been using pcmcia
> devices and does anyone know if I can do it on my G4?
For the basic services I can run he latest 3.1.11 package from David
with minor patching. It works well at least for Modems. A bit more
tweaking on the kernel side and I get CardBus services to run, e.g my
Xircom CBEM56G Modem/ethernet card. This is done on a Wallstreet I.
How about G4? I don't know, I suppose they don't have a PCI-TO-CARDBUS
bridge or even PCMCIA unless you add a card reader.
For the kernel patches, if you need them, they come later since I'm on work.
Andreas
[-- Attachment #2: Unknown Document --]
[-- Type: text/plain, Size: 5614 bytes --]
diff -u --recursive pcmcia-cs-3.1.9/etc/config pcmcia-cs-3.1.9.orig/etc/config
--- pcmcia-cs-3.1.9/etc/config Tue Jan 25 20:44:19 2000
+++ pcmcia-cs-3.1.9.orig/etc/config Mon Jan 24 19:01:10 2000
@@ -40,7 +40,7 @@
class "ftl" module "ftl_cs"
device "serial_cs"
- class "serial" module "serial_cs"
+ class "serial" module "misc/serial", "serial_cs"
device "parport_cs"
class "parport" module "parport_cs"
diff -u --recursive pcmcia-cs-3.1.9/etc/config.opts pcmcia-cs-3.1.9.orig/etc/config.opts
--- pcmcia-cs-3.1.9/etc/config.opts Tue Jan 25 20:44:19 2000
+++ pcmcia-cs-3.1.9.orig/etc/config.opts Mon Jan 24 18:59:31 2000
@@ -1,52 +1,20 @@
#
# Local PCMCIA Configuration File
#
-#----------------------------------------------------------------------
-
# System resources available for PCMCIA devices
-
-include port 0x100-0x4ff, port 0x800-0x8ff, port 0xc00-0xcff
-include memory 0xc0000-0xfffff
-include memory 0xa0000000-0xa0ffffff, memory 0x60000000-0x60ffffff
-
-# High port numbers do not always work...
-# include port 0x1000-0x17ff
-
-# Extra port range for IBM Token Ring
-include port 0xa00-0xaff
-
+#
+include port 0x0-0xfff
+include memory 0x90000000-0x90ffffff
# Resources we should not use, even if they appear to be available
-
-# First built-in serial port
-exclude irq 4
-# Second built-in serial port
-#exclude irq 3
-# First built-in parallel port
-exclude irq 7
-
-#----------------------------------------------------------------------
-
+#
+#
# Examples of options for loadable modules
-
+#
# To fix sluggish network with IBM ethernet adapter...
#module "pcnet_cs" opts "mem_speed=600"
-
-# Options for IBM Token Ring adapters
-#module "ibmtr_cs" opts "mmiobase=0xd0000 srambase=0xd4000"
-
-# Options for Raylink/WebGear driver: uncomment only one line...
-# Generic ad-hoc network
-module "ray_cs" opts "pc_debug=1 essid=ADHOC_ESSID hop_dwell=128 beacon_period=256 translate=1"
-# Infrastructure network for older cards
-#module "ray_cs" opts "pc_debug=1 net_type=1 essid=ESSID1"
-# Infrastructure network for WebGear
-#module "ray_cs" opts "pc_debug=1 net_type=1 essid=ESSID1 translate=1 hop_dwell=128 beacon_period=256"
-
-# Options for WaveLAN/IEEE driver (AccessPoint mode)...
-#module "wvlan_cs" opts "station_name=MY_PC"
-# Options for WaveLAN/IEEE driver (ad-hoc mode)...
-#module "wvlan_cs" opts "port_type=3 channel=1 station_name=MY_PC"
-
+#
# Options for Xircom Netwave driver...
#module "netwave_cs" opts "domain=0x100 scramble_key=0x0"
-
+#
+# Options for IBM Token Ring adapters
+#module "ibmtr_cs" opts "mmiobase=0xd0000 srambase=0xd4000"
\ No newline at end of file
diff -u --recursive pcmcia-cs-3.1.9/modules/cs.c pcmcia-cs-3.1.9.orig/modules/cs.c
--- pcmcia-cs-3.1.9/modules/cs.c Tue Jan 25 20:44:19 2000
+++ pcmcia-cs-3.1.9.orig/modules/cs.c Mon Jan 24 18:57:54 2000
@@ -457,6 +457,10 @@
/* Blank out the socket state */
s->state &= SOCKET_PRESENT|SOCKET_SETUP_PENDING;
init_socket(s);
+#ifdef __powerpc__
+ s->socket.flags |= SS_EJECTION;
+ s->ss_entry(s->sock, SS_SetSocket, &s->socket);
+#endif
s->irq.AssignedIRQ = s->irq.Config = 0;
s->functions = 0;
s->lock_count = 0;
diff -u --recursive pcmcia-cs-3.1.9/modules/i82365.c pcmcia-cs-3.1.9.orig/modules/i82365.c
--- pcmcia-cs-3.1.9/modules/i82365.c Tue Jan 25 20:44:19 2000
+++ pcmcia-cs-3.1.9.orig/modules/i82365.c Mon Jan 24 19:18:42 2000
@@ -58,6 +58,12 @@
#include <asm/system.h>
#endif
+#ifdef __powerpc__
+#include <asm/prom.h>
+#include <asm/adb.h>
+#include <asm/pmu.h>
+#endif /* __powerpc__ */
+
#include <pcmcia/version.h>
#include <pcmcia/cs_types.h>
#include <pcmcia/ss.h>
@@ -238,6 +244,12 @@
u_char cache, pmcs;
u_int cb_phys;
char *cb_virt;
+
+#ifdef __powerpc__
+ int pmu_socket;
+ struct adb_request pmu_req;
+#endif /* __powerpc__ */
+
#endif
union {
cirrus_state_t cirrus;
@@ -1543,6 +1555,32 @@
}
#endif
}
+#ifdef __powerpc__
+ /* work out the mapping to PMU socket number */
+ {
+ struct device_node *np;
+ for (i = 0; i < ns; ++i) {
+ s[i].pmu_socket = 0;
+ s[i].pmu_req.complete = 1;
+ }
+ for (np = find_type_devices("pccard"); np != NULL; np = np->next) {
+ int *reg = (int *) get_property(np, "reg", NULL);
+ int *ps = (int *) get_property(np, "AAPL,pmu-socket-number", NULL);
+ int bus, devfn;
+ if (reg == NULL || ps == NULL)
+ continue;
+ bus = (reg[0] >> 16) & 0xff;
+ devfn = (reg[0] >> 8) & 0xff;
+ for (i = 0; i < ns; ++i) {
+ if (s[i].bus == bus && s[i].devfn == devfn) {
+ s[i].pmu_socket = *ps;
+ DEBUG(2, ("socket %d is pmu socket %d\n", i, *ps));
+ break;
+ }
+ }
+ }
+ }
+#endif
} /* add_pcic */
@@ -2156,6 +2194,16 @@
}
i365_set(s, I365_CSCINT, reg);
i365_get(s, I365_CSC);
+
+
+#ifdef __powerpc__
+ if (state->flags & SS_EJECTION) {
+ if (s->pmu_socket != 0 && s->pmu_req.complete)
+ pmu_request(&s->pmu_req, NULL, 2, PMU_PCEJECT, s->pmu_socket);
+ state->flags &= ~SS_EJECTION;
+ }
+#endif
+
#ifdef CONFIG_PCI
if (s->flags & IS_CARDBUS) {
if (s->cs_irq || (pci_csc && s->cap.pci_irq))
@@ -2357,6 +2405,15 @@
DEBUG(1, "yenta: GetSocket(%d) = flags %#3.3x, Vcc %d, Vpp %d, "
"io_irq %d, csc_mask %#2.2x\n", s-socket, state->flags,
state->Vcc, state->Vpp, state->io_irq, state->csc_mask);
+
+#ifdef __powerpc__
+ if (state->flags & SS_EJECTION) {
+ if (s->pmu_socket != 0 && s->pmu_req.complete)
+ pmu_request(&s->pmu_req, NULL, 2, PMU_PCEJECT, s->pmu_socket);
+ state->flags &= ~SS_EJECTION;
+ }
+#endif
+
return 0;
} /* cb_get_socket */
next prev parent reply other threads:[~2000-02-23 7:22 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-02-23 2:10 PowerMac G4 and pcmcia flash cards Ryan Boder
2000-02-23 6:07 ` Timothy A. Seufert
2000-02-23 9:38 ` Benjamin Herrenschmidt
2000-02-23 11:15 ` Timothy A. Seufert
2000-02-23 7:22 ` Andreas Tobler [this message]
-- strict thread matches above, loose matches on Subject: below --
2000-02-23 20:56 Dan Bethe
2000-02-23 21:16 ` David A. Gatwood
2000-02-24 3:02 ` Ryan Boder
2000-02-23 21:34 ` Timothy A. Seufert
2000-02-23 22:13 Dan Bethe
2000-02-24 0:07 ` Nelson Abramson
2000-02-24 21:01 ` Brad Boyer
2000-02-24 14:30 ` Daniel Jacobowitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=38B38AA3.8D4ECC2C@pop.agri.ch \
--to=toa@pop.agri.ch \
--cc=linuxppc-dev@lists.linuxppc.org \
--cc=rboder@grn.georet.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.