summaryrefslogtreecommitdiff
path: root/board/netstal/common
diff options
context:
space:
mode:
authorNiklaus Giger <niklaus.giger@member.fsf.org>2011-07-22 16:10:18 +0200
committerWolfgang Denk <wd@denx.de>2011-07-28 21:45:34 +0200
commit1103cf2f5c8f0712f6b64283a60c90f254a32345 (patch)
tree80b39a2150e6ae26addb4a89260327e1f12a731f /board/netstal/common
parent1626308797ac4184e73e56d275a1b8da11a62d5b (diff)
downloadu-boot-imx-1103cf2f5c8f0712f6b64283a60c90f254a32345.zip
u-boot-imx-1103cf2f5c8f0712f6b64283a60c90f254a32345.tar.gz
u-boot-imx-1103cf2f5c8f0712f6b64283a60c90f254a32345.tar.bz2
Removed obsolete Netstal boards
Signed-off-by: Niklaus Giger <niklaus.giger@member.fsf.org>
Diffstat (limited to 'board/netstal/common')
-rw-r--r--board/netstal/common/fixed_sdram.c105
-rw-r--r--board/netstal/common/nm.h44
-rw-r--r--board/netstal/common/nm_bsp.c117
3 files changed, 0 insertions, 266 deletions
diff --git a/board/netstal/common/fixed_sdram.c b/board/netstal/common/fixed_sdram.c
deleted file mode 100644
index 51b34b2..0000000
--- a/board/netstal/common/fixed_sdram.c
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- *(C) Copyright 2005-2008 Netstal Maschinen AG
- * Niklaus Giger (Niklaus.Giger@netstal.com)
- *
- * This source code is free software; you can redistribute it
- * and/or modify it in source code form 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.h>
-#include <asm/processor.h>
-#include "nm.h"
-
-#if defined(DEBUG)
-void show_sdram_registers(void)
-{
- u32 value;
-
- printf("SDRAM Controller Registers --\n");
- mfsdram(SDRAM0_CFG, value);
- printf(" SDRAM0_CFG : 0x%08x\n", value);
- mfsdram(SDRAM0_STATUS, value);
- printf(" SDRAM0_STATUS: 0x%08x\n", value);
- mfsdram(SDRAM0_B0CR, value);
- printf(" SDRAM0_B0CR : 0x%08x\n", value);
- mfsdram(SDRAM0_B1CR, value);
- printf(" SDRAM0_B1CR : 0x%08x\n", value);
- mfsdram(SDRAM0_TR, value);
- printf(" SDRAM0_TR : 0x%08x\n", value);
- mfsdram(SDRAM0_RTR, value);
- printf(" SDRAM0_RTR : 0x%08x\n", value);
-}
-#endif
-
-long int init_ppc405_sdram(unsigned int dram_size)
-{
-#ifdef DEBUG
- printf(__FUNCTION__);
-#endif
- /* disable memory controller */
- mtsdram(SDRAM0_CFG, 0x00000000);
-
- udelay (500);
-
- /* Clear SDRAM0_BESR0 (Bus Error Syndrome Register) */
- mtsdram(SDRAM0_BESR0, 0xffffffff);
-
- /* Clear SDRAM0_BESR1 (Bus Error Syndrome Register) */
- mtsdram(SDRAM0_BESR1, 0xffffffff);
-
- /* Clear SDRAM0_ECCCFG (disable ECC) */
- mtsdram(SDRAM0_ECCCFG, 0x00000000);
-
- /* Clear SDRAM0_ECCESR (ECC Error Syndrome Register) */
- mtsdram(SDRAM0_ECCESR, 0xffffffff);
-
- /* Timing register: CASL=2, PTA=2, CTP=2, LDF=1, RFTA=5, RCD=2
- */
- mtsdram(SDRAM0_TR, 0x008a4015);
-
- /* Memory Bank 0 Config == BA=0x00000000, SZ=64M, AM=3, BE=1
- * and refresh timer
- */
- switch (dram_size >> 20) {
- case 32:
- mtsdram(SDRAM0_B0CR, 0x00062001);
- mtsdram(SDRAM0_RTR, 0x07F00000);
- break;
- case 64:
- mtsdram(SDRAM0_B0CR, 0x00084001);
- mtsdram(SDRAM0_RTR, 0x04100000);
- break;
- case 128:
- mtsdram(SDRAM0_B0CR, 0x000A4001);
- mtsdram(SDRAM0_RTR, 0x04100000);
- break;
- default:
- printf("Invalid memory size of %d MB given\n", dram_size >> 20);
- }
-
- /* Power management idle timer set to the default. */
- mtsdram(SDRAM0_PMIT, 0x07c00000);
-
- udelay (500);
-
- /* Enable banks (DCE=1, BPRF=1, ECCDD=1, EMDUL=1) TODO */
- mtsdram(SDRAM0_CFG, 0x90800000);
-
-#ifdef DEBUG
- printf("%s: done\n", __FUNCTION__);
-#endif
- return dram_size;
-}
diff --git a/board/netstal/common/nm.h b/board/netstal/common/nm.h
deleted file mode 100644
index 3dff1d6..0000000
--- a/board/netstal/common/nm.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- *(C) Copyright 2005-2007 Netstal Maschinen AG
- * Niklaus Giger (Niklaus.Giger@netstal.com)
- *
- * This source code is free software; you can redistribute it
- * and/or modify it in source code form 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
- */
-
-extern void hcu_led_set(u32 value);
-extern u32 get_serial_number(void);
-extern u32 hcu_get_slot(void);
-extern int board_with_pci(void);
-extern void nm_show_print(int generation, int index, int hw_capabilities);
-extern void set_params_for_sw_install(int install_requested, char *board_name );
-extern void common_misc_init_r(void);
-
-enum {
- /* HW_GENERATION_HCU1/2 is no longer supported */
- HW_GENERATION_HCU3 = 0x10,
- HW_GENERATION_HCU4 = 0x20,
- HW_GENERATION_HCU5 = 0x30,
- HW_GENERATION_MCU = 0x08,
- HW_GENERATION_MCU20 = 0x0a,
- HW_GENERATION_MCU25 = 0x09,
-};
-
-#ifdef CONFIG_405GP
-#if defined(DEBUG)
-void show_sdram_registers(void);
-#endif
-long int init_ppc405_sdram(unsigned int dram_size);
-#endif
diff --git a/board/netstal/common/nm_bsp.c b/board/netstal/common/nm_bsp.c
deleted file mode 100644
index 237f4ed..0000000
--- a/board/netstal/common/nm_bsp.c
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- *(C) Copyright 2005-2008 Netstal Maschinen AG
- * Niklaus Giger (Niklaus.Giger@netstal.com)
- *
- * This source code is free software; you can redistribute it
- * and/or modify it in source code form 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 <net.h>
-#include "nm.h"
-
-DECLARE_GLOBAL_DATA_PTR;
-
-#define DEFAULT_ETH_ADDR "ethaddr"
-
-typedef struct {u8 id; char *name;} generation_info;
-
-generation_info generations[6] = {
- {HW_GENERATION_HCU3, "HCU3"},
- {HW_GENERATION_HCU4, "HCU4"},
- {HW_GENERATION_HCU5, "HCU5"},
- {HW_GENERATION_MCU, "MCU"},
- {HW_GENERATION_MCU20, "MCU20"},
- {HW_GENERATION_MCU25, "MCU25"},
-};
-
-void nm_show_print(int generation, int index, int hw_capabilities)
-{
- int j;
- char *generationName=0;
-
- /* reset ANSI terminal color mode */
- printf("\x1B""[0m""Netstal Maschinen AG: ");
- for (j=0; j < (sizeof(generations)/sizeof(generations[0])); j++) {
- if (generations[j].id == generation) {
- generationName = generations[j].name;
- break;
- }
- }
- printf("%s: index %d HW 0x%x\n", generationName, index, hw_capabilities);
- for (j = 0;j < 6; j++) {
- hcu_led_set(1 << j);
- udelay(200 * 1000);
- }
-}
-
-void set_params_for_sw_install(int install_requested, char *board_name )
-{
- if (install_requested) {
- char string[128];
-
- printf("\n\n%s SW-Installation: %d patching boot parameters\n",
- board_name, install_requested);
- setenv("bootdelay", "0");
- setenv("loadaddr", "0x01000000");
- setenv("serverip", "172.25.1.1");
- setenv("bootcmd", "run install");
- sprintf(string, "tftp ${loadaddr} admin/sw_on_hd; "
- "tftp ${loadaddr} installer/%s_sw_inst; "
- "run boot_sw_inst", board_name);
- setenv("install", string);
- sprintf(string, "setenv bootargs emac(0,0)c:%s/%s_sw_inst "
- "e=${ipaddr} h=${serverip} f=0x1000; "
- "bootvx ${loadaddr}%c",
- board_name, board_name, 0);
- setenv("boot_sw_inst", string);
- }
-}
-
-void common_misc_init_r(void)
-{
- IPaddr_t ipaddr;
- char *ipstring;
- uchar ethaddr[6];
-
- if (!eth_getenv_enetaddr(DEFAULT_ETH_ADDR, ethaddr)) {
- /* Must be in sync with CONFIG_ETHADDR */
- u32 serial = get_serial_number();
- ethaddr[0] = 0x00;
- ethaddr[1] = 0x60;
- ethaddr[2] = 0x13;
- ethaddr[3] = (serial >> 16) & 0xff;
- ethaddr[4] = (serial >> 8) & 0xff;
- ethaddr[5] = hcu_get_slot();
- eth_setenv_enetaddr(DEFAULT_ETH_ADDR, ethaddr);
- }
-
- /* IP-Adress update */
- ipstring = getenv("ipaddr");
- if (ipstring == 0)
- ipaddr = string_to_ip("172.25.1.99");
- else
- ipaddr = string_to_ip(ipstring);
- if ((ipaddr & 0xff) != (32 + hcu_get_slot())) {
- char tmp[22];
-
- ipaddr = (ipaddr & 0xffffff00) + 32 + hcu_get_slot();
- ip_to_string (ipaddr, tmp);
- printf("%s: enforce %s\n", __FUNCTION__, tmp);
- setenv("ipaddr", tmp);
- saveenv();
- }
-}