This is the mail archive of the ecos-patches@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Fix of Synopsys DesignWare Bug in Serial Driver


> Although I don't know the specific nature of the bug,
> it seems to me that this only reduces the size of
> the problem window, rather than eliminates it.
> Add in the possibility of occasional pre-emption
> and that makes it more likely to happen. I guess
> it depends how often you intend to change baud rate,
> but it doesn't seem foolproof.
We only change the baudrate when the application takes over from
RedBoot. Besides, we've run this code for years and it seems to work and
never deadlocks.

> In general I'm not entirely happy about putting in
> special cases in generic drivers. I think it's better
> handled with hooks, and that is meant to be the
> general principle in eCos. So I think you could instead
> have two macros SER_16X5X_WRITE_LCR and SER_16x5x_READ_ISR
> which would default to the existing implementation,
> but your serial driver can set it to your workaround
> code. That would also mean not needing to rename the
> register and bit names I mentioned further up. Those
> macros would be set by your driver in the
> CYGDAT_IO_SERIAL_GENERIC_16X5X_INL included file.
I certainly agree. I wasn't happy about my first implementation either.
Your idea is indeed much more flexible, and the attached patch
implements exactly that. Thanks a lot for guiding me in the right
direction!!

> And don't forget the changelog entry :-).
Included with the patch. Slowly getting used to the process :-)

Thanks a lot,
Rene Schipp von Branitz Nielsen
Vitesse Semiconductors

Attachment: serial_16x5x_2009_02_17.patch
Description: serial_16x5x_2009_02_17.patch


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]