* powerpc port for sbc8260-based board problem
@ 2008-05-07 8:31 Boris Shteinbock
2008-05-07 17:38 ` Sergej Stepanov
2008-05-07 18:22 ` Scott Wood
0 siblings, 2 replies; 13+ messages in thread
From: Boris Shteinbock @ 2008-05-07 8:31 UTC (permalink / raw)
To: linuxppc-dev
Hi.
I am doing a port from ppc to powerpc ARCH on sbc8260 based board.
The problem is, that I can't get SMC1 UART to work.
After SMC console is initialized.
cpm_uart_console_write() hangs here
/* Wait for transmitter fifo to empty.
* Ready indicates output is ready, and xmt is doing
* that, not that it is ready for us to send.
*/
while ((in_be16(&bdp->cbd_sc) & BD_SC_READY) != 0)
;
I am using dts tree modified from ep8248 port since it is the only one that has smc description in it. :
brg@119f0 {
compatible = "fsl,mpc8260-brg",
"fsl,cpm2-brg",
"fsl,cpm-brg";
reg = <119f0 10 115f0 10>;
clock-frequency = <135000000>;
};
/* Monitor port/SMC1 */
smc1: serial@11a80 {
device_type = "serial";
compatible = "fsl,mpc8260-smc-uart",
"fsl,cpm2-smc-uart";
reg = <0x11a80 0x20 0x1100 0x40>;
interrupts = <4 8>;
interrupt-parent = <&PIC>;
fsl,cpm-brg = <1>;
fsl,cpm-command = <0x1d000000>;
linux,my-label = "SMC1";
};
I checked a BRG settings against working u-boot configuration and they are the same. Anyway a wrong BRG setting wouldn't hang this loop
So I have a few questions.
If someone has done sbc8260 dts tree and port to "powerpc" already, I'd be very grateful if he can share it with me.
I couldn't find anything on the internet.
Can someone, also, explain, how "fsl, cpm-command" field works, booting-without-of document doesn't provide much information.
I feel, that just copying this value from ep8248.dts isn't right somehow.
Thank you
____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: powerpc port for sbc8260-based board problem
2008-05-07 8:31 powerpc port for sbc8260-based board problem Boris Shteinbock
@ 2008-05-07 17:38 ` Sergej Stepanov
2008-05-07 18:22 ` Scott Wood
1 sibling, 0 replies; 13+ messages in thread
From: Sergej Stepanov @ 2008-05-07 17:38 UTC (permalink / raw)
To: Boris Shteinbock; +Cc: linuxppc-dev
Hallo.
I had the same problem.
The following patch can help.
diff -pruN paulus-git/drivers/serial/cpm_uart/cpm_uart_core.c linuxppc-2.6.=
24-ids8247/drivers/serial/cpm_uart/cpm_uart_core.c
--- paulus-git/drivers/serial/cpm_uart/cpm_uart_core.c 2008-03-28 11:03:32.=
000000000 +0100
+++ linuxppc-2.6.24-ids8247/drivers/serial/cpm_uart/cpm_uart_core.c 2008-05=
-07 19:35:21.000000000 +0200
@@ -1350,6 +1349,9 @@ static int __init cpm_uart_console_setup
uart_set_options(port, co, baud, parity, bits, flow);
cpm_line_cr_cmd(pinfo, CPM_CR_RESTART_TX);
=20
+#ifndef CONFIG_PPC_EARLY_DEBUG_CPM
+ cpm_set_brg(pinfo->brg - 1, baud);
+#endif
return 0;
}
=20
Regards
Sergej.
Am Mittwoch, den 07.05.2008, 01:31 -0700 schrieb Boris Shteinbock:
> Hi.
> I am doing a port from ppc to powerpc ARCH on sbc8260 based board.
> The problem is, that I can't get SMC1 UART to work.
> After SMC console is initialized. =20
> cpm_uart_console_write() hangs here
>=20
> /* Wait for transmitter fifo to empty.
> * Ready indicates output is ready, and xmt is doing
> * that, not that it is ready for us to send.
> */
> while ((in_be16(&bdp->cbd_sc) & BD_SC_READY) !=3D 0)
> ;
>=20
> I am using dts tree modified from ep8248 port since it is the only one t=
hat has smc description in it. :
>=20
>=20
> brg@119f0 {
> compatible =3D "fsl,mpc8260-brg",
> "fsl,cpm2-brg",
> "fsl,cpm-brg";
> reg =3D <119f0 10 115f0 10>;
> clock-frequency =3D <135000000>;
> =20
> };
>=20
> /* Monitor port/SMC1 */
> smc1: serial@11a80 {
> device_type =3D "serial";
> compatible =3D "fsl,mpc8260-smc-uart",
> "fsl,cpm2-smc-uart";
> reg =3D <0x11a80 0x20 0x1100 0x40>;
> interrupts =3D <4 8>;
> interrupt-parent =3D <&PIC>;
> fsl,cpm-brg =3D <1>;
> fsl,cpm-command =3D <0x1d000000>;
> linux,my-label =3D "SMC1";
> };
>=20
> I checked a BRG settings against working u-boot configuration and they ar=
e the same. Anyway a wrong BRG setting wouldn't hang this loop
>=20
> So I have a few questions.
> If someone has done sbc8260 dts tree and port to "powerpc" already, I'd b=
e very grateful if he can share it with me.
> I couldn't find anything on the internet.
>=20
> Can someone, also, explain, how "fsl, cpm-command" field works, booting-=
without-of document doesn't provide much information.
> I feel, that just copying this value from ep8248.dts isn't right somehow.
>=20
> Thank you
>=20
>=20
> ___________________________________________________________________=
_________________
> Be a better friend, newshound, and=20
> know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_y=
lt=3DAhu06i62sR8HDtDypao8Wcj9tAcJ
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev
--=20
Dipl.-Ing. Sergej Stepanov=20
Software-Entwicklung
IDS GmbH=20
E-PA (Entwicklung - Prozess Automatisierung)
Nobelstr. 18,=20
D-76275 Ettlingen=20
T. (0) 72 43/2 18-615=20
F. (0) 72 43/2 18-100=20
E. Sergej.Stepanov@ids.de
<http://www.ids.de>
Gesch=C3=A4ftsf=C3=BChrer: Norbert Wagner, Friedrich Abri=C3=9F=20
Sitz der Gesellschaft: Ettlingen=20
Amtsgericht Mannheim HRB 362503=20
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: powerpc port for sbc8260-based board problem
2008-05-07 8:31 powerpc port for sbc8260-based board problem Boris Shteinbock
2008-05-07 17:38 ` Sergej Stepanov
@ 2008-05-07 18:22 ` Scott Wood
2008-05-07 18:40 ` Sergej Stepanov
1 sibling, 1 reply; 13+ messages in thread
From: Scott Wood @ 2008-05-07 18:22 UTC (permalink / raw)
To: Boris Shteinbock; +Cc: linuxppc-dev
On Wed, May 07, 2008 at 01:31:52AM -0700, Boris Shteinbock wrote:
> /* Monitor port/SMC1 */
> smc1: serial@11a80 {
> device_type = "serial";
> compatible = "fsl,mpc8260-smc-uart",
> "fsl,cpm2-smc-uart";
> reg = <0x11a80 0x20 0x1100 0x40>;
The second reg resource depends on where your firmware set up the SMC pram
regs. With U-boot, it's usually zero.
Note that as of 2.6.26-rc1, this is set up dynamically instead, and the
second resource should be 0x87fc 2.
> Can someone, also, explain, how "fsl, cpm-command" field works,
It's the device-specific portion of the value that gets written to the CPM
command register (page, sub-block, and mcc channel).
> booting-without-of document doesn't provide much information. I feel, that
> just copying this value from ep8248.dts isn't right somehow.
It should be the same.
-Scott
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: powerpc port for sbc8260-based board problem
2008-05-07 18:22 ` Scott Wood
@ 2008-05-07 18:40 ` Sergej Stepanov
2008-05-07 18:57 ` Scott Wood
0 siblings, 1 reply; 13+ messages in thread
From: Sergej Stepanov @ 2008-05-07 18:40 UTC (permalink / raw)
To: Scott Wood; +Cc: linuxppc-dev
Hello Scott
Am Mittwoch, den 07.05.2008, 13:22 -0500 schrieb Scott Wood:
> On Wed, May 07, 2008 at 01:31:52AM -0700, Boris Shteinbock wrote:
> > /* Monitor port/SMC1 */
> > smc1: serial@11a80 {
> > device_type =3D "serial";
> > compatible =3D "fsl,mpc8260-smc-uart",
> > "fsl,cpm2-smc-uart";
> > reg =3D <0x11a80 0x20 0x1100 0x40>;
>=20
> The second reg resource depends on where your firmware set up the SMC pra=
m
> regs. With U-boot, it's usually zero.
>=20
> Note that as of 2.6.26-rc1, this is set up dynamically instead, and the
> second resource should be 0x87fc 2.
>=20
You are right with 0x87fc. It is one more point.
Also if your brg clock-frequency-property was correctly fixed from
u-boot.
My story is follow: we have mpc8247 based card.
The problem with smc happens due to the cpm reset.
Of course, if you have not CONFIG_PPC_EARLY_DEBUG_CPM with
CONFIG_PPC_CPM_NEW_BINDING.
May be it is some kind of mistake, but i could fix the problem with the
patch i told above.
Could give me some your note, please? Thank you.
Regards
Sergej.
--=20
Dipl.-Ing. Sergej Stepanov=20
Software-Entwicklung
IDS GmbH=20
E-PA (Entwicklung - Prozess Automatisierung)
Nobelstr. 18,=20
D-76275 Ettlingen=20
T. (0) 72 43/2 18-615=20
F. (0) 72 43/2 18-100=20
E. Sergej.Stepanov@ids.de
<http://www.ids.de>
Gesch=C3=A4ftsf=C3=BChrer: Norbert Wagner, Friedrich Abri=C3=9F=20
Sitz der Gesellschaft: Ettlingen=20
Amtsgericht Mannheim HRB 362503=20
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: powerpc port for sbc8260-based board problem
2008-05-07 18:40 ` Sergej Stepanov
@ 2008-05-07 18:57 ` Scott Wood
2008-05-07 19:26 ` Sergej Stepanov
0 siblings, 1 reply; 13+ messages in thread
From: Scott Wood @ 2008-05-07 18:57 UTC (permalink / raw)
To: Sergej Stepanov; +Cc: linuxppc-dev
Sergej Stepanov wrote:
> My story is follow: we have mpc8247 based card.
> The problem with smc happens due to the cpm reset.
> Of course, if you have not CONFIG_PPC_EARLY_DEBUG_CPM with
> CONFIG_PPC_CPM_NEW_BINDING.
> May be it is some kind of mistake, but i could fix the problem with the
> patch i told above.
> Could give me some your note, please? Thank you.
I'm not sure how it would make a difference -- the BRG should have
already been set through the set_termios callback, which is called from
uart_set_options.
-Scott
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: powerpc port for sbc8260-based board problem
2008-05-07 18:57 ` Scott Wood
@ 2008-05-07 19:26 ` Sergej Stepanov
2008-05-07 19:34 ` Scott Wood
0 siblings, 1 reply; 13+ messages in thread
From: Sergej Stepanov @ 2008-05-07 19:26 UTC (permalink / raw)
To: Scott Wood; +Cc: linuxppc-dev
Am Mittwoch, den 07.05.2008, 13:57 -0500 schrieb Scott Wood:
> Sergej Stepanov wrote:
> > My story is follow: we have mpc8247 based card.
> > The problem with smc happens due to the cpm reset.
> > Of course, if you have not CONFIG_PPC_EARLY_DEBUG_CPM with
> > CONFIG_PPC_CPM_NEW_BINDING.
> > May be it is some kind of mistake, but i could fix the problem with the
> > patch i told above.
> > Could give me some your note, please? Thank you.
>
> I'm not sure how it would make a difference -- the BRG should have
> already been set through the set_termios callback, which is called from
> uart_set_options.
>
> -Scott
Yes, i thought it also, but i traced it for us for the uart console.
The cpm_uart_set_termios(..) was not called.
At which place should it be called?
Is it uart_set_options(..)?
Sergej.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: powerpc port for sbc8260-based board problem
2008-05-07 19:26 ` Sergej Stepanov
@ 2008-05-07 19:34 ` Scott Wood
2008-05-07 19:40 ` Sergej Stepanov
0 siblings, 1 reply; 13+ messages in thread
From: Scott Wood @ 2008-05-07 19:34 UTC (permalink / raw)
To: Sergej Stepanov; +Cc: linuxppc-dev
Sergej Stepanov wrote:
> Am Mittwoch, den 07.05.2008, 13:57 -0500 schrieb Scott Wood:
>> I'm not sure how it would make a difference -- the BRG should have
>> already been set through the set_termios callback, which is called from
>> uart_set_options.
>>
>> -Scott
> Yes, i thought it also, but i traced it for us for the uart console.
> The cpm_uart_set_termios(..) was not called.
> At which place should it be called?
> Is it uart_set_options(..)?
Yes, uart_set_options() calls port->ops->set_termios().
-Scott
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: powerpc port for sbc8260-based board problem
2008-05-07 19:34 ` Scott Wood
@ 2008-05-07 19:40 ` Sergej Stepanov
2008-05-07 19:42 ` Scott Wood
0 siblings, 1 reply; 13+ messages in thread
From: Sergej Stepanov @ 2008-05-07 19:40 UTC (permalink / raw)
To: Scott Wood; +Cc: linuxppc-dev
Am Mittwoch, den 07.05.2008, 14:34 -0500 schrieb Scott Wood:
> Sergej Stepanov wrote:
> > Am Mittwoch, den 07.05.2008, 13:57 -0500 schrieb Scott Wood:
> >> I'm not sure how it would make a difference -- the BRG should have
> >> already been set through the set_termios callback, which is called from
> >> uart_set_options.
> >>
> >> -Scott
> > Yes, i thought it also, but i traced it for us for the uart console.
> > The cpm_uart_set_termios(..) was not called.
> > At which place should it be called?
> > Is it uart_set_options(..)?
>
> Yes, uart_set_options() calls port->ops->set_termios().
>
> -Scott
Hm... it looks like the default uart_set_termios from
static const struct tty_operations uart_ops in serial_core.c
and not cpm_uart_set_termios(..)?..
Is not it? but why?...
Ok, i have to look at my code again...
Regards.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: powerpc port for sbc8260-based board problem
@ 2008-05-07 18:42 Boris Shteinbock
2008-05-07 18:53 ` Scott Wood
0 siblings, 1 reply; 13+ messages in thread
From: Boris Shteinbock @ 2008-05-07 18:42 UTC (permalink / raw)
To: Scott Wood; +Cc: linuxppc-dev
On Wed, May 07, 2008 at 01:31:52AM -0700, Boris Shteinbock wrote:
> /* Monitor port/SMC1 */
> smc1: serial@11a80 {
> device_type = "serial";
> compatible = "fsl,mpc8260-smc-uart",
> "fsl,cpm2-smc-uart";
> reg = <0x11a80 0x20 0x1100 0x40>;
>The second reg resource depends on where your firmware set up the SMC pram
>regs. With U-boot, it's usually zero.
>Note that as of 2.6.26-rc1, this is set up dynamically instead, and the
>second resource should be .
Is this correct?
reg = <0x11a80 0x20 0x87fc 2>;
I also understand, that latest development kernel contains some significant changes in SMC UART code, especially
in muram code, is this correct? So does this reg value reflect this change?
>> Can someone, also, explain, how "fsl, cpm-command" field works,
>It's the device-specific portion of the value that gets written to the CPM
>command register (page, sub-block, and mcc channel).
Is it possible to get a quick list of all values for all 8260 soc devices somewhere ? Or do I have to dig specific Freescale reference for it?
I am particularly interested in SMC2 and FCC1,2 and 3 ?
Thank you very much
____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: powerpc port for sbc8260-based board problem
2008-05-07 18:42 Boris Shteinbock
@ 2008-05-07 18:53 ` Scott Wood
0 siblings, 0 replies; 13+ messages in thread
From: Scott Wood @ 2008-05-07 18:53 UTC (permalink / raw)
To: Boris Shteinbock; +Cc: linuxppc-dev
Boris Shteinbock wrote:
>> The second reg resource depends on where your firmware set up the SMC pram
>> regs. With U-boot, it's usually zero.
>
>> Note that as of 2.6.26-rc1, this is set up dynamically instead, and the
>> second resource should be .
> Is this correct?
>
> reg = <0x11a80 0x20 0x87fc 2>;
Yes.
> I also understand, that latest development kernel contains some significant changes in SMC UART code, especially
> in muram code, is this correct? So does this reg value reflect this change?
Yes, those are the changes I was referring to.
>>> Can someone, also, explain, how "fsl, cpm-command" field works,
>
>> It's the device-specific portion of the value that gets written to the CPM
>> command register (page, sub-block, and mcc channel).
>
> Is it possible to get a quick list of all values for all 8260 soc devices somewhere ? Or do I have to dig specific Freescale reference for it?
See table 13-6 (CP Command Register Field Descriptions) in the 8260 manual.
> I am particularly interested in SMC2 and FCC1,2 and 3 ?
SMC2: 0x21200000
FCC1: 0x12000000 (ATM 0x11c00280)
FCC2: 0x16200000 (ATM 0x15c00280)
FCC3: 0x1a400000
For FCCs, add 0x300 for Ethernet, 0x3c0 for transparent.
-Scott
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2008-05-08 6:22 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-07 8:31 powerpc port for sbc8260-based board problem Boris Shteinbock
2008-05-07 17:38 ` Sergej Stepanov
2008-05-07 18:22 ` Scott Wood
2008-05-07 18:40 ` Sergej Stepanov
2008-05-07 18:57 ` Scott Wood
2008-05-07 19:26 ` Sergej Stepanov
2008-05-07 19:34 ` Scott Wood
2008-05-07 19:40 ` Sergej Stepanov
2008-05-07 19:42 ` Scott Wood
2008-05-07 19:44 ` Scott Wood
2008-05-08 6:22 ` Sergej Stepanov
-- strict thread matches above, loose matches on Subject: below --
2008-05-07 18:42 Boris Shteinbock
2008-05-07 18:53 ` Scott Wood
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).