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: Re:


For the config switch <#if defined(CYGHWR_HAL_POWERPC_860)>
you should also include the 821, as it has the same pio
usage as the 860. The 850 and the 823 both use port A,
the 860 (and its variants) and the 821 use port B as noted
below.

Doug Fraser

> -----Original Message-----
> From: Gary Thomas [mailto:gary@mlbassoc.com]
> Sent: Tuesday, October 28, 2003 10:08 AM
> To: Radu Cernea
> Cc: ecos-discuss@sources.redhat.com
> Subject: [ECOS] Re: 
> 
> 
> 
> Radu Cernea said:
> >>> The difference is in the pin allocation for SMC2:
> >>>
> >>> - Port B21 & B20 for MPC860
> >>> - Port A9 & A8 for MPC850
> >>>
> >>> The current version of quicc_smc1.c initialize the port 
> pins MPC850-like
> >>> (function cyg_hal_smcx_init_channel).
> >>>
> >>> My question is:
> >>> How is it better to add the MPC860 initialization version 
> to the eCos sources?
> >>> Should I create a new file, use a conditional 
> pre-compilation flag, or...?
> >>
> >> What version of quicc_smc1.c are you looking at? There is 
> supposed to be
> > complete
> >> support already in place for SMC1/SMC2 and SCC1/SCC2/SCC4. 
>  If this is not the
> >> case, we need to fix it *there*, not add new code somewhere else.
> > Unfortunately I do not have CVS access (the IT department 
> rules...), so I
> > download snapshots from ecoscentric. In the last one 
> (031026), I'm looking at
> > the file:
> > /ecos/packages/hal/powerpc/quicc/current/src/quicc_smc1.c
> >
> > There is support for SMC2, but the initialization is not 
> the proper one for
> > MPC860. Instead of:
> > 168:    eppc->pio_papar |= 0xc0;
> > 169:    eppc->pio_padir &= ~0xc0;
> > 170:    eppc->pio_paodr &= ~0xc0;
> >
> > It should be something like:
> >     eppc->pip_pbpar |=   0x00000C00;
> >     eppc->pip_pbdir &= ~0x00000C00;
> >     eppc->pip_pbodr &= ~0x00000C00;
> >
> > See, for the reference, the table 34-6 in MPC860UM.pdf
> 
> Fair enough - please send a proper patch for this, along with the
> ChangeLog entry.  It would also be nice to see the corresponding
> patch for the interrupt driven serial driber.
> 
> Note: use something like this:
>   #if defined(CYGHWR_HAL_POWERPC_860) || 
> defined(CYGHWR_HAL_POWERPC_860T)
>     ... your proposed setup
>   #else
>     .. current setup
>   #endif
> 
> 
> 
> 
> 
> -- 
> Before posting, please read the FAQ: 
http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss

-- 
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]