* PSC in UART mode on TQM5200S
@ 2007-09-18 10:13 Leopold Stotch
2007-09-18 14:01 ` Grant Likely
2007-09-18 22:38 ` Wolfgang Denk
0 siblings, 2 replies; 6+ messages in thread
From: Leopold Stotch @ 2007-09-18 10:13 UTC (permalink / raw)
To: linuxppc-embedded
[-- Attachment #1: Type: text/plain, Size: 1673 bytes --]
Hello, everyone !
I have TQM5200S module and development board.
It runs factory UBoot and latest DENX's linuxppc_2_4_devel kernel.
I want to configure all TQM5200S's onboard PSC's as UART's.
TQM5200S's onboard PSC's are connected to custom board
that makes all electrical things as my hardware engineer says...
So changed $HOME/linuxppc_2_4_devel/arch/ppc/platforms/tqm5200.h
the following way:
#ifdef CONFIG_PS2MULT
#define RS_TABLE_SIZE 4
#else
#if defined(CONFIG_SPI_EVAL) || defined(CONFIG_TB5200)
#define RS_TABLE_SIZE 2
#elif defined(CONFIG_CAM5200)
#define RS_TABLE_SIZE 6
#else
#define RS_TABLE_SIZE 3
#endif
#endif
changed to
#ifdef CONFIG_PS2MULT
#define RS_TABLE_SIZE 4
#else
#if defined(CONFIG_SPI_EVAL) || defined(CONFIG_TB5200)
#define RS_TABLE_SIZE 2
#elif defined(CONFIG_CAM5200)
#define RS_TABLE_SIZE 6
#else
#define RS_TABLE_SIZE 6
#endif
#endif
and
#else /* default */
#define SERIAL_PORT_DFNS \
STD_PSC_OP(1) \
STD_PSC_OP(2) \
STD_PSC_OP(3)
#endif
changed to
#else /* default */
#define SERIAL_PORT_DFNS \
STD_PSC_OP(1) \
STD_PSC_OP(2) \
STD_PSC_OP(3) \
STD_PSC_OP(4) \
STD_PSC_OP(5) \
STD_PSC_OP(6)
#endif
After rebuilding the kernel, dmesg says:
...
ttyS0 on PSC1
ttyS1 on PSC2
ttyS2 on PSC3
ttyS3 on PSC4
ttyS4 on PSC5
ttyS5 on PSC6
...
But when i do "echo 1 > /dev/ttyS4" i receive nothing at the other end.
The questions are:
Is it possible to reconfigure all PSC's as UART's ?
Should i change something in UBoot or everything i did was wrong ?
P.S. Sorry for my poor english and newbie questions :-)
--
Best regards,
Leopold Stotch
[-- Attachment #2: Type: text/html, Size: 2381 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: PSC in UART mode on TQM5200S
2007-09-18 10:13 PSC in UART mode on TQM5200S Leopold Stotch
@ 2007-09-18 14:01 ` Grant Likely
2007-09-19 7:04 ` Leopold Stotch
[not found] ` <53b5d6e90709182355y17fd5965u5f212be74068442e@mail.gmail.com>
2007-09-18 22:38 ` Wolfgang Denk
1 sibling, 2 replies; 6+ messages in thread
From: Grant Likely @ 2007-09-18 14:01 UTC (permalink / raw)
To: Leopold Stotch; +Cc: linuxppc-embedded
On 9/18/07, Leopold Stotch <l.butterz@gmail.com> wrote:
> Hello, everyone !
>
> I have TQM5200S module and development board.
> It runs factory UBoot and latest DENX's linuxppc_2_4_devel kernel.
> I want to configure all TQM5200S's onboard PSC's as UART's.
> TQM5200S's onboard PSC's are connected to custom board
> that makes all electrical things as my hardware engineer says...
> So changed
> $HOME/linuxppc_2_4_devel/arch/ppc/platforms/tqm5200.h
> the following way:
>
> #ifdef CONFIG_PS2MULT
> #define RS_TABLE_SIZE 4
> #else
> #if defined(CONFIG_SPI_EVAL) || defined(CONFIG_TB5200)
> #define RS_TABLE_SIZE 2
> #elif defined(CONFIG_CAM5200)
> #define RS_TABLE_SIZE 6
> #else
> #define RS_TABLE_SIZE 3
> #endif
> #endif
>
> changed to
>
> #ifdef CONFIG_PS2MULT
> #define RS_TABLE_SIZE 4
> #else
> #if defined(CONFIG_SPI_EVAL) || defined(CONFIG_TB5200)
> #define RS_TABLE_SIZE 2
> #elif defined(CONFIG_CAM5200)
> #define RS_TABLE_SIZE 6
> #else
> #define RS_TABLE_SIZE 6
> #endif
> #endif
>
> and
>
> #else /* default */
> #define SERIAL_PORT_DFNS \
> STD_PSC_OP(1) \
> STD_PSC_OP(2) \
> STD_PSC_OP(3)
> #endif
>
> changed to
>
> #else /* default */
> #define SERIAL_PORT_DFNS \
> STD_PSC_OP(1) \
> STD_PSC_OP(2) \
> STD_PSC_OP(3) \
> STD_PSC_OP(4) \
> STD_PSC_OP(5) \
> STD_PSC_OP(6)
> #endif
>
> After rebuilding the kernel, dmesg says:
>
> ...
> ttyS0 on PSC1
> ttyS1 on PSC2
> ttyS2 on PSC3
> ttyS3 on PSC4
> ttyS4 on PSC5
> ttyS5 on PSC6
> ...
>
> But when i do "echo 1 > /dev/ttyS4" i receive nothing at the other end.
Have you made the appropriate changes to the port_config register?
Cheers,
g.
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
grant.likely@secretlab.ca
(403) 399-0195
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: PSC in UART mode on TQM5200S
2007-09-18 10:13 PSC in UART mode on TQM5200S Leopold Stotch
2007-09-18 14:01 ` Grant Likely
@ 2007-09-18 22:38 ` Wolfgang Denk
2007-09-19 7:40 ` Leopold Stotch
1 sibling, 1 reply; 6+ messages in thread
From: Wolfgang Denk @ 2007-09-18 22:38 UTC (permalink / raw)
To: Leopold Stotch; +Cc: linuxppc-embedded
In message <53b5d6e90709180313n7ef053ddqfb771f44d9bd44ef@mail.gmail.com> you wrote:
>
> So changed $HOME/linuxppc_2_4_devel/arch/ppc/platforms/tqm5200.h
> the following way:
Well, you have to unserstand *exactly* what the CPU and the board are
doing - the MPC5200 has multiplexed pins, and if you select one
function you lose a few others, so you must carefully check for
conflicts. Probably you will have to disable some other functions.
Also you have to usnerstand what the board is designed like - some
ports have specific and reserved functions.
Finally, there are such things like wrong baud rate on a serial port
which may make you think it's not working while you are just using bad
user mode settings.
> Is it possible to reconfigure all PSC's as UART's ?
Yes, it is. But you have to know what you are doing.
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@denx.de
All a hacker needs is a tight PUSHJ, a loose pair of UUOs, and a warm
place to shift.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: PSC in UART mode on TQM5200S
2007-09-18 14:01 ` Grant Likely
@ 2007-09-19 7:04 ` Leopold Stotch
[not found] ` <53b5d6e90709182355y17fd5965u5f212be74068442e@mail.gmail.com>
1 sibling, 0 replies; 6+ messages in thread
From: Leopold Stotch @ 2007-09-19 7:04 UTC (permalink / raw)
To: Grant Likely; +Cc: linuxppc-embedded
Thank you for the answer, Grant !
I knew nothing about port_config register before your answer :-(
I haven't changed any processor registers yet
because i'm still searching where i can do this.
Can you tell me, is it UBoot specific or kernel specific or both ?
And i already know about MPC5200's device tree in 2.6.x kernel but not
in 2.4.x...
On 9/18/07, Grant Likely <grant.likely@secretlab.ca> wrote:
> On 9/18/07, Leopold Stotch <l.butterz@gmail.com> wrote:
> > Hello, everyone !
> >
> > I have TQM5200S module and development board.
> > It runs factory UBoot and latest DENX's linuxppc_2_4_devel kernel.
> > I want to configure all TQM5200S's onboard PSC's as UART's.
> > TQM5200S's onboard PSC's are connected to custom board
> > that makes all electrical things as my hardware engineer says...
> > So changed
> > $HOME/linuxppc_2_4_devel/arch/ppc/platforms/tqm5200.h
> > the following way:
> >
> > #ifdef CONFIG_PS2MULT
> > #define RS_TABLE_SIZE 4
> > #else
> > #if defined(CONFIG_SPI_EVAL) || defined(CONFIG_TB5200)
> > #define RS_TABLE_SIZE 2
> > #elif defined(CONFIG_CAM5200)
> > #define RS_TABLE_SIZE 6
> > #else
> > #define RS_TABLE_SIZE 3
> > #endif
> > #endif
> >
> > changed to
> >
> > #ifdef CONFIG_PS2MULT
> > #define RS_TABLE_SIZE 4
> > #else
> > #if defined(CONFIG_SPI_EVAL) || defined(CONFIG_TB5200)
> > #define RS_TABLE_SIZE 2
> > #elif defined(CONFIG_CAM5200)
> > #define RS_TABLE_SIZE 6
> > #else
> > #define RS_TABLE_SIZE 6
> > #endif
> > #endif
> >
> > and
> >
> > #else /* default */
> > #define SERIAL_PORT_DFNS \
> > STD_PSC_OP(1) \
> > STD_PSC_OP(2) \
> > STD_PSC_OP(3)
> > #endif
> >
> > changed to
> >
> > #else /* default */
> > #define SERIAL_PORT_DFNS \
> > STD_PSC_OP(1) \
> > STD_PSC_OP(2) \
> > STD_PSC_OP(3) \
> > STD_PSC_OP(4) \
> > STD_PSC_OP(5) \
> > STD_PSC_OP(6)
> > #endif
> >
> > After rebuilding the kernel, dmesg says:
> >
> > ...
> > ttyS0 on PSC1
> > ttyS1 on PSC2
> > ttyS2 on PSC3
> > ttyS3 on PSC4
> > ttyS4 on PSC5
> > ttyS5 on PSC6
> > ...
> >
> > But when i do "echo 1 > /dev/ttyS4" i receive nothing at the other end.
>
> Have you made the appropriate changes to the port_config register?
>
> Cheers,
> g.
>
>
>
> --
> Grant Likely, B.Sc., P.Eng.
> Secret Lab Technologies Ltd.
> grant.likely@secretlab.ca
> (403) 399-0195
>
--
Best regards,
Leopold Stotch
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: PSC in UART mode on TQM5200S
2007-09-18 22:38 ` Wolfgang Denk
@ 2007-09-19 7:40 ` Leopold Stotch
0 siblings, 0 replies; 6+ messages in thread
From: Leopold Stotch @ 2007-09-19 7:40 UTC (permalink / raw)
To: Wolfgang Denk; +Cc: linuxppc-embedded
Thank you for the answer, Wolfgang !
Yes, we made a custom board which implements UART's
instead of USB, keyboard, mouse and others...
I checked the baudrate and i think it's ok.
Can you tell me, please, is there any HOWTO about MPC5200's
PSC's reconfiguration or something for newbies ?
On 9/19/07, Wolfgang Denk <wd@denx.de> wrote:
> In message <53b5d6e90709180313n7ef053ddqfb771f44d9bd44ef@mail.gmail.com> you wrote:
> >
> > So changed $HOME/linuxppc_2_4_devel/arch/ppc/platforms/tqm5200.h
> > the following way:
>
> Well, you have to unserstand *exactly* what the CPU and the board are
> doing - the MPC5200 has multiplexed pins, and if you select one
> function you lose a few others, so you must carefully check for
> conflicts. Probably you will have to disable some other functions.
> Also you have to usnerstand what the board is designed like - some
> ports have specific and reserved functions.
>
> Finally, there are such things like wrong baud rate on a serial port
> which may make you think it's not working while you are just using bad
> user mode settings.
>
> > Is it possible to reconfigure all PSC's as UART's ?
>
> Yes, it is. But you have to know what you are doing.
>
>
> 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@denx.de
> All a hacker needs is a tight PUSHJ, a loose pair of UUOs, and a warm
> place to shift.
>
--
Best regards,
Leopold Stotch
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: PSC in UART mode on TQM5200S
[not found] ` <fa686aa40709190733ufd38f1fx7771bd0e98376081@mail.gmail.com>
@ 2007-09-19 14:50 ` Leopold Stotch
0 siblings, 0 replies; 6+ messages in thread
From: Leopold Stotch @ 2007-09-19 14:50 UTC (permalink / raw)
To: Grant Likely; +Cc: linuxppc-embedded
Thanks, i'll try the both ways.
I'm still afraid of killing factory UBoot without
BDI2000 or working X30 jumper :-)
On 9/19/07, Grant Likely <grant.likely@secretlab.ca> wrote:
> On 9/19/07, Leopold Stotch <l.butterz@gmail.com> wrote:
> > Thank you for the answer, Grant !
> > I knew nothing about port_config register before your answer :-(
> > I haven't changed any processor registers yet
> > because i'm still searching where i can do this.
> > Can you tell me, is it UBoot specific or kernel specific or both ?
> > And i already know about MPC5200's device tree in 2.6.x kernel but not in
> > 2.4.x...
>
> It is best to do it in u-boot; but if you cannot (or don't want to)
> change your u-boot image, then you can fix up the port_config value
> during early kernel boot.
>
> Cheers,
> g.
>
> --
> Grant Likely, B.Sc., P.Eng.
> Secret Lab Technologies Ltd.
> grant.likely@secretlab.ca
> (403) 399-0195
>
--
Best regards,
Leopold Stotch
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-09-19 14:50 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-18 10:13 PSC in UART mode on TQM5200S Leopold Stotch
2007-09-18 14:01 ` Grant Likely
2007-09-19 7:04 ` Leopold Stotch
[not found] ` <53b5d6e90709182355y17fd5965u5f212be74068442e@mail.gmail.com>
[not found] ` <fa686aa40709190733ufd38f1fx7771bd0e98376081@mail.gmail.com>
2007-09-19 14:50 ` Leopold Stotch
2007-09-18 22:38 ` Wolfgang Denk
2007-09-19 7:40 ` Leopold Stotch
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).