linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "Stefan Roese" <stefan.roese@esd-electronics.com>
To: "Linuxppc-Embedded" <linuxppc-embedded@lists.linuxppc.org>,
	"Linuxppc-Commit" <linuxppc-commit@source.mvista.com>
Subject: Re: CPCI-405 port (PPC405GP)
Date: Thu, 20 Sep 2001 10:00:40 +0200	[thread overview]
Message-ID: <EFEAIMDCOOOHIEPHDNFJCEMADCAA.stefan.roese@esd-electronics.com> (raw)
In-Reply-To: <3BA8DF9E.FD235CF6@mvista.com>


> > Sounds like a good idea.  Also, doing inline ... __init is rather silly.
> > How's the idea sound Dan?
>
> The idea is OK, but I would prefer a different implementation.  You
> are trying to do basically the same thing as all of the boards that
> use versions of OpenPIC, EPIC, etc.  Rather than have a fixed size
> array, and fill most of it with zero, a generic solution should be
> able to work with variable sized arrays......just pass the size
> somehow. The sizeof() works pretty well for this :-).  The boards
> initialize the array to whatever they need, and don't have to worry
> about others.

Isn't that exactly what I did (in cpci405.c)?

int __init
ppc405_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin)
{
	static char pci_irq_table[][4] =
	/*
	 *      PCI IDSEL/INTPIN->INTLINE
	 *      A       B       C       D
	 */
	{
		{28,	28,	28,	28},	/* IDSEL 15 - cPCI slot 8 */
		{29,	29,	29,	29},	/* IDSEL 16 - cPCI slot 7 */
		{30,	30,	30,	30},	/* IDSEL 17 - cPCI slot 6 */
		{27,	27,	27,	27},	/* IDSEL 18 - cPCI slot 5 */
		{28,	28,	28,	28},	/* IDSEL 19 - cPCI slot 4 */
		{29,	29,	29,	29},	/* IDSEL 20 - cPCI slot 3 */
		{30,	30,	30,	30},	/* IDSEL 21 - cPCI slot 2 */
        };
	const long min_idsel = 15, max_idsel = 21, irqs_per_slot = 4;
	return PCI_IRQ_TABLE_LOOKUP;
};

It seems to me, that nearly all other boards do it this way also.

Perhaps you were referring to the walnut/ep405 implementations, which still
had some zero's in the array (I corrected this by now).

Best regards,
Stefan.


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

  parent reply	other threads:[~2001-09-20  8:00 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <EFEAIMDCOOOHIEPHDNFJEEENDCAA.stefan.roese@esd-electronics.com>
2001-09-10 17:13 ` CPCI-405 port (PPC405GP) Dan Malek
2001-09-11  7:15   ` AW: " Stefan Roese
2001-09-11 17:36     ` Matthew Locke
2001-09-11 17:53       ` Dan Malek
2001-09-12 13:12         ` AW: " Stefan Roese
2001-09-18 18:57 ` Tom Rini
2001-09-19 13:46   ` Stefan Roese
2001-09-19 14:17     ` Tom Rini
2001-09-19 15:55       ` AW: " Stefan Roese
2001-09-19 18:10       ` Dan Malek
2001-09-19 22:57         ` Tom Rini
2001-09-19 23:02           ` Dan Malek
2001-09-19 23:31             ` Tom Rini
2001-09-20  4:12               ` Dan Malek
2001-09-20  9:20                 ` Stefan Roese
2001-09-20 15:20                   ` Dan Malek
2001-09-20 15:46                     ` Tom Rini
2001-09-20 21:43                       ` Dan Malek
2001-09-20 21:56                         ` Tom Rini
2001-09-21  7:04                           ` Geert Uytterhoeven
2001-09-21 13:55                             ` Tom Rini
2001-09-23 18:01                     ` Wolfgang Denk
     [not found]                       ` <3BAEB9DA.232C8FEB@mvista.com>
2001-09-29 15:34                         ` Dan Malek
2001-09-20 14:55                 ` Tom Rini
2001-09-20 15:34                   ` Dan Malek
2001-09-20 15:51                     ` Tom Rini
2001-09-20 16:10                       ` Mark Hatle
2001-09-20 21:38                       ` Dan Malek
2001-09-23 18:01                     ` Wolfgang Denk
2001-09-23 20:54                       ` Tom Rini
2001-09-20 14:59                 ` Josh Huber
2001-09-20 15:39                   ` Dan Malek
2001-09-20 15:57                     ` Josh Huber
2001-09-20 16:07                       ` Tom Rini
2001-09-20 16:32                         ` Josh Huber
2001-09-20 16:35                           ` Tom Rini
2001-09-23 18:00                           ` Wolfgang Denk
2001-09-23 20:50                             ` Tom Rini
2001-09-24  4:04                             ` Dan Malek
2001-09-23 18:00                     ` Wolfgang Denk
2001-09-20  8:00         ` Stefan Roese [this message]
2001-09-19 14:32     ` Stefan Roese
     [not found] <3BAEB761.194CE057@mvista.com>
2001-09-29  7:53 ` Wolfgang Denk

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=EFEAIMDCOOOHIEPHDNFJCEMADCAA.stefan.roese@esd-electronics.com \
    --to=stefan.roese@esd-electronics.com \
    --cc=linuxppc-commit@source.mvista.com \
    --cc=linuxppc-embedded@lists.linuxppc.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 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).