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: SCC driver for 8xx PowerPC processors


Hi Gary,

I have attached to this e-mail the files for the QUICC SCC1/2 serial driver,
ported from the QUICC2 SSC1/2 drivers.  I was able to send and receive data
over the Viper's SCC1 to a Windows PC running HyperTerminal.  The code is
still a separate package from the QUICC SMC1/2 driver.

I agree with you that the SMC and SCC should be integrated into the same file
and package but I'm not sure the best way to do this.  Do driver functions
have to be duplicated for SMC and SCC (i.e smc_putc and scc_putc) ?  Or should
there be a single function for both which determines whether it is working on
a SMC device or a SCC device?  The location of buffer descriptors for the
different serial channels also needs to be addressed.

I commented out some code in quicc_scc_serial_init which resets the entire
Communications Processor.  This was killing my debug connection running over
SMC1.  I'm not sure if this should be removed.

I noticed a few differences between the structure of the QUICC and QUICC2
serial drivers.  The QUICC SMC drivers have most #defines in the .c file
rather than the .h file while the QUICC2 SCC drivers have most #defines in the
.h file.  Also the passing of data between the quicc_sxc_serial_init and
quicc_sxc_serial_init_info is different.  While we're integrating the SCC and
SMC driver, should we also try to make the QUICC and QUICC2 drivers more
consistent?

Thanks,

Paul Randall
Delta Information Systems

"Gary D. Thomas" wrote:

> On Fri, 2003-03-07 at 15:12, Paul Randall wrote:
> > Hi,
> >
> > I have an A&M Viper board which has a RS-232 serial port on SCC1, and a
> > debug port on SMC1.  I need to use the SCC1 port on the Viper but there
> > is only a serial driver for SMC1 in eCos.  I've ported the SCC1/2 eCos
> > driver for the 8260 PowerPC to the 8xx PowerPC processor (It seemed
> > easier than porting from the 8xx SMC1/2 driver) but I'm not sure the
> > best way to integrate the driver into eCos.
> >
> > When I ported the driver, I created a new directory
> > \packages\devs\serial\powerpc\quiccscc which had a ser_quicc_scc.cdl
> > file and a quicc_scc_serial.c and .h files in the proper directory
> > structure.  I set up the QUICC SCC driver as a package separate from the
> > QUICC SMC package.  However, when I tried to make the configuration when
> > both SMC1 and SCC1 were enabled, the cdl files for both added a
> > CYGDAT_IO_SERIAL_DEVICE_HEADER define into the system.h file and I got
> > compile warnings because of the duplicate define.
> >
> > Is this the best way to do this or should the SMC and SCC QUICC drivers
> > be in the same file?
> >
>
> Not necessarily the same file (although I doubt that the differences
> between SMC and SCC are so great that it requires two files!), but
> certainly within the same package - which means the same directory
>   .../devs/serial/powerpc/quicc/
>
> > Also, once I have tested the driver, how should I submit this to the
> > eCos maintainers?  As an .epk file?  To the eCos patch list?  I assume I
> > need to fill out a copyright assignment and employer disclaimer?  Should
> > this still be sent to the Legal Department at Red Hat?
>
> Since this would be an adjunct to an existing package, patches would
> be the way to go.  If these are substantial patches, then you will
> have to do the copyright assignment dance as well.
>
> If you want to pass your work to me, I can comment directly on how
> to incorporate my suggestions with your code.  I have a Viper here
> to test it with.
>
> --
> .--------------------------------------------------------.
> |       Mind: Embedded Linux and eCos Development        |
> |--------------------------------------------------------|
> | Gary Thomas              email:  gary dot thomas at mind dot be   |
> | Mind ( http://mind.be )  tel:    +1 (970) 229-1963     |
> | gpg: http://www.chez-thomas.org/gary/gpg_key.asc       |
> '--------------------------------------------------------'
>
> --
> Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
> and search the list archive: http://sources.redhat.com/ml/ecos-discuss

Attachment: ser_quicc_scc.cdl
Description: application/unknown-content-type-cdl_auto_file

Attachment: quicc_scc_serial.h
Description: application/unknown-content-type-hfile

Attachment: quicc_scc_serial.c
Description: application/unknown-content-type-cfile

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