public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Milton Miller <miltonm@bga.com>
To: Mai La <mla@apm.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Paul Mackerras <paulus@samba.org>,
	Josh Boyer <jwboyer@linux.vnet.ibm.com>,
	Matt Porter <mporter@kernel.crashing.org>,
	Tirumala R Marri <tmarri@apm.com>,
	Grant Likely <grant.likely@secretlab.ca>,
	Michael Neuling <mikey@neuling.org>,
	Kumar Gala <galak@kernel.crashing.org>,
	Anton Blanchard <anton@samba.org>,
	linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org,
	open-source-review@apm.com
Subject: Re: [1/2] powerpc/44x: Fix PCI MSI support for APM821xx SoC and Bluestone board
Date: Mon, 05 Mar 2012 22:37:13 -0600	[thread overview]
Message-ID: <bluehawk-msi-use-upper-lower-32@mdm.bga.com> (raw)
In-Reply-To: <1331004581-23795-1-git-send-email-mla@apm.com>

On Mon, 05 Mar 2012 about 17:29:41 -0000, Mai La wrote:
>  
> @@ -43,7 +43,12 @@
>  #define PEIH_FLUSH0	0x30
>  #define PEIH_FLUSH1	0x38
>  #define PEIH_CNTRST	0x48
> +
> +#ifdef CONFIG_APM821xx
> +#define NR_MSI_IRQS	8
> +#else
>  #define NR_MSI_IRQS	4
> +#endif
>  

does this need to go into the dts binding?

>  struct ppc4xx_msi {
>  	u32 msi_addr_lo;
> @@ -150,12 +155,11 @@ static int ppc4xx_setup_pcieh_hw(struct platform_device *dev,
>  	if (!sdr_addr)
>  		return -1;
>  
> -	SDR0_WRITE(sdr_addr, (u64)res.start >> 32);	 /*HIGH addr */
> -	SDR0_WRITE(sdr_addr + 1, res.start & 0xFFFFFFFF); /* Low addr */
> -
> +	mtdcri(SDR0, *sdr_addr, (u64)res.start >> 32);	/*HIGH addr */
> +	mtdcri(SDR0, *sdr_addr + 1, res.start & 0xFFFFFFFF);/* Low addr */

Please use upper_32_bits and lower_32_bits from linux/kernel.h

>  	msi->msi_dev = of_find_node_by_name(NULL, "ppc4xx-msi");
> -	if (msi->msi_dev)
> +	if (!msi->msi_dev)
>  		return -ENODEV;
>  
>  	msi->msi_regs = of_iomap(msi->msi_dev, 0);
> @@ -167,9 +171,12 @@ static int ppc4xx_setup_pcieh_hw(struct platform_device *dev,
>  		(u32) (msi->msi_regs + PEIH_TERMADH), (u32) (msi->msi_regs));
>  
>  	msi_virt = dma_alloc_coherent(&dev->dev, 64, &msi_phys, GFP_KERNEL);
> -	msi->msi_addr_hi = 0x0;
> -	msi->msi_addr_lo = (u32) msi_phys;
> -	dev_dbg(&dev->dev, "PCIE-MSI: msi address 0x%x\n", msi->msi_addr_lo);
> +	if (!msi_virt)
> +		return -ENOMEM;
> +	msi->msi_addr_hi = (u32)(msi_phys >> 32);
> +	msi->msi_addr_lo = (u32)(msi_phys & 0xffffffff);

ditto


milton

  reply	other threads:[~2012-03-06  4:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-06  3:29 [PATCH 1/2] powerpc/44x: Fix PCI MSI support for APM821xx SoC and Bluestone board Mai La
2012-03-06  4:37 ` Milton Miller [this message]
2012-03-06  7:11   ` [1/2] " 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=bluehawk-msi-use-upper-lower-32@mdm.bga.com \
    --to=miltonm@bga.com \
    --cc=anton@samba.org \
    --cc=benh@kernel.crashing.org \
    --cc=galak@kernel.crashing.org \
    --cc=grant.likely@secretlab.ca \
    --cc=jwboyer@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mikey@neuling.org \
    --cc=mla@apm.com \
    --cc=mporter@kernel.crashing.org \
    --cc=open-source-review@apm.com \
    --cc=paulus@samba.org \
    --cc=tmarri@apm.com \
    /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