Subject: Linux on Assabet board

From: "Gregor Pogatzki" <[email-masked]>
Date: Fri, 12 May 2000 16:46:44 +0200

I am testing Linux on an SA-1110 Assabet board and I have got some problems/questions.

1. I cannot use the system with just one serial port, like it is described in the Assabet Documentation included in the kernel patch (diff-2.3.99-pre6-rmk1-np1). After downloading with angelboot and starting minicom I get a login prompt in the minicom window and on the LCD-display. But I am not able to type anything in the minicom window, so I cannot login or do anything else. When using the SA-1111 companion board, I can connect a second minicom via a second serial port (J16 on the companion board) and do my input in that minicom-window. The first minicom then shows my input and the output of the linux system. (The LCD display shows no further messages and switches off after a while.)
So what can I do to run the whole thing without the companion board (without the second serial connection)?

2. The system seems to be extremly slow. I compiled an mp3 encoding algorithm with my cross compiler (cross-armv4l-linux-gcc-0.4_2.95.2-6.i386). It takes about 13 minutes to encode just 4 seconds of music!! On a 450 Mhz Pentium III it takes one or two seconds. So the StrongARM seems to be about 600 times slower! What can I do do make it faster?
Is there any Initialization to be done, to make the StrongARM running on full 221Mhz clock frequency?
What compiler options should I use to make a program as fast as possible on SA-1110?

3. Is there a driver for the UDA 1341 audio codec?

Thanks for your help,
Gregor.

---

From: "Dr. David Gilbert" <[email-masked]>
Date: Fri, 12 May 2000 16:16:45 +0100 (BST)

On Fri, 12 May 2000, Gregor Pogatzki wrote:

> 2. The system seems to be extremly slow. I compiled an mp3 encoding
> algorithm with my cross compiler
> (cross-armv4l-linux-gcc-0.4_2.95.2-6.i386). It takes about 13 minutes
> to encode just 4 seconds of music!! On a 450 Mhz Pentium III it takes
> one or two seconds. So the StrongARM seems to be about 600 times
> slower! What can I do do make it faster? Is there any Initialization
> to be done, to make the StrongARM running on full 221Mhz clock
> frequency? What compiler options should I use to make a program as
> fast as possible on SA-1110?

Check that your instruction and data caches are turned on, and compile
with something like -O3 and check that you have the compiler  set up
to optimise for SA.

You aren't by any chance using any floating point instructions are you??
They will be hundreds of times slower than a Pentium of course.  Also
remember that the SA doesn't have much cache compared with a Pentium so if
your code has a particularly large cache footprint you could hit problems.

Dave

/------------------------------------------------------------------\
| Dr. David Alan Gilbert | Work:[email-masked] +44-161-286-2000 Ex258|
| -------- G7FHJ --------|---------------------------------------- |
| Home: [email-masked]            http://www.treblig.org         |
\------------------------------------------------------------------/

unsubscribe: body of `unsubscribe linux-arm' to [email-masked]
++        Please use [email-masked] for           ++
++                        kernel-related discussions.                      ++

---

From: Nicolas Pitre <[email-masked]>
Date: Fri, 12 May 2000 15:07:14 -0400 (EDT)

> So what can I do to run the whole thing without the companion board (without the second serial connection)?

Be sure you turned all flow controls to "off" in minicom.

> 2. The system seems to be extremly slow. I compiled an mp3 encoding algorithm with my cross compiler (cross-armv4l-linux-gcc-0.4_2.95.2-6.i386). It takes about 13 minutes to encode just 4 seconds o…

You should use fixed point math techniques.  Some fixed point MP3 players
already exist and perform pretty well.  There is no MP3 encoder with fixed
point computation yet that I'm aware of though.

> Is there any Initialization to be done, to make the StrongARM running on full 221Mhz clock frequency?

It is already done.

> What compiler options should I use to make a program as fast as possible on SA-1110?

  -cpu-strongarm110 -O2

> 3. Is there a driver for the UDA 1341 audio codec?

I'm writing one at the moment.  My latest patch contains one that can do
playback with 44100Hz stereo bolted in but it crashes when your playback
ends.  This is work in progress.

Nicolas

---

From: Russell King - ARM Linux Admin <[email-masked]>
Date: Fri, 12 May 2000 20:03:17 +0100 (BST)

> > What compiler options should I use to make a program as fast as possible on SA-1110?

-mcpu=strongarm110 -O2

   _____
  |_____| ------------------------------------------------- ---+---+-
  |   |        Russell King       [email-masked]      --- ---
  | | | |            http://www.arm.linux.org.uk/            /  /  |
  | +-+-+                                                     --- -+-
  /   |               THE developer of ARM Linux              |+| /|\
 /  | | |                                                     ---  |
    +-+-+ -------------------------------------------------  /\\\  |

---

From: Erik Mouw <[email-masked]>
Date: Fri May 12 21:26:50 +0200 (MDT) 2000

>> Is there any Initialization to be done, to make the StrongARM running on full

If you want to check the current speed, get my clock scaling patch from:

  http://www.lart.tudelft.nl/lartware/port/

It is actually designed for the SA-1100 and it _will_ crash a SA-1110 if
you try to change the clock speed, but it's safe to read the current clock
speed. Apply the patch to the (2.3.99-x) kernel, enable clock scaling (as
a module) in the configuration, make modules. Download the module to your
Assabet. Insert it with: "insmod scale.o debug=1". Now check the current
clock speed with "cat /proc/scale"; this will show the current clock
divisor and the current clock speed in MHz. I'm not quite sure if the
clock speed is correct for SA-1110 CPUs, but you can look up the real
speed in the SA-1110 manual. Of course I did not test this, because I
don't have an Assabet...

>> What compiler options should I use to make a program as fast as possible on

You probably mean -mcpu=strongarm110 ;-). Or use -march=armv4
-mtune=strongarm110, allthough this should generate the same code.

Did somebody already test the new ARM backend from gcc CVS? Does it
generate better code?

Erik

-- 
J.A.K. (Erik) Mouw, Information and Communication Theory Group, Department
of Electrical Engineering, Faculty of Information Technology and Systems,
Delft University of Technology, PO BOX 5031,  2600 GA Delft, The Netherlands
Phone: +31-15-2783635  Fax: +31-15-2781843  Email: [email-masked]
WWW: http://www-ict.its.tudelft.nl/~erik/

---

From: Philip Blundell <[email-masked]>
Date: Fri, 12 May 2000 21:49:04 +0100

>> What compiler options should I use to make a program as fast as possible on 

Actually, you probably want -march=armv4 -mcpu=strongarm110.  If you are 
bothered about performance you should also consider using a recent (trunk) 
version of gcc, and turning on -fomit-frame-pointer.

p.

---

From: Nicolas Pitre <[email-masked]>
Date: Fri, 12 May 2000 16:14:46 -0400 (EDT)

> > > What compiler options should I use to make a program as fast as possible on SA-1110?

Huh...  Of course.  (Do what I mean, not what I write.)

Nicolas

---

From: Erik Mouw <[email-masked]>
Date: Mon May 15 12:13:27 +0200 (MDT) 2000

> version of gcc, and turning on -fomit-frame-pointer.

What's the difference between "-mcpu=strongarm110" and "-march=armv4
-mcpu=strongarm110"? I understand from the gcc info pages that
"-mcpu=strongarm110" enables "-march=armv4" and "-mtune=strongarm110".

Does the latest gcc snapshot generate significantly better code with the
new ARM backend?

Erik

-- 
In theory, practice and theory are the same, but in practice they 
are different -- Larry McVoy

---

From: Philip Blundell <[email-masked]>
Date: Mon, 15 May 2000 12:30:36 +0100

>"-mcpu=strongarm110" enables "-march=armv4" and "-mtune=strongarm110".

Sorry, that was a typo in my message.  You are right that -mcpu=xxx 
is shorthand for -march=xx -mtune=yy.

>Does the latest gcc snapshot generate significantly better code with the

Yes, though it depends on your application whether you will see much benefit.  
The kernel does measurably better in some benchmarks with the newer compiler 
as compared to gcc 2.95.

p.