There is an MPC8360 with OpenWRT runnung. UCC1 and UCC2 are already used for ethernet. So, I want to use HDLC on other UCC.
There is a 'generic HDLC driver' in kernel. Can I use it? I tried to make it alive, but the only thing I got is "hdlc: HDLC support module revision 1.22" on the start. No devices found, etc. Looks like I nedd to write device tree properly, but I coudn't google an answer. Now I'm using simple
ucc@2200 {
device_type = "network";
compatible = "ucc_hdlc";
cell-index = <3>;
reg = <0x2200 0x200>;
interrupts = <34>; //0x22
interrupt-parent = <0x2>;
rx-clock-name = "none";
tx-clock-name = "brgo2";
};
but there is no result, as I said before.
Also I've tried to run it (at least) using AppNote 4026, but I get only "Unable to handle kernel paging request for data at address ..." while insmod my .ko even while reading registers, for my UCC and for already working UCCs with ethernet.
What should I do to make it work finally?
We have the following answer concerning to this driver
General HDLC layer for Linux is an interface between low-level hardware drivers for synchronous serial (HDLC) cards and the rest of kernel networking. The following protocols are supported:
Generic HDLC layer is included in the official Linux kernel.
Ethernet framing using HDLC or FR PVC is compatible with 802.1Q VLAN and 802.1D Ethernet bridging.
With Linux 2.6.x, no patches are needed.
To include the general HDLC for WAN interface, please go to the Linux kernel configuration menu by checking "configure the kernel" option from Ltib configuration menu.
Under Linux configuration menu, please go to
"Device Drivers--->
Network device support--->
Wan interfaces support--->" and check the "Generic HDLC layer" option.
It is checked already. As in manual for "Generic HDLC":
Generic HDLC is a protocol driver only - it needs a low-level driver for your particular hardware.
I want to use only two lines (Tx and Rx) and one BRG clock - not any special hardware. So, this must be specified somehow. Should I write Linux driver myself, or there is a simple solution, something like writing in device tree "PA0 - tx, PA1 - rx, brg0 - clock" for pseudocode-ish example?