Hello,
I did not find a scc_hdlc structure like scc_enet and scc_uart in
commproc.h. Do I just need to make one similar to scc_enet and modify it
according to p.24-4 in the 860 book? This is the scc parameter ram memory
map versus scc ethernet parameter ram memmory map.
Thank you in advance.
--Julia
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Julia Elbert wrote:
I did not find a scc_hdlc structure like scc_enet and scc_uart in
commproc.h.
I don't think anyone has submitted any source patches to provide it.
There has been some discussion in the past......
.... Do I just need to make one similar to scc_enet and modify it
according to p.24-4 in the 860 book?
That would be great. If you would like to submit it as a patch someday,
that would be even greater :-). What are you connecting at each end
of the port? NMSI, TDM, custom software?
Another part of your project will be writing a driver. In the past,
the accepted suggestion was to not modify the uart driver, as that
is a _uart_ driver, not an SCC driver. You can use that as a model
to create, say, hdlc.c......Then just ensure you don't try to configure
the SCC in both places (and there may need to be a little knowledge
about each one in every driver).
Thank you in advance.
Have fun!
-- Dan
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Hello Julia,
I did not find a scc_hdlc structure like scc_enet and scc_uart in
commproc.h.
I wrote the following one for my project (which is about adding ISDN
functionality for MPC860):
/********* SCC parameter RAM for HDLC mode *********/
typedef struct scc_hdlc {
ushort scc_rbase; // Rx Buffer descriptor base address
ushort scc_tbase; // Tx Buffer descriptor base address
u_char scc_rfcr; // Rx function code
u_char scc_tfcr; // Tx function code
ushort scc_mrblr; // Max receive buffer length
uint scc_rstate; // internal
uint scc_idp; // internal
ushort scc_rbptr; // internal
ushort scc_ibc; // internal
uint scc_rxtmp; // internal
uint scc_tstate; // internal
uint scc_tdp; // internal
ushort scc_tbptr; // internal
ushort scc_tbc; // internal
uint scc_txtmp; // internal
uint scc_rcrc; // internal
uint scc_tcrc; // internal
// here begins HDLC specific part
uint scc_res1; // reserved
uint scc_cmask; // CRC mask
uint scc_cpres; // CRC preset
ushort scc_disfc; // discarded frame counter
ushort scc_crcec; // CRC error counter
ushort scc_abtsc; // abort sequence counter
ushort scc_nmarc; // nonmatching address receive counter
ushort scc_retrc; // frame retransmission counter
ushort scc_mflr; // Max frame length register
ushort scc_maxcnt; // internal
ushort scc_rfthr; // recceived frames threshold
ushort scc_rfcnt; // internal
ushort scc_hmask; // HDLC address mask register
ushort scc_haddr1; // HDLC address register 1
ushort scc_haddr2; // HDLC address register 2
ushort scc_haddr3; // HDLC address register 3
ushort scc_haddr4; // HDLC address register 4
ushort scc_tmp; // internal
ushort scc_tmp_mb; // internal
} scc_hdlc_t;
Ciao - Tobias
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Tobias Otto-Adamczak wrote:
/********* SCC parameter RAM for HDLC mode *********/
Just a couple of minor comments......
typedef struct scc_hdlc {
ushort scc_rbase; // Rx Buffer descriptor base address
ushort scc_tbase; // Tx Buffer descriptor base address
u_char scc_rfcr; // Rx function code
u_char scc_tfcr; // Tx function code
ushort scc_mrblr; // Max receive buffer length
uint scc_rstate; // internal
uint scc_idp; // internal
ushort scc_rbptr; // internal
ushort scc_ibc; // internal
uint scc_rxtmp; // internal
uint scc_tstate; // internal
uint scc_tdp; // internal
ushort scc_tbptr; // internal
ushort scc_tbc; // internal
uint scc_txtmp; // internal
uint scc_rcrc; // internal
uint scc_tcrc; // internal
This first part of the object is defined by 'scc_param', so the
convention would have been:
typedef struct scc_hdlc {
sccp_t scc_hdlc;
Followed by: // here begins HDLC specific part
uint scc_res1; // reserved
The documentation describes the CPM devices in this way, and it is
a little more clear what is common to the SCC, and what is unique
to the HDLC feature.
....since we aren't writing C++, I also dislike the '//' comment......
I would have made these two changes if it was sent as a patch to
me for inclusion in the source code.....
In fact, I will keep this and include it in the future....Do you have
any code you want to submit along with it?
-- Dan
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/