[PATCH] LLTEMAC resource end address

Hugo Villeneuve hugo.villeneuve at lyrtech.com
Tue Apr 15 23:57:13 EST 2008


Hi,
We have a design with LLTEMAC0 using channels 0 & 1, and LLTEMAC1 using channel 0. When the Linux kernel boots, we had the following error message:

---
Registering device xilinx_lltemac:0
Registering device xilinx_lltemac:1
xilinx_lltemac.1: failed to claim resource 0
cannot register dev xilinx_lltemac:1
Registering device xilinx_lltemac:2
---

We found out that the two channels of a LLTEMAC interface are each using 0x40 bytes in length, and are contiguous. The following patch took care of the problem for us (against the linux-2.6-xlnx-git tree):

---
diff --git a/arch/ppc/syslib/virtex_devices.c b/arch/ppc/syslib/virtex_devices.c
index 457e1bd..7f731e4 100644
--- a/arch/ppc/syslib/virtex_devices.c
+++ b/arch/ppc/syslib/virtex_devices.c
@@ -202,7 +202,7 @@
        .resource = (struct resource[]) { \
                { \
                        .start = XPAR_LLTEMAC_##num##_BASEADDR, \
-                       .end = XPAR_LLTEMAC_##num##_BASEADDR + 0x1000, \
+                       .end = XPAR_LLTEMAC_##num##_BASEADDR + 0x003F, \
                        .flags = IORESOURCE_MEM \
                }, \
                { \
---

Hugo V.


Hugo Villeneuve
Hardware developer | Concepteur matériel
Lyrtech
Phone/Tél. : (1) (418) 877-4644 #2395
Toll-free/Sans frais - Canada & USA : (1) (888) 922-4644 #2395
Fax/Téléc. : (1) (418) 877-7710
www.lyrtech.com
Infinite possibilities...TM

THIS MESSAGE AND ALL ATTACHED DOCUMENTS ARE EXCLUSIVELY INTENDED
TO THE INDICATED RECIPIENTS AND ITS CONTENTS MAY BE CONFIDENTIAL.
IT IS STRICTLY FORBIDDEN TO ANYONE TO TAKE COGNIZANCE, USE, OR
DIVULGE THE INFORMATION CONTAINED HEREIN. IF YOU MISTAKENLY
RECEIVE THIS MESSAGE, IMMEDIATELY INFORM LYRTECH AND DESTROY THE
MESSAGE AND ATTACHMENTS FORTHWITH.THANK YOU.

LE PRESENT MESSAGE ET LES DOCUMENTS QUI Y SONT JOINTS S'ADRESSENT
EXCLUSIVEMENT AU(X)DESTINATAIRE(S) INDIQUE(S) ET LEUR TENEUR PEUT
ETRE CONFIDENTIELLE. IL EST STRICTEMENT INTERDIT A QUICONQUE D'EN
PRENDRE CONNAISSANCE, DE LES UTILISER OU DE LES DIVULGUER. SI
VOUS RECEVEZ LE PRESENT MESSAGE PAR ERREUR, VEUILLEZ EN AVISER
LYRTECH IMMEDIATEMENT ET DETRUIRE LE MESSAGE SEANCE TENANTE,
AINSI QUE LES DOCUMENTS QUI Y SONT JOINTS.


More information about the Linuxppc-embedded mailing list