Skip to contentSkip to conversation

Update/enhance sbc8548 support

PATCH New Paul Gortmaker 3 participants 28 messages Sep 18, 2009 – Sep 23, 2009 Kbuild

lore
Share & tools
lore
#0 lore raw

cover Update/enhance sbc8548 support

This series represents a significant usability improvement to the sbc8548 board, by delivering:

-64MB SODIMM flash now usable from u-boot
-PCI and PCI-e properly configured and functional -twice the size of LBC SDRAM available
-easy selection of configuration via Makefile target rules -a README file that sucks less.

I've also cleaned up a bunch of stuff that was left over from when this board support was cloned off of the MPC8548CDS. There are still a couple things I'd like to get working on this board, like DDR config via SPD, and booting from the alternate flash bank (for ease of recovery), but what is here now is validated and complete, so no point in me sitting on these bits.

Patches are in e-mail for review, or can be pulled as per below.

Thanks,
Paul.

The following changes since commit 15fba3279b56333bdb65ead366f82c945ed320d1:
Kumar Gala (1):
ppc/85xx: Disable all async interrupt sources when we boot

are available in the git repository at:

git://openlinux.windriver.com/people/paulg/u-boot sbc8548

Paul Gortmaker (8):
sbc8548: delete unused MPC8548CDS info carried over from port
sbc8548: get_clock_freq is not valid for this board
sbc8548: enable access to second bank of flash
sbc8548: correct local bus SDRAM size from 64M to 128M
sbc8548: update PCI/PCI-e support code
sbc8548: enable use of PCI network cards
sbc8548: allow enabling PCI via a make config option
sbc8548: replace README with completely new document

 MAKEALL                   |    4 +
 Makefile                  |   26 ++++++-
 board/sbc8548/Makefile    |    4 +-
 board/sbc8548/law.c       |   12 +++-
 board/sbc8548/sbc8548.c   |   98 ++++++++----------------
 board/sbc8548/tlb.c       |   64 ++++++++++-----
 doc/README.sbc8548        |  189 ++++++++++++++++++++++++++++++++++++++++-----
 include/configs/sbc8548.h |  114 +++++++++++++++++----------
 8 files changed, 356 insertions(+), 155 deletions(-)
#1 lore raw

PATCH 1/8 sbc8548: delete unused MPC8548CDS info carried over from port

There are a couple defines and PCI bridge quirks related to the PCI backplane of the MPC8548CDS that have no meaning in the context of the port to the sbc8548 board, so delete them.

Also, the form factor of the sbc8548 is a standalone board with a single PCI-X and a single PCI-e slot. That pretty much guarantees that it will never be a PCI agent itself, so the host/agent and root complex/end node distinctions have been removed.

Similarly, since there is no physical connector mapping to PCI2, so all references of PCI2 in the board support files have been removed as well.

---
 board/sbc8548/sbc8548.c   |   63 ++++----------------------------------------
 include/configs/sbc8548.h |    9 ------
 2 files changed, 6 insertions(+), 66 deletions(-)
board/sbc8548/sbc8548.c +6 -57
index e5b21b5..f4fd204 100644
@@ -311,35 +311,9 @@ long int fixed_sdram (void)
 }
 #endif
 
-#if defined(CONFIG_PCI) || defined(CONFIG_PCI1)
-/* For some reason the Tundra PCI bridge shows up on itself as a
- * different device.  Work around that by refusing to configure it.
- */
-void dummy_func(struct pci_controller* hose, pci_dev_t dev, struct pci_config_table *tab) { }
-
-static struct pci_config_table pci_sbc8548_config_table[] = {
-	{0x10e3, 0x0513, PCI_ANY_ID, 1, 3, PCI_ANY_ID, dummy_func, {0,0,0}},
-	{0x1106, 0x0686, PCI_ANY_ID, 1, VIA_ID, 0, mpc85xx_config_via, {0,0,0}},
-	{0x1106, 0x0571, PCI_ANY_ID, 1, VIA_ID, 1,
-		mpc85xx_config_via_usbide, {0,0,0}},
-	{0x1105, 0x3038, PCI_ANY_ID, 1, VIA_ID, 2,
-		mpc85xx_config_via_usb, {0,0,0}},
-	{0x1106, 0x3038, PCI_ANY_ID, 1, VIA_ID, 3,
-		mpc85xx_config_via_usb2, {0,0,0}},
-	{0x1106, 0x3058, PCI_ANY_ID, 1, VIA_ID, 5,
-		mpc85xx_config_via_power, {0,0,0}},
-	{0x1106, 0x3068, PCI_ANY_ID, 1, VIA_ID, 6,
-		mpc85xx_config_via_ac97, {0,0,0}},
-	{},
-};
-
-static struct pci_controller pci1_hose = {
-	config_table: pci_sbc8548_config_table};
-#endif	/* CONFIG_PCI */
-
-#ifdef CONFIG_PCI2
-static struct pci_controller pci2_hose;
-#endif	/* CONFIG_PCI2 */
+#ifdef CONFIG_PCI1
+static struct pci_controller pci1_hose;
+#endif	/* CONFIG_PCI1 */
 
 #ifdef CONFIG_PCIE1
 static struct pci_controller pcie1_hose;
@@ -356,24 +330,20 @@ pci_init_board(void)
 {
 	volatile ccsr_fsl_pci_t *pci = (ccsr_fsl_pci_t *) CONFIG_SYS_PCI1_ADDR;
 	struct pci_controller *hose = &pci1_hose;
-	struct pci_config_table *table;
 	struct pci_region *r = hose->regions;
 
 	uint pci_32 = gur->pordevsr & MPC85xx_PORDEVSR_PCI1_PCI32;	/* PORDEVSR[15] */
 	uint pci_arb = gur->pordevsr & MPC85xx_PORDEVSR_PCI1_ARB;	/* PORDEVSR[14] */
 	uint pci_clk_sel = gur->porpllsr & MPC85xx_PORDEVSR_PCI1_SPD;	/* PORPLLSR[16] */
 
-	uint pci_agent = is_fsl_pci_agent(LAW_TRGT_IF_PCI_1, host_agent);
-
 	uint pci_speed = get_clock_freq ();	/* PCI PSPEED in [4:5] */
 
 	if (!(gur->devdisr & MPC85xx_DEVDISR_PCI1)) {
-		printf ("    PCI: %d bit, %s MHz, %s, %s, %s\n",
+		printf ("    PCI host: %d bit, %s MHz, %s, %s\n",
 			(pci_32) ? 32 : 64,
 			(pci_speed == 33333000) ? "33" :
 			(pci_speed == 66666000) ? "66" : "unknown",
 			pci_clk_sel ? "sync" : "async",
-			pci_agent ? "agent" : "host",
 			pci_arb ? "arbiter" : "external-arbiter"
 			);
 
@@ -392,12 +362,6 @@ pci_init_board(void)
 			       PCI_REGION_IO);
 		hose->region_count = r - hose->regions;
 
-		/* relocate config table pointers */
-		hose->config_table = \
-			(struct pci_config_table *)((uint)hose->config_table + gd->reloc_off);
-		for (table = hose->config_table; table && table->vendor; table++)
-			table->config_device += gd->reloc_off;
-
 		hose->first_busno=first_free_busno;
 
 		fsl_pci_init(hose, (u32)&pci->cfg_addr, (u32)&pci->cfg_data);
@@ -422,33 +386,18 @@ pci_init_board(void)
 	gur->devdisr |= MPC85xx_DEVDISR_PCI1; /* disable */
 #endif
 
-#ifdef CONFIG_PCI2
-{
-	uint pci2_clk_sel = gur->porpllsr & 0x4000;	/* PORPLLSR[17] */
-	uint pci_dual = get_pci_dual ();	/* PCI DUAL in CM_PCI[3] */
-	if (pci_dual) {
-		printf ("    PCI2: 32 bit, 66 MHz, %s\n",
-			pci2_clk_sel ? "sync" : "async");
-	} else {
-		printf ("    PCI2: disabled\n");
-	}
-}
-#else
-	gur->devdisr |= MPC85xx_DEVDISR_PCI2; /* disable */
-#endif /* CONFIG_PCI2 */
+	gur->devdisr |= MPC85xx_DEVDISR_PCI2; /* disable PCI2 */
 
 #ifdef CONFIG_PCIE1
 {
 	volatile ccsr_fsl_pci_t *pci = (ccsr_fsl_pci_t *) CONFIG_SYS_PCIE1_ADDR;
 	struct pci_controller *hose = &pcie1_hose;
-	int pcie_ep = is_fsl_pci_agent(LAW_TRGT_IF_PCIE_1, host_agent);
 	struct pci_region *r = hose->regions;
 
 	int pcie_configured = is_fsl_pci_cfg(LAW_TRGT_IF_PCIE_1, io_sel);
 
 	if (pcie_configured && !(gur->devdisr & MPC85xx_DEVDISR_PCIE)){
-		printf ("\n    PCIE connected to slot as %s (base address %x)",
-			pcie_ep ? "End Point" : "Root Complex",
+		printf ("\n    PCIE at base address %x",
 			(uint)pci);
 
 		if (pci->pme_msg_det) {
include/configs/sbc8548.h +0 -9
index 838b4db..3d05afb 100644
@@ -42,7 +42,6 @@
 #undef CONFIG_PCI1		/* PCI controller 1 */
 #undef CONFIG_PCIE1		/* PCIE controler 1 (slot 1) */
 #undef CONFIG_RIO
-#undef CONFIG_PCI2
 #undef CONFIG_FSL_PCI_INIT		/* Use common FSL init code */
 
 #define CONFIG_TSEC_ENET		/* tsec ethernet support */
@@ -343,14 +342,6 @@
 #define CONFIG_SYS_RIO_MEM_SIZE	0x20000000	/* 512M */
 #endif
 
-#ifdef CONFIG_LEGACY
-#define BRIDGE_ID 17
-#define VIA_ID 2
-#else
-#define BRIDGE_ID 28
-#define VIA_ID 4
-#endif
-
 #if defined(CONFIG_PCI)
 
 #define CONFIG_NET_MULTI
Signature · 1 line
1.6.4.1
#2 lore raw

PATCH 2/8 sbc8548: get_clock_freq is not valid for this board

The get_clock_freq() comes from freescale/common/cadmus.c and is only valid for the CDS based 85xx reference platforms. It would be nice if we could read the 33 vs. 66MHz status somehow, but in the meantime, tie it to CONFIG_SYS_CLK_FREQ like all the other non-CDS boards do.

---
 board/sbc8548/sbc8548.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
board/sbc8548/sbc8548.c +3 -3
index f4fd204..3104d37 100644
@@ -336,13 +336,13 @@ pci_init_board(void)
 	uint pci_arb = gur->pordevsr & MPC85xx_PORDEVSR_PCI1_ARB;	/* PORDEVSR[14] */
 	uint pci_clk_sel = gur->porpllsr & MPC85xx_PORDEVSR_PCI1_SPD;	/* PORPLLSR[16] */
 
-	uint pci_speed = get_clock_freq ();	/* PCI PSPEED in [4:5] */
+	uint pci_speed = CONFIG_SYS_CLK_FREQ;	/* get_clock_freq() */
 
 	if (!(gur->devdisr & MPC85xx_DEVDISR_PCI1)) {
 		printf ("    PCI host: %d bit, %s MHz, %s, %s\n",
 			(pci_32) ? 32 : 64,
-			(pci_speed == 33333000) ? "33" :
-			(pci_speed == 66666000) ? "66" : "unknown",
+			(pci_speed == 33000000) ? "33" :
+			(pci_speed == 66000000) ? "66" : "unknown",
 			pci_clk_sel ? "sync" : "async",
 			pci_arb ? "arbiter" : "external-arbiter"
 			);
Signature · 1 line
1.6.4.1
#3 lore raw

PATCH 3/8 sbc8548: enable access to second bank of flash

The sbc8548 has a 64MB SODIMM flash module off of CS6 that previously wasn't enumerated by u-boot. There were already BR6/OR6 settings for it [used by cpu_init_f()] but there was no TLB entry and it wasn't in the list of flash banks reported to u-boot.

The location of the 64MB flash is "pulled back" 8MB from a 64MB boundary, in order to allow address space for the 8MB boot flash that is at the end of 32 bit address space. This means creating two 4MB TLB entries for the 8MB chunk, and then expanding the original boot flash entry to 64MB in order to cover the 8MB boot flash and the remainder (56MB) of the user flash.

---
 board/sbc8548/tlb.c       |   26 ++++++++++++++++++++++----
 include/configs/sbc8548.h |    7 ++++---
 2 files changed, 26 insertions(+), 7 deletions(-)
board/sbc8548/tlb.c +22 -4
index 18d11f6..dbb9ba8 100644
@@ -42,13 +42,14 @@ struct fsl_e_tlb_entry tlb_table[] = {
 		      0, 0, BOOKE_PAGESZ_4K, 0),
 
 	/*
-	 * TLB 0:	16M	Non-cacheable, guarded
-	 * 0xff800000	16M	TLB for 8MB FLASH
+	 * TLB 0:	64M	Non-cacheable, guarded
+	 * 0xfc000000	56M	8MB -> 64MB of user flash
+	 * 0xff800000	8M	boot FLASH
 	 * Out of reset this entry is only 4K.
 	 */
-	SET_TLB_ENTRY(1, CONFIG_SYS_FLASH_BASE, CONFIG_SYS_FLASH_BASE,
+	SET_TLB_ENTRY(1, CONFIG_SYS_ALT_FLASH + 0x800000, CONFIG_SYS_ALT_FLASH + 0x800000,
 		      MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
-		      0, 0, BOOKE_PAGESZ_16M, 1),
+		      0, 0, BOOKE_PAGESZ_64M, 1),
 
 	/*
 	 * TLB 1:	256M	Non-cacheable, guarded
@@ -103,6 +104,23 @@ struct fsl_e_tlb_entry tlb_table[] = {
 	SET_TLB_ENTRY(1, CONFIG_SYS_EPLD_BASE, CONFIG_SYS_EPLD_BASE,
 		      MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
 		      0, 6, BOOKE_PAGESZ_16M, 1),
+
+	/*
+	 * TLB 7:	4M	Non-cacheable, guarded
+	 * 0xfb800000	4M	1st 4MB block of 64MB user FLASH
+	 */
+	SET_TLB_ENTRY(1, CONFIG_SYS_ALT_FLASH, CONFIG_SYS_ALT_FLASH,
+		      MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
+		      0, 7, BOOKE_PAGESZ_4M, 1),
+
+	/*
+	 * TLB 8:	4M	Non-cacheable, guarded
+	 * 0xfbc00000	4M	2nd 4MB block of 64MB user FLASH
+	 */
+	SET_TLB_ENTRY(1, CONFIG_SYS_ALT_FLASH + 0x400000, CONFIG_SYS_ALT_FLASH + 0x400000,
+		      MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
+		      0, 8, BOOKE_PAGESZ_4M, 1),
+
 };
 
 int num_tlb_entries = ARRAY_SIZE(tlb_table);
include/configs/sbc8548.h +4 -3
index 3d05afb..8edba20 100644
@@ -163,6 +163,7 @@
  */
 
 #define CONFIG_SYS_BOOT_BLOCK		0xff800000	/* start of 8MB Flash */
+#define CONFIG_SYS_ALT_FLASH		0xfb800000	/* 64MB "user" flash */
 #define CONFIG_SYS_FLASH_BASE		CONFIG_SYS_BOOT_BLOCK	/* start of FLASH 16M */
 
 #define CONFIG_SYS_BR0_PRELIM		0xff800801
@@ -171,9 +172,9 @@
 #define	CONFIG_SYS_OR0_PRELIM		0xff806e65
 #define	CONFIG_SYS_OR6_PRELIM		0xf8006e65
 
-#define CONFIG_SYS_FLASH_BANKS_LIST	{CONFIG_SYS_FLASH_BASE}
-#define CONFIG_SYS_MAX_FLASH_BANKS	1		/* number of banks */
-#define CONFIG_SYS_MAX_FLASH_SECT	128		/* sectors per device */
+#define CONFIG_SYS_FLASH_BANKS_LIST	{CONFIG_SYS_FLASH_BASE, CONFIG_SYS_ALT_FLASH}
+#define CONFIG_SYS_MAX_FLASH_BANKS	2		/* number of banks */
+#define CONFIG_SYS_MAX_FLASH_SECT	256		/* sectors per device */
 #undef	CONFIG_SYS_FLASH_CHECKSUM
 #define CONFIG_SYS_FLASH_ERASE_TOUT	60000	/* Flash Erase Timeout (ms) */
 #define CONFIG_SYS_FLASH_WRITE_TOUT	500	/* Flash Write Timeout (ms) */
Signature · 1 line
1.6.4.1
#4 lore raw

PATCH 4/8 sbc8548: correct local bus SDRAM size from 64M to 128M

The size of the LB SDRAM on this board is 128MB, spanning CS3 and CS4. It was previously only being configured for 64MB on CS3, since that was what the original codebase of the MPC8548CDS had. In addition to setting up BR4/OR4, this also adds the TLB entry for the second half of the SDRAM.

---
 board/sbc8548/sbc8548.c   |    8 +++++++-
 board/sbc8548/tlb.c       |   22 +++++++++++++++-------
 include/configs/sbc8548.h |   42 ++++++++++++++++++++++++++++++++++++++----
 3 files changed, 60 insertions(+), 12 deletions(-)
board/sbc8548/sbc8548.c +7 -1
index 3104d37..1db32ec 100644
@@ -152,7 +152,7 @@ local_bus_init(void)
 void
 sdram_init(void)
 {
-#if defined(CONFIG_SYS_OR3_PRELIM) && defined(CONFIG_SYS_BR3_PRELIM)
+#if defined(CONFIG_SYS_LBC_SDRAM_SIZE)
 
 	uint idx;
 	volatile ccsr_lbc_t *lbc = (void *)(CONFIG_SYS_MPC85xx_LBC_ADDR);
@@ -172,6 +172,12 @@ sdram_init(void)
 	lbc->br3 = CONFIG_SYS_BR3_PRELIM;
 	asm("msync");
 
+	lbc->or4 = CONFIG_SYS_OR4_PRELIM;
+	asm("msync");
+
+	lbc->br4 = CONFIG_SYS_BR4_PRELIM;
+	asm("msync");
+
 	lbc->lbcr = CONFIG_SYS_LBC_LBCR;
 	asm("msync");
 
board/sbc8548/tlb.c +15 -7
index dbb9ba8..e173245 100644
@@ -88,14 +88,22 @@ struct fsl_e_tlb_entry tlb_table[] = {
 
 	/*
 	 * TLB 5:	64M	Cacheable, non-guarded
-	 * 0xf0000000	64M	LBC SDRAM
+	 * 0xf0000000	64M	LBC SDRAM First half
 	 */
 	SET_TLB_ENTRY(1, CONFIG_SYS_LBC_SDRAM_BASE, CONFIG_SYS_LBC_SDRAM_BASE,
 		      MAS3_SX|MAS3_SW|MAS3_SR, 0,
 		      0, 5, BOOKE_PAGESZ_64M, 1),
 
 	/*
-	 * TLB 6:	16M	Cacheable, non-guarded
+	 * TLB 6:	64M	Cacheable, non-guarded
+	 * 0xf4000000	64M	LBC SDRAM Second half
+	 */
+	SET_TLB_ENTRY(1, CONFIG_SYS_LBC_SDRAM_BASE + 0x4000000, CONFIG_SYS_LBC_SDRAM_BASE + 0x4000000,
+		      MAS3_SX|MAS3_SW|MAS3_SR, 0,
+		      0, 6, BOOKE_PAGESZ_64M, 1),
+
+	/*
+	 * TLB 7:	16M	Cacheable, non-guarded
 	 * 0xf8000000	1M	7-segment LED display
 	 * 0xf8100000	1M	User switches
 	 * 0xf8300000	1M	Board revision
@@ -103,23 +111,23 @@ struct fsl_e_tlb_entry tlb_table[] = {
 	 */
 	SET_TLB_ENTRY(1, CONFIG_SYS_EPLD_BASE, CONFIG_SYS_EPLD_BASE,
 		      MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
-		      0, 6, BOOKE_PAGESZ_16M, 1),
+		      0, 7, BOOKE_PAGESZ_16M, 1),
 
 	/*
-	 * TLB 7:	4M	Non-cacheable, guarded
+	 * TLB 8:	4M	Non-cacheable, guarded
 	 * 0xfb800000	4M	1st 4MB block of 64MB user FLASH
 	 */
 	SET_TLB_ENTRY(1, CONFIG_SYS_ALT_FLASH, CONFIG_SYS_ALT_FLASH,
 		      MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
-		      0, 7, BOOKE_PAGESZ_4M, 1),
+		      0, 8, BOOKE_PAGESZ_4M, 1),
 
 	/*
-	 * TLB 8:	4M	Non-cacheable, guarded
+	 * TLB 9:	4M	Non-cacheable, guarded
 	 * 0xfbc00000	4M	2nd 4MB block of 64MB user FLASH
 	 */
 	SET_TLB_ENTRY(1, CONFIG_SYS_ALT_FLASH + 0x400000, CONFIG_SYS_ALT_FLASH + 0x400000,
 		      MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
-		      0, 8, BOOKE_PAGESZ_4M, 1),
+		      0, 9, BOOKE_PAGESZ_4M, 1),
 
 };
 
include/configs/sbc8548.h +38 -4

64 lines not on this page · raw message

Signature · 1 line
1.6.4.1
#5 lore raw

PATCH 5/8 sbc8548: update PCI/PCI-e support code

The PCI/PCI-e support for the sbc8548 was based on an earlier version of what the MPC8548CDS board was using, and in its current state it won't even compile. This re-syncs it to match current MPC85xxCDS/MDS PCI-e support.

It borrows from the MPC8568MDS, in that it pulls the PCI-e I/O back to 0xe280_0000 (where PCI2 would be on MPC8548CDS), and similarly it coalesces the PCI and PCI-e mem into one single TLB.

Both PCI-x and PCI-e have been tested with intel e1000 cards under linux (with an accompanying dts change in place)

---
 board/sbc8548/law.c       |   12 +++++++++-
 board/sbc8548/sbc8548.c   |    9 ++++---
 board/sbc8548/tlb.c       |   48 +++++++++++++++++++-------------------------
 include/configs/sbc8548.h |   43 +++++++++++++++++++++------------------
 4 files changed, 59 insertions(+), 53 deletions(-)
board/sbc8548/law.c +10 -2
index e8c7ae2..6d1efc0 100644
@@ -32,8 +32,10 @@
  *
  * 0x0000_0000	0x0fff_ffff	DDR			256M
  * 0x8000_0000	0x9fff_ffff	PCI1 MEM		512M
+ * 0xa000_0000	0xbfff_ffff	PCIe MEM		512M
  * 0xe000_0000	0xe000_ffff	CCSR			1M
- * 0xe200_0000	0xe2ff_ffff	PCI1 IO			16M
+ * 0xe200_0000	0xe27f_ffff	PCI1 IO			8M
+ * 0xe280_0000	0xe2ff_ffff	PCIe IO			8M
  * 0xf000_0000	0xf7ff_ffff	SDRAM			128M
  * 0xf8b0_0000	0xf80f_ffff	EEPROM			1M
  * 0xfb80_0000	0xff7f_ffff	FLASH (2nd bank)	64M
@@ -48,8 +50,14 @@ struct law_entry law_table[] = {
 #ifndef CONFIG_SPD_EEPROM
 	SET_LAW(CONFIG_SYS_DDR_SDRAM_BASE, LAW_SIZE_256M, LAW_TRGT_IF_DDR),
 #endif
+#ifdef CONFIG_SYS_PCI1_MEM_PHYS
 	SET_LAW(CONFIG_SYS_PCI1_MEM_PHYS, LAW_SIZE_512M, LAW_TRGT_IF_PCI),
-	SET_LAW(CONFIG_SYS_PCI1_IO_PHYS, LAW_SIZE_16M, LAW_TRGT_IF_PCI),
+	SET_LAW(CONFIG_SYS_PCI1_IO_PHYS, LAW_SIZE_8M, LAW_TRGT_IF_PCI),
+#endif
+#ifdef CONFIG_SYS_PCIE1_MEM_PHYS
+	SET_LAW(CONFIG_SYS_PCIE1_MEM_PHYS, LAW_SIZE_512M, LAW_TRGT_IF_PCIE_1),
+	SET_LAW(CONFIG_SYS_PCIE1_IO_PHYS, LAW_SIZE_8M, LAW_TRGT_IF_PCIE_1),
+#endif
 	/* LBC window - maps 256M 0xf0000000 -> 0xffffffff */
 	SET_LAW(CONFIG_SYS_LBC_SDRAM_BASE, LAW_SIZE_256M, LAW_TRGT_IF_LBC),
 };
board/sbc8548/sbc8548.c +5 -4
index 1db32ec..0387140 100644
@@ -355,14 +355,14 @@ pci_init_board(void)
 
 		/* outbound memory */
 		pci_set_region(r++,
-			       CONFIG_SYS_PCI1_MEM_BASE,
+			       CONFIG_SYS_PCI1_MEM_BUS,
 			       CONFIG_SYS_PCI1_MEM_PHYS,
 			       CONFIG_SYS_PCI1_MEM_SIZE,
 			       PCI_REGION_MEM);
 
 		/* outbound io */
 		pci_set_region(r++,
-			       CONFIG_SYS_PCI1_IO_BASE,
+			       CONFIG_SYS_PCI1_IO_BUS,
 			       CONFIG_SYS_PCI1_IO_PHYS,
 			       CONFIG_SYS_PCI1_IO_SIZE,
 			       PCI_REGION_IO);
@@ -400,6 +400,7 @@ pci_init_board(void)
 	struct pci_controller *hose = &pcie1_hose;
 	struct pci_region *r = hose->regions;
 
+	uint io_sel = (gur->pordevsr & MPC85xx_PORDEVSR_IO_SEL) >> 19;
 	int pcie_configured = is_fsl_pci_cfg(LAW_TRGT_IF_PCIE_1, io_sel);
 
 	if (pcie_configured && !(gur->devdisr & MPC85xx_DEVDISR_PCIE)){
@@ -414,14 +415,14 @@ pci_init_board(void)
 
 		/* outbound memory */
 		pci_set_region(r++,
-			       CONFIG_SYS_PCIE1_MEM_BASE,
+			       CONFIG_SYS_PCIE1_MEM_BUS,
 			       CONFIG_SYS_PCIE1_MEM_PHYS,
 			       CONFIG_SYS_PCIE1_MEM_SIZE,
 			       PCI_REGION_MEM);
 
 		/* outbound io */
 		pci_set_region(r++,
-			       CONFIG_SYS_PCIE1_IO_BASE,
+			       CONFIG_SYS_PCIE1_IO_BUS,
 			       CONFIG_SYS_PCIE1_IO_PHYS,
 			       CONFIG_SYS_PCIE1_IO_SIZE,
 			       PCI_REGION_IO);
board/sbc8548/tlb.c +21 -27

102 lines not on this page · raw message

include/configs/sbc8548.h +23 -20

61 lines not on this page · raw message

Signature · 1 line
1.6.4.1
#6 lore raw

PATCH 6/8 sbc8548: enable use of PCI network cards

Create a board_eth_init to allow a place to hook in the PCI ethernet init after all the eTSEC are up and configured.

---
 board/sbc8548/sbc8548.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
board/sbc8548/sbc8548.c +9 -0
index 0387140..c4dc5c5 100644
@@ -32,6 +32,8 @@
 #include <asm/fsl_pci.h>
 #include <asm/fsl_ddr_sdram.h>
 #include <spd_sdram.h>
+#include <netdev.h>
+#include <tsec.h>
 #include <miiphy.h>
 #include <libfdt.h>
 #include <fdt_support.h>
@@ -446,6 +448,13 @@ pci_init_board(void)
 
 }
 
+int board_eth_init(bd_t *bis)
+{
+	tsec_standard_init(bis);
+	pci_eth_init(bis);
+	return 0;	/* otherwise cpu_eth_init gets run */
+}
+
 int last_stage_init(void)
 {
 	return 0;
Signature · 1 line
1.6.4.1
#7 lore raw

PATCH 7/8 sbc8548: allow enabling PCI via a make config option

Prior to this commit, to enable PCI, you had to go manually edit the board config header, and if you had 33MHz PCI, you had to manually change CONFIG_SYS_NS16550_CLK too, which was not real user friendly,

This adds the typical PCI and clock speed make targets to the toplevel Makefile in accordance with what is being done with other boards.

---
 MAKEALL                   |    4 ++++
 Makefile                  |   26 ++++++++++++++++++++++++--
 include/configs/sbc8548.h |   13 ++++++++-----
 3 files changed, 36 insertions(+), 7 deletions(-)
MAKEALL +4 -0
index 1d50c34..b394adb 100755
@@ -399,6 +399,10 @@ LIST_85xx="		\
 	PM856		\
 	sbc8540		\
 	sbc8548		\
+	sbc8548_PCI_33	\
+	sbc8548_PCI_66	\
+	sbc8548_PCI_33_PCIE \
+	sbc8548_PCI_66_PCIE \
 	sbc8560		\
 	socrates	\
 	stxgp3		\
Makefile +24 -2
index 0b61d05..28b20af 100644
@@ -2570,8 +2570,30 @@ sbc8540_66_config:	unconfig
 	fi
 	@$(MKCONFIG) -a SBC8540 ppc mpc85xx sbc8560
 
-sbc8548_config:		unconfig
-	@$(MKCONFIG) $(@:_config=) ppc mpc85xx sbc8548
+sbc8548_config \
+sbc8548_PCI_33_config \
+sbc8548_PCI_66_config \
+sbc8548_PCI_33_PCIE_config \
+sbc8548_PCI_66_PCIE_config: unconfig
+	@mkdir -p $(obj)include
+	@if [ "$(findstring _PCI_,$@)" ] ; then \
+		$(XECHO) -n "... PCI HOST at " ; \
+		echo "#define CONFIG_PCI" >>$(obj)include/config.h ; \
+		echo "#define CONFIG_PCI1" >>$(obj)include/config.h ; \
+	fi ; \
+	if [ "$(findstring _33_,$@)" ] ; then \
+		$(XECHO) -n "33MHz ..." ; \
+		echo "#define CONFIG_SYS_CLK_DIV 2" >>$(obj)include/config.h ; \
+	fi ; \
+	if [ "$(findstring _66_,$@)" ] ; then \
+		$(XECHO) -n "66MHz...." ; \
+		echo "#define CONFIG_SYS_CLK_DIV 1" >>$(obj)include/config.h ; \
+	fi ; \
+	if [ "$(findstring _PCIE_,$@)" ] ; then \
+		$(XECHO) -n " with PCI-e ... " ; \
+		echo "#define CONFIG_PCIE1" >>$(obj)include/config.h ; \
+	fi
+	@$(MKCONFIG) -a sbc8548 ppc mpc85xx sbc8548
 
 sbc8560_config \
 sbc8560_33_config \
include/configs/sbc8548.h +8 -5
index e77e9e9..8eb5b4c 100644
@@ -38,9 +38,6 @@
 #define CONFIG_MPC8548		1	/* MPC8548 specific */
 #define CONFIG_SBC8548		1	/* SBC8548 board specific */
 
-#undef CONFIG_PCI		/* enable any pci type devices */
-#undef CONFIG_PCI1		/* PCI controller 1 */
-#undef CONFIG_PCIE1		/* PCIE controler 1 (slot 1) */
 #undef CONFIG_RIO
 
 #ifdef CONFIG_PCI
@@ -58,7 +55,13 @@
 
 #define CONFIG_FSL_LAW		1	/* Use common FSL init code */
 
-#define CONFIG_SYS_CLK_FREQ	66000000 /* SBC8548 default SYSCLK */
+/*
+ * Below assumes that CCB:SYSCLK remains unchanged at 6:1 via SW2:[1-4]
+ */
+#ifndef CONFIG_SYS_CLK_DIV
+#define CONFIG_SYS_CLK_DIV	1	/* 2, if 33MHz PCI card installed */
+#endif
+#define CONFIG_SYS_CLK_FREQ	(66000000 / CONFIG_SYS_CLK_DIV)
 
 /*
  * These can be toggled for performance analysis, otherwise use default.
@@ -315,7 +318,7 @@
 #define CONFIG_SYS_NS16550
 #define CONFIG_SYS_NS16550_SERIAL
 #define CONFIG_SYS_NS16550_REG_SIZE	1
-#define CONFIG_SYS_NS16550_CLK		400000000 /* get_bus_freq(0) */
+#define CONFIG_SYS_NS16550_CLK		(400000000 / CONFIG_SYS_CLK_DIV)
 
 #define CONFIG_SYS_BAUDRATE_TABLE \
 	{300, 600, 1200, 2400, 4800, 9600, 19200, 38400,115200}
Signature · 1 line
1.6.4.1
#8 lore raw

PATCH 8/8 sbc8548: replace README with completely new document

The previous README.sbc8548 was pretty much content-free. Replace it with something that actually gives the end user some relevant hardware details, and also lists the u-boot configuration choices.

Also in the cosmetic department, fix the bogus line in the Makefile that was carried over from the SBC8560 Makefile, and the typo in the sbc8548.c copyright.

---
 board/sbc8548/Makefile  |    4 +-
 board/sbc8548/sbc8548.c |    3 +-
 doc/README.sbc8548      |  189 ++++++++++++++++++++++++++++++++++++++++++-----
 3 files changed, 173 insertions(+), 23 deletions(-)
board/sbc8548/Makefile +2 -2
index 9919a6e..09e5c2e 100644
@@ -2,8 +2,8 @@
 # (C) Copyright 2004-2006
 # Wolfgang Denk, DENX Software Engineering, wd at denx.de.
 #
-# (C) Copyright 2004 Wind River Systems Inc <www.windriver.com>.
-# Added support for Wind River SBC8560 board
+# (C) Copyright 2007 Wind River Systems Inc <www.windriver.com>.
+# Added support for Wind River SBC8548 board
 #
 # See file CREDITS for list of people who contributed to this
 # project.
board/sbc8548/sbc8548.c +2 -1
index c4dc5c5..2978884 100644
@@ -1,5 +1,6 @@
 /*
- * Copyright 2007 Wind River Systemes, Inc. <www.windriver.com>
+ * Copyright 2007,2009 Wind River Systems, Inc. <www.windriver.com>
+ *
  * Copyright 2007 Embedded Specialties, Inc.
  *
  * Copyright 2004, 2007 Freescale Semiconductor.
doc/README.sbc8548 +169 -20

196 lines not on this page · raw message

Signature · 1 line
1.6.4.1
Applied
#9 lore raw

PATCH 8/8 sbc8548: replace README with completely new document

Quoted 8 lines · Paul Gortmaker

The previous README.sbc8548 was pretty much content-free. Replace it with something that actually gives the end user some relevant hardware details, and also lists the u-boot configuration choices.

Also in the cosmetic department, fix the bogus line in the Makefile that was carried over from the SBC8560 Makefile, and the typo in the sbc8548.c copyright.

Quoted 7 lines

---

board/sbc8548/Makefile  |    4 +-
board/sbc8548/sbc8548.c |    3 +-
doc/README.sbc8548      |  189 ++++++++++++++++++++++++++++++++++++++ 
++++-----
3 files changed, 173 insertions(+), 23 deletions(-)

applied to 85xx.

- k

#10 lore raw

PATCH 7/8 sbc8548: allow enabling PCI via a make config option

In reply to Paul Gortmaker
Quoted 37 lines · Paul Gortmaker

Prior to this commit, to enable PCI, you had to go manually edit the board config header, and if you had 33MHz PCI, you had to manually change CONFIG_SYS_NS16550_CLK too, which was not real user friendly,

This adds the typical PCI and clock speed make targets to the toplevel Makefile in accordance with what is being done with other boards.

---

MAKEALL                   |    4 ++++
Makefile                  |   26 ++++++++++++++++++++++++--
include/configs/sbc8548.h |   13 ++++++++-----
3 files changed, 36 insertions(+), 7 deletions(-)
MAKEALL +4 -0
index 1d50c34..b394adb 100755
@@ -399,6 +399,10 @@ LIST_85xx="		\
 	PM856		\
 	sbc8540		\
 	sbc8548		\
+	sbc8548_PCI_33	\
+	sbc8548_PCI_66	\
+	sbc8548_PCI_33_PCIE \
+	sbc8548_PCI_66_PCIE \
 	sbc8560		\
 	socrates	\
 	stxgp3		\
Makefile +0 -0
index 0b61d05..28b20af 100644
@@ -2570,8 +2570,30 @@ sbc8540_66_config:	unconfig
 	fi

Makefile sbc8540_66_config: unconfig · line 2578

Quoted 10 lines
Makefile +6 -2
 	@$(MKCONFIG) -a SBC8540 ppc mpc85xx sbc8560
 
-sbc8548_config:		unconfig
-	@$(MKCONFIG) $(@:_config=) ppc mpc85xx sbc8548
+sbc8548_config \
+sbc8548_PCI_33_config \
+sbc8548_PCI_66_config \
+sbc8548_PCI_33_PCIE_config \
+sbc8548_PCI_66_PCIE_config: unconfig
+	@mkdir -p $(obj)include

Use the new -t option to mkconfig:

commit 804d83a563c47b55e1f14f5de3b6e9d7e2a7ef5e

Author: Wolfgang Denk <[email protected]>
Date:   Tue Sep 15 22:12:31 2009 +0200

mkconfig: split the board make target to multiple config targets

To simplify the top level makefile it useful to be able to parse the top level makefile target to multiple individual target, then put them to the config.h, leave the board config file to handle the different targets.

Note that this method uses the '_'(underline) as the delimiter when splits the board make target.

This also reverts commit 511c02f611cb5afa1b8ca5980caaaabaa0de377f.

- k

Applied
#11 lore raw

PATCH 6/8 sbc8548: enable use of PCI network cards

In reply to Paul Gortmaker
Quoted 8 lines · Paul Gortmaker

Create a board_eth_init to allow a place to hook in the PCI ethernet init after all the eTSEC are up and configured.

---
board/sbc8548/sbc8548.c | 9 +++++++++

1 files changed, 9 insertions(+), 0 deletions(-)

applied to 85xx.

- k

#12 lore raw

PATCH 5/8 sbc8548: update PCI/PCI-e support code

In reply to Paul Gortmaker

Dear Paul Gortmaker,

Quoted 11 lines · In message <7d1e5723fdd2d2e1cf51559f876edf17ae8e7a46.1253315004.git.paul.gortma…

The PCI/PCI-e support for the sbc8548 was based on an earlier version of what the MPC8548CDS board was using, and in its current state it won't even compile. This re-syncs it to match current MPC85xxCDS/MDS PCI-e support.

It borrows from the MPC8568MDS, in that it pulls the PCI-e I/O back to 0xe280_0000 (where PCI2 would be on MPC8548CDS), and similarly it coalesces the PCI and PCI-e mem into one single TLB.

Both PCI-x and PCI-e have been tested with intel e1000 cards under linux (with an accompanying dts change in place)

...

Quoted 4 lines
board/sbc8548/sbc8548.c +0 -0
index 1db32ec..0387140 100644

...

board/sbc8548/sbc8548.c pci_init_board(void) · line 403

Quoted 5 lines
board/sbc8548/sbc8548.c +1 -0
@@ -400,6 +400,7 @@ pci_init_board(void)
 	struct pci_controller *hose = &pcie1_hose;
 	struct pci_region *r = hose->regions;
 
+	uint io_sel = (gur->pordevsr & MPC85xx_PORDEVSR_IO_SEL) >> 19;

Please use I/O accessors. Check globally, please.

Best regards,

Wolfgang Denk

Signature · 4 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The only perfect science is hind-sight.
#13 lore raw

PATCH 5/8 sbc8548: update PCI/PCI-e support code

Quoted 20 lines · Wolfgang Denk

Dear Paul Gortmaker,

Quoted 11 lines · In message <7d1e5723fdd2d2e1cf51559f876edf17ae8e7a46.1253315004.git.paul.gortma…

The PCI/PCI-e support for the sbc8548 was based on an earlier version of what the MPC8548CDS board was using, and in its current state it won't even compile. This re-syncs it to match current MPC85xxCDS/MDS PCI-e support.

It borrows from the MPC8568MDS, in that it pulls the PCI-e I/O back to 0xe280_0000 (where PCI2 would be on MPC8548CDS), and similarly it coalesces the PCI and PCI-e mem into one single TLB.

Both PCI-x and PCI-e have been tested with intel e1000 cards under linux (with an accompanying dts change in place)

...

Quoted 4 lines
board/sbc8548/sbc8548.c +0 -0
index 1db32ec..0387140 100644

...

Quoted 7 lines

board/sbc8548/sbc8548.c pci_init_board(void) · line 403

Quoted 5 lines
board/sbc8548/sbc8548.c +1 -0
@@ -400,6 +400,7 @@ pci_init_board(void)
 	struct pci_controller *hose = &pcie1_hose;
 	struct pci_region *r = hose->regions;
 
+	uint io_sel = (gur->pordevsr & MPC85xx_PORDEVSR_IO_SEL) >> 19;

Please use I/O accessors. Check globally, please.

Already done - commit 48539e37c38c4f6ff78aba6134de2ae3cc3b5dab in the 85xx tree does a global sweep of the board file, and commit ac2cb674bd5dd1405ea0413adb71c253481d9a00 (also in 85xx) is an updated version of this commit that uses the I/O accessors, and also the new PCI helper functions that Kumar requested.

Thanks,
Paul.

Quoted 6 lines

Best regards,

Wolfgang Denk

#14 lore raw

PATCH 4/8 sbc8548: correct local bus SDRAM size from 64M to 128M

In reply to Paul Gortmaker
Quoted 29 lines · Paul Gortmaker

The size of the LB SDRAM on this board is 128MB, spanning CS3 and CS4. It was previously only being configured for 64MB on CS3, since that was what the original codebase of the MPC8548CDS had. In addition to setting up BR4/OR4, this also adds the TLB entry for the second half of the SDRAM.

---

board/sbc8548/sbc8548.c   |    8 +++++++-
board/sbc8548/tlb.c       |   22 +++++++++++++++-------
include/configs/sbc8548.h |   42 ++++++++++++++++++++++++++++++++++++ 
++----
3 files changed, 60 insertions(+), 12 deletions(-)
board/sbc8548/sbc8548.c +0 -0
index 3104d37..1db32ec 100644
@@ -152,7 +152,7 @@ local_bus_init(void)

void
sdram_init(void)
{

board/sbc8548/sbc8548.c +1 -1
-#if defined(CONFIG_SYS_OR3_PRELIM) && defined(CONFIG_SYS_BR3_PRELIM)
+#if defined(CONFIG_SYS_LBC_SDRAM_SIZE)
	uint idx;
	volatile ccsr_lbc_t *lbc = (void *)(CONFIG_SYS_MPC85xx_LBC_ADDR);
board/sbc8548/sbc8548.c +0 -0
@@ -172,6 +172,12 @@ sdram_init(void)
 	lbc->br3 = CONFIG_SYS_BR3_PRELIM;

board/sbc8548/sbc8548.c sdram_init(void) · line 182

Quoted 10 lines
board/sbc8548/sbc8548.c +6 -0
 	asm("msync");
 
+	lbc->or4 = CONFIG_SYS_OR4_PRELIM;
+	asm("msync");
+
+	lbc->br4 = CONFIG_SYS_BR4_PRELIM;
+	asm("msync");
+
 	lbc->lbcr = CONFIG_SYS_LBC_LBCR;
 	asm("msync");

it would be nice to move this to using IO accessors (out_be32)

- k

#15 lore raw

PATCH 4/8 sbc8548: correct local bus SDRAM size from 64M to 128M

Dear Kumar Gala,

Quoted 2 lines · In message <[email protected]> you wrote:

On Sep 18, 2009, at 6:08 PM, Paul Gortmaker wrote:

...

Quoted 1 line

it would be nice to move this to using IO accessors (out_be32)

Not only nice, but necessary. Thanks for catching this.

Best regards,

Wolfgang Denk

Signature · 6 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
My brother sent me a postcard the other day with this  big  sattelite
photo  of the entire earth on it. On the back it said: "Wish you were
here".                                                - Steven Wright
#16 lore raw

PATCH 4/8 sbc8548: correct local bus SDRAM size from 64M to 128M

In reply to Paul Gortmaker

Dear Paul Gortmaker,

Quoted 5 lines · In message <8c4c3a2e238ee8ef67637f499cc3269acbb1bf00.1253315004.git.paul.gortma…

The size of the LB SDRAM on this board is 128MB, spanning CS3 and CS4. It was previously only being configured for 64MB on CS3, since that was what the original codebase of the MPC8548CDS had. In addition to setting up BR4/OR4, this also adds the TLB entry for the second half of the SDRAM.

...

board/sbc8548/tlb.c struct fsl_e_tlb_entry tlb_table[] = { · line 101

Quoted 4 lines
board/sbc8548/tlb.c +4 -0
+	 * TLB 6:	64M	Cacheable, non-guarded
+	 * 0xf4000000	64M	LBC SDRAM Second half
+	 */
+	SET_TLB_ENTRY(1, CONFIG_SYS_LBC_SDRAM_BASE + 0x4000000, CONFIG_SYS_LBC_SDRAM_BASE + 0x4000000,

Line too long. Please check globally.

...

Quoted 1 line

SET_TLB_ENTRY(1, CONFIG_SYS_ALT_FLASH + 0x400000, CONFIG_SYS_ALT_FLASH + 0x400000,

Please also fix this one, while you are there.

Best regards,

Wolfgang Denk

Signature · 4 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Of all the things I've lost, I miss my mind the most.
Applied
#17 lore raw

PATCH 3/8 sbc8548: enable access to second bank of flash

In reply to Paul Gortmaker
Quoted 14 lines · Paul Gortmaker

The sbc8548 has a 64MB SODIMM flash module off of CS6 that previously wasn't enumerated by u-boot. There were already BR6/OR6 settings for it [used by cpu_init_f()] but there was no TLB entry and it wasn't in the list of flash banks reported to u-boot.

The location of the 64MB flash is "pulled back" 8MB from a 64MB boundary, in order to allow address space for the 8MB boot flash that is at the end of 32 bit address space. This means creating two 4MB TLB entries for the 8MB chunk, and then expanding the original boot flash entry to 64MB in order to cover the 8MB boot flash and the remainder (56MB) of the user flash.

Quoted 5 lines

---
board/sbc8548/tlb.c | 26 ++++++++++++++++++++++----
include/configs/sbc8548.h | 7 ++++---

2 files changed, 26 insertions(+), 7 deletions(-)

applied to 85xx.

- k

#18 lore raw

PATCH 3/8 sbc8548: enable access to second bank of flash

Dear Kumar Gala,

Quoted 2 lines · In message <[email protected]> you wrote:

On Sep 18, 2009, at 6:08 PM, Paul Gortmaker wrote:

...

Quoted 1 line

applied to 85xx.

Argh... So how much time do you allow for code reviews?

I ask you to wait at least 3...5 working days, please.

Please undo, this needs fixing.

Best regards,

Wolfgang Denk

Signature · 6 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Pig: An animal (Porcus omnivorous) closely allied to the  human  race
by  the splendor and vivacity of its appetite, which, however, is in-
ferior in scope, for it balks at pig.                - Ambrose Bierce
#19 lore raw

PATCH 3/8 sbc8548: enable access to second bank of flash

Quoted 5 lines · Wolfgang Denk

Dear Kumar Gala,

Quoted 1 line · In message <[email protected]> you wrote:

On Sep 18, 2009, at 6:08 PM, Paul Gortmaker wrote:

...

Quoted 8 lines
Quoted 1 line

applied to 85xx.

Argh... So how much time do you allow for code reviews?

I ask you to wait at least 3...5 working days, please.

Please undo, this needs fixing.

I'd considered the line length, but there were many lines in tlb.c that were already way past 80 char (see directly under the
comment /* TLB 0 - for temp stack in cache */ ) so I
decided to be consistent with existing code.

If you prefer, I can create an add-on patch that re-wraps both the old/existing code, and the updated line(s).

Let me know what you would prefer.

Paul.

Quoted 5 lines

Best regards,

Wolfgang Denk

#20 lore raw

PATCH 3/8 sbc8548: enable access to second bank of flash

Dear Paul Gortmaker,

Quoted 5 lines · In message <[email protected]> you wrote:

I'd considered the line length, but there were many lines in tlb.c that were already way past 80 char (see directly under the
comment /* TLB 0 - for temp stack in cache */ ) so I
decided to be consistent with existing code.

I see.

Quoted 2 lines

If you prefer, I can create an add-on patch that re-wraps both the old/existing code, and the updated line(s).

It would be better to fix the existing code in an initial patch, and then apply an update patch.

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
It's hard to think of you as the end result of millions of  years  of
evolution.
#21 lore raw

PATCH 3/8 sbc8548: enable access to second bank of flash

Quoted 9 lines · [Re: [U-Boot] [PATCH 3/8] sbc8548: enable access to second bank of flash] On…

Dear Paul Gortmaker,

Quoted 5 lines · In message <[email protected]> you wrote:

I'd considered the line length, but there were many lines in tlb.c that were already way past 80 char (see directly under the
comment /* TLB 0 - for temp stack in cache */ ) so I
decided to be consistent with existing code.

Quoted 7 lines

I see.

Quoted 2 lines

If you prefer, I can create an add-on patch that re-wraps both the old/existing code, and the updated line(s).

It would be better to fix the existing code in an initial patch, and then apply an update patch.

To do this, I've rewound my copy of the 85xx repo to just before the 1st offending patch, inserted the cosmetic line wrap patch, and then re-applied all the remaining 85xx updates that I was responsible for.

The patches are all unchanged, with the exception of re-wrapping any long lines in tlb.c -- which impacted the patches marked with a "*"

I hope this what you had in mind. If not, or if you want patches in e-mail then let me know.

Thanks,
Paul.

---

The following changes since commit 80f0cc6009a7bfdbb1458fcd50c4592badd33f83:
Paul Gortmaker (1):
sbc8548: get_clock_freq is not valid for this board

are available in the git repository at:

git://openlinux.windriver.com/people/paulg/u-boot wd-sbc8548

Paul Gortmaker (9):
sbc8548: cosmetic line re-wrap
* sbc8548: enable access to second bank of flash
sbc8548: remove eTSEC3/4 voltage hack
sbc8548: use I/O accessors
* sbc8548: correct local bus SDRAM size from 64M to 128M
fsl_pci: create a SET_STD_PCI_INFO() helper wrapper
* sbc8548: update PCI/PCI-e support code
sbc8548: allow enabling PCI via a make config option
sbc85x0: tidy up Makefile to use new configuration script.

 MAKEALL                   |    4 +
 Makefile                  |   26 ++----
 board/sbc8548/law.c       |   12 ++-
 board/sbc8548/sbc8548.c   |  234 +++++++++++++++++---------------------------
 board/sbc8548/tlb.c       |   80 ++++++++++-----
 include/asm-ppc/fsl_pci.h |   12 +++
 include/configs/SBC8540.h |   19 ++--
 include/configs/sbc8548.h |  137 +++++++++++++++++++-------
 include/configs/sbc8560.h |   17 +++-
 9 files changed, 300 insertions(+), 241 deletions(-)
#22 lore raw

PATCH 3/8 sbc8548: enable access to second bank of flash

In reply to Paul Gortmaker

Dear Paul Gortmaker,

Quoted 13 lines · In message <918ca661b391ce156f39e6c8a086ea93d845caea.1253315004.git.paul.gortma…

The sbc8548 has a 64MB SODIMM flash module off of CS6 that previously wasn't enumerated by u-boot. There were already BR6/OR6 settings for it [used by cpu_init_f()] but there was no TLB entry and it wasn't in the list of flash banks reported to u-boot.

The location of the 64MB flash is "pulled back" 8MB from a 64MB boundary, in order to allow address space for the 8MB boot flash that is at the end of 32 bit address space. This means creating two 4MB TLB entries for the 8MB chunk, and then expanding the original boot flash entry to 64MB in order to cover the 8MB boot flash and the remainder (56MB) of the user flash.

...
...

board/sbc8548/tlb.c struct fsl_e_tlb_entry tlb_table[] = { · line 50

Quoted 2 lines
board/sbc8548/tlb.c +1 -1
-	SET_TLB_ENTRY(1, CONFIG_SYS_FLASH_BASE, CONFIG_SYS_FLASH_BASE,
+	SET_TLB_ENTRY(1, CONFIG_SYS_ALT_FLASH + 0x800000, CONFIG_SYS_ALT_FLASH + 0x800000,

Line too long.

board/sbc8548/tlb.c struct fsl_e_tlb_entry tlb_table[] = { · line 120

Quoted 5 lines
board/sbc8548/tlb.c +5 -0
+	/*
+	 * TLB 8:	4M	Non-cacheable, guarded
+	 * 0xfbc00000	4M	2nd 4MB block of 64MB user FLASH
+	 */
+	SET_TLB_ENTRY(1, CONFIG_SYS_ALT_FLASH + 0x400000, CONFIG_SYS_ALT_FLASH + 0x400000,

Ditto.

Quoted 1 line

+#define CONFIG_SYS_FLASH_BANKS_LIST {CONFIG_SYS_FLASH_BASE, CONFIG_SYS_ALT_FLASH}

Ditto.

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Unsichtbar macht sich die Dummheit, indem sie immer  gr??ere  Ausma?e
annimmt.                             -- Bertold Brecht: Der Tui-Roman
Applied
#23 lore raw

PATCH 2/8 sbc8548: get_clock_freq is not valid for this board

In reply to Paul Gortmaker
Quoted 10 lines · Paul Gortmaker

The get_clock_freq() comes from freescale/common/cadmus.c and is only valid for the CDS based 85xx reference platforms. It would be nice if we could read the 33 vs. 66MHz status somehow, but in the meantime, tie it to CONFIG_SYS_CLK_FREQ like all the other non-CDS boards do.

---
board/sbc8548/sbc8548.c | 6 +++---

1 files changed, 3 insertions(+), 3 deletions(-)

applied to 85xx.

- k

#24 lore raw

PATCH 1/8 sbc8548: delete unused MPC8548CDS info carried over from port

In reply to Paul Gortmaker
Quoted 13 lines · Paul Gortmaker

There are a couple defines and PCI bridge quirks related to the PCI backplane of the MPC8548CDS that have no meaning in the context of the port to the sbc8548 board, so delete them.

Also, the form factor of the sbc8548 is a standalone board with a single PCI-X and a single PCI-e slot. That pretty much guarantees that it will never be a PCI agent itself, so the host/agent and root complex/end node distinctions have been removed.

Similarly, since there is no physical connector mapping to PCI2, so all references of PCI2 in the board support files have been removed as well.

Quoted 6 lines

---
board/sbc8548/sbc8548.c | 63 +++

+----------------------------------------
include/configs/sbc8548.h |    9 ------
2 files changed, 6 insertions(+), 66 deletions(-)

Can we look at using fsl_pci_init_port()?

See my recent patches for p2020/mpc8572ds/mpc8536ds

- k

#25 lore raw

PATCH 1/8 sbc8548: delete unused MPC8548CDS info carried over from port

Quoted 16 lines · Kumar Gala
Quoted 13 lines · Paul Gortmaker

There are a couple defines and PCI bridge quirks related to the PCI backplane of the MPC8548CDS that have no meaning in the context of the port to the sbc8548 board, so delete them.

Also, the form factor of the sbc8548 is a standalone board with a single PCI-X and a single PCI-e slot. That pretty much guarantees that it will never be a PCI agent itself, so the host/agent and root complex/end node distinctions have been removed.

Similarly, since there is no physical connector mapping to PCI2, so all references of PCI2 in the board support files have been removed as well.

Quoted 8 lines
Quoted 6 lines

---
board/sbc8548/sbc8548.c | 63
++++----------------------------------------
include/configs/sbc8548.h | 9 ------

2 files changed, 6 insertions(+), 66 deletions(-)

Can we look at using fsl_pci_init_port()?

Sure.

Quoted 2 lines

See my recent patches for p2020/mpc8572ds/mpc8536ds

What did you have in mind - me creating a similar patch like the above to layer on what I've got now, or is there a preference for me to munge the same change into the existing 5/8 PCI update patch? I guess the former gives an extra bisection point...

P.

Quoted 2 lines

- k

#26 lore raw

PATCH 1/8 sbc8548: delete unused MPC8548CDS info carried over from port

Quoted 25 lines · Paul Gortmaker
Quoted 14 lines · Kumar Gala
Quoted 13 lines · Paul Gortmaker

There are a couple defines and PCI bridge quirks related to the PCI backplane of the MPC8548CDS that have no meaning in the context of the port to the sbc8548 board, so delete them.

Also, the form factor of the sbc8548 is a standalone board with a single PCI-X and a single PCI-e slot. That pretty much guarantees that it will never be a PCI agent itself, so the host/agent and root complex/end node distinctions have been removed.

Similarly, since there is no physical connector mapping to PCI2, so all references of PCI2 in the board support files have been removed as well.

Quoted 7 lines
Quoted 6 lines

---
board/sbc8548/sbc8548.c | 63 +++

+----------------------------------------
include/configs/sbc8548.h |    9 ------
2 files changed, 6 insertions(+), 66 deletions(-)

Can we look at using fsl_pci_init_port()?

Sure.

Quoted 7 lines
Quoted 1 line

See my recent patches for p2020/mpc8572ds/mpc8536ds

What did you have in mind - me creating a similar patch like the above to layer on what I've got now, or is there a preference for me to munge the same change into the existing 5/8 PCI update patch? I guess the former gives an extra bisection point...

Which ever works for you, the later sounds a bit easier to review.

- k

Applied
#27 lore raw

PATCH 1/8 sbc8548: delete unused MPC8548CDS info carried over from port

In reply to Paul Gortmaker
Quoted 13 lines · Paul Gortmaker

There are a couple defines and PCI bridge quirks related to the PCI backplane of the MPC8548CDS that have no meaning in the context of the port to the sbc8548 board, so delete them.

Also, the form factor of the sbc8548 is a standalone board with a single PCI-X and a single PCI-e slot. That pretty much guarantees that it will never be a PCI agent itself, so the host/agent and root complex/end node distinctions have been removed.

Similarly, since there is no physical connector mapping to PCI2, so all references of PCI2 in the board support files have been removed as well.

Quoted 6 lines

---
board/sbc8548/sbc8548.c | 63 +++

+----------------------------------------
include/configs/sbc8548.h |    9 ------
2 files changed, 6 insertions(+), 66 deletions(-)

applied to 85xx.

- k