All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4 RFC] fsl/msi: have msiir register address absolute rather than offset
@ 2015-03-03  5:17 Bharat Bhushan
  2015-03-03  5:17 ` [PATCH 2/4 RFC] fsl/msi: Move fsl, msi mode specific MSI device search out of main loop Bharat Bhushan
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Bharat Bhushan @ 2015-03-03  5:17 UTC (permalink / raw)
  To: scottwood; +Cc: Bharat Bhushan, linuxppc-dev

Having absolute address simplifies the code and also removes the
confusion around feature->msiir_offset and msi_data->msiir_offset.

Signed-off-by: Bharat Bhushan <Bharat.Bhushan@freescale.com>
---
 arch/powerpc/sysdev/fsl_msi.c | 9 +++------
 arch/powerpc/sysdev/fsl_msi.h | 2 +-
 2 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/arch/powerpc/sysdev/fsl_msi.c b/arch/powerpc/sysdev/fsl_msi.c
index 4bbb4b8..ec3161b 100644
--- a/arch/powerpc/sysdev/fsl_msi.c
+++ b/arch/powerpc/sysdev/fsl_msi.c
@@ -157,7 +157,7 @@ static void fsl_compose_msi_msg(struct pci_dev *pdev, int hwirq,
 	if (reg && (len == sizeof(u64)))
 		address = be64_to_cpup(reg);
 	else
-		address = fsl_pci_immrbar_base(hose) + msi_data->msiir_offset;
+		address = msi_data->msiir;
 
 	msg->address_lo = lower_32_bits(address);
 	msg->address_hi = upper_32_bits(address);
@@ -430,18 +430,15 @@ static int fsl_of_msi_probe(struct platform_device *dev)
 				dev->dev.of_node->full_name);
 			goto error_out;
 		}
-		msi->msiir_offset =
-			features->msiir_offset + (res.start & 0xfffff);
 
 		/*
 		 * First read the MSIIR/MSIIR1 offset from dts
 		 * On failure use the hardcode MSIIR offset
 		 */
 		if (of_address_to_resource(dev->dev.of_node, 1, &msiir))
-			msi->msiir_offset = features->msiir_offset +
-					    (res.start & MSIIR_OFFSET_MASK);
+			msi->msiir = res.start + features->msiir_offset;
 		else
-			msi->msiir_offset = msiir.start & MSIIR_OFFSET_MASK;
+			msi->msiir = msiir.start;
 	}
 
 	msi->feature = features->fsl_pic_ip;
diff --git a/arch/powerpc/sysdev/fsl_msi.h b/arch/powerpc/sysdev/fsl_msi.h
index 420cfcb..9b0ab84 100644
--- a/arch/powerpc/sysdev/fsl_msi.h
+++ b/arch/powerpc/sysdev/fsl_msi.h
@@ -34,7 +34,7 @@ struct fsl_msi {
 
 	unsigned long cascade_irq;
 
-	u32 msiir_offset; /* Offset of MSIIR, relative to start of CCSR */
+	phys_addr_t msiir; /* MSIIR Address in CCSR */
 	u32 ibs_shift; /* Shift of interrupt bit select */
 	u32 srs_shift; /* Shift of the shared interrupt register select */
 	void __iomem *msi_regs;
-- 
1.9.3

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2015-03-13 22:38 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-03  5:17 [PATCH 1/4 RFC] fsl/msi: have msiir register address absolute rather than offset Bharat Bhushan
2015-03-03  5:17 ` [PATCH 2/4 RFC] fsl/msi: Move fsl, msi mode specific MSI device search out of main loop Bharat Bhushan
2015-03-03  5:17 ` [PATCH 3/4 RFC] fsl/msi: Add MSI bank allocation for kernel owned devices Bharat Bhushan
2015-03-11 23:22   ` Scott Wood
2015-03-12 15:46     ` Bharat.Bhushan
2015-03-13 22:37       ` Scott Wood
2015-03-03  5:17 ` [PATCH 4/4 RFC] fsl/msi: Add interface to reserve/free msi bank Bharat Bhushan
2015-03-12  0:18   ` Scott Wood
2015-03-12 15:50     ` Bharat.Bhushan

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.