hello, I am currently working on a ppc(mpc8349) platform. I modified BR3 and OR3 to enable LCS3 when I'm trying to access a specific address on the local bus in a GPCM mode. The problem is that i don't know how to access my device on the local bus. I know that i have to change the physical address to virtual address, but what are those functions . . . do we have dma function ?should i use virt_to_bus(...) or bus_to_virt(...) ? some help could be very appreciated Thank you all
Message Edited by aurelihein on 2007-05-0210:43 AM
Thank you fjpse for your answer, i actually find out yersteday how to access to the local bus I will try what you did The first thing is to configure some registers BRn and ORn to enable the chip select when you are accessing the chip on the local bus, and window some adresses on the mapping with LBLAWBARn and LBLAWARn. For example i have a chip at the address 0xf0010000, in GPCM mode, with a 16bits port.
//VIRT_IMMRBAR is the base register of my ppc *(unsigned long*)(VIRT_IMMRBAR + 0x5010) = 0xf00110001; //BR2 *(unsigned long*)(VIRT_IMMRBAR + 0x5014) = 0xffff80f0; //OR2 *(unsigned long*)(VIRT_IMMRBAR + 0x38) = 0xf0010000; //LBLAWBAR3 *(unsigned long*)(VIRT_IMMRBAR + 0x3c) = 0x8000000b; //LBLAWAR3