public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] [PATCH] Fix MPC8544DS PCIe3 scsi.
@ 2007-08-20  8:03 Ed Swarthout
  2007-08-20 14:14 ` Kumar Gala
  2007-08-29  0:05 ` [U-Boot-Users] [PATCH] Fix MPC8544DS PCIe3 scsi Wolfgang Denk
  0 siblings, 2 replies; 15+ messages in thread
From: Ed Swarthout @ 2007-08-20  8:03 UTC (permalink / raw)
  To: u-boot

From: Ed Swarthout <ed.swarthout@freescale.com>

Increase PCIe 3 Memory region to 8M to fix scsi invalid port number:

SCSI:  scanning bus for devices...
Invaild port number 1
Invaild port number 2
Invaild port number 3

Signed-off-by: Ed Swarthout <ed.swarthout@freescale.com>
---

d64ee908 reduced PCIe 3 region by too much.
With this fix I get 0xb010c000 assigned to bar5.

 board/freescale/mpc8544ds/init.S |    2 +-
 include/configs/MPC8544DS.h      |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/board/freescale/mpc8544ds/init.S b/board/freescale/mpc8544ds/init.S
index 900c368..ca1b5d5 100644
--- a/board/freescale/mpc8544ds/init.S
+++ b/board/freescale/mpc8544ds/init.S
@@ -237,6 +237,6 @@ law_entry:
 
 	/* contains both PCIE3 MEM & IO space */
 	.long	(CFG_PCIE3_MEM_PHYS>>12) & 0xfffff
-	.long	LAWAR_EN | LAWAR_TRGT_PCIE3 | (LAWAR_SIZE & LAWAR_SIZE_2M)
+	.long	LAWAR_EN | LAWAR_TRGT_PCIE3 | (LAWAR_SIZE & LAWAR_SIZE_16M)
 4:
 	entry_end
diff --git a/include/configs/MPC8544DS.h b/include/configs/MPC8544DS.h
index 746f360..ba5aa00 100644
--- a/include/configs/MPC8544DS.h
+++ b/include/configs/MPC8544DS.h
@@ -308,9 +308,9 @@ extern unsigned long get_board_sys_clk(unsigned long dummy);
 /* controller 3, direct to uli, tgtid 3, Base address b000 */
 #define CFG_PCIE3_MEM_BASE	0xb0000000
 #define CFG_PCIE3_MEM_PHYS	CFG_PCIE3_MEM_BASE
-#define CFG_PCIE3_MEM_SIZE	0x00100000	/* 1M */
+#define CFG_PCIE3_MEM_SIZE	0x00800000	/* 8M of 16M LAW */
 #define CFG_PCIE3_IO_BASE	0x00000000
-#define CFG_PCIE3_IO_PHYS	0xb0100000	/* reuse mem LAW */
+#define CFG_PCIE3_IO_PHYS	0xb0800000	/* reuse mem LAW */
 #define CFG_PCIE3_IO_SIZE	0x00100000	/* 1M */
 
 #if defined(CONFIG_PCI)
-- 
1.5.3.rc5.18.ga85e4

^ permalink raw reply related	[flat|nested] 15+ messages in thread
* [U-Boot-Users] [PATCH] fsl_pci_init - Remove self PCSRBAR allocation
@ 2007-08-27  2:39 Swarthout Edward L-SWARTHOU
  2007-08-29  0:21 ` Wolfgang Denk
  0 siblings, 1 reply; 15+ messages in thread
From: Swarthout Edward L-SWARTHOU @ 2007-08-27  2:39 UTC (permalink / raw)
  To: u-boot

CPU physical address space was being wasted by allocating a
PCSRBAR PCI inbound region to it's memory space.

As a rule, PCSRBAR should be left alone since it does not affect
transactions from self and other masters may have changed it.

Signed-off-by: Ed Swarthout <ed.swarthout@freescale.com>
---
Sent to external list: Monday, August 20, 2007 11:56 PM

Was: {PATCH] Fix MPC8544DS PCIe3 scsi.

This fixes the MPC8544DS scsi error: 

SCSI:  scanning bus for devices...
Invaild port number 1
Invaild port number 2
Invaild port number 3

when not enough PCIe3 memory space is available for allocation.

 drivers/fsl_pci_init.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/fsl_pci_init.c b/drivers/fsl_pci_init.c
index 1084dc6..3a13eea 100644
--- a/drivers/fsl_pci_init.c
+++ b/drivers/fsl_pci_init.c
@@ -130,9 +130,14 @@ fsl_pci_init(struct pci_controller *hose)
 
 	}
 
-	/* Call setup to allocate PCSRBAR window */
-	pciauto_setup_device(hose, dev, 1, hose->pci_mem,
+	/* Use generic setup_device to initialize standard pci regs,
+	 * but do not allocate any windows since any BAR found (such
+	 * as PCSRBAR) is not in this cpu's memory space.
+	 */
+
+	pciauto_setup_device(hose, dev, 0, hose->pci_mem,
 			     hose->pci_prefetch, hose->pci_io);
+
 #ifndef CONFIG_PCI_NOSCAN
 	printf ("               Scanning PCI bus %02x\n",
hose->current_busno);
 	hose->last_busno = pci_hose_scan_bus(hose,hose->current_busno);
-- 
1.5.3.rc5.18.ga85e4

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

end of thread, other threads:[~2007-08-30  7:33 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-20  8:03 [U-Boot-Users] [PATCH] Fix MPC8544DS PCIe3 scsi Ed Swarthout
2007-08-20 14:14 ` Kumar Gala
2007-08-20 14:44   ` Kumar Gala
2007-08-21  4:55     ` [U-Boot-Users] [PATCH] fsl_pci_init - Remove self PCSRBAR allocation Ed Swarthout
2007-08-24  7:00       ` Kumar Gala
2007-08-29  0:09       ` Wolfgang Denk
2007-08-29  0:07     ` [U-Boot-Users] [PATCH] Fix MPC8544DS PCIe3 scsi Wolfgang Denk
2007-08-29  2:02       ` Andy Fleming
2007-08-29  2:56       ` Ed Swarthout
2007-08-29 19:53       ` Kumar Gala
2007-08-30  7:26         ` [U-Boot-Users] [PATCH] Revert "Fix MPC8544DS PCIe3 scsi." Ed Swarthout
2007-08-30  7:33           ` Wolfgang Denk
2007-08-29  0:05 ` [U-Boot-Users] [PATCH] Fix MPC8544DS PCIe3 scsi Wolfgang Denk
  -- strict thread matches above, loose matches on Subject: below --
2007-08-27  2:39 [U-Boot-Users] [PATCH] fsl_pci_init - Remove self PCSRBAR allocation Swarthout Edward L-SWARTHOU
2007-08-29  0:21 ` Wolfgang Denk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox