linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* MPC8xx + serial console on SCC
@ 2001-10-19 15:39 Geoff Wyche
  2001-10-19 15:58 ` Peter Desnoyers
  2001-10-19 16:05 ` Wolfgang Denk
  0 siblings, 2 replies; 7+ messages in thread
From: Geoff Wyche @ 2001-10-19 15:39 UTC (permalink / raw)
  To: 'linuxppc-embedded@lists.linuxppc.org'


Is anyone here working on an 8xx based board and using an SCC for serial
console?

I've been working on some patches for it, and would like to compare notes.

The board I'm working with is a custom board that uses an 860T.  The
particular difficulties I'm having are very much related to serial console
IO on an SCC.  After following linuxppc-embedded for a while, it seems use
of SCCs for serial is in the minority of configurations out there.

Comments?

--Geoff
gwyche@datum.com

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: MPC8xx + serial console on SCC
  2001-10-19 15:39 MPC8xx + serial console on SCC Geoff Wyche
@ 2001-10-19 15:58 ` Peter Desnoyers
  2001-10-19 16:05 ` Wolfgang Denk
  1 sibling, 0 replies; 7+ messages in thread
From: Peter Desnoyers @ 2001-10-19 15:58 UTC (permalink / raw)
  To: Geoff Wyche; +Cc: 'linuxppc-embedded@lists.linuxppc.org'


I'm using it too - SCC2 in particular.

KGDB is broken.  Basic I/O worked OK with almost no work (starting from
HHL2.0) but modem control took some extra code.

Geoff Wyche wrote:
>
> Is anyone here working on an 8xx based board and using an SCC for serial
> console?
>
> I've been working on some patches for it, and would like to compare notes.
>
> The board I'm working with is a custom board that uses an 860T.  The
> particular difficulties I'm having are very much related to serial console
> IO on an SCC.  After following linuxppc-embedded for a while, it seems use
> of SCCs for serial is in the minority of configurations out there.
>
> Comments?
>
> --Geoff
> gwyche@datum.com
>

--
.....................................................................
 Peter Desnoyers            (781) 457-1165   pdesnoyers@chinook.com
 Chinook Communications     (617) 661-1979   pjd@fred.cambridge.ma.us
 100 Hayden Ave, Lexington MA 02421

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: MPC8xx + serial console on SCC
  2001-10-19 15:39 MPC8xx + serial console on SCC Geoff Wyche
  2001-10-19 15:58 ` Peter Desnoyers
@ 2001-10-19 16:05 ` Wolfgang Denk
  2001-10-19 23:00   ` Tom Rini
  1 sibling, 1 reply; 7+ messages in thread
From: Wolfgang Denk @ 2001-10-19 16:05 UTC (permalink / raw)
  To: Geoff Wyche; +Cc: 'linuxppc-embedded@lists.linuxppc.org'


Hi Geoff,

in message <607BF0A2B4F3D411A09500508BC225427E8328@mailctx.datum.com> you wrote:
>
> Is anyone here working on an 8xx based board and using an SCC for serial
> console?

Yes, we've tested this configuration once when we were re-working the
UART driver for hardware-handshake support, configurable buffer sizes
etc.

We tested all 6 channels ( 2 x SMC, 4 x SCC) on a IP860 board.

> Comments?

See the version of the UART driver in the kernel source tree  on  our
FTP  server; I've sent patches against 2_4_devel to Tom Rini, waiting
for a decision if these patches will make it into the official source
tree...

Wolfgang Denk

--
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd@denx.de
All these theories, diverse as they are, have two things  in  common:
they explain the observed facts, and they are completeley and utterly
wrong.                       - Terry Pratchett, _The Light Fantastic_

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: MPC8xx + serial console on SCC
@ 2001-10-19 20:08 Geoff Wyche
  2001-10-19 23:07 ` Tom Rini
  0 siblings, 1 reply; 7+ messages in thread
From: Geoff Wyche @ 2001-10-19 20:08 UTC (permalink / raw)
  To: 'linuxppc-embedded@lists.linuxppc.org'


Hello all,

> Yes, we've tested this configuration once when we were re-working the
> UART driver for hardware-handshake support, configurable buffer sizes
> etc.
> We tested all 6 channels ( 2 x SMC, 4 x SCC) on a IP860 board.

I think I've found a bug related to SCCs and serial console IO.
Looks like this might have crept in as a result of two transposed lines.
A patch showing the difference is included at the end of this post.

> See the version of the UART driver in the kernel source tree  on  our
> FTP  server; I've sent patches against 2_4_devel to Tom Rini, waiting
> for a decision if these patches will make it into the official source
> tree...

Are you referring to ftp.denx.de or ftp.linuxppc.org?  I went to both and
couldn't find a kernel source tree in either of them.  Can you give me a
specific URL?

--Geoff
gwyche@datum.com


Here's the patch I mentioned (NOTE that it really only transposes two
lines):

*** arch/ppc/8xx_io/uart.c.ORIG Fri Oct 19 14:34:11 2001
--- arch/ppc/8xx_io/uart.c      Fri Oct 19 14:35:53 2001
***************
*** 1129,1142 ****
        idx = PORT_NUM(state->smc_scc_num);
        if (state->smc_scc_num & NUM_IS_SCC) {
                sccp = &cpmp->cp_scc[idx];
!               sccp->scc_gsmrl &= ~(SCC_GSMRL_ENR | SCC_GSMRL_ENT);
  #ifdef CONFIG_SERIAL_CONSOLE
                /* We can't disable the transmitter if this is the
                 * system console.
                 */
                if ((state - rs_table) != CONFIG_SERIAL_CONSOLE_PORT)
  #endif
!                       sccp->scc_sccm &= ~(UART_SCCM_TX | UART_SCCM_RX);
        }
        else {
                smcp = &cpmp->cp_smc[idx];
--- 1129,1142 ----
        idx = PORT_NUM(state->smc_scc_num);
        if (state->smc_scc_num & NUM_IS_SCC) {
                sccp = &cpmp->cp_scc[idx];
!               sccp->scc_sccm &= ~(UART_SCCM_TX | UART_SCCM_RX);
  #ifdef CONFIG_SERIAL_CONSOLE
                /* We can't disable the transmitter if this is the
                 * system console.
                 */
                if ((state - rs_table) != CONFIG_SERIAL_CONSOLE_PORT)
  #endif
!                   sccp->scc_gsmrl &= ~(SCC_GSMRL_ENR | SCC_GSMRL_ENT);
        }
        else {
                smcp = &cpmp->cp_smc[idx];


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: MPC8xx + serial console on SCC
@ 2001-10-19 20:24 Geoff Wyche
  0 siblings, 0 replies; 7+ messages in thread
From: Geoff Wyche @ 2001-10-19 20:24 UTC (permalink / raw)
  To: 'linuxppc-embedded@lists.linuxppc.org'


Forgot to mention, that patch was created against linux-2.4.4-2001-07-23
from ftp.denx.de, but the same bug appears in linuxppc kernels through
linux-2.4.12

--Geoff
gwyche@datum.com

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: MPC8xx + serial console on SCC
  2001-10-19 16:05 ` Wolfgang Denk
@ 2001-10-19 23:00   ` Tom Rini
  0 siblings, 0 replies; 7+ messages in thread
From: Tom Rini @ 2001-10-19 23:00 UTC (permalink / raw)
  To: Wolfgang Denk; +Cc: Geoff Wyche, 'linuxppc-embedded@lists.linuxppc.org'


On Fri, Oct 19, 2001 at 06:05:52PM +0200, Wolfgang Denk wrote:

> See the version of the UART driver in the kernel source tree  on  our
> FTP  server; I've sent patches against 2_4_devel to Tom Rini, waiting
> for a decision if these patches will make it into the official source
> tree...

Just as an FYI to everyone, these look OK to me, and I'll try and put
them in the 2_4_devel tree, once I get the current stuff that's there
and seemingly stable out into the 2_4 tree.

--
Tom Rini (TR1265)
http://gate.crashing.org/~trini/

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: MPC8xx + serial console on SCC
  2001-10-19 20:08 Geoff Wyche
@ 2001-10-19 23:07 ` Tom Rini
  0 siblings, 0 replies; 7+ messages in thread
From: Tom Rini @ 2001-10-19 23:07 UTC (permalink / raw)
  To: Geoff Wyche; +Cc: 'linuxppc-embedded@lists.linuxppc.org'


On Fri, Oct 19, 2001 at 01:08:34PM -0700, Geoff Wyche wrote:
>
> Hello all,
>
> > Yes, we've tested this configuration once when we were re-working the
> > UART driver for hardware-handshake support, configurable buffer sizes
> > etc.
> > We tested all 6 channels ( 2 x SMC, 4 x SCC) on a IP860 board.
>
> I think I've found a bug related to SCCs and serial console IO.
> Looks like this might have crept in as a result of two transposed lines.
> A patch showing the difference is included at the end of this post.

Grr, I hate reading diff -c's.  If I'm reading it right, you say it
should be:
sccp->scc_gsmrl &= ~(UART_SCCM_TX | UART_SCCM_RX);
#ifdef CONFIG_SERIAL_CONSOLE
...

Right?

--
Tom Rini (TR1265)
http://gate.crashing.org/~trini/

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2001-10-19 23:07 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-10-19 15:39 MPC8xx + serial console on SCC Geoff Wyche
2001-10-19 15:58 ` Peter Desnoyers
2001-10-19 16:05 ` Wolfgang Denk
2001-10-19 23:00   ` Tom Rini
  -- strict thread matches above, loose matches on Subject: below --
2001-10-19 20:08 Geoff Wyche
2001-10-19 23:07 ` Tom Rini
2001-10-19 20:24 Geoff Wyche

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).