Zoolu R | 8 Feb 2010 17:37
Picon

GPIO pin in interrupt handler/AMCC processor

Hi All,

We are using a target with AMCC 440ep processor. We need to read the a GPIO
pin  value in a interrupt mode in linux kernel. Is there some modules where
i can refer so some generic implementation(configuring gpio pin as inteerupt
pin and handlling the same). I would like to detect the dynamic value
change(0/1) using interrupt and perform isr_call back. Could some one show
me some pointers.

Thanks in advance.

Thanks & Regards
Zoolu

Stefan Roese | 8 Feb 2010 19:13
Picon
Picon
Favicon

GPIO pin in interrupt handler/AMCC processor

Hi Zoolu,

first, this question is not ELDK related. You should send it to Linux-PPC 
mailing list instead <linuxppc-dev at ozlabs.org>. But still here a few quick 
answers/comments.

On Monday 08 February 2010 17:37:20 Zoolu R wrote:
> We are using a target with AMCC 440ep processor. We need to read the a GPIO
> pin  value in a interrupt mode in linux kernel. Is there some modules where
> i can refer so some generic implementation(configuring gpio pin as
>  inteerupt pin and handlling the same).

The PPC4xx GPIO support is available in the current Linux kernel. See:

arch/powerpc/sysdev/ppc4xx_gpio.c

for more details. Please note that you also need to write a GPIO device node 
in the device tree source (dts) of your Linux port. See this file for details 
in the GPIO node:

arch/powerpc/boot/dts/warp.dts

>  I would like to detect the dynamic
>  value change(0/1) using interrupt and perform isr_call back. Could some
>  one show me some pointers.

So you don't want to use the GPIO pin functionality, but the external 
interrupt functionality (the pin functions are multiplexed). You need to write 
a device driver for your custom device. And you need to configure the pin as 
external interrupt and again add a device node including the interrupt 
(Continue reading)

J.Hwan.Kim | 18 Feb 2010 16:45
Picon

How to mount sysfs ?

Hi, everyone

I'm using ELDK4.2.
But Kernel does not have /sys file system.
My .config file tells CONFIG_SYSFS = y.
Someone tell me I should mount the sysfs in my system.
What file must I modify in my root file system?
In ELDK, there is no file such as  /etc/fstab or /etc/mtab.

Thanks in advance.
Best Regards,
J.Hwan Kim

Ifti Khan | 18 Feb 2010 17:25
Favicon

ELDK 4.1

I want to know if the ELDK 4.1 toolchain ANSI compliant? 

We are using Freescale's PowerQUICC controller with Linux. The reason I
am asking is because we plan to use ASN.1 libraries and these libraries
are guaranteed to work with any ANSI compliant toolchain.

Ifti

Gabriel Johnson | 18 Feb 2010 17:18
Picon

How to mount sysfs ?

> What file must I modify in my root file system?
> In ELDK, there is no file such as ?/etc/fstab or /etc/mtab.

You can create a /etc/fstab and in your init script run `mount -a`.
To mount sysfs the line for fstab is the following:
none           /sys              sysfs      defaults,noatime
  0      0
or just use the mount command:
mount -t sysfs sysfs /sys

-Gabe

Detlev Zundel | 18 Feb 2010 18:57
Picon
Picon
Picon
Favicon

ELDK 4.1

Hello Ifti,

> I want to know if the ELDK 4.1 toolchain ANSI compliant? 

I wonder why you ask about ELDK 4.1 as this is quite old already?

> We are using Freescale's PowerQUICC controller with Linux. The reason I
> am asking is because we plan to use ASN.1 libraries and these libraries
> are guaranteed to work with any ANSI compliant toolchain.

ELDK 4.1 contains GCC 4.0.0 and ELDK 4.2 contains GCC version 4.2.2.  So
the question is in effect about the ANSI compliance of GCC.  For the
latter see e.g. this URL which should answer your question:

http://gcc.gnu.org/onlinedocs/gcc-4.2.2/gcc/Standards.html#Standards

Best wishes
  Detlev Zundel

--

-- 
Helena ist verh?ltnism??ig leicht zu besetzen.  Eine Frau, zarteste Jugend
mit sinnlicher Reife verbindend;  ?u?erst intelligent,  indes von durchaus
weiblicher Denkart; phlegmatisch, aber sensibel; un?bertrefflich sch?n und
dabei von sehr pers?nlichem Charme - mehr wird da nicht verlangt.
                                               -- Peter Hacks
--
DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de

(Continue reading)

Wolfgang Denk | 18 Feb 2010 21:19
Picon
Picon
Favicon

How to mount sysfs ?

Dear "J.Hwan.Kim",

In message <4B7D6089.30908 at gmail.com> you wrote:
> 
> Someone tell me I should mount the sysfs in my system.
> What file must I modify in my root file system?

This depends on how your root file system is structured.

> In ELDK, there is no file such as  /etc/fstab or /etc/mtab.

If you use ELDK's development root file system (usually mounted over
NFS) then there _is_ /etc/fstab. Please check again.

If you use a small standalone file system things may indeed be
different. For example the SELF based ramdisk image that comes with
the ELDK is based on Busybox, and any needed mount commands can be
found (and have to be placed) in the /etc/rc.sh script.

Best regards,

Wolfgang Denk

--

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
You Earth people glorified organized violence  for  forty  centuries.
But you imprison those who employ it privately.
	-- Spock, "Dagger of the Mind", stardate 2715.1
(Continue reading)

Germano Barreiro | 25 Feb 2010 16:56
Picon
Gravatar

crond not working

Hello

Crond is not working in my ELDK ARM based embedded installation, and I
cant figure out why.
I have configured a single test with this one line /etc/crontab file:

20    12    *    *    *    /usr/local/bin/mestre.sh

But at 12:20 the script didnt get called - or at least it looks like
so since, inside mestre.sh, I have only this:

#!/bin/bash

/bin/date >> /tmp/testecron.txt

I tried also with this in crontab:

0-59    *    *    *    *    /usr/local/bin/mestre.sh

without success.

In /var/log/cron I have only:

root at cbc:/root:# cat /var/log/cron
Feb 25 10:43:20 cbc crond[1963]: (CRON) STARTUP (V5.0)
Feb 25 10:44:01 cbc crond[1963]: (*system*) RELOAD (/etc/crontab)
Feb 25 10:44:21 cbc crond[2028]: (CRON) STARTUP (V5.0)
Feb 25 10:46:18 cbc crond[2070]: (CRON) STARTUP (V5.0)
Feb 25 11:48:22 cbc crond[2111]: (CRON) STARTUP (V5.0)
Feb 25 12:16:20 cbc crond[2356]: (CRON) STARTUP (V5.0)
(Continue reading)

Wolfgang Denk | 25 Feb 2010 20:44
Picon
Picon
Favicon

crond not working

Dear Germano Barreiro,

In message <681741761002250756h11d277d3o103c68b7bf32b00b at mail.gmail.com> you wrote:
> 
> Crond is not working in my ELDK ARM based embedded installation, and I
> cant figure out why.

The reason is most probably that crond is not unning at all - at least
in the default configuration (i. e. as ELDK installs it) it is not
enabled.

Try running the command "service crond status" - I bet it says "crond
is stopped".

You can use the command "chkconfig crond on" to enable crond in the
init scripts, so it gets automatically started when the system boots,
and you can use the command "service crond start" to start it in the
running system (i. e. without need to reboot or change runlevels).

Best regards,

Wolfgang Denk

--

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Immortality consists largely of boredom.
	-- Zefrem Cochrane, "Metamorphosis", stardate 3219.8

(Continue reading)

Germano Barreiro | 25 Feb 2010 23:28
Picon
Gravatar

crond not working

I checked if the daemon was running through a ps ax | grep cron
command. Also tried to execute it by hand with the option -n plus some
-x options.
On the other side, the script it was trying to execute has execution
permissions and, of course, I can execute it manually.
Assuming that the crond can do its job, it is really weird what is happening.

On Thu, Feb 25, 2010 at 4:44 PM, Wolfgang Denk <wd at denx.de> wrote:
> Dear Germano Barreiro,
>
> In message <681741761002250756h11d277d3o103c68b7bf32b00b at mail.gmail.com> you wrote:
>>
>> Crond is not working in my ELDK ARM based embedded installation, and I
>> cant figure out why.
>
> The reason is most probably that crond is not unning at all - at least
> in the default configuration (i. e. as ELDK installs it) it is not
> enabled.
>
> Try running the command "service crond status" - I bet it says "crond
> is stopped".
>
> You can use the command "chkconfig crond on" to enable crond in the
> init scripts, so it gets automatically started when the system boots,
> and you can use the command "service crond start" to start it in the
> running system (i. e. without need to reboot or change runlevels).
>
> Best regards,
>
> Wolfgang Denk
(Continue reading)


Gmane