From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from blu0-omc4-s28.blu0.hotmail.com (blu0-omc4-s28.blu0.hotmail.com [65.55.111.167]) by ozlabs.org (Postfix) with ESMTP id BC4E01007D5 for ; Fri, 16 Dec 2011 11:45:35 +1100 (EST) Message-ID: Date: Fri, 16 Dec 2011 08:38:58 +0800 From: G.H.Lee To: linuxppc-dev Subject: Help needed with porting ether-net driver from ADS5121 to TWR-MPC5125 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_001_NextPart524012252505_=----" Reply-To: liguohu List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , ------=_001_NextPart524012252505_=---- Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: base64 SGVsbG8sIGFsbA0KDQpJIGFtIGEgbmV3IHVzZXIgb2YgdGhlIGJvYXJkIFRXUi1NUEM1MTI1IG1h ZGUgYnkgZnJlZXNjYWxlLiBOb3cgSSBhbSB0cnlpbmcgdG8gcG9ydGluZyB0aGUgbmV3IGtlcm5l bCwgaS5lLiB0aGUgdmVyc2lvbiAzLjAuNCwgdG8gdGhpcyBib2FyZC4gSSBoYXZlIHBvcnRpbmcg dGhlIHNlcmlhbCBkcml2ZXIgYW5kIHRoZSBuYW5kIGZsYXNoIGRyaXZlciBzdWNjZXNzZnVsbHku IEFuZCBJIGNhbiBhbHNvIG1vdW50IHRoZSByb290IGZpbGUgc3lzdGVtLiBCdXQgSSBjYW4gbm90 IHVzZSB0aGUgZXRoZXItbmV0IGludGVyZmFjZSBub3cuIEkgaGF2ZSB0cmllZCB0byBwb3J0IHRo ZSBldGhlci1uZXQgZHJpdmVyIGJhc2VkIG9uIHRoZSBldGhlci1uZXQgZHJpdmVyIGZvciBBRFMg NTEyMSwgd2hpY2ggaXMgcHJvdmlkZWQgYnkgdGhlIG5ldyBrZXJuZWwgMy4wLjQuIFRoZSBvbmx5 IHRoaW5nIEkgaGF2ZSB0byBkbyB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kIGlmIHVzaW5nIHRoZSBrZXJuZWwgcHJvdmlkZWQgYnkgZnJlZXNjYWxlLiBN b3Jlb3ZlciwgdGhlIHUtYm9vdCBpcyBhbHNvIGdvb2QgYW5kIEkgaGF2ZSBub3QgY2hhbmdlIGl0 LiBTbyB0aGUgZXRoZXIgbmV0IHBpbnMgYXJlIGNvbmZpZ3VyZWQgY29ycmVjdGx5LiBCdXQgSSBo YXZlIG5vdCBwb3J0aW5nIHRoZSBkcml2ZXIgZm9yIERNQS4gQnV0IEkgdGhpbmsgaXQgaXMgT2sg YmVjYXVzZSB0aGUgInBpbmciIGNvbW1hbmQgY2FuIGJlIHVzZWQgY29ycmVjdGx5IGlmIHVzaW5n IHRoZSBrZXJuZWwgcHJvdmlkZWQgYnkgZnJlZXNjYWxlIHdoZW4gSSBjYW5jZWwgdGhlIERNQSBk cml2ZXIgd2hlbiBjb25maWd1cmluZyB0aGUga2VybmVsLg0KDQpUaGFua3MuDQoNCg0KDQoNCkd1 b2h1IExp ------=_001_NextPart524012252505_=---- Content-Type: text/html; charset="gb2312" Content-Transfer-Encoding: quoted-printable
Hello, all
 

I am a new user of the board TWR-MPC5125 made by freescale. Now I am tr= ying=20 to porting the new kernel, i.e. the version 3.0.4, to this board. I have p= orting=20 the serial driver and the nand flash driver successfully. And I can also m= ount=20 the root file system. But I can not use the ether-net interface now. I hav= e=20 tried to port the ether-net driver based on the ether-net driver for ADS 5= 121,=20 which is provided by the new kernel 3.0.4. The only thing I= have=20 to do in the porting is that I should change the MII mode in ADS5121 board= to=20 RMII mode in my board. And I find that I can send packages out if I u= se the=20 "ping" command. But I can not receive any package for responding. And I al= so=20 found that the interrupt routine for sending packages was running but the=20 interrupt routine for receiving message was not called by the kernel. I do= n't=20 know why.

 

Can anyone help me? Should I change some other codes beyond the ether-n= et=20 driver? Someone told me that I should regulate the kernel because of the=20 differences among the different kerenl versions if the MAC was integrated = inside=20 the SOC, which was the fatto in my board. But I don't know how to regulate= .

 

B.T.W. : The hardware is good enough because I can use the ether net=20 interface in u-boot and if using the kernel provided by freescale. Moreove= r, the=20 u-boot is also good and I have not change it. So the ether net pins are=20 configured correctly. But I have not porting the driver for DMA. But I thi= nk it=20 is Ok because the "ping" command can be used correctly if using the kernel= =20 provided by freescale when I cancel the DMA driver when configuring the=20 kernel.

 

Thanks.

 

Guohu=20 Li

------=_001_NextPart524012252505_=------ From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-out.m-online.net (mail-out.m-online.net [IPv6:2001:a60:0:32:0:1:25:1]) by ozlabs.org (Postfix) with ESMTP id 832CFB703F for ; Mon, 19 Dec 2011 19:08:41 +1100 (EST) Date: Mon, 19 Dec 2011 09:08:27 +0100 From: Anatolij Gustschin To: liguohu Subject: Re: Help needed with porting ether-net driver from ADS5121 to TWR-MPC5125 Message-ID: <20111219090827.79997677@wker> In-Reply-To: References: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Cc: linuxppc-dev List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Hi, On Fri, 16 Dec 2011 08:38:58 +0800 G.H.Lee wrote: ... > I am a new user of the board TWR-MPC5125 made by freescale. Now I am trying to porting the new kernel, i.e. the version 3.0.4, to this board. I have porting the serial driver and the nand flash driver successfully. And I can also mount the root file system. But I can not use the ether-net interface now. I have tried to port the ether-net driver based on the ether-net driver for ADS 5121, which is provided by the new kernel 3.0.4. The only thing I have to do in the porting is that I should change the MII mode in ADS5121 board to RMII mode in my board. And I find that I can send packages out if I use the "ping" command. But I can not receive any package for responding. And I also found that the interrupt routine for sending packages was running but the interrupt routine for receiving message was not called by the kernel. I don't know why. > > Can anyone help me? Should I change some other codes beyond the ether-net driver? Someone told me that I should regulate the kernel because of the differences among the different kerenl versions if the MAC was integrated inside the SOC, which was the fatto in my board. But I don't know how to regulate. Please try following patch for fs_enet driver: http://patchwork.ozlabs.org/patch/87320/ There are also other patches for TWR-MPC5125 support: http://patchwork.ozlabs.org/patch/87925/ http://patchwork.ozlabs.org/patch/87926/ http://patchwork.ozlabs.org/patch/87321/ Thanks, Anatolij