Re: Re: Changing Machine ID

2009-04-26 Thread Jaya krishnan
Title: Samsung Enterprise Portal mySingle
Manjunatha,
Both the boot loader and the Kernel should have  the  same  machine 
ID. Otherwise  the kernel won't boot. 
--Jayakrishnan
 
  --- Original Message ---Sender : David BrownellDate   : Apr 27, 2009 15:10 (GMT+09:00)Title  : Re: Changing Machine IDOn Sunday 26 April 2009, Manjunatha AM wrote:
> 
> Hi
> 
> I downloaded latest OS (linux-davinci-2.6-historic )from source.mvsta.com
> and compiled it for Davinci DM6446 EVM with low level debug option selected.

You have a pretty old version of U-Boot there ...


> When I boot the board it gives below error;
> 
> *
> Starting kernel ...
> 
> Uncompressing
> Linux...
> . done, booting the kernel.
> 
> Error: unrecognized/unsupported machine ID (r1 = 0x0356).
> 
> Available machine support:
> 
> ID (hex)NAME
> 0385DaVinci DM644x EVM
> 
> Please check your kernel config and/or bootloader.
> 
> **
> I dont have latest Bootloader source

http://www.denx.de/wiki/U-Boot ... 2009.03 should work.
Though if you're using 1.1 silicion, I'd be paranoid
and stick with that bootloader.


> and hence I need to change the kernel 
> source to boot with same machine ID(passed by present bootloader..)which
> file I need to change??

---
 arch/arm/tools/mach-types |5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

--- a/arch/arm/tools/mach-types
+++ b/arch/arm/tools/mach-types
@@ -862,7 +862,7 @@ magpieMACH_MAGPIEMAGPIE850
 mx21adsMACH_MX21ADSMX21ADS851
 mb87m3400MACH_MB87M3400MB87M3400852
 mguard_deltaMACH_MGUARD_DELTAMGUARD_DELTA853
-davinci_dvdpMACH_DAVINCI_DVDPDAVINCI_DVDP854
+#davinci_dvdpMACH_DAVINCI_DVDPDAVINCI_DVDP854
 htcuniversalMACH_HTCUNIVERSALHTCUNIVERSAL855
 tpadMACH_TPADTPAD856
 roverp3MACH_ROVERP3ROVERP3857
@@ -908,7 +908,8 @@ nadia2vbMACH_NADIA2VBNADIA2VB897
 r1000MACH_R1000R1000898
 hw90250MACH_HW90250HW90250899
 omap_2430sdpMACH_OMAP_2430SDPOMAP_2430SDP900
-davinci_evmMACH_DAVINCI_EVMDAVINCI_EVM901
+#davinci_evmMACH_DAVINCI_EVMDAVINCI_EVM901
+davinci_evmMACH_DAVINCI_EVMDAVINCI_EVM854
 omap_tornadoMACH_OMAP_TORNADOOMAP_TORNADO902
 olocreekMACH_OLOCREEKOLOCREEK903
 palmz72MACH_PALMZ72PALMZ72904


___
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
___
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source


RE: when port a software , bus error

2009-04-26 Thread Balagopalakrishnan, Anand
Zhenfeng,

As Sid pointed out, the bus error is due to access of int32 data at non word 
aligned address. 

You have turned on structure packing with the #pragma directive. If this was 
not done, the compiler would have padded 3 bytes between the char 'm' and int 
'data'. In that case, the int 'data' would have been word aligned.

You can use #pragma pack(push, 4) to resolve the problem.

Best Regards,
Anand Balagopalakrishnan
Texas Instruments
India

-Original Message-
From: davinci-linux-open-source-bounces+anandb=ti@linux.davincidsp.com 
[mailto:davinci-linux-open-source-bounces+anandb=ti@linux.davincidsp.com] 
On Behalf Of Heroor, Siddharth
Sent: Monday, April 27, 2009 11:30 AM
To: zhenfeng ren; davinci-linux-open-source@linux.davincidsp.com
Subject: RE: when port a software , bus error

Hi,

On Arm, you can access only word aligned data. To access a 32 bit value, the 
address needs to be 32 bit aligned etc.. If the data is not aligned, then a bus 
error is thrown. 

I'm guessing that its because of the char m, data[] will not be aligned in 
_test_c.

Thanks and Regards,
Sid
+91-80-25099294
-Original Message-
From: zhenfeng ren [mailto:1985re...@gmail.com] 
Sent: Saturday, April 25, 2009 8:44 AM
To: davinci-linux-open-source@linux.davincidsp.com
Subject: when port a software , bus error

hi, everyone:

  Just like the code as below:

  1 #include 
  2 #include 
  3
  4 #pragma pack(push, 1)
  5 typedef struct _test_c
  6 {
  7 char m;
  8 int data[10];
  9 }test_c;
 10 #pragma pack(pop)
 11
 12 int main()
 13 {
 14 printf(" sizeof test_c is %d \n", sizeof(test_c));
 15 test_c test;
 16 for(int i=0; i<10; i++)
 17 test.data[i] = 9-i;
 18 //int data[10]={9, 8, 7, 6, 5, 4, 2, 3, 1 , 0};
 19 std::sort(test.data, test.data+10);
 20
 21 return 1;
 22 }

  This code can work on X86, but cause bus error runing on Davinci(My
board is DM6446, GCC 3.4) .
  I know the problem is:
   std::sort(test.data, test.data+10);test.data is not 4-Bytes aligned.
  The software  I want to port uses  structs liking "test_c" a lot.

  Could anyone  give me  some advice ?


-- 
Thanks,
Zhenfeng Ren


___
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
___
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source


Re: Changing Machine ID

2009-04-26 Thread David Brownell
On Sunday 26 April 2009, Manjunatha AM wrote:
> 
> Hi
> 
> I downloaded latest OS (linux-davinci-2.6-historic )from source.mvsta.com
> and compiled it for Davinci DM6446 EVM with low level debug option selected.

You have a pretty old version of U-Boot there ...


> When I boot the board it gives below error;
> 
> *
> Starting kernel ...
> 
> Uncompressing
> Linux...
> . done, booting the kernel.
> 
> Error: unrecognized/unsupported machine ID (r1 = 0x0356).
> 
> Available machine support:
> 
> ID (hex)NAME
> 0385DaVinci DM644x EVM
> 
> Please check your kernel config and/or bootloader.
> 
> **
> I dont have latest Bootloader source

http://www.denx.de/wiki/U-Boot ... 2009.03 should work.
Though if you're using 1.1 silicion, I'd be paranoid
and stick with that bootloader.


> and hence I need to change the kernel 
> source to boot with same machine ID(passed by present bootloader..)which
> file I need to change??

---
 arch/arm/tools/mach-types |5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

--- a/arch/arm/tools/mach-types
+++ b/arch/arm/tools/mach-types
@@ -862,7 +862,7 @@ magpie  MACH_MAGPIE MAGPIE  
850
 mx21adsMACH_MX21ADSMX21ADS 
851
 mb87m3400  MACH_MB87M3400  MB87M3400   852
 mguard_delta   MACH_MGUARD_DELTA   MGUARD_DELTA853
-davinci_dvdp   MACH_DAVINCI_DVDP   DAVINCI_DVDP854
+#davinci_dvdp  MACH_DAVINCI_DVDP   DAVINCI_DVDP854
 htcuniversal   MACH_HTCUNIVERSAL   HTCUNIVERSAL855
 tpad   MACH_TPAD   TPAD856
 roverp3MACH_ROVERP3ROVERP3 
857
@@ -908,7 +908,8 @@ nadia2vbMACH_NADIA2VB   NADIA2VB
897
 r1000  MACH_R1000  R1000   898
 hw90250MACH_HW90250HW90250 
899
 omap_2430sdp   MACH_OMAP_2430SDP   OMAP_2430SDP900
-davinci_evmMACH_DAVINCI_EVMDAVINCI_EVM 901
+#davinci_evm   MACH_DAVINCI_EVMDAVINCI_EVM 901
+davinci_evmMACH_DAVINCI_EVMDAVINCI_EVM 854
 omap_tornado   MACH_OMAP_TORNADO   OMAP_TORNADO902
 olocreek   MACH_OLOCREEK   OLOCREEK903
 palmz72MACH_PALMZ72PALMZ72 
904


___
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source


RE: when port a software , bus error

2009-04-26 Thread Heroor, Siddharth
Hi,

On Arm, you can access only word aligned data. To access a 32 bit value, the 
address needs to be 32 bit aligned etc.. If the data is not aligned, then a bus 
error is thrown. 

I'm guessing that its because of the char m, data[] will not be aligned in 
_test_c.

Thanks and Regards,
Sid
+91-80-25099294
-Original Message-
From: zhenfeng ren [mailto:1985re...@gmail.com] 
Sent: Saturday, April 25, 2009 8:44 AM
To: davinci-linux-open-source@linux.davincidsp.com
Subject: when port a software , bus error

hi, everyone:

  Just like the code as below:

  1 #include 
  2 #include 
  3
  4 #pragma pack(push, 1)
  5 typedef struct _test_c
  6 {
  7 char m;
  8 int data[10];
  9 }test_c;
 10 #pragma pack(pop)
 11
 12 int main()
 13 {
 14 printf(" sizeof test_c is %d \n", sizeof(test_c));
 15 test_c test;
 16 for(int i=0; i<10; i++)
 17 test.data[i] = 9-i;
 18 //int data[10]={9, 8, 7, 6, 5, 4, 2, 3, 1 , 0};
 19 std::sort(test.data, test.data+10);
 20
 21 return 1;
 22 }

  This code can work on X86, but cause bus error runing on Davinci(My
board is DM6446, GCC 3.4) .
  I know the problem is:
   std::sort(test.data, test.data+10);test.data is not 4-Bytes aligned.
  The software  I want to port uses  structs liking "test_c" a lot.

  Could anyone  give me  some advice ?


-- 
Thanks,
Zhenfeng Ren


___
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source


RE: DSPLINK: MSGQ_get() with WAIT_NONE arg causes freeze

2009-04-26 Thread Kamoolkar, Mugdha
Kelby,

We found this issue recently, and it needs a fix in sync.c file. I will send it 
separately to you.

Regards,
Mugdha
 
-Original Message-
From: davinci-linux-open-source-boun...@linux.davincidsp.com 
[mailto:davinci-linux-open-source-boun...@linux.davincidsp.com] On Behalf Of 
Kelby Rogers
Sent: Monday, April 27, 2009 9:02 AM
To: davinci-linux-open-source@linux.davincidsp.com
Subject: DSPLINK: MSGQ_get() with WAIT_NONE arg causes freeze

I am having trouble getting MSGQ_get() to work when set to non-blocking, 
i.e. with the parameter "WAIT_NONE". It works fine blocking.

I am using dsplink 1.60, and testing on the DM6446 EVM.

The symptom of the problem is the Linux OS freezes, requiring a reboot.

I have isolated the problem with the following changes to the GPP 
'message' sample application which is provided with dsplink.

Index: message.c
===
--- message.c   (revision 26492)
+++ message.c   (working copy)
@@ -406,7 +406,11 @@
/*
 *  Receive the message.
 */
-status = MSGQ_get (SampleGppMsgq, WAIT_FOREVER, &msg) ;
+do
+{
+   status = MSGQ_get (SampleGppMsgq, WAIT_NONE, &msg) ;
+} while (status == DSP_ENOTCOMPLETE);
+
if (DSP_FAILED (status)) {
MESSAGE_1Print ("MSGQ_get () failed. Status = [0x%x]\n",
status) ;


If anyone has some pointers to what I am doing wrong or where to look, 
please let me know.

Regards,
Kelby



===
This email, including any attachments, is only for the intended
addressee.  It is subject to copyright, is confidential and may be
the subject of legal or other privilege, none of which is waived or
lost by reason of this transmission.
If the receiver is not the intended addressee, please accept our
apologies, notify us by return, delete all copies and perform no
other act on the email.
Unfortunately, we cannot warrant that the email has not been
 altered or corrupted during transmission.
===


___
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
___
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source


Re: Changing Machine ID

2009-04-26 Thread Sidharth Garde

Hi,

AFAIK, the appropriate machine ID is selected at the time of compiling the 
available source code.


If you are using the available makefile directly, then I suggest you go for 
recompilation with the appropriate machine ID option set ( - M i think) and 
enter your own machine ID. That will probably help.


Regards,
Sidharth

- Original Message - 
From: "Manjunatha AM" 

To: 
Sent: Monday, April 27, 2009 11:06 AM
Subject: Changing Machine ID




Hi

I downloaded latest OS (linux-davinci-2.6-historic )from source.mvsta.com
and compiled it for Davinci DM6446 EVM with low level debug option 
selected.


When I boot the board it gives below error;

*
Starting kernel ...

Uncompressing
Linux...
. done, booting the kernel.

Error: unrecognized/unsupported machine ID (r1 = 0x0356).

Available machine support:

ID (hex)NAME
0385DaVinci DM644x EVM

Please check your kernel config and/or bootloader.

**
I dont have latest Bootloader source and hence I need to change the kernel
source to boot with same machine ID(passed by present bootloader..)which
file I need to change??


Thanks
Manjunath.AM




The information contained in this electronic message and any attachments 
to this message are intended for the exclusive
use of the addressee(s) and may contain proprietary, confidential or 
privileged information. If you are not the intended
recipient, you should not disseminate, distribute or copy this e-mail. 
Please notify the sender immediately and destroy

all copies of this message and any attachments contained in it.



___
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source





___
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source


Changing Machine ID

2009-04-26 Thread Manjunatha AM

Hi

I downloaded latest OS (linux-davinci-2.6-historic )from source.mvsta.com
and compiled it for Davinci DM6446 EVM with low level debug option selected.

When I boot the board it gives below error;

*
Starting kernel ...

Uncompressing
Linux...
. done, booting the kernel.

Error: unrecognized/unsupported machine ID (r1 = 0x0356).

Available machine support:

ID (hex)NAME
0385DaVinci DM644x EVM

Please check your kernel config and/or bootloader.

**
I dont have latest Bootloader source and hence I need to change the kernel
source to boot with same machine ID(passed by present bootloader..)which
file I need to change??


Thanks
Manjunath.AM




The information contained in this electronic message and any attachments to 
this message are intended for the exclusive 
use of the addressee(s) and may contain proprietary, confidential or privileged 
information. If you are not the intended
 recipient, you should not disseminate, distribute or copy this e-mail. Please 
notify the sender immediately and destroy
 all copies of this message and any attachments contained in it.



___
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source


DSPLINK: MSGQ_get() with WAIT_NONE arg causes freeze

2009-04-26 Thread Kelby Rogers
I am having trouble getting MSGQ_get() to work when set to non-blocking, 
i.e. with the parameter "WAIT_NONE". It works fine blocking.


I am using dsplink 1.60, and testing on the DM6446 EVM.

The symptom of the problem is the Linux OS freezes, requiring a reboot.

I have isolated the problem with the following changes to the GPP 
'message' sample application which is provided with dsplink.


Index: message.c
===
--- message.c   (revision 26492)
+++ message.c   (working copy)
@@ -406,7 +406,11 @@
   /*
*  Receive the message.
*/
-status = MSGQ_get (SampleGppMsgq, WAIT_FOREVER, &msg) ;
+do
+{
+   status = MSGQ_get (SampleGppMsgq, WAIT_NONE, &msg) ;
+} while (status == DSP_ENOTCOMPLETE);
+
   if (DSP_FAILED (status)) {
   MESSAGE_1Print ("MSGQ_get () failed. Status = [0x%x]\n",
   status) ;


If anyone has some pointers to what I am doing wrong or where to look, 
please let me know.


Regards,
Kelby



===
This email, including any attachments, is only for the intended
addressee.  It is subject to copyright, is confidential and may be
the subject of legal or other privilege, none of which is waived or
lost by reason of this transmission.
If the receiver is not the intended addressee, please accept our
apologies, notify us by return, delete all copies and perform no
other act on the email.
Unfortunately, we cannot warrant that the email has not been
altered or corrupted during transmission.
===


___
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source


Re: [U-Boot] U-Boot and CONFIG_SYS_DAVINCI_BROKEN_ECC

2009-04-26 Thread Hugo Villeneuve
On Sun, 26 Apr 2009 16:56:40 -0700
David Brownell  wrote:

> On Sunday 26 April 2009, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > 
> > > > > Before I submit a patch to remove it from U-Boot GIT (nothing
> > > > > there enables it, and it will nastify 4-bit support), I
> > > > > thought I'd see if anyone knows exactly what software it was
> > > > > trying to emulate.  ...
> > > >
> > > > maybe add it in the feature-removal-schedule.txt
> > > > will let people time to explain why they need it
> > > 
> > > Hm... I don't think this is needed.
> > > 
> > > Since there are no users of this code in U-Boot, we can as well
> > > remove it without warning.
> 
> That was my thought.  If it were important enough to keep in
> *this* source base, someone would have submitted some board
> that uses it.  It's badly enough broken that I don't know who
> would bother using it, though; anyone trying to use it has some
> kind of (non-Linux?) support nightmare already.
> 
> 
> > no necessarelly the boards Maintainer choose to use the other ECC
> > but part of the U-Boot user may need it.
> > So add it in the removal schedule make sense. We can evenif plan it
> > for the next Release.
> 
> I wouldn't mind doing that.
> 
> 
> > > > After my only request will be to use the same ECC as the
> > > > mainline kernel or if someone explain why he need it add on
> > > > other ECC algo
> 
> Right, mainline does not use that "broken" ECC.  I can't
> figure out who *does* use it, either...

We certainly don't use it for the SFFSDR board.

Hugo V.

___
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source


Re: [U-Boot] U-Boot and CONFIG_SYS_DAVINCI_BROKEN_ECC

2009-04-26 Thread David Brownell
On Sunday 26 April 2009, Jean-Christophe PLAGNIOL-VILLARD wrote:
> 
> > > > Before I submit a patch to remove it from U-Boot GIT (nothing
> > > > there enables it, and it will nastify 4-bit support), I thought
> > > > I'd see if anyone knows exactly what software it was trying to
> > > > emulate.  ...
> > >
> > > maybe add it in the feature-removal-schedule.txt
> > > will let people time to explain why they need it
> > 
> > Hm... I don't think this is needed.
> > 
> > Since there are no users of this code in U-Boot, we can as well
> > remove it without warning.

That was my thought.  If it were important enough to keep in
*this* source base, someone would have submitted some board
that uses it.  It's badly enough broken that I don't know who
would bother using it, though; anyone trying to use it has some
kind of (non-Linux?) support nightmare already.


> no necessarelly the boards Maintainer choose to use the other ECC but part
> of the U-Boot user may need it.
> So add it in the removal schedule make sense. We can evenif plan it for the 
> next
> Release.

I wouldn't mind doing that.


> > > After my only request will be to use the same ECC as the mainline kernel
> > > or if someone explain why he need it add on other ECC algo

Right, mainline does not use that "broken" ECC.  I can't
figure out who *does* use it, either...

- Dave


___
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source


U-Boot and CONFIG_SYS_DAVINCI_BROKEN_ECC

2009-04-26 Thread David Brownell
I was looking at the DaVinci NAND support in current U-Boot
code (i.e. 2009.03 plus patches merged since that release),
and am puzzled by the above-named config option.

Before I submit a patch to remove it from U-Boot GIT (nothing
there enables it, and it will nastify 4-bit support), I thought
I'd see if anyone knows exactly what software it was trying to
emulate.  Differences from the current NAND driver in GIT:

 - Matches MVL 4.0 (2.6.10) and 5.0 (2.6.18) drivers in handling
   NANDx1ECC registers:  0PQR0stu maps to PsQRtu, while the NAND
   driver in mainline maps it to ~PQRstu.

 - Custom ECC layouts, "not compatible with Linux or RBL/UBL".

 - Does some very broken stuff for large page support.

The first of those I can understand; someone wrote some odd and
overly-complex ECC code way back, it worked and then got shipped.
(Although TI's U-Boot 1.2.0 uses soft ECC, instead...)

The other two look like they were experimental code that
should probably not have been merged anywhere...

- Dave

___
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source


Re: Communicating with an external audio codec chip over UART

2009-04-26 Thread Steve Chen
On Sun, 2009-04-26 at 00:40 +0530, Kapil Pendse wrote:
> Hello,
> 
> Thanks for the inputs Steve. I'm using an older version of MVista,
> with OSS. But your suggestion made be think in the right direction.
> I'll be writing the voice processor's (ForteMedia 1182) driver within
> the OSS framework. Also, today I managed to get the UART1 to work
> properly between FM1182 and DM355, so rest of the things should follow
> soon. Some of the older threads on this mailing list helped to figure
> out how to enable UART1 and McBSP0/1 for PCM operation.
> 
> Thanks for your quick reply.
> 
> Best regards,
> Kapil Pendse
> 

Kapil,

OSS is obsolete.  If you decided to upgrade your kernel, you will
probably have to throw away all your OSS work and start over.
Therefore, I would strongly recommend using a newer kernel with ALSA
support.  The two obvious choices are MVL pro5.0 (which is the same as
TI LSP2.0) and the git kernel.

Regards,

Steve



___
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source