[yocto] (no subject)

Jack jackrubby2010 at gmail.com
Thu Oct 10 00:07:58 PDT 2013


Anders Darander <anders at ...> writes:

> 
> 
> Jack <jackrubby2010 at ...> wrote:
> >Anders Darander <anders <at> ...> writes:
> >
> >Thanks Anders,
> >
> >But I have this problem not only for GPIOs, but also for other
> >registers.
> 
> Well, my comment about dereferencing physical addresses using *-only,
wasn't restricted to GPIO's only.
> It was regarding physical addresses in general... 
> 
> Once again, I've not used this platform, this I'm not able to be too
specific. 
> 
> >For example, I tried to change DTW bits of PROCTL register in eSDH but
> >I get
> >"Kernel access of bad area" again. My simple code is here :
> 
> >int init_module(void)
> >{
> >	
> >	// e500 Core View To Power Architecture CCSR: 0x0_FF70_0000
> >	
> >	volatile uint32_t * eSDH_PROCTL = (volatile uint32_t *)(0xFF72E028);
> >
> >	*(eSDH_PROCTL) = 0x00000002;
> 
> I think that you should try to look at some code from the kernel that
accesses registers on your platform. For
> instance
http://lxr.free-electrons.com/source/sound/soc/fsl/p1022_ds.c?v=3.4 (this is
just a
> randomly chosen file that relates to P1022. 
> 
> Have a look at how guts_phys is declared, as well as how guts later on is
both declared and initialized from
> guts_phys. 
> When the registers are actually read / written, this driver uses the
clrsetbits_XX. These functions then
> implements the actual reading and writing of the registers. 
> 
> (Note again, I've just looked at this file and p1022 for a couple of
minutes). 
> 
> Cheers, 
> Anders 
> 

Thank you very much Anders for useful comments and replies,

I saw the link that you mentioned and I could write in pmuxcr register. So
writing to register problem almost has solved. But I have some problems yet.

I read fsl_guts.h in powerpc architecture and saw Global Utility Registers
like gpiocr as GPIO Control Register, gpindr as General-Purpose Input Data
Register and gpoutdr as General-Purpose Output Data Register. But in GPIO
registers in p1022 reference manual we have GPDIR register to set specify
GPIO direction and GPDAT register for GPIO data register. We have only one
register for data but fsl_guts.h defines two register for input an output data.
 

Does gpiocr work as GPDIR?

For GPDAT, which of the two registers I should use? gpindr or gpoutdr?

 
Thanks,

Best regards. 






More information about the yocto mailing list