From jan.weil at web.de  Tue Jul 12 14:40:15 2011
From: jan.weil at web.de (jan.weil at web.de)
Date: Tue, 12 Jul 2011 20:40:15 +0200
Subject: High-resolution timers on AT91SAM9G45
Message-ID: <20110712184015.GA15448@ella.jawebada.de>

Hi,

I am currently trying to achieve latency < 1 ms (~ 10 us would be great) on
this board

<http://www.ic-board.de/product_info.php?info=p105_ICnova-SAM9G45-OEM.html>

running Linux 2.6.33.2 with a couple of patches provided by the company to
support their evaluation board.

I reconfigured CONFIG_AT91_TIMER_HZ=1024, which results in a jiffy of ~ 1
ms, which is a good start, but I am not quite there yet.

These patches

<http://linux.derkeiler.com/Mailing-Lists/Kernel/2008-03/msg01396.html>

along with the post by maddis from 03. April 2009 in this thread

<http://www.at91.com/forum/viewtopic.php/f,12/t,4194/>

made me believe that it might be possible to activate high-resolution
timers and make the kernel preemptible on this controller, so I
reconfigured:

CONFIG_PREEMPT=y
CONFIG_HIGH_RES_TIMERS=y
CONFIG_ATMEL_TCLIB=y
CONFIG_ATMEL_TCB_CLKSRC=y
CONFIG_ATMEL_TCB_CLKSRC_BLOCK=0

However, booting up the new kernel I noticed the following line:

atmel_tcb: probe of atmel_tcb.0 failed with error -22

and /proc/timer_list looks like this:

Timer List Version: v0.5
HRTIMER_MAX_CLOCK_BASES: 2
now at 54883789537 nsecs

cpu: 0
 clock 0:
  .base:       c03e6014
  .index:      0
  .resolution: 976559 nsecs
  .get_time:   ktime_get_real
  .offset:     0 nsecs
active timers:
 clock 1:
  .base:       c03e6040
  .index:      1
  .resolution: 976559 nsecs
  .get_time:   ktime_get
  .offset:     0 nsecs
active timers:
 #0: <c7a95f30>, hrtimer_wakeup, S:01
 # expires at 55787857570-55787907570 nsecs [in 904068033 to 904118033
nsecs]
  .expires_next   : 2147483646999999999 nsecs
  .hres_active    : 0
  .nr_events      : 0
  .nr_retries     : 0
  .nr_hangs       : 0
  .max_hang_time  : 0 nsecs
  .nohz_mode      : 0
  .idle_tick      : 0 nsecs
  .tick_stopped   : 0
  .idle_jiffies   : 0
  .idle_calls     : 0
  .idle_sleeps    : 0
  .idle_entrytime : 54880519167 nsecs
  .idle_waketime  : 0 nsecs
  .idle_exittime  : 0 nsecs
  .idle_sleeptime : 52111282391 nsecs
  .last_jiffies   : 0
  .next_jiffies   : 0
  .idle_expires   : 0 nsecs
jiffies: 4294716297


Tick Device: mode:     0
Per CPU device: 0
Clock Event Device: pit
 max_delta_ns:   0
 min_delta_ns:   0
 mult:           35791392
 shift:          32
 mode:           2
 next_event:     2147483646999999999 nsecs
 set_next_event: <(null)>
 set_mode:       pit_clkevt_mode
 event_handler:  tick_handle_periodic

And running cyclictest <https://rt.wiki.kernel.org/index.php/Cyclictest>
confirms that high-resolution timers are still not available.

Does anyone happen to have a clue what might be the reason for the
atmel_tcb error mentioned above and what I could try next?

Thanks for your attention.

Best,

Jan


From npavel at ituner.com  Tue Jul 12 15:59:51 2011
From: npavel at ituner.com (Nicu Pavel)
Date: Tue, 12 Jul 2011 22:59:51 +0300
Subject: High-resolution timers on AT91SAM9G45
In-Reply-To: <20110712184015.GA15448@ella.jawebada.de>
References: <20110712184015.GA15448@ella.jawebada.de>
Message-ID: <CAL9MRr=jgaA_-XdJrsqvfboCh9dfxK=DtYkt2DTNzoh=z0r+Sw@mail.gmail.com>

Hi,

> However, booting up the new kernel I noticed the following line:
>
> atmel_tcb: probe of atmel_tcb.0 failed with error -22

I had the same issue, if I remember right there is a problem how
multiple tcp devices are added. As a quick workaround I just disabled
the second tcb device:

https://gitorious.org/picopc-kernel/kernel/commit/29c92b518010ff9bb431dc0d3880a1945a7a319f


Regards,
Nicu Pavel


From jan.weil at web.de  Wed Jul 13 03:03:01 2011
From: jan.weil at web.de (Jan Weil)
Date: Wed, 13 Jul 2011 09:03:01 +0200
Subject: High-resolution timers on AT91SAM9G45
In-Reply-To: <CAL9MRr=jgaA_-XdJrsqvfboCh9dfxK=DtYkt2DTNzoh=z0r+Sw@mail.gmail.com>
References: <20110712184015.GA15448@ella.jawebada.de>
	<CAL9MRr=jgaA_-XdJrsqvfboCh9dfxK=DtYkt2DTNzoh=z0r+Sw@mail.gmail.com>
Message-ID: <aa40a744-9f2f-4a5d-bb72-a3c13145e68c@email.android.com>

Nicu Pavel <npavel at ituner.com> schrieb:
>> atmel_tcb: probe of atmel_tcb.0 failed with error -22
>
>I had the same issue, if I remember right there is a problem how
>multiple tcp devices are added. As a quick workaround I just disabled
>the second tcb device:
>
>https://gitorious.org/picopc-kernel/kernel/commit/29c92b518010ff9bb431dc0d3880a1945a7a319f

Thanks a lot, Nicu. That was very helpful, exactly what I needed. It works.

Best regards,

Jan




From sdc695 at yahoo.com  Wed Jul 13 06:33:33 2011
From: sdc695 at yahoo.com (Tom Watson)
Date: Wed, 13 Jul 2011 03:33:33 -0700 (PDT)
Subject: Linux on Pilz o215 hardware
Message-ID: <1310553213.13944.YahooMailClassic@web65407.mail.ac4.yahoo.com>

Back a few years ago, I posted a question on trying to get a Linux kernel loaded on the Pilz o215 hardware.  I remember some replies, but was busy and didn't get around to doing anything.  Fast forward to today, and I dredged out the hardware and have renewed interest in trying to get this operational.

It is a nice little box that works on 24 vdc (quite portable) with sound and a couple of serial ports,  It even has a USB port for peripherals and inbound.

I have a 5Gbyte PCMCIA card that would fit nicely to make this work, but as I really don't know how this thing even boots up (it currently displays a nice Pilz splash screen and goes onto [yuck] Windows CE).

If all it needed was a suitably formatted PCMCIA drive I would be most happy (I can dream, can't I?).

According to WinCE (yuck again) it has 50 Meg bytes of ram memory.  I don't know what the ratio to ARM to x86 code is but it should be enough to get the job done.

Thanks for any pointers.  I promise to be more interested this time.
-- 
Tom Watson



From marek.vasut at gmail.com  Sat Jul 16 03:13:15 2011
From: marek.vasut at gmail.com (Marek Vasut)
Date: Sat, 16 Jul 2011 09:13:15 +0200
Subject: Linux on Pilz o215 hardware
In-Reply-To: <1310553213.13944.YahooMailClassic@web65407.mail.ac4.yahoo.com>
References: <1310553213.13944.YahooMailClassic@web65407.mail.ac4.yahoo.com>
Message-ID: <201107160913.15802.marek.vasut@gmail.com>

On Wednesday, July 13, 2011 12:33:33 PM Tom Watson wrote:
> Back a few years ago, I posted a question on trying to get a Linux kernel
> loaded on the Pilz o215 hardware.  I remember some replies, but was busy
> and didn't get around to doing anything.  Fast forward to today, and I
> dredged out the hardware and have renewed interest in trying to get this
> operational.
> 
> It is a nice little box that works on 24 vdc (quite portable) with sound
> and a couple of serial ports,  It even has a USB port for peripherals and
> inbound.
> 
> I have a 5Gbyte PCMCIA card that would fit nicely to make this work, but as
> I really don't know how this thing even boots up (it currently displays a
> nice Pilz splash screen and goes onto [yuck] Windows CE).
> 
> If all it needed was a suitably formatted PCMCIA drive I would be most
> happy (I can dream, can't I?).
> 
> According to WinCE (yuck again) it has 50 Meg bytes of ram memory.  I don't
> know what the ratio to ARM to x86 code is but it should be enough to get
> the job done.
> 
> Thanks for any pointers.  I promise to be more interested this time.

Well if it's strongarm, then grab linux sources, derive support for your 
platform and start adding stuff.

Anyway, you'll likely need some UART connection to connect to the bootloader and 
maybe ethernet for TFTP boot, who knows what does the thing run as a loader


From anarsoul at gmail.com  Sat Jul 16 05:08:18 2011
From: anarsoul at gmail.com (Vasily Khoruzhick)
Date: Sat, 16 Jul 2011 12:08:18 +0300
Subject: Linux on Pilz o215 hardware
In-Reply-To: <201107160913.15802.marek.vasut@gmail.com>
References: <1310553213.13944.YahooMailClassic@web65407.mail.ac4.yahoo.com>
	<201107160913.15802.marek.vasut@gmail.com>
Message-ID: <201107161208.18716.anarsoul@gmail.com>

On Saturday 16 July 2011 10:13:15 Marek Vasut wrote:
> On Wednesday, July 13, 2011 12:33:33 PM Tom Watson wrote:
> > Back a few years ago, I posted a question on trying to get a Linux kernel
> > loaded on the Pilz o215 hardware.  I remember some replies, but was busy
> > and didn't get around to doing anything.  Fast forward to today, and I
> > dredged out the hardware and have renewed interest in trying to get this
> > operational.
> > 
> > It is a nice little box that works on 24 vdc (quite portable) with sound
> > and a couple of serial ports,  It even has a USB port for peripherals and
> > inbound.
> > 
> > I have a 5Gbyte PCMCIA card that would fit nicely to make this work, but
> > as I really don't know how this thing even boots up (it currently
> > displays a nice Pilz splash screen and goes onto [yuck] Windows CE).
> > 
> > If all it needed was a suitably formatted PCMCIA drive I would be most
> > happy (I can dream, can't I?).
> > 
> > According to WinCE (yuck again) it has 50 Meg bytes of ram memory.  I
> > don't know what the ratio to ARM to x86 code is but it should be enough
> > to get the job done.
> > 
> > Thanks for any pointers.  I promise to be more interested this time.
> 
> Well if it's strongarm, then grab linux sources, derive support for your
> platform and start adding stuff.
> 
> Anyway, you'll likely need some UART connection to connect to the
> bootloader and maybe ethernet for TFTP boot, who knows what does the thing
> run as a loader

You can try haret as (temporary) bootloader to boot linux from WinCE. With 
haret you can also discover what gpio pins WinCE uses for different purposes, 
etc...

Regards
Vasily


From holzmayr at rsi-elektrotechnik.de  Tue Jul 26 14:59:56 2011
From: holzmayr at rsi-elektrotechnik.de (Josef Holzmayr)
Date: Tue, 26 Jul 2011 20:59:56 +0200
Subject: RFC: Add board support for the RSI EWS board.
Message-ID: <WC20110726185956.330001@rsi-elektrotechnik.de>

Hello all!

The hardware sat in a drawer for some time, but finally we want to finish it. Due to the long 
waiting, the machine number already slipped out of the header in mainline.
So hopefully, we can still can sort things out.

As the subject says, RFC (my first ever arm linux patch). Please don't hesitate to yell when 
things seem wrong, inadequate, questionable.

Thanks, Joe



Amtsgericht Ingolstadt - GmbH: HRB 191328 - KG: HRA 170363
Gesch?ftsf?hrer: Dr.-Ing. Michael Sorg, Dipl.-Ing. Franz Sorg
USt-IdNr.: DE 128592548
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-support-for-the-RSI-EWS-board.patch
Type: text/x-patch
Size: 7751 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm/attachments/20110726/5e43ed0a/attachment.bin>

From linux at arm.linux.org.uk  Tue Jul 26 15:33:46 2011
From: linux at arm.linux.org.uk (Russell King - ARM Linux)
Date: Tue, 26 Jul 2011 20:33:46 +0100
Subject: RFC: Add board support for the RSI EWS board.
In-Reply-To: <WC20110726185956.330001@rsi-elektrotechnik.de>
References: <WC20110726185956.330001@rsi-elektrotechnik.de>
Message-ID: <20110726193346.GH1655@n2100.arm.linux.org.uk>

On Tue, Jul 26, 2011 at 08:59:56PM +0200, Josef Holzmayr wrote:
> +#include <mach/hardware.h>
> +#include <mach/board.h>
> +#include <mach/gpio.h>

Aieeeeee...

linux/gpio.h please!


From holzmayr at rsi-elektrotechnik.de  Tue Jul 26 15:50:40 2011
From: holzmayr at rsi-elektrotechnik.de (Josef Holzmayr)
Date: Tue, 26 Jul 2011 21:50:40 +0200
Subject: RFC: Add board support for the RSI EWS board.
In-Reply-To: <20110726193346.GH1655@n2100.arm.linux.org.uk>
References: <WC20110726185956.330001@rsi-elektrotechnik.de>
	<20110726193346.GH1655@n2100.arm.linux.org.uk>
Message-ID: <WC20110726195040.470002@rsi-elektrotechnik.de>

> Aieeeeee...
> 
> linux/gpio.h please!

Thanks for yelling!
Can you maybe recommend one of the other board files to verify against?

Joe



Amtsgericht Ingolstadt - GmbH: HRB 191328 - KG: HRA 170363
Gesch?ftsf?hrer: Dr.-Ing. Michael Sorg, Dipl.-Ing. Franz Sorg
USt-IdNr.: DE 128592548




