public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel•crashing.org>
To: James Chapman <jchapman@katalix•com>
Cc: Nicolas DET <det.nicolas@free•fr>,
	Sven Luther <luther@gluck•debian.org>,
	linuxppc-dev list <linuxppc-dev@ozlabs•org>
Subject: Re: mv64x60 updates
Date: Wed, 09 Mar 2005 13:01:35 +1100	[thread overview]
Message-ID: <1110333695.32556.15.camel@gaston> (raw)
In-Reply-To: <422C495B.8090805@katalix.com>

On Mon, 2005-03-07 at 12:30 +0000, James Chapman wrote:
> Hi Nicolas,
> 
> A few general comments:-
> 
> - mv64x60 stuff is best posted to linuxppc-embedded
> 
> - you change several generic files to support your platform. It should
>    be possible to support new mv64x60 platforms by writing a new
>    xxx_setup.c file in arch/ppc/platforms with no other generic changes.
>    It is a goal that all mv64x60 boards can be supported by the generic
>    code in arch/ppc/syslib. If some changes need to be made outside
>    arch/ppc/platforms to support your board, try to make them generic so
>    that other similar boards would be able to use them. I suggest you
>    clone chrp_setup.c or katana.c rather than adding conditionals in
>    chrp_setup.c for your board. Then use code in your board specific
>    setup file to call arch/ppc/syslib mv64x60 routines as appropriate.

Welcome to the world of embedded people who use #ifdef's for their
platforms :)

Pegasos claims to be chrp compliant, and so uses chrp_setup.c and relies
on other chrp related bits. The point here is to limit the platform
specific code and use the device-tree as much as is possible. Though I
agree that Nicals patch introduce wrong dependencies (I need to do a
deeper review of it).

If chrp_setup.c indeed ends up beeing cluttered by too much Pegasos
specific stuff, then it will be time to do split pegasos to a different
platform type as part of CONFIG_PPC_MULTIPLATFORM.

Now as far as his patch is concernd, the whole is_pegasos2() stuff is
too ugly for words, I agree. If he really needs so, then he should add
an argument to mv64x60_init() in order to customize it's behaviour.
Though I haven't looked at the code to see why he's trying to skip
stuffs here.

> - you shouldn't need to add board-specific changes in mv643xx_eth.c.
>    Setup device platform data for your board in your platform file.
>    If something needs to be added to the platform data for a generic
>    change to mv643xx_eth, do that rather than add platform conditionals
>    in the driver.

Agreed, though I think that's almost there now.

> - why do you need to use SA_SHIRQ in the ethernet driver?

Why don't use use it ? SA_INTERRUPT is crap and should probably be
removed from the driver.

> /james
> 
> Nicolas DET wrote:
> 
> > Hello Sven,
> > 
> > On 07/03/2005, you wrote:
> > 
> > 
> >>But i hear Nicolas has done some useful work yesterday evening, i will
> >>review it as soon as he is back from dreamland :)
> > 
> > 
> > You can find the patch against 2.6.11 from kernel.org here:
> > http://powernico.free.fr/patch_2.6.11_mv64x60.diff.bz2
> > 
> > This patch shouldn't break mv code for others platform (non PegasosII), and
> > fix Pegasos II init...
> > 
> > Basicly, I added mv64360_ispegasos2() in include/asm-ppc/mv64x60.h. Then:
> > 
> > in arch/ppc/syslibs/mv64360_pic.c, I skip the IRQ init code
> > in arch/ppc/syslibs/mv64x60.c, I skip all the chip init & patch the
> > ressources tables for Pegasos II hardware (register base & IRQ).
> > in include/asm-ppc/mv64x60.h: added mv64360_ispegasos2()
> > in arch/ppc/kernel/chrp_setup.c, rename/added pegasos2_stuff() and call
> > mv64x60_init() if CONFIG_MV64x60
> > in drivers/net/mv64xx_eth.c, use SA_SHIRQ instead of SA_INTERRUPT for
> > request_irq if pegasos II detected
> > 
> > The only thing to do is to add mv64360_ispegasos2() in include/asm-mips/...
> > because I use this function to use the correct flags in the ethernet
> > driver.
> > 
> > Of course, this patch may be discuss as there are several architecture
> > using Marvell chipsets and each requieres some specific code.
> > I don't know where it's the best to place mv64360_ispeasos2(), maybe this
> > func could even be renamed mv64x60_ispegasos2()..
> > 
> > Please, people from others MV64x60 architectures review this patch, modify
> > if it neeeded and check it doesn't break your architecture (I shouldn't but
> > for MIPS ethernet).
> > 
> > Regards
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs•org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev
-- 
Benjamin Herrenschmidt <benh@kernel•crashing.org>

  parent reply	other threads:[~2005-03-09  2:06 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-26  0:14 [PATCH][PPC32] mv64x60 updates Mark A. Greer
2005-02-24  8:25 ` Sven Luther
2005-02-24 15:28   ` Mark A. Greer
2005-02-24 16:04     ` Sven Luther
2005-02-24 17:08       ` Mark A. Greer
2005-02-24 17:05         ` Sven Luther
2005-02-24 17:24       ` Dale Farnsworth
2005-03-05 19:27         ` Sven Luther
2005-03-05 20:32           ` Sven Luther
2005-03-05 22:51             ` Dale Farnsworth
2005-03-06  7:02               ` Sven Luther
2005-03-06 10:29                 ` Dale Farnsworth
2005-03-06 19:10                   ` Sven Luther
2005-03-06 19:48                     ` Nicolas DET
2005-03-07  1:00                     ` [PATCH][PPC32] " Dale Farnsworth
2005-03-07  6:52                       ` Sven Luther
2005-03-07 10:56                         ` Nicolas DET
2005-03-07 10:58                         ` Nicolas DET
2005-03-07 12:30                           ` James Chapman
2005-03-07 12:46                             ` Sven Luther
2005-03-07 12:57                             ` Nicolas DET
2005-03-07 13:20                               ` Sven Luther
2005-03-07 17:24                                 ` Mark A. Greer
2005-03-07 13:23                               ` Linwoes
2005-03-07 22:54                               ` mv643xx_eth SA_SHIRQ support patch Dale Farnsworth
2005-03-08  6:49                                 ` Sven Luther
2005-03-08  7:27                                   ` Benjamin Herrenschmidt
2005-03-08 12:20                                     ` Dale Farnsworth
2005-03-08 12:15                                       ` Sven Luther
2005-03-08 12:42                                         ` Sven Luther
     [not found]                                           ` <20050308164310.GA9891@pegasos>
2005-03-08 22:31                                             ` Benjamin Herrenschmidt
2005-03-09  7:17                                               ` Sven Luther
2005-03-09  7:39                                                 ` Benjamin Herrenschmidt
2005-03-09  7:40                                                   ` Sven Luther
2005-03-08 18:19                                         ` Mark A. Greer
2005-03-08 18:19                                           ` Sven Luther
2005-03-08 19:28                                     ` [PATCH] final mv643xx_eth pegasos patch set Sven Luther
2005-03-08 19:52                                       ` Sven Luther
2005-03-08 23:18                                         ` Nicolas DET
2005-03-09  2:03                               ` mv64x60 updates Benjamin Herrenschmidt
2005-03-09  2:01                             ` Benjamin Herrenschmidt [this message]
2005-03-09 15:59                               ` Chris Friesen
2005-03-05 21:58           ` [PATCH][PPC32] " Dale Farnsworth

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=1110333695.32556.15.camel@gaston \
    --to=benh@kernel$(echo .)crashing.org \
    --cc=det.nicolas@free$(echo .)fr \
    --cc=jchapman@katalix$(echo .)com \
    --cc=linuxppc-dev@ozlabs$(echo .)org \
    --cc=luther@gluck$(echo .)debian.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox