[PATCH] arm/tms570: sci context has to be writable because it holds state variable.
Martin Galvan
martin.galvan at tallertechnologies.com
Wed Feb 4 18:54:20 UTC 2015
On Wed, Feb 4, 2015 at 3:49 PM, Martin Galvan
<martin.galvan at tallertechnologies.com> wrote:
> On Wed, Feb 4, 2015 at 2:20 PM, Pavel Pisa <pisa at cmp.felk.cvut.cz> wrote:
>> The structure tms570_sci_context holds state variable
>> tx_chars_in_hw which holds if and how many characters
>> (in the optional FIFO support for some Ti SCIs) are submitted
>> into hardware.
>>
>> When field is not writable then code breaks when RTEMS
>> is build for Flash area.
>>
>> The problem found and analyzed by Martin Galvan from tallertechnologies.
>
> Thanks for the patch. In addition, we've developed a refactored
> version of the driver which, besides being const-correct, addresses a
> number of other issues present in the current driver. Namely, it
> improves the coding style, fixes what seems to be an erroneous check
> for ctx->regs->SCIRD != 0 and uses the correct formula for the SCI
> prescaler value. I'm attaching it here so that it can be commited
> before us and Premek add further changes.
>
> Notice, however, that my driver sets BSP_PLL_OUT_CLOCK to 180 MHz in
> bsp.h and divides it by 2 when it's setting the prescaler, so the
> value of VCLK for the formula is 90 MHz. This may vary from board to
> board (I noticed the original code used 160 MHz instead of 90); we
> used 90 MHz because it's what HALCoGen generates by default. Notice as
> well that this code still relies on the device having been set up
> already (as Pavel said, right now we're using HALCoGen-generated code
> for that).
It appears my mail client wrapped the lines after 80 characters, so
the patch won't apply if you copy it directly from the e-mail. I'm
attaching it here as a separate file. Sorry for the inconvenience.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: changes.patch
Type: text/x-patch
Size: 34813 bytes
Desc: not available
URL: <http://lists.rtems.org/pipermail/devel/attachments/20150204/3de6d163/attachment-0002.bin>
More information about the devel
mailing list