Re: [uCsimm] ucsimm-head.S broken?

From: Vladimir A. Gurevich (vgurevic@cisco.com)
Date: Tue Jan 18 2000 - 11:59:12 EST


Hello Tom,

Tom Walsh wrote:

> I have started the attempt to bring uClinux up on my platform and have a
> question about line #43 of the
> ../linux/arch/m68knommu/platforms/68EZ328/ucsimm-head.S file. The instruction
> there is a 'movew #0x10B, FFFFF902' and the comment is that it is setting the
> baud rate to 9600, but this value doesn't set it to that rate.
> A value of '0x0038' (as advertised in the manual) does give 9600 baud.

Several comments:

1) Besides all UART-related registers (0xFFFFF9xx) there is one more that
   has a visible effect on the actual baud rate. I am talking about PRESC
   bit in PLLCR register. It should be cleared in order for the values in
   the table 11-3 (pages 11-7, 11-8 in MC68EZ328 UM) to produce correct
   values. By default, this bit is not cleared, but I checked that
   all *head.S files (*/crt0_r[ao]m.S in 2.0.38.1pre1 clear it).

2) According to the Table 11-3 0x0038 will give you 115200 baud and I am
   pretty sure this is correct, since I use it my ports and had no problems.
   You might want to look at ads-head.S and alma_ans-head.S

3) According to the same table the right value for 9600 baud is 0x0226. And
   actually, this table is encoded in drivers/char/68328serial.c in
   hw_baud_table[].

4) The value that you are mentioning, 0x10b was taken from the old xcopilot
   code. It might still be correct for 9600 baud. The way the prescaler works
   is a little obscure, but you might want to try to do the calculations.
   I would not suggest using it.

Happy hacking,
Vladimir

-- 
+------------------+------------------------+--------------------------+
                   |      |          |      |
                   |     :|:        :|:     | phone         408-525-9707
Vladimir Gurevich  |    :|||:      :|||:    | fax           408-527-1713
Software Engineer  | .:|||||||:..:|||||||:. |
    NUBU/DIAL      |      CiscoSystems      | e-mail  vgurevic@cisco.com
                   |                        | location SJ-7-2 Cube D1-12
                   |  http://www.cisco.com  |
+------------------+------------------------+--------------------------+
This message resent by the ucsimm@uclinux.com list server http://www.uClinux.com/



This archive was generated by hypermail 2b30 : Sun Apr 07 2002 - 00:01:34 EST