linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* virtex 4 linux driver bus error
@ 2008-10-22 12:10 Mirsad Vejseli
  2008-10-22 23:38 ` John Linn
  2008-10-23  4:17 ` Grant Likely
  0 siblings, 2 replies; 3+ messages in thread
From: Mirsad Vejseli @ 2008-10-22 12:10 UTC (permalink / raw)
  To: linuxppc-embedded

hello at all,

at the moment I use development board ML410 with montavistalinux.=20

I have a problem, please help me!=20

I try to write a linux-driver for writing or reading registers.
I have a ace-file, which contents Linux and EDK-project with a component (=
IP-wizard) which is added on a PLB-bus.
I also have a driver-construct which I can register (insmod driver.ko) int=
o the linux-Kernel only if i do not use functions to write or read the bus=
 (XIO=5Fout32() or XIO=5Fin32 ()  ). If I use this function after registering =
the driver I got an error.
If I try to insert the modul with Insmod driver.ko I get a bus error! =20

my driver is similar to http://ozlabs.org/pipermail/linuxppc-embedded/2006=
-January/021578.html
=20

her the two importent functions  of the driver:

#define REG=5FBASE 	(u32) XPAR=5Fkomponente=5F0=5FBASEADDR // defined in xparamete=
rs=5Fml41x.h=20
#define REG=5FHIGH 	(u32) XPAR=5Fkomponente=5F0=5FHIGHADDR // defined in xparamete=
rs=5Fml41x.h=20


#define reg0=5Fupper	(u32) komponente=5FSLV=5FREG0=5FOFFSET // 32-bit register / d=
efined in komponente.h
#define reg1=5Fupper	(u32) komponente=5FSLV=5FREG1=5FOFFSET // 32-bit register / d=
efined in komponente.h
#define reg2=5Fupper	(u32) komponente=5FSLV=5FREG2=5FOFFSET // 32-bit register / d=
efined in komponente.h

const static long remap=5Fsize =3D REG=5FHIGH - REG=5FBASE + 1;

static void read=5Fregister=5Fvalues(void)
{
	static u32 upper;
=09

	printk("%s:\n",DRIVERNAME);
	printk("%s:                      |     upper         |\n",DRIVERNAME);
	printk("%s:----------------------|-------------------|\n",DRIVERNAME);
=09
	upper =3D XIo=5FIn32(reg=5Fremapped=5Faddress + reg1=5Fupper);

    printk("%s: Daten im Register 35 |%15X |\n", DRIVERNAME, upper );
=09
}


static int =5F=5Finit meintreiber=5Finit(void)   =20
reg=5Fremapped=5Faddress =3D (u32) ioremap(REG=5FBASE, remap=5Fsize);
  =20
    rtn =3D misc=5Fregister(&miscdev);
    if (rtn)=20
    {
		printk("%s: %s error driver not reg. \n",DRIVERNAME, miscdev.name);
        return rtn;
    }

	read2=5Fregister=5Fvalues();
=09
in the messeges log file i got the 3 printk lins and this line=20
"upper =3D XIo=5FIn32(reg=5Fremapped=5Faddress + reg1=5Fupper);"
creates a error

=20


Thank you very much for your kind help!=20
=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F
Schon geh=F6rt=3F Bei WEB.DE gibt' s viele kostenlose Spiele:
http://games.entertainment.web.de/de/entertainment/games/free/index.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-10-23  4:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-22 12:10 virtex 4 linux driver bus error Mirsad Vejseli
2008-10-22 23:38 ` John Linn
2008-10-23  4:17 ` Grant Likely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).