All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sylvain Munaut <tnt@246tNt.com>
To: Kumar Gala <galak@kernel.crashing.org>
Cc: linuxppc-dev@ozlabs.org, linuxppc-embedded@ozlabs.org,
	sl@bplan-gmbh.de, sha@pengutronix.de
Subject: Re: [PATCH 1/2] Add MPC52xx Interrupt controller support for	ARCH=powerpc
Date: Tue, 31 Oct 2006 00:15:01 +0100	[thread overview]
Message-ID: <45468775.8040108@246tNt.com> (raw)
In-Reply-To: <7BDB728E-0CC2-4940-9856-B496022F3482@kernel.crashing.org>

Kumar Gala wrote:
> On Oct 29, 2006, at 5:10 PM, Nicolas DET wrote:
>
>   
>> This patch add MPC52xx Interrupt controller for ARCH=powerpc.
>>
>> It includes the main code in arch/powerpc/sysdev/ ad well as an  
>> header file in
>> include/asm-powerpc.
>>
>> Signed-off-by: Nicolas DET <nd@bplan-gmbh.de>
>>     
>
> Can you see if you can figure out how to inline patches with your  
> mailer, its really difficult to comment on issues w/an attachment.
>   
.There are also scripts to post patches ... So you're sure it's not mangled
or anything.

> +/* MBAR position */
> +#define MPC52xx_MBAR		0xf0000000	/* Phys address */
> +#define MPC52xx_MBAR_VIRT	0xf0000000	/* Virt address */
> +#define MPC52xx_MBAR_SIZE	0x00010000
> +
> +#define MPC52xx_PA(x)		((phys_addr_t)(MPC52xx_MBAR + (x)))
> +#define MPC52xx_VA(x)		((void __iomem *)(MPC52xx_MBAR_VIRT + (x)))
>
> This should be handled dynamically (pulled from the device tree), I  
> doubt MBAR will be at the same location for all boards.
>   
Agreed.

A little explanation on why they were used before :

the _VA was used for very early access (mostly boot debug) before
anything is setup.
the _PA was used for addresses used at several places. Like, a lot of
driver / code
needs to access XLB and there was not much way to distribute that
address around.

Now with the device tree that should be doable.
Having a nice function/helper
 void *find_and_map_my_good_old_register_set(char *)
that would find and ioremap it for you would be nice ;) like
 struct mpc52xx_xlb __iomem *xlb_regs =
find_and_map_my_good_old_register_set("xlb");


> * lets drop all the other struct defn in mpc52xx.h.  This is a hold  
> over from arch/ppc and we really should only put defn that we  
> actually need closer to the code that uses them (ie, drivers, etc.)
>   
Most of the struct that were in mpc52xx.h are the ones used in more than
one driver.
(or don't really belong to a driver)
That's why they've been left there and not in the driver header, so I
would leave those
there.

(e.g. the IDE struct is not there, neither is the FEC. But sdma is used
at several place
for example, so is rtc, xlb and cdm, ...)


Personnal note to Nicolas : It may seem a long process to just post a
patch but
since it imports a new platform to the arch/powerpc, it kinda requires
to make all
the due cleanups ;)



Sylvain

  parent reply	other threads:[~2006-10-30 23:15 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-29 23:10 [PATCH 1/2] Add MPC52xx Interrupt controller support for ARCH=powerpc Nicolas DET
2006-10-30 17:37 ` Dale Farnsworth
2006-10-30 17:47 ` Dale Farnsworth
2006-10-30 23:18   ` Sylvain Munaut
2006-10-31  7:10   ` Nicolas DET
2006-10-30 22:25 ` Kumar Gala
2006-10-30 22:31   ` Benjamin Herrenschmidt
2006-10-30 23:15   ` Sylvain Munaut [this message]
2006-10-31  1:11     ` Kumar Gala
2006-10-31  6:59       ` Sylvain Munaut
2006-10-31  7:05         ` Benjamin Herrenschmidt
2006-10-31  7:14   ` Nicolas DET
2006-10-31  7:38     ` Benjamin Herrenschmidt
2006-10-31  8:25       ` Nicolas DET
2006-10-31  8:42         ` Benjamin Herrenschmidt
2006-10-31  9:08           ` Nicolas DET
2006-10-31 20:04             ` Nicolas DET
2006-10-31 21:59               ` Benjamin Herrenschmidt
2006-10-31 22:08                 ` Grant Likely
2006-10-31 22:11                   ` Benjamin Herrenschmidt
2006-10-31 23:08                     ` Grant Likely
2006-11-01  1:06                       ` Benjamin Herrenschmidt
2006-11-01  9:24                 ` Nicolas DET
2006-11-01 20:56                   ` Benjamin Herrenschmidt
2006-10-31 14:34           ` Kumar Gala
2006-10-31 16:24     ` Grant Likely
2006-10-31  4:27 ` Benjamin Herrenschmidt
2006-10-31  7:09   ` Nicolas DET
2006-10-31  7:21     ` Benjamin Herrenschmidt
2006-10-31  7:49       ` Nicolas DET
2006-10-31  7:58         ` Benjamin Herrenschmidt
2006-10-31  8:28           ` Nicolas DET
2006-10-31  8:44             ` Benjamin Herrenschmidt
2006-10-31  9:04               ` Nicolas DET
2006-10-31  9:07                 ` Benjamin Herrenschmidt
2006-10-31  9:46                   ` Nicolas DET
2006-10-31 20:29                     ` Benjamin Herrenschmidt

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=45468775.8040108@246tNt.com \
    --to=tnt@246tnt.com \
    --cc=galak@kernel.crashing.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=linuxppc-embedded@ozlabs.org \
    --cc=sha@pengutronix.de \
    --cc=sl@bplan-gmbh.de \
    /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.