Subject: Re: iBook internal modem
To: None <port-macppc@NetBSD.org>
From: David H. Gutteridge <dhgutteridge@hotmail.com>
List: port-macppc
Date: 08/17/2004 20:34:30
Hi,

I thought I'd ask everyone about the item below, I checked CVS and it isn't 
committed yet, perhaps the NetBSD crew could sneak this into the upcoming 
2.0 release?  (If not, I'll just compile it in myself of course, but it'd be 
cool to remove the "modem not supported" items from some of the hardware 
support entries in the macppc documentation.)

Regards,

Dave

PS I noticed the KeyLargo enabling code has a printf for the dmesg, but the 
Pangea code doesn't, just thought I'd mention it.

Subject: Re: iBook internal modem
To: Ben Elliston <bje@wasabisystems.com>
From: Bruce ONeel <edoneel@sdf.lonestar.org>
List: port-macppc
Date: 07/02/2003 12:01:53

Ben Elliston <bje@wasabisystems.com> wrote:
>The macppc web page lists the iBook internal modem as "not yet
>supported".  Is there any reason why it can't be made to work?  Is
>there any active work going on to get it supported?
>
>Cheers, Ben

Hi,

My first edition toilet seat model works with the following patch:

Date: 13 Jun 2002 00:09:41 -0400
From: "Nathan J. Williams" <nathanw@wasabisystems.com>
Subject: Re: ibook modem
To: Bruce ONeel <beoneel@bluewin.ch>
Cc: Bill Studenmund <wrstuden@netbsd.org>, port-macppc@netbsd.org
organization: Wasabi Systems, Inc.

Bruce ONeel <beoneel@bluewin.ch> writes:

>Would a usb to serial adapter let me use a regular modem
>on my iBook?  Would it run ppp then?  That
>would be great.

It would, or you could just use the patch that enables the modem
serial port on the iBook; it works fine, I spent most of the last
Christmas holiday dialed up from NetBSD on my iBook.

(I should probably just commit this. Would whoever posted this patch
speak up so I can give them credit?)

        - Nathan

Index: obio.c
===================================================================
RCS file: /cvsroot/syssrc/sys/arch/macppc/dev/obio.c,v
retrieving revision 1.14
diff -c -r1.14 obio.c
*** obio.c      2001/06/17 19:54:47     1.14
--- obio.c      2002/06/13 04:08:02
***************
*** 133,138 ****
--- 133,146 ----
        if (PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_APPLE_PADDINGTON)
                out8(ca.ca_baseaddr + 0x37, 0x03);

+         /* XXX Enable internal modem (Pangea) */
+       if (PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_APPLE_PANGEA_MACIO) {
+               out8(ca.ca_baseaddr + 0x006a + 0x03, 0x04); /* set reset */
+               out8(ca.ca_baseaddr + 0x006a + 0x02, 0x04); /* power modem 
on */
+               out8(ca.ca_baseaddr + 0x006a + 0x03, 0x05); /* unset reset 
*/
+        }
+
+
        for (child = OF_child(node); child; child = OF_peer(child)) {
                namelen = OF_getprop(child, "name", name, sizeof(name));
                if (namelen < 0)


BEO ADDITION

It's PR 15505

The important code is:

+       /* XXX Enable internal modem (KeyLargo) */
+       if (PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_APPLE_KEYLARGO) {
+         printf("enabling KeyLargo internal modem\n");
+         out32rb(ca.ca_baseaddr + 0x40,
+                 in32rb(ca.ca_baseaddr + 0x40) & ~((u_int32_t)1<<25)); /* 
powe
r modem on */
+       }

_________________________________________________________________
Scan and help eliminate destructive viruses from your inbound and outbound 
e-mail and attachments. 
http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines 
  Start enjoying all the benefits of MSNŽ Premium right now and get the 
first two months FREE*.