Hi Greg,
 
Mea culpa: according to the reference manual, I have to initialize MCF_SCM_MPR1 
to access MDHA registers.
 
I added the following:
 
In linux-2.6.x/include/asm-m68knommu/m532xsim.h
#define MCF_SCM_MPR1   MCF_REG32(0xEC000000)
 
In linux-2.6.x/arch/m68knommu/platform/532x/config.c
MCF_SCM_MPR = 0x77777777;
MCF_SCM_MPR1 = 0x66666666;          //user mode (MDHA, SKHA, RNG)
 
However, result is still 0xffffffff when I use the user application code below 
to read MCF_MDHA_MDSR register (the correct value should be 0x00008408):
 
 
#define MCF_MDHA_MDCMR   (*(volatile unsigned long   *)(0xEC080008))
 
/* Bit definitions and macros for MCF_MDHA_MDCMR */
#define MCF_MDHA_MDCMR_SWR          (0x00000001)
#define MCF_MDHA_MDCMR_RI           (0x00000002)
#define MCF_MDHA_MDCMR_CI           (0x00000004)
#define MCF_MDHA_MDCMR_GO           (0x00000008)
 
int main()
{
    MCF_MDHA_MDCMR = ( 0 | MCF_MDHA_MDCMR_CI | MCF_MDHA_MDCMR_RI | 
MCF_MDHA_MDCMR_SWR );            //1. Reset the MDHA using the MDCMR[SWR] bit
      printf("MDSR = 0x%08x\n",MCF_MDHA_MDSR);
}
 
Thanks again for your help.
 
 
> Greg Ungerer gerg at snapgear.com wrote:
> Can you show the code that you used to access registers?
> Regards
> Greg
 
> Ted Victorio wrote:
> The failed behavior is bad data; all registers (e.g. GPIO) will read 
> 0xffffffff.
> The test value of MCF_SCM_MPR was 0x76666666
 
> Greg Ungerer gerg at snapgear.com wrote:
> What is the failed behavior?
> Kernel trap?
> Bad data?
> Regards
> Greg
 
> Ted Victorio wrote:
> I would like to access MCF5329 registers directly while in user space of
> 2.6 kernel (uClinux-dist-20060803).
> I have tried modifying MCF_SCM_MPR = 0x77777777 to MCF_SCM_MPR =
> 0x66666666 in the "linux-2.6.x/arch/m68knommu/platform/532x/config.c"
> file. I also made a similar change in DBUG. However, these two
> modifications do not allow me to access registers directly.
> The reference I consulted is Chapter 11 - System Control Module (SCM) 
> MCF5329 Reference Manual.
> Am I doing this correctly?
> Thanks


       
____________________________________________________________________________________
Be a better Heartthrob. Get better relationship answers from someone who knows. 
Yahoo! Answers - Check it out. 
http://answers.yahoo.com/dir/?link=list&sid=396545433
_______________________________________________
uClinux-dev mailing list
[email protected]
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by [email protected]
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev

Reply via email to