All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Varlese, Christopher" <Christopher.Varlese@keymile.com>
To: <hs@denx.de>,"Kumar Gala" <galak@kernel.crashing.org>
Cc: linuxppc-dev@ozlabs.org
Subject: RE: [PATCH] 83xx: add support for the kmeter1 board.
Date: Thu, 7 May 2009 19:49:51 +0200	[thread overview]
Message-ID: <D839955AA28B9A42A61B9181506E27C40182F50E@SRVCHBER1212.ch.keymile.net> (raw)
In-Reply-To: <49F544DE.1010307@denx.de>

Hello all,

(FYI I working on the kmeter1)

kmeter1.c reuses the same QE_ENET10 RGMII errata workaround code from =
mpc836x_mds.c (MPC8360EMDS eval board).

In my view errata nodes in the dts is overkill.   Maybe the errata code =
can go into a reusable function somewhere in 83xx/ or in ucc_geth.c?

I also think the original errata code needs improving:
	- mask some SVR bits so activated for all matching CPU models, e.g. =
MPC8360 & MPC8360E.
	- The code in mpc836x_mds.c and kmeter1.c does not do exactly what =
Freescale errata says!

Here the errata document:
	http://www.freescale.com/files/32bit/doc/errata/MPC8360ECE.pdf

Because kmeter1 is using an MPC8360 CPU model the workaround doesn't =
actually trigger.  So to kill 2 birds with 1 stone we tested a Uboot =
patch (below) doing what QE_ENET10 says.   It seemed to work fine for =
us.
        /* RGMII timing Errata workaround for rev 2.1 silicon
         * (ref: MPC8360ECE rev.1 12/2007 QE_ENET10 UCC2 option 1)
         */
        void *reg =3D (void *)(CONFIG_SYS_IMMR + 0x14ac);
        clrsetbits_be32 (reg, 0x000000F0, 0x000000A0);

>From my point of view:
	- The workaround code in kmeter1.c could go for now.
	- An improved errata workaround for 836x boards would be nice (..who is =
motivated? :-))


Best regards
Christopher Varlese
R&D Software
________________________________________=A0
KEYMILE AG
Schwarzenburgstrasse 73
3097 Bern, Switzerland
www.keymile.com=A0

-----Original Message-----
From: linuxppc-dev-bounces+christopher.varlese=3Dkeymile.com@ozlabs.org =
[mailto:linuxppc-dev-bounces+christopher.varlese=3Dkeymile.com@ozlabs.org=
] On Behalf Of Heiko Schocher
Sent: Monday, April 27, 2009 7:39 AM
To: Kumar Gala
Cc: linuxppc-dev@ozlabs.org
Subject: Re: [PATCH] 83xx: add support for the kmeter1 board.

Hello Kumar,

Kumar Gala wrote:
[...]
>> diff --git a/arch/powerpc/platforms/83xx/kmeter1.c
>> b/arch/powerpc/platforms/83xx/kmeter1.c
>> new file mode 100644
>> index 0000000..99cf5c6
>> --- /dev/null
>> +++ b/arch/powerpc/platforms/83xx/kmeter1.c
>> @@ -0,0 +1,170 @@
>> +/*
[...]
>> +    np =3D of_find_compatible_node(NULL, "network", "ucc_geth");
>> +    if (np !=3D NULL) {
>> +        uint svid;
>> +
>> +        /* handle mpc8360ea rev.2.1 erratum 2: RGMII Timing */
>> +        svid =3D mfspr(SPRN_SVR);
>> +        if (svid =3D=3D 0x80480021) {
>> +            void __iomem *immap;
>> +
>> +            immap =3D ioremap(get_immrbase() + 0x14a8, 8);
>=20
> we should add a proper device node to cover whatever register space =
this
> is.


What if we do something like the following:

1) add in the soc node an "errata" node and in this "errata" node
   we can add all CPU specific errata as an example the qe_enet10
   errata, which above code covers:

        soc8360@e0000000 {
	[...]
                errata {
                        device_type =3D "errata";
                        compatible =3D "fsl,mpc83xx_errata";
                        #address-cells =3D <1>;
                        #size-cells =3D <1>;

                        qe_enet10@14a8 {
                                device_type =3D "errata";
                                compatible =3D =
"fsl,mpc83xx_errata_qe_enet10";
                                reg =3D <0x14a8 0x08>;
                        };
                };
	[...]
	};

2) we add in arch/powerpc/sysdev/fsl_soc.c a

   static int __init mpc83xx_errata_init(void)

   function, which holds the code for the errata


If you agree with that, I can make a patch ...

Hmm.. Is it OK, if I first sent a v2 of the "83xx: add support for
the kmeter1 board." with the QE_ENET10 errata in kmeter1.c (as it is
also for the mpc836x_mds board), and then send a seperate patch, which
removes this errata from the two boards?

bye
Heiko
--=20
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev

  parent reply	other threads:[~2009-05-07 18:01 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-23  6:09 [PATCH] 83xx: add support for the kmeter1 board Heiko Schocher
2009-04-23 14:25 ` Kumar Gala
2009-04-23 14:50   ` Heiko Schocher
2009-04-27  5:38   ` Heiko Schocher
2009-04-27 18:05     ` Scott Wood
2009-04-28  4:42       ` Heiko Schocher
2009-04-28 16:35         ` Scott Wood
2009-04-29  4:48           ` [PATCH v2] " Heiko Schocher
2009-06-11  2:43             ` Kumar Gala
2009-06-11  6:03               ` Heiko Schocher
2009-06-11  6:16               ` [PATCH v3] " Heiko Schocher
2009-06-11 14:10                 ` Kumar Gala
2009-06-11 18:08                   ` Heiko Schocher
2009-06-11 18:10                   ` [PATCH v4] " Heiko Schocher
2009-06-12  1:13                     ` David Gibson
2009-06-12  5:27                       ` Heiko Schocher
2009-06-15  2:42                         ` David Gibson
2009-06-15  7:38                           ` [PATCH v5] " Heiko Schocher
2009-06-16  3:16                             ` Kumar Gala
2009-05-07 17:49     ` Varlese, Christopher [this message]
2009-05-08  5:44       ` [PATCH] " Heiko Schocher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=D839955AA28B9A42A61B9181506E27C40182F50E@SRVCHBER1212.ch.keymile.net \
    --to=christopher.varlese@keymile.com \
    --cc=galak@kernel.crashing.org \
    --cc=hs@denx.de \
    --cc=linuxppc-dev@ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.