This is the mail archive of the ecos-discuss@sources.redhat.com 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: Big endian ARM HAL_WRITE_UINT8 problem


On Friday, 26. July 2002 16:13, Mark Salter wrote:
> >>>>> Roland =?iso-8859-1?q?Ca=DFebohm?= writes:
> >
> > Hello,
> > I want to use the generic 16x5x serial driver with a bigendian system
> > (ARM7TDMI). As discussed for a while, if I use the right baseaddress of
> > the external 16550 UART, the macros will get the wrong registers.
> > As an example: If little or big endian, in both systems the receive
> > buffer is at 0xXXXX000 and not on an big endian at 0xXXXX011.
> >
> > Ok, I could change the baseaddress to 0xXXXX011, then the macros will
> > access the right registers, but if I do this and than switch to little
> > endian it won't work to.
> >
> > Am I on the wrong way?
>
> Here is how I see it. We have a two sets of macros. One set (currently
> selected for LE targerts) doesn't munge the address. The other set of
> macros is seleted for BE targets and munges the address.
>
> IMO, the address munging is only necessary on badly designed (broken!)
> hardware. So, instead of relying solely on endianess to select the
> proper set of macros, we should add another flag to qualify when to
> use the address munging set of macros.
>
> --Mark

Yes, I think this would be a good solution.

Roland

-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss


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