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)

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)

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)

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)

Lanttor | 2 Jul 2009 06:07
Favicon

Interrupt issue on m68k platform and some fix

Hi,

I find one interrupt issue on my coldfire platform on linux-2.6.29
version (mcf54451evb board, mmu, NFS as rootfs).

After system boot up, I do following test:
on target board, run command: nc -l -p 3333 > /dev/null &
on host PC, run command: dd if=/dev/zero | nc 10.192.208.230 (target ip)
3333

and then I run top command on target board to check, which is shown as
follows:
CPU:  0.5% usr  0.0% sys  0.0% nice  0.0% idle  0.0% io 99.4% irq  0.0%
softirq
Load average: 0.39 0.10 0.03
  PID  PPID USER     STAT   VSZ %MEM %CPU COMMAND
  502   498 root     R     2560  2.0 97.8 nc -l -p 3333
    3     2 root     SW<      0  0.0  1.3 [ksoftirqd/0]
  503   498 root     R     2832  2.2  0.4 top
  492     1 root     S     3952  3.1  0.2 nmbd -s /etc/samba/smb.conf
  495     1 root     S     6144  4.8  0.0 smbd -s /etc/samba/smb.conf
  499   495 root     S     6144  4.8  0.0 smbd -s /etc/samba/smb.conf
  498     1 root     S     3056  2.4  0.0 -/bin/sh
  485     1 root     S     2864  2.2  0.0 /usr/sbin/inetd
    1     0 root     S     2824  2.2  0.0 init      
  468     1 root     S     2824  2.2  0.0 /sbin/syslogd
  470     1 root     S     2824  2.2  0.0 /sbin/klogd
  488     1 nobody   S     2672  2.1  0.0 /usr/sbin/boa -c /etc
  297     1 root     S <   2472  1.9  0.0 udevd --daemon
  282     2 root     SW<      0  0.0  0.0 [rpciod/0]
(Continue reading)

Greg Ungerer | 2 Jul 2009 06:36

Re: [PATCH 00/13] revised Coldfire generic GPIO (mk68nommu)

Hi Steven,

Steven King wrote:
> On Tuesday 23 June 2009 10:57:35 Greg Ungerer wrote:
>> Hi Steven,
>>
>> This looks pretty good to me.
>> Do you want me to apply the the m68knommu git tree?
>> (Ideally I'll push it to Linus in the 2.6.32 merge window).
> 
> That would be great.  There are some things I'd like to add to this (support for 
> pinmux, etc.) but that would be in the form of patches ontop of this.

I have pushed those patches into:

git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu.git for-linus

(and they are also in the "for-next" branch too).

Regards
Greg

------------------------------------------------------------------------
Greg Ungerer  --  Principal Engineer        EMAIL:     gerg <at> snapgear.com
SnapGear Group, McAfee                      PHONE:       +61 7 3435 2888
825 Stanley St,                             FAX:         +61 7 3891 3630
Woolloongabba, QLD, 4102, Australia         WEB: http://www.SnapGear.com
--
To unsubscribe from this list: send the line "unsubscribe linux-m68k" in
the body of a message to majordomo <at> vger.kernel.org
(Continue reading)

Andreas Schwab | 2 Jul 2009 10:24

Re: Interrupt issue on m68k platform and some fix

Lanttor <lanttor.guo <at> freescale.com> writes:

> My understanding of "*addql   #1,%curptr <at> (TASK_INFO+TINFO_PREEMPT+1)*"
> is that its meaning is equal to
> "current_thread_info()->preempt_count += HARDIRQ_OFFSET",

No, it isn't.  It is equivalent to
*(long *)((char *)&current_thread_info()->preempt_count + 1) += 1
which is of course completely bogus.

Andreas.

--

-- 
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."
--
To unsubscribe from this list: send the line "unsubscribe linux-m68k" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Lanttor | 2 Jul 2009 10:58
Favicon

Re: Interrupt issue on m68k platform and some fix

>
> No, it isn't.  It is equivalent to
> *(long *)((char *)&current_thread_info()->preempt_count + 1) += 1
> which is of course completely bogus.
Sorry, I think I paste the redundant character for the codes (no '*'
char at front or end of addql and subql instruction)
I paste it again:

ENTRY(inthandler)
SAVE_ALL_INT
GET_CURRENT(%d0)
addql #1,%curptr <at> (TASK_INFO+TINFO_PREEMPT+1)
/* put exception # in d0 */
movel %sp <at> (PT_VECTOR),%d0
swap %d0 /* extract bits 25:18 */
lsrl #2,%d0
andl #0x0ff,%d0

movel %sp,%sp <at> -
movel %d0,%sp <at> - /* put vector # on stack */
auto_irqhandler_fixup = . + 2
jbsr process_int /* process the IRQ */
addql #8,%sp /* pop parameters off stack */
ret_from_interrupt:

subql #1,%curptr <at> (TASK_INFO+TINFO_PREEMPT+1)
jeq ret_from_last_interrupt
2: RESTORE_ALL

ALIGN
(Continue reading)

Andreas Schwab | 2 Jul 2009 11:05

Re: Interrupt issue on m68k platform and some fix

Lanttor <lanttor.guo <at> freescale.com> writes:

> So this code sets value 1 to the second byte of preempt_count field.

No.  Byte would be addqb.

Andreas.

--

-- 
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."
--
To unsubscribe from this list: send the line "unsubscribe linux-m68k" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Gmane