Lanttor | 1 Jul 2009 04:20
Favicon

uart issues on coldfire platform

Hi,

I find one issue of UART on my coldfire platforms (mcf54451evb board).
I use the linux-2.6.29, and use drivers/serial/mcf.c and
drivers/serial/serial_core.c as my uart driver source.

Following is my test steps -- run command: cat /proc/interrupts two
times contiguously.

[root <at> freescale /]# cat /proc/interrupts
M5445X    *90:       5099 UART*
M5445X    96:       3130 timer0
M5445X    99:          0 timer3
M5445X   100:       1569 fec(TXF)
M5445X   101:          0 fec(TXB)
M5445X   102:          0 fec(TXFIFO)
M5445X   103:          0 fec(TXCR)
M5445X   104:       3098 fec(RXF)
M5445X   105:          0 fec(RXB)
M5445X   106:         41 fec(MII)
M5445X   107:          0 fec(LC)
M5445X   108:          0 fec(HBERR)
M5445X   109:          0 fec(GRA)
M5445X   110:          0 fec(EBERR)
M5445X   111:          0 fec(BABT)
M5445X   112:          0 fec(BABR)
[root <at> freescale /]# cat /proc/interrupts
M5445X    *90:       5714 UART*
M5445X    96:       3700 timer0
M5445X    99:          1 timer3
(Continue reading)

Matthew Lear | 1 Jul 2009 15:44
Picon

Re: uart issues on coldfire platform

Lanttor wrote:
> Hi,
> 
> I find one issue of UART on my coldfire platforms (mcf54451evb board).
> I use the linux-2.6.29, and use drivers/serial/mcf.c and
> drivers/serial/serial_core.c as my uart driver source.
> 
> Following is my test steps -- run command: cat /proc/interrupts two
> times contiguously.
> 
> [root <at> freescale /]# cat /proc/interrupts
> M5445X    *90:       5099 UART*
> M5445X    96:       3130 timer0
> M5445X    99:          0 timer3
> M5445X   100:       1569 fec(TXF)
> M5445X   101:          0 fec(TXB)
> M5445X   102:          0 fec(TXFIFO)
> M5445X   103:          0 fec(TXCR)
> M5445X   104:       3098 fec(RXF)
> M5445X   105:          0 fec(RXB)
> M5445X   106:         41 fec(MII)
> M5445X   107:          0 fec(LC)
> M5445X   108:          0 fec(HBERR)
> M5445X   109:          0 fec(GRA)
> M5445X   110:          0 fec(EBERR)
> M5445X   111:          0 fec(BABT)
> M5445X   112:          0 fec(BABR)
> [root <at> freescale /]# cat /proc/interrupts
> M5445X    *90:       5714 UART*
> M5445X    96:       3700 timer0
(Continue reading)

Lanttor | 1 Jul 2009 08:30
Favicon

uart issues on coldfire platform


> Hi,
>
> I find one issue of UART on my coldfire platforms (mcf54451evb board).
> I use the linux-2.6.29, and use drivers/serial/mcf.c and
> drivers/serial/serial_core.c as my uart driver source.
>
> Following is my test steps -- run command: cat /proc/interrupts two
> times contiguously.
>
> [root <at> freescale /]# cat /proc/interrupts
> M5445X    *90:       5099 UART*
> M5445X    96:       3130 timer0
> M5445X    99:          0 timer3
> M5445X   100:       1569 fec(TXF)
> M5445X   101:          0 fec(TXB)
> M5445X   102:          0 fec(TXFIFO)
> M5445X   103:          0 fec(TXCR)
> M5445X   104:       3098 fec(RXF)
> M5445X   105:          0 fec(RXB)
> M5445X   106:         41 fec(MII)
> M5445X   107:          0 fec(LC)
> M5445X   108:          0 fec(HBERR)
> M5445X   109:          0 fec(GRA)
> M5445X   110:          0 fec(EBERR)
> M5445X   111:          0 fec(BABT)
> M5445X   112:          0 fec(BABR)
> [root <at> freescale /]# cat /proc/interrupts
> M5445X    *90:       5714 UART*
> M5445X    96:       3700 timer0
(Continue reading)

Greg Ungerer | 2 Jul 2009 02:40

Re: [uClinux-dev] uart issues on coldfire platform

Hi Lanttor,

Lanttor wrote:
>> Hi,
>>
>> I find one issue of UART on my coldfire platforms (mcf54451evb board).
>> I use the linux-2.6.29, and use drivers/serial/mcf.c and
>> drivers/serial/serial_core.c as my uart driver source.
>>
>> Following is my test steps -- run command: cat /proc/interrupts two
>> times contiguously.
>>
>> [root <at> freescale /]# cat /proc/interrupts
>> M5445X    *90:       5099 UART*
>> M5445X    96:       3130 timer0
>> M5445X    99:          0 timer3
>> M5445X   100:       1569 fec(TXF)
>> M5445X   101:          0 fec(TXB)
>> M5445X   102:          0 fec(TXFIFO)
>> M5445X   103:          0 fec(TXCR)
>> M5445X   104:       3098 fec(RXF)
>> M5445X   105:          0 fec(RXB)
>> M5445X   106:         41 fec(MII)
>> M5445X   107:          0 fec(LC)
>> M5445X   108:          0 fec(HBERR)
>> M5445X   109:          0 fec(GRA)
>> M5445X   110:          0 fec(EBERR)
>> M5445X   111:          0 fec(BABT)
>> M5445X   112:          0 fec(BABR)
>> [root <at> freescale /]# cat /proc/interrupts
(Continue reading)

Lanttor | 2 Jul 2009 04:21
Favicon

Re: [uClinux-dev] uart issues on coldfire platform

Thanks Greg/Matt/Cris' reply. I know it's not the issue now :)

> Most of the ColdFire UART blocks have no transmit FIFO, so you
> are going to get 1 interrupt per character. The above block  has
> at least 500 characters in it (including white space).  Then include
> the extra command prompt and you typing (receive interrupts) and I
> would figure that is going to come to around 600 interrupts.
> So, yes, that seems about right.
>
> Check the actual character count using:
>
>   cat /proc/tty/driver/mcf 
Indeed it is. The UART transmit Buffer in my board is 1 character size
(no FIFO), only receiver has FIFO.

I test command "cat /proc/tty/driver/mcf", the result is as follows:

[root <at> freescale /]# cat /proc/tty/driver/mcf
serinfo:1.0 driver revision:
0: uart:ColdFire UART mmio:0xFC060000 irq:90 tx:54821 rx:91 RTS|DTR|CD
[root <at> freescale /]# cat /proc/interrupts
M5445X    90:      55042 UART
M5445X    96:       9962 timer
M5445X    99:          2 timer
M5445X   100:       3761 fec(TXF)
M5445X   101:          0 fec(TXB)
M5445X   102:          0 fec(TXFIFO)
M5445X   103:          0 fec(TXCR)
M5445X   104:       8169 fec(RXF)
M5445X   105:          0 fec(RXB)
(Continue reading)

Microbit_P43000 | 1 Jul 2009 13:12
Picon

port to Olimex SAM9-L9260 ( boot "fsck: fsck.jffs2: not found" message)

Hi all,

I'm new to this list and (uC)linux overall.

However, with some persistence (and great interest in uClinux :-) I got the uCLinux-dist
(20080808) ported and running smoothly on the Olimex SAM9-L9260 board
(similar to Atmel AT91SAM9260-EK).

I don't know yet how to go about patches or implementing something so my effort can be
incorporated into future versions. I expanded the Kernel config so you can select the
board there.

I should enunciate that I'm not posting to cop out on a problem, on the contrary, I want
to learn as much as possible about (uC)linux under the bonnet :-)

My actual question is about the start up and init :
The original included Linux has root file image that goes into the 512 MB Flash.
There are/were a few bizarre "error" messages on booting that I can't get rid of. Since I
now run a completely different kernel and these messages stay, they must result from some
file or script somewhere on the JFFS root image.

I have spent days on scouring through all the init.d scripts and what have you, and I
still can't find the source of these pests....

Is there anyone here that could help me, or maybe even someone that uses AT91SAM9 ?

The most bizarre message on boot I get is :
>>>>>>>>>>
Checking root file system...fsck 1.40-WIP (14-Nov-2006)
fsck: fsck.jffs2: not found
(Continue reading)

Greg Ungerer | 3 Jul 2009 07:24

Re: port to Olimex SAM9-L9260 ( boot "fsck: fsck.jffs2: not found" message)

Hi Kris,

Microbit_P43000 wrote:
> Hi all,
> 
> I'm new to this list and (uC)linux overall.
> 
> However, with some persistence (and great interest in uClinux :-) I got the uCLinux-dist
> (20080808) ported and running smoothly on the Olimex SAM9-L9260 board
> (similar to Atmel AT91SAM9260-EK).
> 
> I don't know yet how to go about patches or implementing something so my effort can be
> incorporated into future versions.

The best place to start is to read the documentation in

  linux-2.6.x/Documentation/SubmittingPatches

Regards
Greg

> I expanded the Kernel config so you can select the
> board there.
> 
> I should enunciate that I'm not posting to cop out on a problem, on the contrary, I want
> to learn as much as possible about (uC)linux under the bonnet :-)
> 
> My actual question is about the start up and init :
> The original included Linux has root file image that goes into the 512 MB Flash.
> There are/were a few bizarre "error" messages on booting that I can't get rid of. Since I
(Continue reading)

Microbit_P43000 | 3 Jul 2009 18:13
Picon

RE: port to Olimex SAM9-L9260 ( boot "fsck: fsck.jffs2:not found" message)

Hi Greg,

Thanks for reviewing.
I will absorb the submit patches issue in the near future.

Typical - with some further effort, I solved the mysterious fsck.jffs2 puzzle, it was more
a matter of looking deeper again into the scripts. Once the script has decided that e2fsck
indeed is executed, I noticed it uses file system info from fstab...
I did not know however that fsck can't process jffs2 files (in hindsight it makes perfect
sense of course since the mtd layers are needed on top of Flash for JFFS2).
To cut a long story short, the root is there as type jffs2 which results in a
concatenation of fsck with jffs2, hence the error, as this executable doesn't exist.

Well, at least I'm glad I _did_ solve it myself after all - always has been and will be
the best way to learn ! 
I just need to figure out now how to inhibit that futile fsck call, the start up error is
irritating me.. :-)

Finally, I wonder if you could clarify for me Greg : I added a kernel command parameter in
(menu)config 'fastboot', but the error still persists ?
From studying the script, I thought fastboot ensured that fsck is not run - at least not
on rootcheck ?

Best Regards,
Kris 

> -----Original Message-----
> From: uclinux-dev-bounces <at> uclinux.org [mailto:uclinux-dev-bounces <at> uclinux.org] On Behalf
Of
> Greg Ungerer
(Continue reading)

Greg Ungerer | 6 Jul 2009 10:32

Re: port to Olimex SAM9-L9260 ( boot "fsck: fsck.jffs2:not found" message)

Hi Kris,

On 07/04/2009 02:13 AM, Microbit_P43000 wrote:
> Thanks for reviewing.
> I will absorb the submit patches issue in the near future.
>
> Typical - with some further effort, I solved the mysterious fsck.jffs2 puzzle, it was more
> a matter of looking deeper again into the scripts. Once the script has decided that e2fsck
> indeed is executed, I noticed it uses file system info from fstab...
> I did not know however that fsck can't process jffs2 files (in hindsight it makes perfect
> sense of course since the mtd layers are needed on top of Flash for JFFS2).
> To cut a long story short, the root is there as type jffs2 which results in a
> concatenation of fsck with jffs2, hence the error, as this executable doesn't exist.
>
> Well, at least I'm glad I _did_ solve it myself after all - always has been and will be
> the best way to learn !
> I just need to figure out now how to inhibit that futile fsck call, the start up error is
> irritating me.. :-)
>
> Finally, I wonder if you could clarify for me Greg : I added a kernel command parameter in
> (menu)config 'fastboot', but the error still persists ?
>> From studying the script, I thought fastboot ensured that fsck is not run - at least not
> on rootcheck ?

Which "script" are your referring to?
This sounds like it is completely vendor dependant - in other
words whatever Olimex put on there.

Regards
Greg
(Continue reading)

Microbit_Ubuntu | 6 Jul 2009 11:41
Picon

Re: port to Olimex SAM9-L9260 ( boot "fsck: fsck.jffs2:not found" message)

On Mon, 2009-07-06 at 18:32 +1000, Greg Ungerer wrote:
> Hi Kris,
> 
> On 07/04/2009 02:13 AM, Microbit_P43000 wrote:
> > Thanks for reviewing.
> > I will absorb the submit patches issue in the near future.
> >
> > Typical - with some further effort, I solved the mysterious fsck.jffs2 puzzle, it was more
> > a matter of looking deeper again into the scripts. Once the script has decided that e2fsck
> > indeed is executed, I noticed it uses file system info from fstab...
> > I did not know however that fsck can't process jffs2 files (in hindsight it makes perfect
> > sense of course since the mtd layers are needed on top of Flash for JFFS2).
> > To cut a long story short, the root is there as type jffs2 which results in a
> > concatenation of fsck with jffs2, hence the error, as this executable doesn't exist.
> >
> > Well, at least I'm glad I _did_ solve it myself after all - always has been and will be
> > the best way to learn !
> > I just need to figure out now how to inhibit that futile fsck call, the start up error is
> > irritating me.. :-)
> >
> > Finally, I wonder if you could clarify for me Greg : I added a kernel command parameter in
> > (menu)config 'fastboot', but the error still persists ?
> >> From studying the script, I thought fastboot ensured that fsck is not run - at least not
> > on rootcheck ?
> 
> Which "script" are your referring to?
> This sounds like it is completely vendor dependant - in other
> words whatever Olimex put on there.
> 
> Regards
(Continue reading)

Microbit_P43000 | 1 Jul 2009 18:39
Picon

RE: port to Olimex SAM9-L9260 ( boot "fsck: fsck.jffs2:not found" message)

Oh, I should stipulate that I also went through the sources of U-boot etc.
Could it also be possible that the DataFlash "environment" section has something in it
that is read during start up ? 

Best Regards,
Kris 

> -----Original Message-----
> From: uclinux-dev-bounces <at> uclinux.org [mailto:uclinux-dev-bounces <at> uclinux.org] On Behalf
Of
> Microbit_P43000
> Sent: Wednesday, 1 July 2009 9:13 PM
> To: 'uClinux development list'
> Subject: [uClinux-dev] port to Olimex SAM9-L9260 ( boot "fsck: fsck.jffs2:not found"
message)
> 
> Hi all,
> 
> I'm new to this list and (uC)linux overall.
> 
> However, with some persistence (and great interest in uClinux :-) I got the uCLinux-dist
> (20080808) ported and running smoothly on the Olimex SAM9-L9260 board
> (similar to Atmel AT91SAM9260-EK).
> 
> I don't know yet how to go about patches or implementing something so my effort can be
> incorporated into future versions. I expanded the Kernel config so you can select the
> board there.
> 
> I should enunciate that I'm not posting to cop out on a problem, on the contrary, I want
> to learn as much as possible about (uC)linux under the bonnet :-)
(Continue reading)

microbit | 1 Jul 2009 10:47
Picon

Re: uart issues on coldfire platform

Hi,

Wouldn't the mere output on your console cause UART transmit interrupts for
each character anyway ?
(I can't imagine that the debug console is polled.. ? :-)
The amount of console data would equate to 500+ TX interrupts, so AFAIK
that would make sense.
Unless the UART has a FIFO and the code *explicitly* empties the FIFO from
within the serial ISR,
which could be -say - 16 times less interrupts.

Do I have this right ?

I wonder myself actually as I'm very new to uClinux, but I only work on
ARM9 target for the moment.
(which will be the subject of a question I would like to post, hence this
reply is also a test if I _can_
post here already :-)

Best Regards,
Kris

On Wed, 01 Jul 2009 14:30:54 +0800, Lanttor <lanttor.guo <at> freescale.com>
wrote:
>> Hi,
>>
>> I find one issue of UART on my coldfire platforms (mcf54451evb board).
>> I use the linux-2.6.29, and use drivers/serial/mcf.c and
>> drivers/serial/serial_core.c as my uart driver source.
>>
(Continue reading)


Gmane