Hi Ted,

Sorry for the slow response...


Ted Victorio wrote:
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);
                                 ^^^^^^^^^^^^^
What is the definition of this?

Regards
Greg





}

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 <http://us.rd.yahoo.com/evt=48255/*http://answers.yahoo.com/dir/_ylc=X3oDMTI5MGx2aThyBF9TAzIxMTU1MDAzNTIEX3MDMzk2NTQ1MTAzBHNlYwNCQUJwaWxsYXJfTklfMzYwBHNsawNQcm9kdWN0X3F1ZXN0aW9uX3BhZ2U-?link=list&sid=396545433>from someone who knows.
Yahoo! Answers - Check it out.


------------------------------------------------------------------------

_______________________________________________
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

--
------------------------------------------------------------------------
Greg Ungerer  --  Chief Software Dude       EMAIL:     [EMAIL PROTECTED]
Secure Computing Corporation                PHONE:       +61 7 3435 2888
825 Stanley St,                             FAX:         +61 7 3891 3630
Woolloongabba, QLD, 4102, Australia         WEB: http://www.SnapGear.com
_______________________________________________
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