Subject: Re: [q] Speed of modem port
To: Shunsuke Masuda <mi-nami@mahoroba.or.jp>
From: Bill Studenmund <wrstuden@loki.stanford.edu>
List: port-mac68k
Date: 12/04/1997 10:58:55
> > Yes and no. The standard distribution does not, but I can send you a
> > simple kernel patch which will (you will have to build your own kernel).
> 
> Thank you. Please send me the patch. 
>  
> I looked at /usr/src/sys/arch/mac68k/dev/zs.c only to find that
> I don't know how to read device driver codes. 

zs.c will be real confusing by itself, as it's only part of the driver.
:-) Also, it was originally written by LBL, then modified by Gordon
Ross, then I ported it to the mac, and Charles Hannum has hacked on it
too. zs.c handles hooking in the machine independant driver (shared w/
the sun3, sun3x, sparc, and mvme ports) and serial console hookup.

On line 309 is a statement:

xcs->cs_clocks[0].flags = ZSC_RTXBRG;

change it to:

xcs->cs_clocks[0].flags = ZSC_RTXBRG | ZSC_RTXDIV;

Basically what's happening is that xcs points to the "extended" chip
state structure, where the mac port keeps external clock info. cs_clocks[]
contains info on various clocks available to the port. Clock
source 0 is the internal clock. The flags value indicates what's up with
the clock source. Some clocks are usable by the baud rate generator
(ZSC_RTXBRG) and some are usable via direct division (/16, /32, and /64)
(ZSC_RTXDIV). This change says that the internal clock can be internally
divided, giving /16 and /32 as usable baud rates (the minimum BRG division
is /64 == 57600). /16 == 230400 bps and /32 == 115200 bps.

Let me know how it works.

Take care,

Bill