public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: "Mark A. Greer" <mgreer@mvista•com>
To: Andrei Dolnikov <adolnikov@ru•mvista.com>
Cc: linuxppc-dev@ozlabs•org
Subject: Re: [PATCH 2/5] PowerPC 74xx: Minor updates to MV64x60 boot code
Date: Tue, 11 Dec 2007 16:50:13 -0700	[thread overview]
Message-ID: <20071211235013.GA12698@mag.az.mvista.com> (raw)
In-Reply-To: <20071129153555.GC13751@ru.mvista.com>

On Thu, Nov 29, 2007 at 06:35:55PM +0300, Andrei Dolnikov wrote:

Hi Andrei.  I have a few comments below.

> This patch adds new functionality to MV64x60 boot code. The changes are required
> to access DevCS windows registers and set PCI bus and devfn numbers for MV644x60
> PCI/PCI-X interfaces.
> 
> Signed-off-by: Andrei Dolnikov <adolnikov@ru•mvista.com>
> 
> ---
>  mv64x60.c |   74 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  mv64x60.h |   10 ++++++++
>  2 files changed, 84 insertions(+)
> 
> diff --git a/arch/powerpc/boot/mv64x60.c b/arch/powerpc/boot/mv64x60.c
> index d207a0b..787a124 100644
> --- a/arch/powerpc/boot/mv64x60.c
> +++ b/arch/powerpc/boot/mv64x60.c
> @@ -32,6 +32,16 @@
>  #define MV64x60_CPU2MEM_3_BASE			0x0218
>  #define MV64x60_CPU2MEM_3_SIZE			0x0220
>  
> +#define MV64x60_DEV2MEM_WINDOWS			4
> +#define MV64x60_DEV2MEM_0_BASE			0x0028
> +#define MV64x60_DEV2MEM_0_SIZE			0x0030
> +#define MV64x60_DEV2MEM_1_BASE			0x0228
> +#define MV64x60_DEV2MEM_1_SIZE			0x0230
> +#define MV64x60_DEV2MEM_2_BASE			0x0248
> +#define MV64x60_DEV2MEM_2_SIZE			0x0250
> +#define MV64x60_DEV2MEM_3_BASE			0x0038
> +#define MV64x60_DEV2MEM_3_SIZE			0x0040
> +

These aren't device->memory windows, they're CPU->device windows so
they should be named MV64x60_CPU2DEV_xxx to be consistent with the
previously established naming convention.

>  #define MV64x60_ENET2MEM_BAR_ENABLE		0x2290
>  #define MV64x60_ENET2MEM_0_BASE			0x2200
>  #define MV64x60_ENET2MEM_0_SIZE			0x2204
> @@ -219,6 +229,25 @@ static struct mv64x60_mem_win mv64x60_cpu2mem[MV64x60_CPU2MEM_WINDOWS] = {
>  	},
>  };
>  
> +static struct mv64x60_mem_win mv64x60_devcs[MV64x60_DEV2MEM_WINDOWS] = {

Why not call this mv64x60_cpu2dev[]?

<snip>

> @@ -586,6 +645,21 @@ u32 mv64x60_get_mem_size(u8 *bridge_base)
>  	return mem;
>  }
>  
> +/* Read a size of DEV_CS window */
> +u32 mv64x60_get_devcs_size(u8 *bridge_base, u32 devcs)

u32 mv64x60_get_cpu2dev_size(...)

<snip>

> diff --git a/arch/powerpc/boot/mv64x60.h b/arch/powerpc/boot/mv64x60.h
> index d0b29a7..a633d2e 100644
> --- a/arch/powerpc/boot/mv64x60.h
> +++ b/arch/powerpc/boot/mv64x60.h
> @@ -12,6 +12,14 @@
>  
>  #define MV64x60_CPU_BAR_ENABLE			0x0278
>  
> +#define MV64x60_PCI0_MODE			0x0d00
> +#define MV64x60_PCI1_MODE			0x0d80
> +#define MV64x60_PCI0_P2P_CONF			0x1d14
> +#define MV64x60_PCI1_P2P_CONF			0x1d94
> +
> +#define MV64x60_PCI_MODE_MASK			0x00000030
> +#define MV64x60_PCI_CONVENTIONAL_MODE		0x00000000
> +

AFAICS these macros are only used in mv64x60.c so just put them there.
They only need to go in mv64x60.h if they're used in more than one .c
file.

Mark

  reply	other threads:[~2007-12-11 23:48 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-29 15:07 [PATCH 0/5] PowerPC 74xx: Add Emerson Katana Qp support Andrei Dolnikov
2007-11-29 15:28 ` [PATCH 1/5] PowerPC 74xx: Katana Qp device tree Andrei Dolnikov
2007-12-03  1:50   ` David Gibson
2007-12-03 19:26     ` Jon Loeliger
2007-12-04  0:33       ` David Gibson
2007-12-04 13:14         ` Jon Loeliger
2007-12-04  2:10     ` Mark A. Greer
2007-12-04  2:50       ` David Gibson
2007-12-04  5:30         ` Mark A. Greer
2007-12-06 23:27         ` Mark A. Greer
2007-12-08  1:33           ` David Gibson
2007-12-10 17:17             ` Mark A. Greer
2007-12-10 21:18     ` Dale Farnsworth
2007-12-16  6:40       ` David Gibson
2007-12-18 16:38         ` Dale Farnsworth
2007-12-03 20:52   ` Benjamin Herrenschmidt
2007-12-04  1:23     ` Mark A. Greer
2007-12-04  2:14       ` Benjamin Herrenschmidt
2007-12-04  5:34         ` Mark A. Greer
2007-12-04 17:28       ` Andrei Dolnikov
2007-12-04 17:35         ` Mark A. Greer
2007-11-29 15:35 ` [PATCH 2/5] PowerPC 74xx: Minor updates to MV64x60 boot code Andrei Dolnikov
2007-12-11 23:50   ` Mark A. Greer [this message]
2007-11-29 15:39 ` [PATCH 3/5] PowerPC 74xx: Katana Qp bootwrapper Andrei Dolnikov
2007-12-12  0:13   ` Mark A. Greer
2007-11-29 15:42 ` [PATCH 4/5] PowerPC 74xx: Katana Qp base support Andrei Dolnikov
2007-12-03 20:54   ` Benjamin Herrenschmidt
2007-12-04  2:12     ` Mark A. Greer
2007-12-12  0:48   ` Mark A. Greer
2007-11-29 15:45 ` [PATCH 5/5] PowerPC 74xx: Katana Qp default config Andrei Dolnikov
  -- strict thread matches above, loose matches on Subject: below --
2007-11-16 16:18 [PATCH 2/5] PowerPC 74xx: Minor updates to MV64x60 boot code Andrei Dolnikov

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=20071211235013.GA12698@mag.az.mvista.com \
    --to=mgreer@mvista$(echo .)com \
    --cc=adolnikov@ru$(echo .)mvista.com \
    --cc=linuxppc-dev@ozlabs$(echo .)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