Problem reading and programming memory location...

neorf3k neorf3k at gmail.com
Thu Nov 14 19:38:35 EST 2013


Thank you again…
we have checked, and the settings in Chip Select 4 Configuration, seems to be ok…

The strange thing is the return value from ioremap(). In U-Boot return value from address 0x1002000 is 0x45f80360… if we try to map it in our module, then we use ioremap(), return value is 0x10101010. So maybe the register address is mapped wrong… what could i fix it?
Then, after we have setted up the reg at 0x1002000 and we boot linux… the 0x1002000 doesn’t change its value… 

Thanks again…

Lorenzo

On 13/nov/2013, at 07:06 PM, Anatolij Gustschin <agust at denx.de> wrote:

> On Wed, 13 Nov 2013 14:48:24 +0100
> neorf3k <neorf3k at gmail.com> wrote:
> 
>> Yes, that is a device on the lpb via an fpga. We  have tried to configure
>> the chip select 4 configuration register at address MBAR + 0x0310, and it
>> seems to be ok. what do you mean with “chip select parameters”?
> 
> I meant the settings you can set up in the Chip Select 1–7 Configuration
> Registers, like address and data bus size, wait-states, etc.
> 
>> We have been able to edit it in U-BOOT, and the board (that chip) now works…
>> The strange thing, is that when we read in linux, at that address, we see
>> other content value…
>> Suggestions?
> 
> if you can access the register under U-Boot and read out the
> expected values, then the access should work under Linux too,
> assuming the chip select config is not overwritten somewhere
> while booting and the register address range is mapped correctly.
> I don't know your code, so I would first check if the register
> mapping is done correctly, i.e. check the return value of ioremap()
> for errors, then check if the chip select configuration is still
> valid when the kernel is up. Also verify that your fpga is not
> in the reset state when Linux is running.
> 
> thanks,
> 
> Anatolij



More information about the Linuxppc-dev mailing list