[Suzaku-en:00145] opb_ipif/plb_ipif

S.Georges email@hidden
Fri Feb 10 02:17:42 JST 2006


hello,

i've got a problem with the IPIF.
In EDK i created an core with the "create/import Peripheral..." wizard.
i included the fifos (write/read).
in userlogic, for testing, i connected these 2 fifos together.
for uclinux i wrote a driver, that copies the data from userspace to the
adress-space of my device.

now, everything works fine, when i send less then 32bytes.
when i send 32bytes data, the core fills 32bytes "0" than 32bytes "data" into
the fifo.
if i send more data, it writes 32x0 32xdata 32x0 32xdata 32x0... and so on.

no matter if OPB ore PLB used.

can anyone explain this?

thank you very much!
S.Georges



here the read/write-procedure of my uclinux-device-driver
...
static unsigned long  device_read(struct file *filp,int *buffer, size_t length, 
 loff_t * offset){
	printk(DEV_NAME ": reading %d bytes from RDfifo \n",length);
        return copy_to_user(buffer,_reg_ebrush_rdfifo_data,length);
}
static unsigned long device_write(struct file *filp, const int *buffer, size_t
length, loff_t * offset){
    printk(DEV_NAME ": writing %d bytes to WRfifo \n",length);
    return copy_from_user(_reg_ebrush_wrfifo_data, buffer,length);
}
static int __init init_ebrush(void){
   printk(DEV_NAME ": Ebrush driver loaded ");
   _reg_ebrush = ioremap(REG_EBRUSH_ADDR, 4);
   _reg_ebrush_rdfifo_data = ioremap(REG_EBRUSH_RDFIFO_DATA_ADDR, 4);
   _reg_ebrush_wrfifo_data = ioremap(REG_EBRUSH_WRFIFO_DATA_ADDR, 4);
...




More information about the suzaku-en mailing list