[U-Boot-Users] [PATCH 1/2] Updated patch to add SBC8641D

Jon Loeliger jdl at freescale.com
Mon Aug 6 18:51:06 CEST 2007


On Mon, 2007-08-06 at 09:27, Joe Hamman wrote:
> Add support for Wind River's SBC8641D reference board.
> 
> Resend to add fixes per JDL.

Thanks.


> diff -uprN -X dontdiff u-boot/board/sbc8641d/sbc8641d.c u-boot-esi/board/sbc8641d/sbc8641d.c
> --- u-boot/board/sbc8641d/sbc8641d.c	1969-12-31 18:00:00.000000000 -0600
> +++ u-boot-esi/board/sbc8641d/sbc8641d.c	2007-08-06 08:30:56.000000000 -0500
> @@ -0,0 +1,326 @@

> +
> +int checkboard (void)
> +{
> +	puts ("Board: Wind River SBC8641D\n");
> +
> +#ifdef CONFIG_PCI
> +
> +	volatile immap_t *immap = (immap_t *) CFG_CCSRBAR;
> +	volatile ccsr_gur_t *gur = &immap->im_gur;
> +	volatile ccsr_pex_t *pex1 = &immap->im_pex1;
> +
> +	uint devdisr = gur->devdisr;
> +	uint io_sel = (gur->pordevsr & MPC86xx_PORDEVSR_IO_SEL) >> 16;
> +	uint host1_agent = (gur->porbmsr & MPC86xx_PORBMSR_HA) >> 17;
> +	uint pex1_agent = (host1_agent == 0) || (host1_agent == 1);
> +
> +	if ((io_sel == 2 || io_sel == 3 || io_sel == 5
> +	     || io_sel == 6 || io_sel == 7 || io_sel == 0xF)
> +	    && !(devdisr & MPC86xx_DEVDISR_PCIEX1)) {
> +		debug ("PCI-EXPRESS 1: %s \n", pex1_agent ? "Agent" : "Host");
> +		debug ("0x%08x=0x%08x ", &pex1->pme_msg_det, pex1->pme_msg_det);
> +		if (pex1->pme_msg_det) {
> +			pex1->pme_msg_det = 0xffffffff;
> +			debug (" with errors.  Clearing.  Now 0x%08x",
> +			       pex1->pme_msg_det);
> +		}
> +		debug ("\n");
> +	} else {
> +		puts ("PCI-EXPRESS 1: Disabled in hardware\n");
> +	}
> +
> +#else
> +	puts ("PCI-EXPRESS1: Disabled in configuration\n");
> +#endif
> +
> +	return 0;
> +}


Urg.  Sorry to do this to you, Joe...  I just realized you haven't
adjusted for the new, common PCI/PCI-E effort underway here at FSL
for the 86xx and 85xx boards.

I'm not exactly sure what your PCI config will end up looking like,
or what it needs to be, but this initialization sequence will need
to be adjusted some, I suspect.

With any luck, you really can just cut most of this out, and
simply adopt the code has it recently was pulled into mainline
just a few hours ago.  (Yes, even as we speak, I'm working on
bringing the -mpc86xx custodian tree up to date WRT that still.)

Sorry.

> +
> +SECTIONS
> +{
> +
> +  /* Read-only sections, merged into text segment: */
> +  .interp : { *(.interp) }
> +  .hash          : { *(.hash)		}
> +  .dynsym        : { *(.dynsym)		}
> +  .dynstr        : { *(.dynstr)		}
> +  .rel.text      : { *(.rel.text)		}
> +  .rela.text     : { *(.rela.text) 	}
> +  .rel.data      : { *(.rel.data)		}
> +  .rela.data     : { *(.rela.data) 	}
> +  .rel.rodata    : { *(.rel.rodata) 	}
> +  .rela.rodata   : { *(.rela.rodata) 	}
> +  .rel.got       : { *(.rel.got)		}
> +  .rela.got      : { *(.rela.got)		}
> +  .rel.ctors     : { *(.rel.ctors)	}
> +  .rela.ctors    : { *(.rela.ctors)	}
> +  .rel.dtors     : { *(.rel.dtors)	}
> +  .rela.dtors    : { *(.rela.dtors)	}
> +  .rel.bss       : { *(.rel.bss)		}
> +  .rela.bss      : { *(.rela.bss)		}
> +  .rel.plt       : { *(.rel.plt)		}
> +  .rela.plt      : { *(.rela.plt)		}
> +  .init          : { *(.init)	}
> +  .plt : { *(.plt) }
> +  .text      :
> +  {
> +    cpu/mpc86xx/start.o	(.text)
> +    board/sbc8641d/init.o (.bootpg)
> +    cpu/mpc86xx/traps.o (.text)
> +    cpu/mpc86xx/interrupts.o (.text)
> +    cpu/mpc86xx/cpu_init.o (.text)
> +    cpu/mpc86xx/cpu.o (.text)
> +    cpu/mpc86xx/speed.o (.text)
> +    cpu/mpc86xx/pci.o (.text)
> +    common/dlmalloc.o (.text)
> +    lib_generic/crc32.o (.text)
> +    lib_ppc/extable.o (.text)
> +    lib_generic/zlib.o (.text)
> +    *(.text)
> +    *(.fixup)
> +    *(.got1)
> +   }


I confess, I haven't had a chance to look yet, but just while
we're here.....  Does the above loader script work in the new
way that all of Grant's loader-script changes introduced?


> diff -uprN -X dontdiff u-boot/config.mk u-boot-esi/config.mk
> --- u-boot/config.mk	2007-07-31 08:19:57.000000000 -0500
> +++ u-boot-esi/config.mk	2007-07-31 13:05:14.000000000 -0500
> @@ -134,7 +134,7 @@ ARFLAGS = crv
>  endif
>  RELFLAGS= $(PLATFORM_RELFLAGS)
>  DBGFLAGS= -g # -DDEBUG
> -OPTFLAGS= -Os #-fomit-frame-pointer
> +OPTFLAGS= -O1 #-fomit-frame-pointer
>  ifndef LDSCRIPT
>  #LDSCRIPT := $(TOPDIR)/board/$(BOARDDIR)/u-boot.lds.debug
>  ifeq ($(CONFIG_NAND_U_BOOT),y)


Erg.  Yeah, as Wolfgang indicated. :-)

jdl






More information about the U-Boot mailing list