Re: [ftdi_sio] FT232H support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>>>>> "Ionut" == Ionut Nicu <ionut.nicu@xxxxxxxxxxx> writes:

    Ionut> Hi, On Mon, 2011-07-11 at 17:06 +0300, Alex Stefan wrote:
    >> Basically, we have 2 issues that aren't really clear: 1) Is the
    >> FT232H placed in the correct branch when calculating the divisor?

    Ionut> Yes it actually is on the correct branch because the chip should
    Ionut> support baud rates up to 12 MBaud.

    >> 2) What't the explanation behind the algorithm which calculates the
    >> divisor in function "ftdi_2232h_baud_base_to_divisor()" ?
    >> 

    Ionut> It's explained in section 4.4 of AN120. It's the same as the
    Ionut> algorithm for 232BM, but it uses a 12 Mhz reference clock instead
    Ionut> of the 3 Mhz reference clock the other functions are using.

    Ionut> Section 4.4 of AN120 also says:

    Ionut> "The instructions in section 4.3 are still applicable for the
    Ionut> FT2232H and the FT4232H up to 3MBaud. The calculations for sub
    Ionut> integers still apply.

    Ionut> To alias baud rates between 3MBaud and 12MBaud it is necessary to
    Ionut> use driver version 2.4.20 or later and the most significant bit
    Ionut> (MSB) of the divisor must be a 1. This will ensure the divisor is
    Ionut> dividing a 12MHz clock and not a 3MHz clock."

    Ionut> Now, one problem I see in ftdi_2232h_baud_base_to_divisor is that
    Ionut> another bit is set (not MSB):

    Ionut> divisor |= 0x00020000;

    Ionut> I think it should be:

    Ionut> divisor |= 0x80000000;

But at 0x0001000 you have the high bit of the encoded fractional divider.

Until now, the bit at 0x0001000 and 0x00020000 are moved for devices with
several Uarts to 0x0100000 and 0x2000000 later, so you solution would impact
other devices.

See my solution in an earlier post in this thread.

However I am in doubt that for the BM devices the MSB fractional divider is
handled right...
-- 
Uwe Bonnes                bon@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Institut fuer Kernphysik  Schlossgartenstrasse 9  64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux