another 16x5x patch

Jonathan Larmour jifl@eCosCentric.com
Mon Nov 27 14:00:00 GMT 2006


Neundorf, Alexander wrote:
> Hi,
> 
> for the PXA255 and PXA270 there is an additional enable bit in the 16x5x register, "Enable UART" which must be set in order to use the interface.
> Patch is attached, but I'm not sure it's a good idea to set this generally on all platforms.
> What do you think ?

I think it would be very unwise setting bits which may have different 
meanings elsewhere (or could result in a different UART implementation 
silently ignoring the whole IER change).

Adding a hook function would seem better. Looking at eCosCentric internal 
sources, we've already done that, so I'll bring anoncvs into line:

@@ -328,6 +345,10 @@
  #endif
      HAL_WRITE_UINT8(base+REG_ier, _ier);

+#ifdef CYGPRI_IO_SERIAL_GENERIC_16X5X_PLF_INIT_HOOK
+    CYGPRI_IO_SERIAL_GENERIC_16X5X_PLF_INIT_HOOK( ser_chan, new_config );
+#endif
+
      if (new_config != &chan->config) {
          chan->config = *new_config;
      }


Jifl
-- 
eCosCentric    http://www.eCosCentric.com/    The eCos and RedBoot experts
------["The best things in life aren't things."]------      Opinions==mine



More information about the Ecos-patches mailing list