diff options
Diffstat (limited to 'board/amcc')
37 files changed, 121 insertions, 4155 deletions
| diff --git a/board/amcc/acadia/config.mk b/board/amcc/acadia/config.mk index 290415c9d..01db41c37 100644 --- a/board/amcc/acadia/config.mk +++ b/board/amcc/acadia/config.mk @@ -34,3 +34,7 @@ endif  ifeq ($(debug),1)  PLATFORM_CPPFLAGS += -DDEBUG  endif + +ifdef CONFIG_NAND_U_BOOT +LDSCRIPT := $(TOPDIR)/board/$(BOARDDIR)/u-boot-nand.lds +endif diff --git a/board/amcc/acadia/u-boot.lds b/board/amcc/acadia/u-boot.lds deleted file mode 100644 index d37200d8b..000000000 --- a/board/amcc/acadia/u-boot.lds +++ /dev/null @@ -1,134 +0,0 @@ -/* - * (C) Copyright 2000 - * Wolfgang Denk, DENX Software Engineering, wd@denx.de. - * - * See file CREDITS for list of people who contributed to this - * project. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, - * MA 02111-1307 USA - */ - -OUTPUT_ARCH(powerpc) -/* Do we need any of these for elf? -   __DYNAMIC = 0;    */ -SECTIONS -{ -  .resetvec 0xFFFFFFFC : -  { -    *(.resetvec) -  } = 0xffff - -  /* Read-only sections, merged into text segment: */ -  . = + SIZEOF_HEADERS; -  .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      : -  { -    /* WARNING - the following is hand-optimized to fit within	*/ -    /* the sector layout of our flash chips!	XXX FIXME XXX	*/ - -    cpu/ppc4xx/start.o	(.text) - -    *(.text) -    *(.got1) -  } -  _etext = .; -  PROVIDE (etext = .); -  .rodata    : -  { -    *(.eh_frame) -    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) -  } -  .fini      : { *(.fini)    } =0 -  .ctors     : { *(.ctors)   } -  .dtors     : { *(.dtors)   } - -  /* Read-write section, merged into data segment: */ -  . = (. + 0x00FF) & 0xFFFFFF00; -  _erotext = .; -  PROVIDE (erotext = .); -  .reloc   : -  { -    *(.got) -    _GOT2_TABLE_ = .; -    *(.got2) -    _FIXUP_TABLE_ = .; -    *(.fixup) -  } -  __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >>2; -  __fixup_entries = (. - _FIXUP_TABLE_)>>2; - -  .data    : -  { -    *(.data) -    *(.data1) -    *(.sdata) -    *(.sdata2) -    *(.dynamic) -    CONSTRUCTORS -  } -  _edata  =  .; -  PROVIDE (edata = .); - -  . = .; -  __u_boot_cmd_start = .; -  .u_boot_cmd : { *(.u_boot_cmd) } -  __u_boot_cmd_end = .; - -  . = .; -  __start___ex_table = .; -  __ex_table : { *(__ex_table) } -  __stop___ex_table = .; - -  . = ALIGN(256); -  __init_begin = .; -  .text.init : { *(.text.init) } -  .data.init : { *(.data.init) } -  . = ALIGN(256); -  __init_end = .; - -  __bss_start = .; -  .bss (NOLOAD)       : -  { -   *(.sbss) *(.scommon) -   *(.dynbss) -   *(.bss) -   *(COMMON) -   . = ALIGN(4); -  } -  _end = . ; -  PROVIDE (end = .); -} diff --git a/board/amcc/bamboo/bamboo.c b/board/amcc/bamboo/bamboo.c index 2598f2cf4..c90f86b8d 100644 --- a/board/amcc/bamboo/bamboo.c +++ b/board/amcc/bamboo/bamboo.c @@ -466,166 +466,6 @@ phys_size_t initdram (int board_type)  #endif  } -/************************************************************************* - *  pci_pre_init - * - *  This routine is called just prior to registering the hose and gives - *  the board the opportunity to check things. Returning a value of zero - *  indicates that things are bad & PCI initialization should be aborted. - * - *	Different boards may wish to customize the pci controller structure - *	(add regions, override default access routines, etc) or perform - *	certain pre-initialization actions. - * - ************************************************************************/ -#if defined(CONFIG_PCI) -int pci_pre_init(struct pci_controller *hose) -{ -	unsigned long addr; - -	/*-------------------------------------------------------------------------+ -	  | Set priority for all PLB3 devices to 0. -	  | Set PLB3 arbiter to fair mode. -	  +-------------------------------------------------------------------------*/ -	mfsdr(SD0_AMP1, addr); -	mtsdr(SD0_AMP1, (addr & 0x000000FF) | 0x0000FF00); -	addr = mfdcr(PLB3_ACR); -	mtdcr(PLB3_ACR, addr | 0x80000000); - -	/*-------------------------------------------------------------------------+ -	  | Set priority for all PLB4 devices to 0. -	  +-------------------------------------------------------------------------*/ -	mfsdr(SD0_AMP0, addr); -	mtsdr(SD0_AMP0, (addr & 0x000000FF) | 0x0000FF00); -	addr = mfdcr(PLB4_ACR) | 0xa0000000;	/* Was 0x8---- */ -	mtdcr(PLB4_ACR, addr); - -	/*-------------------------------------------------------------------------+ -	  | Set Nebula PLB4 arbiter to fair mode. -	  +-------------------------------------------------------------------------*/ -	/* Segment0 */ -	addr = (mfdcr(PLB0_ACR) & ~PLB0_ACR_PPM_MASK) | PLB0_ACR_PPM_FAIR; -	addr = (addr & ~PLB0_ACR_HBU_MASK) | PLB0_ACR_HBU_ENABLED; -	addr = (addr & ~PLB0_ACR_RDP_MASK) | PLB0_ACR_RDP_4DEEP; -	addr = (addr & ~PLB0_ACR_WRP_MASK) | PLB0_ACR_WRP_2DEEP; -	mtdcr(PLB0_ACR, addr); - -	/* Segment1 */ -	addr = (mfdcr(PLB1_ACR) & ~PLB1_ACR_PPM_MASK) | PLB1_ACR_PPM_FAIR; -	addr = (addr & ~PLB1_ACR_HBU_MASK) | PLB1_ACR_HBU_ENABLED; -	addr = (addr & ~PLB1_ACR_RDP_MASK) | PLB1_ACR_RDP_4DEEP; -	addr = (addr & ~PLB1_ACR_WRP_MASK) | PLB1_ACR_WRP_2DEEP; -	mtdcr(PLB1_ACR, addr); - -	return 1; -} -#endif /* defined(CONFIG_PCI) */ - -/************************************************************************* - *  pci_target_init - * - *	The bootstrap configuration provides default settings for the pci - *	inbound map (PIM). But the bootstrap config choices are limited and - *	may not be sufficient for a given board. - * - ************************************************************************/ -#if defined(CONFIG_PCI) && defined(CONFIG_SYS_PCI_TARGET_INIT) -void pci_target_init(struct pci_controller *hose) -{ -	/*--------------------------------------------------------------------------+ -	 * Set up Direct MMIO registers -	 *--------------------------------------------------------------------------*/ -	/*--------------------------------------------------------------------------+ -	  | PowerPC440 EP PCI Master configuration. -	  | Map one 1Gig range of PLB/processor addresses to PCI memory space. -	  |   PLB address 0xA0000000-0xDFFFFFFF ==> PCI address 0xA0000000-0xDFFFFFFF -	  |   Use byte reversed out routines to handle endianess. -	  | Make this region non-prefetchable. -	  +--------------------------------------------------------------------------*/ -	out32r(PCIL0_PMM0MA, 0x00000000);	/* PMM0 Mask/Attribute - disabled b4 setting */ -	out32r(PCIL0_PMM0LA, CONFIG_SYS_PCI_MEMBASE);	/* PMM0 Local Address */ -	out32r(PCIL0_PMM0PCILA, CONFIG_SYS_PCI_MEMBASE);	/* PMM0 PCI Low Address */ -	out32r(PCIL0_PMM0PCIHA, 0x00000000);	/* PMM0 PCI High Address */ -	out32r(PCIL0_PMM0MA, 0xE0000001);	/* 512M + No prefetching, and enable region */ - -	out32r(PCIL0_PMM1MA, 0x00000000);	/* PMM0 Mask/Attribute - disabled b4 setting */ -	out32r(PCIL0_PMM1LA, CONFIG_SYS_PCI_MEMBASE2); /* PMM0 Local Address */ -	out32r(PCIL0_PMM1PCILA, CONFIG_SYS_PCI_MEMBASE2);	/* PMM0 PCI Low Address */ -	out32r(PCIL0_PMM1PCIHA, 0x00000000);	/* PMM0 PCI High Address */ -	out32r(PCIL0_PMM1MA, 0xE0000001);	/* 512M + No prefetching, and enable region */ - -	out32r(PCIL0_PTM1MS, 0x00000001);	/* Memory Size/Attribute */ -	out32r(PCIL0_PTM1LA, 0);	/* Local Addr. Reg */ -	out32r(PCIL0_PTM2MS, 0);	/* Memory Size/Attribute */ -	out32r(PCIL0_PTM2LA, 0);	/* Local Addr. Reg */ - -	/*--------------------------------------------------------------------------+ -	 * Set up Configuration registers -	 *--------------------------------------------------------------------------*/ - -	/* Program the board's subsystem id/vendor id */ -	pci_write_config_word(0, PCI_SUBSYSTEM_VENDOR_ID, -			      CONFIG_SYS_PCI_SUBSYS_VENDORID); -	pci_write_config_word(0, PCI_SUBSYSTEM_ID, CONFIG_SYS_PCI_SUBSYS_ID); - -	/* Configure command register as bus master */ -	pci_write_config_word(0, PCI_COMMAND, PCI_COMMAND_MASTER); - -	/* 240nS PCI clock */ -	pci_write_config_word(0, PCI_LATENCY_TIMER, 1); - -	/* No error reporting */ -	pci_write_config_word(0, PCI_ERREN, 0); - -	pci_write_config_dword(0, PCI_BRDGOPT2, 0x00000101); - -} -#endif				/* defined(CONFIG_PCI) && defined(CONFIG_SYS_PCI_TARGET_INIT) */ - -/************************************************************************* - *  pci_master_init - * - ************************************************************************/ -#if defined(CONFIG_PCI) && defined(CONFIG_SYS_PCI_MASTER_INIT) -void pci_master_init(struct pci_controller *hose) -{ -	unsigned short temp_short; - -	/*--------------------------------------------------------------------------+ -	  | Write the PowerPC440 EP PCI Configuration regs. -	  |   Enable PowerPC440 EP to be a master on the PCI bus (PMM). -	  |   Enable PowerPC440 EP to act as a PCI memory target (PTM). -	  +--------------------------------------------------------------------------*/ -	pci_read_config_word(0, PCI_COMMAND, &temp_short); -	pci_write_config_word(0, PCI_COMMAND, -			      temp_short | PCI_COMMAND_MASTER | -			      PCI_COMMAND_MEMORY); -} -#endif				/* defined(CONFIG_PCI) && defined(CONFIG_SYS_PCI_MASTER_INIT) */ - -/************************************************************************* - *  is_pci_host - * - *	This routine is called to determine if a pci scan should be - *	performed. With various hardware environments (especially cPCI and - *	PPMC) it's insufficient to depend on the state of the arbiter enable - *	bit in the strap register, or generic host/adapter assumptions. - * - *	Rather than hard-code a bad assumption in the general 440 code, the - *	440 pci code requires the board to decide at runtime. - * - *	Return 0 for adapter mode, non-zero for host (monarch) mode. - * - * - ************************************************************************/ -#if defined(CONFIG_PCI) -int is_pci_host(struct pci_controller *hose) -{ -	/* Bamboo is always configured as host. */ -	return (1); -} -#endif				/* defined(CONFIG_PCI) */ -  /*----------------------------------------------------------------------------+    | is_powerpc440ep_pass1.    +----------------------------------------------------------------------------*/ diff --git a/board/amcc/bamboo/config.mk b/board/amcc/bamboo/config.mk index a37636a0a..72b6bc0c0 100644 --- a/board/amcc/bamboo/config.mk +++ b/board/amcc/bamboo/config.mk @@ -36,3 +36,7 @@ endif  ifeq ($(dbcr),1)  PLATFORM_CPPFLAGS += -DCONFIG_SYS_INIT_DBCR=0x8cff0000  endif + +ifdef CONFIG_NAND_U_BOOT +LDSCRIPT := $(TOPDIR)/board/$(BOARDDIR)/u-boot-nand.lds +endif diff --git a/board/amcc/bamboo/u-boot.lds b/board/amcc/bamboo/u-boot.lds deleted file mode 100644 index bcde534df..000000000 --- a/board/amcc/bamboo/u-boot.lds +++ /dev/null @@ -1,143 +0,0 @@ -/* - * (C) Copyright 2002 - * Wolfgang Denk, DENX Software Engineering, wd@denx.de. - * - * See file CREDITS for list of people who contributed to this - * project. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, - * MA 02111-1307 USA - */ - -OUTPUT_ARCH(powerpc) -/* Do we need any of these for elf? -   __DYNAMIC = 0;    */ -SECTIONS -{ -  .resetvec 0xFFFFFFFC : -  { -    *(.resetvec) -  } = 0xffff - -  .bootpg 0xFFFFF000 : -  { -    cpu/ppc4xx/start.o	(.bootpg) -  } = 0xffff - -  /* Read-only sections, merged into text segment: */ -  . = + SIZEOF_HEADERS; -  .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      : -  { -    /* WARNING - the following is hand-optimized to fit within	*/ -    /* the sector layout of our flash chips!	XXX FIXME XXX	*/ - -    cpu/ppc4xx/start.o	(.text) -    board/amcc/bamboo/init.o	(.text) -    board/amcc/bamboo/bamboo.o	(.text) - -    *(.text) -    *(.got1) -  } -  _etext = .; -  PROVIDE (etext = .); -  .rodata    : -  { -    *(.eh_frame) -    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) -  } -  .fini      : { *(.fini)    } =0 -  .ctors     : { *(.ctors)   } -  .dtors     : { *(.dtors)   } - -  /* Read-write section, merged into data segment: */ -  . = (. + 0x00FF) & 0xFFFFFF00; -  _erotext = .; -  PROVIDE (erotext = .); -  .reloc   : -  { -    *(.got) -    _GOT2_TABLE_ = .; -    *(.got2) -    _FIXUP_TABLE_ = .; -    *(.fixup) -  } -  __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >>2; -  __fixup_entries = (. - _FIXUP_TABLE_)>>2; - -  .data    : -  { -    *(.data) -    *(.data1) -    *(.sdata) -    *(.sdata2) -    *(.dynamic) -    CONSTRUCTORS -  } -  _edata  =  .; -  PROVIDE (edata = .); - -  . = .; -  __u_boot_cmd_start = .; -  .u_boot_cmd : { *(.u_boot_cmd) } -  __u_boot_cmd_end = .; - - -  . = .; -  __start___ex_table = .; -  __ex_table : { *(__ex_table) } -  __stop___ex_table = .; - -  . = ALIGN(256); -  __init_begin = .; -  .text.init : { *(.text.init) } -  .data.init : { *(.data.init) } -  . = ALIGN(256); -  __init_end = .; - -  __bss_start = .; -  .bss (NOLOAD)       : -  { -   *(.sbss) *(.scommon) -   *(.dynbss) -   *(.bss) -   *(COMMON) -   . = ALIGN(4); -  } - -  _end = . ; -  PROVIDE (end = .); -} diff --git a/board/amcc/bubinga/u-boot.lds b/board/amcc/bubinga/u-boot.lds deleted file mode 100644 index d37200d8b..000000000 --- a/board/amcc/bubinga/u-boot.lds +++ /dev/null @@ -1,134 +0,0 @@ -/* - * (C) Copyright 2000 - * Wolfgang Denk, DENX Software Engineering, wd@denx.de. - * - * See file CREDITS for list of people who contributed to this - * project. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, - * MA 02111-1307 USA - */ - -OUTPUT_ARCH(powerpc) -/* Do we need any of these for elf? -   __DYNAMIC = 0;    */ -SECTIONS -{ -  .resetvec 0xFFFFFFFC : -  { -    *(.resetvec) -  } = 0xffff - -  /* Read-only sections, merged into text segment: */ -  . = + SIZEOF_HEADERS; -  .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      : -  { -    /* WARNING - the following is hand-optimized to fit within	*/ -    /* the sector layout of our flash chips!	XXX FIXME XXX	*/ - -    cpu/ppc4xx/start.o	(.text) - -    *(.text) -    *(.got1) -  } -  _etext = .; -  PROVIDE (etext = .); -  .rodata    : -  { -    *(.eh_frame) -    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) -  } -  .fini      : { *(.fini)    } =0 -  .ctors     : { *(.ctors)   } -  .dtors     : { *(.dtors)   } - -  /* Read-write section, merged into data segment: */ -  . = (. + 0x00FF) & 0xFFFFFF00; -  _erotext = .; -  PROVIDE (erotext = .); -  .reloc   : -  { -    *(.got) -    _GOT2_TABLE_ = .; -    *(.got2) -    _FIXUP_TABLE_ = .; -    *(.fixup) -  } -  __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >>2; -  __fixup_entries = (. - _FIXUP_TABLE_)>>2; - -  .data    : -  { -    *(.data) -    *(.data1) -    *(.sdata) -    *(.sdata2) -    *(.dynamic) -    CONSTRUCTORS -  } -  _edata  =  .; -  PROVIDE (edata = .); - -  . = .; -  __u_boot_cmd_start = .; -  .u_boot_cmd : { *(.u_boot_cmd) } -  __u_boot_cmd_end = .; - -  . = .; -  __start___ex_table = .; -  __ex_table : { *(__ex_table) } -  __stop___ex_table = .; - -  . = ALIGN(256); -  __init_begin = .; -  .text.init : { *(.text.init) } -  .data.init : { *(.data.init) } -  . = ALIGN(256); -  __init_end = .; - -  __bss_start = .; -  .bss (NOLOAD)       : -  { -   *(.sbss) *(.scommon) -   *(.dynbss) -   *(.bss) -   *(COMMON) -   . = ALIGN(4); -  } -  _end = . ; -  PROVIDE (end = .); -} diff --git a/board/amcc/canyonlands/canyonlands.c b/board/amcc/canyonlands/canyonlands.c index 91fae1917..13a0daced 100644 --- a/board/amcc/canyonlands/canyonlands.c +++ b/board/amcc/canyonlands/canyonlands.c @@ -326,141 +326,17 @@ phys_size_t initdram(int board_type)  }  #endif -/* - *  pci_target_init - * - *	The bootstrap configuration provides default settings for the pci - *	inbound map (PIM). But the bootstrap config choices are limited and - *	may not be sufficient for a given board. - */ -#if defined(CONFIG_PCI) && defined(CONFIG_SYS_PCI_TARGET_INIT) -void pci_target_init(struct pci_controller * hose ) -{ -	/* -	 * Disable everything -	 */ -	out_le32((void *)PCIL0_PIM0SA, 0); /* disable */ -	out_le32((void *)PCIL0_PIM1SA, 0); /* disable */ -	out_le32((void *)PCIL0_PIM2SA, 0); /* disable */ -	out_le32((void *)PCIL0_EROMBA, 0); /* disable expansion rom */ - -	/* -	 * Map all of SDRAM to PCI address 0x0000_0000. Note that the 440 -	 * strapping options to not support sizes such as 128/256 MB. -	 */ -	out_le32((void *)PCIL0_PIM0LAL, CONFIG_SYS_SDRAM_BASE); -	out_le32((void *)PCIL0_PIM0LAH, 0); -	out_le32((void *)PCIL0_PIM0SA, ~(gd->ram_size - 1) | 1); -	out_le32((void *)PCIL0_BAR0, 0); - -	/* -	 * Program the board's subsystem id/vendor id -	 */ -	out_le16((void *)PCIL0_SBSYSVID, CONFIG_SYS_PCI_SUBSYS_VENDORID); -	out_le16((void *)PCIL0_SBSYSID, CONFIG_SYS_PCI_SUBSYS_DEVICEID); - -	out_le16((void *)PCIL0_CMD, in16r(PCIL0_CMD) | PCI_COMMAND_MEMORY); -} -#endif	/* defined(CONFIG_PCI) && defined(CONFIG_SYS_PCI_TARGET_INIT) */ -  #if defined(CONFIG_PCI) -/* - * is_pci_host - * - * This routine is called to determine if a pci scan should be - * performed. With various hardware environments (especially cPCI and - * PPMC) it's insufficient to depend on the state of the arbiter enable - * bit in the strap register, or generic host/adapter assumptions. - * - * Rather than hard-code a bad assumption in the general 440 code, the - * 440 pci code requires the board to decide at runtime. - * - * Return 0 for adapter mode, non-zero for host (monarch) mode. - */ -int is_pci_host(struct pci_controller *hose) -{ -	/* Board is always configured as host. */ -	return (1); -} - -static struct pci_controller pcie_hose[2] = {{0},{0}}; - -void pcie_setup_hoses(int busno) +int board_pcie_first(void)  { -	struct pci_controller *hose; -	int i, bus; -	int ret = 0; -	char *env; -	unsigned int delay; -	int start; - -	/* -	 * assume we're called after the PCIX hose is initialized, which takes -	 * bus ID 0 and therefore start numbering PCIe's from 1. -	 */ -	bus = busno; -  	/*  	 * Canyonlands with SATA enabled has only one PCIe slot  	 * (2nd one).  	 */  	if (gd->board_type == BOARD_CANYONLANDS_SATA) -		start = 1; -	else -		start = 0; - -	for (i = start; i <= 1; i++) { - -		if (is_end_point(i)) -			ret = ppc4xx_init_pcie_endport(i); -		else -			ret = ppc4xx_init_pcie_rootport(i); -		if (ret == -ENODEV) -			continue; -		if (ret) { -			printf("PCIE%d: initialization as %s failed\n", i, -			       is_end_point(i) ? "endpoint" : "root-complex"); -			continue; -		} - -		hose = &pcie_hose[i]; -		hose->first_busno = bus; -		hose->last_busno = bus; -		hose->current_busno = bus; - -		/* setup mem resource */ -		pci_set_region(hose->regions + 0, -			       CONFIG_SYS_PCIE_MEMBASE + i * CONFIG_SYS_PCIE_MEMSIZE, -			       CONFIG_SYS_PCIE_MEMBASE + i * CONFIG_SYS_PCIE_MEMSIZE, -			       CONFIG_SYS_PCIE_MEMSIZE, -			       PCI_REGION_MEM); -		hose->region_count = 1; -		pci_register_hose(hose); - -		if (is_end_point(i)) { -			ppc4xx_setup_pcie_endpoint(hose, i); -			/* -			 * Reson for no scanning is endpoint can not generate -			 * upstream configuration accesses. -			 */ -		} else { -			ppc4xx_setup_pcie_rootpoint(hose, i); -			env = getenv ("pciscandelay"); -			if (env != NULL) { -				delay = simple_strtoul(env, NULL, 10); -				if (delay > 5) -					printf("Warning, expect noticable delay before " -					       "PCIe scan due to 'pciscandelay' value!\n"); -				mdelay(delay * 1000); -			} +		return 1; -			/* -			 * Config access can only go down stream -			 */ -			hose->last_busno = pci_hose_scan(hose); -			bus = hose->last_busno + 1; -		} -	} +	return 0;  }  #endif /* CONFIG_PCI */ diff --git a/board/amcc/canyonlands/config.mk b/board/amcc/canyonlands/config.mk index 551a81755..7a5866550 100644 --- a/board/amcc/canyonlands/config.mk +++ b/board/amcc/canyonlands/config.mk @@ -39,3 +39,7 @@ endif  ifeq ($(dbcr),1)  PLATFORM_CPPFLAGS += -DCONFIG_SYS_INIT_DBCR=0x8cff0000  endif + +ifdef CONFIG_NAND_U_BOOT +LDSCRIPT := $(TOPDIR)/board/$(BOARDDIR)/u-boot-nand.lds +endif diff --git a/board/amcc/canyonlands/u-boot.lds b/board/amcc/canyonlands/u-boot.lds deleted file mode 100644 index 22fb8b8d4..000000000 --- a/board/amcc/canyonlands/u-boot.lds +++ /dev/null @@ -1,141 +0,0 @@ -/* - * (C) Copyright 2008 - * Wolfgang Denk, DENX Software Engineering, wd@denx.de. - * - * See file CREDITS for list of people who contributed to this - * project. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, - * MA 02111-1307 USA - */ - -OUTPUT_ARCH(powerpc) -/* Do we need any of these for elf? -   __DYNAMIC = 0;    */ -SECTIONS -{ -  .resetvec 0xFFFFFFFC : -  { -    *(.resetvec) -  } = 0xffff - -  .bootpg 0xFFFFF000 : -  { -    cpu/ppc4xx/start.o	(.bootpg) -  } = 0xffff - -  /* Read-only sections, merged into text segment: */ -  . = + SIZEOF_HEADERS; -  .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      : -  { -    /* WARNING - the following is hand-optimized to fit within	*/ -    /* the sector layout of our flash chips!	XXX FIXME XXX	*/ - -    cpu/ppc4xx/start.o	(.text) -    board/amcc/canyonlands/init.o	(.text) - -    *(.text) -    *(.got1) -  } -  _etext = .; -  PROVIDE (etext = .); -  .rodata    : -  { -    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) -  } -  .fini      : { *(.fini)    } =0 -  .ctors     : { *(.ctors)   } -  .dtors     : { *(.dtors)   } - -  /* Read-write section, merged into data segment: */ -  . = (. + 0x00FF) & 0xFFFFFF00; -  _erotext = .; -  PROVIDE (erotext = .); -  .reloc   : -  { -    *(.got) -    _GOT2_TABLE_ = .; -    *(.got2) -    _FIXUP_TABLE_ = .; -    *(.fixup) -  } -  __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >>2; -  __fixup_entries = (. - _FIXUP_TABLE_)>>2; - -  .data    : -  { -    *(.data) -    *(.data1) -    *(.sdata) -    *(.sdata2) -    *(.dynamic) -    CONSTRUCTORS -  } -  _edata  =  .; -  PROVIDE (edata = .); - -  . = .; -  __u_boot_cmd_start = .; -  .u_boot_cmd : { *(.u_boot_cmd) } -  __u_boot_cmd_end = .; - - -  . = .; -  __start___ex_table = .; -  __ex_table : { *(__ex_table) } -  __stop___ex_table = .; - -  . = ALIGN(256); -  __init_begin = .; -  .text.init : { *(.text.init) } -  .data.init : { *(.data.init) } -  . = ALIGN(256); -  __init_end = .; - -  __bss_start = .; -  .bss       : -  { -   *(.sbss) *(.scommon) -   *(.dynbss) -   *(.bss) -   *(COMMON) -   . = ALIGN(4); -  } - -  _end = . ; -  PROVIDE (end = .); -} diff --git a/board/amcc/ebony/ebony.c b/board/amcc/ebony/ebony.c index 0ca1accec..923dbca71 100644 --- a/board/amcc/ebony/ebony.c +++ b/board/amcc/ebony/ebony.c @@ -164,96 +164,3 @@ long int fixed_sdram(void)  	return (128 * 1024 * 1024);	/* 128 MB                           */  }  #endif				/* !defined(CONFIG_SPD_EEPROM) */ - -/************************************************************************* - *  pci_pre_init - * - *  This routine is called just prior to registering the hose and gives - *  the board the opportunity to check things. Returning a value of zero - *  indicates that things are bad & PCI initialization should be aborted. - * - *	Different boards may wish to customize the pci controller structure - *	(add regions, override default access routines, etc) or perform - *	certain pre-initialization actions. - * - ************************************************************************/ -#if defined(CONFIG_PCI) -int pci_pre_init(struct pci_controller *hose) -{ -	unsigned long strap; - -	/*--------------------------------------------------------------------------+ -	 * The ebony board is always configured as the host & requires the -	 * PCI arbiter to be enabled. -	 *--------------------------------------------------------------------------*/ -	strap = mfdcr(CPC0_STRP1); -	if ((strap & 0x00100000) == 0) { -		printf("PCI: CPC0_STRP1[PAE] not set.\n"); -		return 0; -	} - -	return 1; -} -#endif	/* defined(CONFIG_PCI) */ - -/************************************************************************* - *  pci_target_init - * - *	The bootstrap configuration provides default settings for the pci - *	inbound map (PIM). But the bootstrap config choices are limited and - *	may not be sufficient for a given board. - * - ************************************************************************/ -#if defined(CONFIG_PCI) && defined(CONFIG_SYS_PCI_TARGET_INIT) -void pci_target_init(struct pci_controller *hose) -{ -	/*--------------------------------------------------------------------------+ -	 * Disable everything -	 *--------------------------------------------------------------------------*/ -	out32r(PCIL0_PIM0SA, 0);	/* disable */ -	out32r(PCIL0_PIM1SA, 0);	/* disable */ -	out32r(PCIL0_PIM2SA, 0);	/* disable */ -	out32r(PCIL0_EROMBA, 0);	/* disable expansion rom */ - -	/*--------------------------------------------------------------------------+ -	 * Map all of SDRAM to PCI address 0x0000_0000. Note that the 440 strapping -     * options to not support sizes such as 128/256 MB. -	 *--------------------------------------------------------------------------*/ -	out32r(PCIL0_PIM0LAL, CONFIG_SYS_SDRAM_BASE); -	out32r(PCIL0_PIM0LAH, 0); -	out32r(PCIL0_PIM0SA, ~(gd->ram_size - 1) | 1); - -	out32r(PCIL0_BAR0, 0); - -	/*--------------------------------------------------------------------------+ -	 * Program the board's subsystem id/vendor id -	 *--------------------------------------------------------------------------*/ -	out16r(PCIL0_SBSYSVID, CONFIG_SYS_PCI_SUBSYS_VENDORID); -	out16r(PCIL0_SBSYSID, CONFIG_SYS_PCI_SUBSYS_DEVICEID); - -	out16r(PCIL0_CMD, in16r(PCIL0_CMD) | PCI_COMMAND_MEMORY); -} -#endif				/* defined(CONFIG_PCI) && defined(CONFIG_SYS_PCI_TARGET_INIT) */ - -/************************************************************************* - *  is_pci_host - * - *	This routine is called to determine if a pci scan should be - *	performed. With various hardware environments (especially cPCI and - *	PPMC) it's insufficient to depend on the state of the arbiter enable - *	bit in the strap register, or generic host/adapter assumptions. - * - *	Rather than hard-code a bad assumption in the general 440 code, the - *	440 pci code requires the board to decide at runtime. - * - *	Return 0 for adapter mode, non-zero for host (monarch) mode. - * - * - ************************************************************************/ -#if defined(CONFIG_PCI) -int is_pci_host(struct pci_controller *hose) -{ -	/* The ebony board is always configured as host. */ -	return (1); -} -#endif				/* defined(CONFIG_PCI) */ diff --git a/board/amcc/ebony/u-boot.lds b/board/amcc/ebony/u-boot.lds deleted file mode 100644 index 4cb2e6c92..000000000 --- a/board/amcc/ebony/u-boot.lds +++ /dev/null @@ -1,141 +0,0 @@ -/* - * (C) Copyright 2002 - * Wolfgang Denk, DENX Software Engineering, wd@denx.de. - * - * See file CREDITS for list of people who contributed to this - * project. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, - * MA 02111-1307 USA - */ - -OUTPUT_ARCH(powerpc) -/* Do we need any of these for elf? -   __DYNAMIC = 0;    */ -SECTIONS -{ -  .resetvec 0xFFFFFFFC : -  { -    *(.resetvec) -  } = 0xffff - -  .bootpg 0xFFFFF000 : -  { -    cpu/ppc4xx/start.o	(.bootpg) -  } = 0xffff - -  /* Read-only sections, merged into text segment: */ -  . = + SIZEOF_HEADERS; -  .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      : -  { -    /* WARNING - the following is hand-optimized to fit within	*/ -    /* the sector layout of our flash chips!	XXX FIXME XXX	*/ - -    cpu/ppc4xx/start.o	(.text) -    board/amcc/ebony/init.o	(.text) - -    *(.text) -    *(.got1) -  } -  _etext = .; -  PROVIDE (etext = .); -  .rodata    : -  { -    *(.eh_frame) -    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) -  } -  .fini      : { *(.fini)    } =0 -  .ctors     : { *(.ctors)   } -  .dtors     : { *(.dtors)   } - -  /* Read-write section, merged into data segment: */ -  . = (. + 0x00FF) & 0xFFFFFF00; -  _erotext = .; -  PROVIDE (erotext = .); -  .reloc   : -  { -    *(.got) -    _GOT2_TABLE_ = .; -    *(.got2) -    _FIXUP_TABLE_ = .; -    *(.fixup) -  } -  __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >>2; -  __fixup_entries = (. - _FIXUP_TABLE_)>>2; - -  .data    : -  { -    *(.data) -    *(.data1) -    *(.sdata) -    *(.sdata2) -    *(.dynamic) -    CONSTRUCTORS -  } -  _edata  =  .; -  PROVIDE (edata = .); - -  . = .; -  __u_boot_cmd_start = .; -  .u_boot_cmd : { *(.u_boot_cmd) } -  __u_boot_cmd_end = .; - - -  . = .; -  __start___ex_table = .; -  __ex_table : { *(__ex_table) } -  __stop___ex_table = .; - -  . = ALIGN(256); -  __init_begin = .; -  .text.init : { *(.text.init) } -  .data.init : { *(.data.init) } -  . = ALIGN(256); -  __init_end = .; - -  __bss_start = .; -  .bss (NOLOAD)       : -  { -   *(.sbss) *(.scommon) -   *(.dynbss) -   *(.bss) -   *(COMMON) -   . = ALIGN(4); -  } -  _end = . ; -  PROVIDE (end = .); -} diff --git a/board/amcc/katmai/Makefile b/board/amcc/katmai/Makefile index 318016d2c..168bab5d2 100644 --- a/board/amcc/katmai/Makefile +++ b/board/amcc/katmai/Makefile @@ -25,9 +25,11 @@ include $(TOPDIR)/config.mk  LIB	= $(obj)lib$(BOARD).a -COBJS	= $(BOARD).o cmd_katmai.o +COBJS-y	:= $(BOARD).o +COBJS-$(CONFIG_CMD_CHIP_CONFIG) += chip_config.o  SOBJS	= init.o +COBJS   := $(COBJS-y)  SRCS	:= $(SOBJS:.o=.S) $(COBJS:.o=.c)  OBJS	:= $(addprefix $(obj),$(COBJS))  SOBJS	:= $(addprefix $(obj),$(SOBJS)) diff --git a/board/amcc/katmai/chip_config.c b/board/amcc/katmai/chip_config.c new file mode 100644 index 000000000..efaf3787c --- /dev/null +++ b/board/amcc/katmai/chip_config.c @@ -0,0 +1,55 @@ +/* + * (C) Copyright 2009 + * Stefan Roese, DENX Software Engineering, sr@denx.de. + * + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + */ + +#include <common.h> +#include <asm/ppc4xx_config.h> + +struct ppc4xx_config ppc4xx_config_val[] = { +	{ +		"400-133","CPU: 400 PLB: 133 OPB:  66 EBC:  66", +		{ 0x86, 0x78, 0xc2, 0xc6, 0x05, 0xa5, 0x04, 0xe1 } +	}, +	{ +		"500-166","CPU: 500 PLB: 166 OPB:  83 EBC:  83", +		{ 0x87, 0x78, 0xf2, 0xc6, 0x05, 0xa5, 0x04, 0xe1 } +	}, +	{ +		"533-133","CPU: 533 PLB: 133 OPB:  66 EBC:  66", +		{ 0x87, 0x79, 0x02, 0x52, 0x05, 0xa5, 0x04, 0xe1 } +	}, +	{ +		"667-133","CPU: 667 PLB: 133 OPB:  66 EBC:  66", +		{ 0x87, 0x79, 0x42, 0x56, 0x05, 0xa5, 0x04, 0xe1 } +	}, +	{ +		"667-166","CPU: 667 PLB: 166 OPB:  83 EBC:  83", +		{ 0x87, 0x79, 0x42, 0x06, 0x05, 0xa5, 0x04, 0xe1 } +	}, +	{ +		"800-160","CPU: 800 PLB: 160 OPB:  53 EBC:  17", +		{ 0x86, 0x79, 0x81, 0xa7, 0x07, 0xa5, 0x04, 0xe1 } +	}, +}; + +int ppc4xx_config_count = ARRAY_SIZE(ppc4xx_config_val); diff --git a/board/amcc/katmai/cmd_katmai.c b/board/amcc/katmai/cmd_katmai.c deleted file mode 100644 index 335d30c36..000000000 --- a/board/amcc/katmai/cmd_katmai.c +++ /dev/null @@ -1,218 +0,0 @@ -/* - * (C) Copyright 2007 - * Stefan Roese, DENX Software Engineering, sr@denx.de. - * - * See file CREDITS for list of people who contributed to this - * project. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, - * MA 02111-1307 USA - * - */ - -#include <common.h> -#include <command.h> -#include <i2c.h> -#include <asm/byteorder.h> - -#define	CONFIG_STRESS		/* enable 667 MHz CPU freq selection */ -#define DEBUG - -static int do_bootstrap(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) -{ -	uchar	chip; -	ulong	data; -	int	nbytes; -	extern char console_buffer[]; - -	char sysClock[4]; -	char cpuClock[4]; -	char plbClock[4]; -	char pcixClock[4]; - -	if (argc < 3) { -		cmd_usage(cmdtp); -		return 1; -	} - -	if (strcmp(argv[2], "prom0") == 0) -		chip = IIC0_BOOTPROM_ADDR; -	else -		chip = IIC0_ALT_BOOTPROM_ADDR; - -	/* on Katmai SysClk is always 33MHz */ -	strcpy(sysClock, "33"); - -	do { -#ifdef	CONFIG_STRESS -		printf("enter cpu clock frequency 400, 500, 533, 667 MHz or quit to abort\n"); -#else -		printf("enter cpu clock frequency 400, 500, 533 MHz or quit to abort\n"); -#endif -		nbytes = readline (" ? "); - -		if (strcmp(console_buffer, "quit") == 0) -			return 0; - -		if ((strcmp(console_buffer, "400") != 0) && -		    (strcmp(console_buffer, "500") != 0) && -		    (strcmp(console_buffer, "533") != 0) -#ifdef	CONFIG_STRESS -		    && (strcmp(console_buffer, "667") != 0) -#endif -			) { -			nbytes = 0; -		} - -		strcpy(cpuClock, console_buffer); - -	} while (nbytes == 0); - -	if (strcmp(cpuClock, "500") == 0) -		strcpy(plbClock, "166"); -	else if (strcmp(cpuClock, "533") == 0) -		strcpy(plbClock, "133"); -	else { -		do { -			if (strcmp(cpuClock, "400") == 0) -				printf("enter plb clock frequency 100, 133 MHz or quit to abort\n"); - -#ifdef	CONFIG_STRESS -			if (strcmp(cpuClock, "667") == 0) -				printf("enter plb clock frequency 133, 166 MHz or quit to abort\n"); - -#endif -			nbytes = readline (" ? "); - -			if (strcmp(console_buffer, "quit") == 0) -				return 0; - -			if (strcmp(cpuClock, "400") == 0) { -				if ((strcmp(console_buffer, "100") != 0) && -				    (strcmp(console_buffer, "133") != 0)) -					nbytes = 0; -			} -#ifdef	CONFIG_STRESS -			if (strcmp(cpuClock, "667") == 0) { -				if ((strcmp(console_buffer, "133") != 0) && -				    (strcmp(console_buffer, "166") != 0)) -					nbytes = 0; -			} -#endif -			strcpy(plbClock, console_buffer); - -		} while (nbytes == 0); -	} - -	do { -		printf("enter Pci-X clock frequency 33, 66, 100 or 133 MHz or quit to abort\n"); -		nbytes = readline (" ? "); - -		if (strcmp(console_buffer, "quit") == 0) -			return 0; - -		if ((strcmp(console_buffer, "33") != 0) && -		    (strcmp(console_buffer, "66") != 0) && -		    (strcmp(console_buffer, "100") != 0) && -		    (strcmp(console_buffer, "133") != 0)) { -			nbytes = 0; -		} -		strcpy(pcixClock, console_buffer); - -	} while (nbytes == 0); - -	printf("\nsys clk   = %s MHz\n", sysClock); -	printf("cpu clk   = %s MHz\n", cpuClock); -	printf("plb clk   = %s MHz\n", plbClock); -	printf("Pci-X clk = %s MHz\n", pcixClock); - -	do { -		printf("\npress [y] to write I2C bootstrap \n"); -		printf("or [n] to abort.  \n"); -		printf("Don't forget to set board switches \n"); -		printf("according to your choice before re-starting \n"); -		printf("(refer to 440spe_uboot_kit_um_1_01.pdf) \n"); - -		nbytes = readline (" ? "); -		if (strcmp(console_buffer, "n") == 0) -			return 0; - -	} while (nbytes == 0); - -	if (strcmp(sysClock, "33") == 0) { -		if ((strcmp(cpuClock, "400") == 0) && -		    (strcmp(plbClock, "100") == 0)) -			data = 0x8678c206; - -		if ((strcmp(cpuClock, "400") == 0) && -		    (strcmp(plbClock, "133") == 0)) -			data = 0x8678c2c6; - -		if ((strcmp(cpuClock, "500") == 0)) -			data = 0x8778f2c6; - -		if ((strcmp(cpuClock, "533") == 0)) -			data = 0x87790252; -#ifdef	CONFIG_STRESS -		if ((strcmp(cpuClock, "667") == 0) && -		    (strcmp(plbClock, "133") == 0)) -			data = 0x87794256; - -		if ((strcmp(cpuClock, "667") == 0) && -		    (strcmp(plbClock, "166") == 0)) -			data = 0x87794206; -#endif -	} -#ifdef	DEBUG -	printf(" pin strap0 to write in i2c  = %lx\n", data); -#endif	/* DEBUG */ - -	if (i2c_write(chip, 0, 1, (uchar *)&data, 4) != 0) -		printf("Error writing strap0 in %s\n", argv[2]); - -	if (strcmp(pcixClock, "33") == 0) -		data = 0x000007E1; - -	if (strcmp(pcixClock, "66") == 0) -		data = 0x000006E1; - -	if (strcmp(pcixClock, "100") == 0) -		data = 0x000005E1; - -	if (strcmp(pcixClock, "133") == 0) -		data = 0x000004E1; - -	if (strcmp(plbClock, "166") == 0) -/*		data |= 0x05950000; */	/* this set's DDR2 clock == PLB clock */ -		data |= 0x05A50000;	/* this set's DDR2 clock == 2 * PLB clock */ -	else -		data |= 0x05A50000; - -#ifdef	DEBUG -	printf(" pin strap1 to write in i2c  = %lx\n", data); -#endif	/* DEBUG */ - -	udelay(1000); -	if (i2c_write(chip, 4, 1, (uchar *)&data, 4) != 0) -		printf("Error writing strap1 in %s\n", argv[2]); - -	return 0; -} - -U_BOOT_CMD( -	bootstrap,	3,	1,	do_bootstrap, -	"program the serial device strap", -	"wrclk [prom0|prom1] - program the serial device strap" -); diff --git a/board/amcc/katmai/katmai.c b/board/amcc/katmai/katmai.c index 908f1a595..86dc923e7 100644 --- a/board/amcc/katmai/katmai.c +++ b/board/amcc/katmai/katmai.c @@ -1,5 +1,5 @@  /* - * (C) Copyright 2007-2008 + * (C) Copyright 2007-2009   * Stefan Roese, DENX Software Engineering, sr@denx.de.   *   * See file CREDITS for list of people who contributed to this @@ -260,98 +260,8 @@ u32 ddr_clktr(u32 default_val) {  	return (SDRAM_CLKTR_CLKP_90_DEG_ADV);  } -/************************************************************************* - *  pci_pre_init - * - *  This routine is called just prior to registering the hose and gives - *  the board the opportunity to check things. Returning a value of zero - *  indicates that things are bad & PCI initialization should be aborted. - * - *	Different boards may wish to customize the pci controller structure - *	(add regions, override default access routines, etc) or perform - *	certain pre-initialization actions. - * - ************************************************************************/  #if defined(CONFIG_PCI) -int pci_pre_init(struct pci_controller * hose ) -{ -	unsigned long strap; - -	/*-------------------------------------------------------------------+ -	 *	The katmai board is always configured as the host & requires the -	 *	PCI arbiter to be enabled. -	 *-------------------------------------------------------------------*/ -	mfsdr(SDR0_SDSTP1, strap); -	if( (strap & SDR0_SDSTP1_PAE_MASK) == 0 ) { -		printf("PCI: SDR0_STRP1[%08lX] - PCI Arbiter disabled.\n",strap); -		return 0; -	} - -	return 1; -} -#endif	/* defined(CONFIG_PCI) */ - -/************************************************************************* - *  pci_target_init - * - *	The bootstrap configuration provides default settings for the pci - *	inbound map (PIM). But the bootstrap config choices are limited and - *	may not be sufficient for a given board. - * - ************************************************************************/ -#if defined(CONFIG_PCI) && defined(CONFIG_SYS_PCI_TARGET_INIT) -void pci_target_init(struct pci_controller * hose ) -{ -	/*-------------------------------------------------------------------+ -	 * Disable everything -	 *-------------------------------------------------------------------*/ -	out32r( PCIL0_PIM0SA, 0 ); /* disable */ -	out32r( PCIL0_PIM1SA, 0 ); /* disable */ -	out32r( PCIL0_PIM2SA, 0 ); /* disable */ -	out32r( PCIL0_EROMBA, 0 ); /* disable expansion rom */ - -	/*-------------------------------------------------------------------+ -	 * Map all of SDRAM to PCI address 0x0000_0000. Note that the 440 -	 * strapping options to not support sizes such as 128/256 MB. -	 *-------------------------------------------------------------------*/ -	out32r( PCIL0_PIM0LAL, CONFIG_SYS_SDRAM_BASE ); -	out32r( PCIL0_PIM0LAH, 0 ); -	out32r( PCIL0_PIM0SA, ~(gd->ram_size - 1) | 1 ); -	out32r( PCIL0_BAR0, 0 ); - -	/*-------------------------------------------------------------------+ -	 * Program the board's subsystem id/vendor id -	 *-------------------------------------------------------------------*/ -	out16r( PCIL0_SBSYSVID, CONFIG_SYS_PCI_SUBSYS_VENDORID ); -	out16r( PCIL0_SBSYSID, CONFIG_SYS_PCI_SUBSYS_DEVICEID ); - -	out16r( PCIL0_CMD, in16r(PCIL0_CMD) | PCI_COMMAND_MEMORY ); -} -#endif	/* defined(CONFIG_PCI) && defined(CONFIG_SYS_PCI_TARGET_INIT) */ - -#if defined(CONFIG_PCI) -/************************************************************************* - *  is_pci_host - * - *	This routine is called to determine if a pci scan should be - *	performed. With various hardware environments (especially cPCI and - *	PPMC) it's insufficient to depend on the state of the arbiter enable - *	bit in the strap register, or generic host/adapter assumptions. - * - *	Rather than hard-code a bad assumption in the general 440 code, the - *	440 pci code requires the board to decide at runtime. - * - *	Return 0 for adapter mode, non-zero for host (monarch) mode. - * - * - ************************************************************************/ -int is_pci_host(struct pci_controller *hose) -{ -	/* The katmai board is always configured as host. */ -	return 1; -} - -static int katmai_pcie_card_present(int port) +int board_pcie_card_present(int port)  {  	u32 val; @@ -367,78 +277,6 @@ static int katmai_pcie_card_present(int port)  		return 0;  	}  } - -static struct pci_controller pcie_hose[3] = {{0},{0},{0}}; - -void pcie_setup_hoses(int busno) -{ -	struct pci_controller *hose; -	int i, bus; -	int ret = 0; -	char *env; -	unsigned int delay; - -	/* -	 * assume we're called after the PCIX hose is initialized, which takes -	 * bus ID 0 and therefore start numbering PCIe's from 1. -	 */ -	bus = busno; -	for (i = 0; i <= 2; i++) { -		/* Check for katmai card presence */ -		if (!katmai_pcie_card_present(i)) -			continue; - -		if (is_end_point(i)) -			ret = ppc4xx_init_pcie_endport(i); -		else -			ret = ppc4xx_init_pcie_rootport(i); -		if (ret == -ENODEV) -			continue; -		if (ret) { -			printf("PCIE%d: initialization as %s failed\n", i, -			       is_end_point(i) ? "endpoint" : "root-complex"); -			continue; -		} - -		hose = &pcie_hose[i]; -		hose->first_busno = bus; -		hose->last_busno = bus; -		hose->current_busno = bus; - -		/* setup mem resource */ -		pci_set_region(hose->regions + 0, -			       CONFIG_SYS_PCIE_MEMBASE + i * CONFIG_SYS_PCIE_MEMSIZE, -			       CONFIG_SYS_PCIE_MEMBASE + i * CONFIG_SYS_PCIE_MEMSIZE, -			       CONFIG_SYS_PCIE_MEMSIZE, -			       PCI_REGION_MEM); -		hose->region_count = 1; -		pci_register_hose(hose); - -		if (is_end_point(i)) { -			ppc4xx_setup_pcie_endpoint(hose, i); -			/* -			 * Reson for no scanning is endpoint can not generate -			 * upstream configuration accesses. -			 */ -		} else { -			ppc4xx_setup_pcie_rootpoint(hose, i); -			env = getenv ("pciscandelay"); -			if (env != NULL) { -				delay = simple_strtoul(env, NULL, 10); -				if (delay > 5) -					printf("Warning, expect noticable delay before " -					       "PCIe scan due to 'pciscandelay' value!\n"); -				mdelay(delay * 1000); -			} - -			/* -			 * Config access can only go down stream -			 */ -			hose->last_busno = pci_hose_scan(hose); -			bus = hose->last_busno + 1; -		} -	} -}  #endif	/* defined(CONFIG_PCI) */  #ifdef CONFIG_POST diff --git a/board/amcc/katmai/u-boot.lds b/board/amcc/katmai/u-boot.lds deleted file mode 100644 index f2231c28e..000000000 --- a/board/amcc/katmai/u-boot.lds +++ /dev/null @@ -1,138 +0,0 @@ -/* - * (C) Copyright 2004 - * Wolfgang Denk, DENX Software Engineering, wd@denx.de. - * - * See file CREDITS for list of people who contributed to this - * project. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, - * MA 02111-1307 USA - */ - -OUTPUT_ARCH(powerpc) -/* Do we need any of these for elf? -   __DYNAMIC = 0;    */ -SECTIONS -{ -  .resetvec 0xFFFFFFFC : -  { -    *(.resetvec) -  } = 0xffff - -  .bootpg 0xFFFFF000 : -  { -    cpu/ppc4xx/start.o	(.bootpg) -  } = 0xffff - -  /* Read-only sections, merged into text segment: */ -  . = + SIZEOF_HEADERS; -  .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/ppc4xx/start.o		(.text) -    board/amcc/katmai/init.o	(.text) - -    *(.text) -    *(.got1) -  } -  _etext = .; -  PROVIDE (etext = .); -  .rodata    : -  { -    *(.eh_frame) -    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) -  } -  .fini      : { *(.fini)    } =0 -  .ctors     : { *(.ctors)   } -  .dtors     : { *(.dtors)   } - -  /* Read-write section, merged into data segment: */ -  . = (. + 0x00FF) & 0xFFFFFF00; -  _erotext = .; -  PROVIDE (erotext = .); -  .reloc   : -  { -    *(.got) -    _GOT2_TABLE_ = .; -    *(.got2) -    _FIXUP_TABLE_ = .; -    *(.fixup) -  } -  __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >>2; -  __fixup_entries = (. - _FIXUP_TABLE_)>>2; - -  .data    : -  { -    *(.data) -    *(.data1) -    *(.sdata) -    *(.sdata2) -    *(.dynamic) -    CONSTRUCTORS -  } -  _edata  =  .; -  PROVIDE (edata = .); - -  . = .; -  __u_boot_cmd_start = .; -  .u_boot_cmd : { *(.u_boot_cmd) } -  __u_boot_cmd_end = .; - - -  . = .; -  __start___ex_table = .; -  __ex_table : { *(__ex_table) } -  __stop___ex_table = .; - -  . = ALIGN(256); -  __init_begin = .; -  .text.init : { *(.text.init) } -  .data.init : { *(.data.init) } -  . = ALIGN(256); -  __init_end = .; - -  __bss_start = .; -  .bss (NOLOAD)       : -  { -   *(.sbss) *(.scommon) -   *(.dynbss) -   *(.bss) -   *(COMMON) -   . = ALIGN(4); -  } -  _end = . ; -  PROVIDE (end = .); -} diff --git a/board/amcc/kilauea/config.mk b/board/amcc/kilauea/config.mk index f5800ebe8..b3d3f227f 100644 --- a/board/amcc/kilauea/config.mk +++ b/board/amcc/kilauea/config.mk @@ -30,3 +30,7 @@ endif  ifeq ($(debug),1)  PLATFORM_CPPFLAGS += -DDEBUG  endif + +ifdef CONFIG_NAND_U_BOOT +LDSCRIPT := $(TOPDIR)/board/$(BOARDDIR)/u-boot-nand.lds +endif diff --git a/board/amcc/kilauea/kilauea.c b/board/amcc/kilauea/kilauea.c index 5cd822a7f..2f99ea113 100644 --- a/board/amcc/kilauea/kilauea.c +++ b/board/amcc/kilauea/kilauea.c @@ -252,15 +252,19 @@ int board_emac_count(void)  		return 2;  } -static int board_pcie_count(void) +/* + * Override the weak default implementation and return the + * last PCIe slot number (max number - 1). + */ +int board_pcie_last(void)  {  	/*  	 * 405EXr only has one EMAC interface, 405EX has two  	 */  	if (is_405exr()) -		return 1; +		return 1 - 1;  	else -		return 2; +		return 2 - 1;  }  int checkboard (void) @@ -281,92 +285,6 @@ int checkboard (void)  	return (0);  } -/************************************************************************* - *  pci_pre_init - * - *  This routine is called just prior to registering the hose and gives - *  the board the opportunity to check things. Returning a value of zero - *  indicates that things are bad & PCI initialization should be aborted. - * - *      Different boards may wish to customize the pci controller structure - *      (add regions, override default access routines, etc) or perform - *      certain pre-initialization actions. - * - ************************************************************************/ -#if defined(CONFIG_PCI) -int pci_pre_init(struct pci_controller * hose ) -{ -	return 0; -} -#endif  /* defined(CONFIG_PCI) */ - -#ifdef CONFIG_PCI -static struct pci_controller pcie_hose[2] = {{0},{0}}; - -void pcie_setup_hoses(int busno) -{ -	struct pci_controller *hose; -	int i, bus; -	int ret = 0; -	bus = busno; -	char *env; -	unsigned int delay; - -	for (i = 0; i < board_pcie_count(); i++) { - -		if (is_end_point(i)) -			ret = ppc4xx_init_pcie_endport(i); -		else -			ret = ppc4xx_init_pcie_rootport(i); -		if (ret == -ENODEV) -			continue; -		if (ret) { -			printf("PCIE%d: initialization as %s failed\n", i, -			       is_end_point(i) ? "endpoint" : "root-complex"); -			continue; -		} - -		hose = &pcie_hose[i]; -		hose->first_busno = bus; -		hose->last_busno = bus; -		hose->current_busno = bus; - -		/* setup mem resource */ -		pci_set_region(hose->regions + 0, -			       CONFIG_SYS_PCIE_MEMBASE + i * CONFIG_SYS_PCIE_MEMSIZE, -			       CONFIG_SYS_PCIE_MEMBASE + i * CONFIG_SYS_PCIE_MEMSIZE, -			       CONFIG_SYS_PCIE_MEMSIZE, -			       PCI_REGION_MEM); -		hose->region_count = 1; -		pci_register_hose(hose); - -		if (is_end_point(i)) { -			ppc4xx_setup_pcie_endpoint(hose, i); -			/* -			 * Reson for no scanning is endpoint can not generate -			 * upstream configuration accesses. -			 */ -		} else { -			ppc4xx_setup_pcie_rootpoint(hose, i); -			env = getenv ("pciscandelay"); -			if (env != NULL) { -				delay = simple_strtoul(env, NULL, 10); -				if (delay > 5) -					printf("Warning, expect noticable delay before " -					       "PCIe scan due to 'pciscandelay' value!\n"); -				mdelay(delay * 1000); -			} - -			/* -			 * Config access can only go down stream -			 */ -			hose->last_busno = pci_hose_scan(hose); -			bus = hose->last_busno + 1; -		} -	} -} -#endif -  #if defined(CONFIG_POST)  /*   * Returns 1 if keys pressed to start the power-on long-running tests diff --git a/board/amcc/kilauea/u-boot.lds b/board/amcc/kilauea/u-boot.lds deleted file mode 100644 index bebb2b236..000000000 --- a/board/amcc/kilauea/u-boot.lds +++ /dev/null @@ -1,134 +0,0 @@ -/* - * (C) Copyright 2000 - * Wolfgang Denk, DENX Software Engineering, wd@denx.de. - * - * See file CREDITS for list of people who contributed to this - * project. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, - * MA 02111-1307 USA - */ - -OUTPUT_ARCH(powerpc) -/* Do we need any of these for elf? -   __DYNAMIC = 0;    */ -SECTIONS -{ -/* To compile successfully, uncomment the following section. - * To go in ram, remove the section. - * Added by SunHe. - */ -  .resetvec 0xFFFFFFFC : -  { -    *(.resetvec) -  } = 0xffff - -  /* Read-only sections, merged into text segment: */ -  . = + SIZEOF_HEADERS; -  .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/ppc4xx/start.o	(.text) - -    *(.text) -    *(.got1) -  } -  _etext = .; -  PROVIDE (etext = .); -  .rodata    : -  { -    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) -  } -  .fini      : { *(.fini)    } =0 -  .ctors     : { *(.ctors)   } -  .dtors     : { *(.dtors)   } - -  /* Read-write section, merged into data segment: */ -  . = (. + 0x00FF) & 0xFFFFFF00; -  _erotext = .; -  PROVIDE (erotext = .); -  .reloc   : -  { -    *(.got) -    _GOT2_TABLE_ = .; -    *(.got2) -    _FIXUP_TABLE_ = .; -    *(.fixup) -  } -  __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >>2; -  __fixup_entries = (. - _FIXUP_TABLE_)>>2; - -  .data    : -  { -    *(.data) -    *(.data1) -    *(.sdata) -    *(.sdata2) -    *(.dynamic) -    CONSTRUCTORS -  } -  _edata  =  .; -  PROVIDE (edata = .); - -  . = .; -  __u_boot_cmd_start = .; -  .u_boot_cmd : { *(.u_boot_cmd) } -  __u_boot_cmd_end = .; - -  . = .; -  __start___ex_table = .; -  __ex_table : { *(__ex_table) } -  __stop___ex_table = .; - -  . = ALIGN(256); -  __init_begin = .; -  .text.init : { *(.text.init) } -  .data.init : { *(.data.init) } -  . = ALIGN(256); -  __init_end = .; - -  __bss_start = .; -  .bss (NOLOAD)       : -  { -   *(.sbss) *(.scommon) -   *(.dynbss) -   *(.bss) -   *(COMMON) -   . = ALIGN(4); -  } -  _end = . ; -  PROVIDE (end = .); -} diff --git a/board/amcc/luan/luan.c b/board/amcc/luan/luan.c index a04f2af3b..332d170d6 100644 --- a/board/amcc/luan/luan.c +++ b/board/amcc/luan/luan.c @@ -127,102 +127,6 @@ u32 ddr_clktr(u32 default_val) {  }  /************************************************************************* - *  pci_pre_init - * - *  This routine is called just prior to registering the hose and gives - *  the board the opportunity to check things. Returning a value of zero - *  indicates that things are bad & PCI initialization should be aborted. - * - *	Different boards may wish to customize the pci controller structure - *	(add regions, override default access routines, etc) or perform - *	certain pre-initialization actions. - * - ************************************************************************/ -#if defined(CONFIG_PCI) -int pci_pre_init( struct pci_controller *hose ) -{ -	unsigned long strap; - -	/*--------------------------------------------------------------------------+ -	 *	The luan board is always configured as the host & requires the -	 *	PCI arbiter to be enabled. -	 *--------------------------------------------------------------------------*/ -	mfsdr(SDR0_SDSTP1, strap); -	if( (strap & SDR0_SDSTP1_PAE_MASK) == 0 ) { -		printf("PCI: SDR0_STRP1[%08lX] - PCI Arbiter disabled.\n",strap); - -		return  0; -	} - -	return  1; -} -#endif /* defined(CONFIG_PCI) */ - - -/************************************************************************* - *  pci_target_init - * - *	The bootstrap configuration provides default settings for the pci - *	inbound map (PIM). But the bootstrap config choices are limited and - *	may not be sufficient for a given board. - * - ************************************************************************/ -#if defined(CONFIG_PCI) && defined(CONFIG_SYS_PCI_TARGET_INIT) -void pci_target_init(struct pci_controller *hose) -{ -	/*--------------------------------------------------------------------------+ -	 * Disable everything -	 *--------------------------------------------------------------------------*/ -	out32r( PCIL0_PIM0SA, 0 ); /* disable */ -	out32r( PCIL0_PIM1SA, 0 ); /* disable */ -	out32r( PCIL0_PIM2SA, 0 ); /* disable */ -	out32r( PCIL0_EROMBA, 0 ); /* disable expansion rom */ - -	/*--------------------------------------------------------------------------+ -	 * Map all of SDRAM to PCI address 0x0000_0000. Note that the 440 strapping -	 * options to not support sizes such as 128/256 MB. -	 *--------------------------------------------------------------------------*/ -	out32r( PCIL0_PIM0LAL, CONFIG_SYS_SDRAM_BASE ); -	out32r( PCIL0_PIM0LAH, 0 ); -	out32r( PCIL0_PIM0SA, ~(gd->ram_size - 1) | 1 ); - -	out32r( PCIL0_BAR0, 0 ); - -	/*--------------------------------------------------------------------------+ -	 * Program the board's subsystem id/vendor id -	 *--------------------------------------------------------------------------*/ -	out16r( PCIL0_SBSYSVID, CONFIG_SYS_PCI_SUBSYS_VENDORID ); -	out16r( PCIL0_SBSYSID, CONFIG_SYS_PCI_SUBSYS_DEVICEID ); - -	out16r( PCIL0_CMD, in16r(PCIL0_CMD) | PCI_COMMAND_MEMORY ); -} -#endif /* defined(CONFIG_PCI) && defined(CONFIG_SYS_PCI_TARGET_INIT) */ - - -/************************************************************************* - *  is_pci_host - * - *	This routine is called to determine if a pci scan should be - *	performed. With various hardware environments (especially cPCI and - *	PPMC) it's insufficient to depend on the state of the arbiter enable - *	bit in the strap register, or generic host/adapter assumptions. - * - *	Rather than hard-code a bad assumption in the general 440 code, the - *	440 pci code requires the board to decide at runtime. - * - *	Return 0 for adapter mode, non-zero for host (monarch) mode. - * - * - ************************************************************************/ -#if defined(CONFIG_PCI) -int is_pci_host(struct pci_controller *hose) -{ -	return  1; -} -#endif				/* defined(CONFIG_PCI) */ - - -/*************************************************************************   *  hw_watchdog_reset   *   *	This routine is called to reset (keep alive) the watchdog timer diff --git a/board/amcc/luan/u-boot.lds b/board/amcc/luan/u-boot.lds deleted file mode 100644 index 12c5b60fc..000000000 --- a/board/amcc/luan/u-boot.lds +++ /dev/null @@ -1,141 +0,0 @@ -/* - * (C) Copyright 2002 - * Wolfgang Denk, DENX Software Engineering, wd@denx.de. - * - * See file CREDITS for list of people who contributed to this - * project. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, - * MA 02111-1307 USA - */ - -OUTPUT_ARCH(powerpc) -/* Do we need any of these for elf? -   __DYNAMIC = 0;    */ -SECTIONS -{ -  .resetvec 0xFFFFFFFC : -  { -    *(.resetvec) -  } = 0xffff - -  .bootpg 0xFFFFF000 : -  { -    cpu/ppc4xx/start.o	(.bootpg) -  } = 0xffff - -  /* Read-only sections, merged into text segment: */ -  . = + SIZEOF_HEADERS; -  .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      : -  { -    /* WARNING - the following is hand-optimized to fit within	*/ -    /* the sector layout of our flash chips!	XXX FIXME XXX	*/ - -    cpu/ppc4xx/start.o	(.text) -    board/amcc/luan/init.o	(.text) - -    *(.text) -    *(.got1) -  } -  _etext = .; -  PROVIDE (etext = .); -  .rodata    : -  { -    *(.eh_frame) -    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) -  } -  .fini      : { *(.fini)    } =0 -  .ctors     : { *(.ctors)   } -  .dtors     : { *(.dtors)   } - -  /* Read-write section, merged into data segment: */ -  . = (. + 0x00FF) & 0xFFFFFF00; -  _erotext = .; -  PROVIDE (erotext = .); -  .reloc   : -  { -    *(.got) -    _GOT2_TABLE_ = .; -    *(.got2) -    _FIXUP_TABLE_ = .; -    *(.fixup) -  } -  __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >>2; -  __fixup_entries = (. - _FIXUP_TABLE_)>>2; - -  .data    : -  { -    *(.data) -    *(.data1) -    *(.sdata) -    *(.sdata2) -    *(.dynamic) -    CONSTRUCTORS -  } -  _edata  =  .; -  PROVIDE (edata = .); - -  . = .; -  __u_boot_cmd_start = .; -  .u_boot_cmd : { *(.u_boot_cmd) } -  __u_boot_cmd_end = .; - - -  . = .; -  __start___ex_table = .; -  __ex_table : { *(__ex_table) } -  __stop___ex_table = .; - -  . = ALIGN(256); -  __init_begin = .; -  .text.init : { *(.text.init) } -  .data.init : { *(.data.init) } -  . = ALIGN(256); -  __init_end = .; - -  __bss_start = .; -  .bss (NOLOAD)       : -  { -   *(.sbss) *(.scommon) -   *(.dynbss) -   *(.bss) -   *(COMMON) -   . = ALIGN(4); -  } -  _end = . ; -  PROVIDE (end = .); -} diff --git a/board/amcc/makalu/makalu.c b/board/amcc/makalu/makalu.c index d4277dda9..3d860af9a 100644 --- a/board/amcc/makalu/makalu.c +++ b/board/amcc/makalu/makalu.c @@ -237,92 +237,6 @@ int checkboard (void)  	return (0);  } -/************************************************************************* - *  pci_pre_init - * - *  This routine is called just prior to registering the hose and gives - *  the board the opportunity to check things. Returning a value of zero - *  indicates that things are bad & PCI initialization should be aborted. - * - *      Different boards may wish to customize the pci controller structure - *      (add regions, override default access routines, etc) or perform - *      certain pre-initialization actions. - * - ************************************************************************/ -#if defined(CONFIG_PCI) -int pci_pre_init(struct pci_controller * hose ) -{ -	return 0; -} -#endif  /* defined(CONFIG_PCI) */ - -#ifdef CONFIG_PCI -static struct pci_controller pcie_hose[2] = {{0},{0}}; - -void pcie_setup_hoses(int busno) -{ -	struct pci_controller *hose; -	int i, bus; -	int ret = 0; -	bus = busno; -	char *env; -	unsigned int delay; - -	for (i = 0; i < 2; i++) { - -		if (is_end_point(i)) -			ret = ppc4xx_init_pcie_endport(i); -		else -			ret = ppc4xx_init_pcie_rootport(i); -		if (ret == -ENODEV) -			continue; -		if (ret) { -			printf("PCIE%d: initialization as %s failed\n", i, -			       is_end_point(i) ? "endpoint" : "root-complex"); -			continue; -		} - -		hose = &pcie_hose[i]; -		hose->first_busno = bus; -		hose->last_busno = bus; -		hose->current_busno = bus; - -		/* setup mem resource */ -		pci_set_region(hose->regions + 0, -			       CONFIG_SYS_PCIE_MEMBASE + i * CONFIG_SYS_PCIE_MEMSIZE, -			       CONFIG_SYS_PCIE_MEMBASE + i * CONFIG_SYS_PCIE_MEMSIZE, -			       CONFIG_SYS_PCIE_MEMSIZE, -			       PCI_REGION_MEM); -		hose->region_count = 1; -		pci_register_hose(hose); - -		if (is_end_point(i)) { -			ppc4xx_setup_pcie_endpoint(hose, i); -			/* -			 * Reson for no scanning is endpoint can not generate -			 * upstream configuration accesses. -			 */ -		} else { -			ppc4xx_setup_pcie_rootpoint(hose, i); -			env = getenv ("pciscandelay"); -			if (env != NULL) { -				delay = simple_strtoul(env, NULL, 10); -				if (delay > 5) -					printf("Warning, expect noticable delay before " -					       "PCIe scan due to 'pciscandelay' value!\n"); -				mdelay(delay * 1000); -			} - -			/* -			 * Config access can only go down stream -			 */ -			hose->last_busno = pci_hose_scan(hose); -			bus = hose->last_busno + 1; -		} -	} -} -#endif -  #if defined(CONFIG_POST)  /*   * Returns 1 if keys pressed to start the power-on long-running tests diff --git a/board/amcc/makalu/u-boot.lds b/board/amcc/makalu/u-boot.lds deleted file mode 100644 index bebb2b236..000000000 --- a/board/amcc/makalu/u-boot.lds +++ /dev/null @@ -1,134 +0,0 @@ -/* - * (C) Copyright 2000 - * Wolfgang Denk, DENX Software Engineering, wd@denx.de. - * - * See file CREDITS for list of people who contributed to this - * project. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, - * MA 02111-1307 USA - */ - -OUTPUT_ARCH(powerpc) -/* Do we need any of these for elf? -   __DYNAMIC = 0;    */ -SECTIONS -{ -/* To compile successfully, uncomment the following section. - * To go in ram, remove the section. - * Added by SunHe. - */ -  .resetvec 0xFFFFFFFC : -  { -    *(.resetvec) -  } = 0xffff - -  /* Read-only sections, merged into text segment: */ -  . = + SIZEOF_HEADERS; -  .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/ppc4xx/start.o	(.text) - -    *(.text) -    *(.got1) -  } -  _etext = .; -  PROVIDE (etext = .); -  .rodata    : -  { -    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) -  } -  .fini      : { *(.fini)    } =0 -  .ctors     : { *(.ctors)   } -  .dtors     : { *(.dtors)   } - -  /* Read-write section, merged into data segment: */ -  . = (. + 0x00FF) & 0xFFFFFF00; -  _erotext = .; -  PROVIDE (erotext = .); -  .reloc   : -  { -    *(.got) -    _GOT2_TABLE_ = .; -    *(.got2) -    _FIXUP_TABLE_ = .; -    *(.fixup) -  } -  __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >>2; -  __fixup_entries = (. - _FIXUP_TABLE_)>>2; - -  .data    : -  { -    *(.data) -    *(.data1) -    *(.sdata) -    *(.sdata2) -    *(.dynamic) -    CONSTRUCTORS -  } -  _edata  =  .; -  PROVIDE (edata = .); - -  . = .; -  __u_boot_cmd_start = .; -  .u_boot_cmd : { *(.u_boot_cmd) } -  __u_boot_cmd_end = .; - -  . = .; -  __start___ex_table = .; -  __ex_table : { *(__ex_table) } -  __stop___ex_table = .; - -  . = ALIGN(256); -  __init_begin = .; -  .text.init : { *(.text.init) } -  .data.init : { *(.data.init) } -  . = ALIGN(256); -  __init_end = .; - -  __bss_start = .; -  .bss (NOLOAD)       : -  { -   *(.sbss) *(.scommon) -   *(.dynbss) -   *(.bss) -   *(COMMON) -   . = ALIGN(4); -  } -  _end = . ; -  PROVIDE (end = .); -} diff --git a/board/amcc/ocotea/ocotea.c b/board/amcc/ocotea/ocotea.c index 0aa317ec0..951a8b539 100644 --- a/board/amcc/ocotea/ocotea.c +++ b/board/amcc/ocotea/ocotea.c @@ -275,102 +275,6 @@ long int fixed_sdram (void)  }  #endif	/* !defined(CONFIG_SPD_EEPROM) */ - -/************************************************************************* - *  pci_pre_init - * - *  This routine is called just prior to registering the hose and gives - *  the board the opportunity to check things. Returning a value of zero - *  indicates that things are bad & PCI initialization should be aborted. - * - *	Different boards may wish to customize the pci controller structure - *	(add regions, override default access routines, etc) or perform - *	certain pre-initialization actions. - * - ************************************************************************/ -#if defined(CONFIG_PCI) -int pci_pre_init(struct pci_controller * hose ) -{ -	unsigned long strap; - -	/*--------------------------------------------------------------------------+ -	 *	The ocotea board is always configured as the host & requires the -	 *	PCI arbiter to be enabled. -	 *--------------------------------------------------------------------------*/ -	mfsdr(SDR0_SDSTP1, strap); -	if( (strap & SDR0_SDSTP1_PAE_MASK) == 0 ){ -		printf("PCI: SDR0_STRP1[%08lX] - PCI Arbiter disabled.\n",strap); -		return 0; -	} - -	return 1; -} -#endif /* defined(CONFIG_PCI) */ - -/************************************************************************* - *  pci_target_init - * - *	The bootstrap configuration provides default settings for the pci - *	inbound map (PIM). But the bootstrap config choices are limited and - *	may not be sufficient for a given board. - * - ************************************************************************/ -#if defined(CONFIG_PCI) && defined(CONFIG_SYS_PCI_TARGET_INIT) -void pci_target_init(struct pci_controller * hose ) -{ -	/*--------------------------------------------------------------------------+ -	 * Disable everything -	 *--------------------------------------------------------------------------*/ -	out32r( PCIL0_PIM0SA, 0 ); /* disable */ -	out32r( PCIL0_PIM1SA, 0 ); /* disable */ -	out32r( PCIL0_PIM2SA, 0 ); /* disable */ -	out32r( PCIL0_EROMBA, 0 ); /* disable expansion rom */ - -	/*--------------------------------------------------------------------------+ -	 * Map all of SDRAM to PCI address 0x0000_0000. Note that the 440 strapping -	 * options to not support sizes such as 128/256 MB. -	 *--------------------------------------------------------------------------*/ -	out32r( PCIL0_PIM0LAL, CONFIG_SYS_SDRAM_BASE ); -	out32r( PCIL0_PIM0LAH, 0 ); -	out32r( PCIL0_PIM0SA, ~(gd->ram_size - 1) | 1 ); - -	out32r( PCIL0_BAR0, 0 ); - -	/*--------------------------------------------------------------------------+ -	 * Program the board's subsystem id/vendor id -	 *--------------------------------------------------------------------------*/ -	out16r( PCIL0_SBSYSVID, CONFIG_SYS_PCI_SUBSYS_VENDORID ); -	out16r( PCIL0_SBSYSID, CONFIG_SYS_PCI_SUBSYS_DEVICEID ); - -	out16r( PCIL0_CMD, in16r(PCIL0_CMD) | PCI_COMMAND_MEMORY ); -} -#endif /* defined(CONFIG_PCI) && defined(CONFIG_SYS_PCI_TARGET_INIT) */ - - -/************************************************************************* - *  is_pci_host - * - *	This routine is called to determine if a pci scan should be - *	performed. With various hardware environments (especially cPCI and - *	PPMC) it's insufficient to depend on the state of the arbiter enable - *	bit in the strap register, or generic host/adapter assumptions. - * - *	Rather than hard-code a bad assumption in the general 440 code, the - *	440 pci code requires the board to decide at runtime. - * - *	Return 0 for adapter mode, non-zero for host (monarch) mode. - * - * - ************************************************************************/ -#if defined(CONFIG_PCI) -int is_pci_host(struct pci_controller *hose) -{ -    /* The ocotea board is always configured as host. */ -    return(1); -} -#endif /* defined(CONFIG_PCI) */ - -  void fpga_init(void)  {  	unsigned long group; diff --git a/board/amcc/ocotea/u-boot.lds b/board/amcc/ocotea/u-boot.lds deleted file mode 100644 index b0b4c00fd..000000000 --- a/board/amcc/ocotea/u-boot.lds +++ /dev/null @@ -1,141 +0,0 @@ -/* - * (C) Copyright 2004 - * Wolfgang Denk, DENX Software Engineering, wd@denx.de. - * - * See file CREDITS for list of people who contributed to this - * project. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, - * MA 02111-1307 USA - */ - -OUTPUT_ARCH(powerpc) -/* Do we need any of these for elf? -   __DYNAMIC = 0;    */ -SECTIONS -{ -  .resetvec 0xFFFFFFFC : -  { -    *(.resetvec) -  } = 0xffff - -  .bootpg 0xFFFFF000 : -  { -    cpu/ppc4xx/start.o	(.bootpg) -  } = 0xffff - -  /* Read-only sections, merged into text segment: */ -  . = + SIZEOF_HEADERS; -  .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      : -  { -    /* WARNING - the following is hand-optimized to fit within	*/ -    /* the sector layout of our flash chips!	XXX FIXME XXX	*/ - -    cpu/ppc4xx/start.o	(.text) -    board/amcc/ocotea/init.o	(.text) - -    *(.text) -    *(.got1) -  } -  _etext = .; -  PROVIDE (etext = .); -  .rodata    : -  { -    *(.eh_frame) -    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) -  } -  .fini      : { *(.fini)    } =0 -  .ctors     : { *(.ctors)   } -  .dtors     : { *(.dtors)   } - -  /* Read-write section, merged into data segment: */ -  . = (. + 0x00FF) & 0xFFFFFF00; -  _erotext = .; -  PROVIDE (erotext = .); -  .reloc   : -  { -    *(.got) -    _GOT2_TABLE_ = .; -    *(.got2) -    _FIXUP_TABLE_ = .; -    *(.fixup) -  } -  __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >>2; -  __fixup_entries = (. - _FIXUP_TABLE_)>>2; - -  .data    : -  { -    *(.data) -    *(.data1) -    *(.sdata) -    *(.sdata2) -    *(.dynamic) -    CONSTRUCTORS -  } -  _edata  =  .; -  PROVIDE (edata = .); - -  . = .; -  __u_boot_cmd_start = .; -  .u_boot_cmd : { *(.u_boot_cmd) } -  __u_boot_cmd_end = .; - - -  . = .; -  __start___ex_table = .; -  __ex_table : { *(__ex_table) } -  __stop___ex_table = .; - -  . = ALIGN(256); -  __init_begin = .; -  .text.init : { *(.text.init) } -  .data.init : { *(.data.init) } -  . = ALIGN(256); -  __init_end = .; - -  __bss_start = .; -  .bss (NOLOAD)       : -  { -   *(.sbss) *(.scommon) -   *(.dynbss) -   *(.bss) -   *(COMMON) -   . = ALIGN(4); -  } -  _end = . ; -  PROVIDE (end = .); -} diff --git a/board/amcc/redwood/u-boot.lds b/board/amcc/redwood/u-boot.lds deleted file mode 100644 index 7bda06eb0..000000000 --- a/board/amcc/redwood/u-boot.lds +++ /dev/null @@ -1,145 +0,0 @@ -/* - * (C) Copyright 2004 - * Wolfgang Denk, DENX Software Engineering, wd@denx.de. - * - * See file CREDITS for list of people who contributed to this - * project. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, - * MA 02111-1307 USA - */ - -OUTPUT_ARCH(powerpc) -SEARCH_DIR(/lib); SEARCH_DIR(/usr/lib); SEARCH_DIR(/usr/local/lib); SEARCH_DIR(/usr/local/powerpc-any-elf/lib); -/* Do we need any of these for elf? -   __DYNAMIC = 0;    */ -SECTIONS -{ -  .resetvec 0xFFFFFFFC : -  { -    *(.resetvec) -  } = 0xffff - -  .bootpg 0xFFFFF000 : -  { -    cpu/ppc4xx/start.o	(.bootpg) -  } = 0xffff - -  /* Read-only sections, merged into text segment: */ -  . = + SIZEOF_HEADERS; -  .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      : -  { -    /* WARNING - the following is hand-optimized to fit within	*/ -    /* the sector layout of our flash chips!	XXX FIXME XXX	*/ - -    cpu/ppc4xx/start.o		(.text) -    board/amcc/redwood/init.o	(.text) - -/*    . = env_offset;*/ -/*    common/env_embedded.o(.text)*/ - -    *(.text) -    *(.got1) -  } -  _etext = .; -  PROVIDE (etext = .); -  .rodata    : -  { -    *(.eh_frame) -    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) -  } -  .fini      : { *(.fini)    } =0 -  .ctors     : { *(.ctors)   } -  .dtors     : { *(.dtors)   } - -  /* Read-write section, merged into data segment: */ -  . = (. + 0x00FF) & 0xFFFFFF00; -  _erotext = .; -  PROVIDE (erotext = .); -  .reloc   : -  { -    *(.got) -    _GOT2_TABLE_ = .; -    *(.got2) -    _FIXUP_TABLE_ = .; -    *(.fixup) -  } -  __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >>2; -  __fixup_entries = (. - _FIXUP_TABLE_)>>2; - -  .data    : -  { -    *(.data) -    *(.data1) -    *(.sdata) -    *(.sdata2) -    *(.dynamic) -    CONSTRUCTORS -  } -  _edata  =  .; -  PROVIDE (edata = .); - -  . = .; -  __u_boot_cmd_start = .; -  .u_boot_cmd : { *(.u_boot_cmd) } -  __u_boot_cmd_end = .; - - -  . = .; -  __start___ex_table = .; -  __ex_table : { *(__ex_table) } -  __stop___ex_table = .; - -  . = ALIGN(256); -  __init_begin = .; -  .text.init : { *(.text.init) } -  .data.init : { *(.data.init) } -  . = ALIGN(256); -  __init_end = .; - -  __bss_start = .; -  .bss       : -  { -   *(.sbss) *(.scommon) -   *(.dynbss) -   *(.bss) -   *(COMMON) -   . = ALIGN(4); -  } -  _end = . ; -  PROVIDE (end = .); -} diff --git a/board/amcc/sequoia/config.mk b/board/amcc/sequoia/config.mk index 6c748c914..b57e473e4 100644 --- a/board/amcc/sequoia/config.mk +++ b/board/amcc/sequoia/config.mk @@ -43,3 +43,7 @@ endif  ifeq ($(dbcr),1)  PLATFORM_CPPFLAGS += -DCONFIG_SYS_INIT_DBCR=0x8cff0000  endif + +ifdef CONFIG_NAND_U_BOOT +LDSCRIPT := $(TOPDIR)/board/$(BOARDDIR)/u-boot-nand.lds +endif diff --git a/board/amcc/sequoia/sequoia.c b/board/amcc/sequoia/sequoia.c index 00f640872..cb34c9d7d 100644 --- a/board/amcc/sequoia/sequoia.c +++ b/board/amcc/sequoia/sequoia.c @@ -364,172 +364,12 @@ int checkboard(void)  /*   * Assign interrupts to PCI devices.   */ -void sequoia_pci_fixup_irq(struct pci_controller *hose, pci_dev_t dev) +void board_pci_fixup_irq(struct pci_controller *hose, pci_dev_t dev)  {  	pci_hose_write_config_byte(hose, dev, PCI_INTERRUPT_LINE, VECNUM_EIRQ2);  }  #endif -/* - * pci_pre_init - * - * This routine is called just prior to registering the hose and gives - * the board the opportunity to check things. Returning a value of zero - * indicates that things are bad & PCI initialization should be aborted. - * - * Different boards may wish to customize the pci controller structure - * (add regions, override default access routines, etc) or perform - * certain pre-initialization actions. - */ -#if defined(CONFIG_PCI) -int pci_pre_init(struct pci_controller *hose) -{ -	unsigned long addr; - -	/* -	 * Set priority for all PLB3 devices to 0. -	 * Set PLB3 arbiter to fair mode. -	 */ -	mfsdr(SD0_AMP1, addr); -	mtsdr(SD0_AMP1, (addr & 0x000000FF) | 0x0000FF00); -	addr = mfdcr(PLB3_ACR); -	mtdcr(PLB3_ACR, addr | 0x80000000); - -	/* -	 * Set priority for all PLB4 devices to 0. -	 */ -	mfsdr(SD0_AMP0, addr); -	mtsdr(SD0_AMP0, (addr & 0x000000FF) | 0x0000FF00); -	addr = mfdcr(PLB4_ACR) | 0xa0000000;	/* Was 0x8---- */ -	mtdcr(PLB4_ACR, addr); - -	/* -	 * Set Nebula PLB4 arbiter to fair mode. -	 */ -	/* Segment0 */ -	addr = (mfdcr(PLB0_ACR) & ~PLB0_ACR_PPM_MASK) | PLB0_ACR_PPM_FAIR; -	addr = (addr & ~PLB0_ACR_HBU_MASK) | PLB0_ACR_HBU_ENABLED; -	addr = (addr & ~PLB0_ACR_RDP_MASK) | PLB0_ACR_RDP_4DEEP; -	addr = (addr & ~PLB0_ACR_WRP_MASK) | PLB0_ACR_WRP_2DEEP; -	mtdcr(PLB0_ACR, addr); - -	/* Segment1 */ -	addr = (mfdcr(PLB1_ACR) & ~PLB1_ACR_PPM_MASK) | PLB1_ACR_PPM_FAIR; -	addr = (addr & ~PLB1_ACR_HBU_MASK) | PLB1_ACR_HBU_ENABLED; -	addr = (addr & ~PLB1_ACR_RDP_MASK) | PLB1_ACR_RDP_4DEEP; -	addr = (addr & ~PLB1_ACR_WRP_MASK) | PLB1_ACR_WRP_2DEEP; -	mtdcr(PLB1_ACR, addr); - -#ifdef CONFIG_PCI_PNP -	hose->fixup_irq = sequoia_pci_fixup_irq; -#endif -	return 1; -} -#endif /* defined(CONFIG_PCI) */ - -/* - * pci_target_init - * - * The bootstrap configuration provides default settings for the pci - * inbound map (PIM). But the bootstrap config choices are limited and - * may not be sufficient for a given board. - */ -#if defined(CONFIG_PCI) && defined(CONFIG_SYS_PCI_TARGET_INIT) -void pci_target_init(struct pci_controller *hose) -{ -	/* -	 * Set up Direct MMIO registers -	 */ -	/* -	 * PowerPC440EPX PCI Master configuration. -	 * Map one 1Gig range of PLB/processor addresses to PCI memory space. -	 * PLB address 0xA0000000-0xDFFFFFFF -	 *     ==> PCI address 0xA0000000-0xDFFFFFFF -	 * Use byte reversed out routines to handle endianess. -	 * Make this region non-prefetchable. -	 */ -	out32r(PCIL0_PMM0MA, 0x00000000);	/* PMM0 Mask/Attribute */ -						/* - disabled b4 setting */ -	out32r(PCIL0_PMM0LA, CONFIG_SYS_PCI_MEMBASE);	/* PMM0 Local Address */ -	out32r(PCIL0_PMM0PCILA, CONFIG_SYS_PCI_MEMBASE); /* PMM0 PCI Low Address */ -	out32r(PCIL0_PMM0PCIHA, 0x00000000);	/* PMM0 PCI High Address */ -	out32r(PCIL0_PMM0MA, 0xE0000001);	/* 512M + No prefetching, */ -						/* and enable region */ - -	out32r(PCIL0_PMM1MA, 0x00000000);	/* PMM0 Mask/Attribute */ -						/* - disabled b4 setting */ -	out32r(PCIL0_PMM1LA, CONFIG_SYS_PCI_MEMBASE2); /* PMM0 Local Address */ -	out32r(PCIL0_PMM1PCILA, CONFIG_SYS_PCI_MEMBASE2); /* PMM0 PCI Low Address */ -	out32r(PCIL0_PMM1PCIHA, 0x00000000);	/* PMM0 PCI High Address */ -	out32r(PCIL0_PMM1MA, 0xE0000001);	/* 512M + No prefetching, */ -						/* and enable region */ - -	out32r(PCIL0_PTM1MS, 0x00000001);	/* Memory Size/Attribute */ -	out32r(PCIL0_PTM1LA, 0);		/* Local Addr. Reg */ -	out32r(PCIL0_PTM2MS, 0);		/* Memory Size/Attribute */ -	out32r(PCIL0_PTM2LA, 0);		/* Local Addr. Reg */ - -	/* -	 * Set up Configuration registers -	 */ - -	/* Program the board's subsystem id/vendor id */ -	pci_write_config_word(0, PCI_SUBSYSTEM_VENDOR_ID, -			      CONFIG_SYS_PCI_SUBSYS_VENDORID); -	pci_write_config_word(0, PCI_SUBSYSTEM_ID, CONFIG_SYS_PCI_SUBSYS_ID); - -	/* Configure command register as bus master */ -	pci_write_config_word(0, PCI_COMMAND, PCI_COMMAND_MASTER); - -	/* 240nS PCI clock */ -	pci_write_config_word(0, PCI_LATENCY_TIMER, 1); - -	/* No error reporting */ -	pci_write_config_word(0, PCI_ERREN, 0); - -	pci_write_config_dword(0, PCI_BRDGOPT2, 0x00000101); - -} -#endif /* defined(CONFIG_PCI) && defined(CONFIG_SYS_PCI_TARGET_INIT) */ - -#if defined(CONFIG_PCI) && defined(CONFIG_SYS_PCI_MASTER_INIT) -void pci_master_init(struct pci_controller *hose) -{ -	unsigned short temp_short; - -	/* -	 * Write the PowerPC440 EP PCI Configuration regs. -	 * Enable PowerPC440 EP to be a master on the PCI bus (PMM). -	 * Enable PowerPC440 EP to act as a PCI memory target (PTM). -	 */ -	pci_read_config_word(0, PCI_COMMAND, &temp_short); -	pci_write_config_word(0, PCI_COMMAND, -			      temp_short | PCI_COMMAND_MASTER | -			      PCI_COMMAND_MEMORY); -} -#endif /* defined(CONFIG_PCI) && defined(CONFIG_SYS_PCI_MASTER_INIT) */ - -/* - * is_pci_host - * - * This routine is called to determine if a pci scan should be - * performed. With various hardware environments (especially cPCI and - * PPMC) it's insufficient to depend on the state of the arbiter enable - * bit in the strap register, or generic host/adapter assumptions. - * - * Rather than hard-code a bad assumption in the general 440 code, the - * 440 pci code requires the board to decide at runtime. - * - * Return 0 for adapter mode, non-zero for host (monarch) mode. - */ -#if defined(CONFIG_PCI) -int is_pci_host(struct pci_controller *hose) -{ -	/* Cactus is always configured as host. */ -	return (1); -} -#endif /* defined(CONFIG_PCI) */ -  #if defined(CONFIG_POST)  /*   * Returns 1 if keys pressed to start the power-on long-running tests diff --git a/board/amcc/sequoia/u-boot.lds b/board/amcc/sequoia/u-boot.lds deleted file mode 100644 index b9ec56bb2..000000000 --- a/board/amcc/sequoia/u-boot.lds +++ /dev/null @@ -1,142 +0,0 @@ -/* - * (C) Copyright 2002 - * Wolfgang Denk, DENX Software Engineering, wd@denx.de. - * - * See file CREDITS for list of people who contributed to this - * project. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, - * MA 02111-1307 USA - */ - -OUTPUT_ARCH(powerpc) -/* Do we need any of these for elf? -   __DYNAMIC = 0;    */ -SECTIONS -{ -  .resetvec 0xFFFFFFFC : -  { -    *(.resetvec) -  } = 0xffff - -  .bootpg 0xFFFFF000 : -  { -    cpu/ppc4xx/start.o	(.bootpg) -  } = 0xffff - -  /* Read-only sections, merged into text segment: */ -  . = + SIZEOF_HEADERS; -  .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      : -  { -    /* WARNING - the following is hand-optimized to fit within	*/ -    /* the sector layout of our flash chips!	XXX FIXME XXX	*/ - -    cpu/ppc4xx/start.o	(.text) - -    *(.text) -    *(.got1) -  } -  _etext = .; -  PROVIDE (etext = .); -  .rodata    : -  { -    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) -  } -  .fini      : { *(.fini)    } =0 -  .ctors     : { *(.ctors)   } -  .dtors     : { *(.dtors)   } - -  /* Read-write section, merged into data segment: */ -  . = (. + 0x00FF) & 0xFFFFFF00; -  _erotext = .; -  PROVIDE (erotext = .); -  .reloc   : -  { -    *(.got) -    _GOT2_TABLE_ = .; -    *(.got2) -    _FIXUP_TABLE_ = .; -    *(.fixup) -  } -  __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >>2; -  __fixup_entries = (. - _FIXUP_TABLE_)>>2; - -  .data    : -  { -    *(.data) -    *(.data1) -    *(.sdata) -    *(.sdata2) -    *(.dynamic) -    CONSTRUCTORS -  } -  _edata  =  .; -  PROVIDE (edata = .); - -  . = .; -  __u_boot_cmd_start = .; -  .u_boot_cmd : { *(.u_boot_cmd) } -  __u_boot_cmd_end = .; - - -  . = .; -  __start___ex_table = .; -  __ex_table : { *(__ex_table) } -  __stop___ex_table = .; - -  . = ALIGN(256); -  __init_begin = .; -  .text.init : { *(.text.init) } -  .data.init : { *(.data.init) } -  . = ALIGN(256); -  __init_end = .; - -  __bss_start = .; -  .bss (NOLOAD)       : -  { -   *(.sbss) *(.scommon) -   *(.dynbss) -   *(.bss) -   *(COMMON) -   . = ALIGN(4); -  } - -  ppcenv_assert = ASSERT(. < 0xFFFF8000, ".bss section too big, overlaps .ppcenv section. Please update your confguration: CONFIG_SYS_MONITOR_BASE, CONFIG_SYS_MONITOR_LEN and TEXT_BASE may need to be modified."); - -  _end = . ; -  PROVIDE (end = .); -} diff --git a/board/amcc/taihu/u-boot.lds b/board/amcc/taihu/u-boot.lds deleted file mode 100644 index d37200d8b..000000000 --- a/board/amcc/taihu/u-boot.lds +++ /dev/null @@ -1,134 +0,0 @@ -/* - * (C) Copyright 2000 - * Wolfgang Denk, DENX Software Engineering, wd@denx.de. - * - * See file CREDITS for list of people who contributed to this - * project. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, - * MA 02111-1307 USA - */ - -OUTPUT_ARCH(powerpc) -/* Do we need any of these for elf? -   __DYNAMIC = 0;    */ -SECTIONS -{ -  .resetvec 0xFFFFFFFC : -  { -    *(.resetvec) -  } = 0xffff - -  /* Read-only sections, merged into text segment: */ -  . = + SIZEOF_HEADERS; -  .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      : -  { -    /* WARNING - the following is hand-optimized to fit within	*/ -    /* the sector layout of our flash chips!	XXX FIXME XXX	*/ - -    cpu/ppc4xx/start.o	(.text) - -    *(.text) -    *(.got1) -  } -  _etext = .; -  PROVIDE (etext = .); -  .rodata    : -  { -    *(.eh_frame) -    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) -  } -  .fini      : { *(.fini)    } =0 -  .ctors     : { *(.ctors)   } -  .dtors     : { *(.dtors)   } - -  /* Read-write section, merged into data segment: */ -  . = (. + 0x00FF) & 0xFFFFFF00; -  _erotext = .; -  PROVIDE (erotext = .); -  .reloc   : -  { -    *(.got) -    _GOT2_TABLE_ = .; -    *(.got2) -    _FIXUP_TABLE_ = .; -    *(.fixup) -  } -  __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >>2; -  __fixup_entries = (. - _FIXUP_TABLE_)>>2; - -  .data    : -  { -    *(.data) -    *(.data1) -    *(.sdata) -    *(.sdata2) -    *(.dynamic) -    CONSTRUCTORS -  } -  _edata  =  .; -  PROVIDE (edata = .); - -  . = .; -  __u_boot_cmd_start = .; -  .u_boot_cmd : { *(.u_boot_cmd) } -  __u_boot_cmd_end = .; - -  . = .; -  __start___ex_table = .; -  __ex_table : { *(__ex_table) } -  __stop___ex_table = .; - -  . = ALIGN(256); -  __init_begin = .; -  .text.init : { *(.text.init) } -  .data.init : { *(.data.init) } -  . = ALIGN(256); -  __init_end = .; - -  __bss_start = .; -  .bss (NOLOAD)       : -  { -   *(.sbss) *(.scommon) -   *(.dynbss) -   *(.bss) -   *(COMMON) -   . = ALIGN(4); -  } -  _end = . ; -  PROVIDE (end = .); -} diff --git a/board/amcc/taishan/taishan.c b/board/amcc/taishan/taishan.c index 0c20faf9a..279fae21c 100644 --- a/board/amcc/taishan/taishan.c +++ b/board/amcc/taishan/taishan.c @@ -209,99 +209,6 @@ int checkboard (void)  	return (0);  } -/************************************************************************* - *  pci_pre_init - * - *  This routine is called just prior to registering the hose and gives - *  the board the opportunity to check things. Returning a value of zero - *  indicates that things are bad & PCI initialization should be aborted. - * - *	Different boards may wish to customize the pci controller structure - *	(add regions, override default access routines, etc) or perform - *	certain pre-initialization actions. - * - ************************************************************************/ -#if defined(CONFIG_PCI) -int pci_pre_init(struct pci_controller * hose ) -{ -	unsigned long strap; - -	/*--------------------------------------------------------------------------+ -	 *	The ocotea board is always configured as the host & requires the -	 *	PCI arbiter to be enabled. -	 *--------------------------------------------------------------------------*/ -	mfsdr(SDR0_SDSTP1, strap); -	if( (strap & SDR0_SDSTP1_PAE_MASK) == 0 ){ -		printf("PCI: SDR0_STRP1[%08lX] - PCI Arbiter disabled.\n",strap); -		return 0; -	} - -	return 1; -} -#endif /* defined(CONFIG_PCI) */ - -/************************************************************************* - *  pci_target_init - * - *	The bootstrap configuration provides default settings for the pci - *	inbound map (PIM). But the bootstrap config choices are limited and - *	may not be sufficient for a given board. - * - ************************************************************************/ -#if defined(CONFIG_PCI) && defined(CONFIG_SYS_PCI_TARGET_INIT) -void pci_target_init(struct pci_controller * hose ) -{ -	/*--------------------------------------------------------------------------+ -	 * Disable everything -	 *--------------------------------------------------------------------------*/ -	out32r( PCIL0_PIM0SA, 0 ); /* disable */ -	out32r( PCIL0_PIM1SA, 0 ); /* disable */ -	out32r( PCIL0_PIM2SA, 0 ); /* disable */ -	out32r( PCIL0_EROMBA, 0 ); /* disable expansion rom */ - -	/*--------------------------------------------------------------------------+ -	 * Map all of SDRAM to PCI address 0x0000_0000. Note that the 440 strapping -	 * options to not support sizes such as 128/256 MB. -	 *--------------------------------------------------------------------------*/ -	out32r( PCIL0_PIM0LAL, CONFIG_SYS_SDRAM_BASE ); -	out32r( PCIL0_PIM0LAH, 0 ); -	out32r( PCIL0_PIM0SA, ~(gd->ram_size - 1) | 1 ); - -	out32r( PCIL0_BAR0, 0 ); - -	/*--------------------------------------------------------------------------+ -	 * Program the board's subsystem id/vendor id -	 *--------------------------------------------------------------------------*/ -	out16r( PCIL0_SBSYSVID, CONFIG_SYS_PCI_SUBSYS_VENDORID ); -	out16r( PCIL0_SBSYSID, CONFIG_SYS_PCI_SUBSYS_DEVICEID ); - -	out16r( PCIL0_CMD, in16r(PCIL0_CMD) | PCI_COMMAND_MEMORY ); -} -#endif /* defined(CONFIG_PCI) && defined(CONFIG_SYS_PCI_TARGET_INIT) */ - -/************************************************************************* - *  is_pci_host - * - *	This routine is called to determine if a pci scan should be - *	performed. With various hardware environments (especially cPCI and - *	PPMC) it's insufficient to depend on the state of the arbiter enable - *	bit in the strap register, or generic host/adapter assumptions. - * - *	Rather than hard-code a bad assumption in the general 440 code, the - *	440 pci code requires the board to decide at runtime. - * - *	Return 0 for adapter mode, non-zero for host (monarch) mode. - * - * - ************************************************************************/ -#if defined(CONFIG_PCI) -int is_pci_host(struct pci_controller *hose) -{ -	/* The ocotea board is always configured as host. */ -	return(1); -} -#endif /* defined(CONFIG_PCI) */ -  #ifdef CONFIG_POST  /*   * Returns 1 if keys pressed to start the power-on long-running tests diff --git a/board/amcc/taishan/u-boot.lds b/board/amcc/taishan/u-boot.lds deleted file mode 100644 index c043f69ee..000000000 --- a/board/amcc/taishan/u-boot.lds +++ /dev/null @@ -1,141 +0,0 @@ -/* - * (C) Copyright 2004 - * Wolfgang Denk, DENX Software Engineering, wd@denx.de. - * - * See file CREDITS for list of people who contributed to this - * project. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, - * MA 02111-1307 USA - */ - -OUTPUT_ARCH(powerpc) -/* Do we need any of these for elf? -   __DYNAMIC = 0;    */ -SECTIONS -{ -  .resetvec 0xFFFFFFFC : -  { -    *(.resetvec) -  } = 0xffff - -  .bootpg 0xFFFFF000 : -  { -    cpu/ppc4xx/start.o	(.bootpg) -  } = 0xffff - -  /* Read-only sections, merged into text segment: */ -  . = + SIZEOF_HEADERS; -  .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      : -  { -    /* WARNING - the following is hand-optimized to fit within	*/ -    /* the sector layout of our flash chips!	XXX FIXME XXX	*/ - -    cpu/ppc4xx/start.o	(.text) -    board/amcc/taishan/init.o	(.text) - -    *(.text) -    *(.got1) -  } -  _etext = .; -  PROVIDE (etext = .); -  .rodata    : -  { -    *(.eh_frame) -    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) -  } -  .fini      : { *(.fini)    } =0 -  .ctors     : { *(.ctors)   } -  .dtors     : { *(.dtors)   } - -  /* Read-write section, merged into data segment: */ -  . = (. + 0x00FF) & 0xFFFFFF00; -  _erotext = .; -  PROVIDE (erotext = .); -  .reloc   : -  { -    *(.got) -    _GOT2_TABLE_ = .; -    *(.got2) -    _FIXUP_TABLE_ = .; -    *(.fixup) -  } -  __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >>2; -  __fixup_entries = (. - _FIXUP_TABLE_)>>2; - -  .data    : -  { -    *(.data) -    *(.data1) -    *(.sdata) -    *(.sdata2) -    *(.dynamic) -    CONSTRUCTORS -  } -  _edata  =  .; -  PROVIDE (edata = .); - -  . = .; -  __u_boot_cmd_start = .; -  .u_boot_cmd : { *(.u_boot_cmd) } -  __u_boot_cmd_end = .; - - -  . = .; -  __start___ex_table = .; -  __ex_table : { *(__ex_table) } -  __stop___ex_table = .; - -  . = ALIGN(256); -  __init_begin = .; -  .text.init : { *(.text.init) } -  .data.init : { *(.data.init) } -  . = ALIGN(256); -  __init_end = .; - -  __bss_start = .; -  .bss (NOLOAD)       : -  { -   *(.sbss) *(.scommon) -   *(.dynbss) -   *(.bss) -   *(COMMON) -   . = ALIGN(4); -  } -  _end = . ; -  PROVIDE (end = .); -} diff --git a/board/amcc/walnut/u-boot.lds b/board/amcc/walnut/u-boot.lds deleted file mode 100644 index d7a78570e..000000000 --- a/board/amcc/walnut/u-boot.lds +++ /dev/null @@ -1,135 +0,0 @@ -/* - * (C) Copyright 2000 - * Wolfgang Denk, DENX Software Engineering, wd@denx.de. - * - * See file CREDITS for list of people who contributed to this - * project. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, - * MA 02111-1307 USA - */ - -OUTPUT_ARCH(powerpc) -/* Do we need any of these for elf? -   __DYNAMIC = 0;    */ -SECTIONS -{ -  .resetvec 0xFFFFFFFC : -  { -    *(.resetvec) -  } = 0xffff - -  /* Read-only sections, merged into text segment: */ -  . = + SIZEOF_HEADERS; -  .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      : -  { -    /* WARNING - the following is hand-optimized to fit within	*/ -    /* the sector layout of our flash chips!	XXX FIXME XXX	*/ - -    cpu/ppc4xx/start.o	(.text) - -    *(.text) -    *(.got1) -  } -  _etext = .; -  PROVIDE (etext = .); -  .rodata    : -  { -    *(.eh_frame) -    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) -  } -  .fini      : { *(.fini)    } =0 -  .ctors     : { *(.ctors)   } -  .dtors     : { *(.dtors)   } - -  /* Read-write section, merged into data segment: */ -  . = (. + 0x00FF) & 0xFFFFFF00; -  _erotext = .; -  PROVIDE (erotext = .); -  .reloc   : -  { -    *(.got) -    _GOT2_TABLE_ = .; -    *(.got2) -    _FIXUP_TABLE_ = .; -    *(.fixup) -  } -  __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >>2; -  __fixup_entries = (. - _FIXUP_TABLE_)>>2; - -  .data    : -  { -    *(.data) -    *(.data1) -    *(.sdata) -    *(.sdata2) -    *(.dynamic) -    CONSTRUCTORS -  } -  _edata  =  .; -  PROVIDE (edata = .); - -  . = .; -  __u_boot_cmd_start = .; -  .u_boot_cmd : { *(.u_boot_cmd) } -  __u_boot_cmd_end = .; - - -  . = .; -  __start___ex_table = .; -  __ex_table : { *(__ex_table) } -  __stop___ex_table = .; - -  . = ALIGN(256); -  __init_begin = .; -  .text.init : { *(.text.init) } -  .data.init : { *(.data.init) } -  . = ALIGN(256); -  __init_end = .; - -  __bss_start = .; -  .bss (NOLOAD)       : -  { -   *(.sbss) *(.scommon) -   *(.dynbss) -   *(.bss) -   *(COMMON) -   . = ALIGN(4); -  } -  _end = . ; -  PROVIDE (end = .); -} diff --git a/board/amcc/yosemite/u-boot.lds b/board/amcc/yosemite/u-boot.lds deleted file mode 100644 index b8646d539..000000000 --- a/board/amcc/yosemite/u-boot.lds +++ /dev/null @@ -1,141 +0,0 @@ -/* - * (C) Copyright 2002 - * Wolfgang Denk, DENX Software Engineering, wd@denx.de. - * - * See file CREDITS for list of people who contributed to this - * project. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, - * MA 02111-1307 USA - */ - -OUTPUT_ARCH(powerpc) -/* Do we need any of these for elf? -   __DYNAMIC = 0;    */ -SECTIONS -{ -  .resetvec 0xFFFFFFFC : -  { -    *(.resetvec) -  } = 0xffff - -  .bootpg 0xFFFFF000 : -  { -    cpu/ppc4xx/start.o	(.bootpg) -  } = 0xffff - -  /* Read-only sections, merged into text segment: */ -  . = + SIZEOF_HEADERS; -  .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      : -  { -    /* WARNING - the following is hand-optimized to fit within	*/ -    /* the sector layout of our flash chips!	XXX FIXME XXX	*/ - -    cpu/ppc4xx/start.o	(.text) -    board/amcc/yosemite/init.o	(.text) - -    *(.text) -    *(.got1) -  } -  _etext = .; -  PROVIDE (etext = .); -  .rodata    : -  { -    *(.eh_frame) -    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) -  } -  .fini      : { *(.fini)    } =0 -  .ctors     : { *(.ctors)   } -  .dtors     : { *(.dtors)   } - -  /* Read-write section, merged into data segment: */ -  . = (. + 0x00FF) & 0xFFFFFF00; -  _erotext = .; -  PROVIDE (erotext = .); -  .reloc   : -  { -    *(.got) -    _GOT2_TABLE_ = .; -    *(.got2) -    _FIXUP_TABLE_ = .; -    *(.fixup) -  } -  __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >>2; -  __fixup_entries = (. - _FIXUP_TABLE_)>>2; - -  .data    : -  { -    *(.data) -    *(.data1) -    *(.sdata) -    *(.sdata2) -    *(.dynamic) -    CONSTRUCTORS -  } -  _edata  =  .; -  PROVIDE (edata = .); - -  . = .; -  __u_boot_cmd_start = .; -  .u_boot_cmd : { *(.u_boot_cmd) } -  __u_boot_cmd_end = .; - - -  . = .; -  __start___ex_table = .; -  __ex_table : { *(__ex_table) } -  __stop___ex_table = .; - -  . = ALIGN(256); -  __init_begin = .; -  .text.init : { *(.text.init) } -  .data.init : { *(.data.init) } -  . = ALIGN(256); -  __init_end = .; - -  __bss_start = .; -  .bss (NOLOAD)       : -  { -   *(.sbss) *(.scommon) -   *(.dynbss) -   *(.bss) -   *(COMMON) -   . = ALIGN(4); -  } -  _end = . ; -  PROVIDE (end = .); -} diff --git a/board/amcc/yosemite/yosemite.c b/board/amcc/yosemite/yosemite.c index ccbeb0e7a..98c1f3b81 100644 --- a/board/amcc/yosemite/yosemite.c +++ b/board/amcc/yosemite/yosemite.c @@ -353,166 +353,6 @@ phys_size_t initdram(int board)  }  /************************************************************************* - *  pci_pre_init - * - *  This routine is called just prior to registering the hose and gives - *  the board the opportunity to check things. Returning a value of zero - *  indicates that things are bad & PCI initialization should be aborted. - * - *	Different boards may wish to customize the pci controller structure - *	(add regions, override default access routines, etc) or perform - *	certain pre-initialization actions. - * - ************************************************************************/ -#if defined(CONFIG_PCI) -int pci_pre_init(struct pci_controller *hose) -{ -	unsigned long addr; - -	/*-------------------------------------------------------------------------+ -	  | Set priority for all PLB3 devices to 0. -	  | Set PLB3 arbiter to fair mode. -	  +-------------------------------------------------------------------------*/ -	mfsdr(SD0_AMP1, addr); -	mtsdr(SD0_AMP1, (addr & 0x000000FF) | 0x0000FF00); -	addr = mfdcr(PLB3_ACR); -	mtdcr(PLB3_ACR, addr | 0x80000000); - -	/*-------------------------------------------------------------------------+ -	  | Set priority for all PLB4 devices to 0. -	  +-------------------------------------------------------------------------*/ -	mfsdr(SD0_AMP0, addr); -	mtsdr(SD0_AMP0, (addr & 0x000000FF) | 0x0000FF00); -	addr = mfdcr(PLB4_ACR) | 0xa0000000;	/* Was 0x8---- */ -	mtdcr(PLB4_ACR, addr); - -	/*-------------------------------------------------------------------------+ -	  | Set Nebula PLB4 arbiter to fair mode. -	  +-------------------------------------------------------------------------*/ -	/* Segment0 */ -	addr = (mfdcr(PLB0_ACR) & ~PLB0_ACR_PPM_MASK) | PLB0_ACR_PPM_FAIR; -	addr = (addr & ~PLB0_ACR_HBU_MASK) | PLB0_ACR_HBU_ENABLED; -	addr = (addr & ~PLB0_ACR_RDP_MASK) | PLB0_ACR_RDP_4DEEP; -	addr = (addr & ~PLB0_ACR_WRP_MASK) | PLB0_ACR_WRP_2DEEP; -	mtdcr(PLB0_ACR, addr); - -	/* Segment1 */ -	addr = (mfdcr(PLB1_ACR) & ~PLB1_ACR_PPM_MASK) | PLB1_ACR_PPM_FAIR; -	addr = (addr & ~PLB1_ACR_HBU_MASK) | PLB1_ACR_HBU_ENABLED; -	addr = (addr & ~PLB1_ACR_RDP_MASK) | PLB1_ACR_RDP_4DEEP; -	addr = (addr & ~PLB1_ACR_WRP_MASK) | PLB1_ACR_WRP_2DEEP; -	mtdcr(PLB1_ACR, addr); - -	return 1; -} -#endif	/* defined(CONFIG_PCI) */ - -/************************************************************************* - *  pci_target_init - * - *	The bootstrap configuration provides default settings for the pci - *	inbound map (PIM). But the bootstrap config choices are limited and - *	may not be sufficient for a given board. - * - ************************************************************************/ -#if defined(CONFIG_PCI) && defined(CONFIG_SYS_PCI_TARGET_INIT) -void pci_target_init(struct pci_controller *hose) -{ -	/*--------------------------------------------------------------------------+ -	 * Set up Direct MMIO registers -	 *--------------------------------------------------------------------------*/ -	/*--------------------------------------------------------------------------+ -	  | PowerPC440 EP PCI Master configuration. -	  | Map one 1Gig range of PLB/processor addresses to PCI memory space. -	  |   PLB address 0xA0000000-0xDFFFFFFF ==> PCI address 0xA0000000-0xDFFFFFFF -	  |   Use byte reversed out routines to handle endianess. -	  | Make this region non-prefetchable. -	  +--------------------------------------------------------------------------*/ -	out32r(PCIL0_PMM0MA, 0x00000000);	/* PMM0 Mask/Attribute - disabled b4 setting */ -	out32r(PCIL0_PMM0LA, CONFIG_SYS_PCI_MEMBASE);	/* PMM0 Local Address */ -	out32r(PCIL0_PMM0PCILA, CONFIG_SYS_PCI_MEMBASE);	/* PMM0 PCI Low Address */ -	out32r(PCIL0_PMM0PCIHA, 0x00000000);	/* PMM0 PCI High Address */ -	out32r(PCIL0_PMM0MA, 0xE0000001);	/* 512M + No prefetching, and enable region */ - -	out32r(PCIL0_PMM1MA, 0x00000000);	/* PMM0 Mask/Attribute - disabled b4 setting */ -	out32r(PCIL0_PMM1LA, CONFIG_SYS_PCI_MEMBASE2);	/* PMM0 Local Address */ -	out32r(PCIL0_PMM1PCILA, CONFIG_SYS_PCI_MEMBASE2);	/* PMM0 PCI Low Address */ -	out32r(PCIL0_PMM1PCIHA, 0x00000000);	/* PMM0 PCI High Address */ -	out32r(PCIL0_PMM1MA, 0xE0000001);	/* 512M + No prefetching, and enable region */ - -	out32r(PCIL0_PTM1MS, 0x00000001);	/* Memory Size/Attribute */ -	out32r(PCIL0_PTM1LA, 0);	/* Local Addr. Reg */ -	out32r(PCIL0_PTM2MS, 0);	/* Memory Size/Attribute */ -	out32r(PCIL0_PTM2LA, 0);	/* Local Addr. Reg */ - -	/*--------------------------------------------------------------------------+ -	 * Set up Configuration registers -	 *--------------------------------------------------------------------------*/ - -	/* Program the board's subsystem id/vendor id */ -	pci_write_config_word(0, PCI_SUBSYSTEM_VENDOR_ID, -			      CONFIG_SYS_PCI_SUBSYS_VENDORID); -	pci_write_config_word(0, PCI_SUBSYSTEM_ID, CONFIG_SYS_PCI_SUBSYS_ID); - -	/* Configure command register as bus master */ -	pci_write_config_word(0, PCI_COMMAND, PCI_COMMAND_MASTER); - -	/* 240nS PCI clock */ -	pci_write_config_word(0, PCI_LATENCY_TIMER, 1); - -	/* No error reporting */ -	pci_write_config_word(0, PCI_ERREN, 0); - -	pci_write_config_dword(0, PCI_BRDGOPT2, 0x00000101); - -} -#endif				/* defined(CONFIG_PCI) && defined(CONFIG_SYS_PCI_TARGET_INIT) */ - -/************************************************************************* - *  pci_master_init - * - ************************************************************************/ -#if defined(CONFIG_PCI) && defined(CONFIG_SYS_PCI_MASTER_INIT) -void pci_master_init(struct pci_controller *hose) -{ -	unsigned short temp_short; - -	/*--------------------------------------------------------------------------+ -	  | Write the PowerPC440 EP PCI Configuration regs. -	  |   Enable PowerPC440 EP to be a master on the PCI bus (PMM). -	  |   Enable PowerPC440 EP to act as a PCI memory target (PTM). -	  +--------------------------------------------------------------------------*/ -	pci_read_config_word(0, PCI_COMMAND, &temp_short); -	pci_write_config_word(0, PCI_COMMAND, -			      temp_short | PCI_COMMAND_MASTER | -			      PCI_COMMAND_MEMORY); -} -#endif				/* defined(CONFIG_PCI) && defined(CONFIG_SYS_PCI_MASTER_INIT) */ - -/************************************************************************* - *  is_pci_host - * - *	This routine is called to determine if a pci scan should be - *	performed. With various hardware environments (especially cPCI and - *	PPMC) it's insufficient to depend on the state of the arbiter enable - *	bit in the strap register, or generic host/adapter assumptions. - * - *	Rather than hard-code a bad assumption in the general 440 code, the - *	440 pci code requires the board to decide at runtime. - * - *	Return 0 for adapter mode, non-zero for host (monarch) mode. - * - * - ************************************************************************/ -#if defined(CONFIG_PCI) -int is_pci_host(struct pci_controller *hose) -{ -	/* Bamboo is always configured as host. */ -	return (1); -} -#endif				/* defined(CONFIG_PCI) */ - -/*************************************************************************   *  hw_watchdog_reset   *   *	This routine is called to reset (keep alive) the watchdog timer diff --git a/board/amcc/yucca/u-boot.lds b/board/amcc/yucca/u-boot.lds deleted file mode 100644 index 2d44c6478..000000000 --- a/board/amcc/yucca/u-boot.lds +++ /dev/null @@ -1,141 +0,0 @@ -/* - * (C) Copyright 2004 - * Wolfgang Denk, DENX Software Engineering, wd@denx.de. - * - * See file CREDITS for list of people who contributed to this - * project. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, - * MA 02111-1307 USA - */ - -OUTPUT_ARCH(powerpc) -/* Do we need any of these for elf? -   __DYNAMIC = 0;    */ -SECTIONS -{ -  .resetvec 0xFFFFFFFC : -  { -    *(.resetvec) -  } = 0xffff - -  .bootpg 0xFFFFF000 : -  { -    cpu/ppc4xx/start.o	(.bootpg) -  } = 0xffff - -  /* Read-only sections, merged into text segment: */ -  . = + SIZEOF_HEADERS; -  .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      : -  { -    /* WARNING - the following is hand-optimized to fit within	*/ -    /* the sector layout of our flash chips!	XXX FIXME XXX	*/ - -    cpu/ppc4xx/start.o		(.text) -    board/amcc/yucca/init.o	(.text) - -    *(.text) -    *(.got1) -  } -  _etext = .; -  PROVIDE (etext = .); -  .rodata    : -  { -    *(.eh_frame) -    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) -  } -  .fini      : { *(.fini)    } =0 -  .ctors     : { *(.ctors)   } -  .dtors     : { *(.dtors)   } - -  /* Read-write section, merged into data segment: */ -  . = (. + 0x00FF) & 0xFFFFFF00; -  _erotext = .; -  PROVIDE (erotext = .); -  .reloc   : -  { -    *(.got) -    _GOT2_TABLE_ = .; -    *(.got2) -    _FIXUP_TABLE_ = .; -    *(.fixup) -  } -  __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >>2; -  __fixup_entries = (. - _FIXUP_TABLE_)>>2; - -  .data    : -  { -    *(.data) -    *(.data1) -    *(.sdata) -    *(.sdata2) -    *(.dynamic) -    CONSTRUCTORS -  } -  _edata  =  .; -  PROVIDE (edata = .); - -  . = .; -  __u_boot_cmd_start = .; -  .u_boot_cmd : { *(.u_boot_cmd) } -  __u_boot_cmd_end = .; - - -  . = .; -  __start___ex_table = .; -  __ex_table : { *(__ex_table) } -  __stop___ex_table = .; - -  . = ALIGN(256); -  __init_begin = .; -  .text.init : { *(.text.init) } -  .data.init : { *(.data.init) } -  . = ALIGN(256); -  __init_end = .; - -  __bss_start = .; -  .bss (NOLOAD)       : -  { -   *(.sbss) *(.scommon) -   *(.dynbss) -   *(.bss) -   *(COMMON) -   . = ALIGN(4); -  } -  _end = . ; -  PROVIDE (end = .); -} diff --git a/board/amcc/yucca/yucca.c b/board/amcc/yucca/yucca.c index d8f4bcbb1..e0d19bcb6 100644 --- a/board/amcc/yucca/yucca.c +++ b/board/amcc/yucca/yucca.c @@ -588,98 +588,8 @@ u32 ddr_clktr(u32 default_val) {  	return default_val;  } -/************************************************************************* - *  pci_pre_init - * - *  This routine is called just prior to registering the hose and gives - *  the board the opportunity to check things. Returning a value of zero - *  indicates that things are bad & PCI initialization should be aborted. - * - *	Different boards may wish to customize the pci controller structure - *	(add regions, override default access routines, etc) or perform - *	certain pre-initialization actions. - * - ************************************************************************/ -#if defined(CONFIG_PCI) -int pci_pre_init(struct pci_controller * hose ) -{ -	unsigned long strap; - -	/*-------------------------------------------------------------------+ -	 *	The yucca board is always configured as the host & requires the -	 *	PCI arbiter to be enabled. -	 *-------------------------------------------------------------------*/ -	mfsdr(SDR0_SDSTP1, strap); -	if( (strap & SDR0_SDSTP1_PAE_MASK) == 0 ) { -		printf("PCI: SDR0_STRP1[%08lX] - PCI Arbiter disabled.\n",strap); -		return 0; -	} - -	return 1; -} -#endif	/* defined(CONFIG_PCI) */ - -/************************************************************************* - *  pci_target_init - * - *	The bootstrap configuration provides default settings for the pci - *	inbound map (PIM). But the bootstrap config choices are limited and - *	may not be sufficient for a given board. - * - ************************************************************************/ -#if defined(CONFIG_PCI) && defined(CONFIG_SYS_PCI_TARGET_INIT) -void pci_target_init(struct pci_controller * hose ) -{ -	/*-------------------------------------------------------------------+ -	 * Disable everything -	 *-------------------------------------------------------------------*/ -	out32r( PCIL0_PIM0SA, 0 ); /* disable */ -	out32r( PCIL0_PIM1SA, 0 ); /* disable */ -	out32r( PCIL0_PIM2SA, 0 ); /* disable */ -	out32r( PCIL0_EROMBA, 0 ); /* disable expansion rom */ - -	/*-------------------------------------------------------------------+ -	 * Map all of SDRAM to PCI address 0x0000_0000. Note that the 440 -	 * strapping options to not support sizes such as 128/256 MB. -	 *-------------------------------------------------------------------*/ -	out32r( PCIL0_PIM0LAL, CONFIG_SYS_SDRAM_BASE ); -	out32r( PCIL0_PIM0LAH, 0 ); -	out32r( PCIL0_PIM0SA, ~(gd->ram_size - 1) | 1 ); -	out32r( PCIL0_BAR0, 0 ); - -	/*-------------------------------------------------------------------+ -	 * Program the board's subsystem id/vendor id -	 *-------------------------------------------------------------------*/ -	out16r( PCIL0_SBSYSVID, CONFIG_SYS_PCI_SUBSYS_VENDORID ); -	out16r( PCIL0_SBSYSID, CONFIG_SYS_PCI_SUBSYS_DEVICEID ); - -	out16r( PCIL0_CMD, in16r(PCIL0_CMD) | PCI_COMMAND_MEMORY ); -} -#endif	/* defined(CONFIG_PCI) && defined(CONFIG_SYS_PCI_TARGET_INIT) */ -  #if defined(CONFIG_PCI) -/************************************************************************* - *  is_pci_host - * - *	This routine is called to determine if a pci scan should be - *	performed. With various hardware environments (especially cPCI and - *	PPMC) it's insufficient to depend on the state of the arbiter enable - *	bit in the strap register, or generic host/adapter assumptions. - * - *	Rather than hard-code a bad assumption in the general 440 code, the - *	440 pci code requires the board to decide at runtime. - * - *	Return 0 for adapter mode, non-zero for host (monarch) mode. - * - * - ************************************************************************/ -int is_pci_host(struct pci_controller *hose) -{ -	/* The yucca board is always configured as host. */ -	return 1; -} - -static int yucca_pcie_card_present(int port) +int board_pcie_card_present(int port)  {  	u16 reg; @@ -697,185 +607,54 @@ static int yucca_pcie_card_present(int port)  }  /* - * For the given slot, set rootpoint mode, send power to the slot, - * turn on the green LED and turn off the yellow LED, enable the clock - * and turn off reset. - */ -void yucca_setup_pcie_fpga_rootpoint(int port) -{ -	u16 power, clock, green_led, yellow_led, reset_off, rootpoint, endpoint; - -	switch(port) { -	case 0: -		rootpoint   = FPGA_REG1C_PE0_ROOTPOINT; -		endpoint    = 0; -		power	    = FPGA_REG1A_PE0_PWRON; -		green_led   = FPGA_REG1A_PE0_GLED; -		clock	    = FPGA_REG1A_PE0_REFCLK_ENABLE; -		yellow_led  = FPGA_REG1A_PE0_YLED; -		reset_off   = FPGA_REG1C_PE0_PERST; -		break; -	case 1: -		rootpoint   = 0; -		endpoint    = FPGA_REG1C_PE1_ENDPOINT; -		power	    = FPGA_REG1A_PE1_PWRON; -		green_led   = FPGA_REG1A_PE1_GLED; -		clock	    = FPGA_REG1A_PE1_REFCLK_ENABLE; -		yellow_led  = FPGA_REG1A_PE1_YLED; -		reset_off   = FPGA_REG1C_PE1_PERST; -		break; -	case 2: -		rootpoint   = 0; -		endpoint    = FPGA_REG1C_PE2_ENDPOINT; -		power	    = FPGA_REG1A_PE2_PWRON; -		green_led   = FPGA_REG1A_PE2_GLED; -		clock	    = FPGA_REG1A_PE2_REFCLK_ENABLE; -		yellow_led  = FPGA_REG1A_PE2_YLED; -		reset_off   = FPGA_REG1C_PE2_PERST; -		break; - -	default: -		return; -	} - -	out_be16((u16 *)FPGA_REG1A, -		 ~(power | clock | green_led) & -		 (yellow_led | in_be16((u16 *)FPGA_REG1A))); - -	out_be16((u16 *)FPGA_REG1C, -		 ~(endpoint | reset_off) & -		 (rootpoint | in_be16((u16 *)FPGA_REG1C))); -	/* -	 * Leave device in reset for a while after powering on the -	 * slot to give it a chance to initialize. -	 */ -	udelay(250 * 1000); - -	out_be16((u16 *)FPGA_REG1C, reset_off | in_be16((u16 *)FPGA_REG1C)); -} -/*   * For the given slot, set endpoint mode, send power to the slot, - * turn on the green LED and turn off the yellow LED, enable the clock - * .In end point mode reset bit is  read only. + * turn on the green LED and turn off the yellow LED, enable the + * clock. In end point mode reset bit is read only.   */ -void yucca_setup_pcie_fpga_endpoint(int port) +void board_pcie_setup_port(int port, int rootpoint)  { -	u16 power, clock, green_led, yellow_led, reset_off, rootpoint, endpoint; +	u16 power, clock, green_led, yellow_led, +		reset_off, rp, ep; -	switch(port) { +	switch (port) {  	case 0: -		rootpoint   = FPGA_REG1C_PE0_ROOTPOINT; -		endpoint    = 0; -		power	    = FPGA_REG1A_PE0_PWRON; -		green_led   = FPGA_REG1A_PE0_GLED; -		clock	    = FPGA_REG1A_PE0_REFCLK_ENABLE; -		yellow_led  = FPGA_REG1A_PE0_YLED; -		reset_off   = FPGA_REG1C_PE0_PERST; +		rp = FPGA_REG1C_PE0_ROOTPOINT; +		ep = 0;  		break;  	case 1: -		rootpoint   = 0; -		endpoint    = FPGA_REG1C_PE1_ENDPOINT; -		power	    = FPGA_REG1A_PE1_PWRON; -		green_led   = FPGA_REG1A_PE1_GLED; -		clock	    = FPGA_REG1A_PE1_REFCLK_ENABLE; -		yellow_led  = FPGA_REG1A_PE1_YLED; -		reset_off   = FPGA_REG1C_PE1_PERST; +		rp = 0; +		ep = FPGA_REG1C_PE1_ENDPOINT;  		break;  	case 2: -		rootpoint   = 0; -		endpoint    = FPGA_REG1C_PE2_ENDPOINT; -		power	    = FPGA_REG1A_PE2_PWRON; -		green_led   = FPGA_REG1A_PE2_GLED; -		clock	    = FPGA_REG1A_PE2_REFCLK_ENABLE; -		yellow_led  = FPGA_REG1A_PE2_YLED; -		reset_off   = FPGA_REG1C_PE2_PERST; +		rp = 0; +		ep = FPGA_REG1C_PE2_ENDPOINT;  		break;  	default:  		return;  	} -	out_be16((u16 *)FPGA_REG1A, -		 ~(power | clock | green_led) & -		 (yellow_led | in_be16((u16 *)FPGA_REG1A))); - -	out_be16((u16 *)FPGA_REG1C, -		 ~(rootpoint | reset_off) & -		 (endpoint | in_be16((u16 *)FPGA_REG1C))); -} - -static struct pci_controller pcie_hose[3] = {{0},{0},{0}}; +	power = FPGA_REG1A_PWRON_ENCODE(port); +	green_led = FPGA_REG1A_GLED_ENCODE(port); +	clock = FPGA_REG1A_REFCLK_ENCODE(port); +	yellow_led = FPGA_REG1A_YLED_ENCODE(port); +	reset_off = FPGA_REG1C_PERST_ENCODE(port); -void pcie_setup_hoses(int busno) -{ -	struct pci_controller *hose; -	int i, bus; -	int ret = 0; -	char *env; -	unsigned int delay; - -	/* -	 * assume we're called after the PCIX hose is initialized, which takes -	 * bus ID 0 and therefore start numbering PCIe's from 1. -	 */ -	bus = busno; -	for (i = 0; i <= 2; i++) { -		/* Check for yucca card presence */ -		if (!yucca_pcie_card_present(i)) -			continue; - -		if (is_end_point(i)) { -			yucca_setup_pcie_fpga_endpoint(i); -			ret = ppc4xx_init_pcie_endport(i); -		} else { -			yucca_setup_pcie_fpga_rootpoint(i); -			ret = ppc4xx_init_pcie_rootport(i); -		} -		if (ret == -ENODEV) -			continue; -		if (ret) { -			printf("PCIE%d: initialization as %s failed\n", i, -			       is_end_point(i) ? "endpoint" : "root-complex"); -			continue; -		} - -		hose = &pcie_hose[i]; -		hose->first_busno = bus; -		hose->last_busno = bus; -		hose->current_busno = bus; +	out_be16((u16 *)FPGA_REG1A, ~(power | clock | green_led) & +		 (yellow_led | in_be16((u16 *)FPGA_REG1A))); -		/* setup mem resource */ -		pci_set_region(hose->regions + 0, -			CONFIG_SYS_PCIE_MEMBASE + i * CONFIG_SYS_PCIE_MEMSIZE, -			CONFIG_SYS_PCIE_MEMBASE + i * CONFIG_SYS_PCIE_MEMSIZE, -			CONFIG_SYS_PCIE_MEMSIZE, -			PCI_REGION_MEM); -		hose->region_count = 1; -		pci_register_hose(hose); +	out_be16((u16 *)FPGA_REG1C, ~(ep | reset_off) & +		 (rp | in_be16((u16 *)FPGA_REG1C))); -		if (is_end_point(i)) { -			ppc4xx_setup_pcie_endpoint(hose, i); -			/* -			 * Reson for no scanning is endpoint can not generate -			 * upstream configuration accesses. -			 */ -		} else { -			ppc4xx_setup_pcie_rootpoint(hose, i); -			env = getenv("pciscandelay"); -			if (env != NULL) { -				delay = simple_strtoul(env, NULL, 10); -				if (delay > 5) -					printf("Warning, expect noticable delay before " -					       "PCIe scan due to 'pciscandelay' value!\n"); -				mdelay(delay * 1000); -			} +	if (rootpoint) { +		/* +		 * Leave device in reset for a while after powering on the +		 * slot to give it a chance to initialize. +		 */ +		udelay(250 * 1000); -			/* -			 * Config access can only go down stream -			 */ -			hose->last_busno = pci_hose_scan(hose); -			bus = hose->last_busno + 1; -		} +		out_be16((u16 *)FPGA_REG1C, +			 reset_off | in_be16((u16 *)FPGA_REG1C));  	}  }  #endif	/* defined(CONFIG_PCI) */ |