From 585cd86c78d291f291a8c153f69298d7b9345609 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Mon, 31 Mar 2014 12:59:58 +0900 Subject: board: esd: remove remainders of dead boards Commit 99bcad18 deleted ADCIOP and DASA_SIM board support but missed to delete board/esd/adciop and board/esd/dasa_sim. It also missed to add entries to doc/README.scrapyard. Signed-off-by: Masahiro Yamada Cc: Stefan Roese Acked-by: Stefan Roese Acked-by: Matthias Fuchs --- board/esd/adciop/Makefile | 8 - board/esd/adciop/adciop.c | 87 - board/esd/adciop/adciop.h | 28 - board/esd/adciop/flash.c | 97 - board/esd/dasa_sim/Makefile | 8 - board/esd/dasa_sim/cmd_dasa_sim.c | 209 -- board/esd/dasa_sim/dasa_sim.c | 198 -- board/esd/dasa_sim/dasa_sim.h | 28 - board/esd/dasa_sim/eeprom.c | 164 -- board/esd/dasa_sim/flash.c | 58 - board/esd/dasa_sim/fpgadata.c | 3903 ------------------------------------- board/esd/dasa_sim/u-boot.lds | 89 - 12 files changed, 4877 deletions(-) delete mode 100644 board/esd/adciop/Makefile delete mode 100644 board/esd/adciop/adciop.c delete mode 100644 board/esd/adciop/adciop.h delete mode 100644 board/esd/adciop/flash.c delete mode 100644 board/esd/dasa_sim/Makefile delete mode 100644 board/esd/dasa_sim/cmd_dasa_sim.c delete mode 100644 board/esd/dasa_sim/dasa_sim.c delete mode 100644 board/esd/dasa_sim/dasa_sim.h delete mode 100644 board/esd/dasa_sim/eeprom.c delete mode 100644 board/esd/dasa_sim/flash.c delete mode 100644 board/esd/dasa_sim/fpgadata.c delete mode 100644 board/esd/dasa_sim/u-boot.lds (limited to 'board') diff --git a/board/esd/adciop/Makefile b/board/esd/adciop/Makefile deleted file mode 100644 index d0e264de923..00000000000 --- a/board/esd/adciop/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -# -# (C) Copyright 2000-2006 -# Wolfgang Denk, DENX Software Engineering, wd@denx.de. -# -# SPDX-License-Identifier: GPL-2.0+ -# - -obj-y = adciop.o flash.o ../common/misc.o ../common/pci.o diff --git a/board/esd/adciop/adciop.c b/board/esd/adciop/adciop.c deleted file mode 100644 index b3d637e0a23..00000000000 --- a/board/esd/adciop/adciop.c +++ /dev/null @@ -1,87 +0,0 @@ -/* - * (C) Copyright 2000 - * Wolfgang Denk, DENX Software Engineering, wd@denx.de. - * - * SPDX-License-Identifier: GPL-2.0+ - */ - -#include -#include -#include "adciop.h" - -/* ------------------------------------------------------------------------- */ - -#define _NOT_USED_ 0xFFFFFFFF - -/* ------------------------------------------------------------------------- */ - - -int board_early_init_f (void) -{ - /* - * Set port pin in escc2 to keep living, and configure user led output - */ - *(unsigned char *) 0x2000033e = 0x77; /* ESCC2: PCR bit3=pwr on, bit7=led out */ - *(unsigned char *) 0x2000033c = 0x88; /* ESCC2: PVR pwr on, led off */ - - /* - * Init pci regs - */ - *(unsigned long *) 0x50000304 = 0x02900007; /* enable mem/io/master bits */ - *(unsigned long *) 0x500001b4 = 0x00000000; /* disable pci interrupt output enable */ - *(unsigned long *) 0x50000354 = 0x00c05800; /* disable emun interrupt output enable */ - *(unsigned long *) 0x50000344 = 0x00000000; /* disable pme interrupt output enable */ - *(unsigned long *) 0x50000310 = 0x00000000; /* pcibar0 */ - *(unsigned long *) 0x50000314 = 0x00000000; /* pcibar1 */ - *(unsigned long *) 0x50000318 = 0x00000000; /* pcibar2 */ - - return 0; -} - - -/* - * Check Board Identity: - */ - -int checkboard (void) -{ - char str[64]; - int i = getenv_f("serial#", str, sizeof (str)); - - puts ("Board: "); - - if (!i || strncmp (str, "ADCIOP", 6)) { - puts ("### No HW ID - assuming ADCIOP\n"); - return (1); - } - - puts (str); - - putc ('\n'); - - return 0; -} - -/* ------------------------------------------------------------------------- */ - -phys_size_t initdram (int board_type) -{ - return (16 * 1024 * 1024); -} - -/* ------------------------------------------------------------------------- */ - -int testdram (void) -{ - /* TODO: XXX XXX XXX */ - printf ("test: 16 MB - ok\n"); - - return (0); -} - -/* ------------------------------------------------------------------------- */ - -int board_eth_init(bd_t *bis) -{ - return pci_eth_init(bis); -} diff --git a/board/esd/adciop/adciop.h b/board/esd/adciop/adciop.h deleted file mode 100644 index 75e7950bcd9..00000000000 --- a/board/esd/adciop/adciop.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * (C) Copyright 2000 - * Wolfgang Denk, DENX Software Engineering, wd@denx.de. - * - * SPDX-License-Identifier: GPL-2.0+ - */ - -/**************************************************************************** - * FLASH Memory Map as used by TQ Monitor: - * - * Start Address Length - * +-----------------------+ 0x4000_0000 Start of Flash ----------------- - * | MON8xx code | 0x4000_0100 Reset Vector - * +-----------------------+ 0x400?_???? - * | (unused) | - * +-----------------------+ 0x4001_FF00 - * | Ethernet Addresses | 0x78 - * +-----------------------+ 0x4001_FF78 - * | (Reserved for MON8xx) | 0x44 - * +-----------------------+ 0x4001_FFBC - * | Lock Address | 0x04 - * +-----------------------+ 0x4001_FFC0 ^ - * | Hardware Information | 0x40 | MON8xx - * +=======================+ 0x4002_0000 (sector border) ----------------- - * | Autostart Header | | Applications - * | ... | v - * - *****************************************************************************/ diff --git a/board/esd/adciop/flash.c b/board/esd/adciop/flash.c deleted file mode 100644 index b1db12ecc8b..00000000000 --- a/board/esd/adciop/flash.c +++ /dev/null @@ -1,97 +0,0 @@ -/* - * (C) Copyright 2001 - * Stefan Roese, esd gmbh germany, stefan.roese@esd-electronics.com - * - * SPDX-License-Identifier: GPL-2.0+ - */ - -#include -#include -#include - -/* - * include common flash code (for esd boards) - */ -#include "../common/flash.c" - -/*----------------------------------------------------------------------- - * Functions - */ -static ulong flash_get_size (vu_long *addr, flash_info_t *info); -static void flash_get_offsets (ulong base, flash_info_t *info); - -/*----------------------------------------------------------------------- - */ - -unsigned long flash_init (void) -{ - unsigned long size_b0, size_b1; - int i; - - /* Init: no FLASHes known */ - for (i=0; i size_b0) { - printf ("## ERROR: " - "Bank 1 (0x%08lx = %ld MB) > Bank 0 (0x%08lx = %ld MB)\n", - size_b1, size_b1<<20, - size_b0, size_b0<<20 - ); - flash_info[0].flash_id = FLASH_UNKNOWN; - flash_info[1].flash_id = FLASH_UNKNOWN; - flash_info[0].sector_count = -1; - flash_info[1].sector_count = -1; - flash_info[0].size = 0; - flash_info[1].size = 0; - return (0); - } - - /* Re-do sizing to get full correct info */ - size_b0 = flash_get_size((vu_long *)FLASH_BASE0_PRELIM, &flash_info[0]); - - flash_get_offsets (FLASH_BASE0_PRELIM, &flash_info[0]); - - /* monitor protection ON by default */ - flash_protect(FLAG_PROTECT_SET, - FLASH_BASE0_PRELIM+size_b0-monitor_flash_len, - FLASH_BASE0_PRELIM+size_b0-1, - &flash_info[0]); - - if (size_b1) { - /* Re-do sizing to get full correct info */ - size_b1 = flash_get_size((vu_long *)(FLASH_BASE0_PRELIM + size_b0), - &flash_info[1]); - - flash_get_offsets (FLASH_BASE0_PRELIM + size_b0, &flash_info[1]); - - /* monitor protection ON by default */ - flash_protect(FLAG_PROTECT_SET, - FLASH_BASE0_PRELIM+size_b0+size_b1-monitor_flash_len, - FLASH_BASE0_PRELIM+size_b0+size_b1-1, - &flash_info[1]); - /* monitor protection OFF by default (one is enough) */ - flash_protect(FLAG_PROTECT_CLEAR, - FLASH_BASE0_PRELIM+size_b0-monitor_flash_len, - FLASH_BASE0_PRELIM+size_b0-1, - &flash_info[0]); - } else { - flash_info[1].flash_id = FLASH_UNKNOWN; - flash_info[1].sector_count = -1; - } - - flash_info[0].size = size_b0; - flash_info[1].size = size_b1; - - return (size_b0 + size_b1); -} diff --git a/board/esd/dasa_sim/Makefile b/board/esd/dasa_sim/Makefile deleted file mode 100644 index eb9f5f86d0d..00000000000 --- a/board/esd/dasa_sim/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -# -# (C) Copyright 2000-2006 -# Wolfgang Denk, DENX Software Engineering, wd@denx.de. -# -# SPDX-License-Identifier: GPL-2.0+ -# - -obj-y = dasa_sim.o flash.o cmd_dasa_sim.o eeprom.o ../common/pci.o diff --git a/board/esd/dasa_sim/cmd_dasa_sim.c b/board/esd/dasa_sim/cmd_dasa_sim.c deleted file mode 100644 index 91916247d6f..00000000000 --- a/board/esd/dasa_sim/cmd_dasa_sim.c +++ /dev/null @@ -1,209 +0,0 @@ -/* - * (C) Copyright 2001 - * Stefan Roese, esd gmbh germany, stefan.roese@esd-electronics.com - * - * SPDX-License-Identifier: GPL-2.0+ - */ - -#include -#include -#include -#include - -#define OK 0 -#define ERROR (-1) - -extern u_long pci9054_iobase; - - -/*************************************************************************** - * - * Routines for PLX PCI9054 eeprom access - * - */ - -static unsigned int PciEepromReadLongVPD (int offs) -{ - unsigned int value; - unsigned int ret; - int count; - - pci_write_config_dword (CONFIG_SYS_PCI9054_DEV_FN, 0x4c, - (offs << 16) | 0x0003); - count = 0; - - for (;;) { - udelay (10 * 1000); - pci_read_config_dword (CONFIG_SYS_PCI9054_DEV_FN, 0x4c, &ret); - if ((ret & 0x80000000) != 0) { - break; - } else { - count++; - if (count > 10) { - printf ("\nTimeout: ret=%08x - Please try again!\n", ret); - break; - } - } - } - - pci_read_config_dword (CONFIG_SYS_PCI9054_DEV_FN, 0x50, &value); - - return value; -} - - -static int PciEepromWriteLongVPD (int offs, unsigned int value) -{ - unsigned int ret; - int count; - - pci_write_config_dword (CONFIG_SYS_PCI9054_DEV_FN, 0x50, value); - pci_write_config_dword (CONFIG_SYS_PCI9054_DEV_FN, 0x4c, - (offs << 16) | 0x80000003); - count = 0; - - for (;;) { - udelay (10 * 1000); - pci_read_config_dword (CONFIG_SYS_PCI9054_DEV_FN, 0x4c, &ret); - if ((ret & 0x80000000) == 0) { - break; - } else { - count++; - if (count > 10) { - printf ("\nTimeout: ret=%08x - Please try again!\n", ret); - break; - } - } - } - - return true; -} - - -static void showPci9054 (void) -{ - int val; - int l, i; - - /* read 9054-values */ - for (l = 0; l < 6; l++) { - printf ("%02x: ", l * 0x10); - for (i = 0; i < 4; i++) { - pci_read_config_dword (CONFIG_SYS_PCI9054_DEV_FN, - l * 16 + i * 4, - (unsigned int *)&val); - printf ("%08x ", val); - } - printf ("\n"); - } - printf ("\n"); - - for (l = 0; l < 7; l++) { - printf ("%02x: ", l * 0x10); - for (i = 0; i < 4; i++) - printf ("%08x ", - PciEepromReadLongVPD ((i + l * 4) * 4)); - printf ("\n"); - } - printf ("\n"); -} - - -static void updatePci9054 (void) -{ - /* - * Set EEPROM write-protect register to 0 - */ - out_be32 ((void *)(pci9054_iobase + 0x0c), - in_be32 ((void *)(pci9054_iobase + 0x0c)) & 0xffff00ff); - - /* Long Serial EEPROM Load Registers... */ - PciEepromWriteLongVPD (0x00, 0x905410b5); - PciEepromWriteLongVPD (0x04, 0x09800001); /* other input controller */ - PciEepromWriteLongVPD (0x08, 0x28140100); - - PciEepromWriteLongVPD (0x0c, 0x00000000); /* MBOX0... */ - PciEepromWriteLongVPD (0x10, 0x00000000); - - /* las0: fpga access (0x0000.0000 ... 0x0003.ffff) */ - PciEepromWriteLongVPD (0x14, 0xfffc0000); /* LAS0RR... */ - PciEepromWriteLongVPD (0x18, 0x00000001); /* LAS0BA */ - - PciEepromWriteLongVPD (0x1c, 0x00200000); /* MARBR... */ - PciEepromWriteLongVPD (0x20, 0x00300500); /* LMISC/BIGEND */ - - PciEepromWriteLongVPD (0x24, 0x00000000); /* EROMRR... */ - PciEepromWriteLongVPD (0x28, 0x00000000); /* EROMBA */ - - PciEepromWriteLongVPD (0x2c, 0x43030000); /* LBRD0... */ - - PciEepromWriteLongVPD (0x30, 0x00000000); /* DMRR... */ - PciEepromWriteLongVPD (0x34, 0x00000000); - PciEepromWriteLongVPD (0x38, 0x00000000); - - PciEepromWriteLongVPD (0x3c, 0x00000000); /* DMPBAM... */ - PciEepromWriteLongVPD (0x40, 0x00000000); - - /* Extra Long Serial EEPROM Load Registers... */ - PciEepromWriteLongVPD (0x44, 0x010212fe); /* PCISID... */ - - /* las1: 505-sram access (0x0004.0000 ... 0x001f.ffff) */ - /* Offset to LAS1: Group 1: 0x00040000 */ - /* Group 2: 0x00080000 */ - /* Group 3: 0x000c0000 */ - PciEepromWriteLongVPD (0x48, 0xffe00000); /* LAS1RR */ - PciEepromWriteLongVPD (0x4c, 0x00040001); /* LAS1BA */ - PciEepromWriteLongVPD (0x50, 0x00000208); /* LBRD1 */ /* so wars bisher */ - - PciEepromWriteLongVPD (0x54, 0x00004c06); /* HotSwap... */ - - printf ("Finished writing defaults into PLX PCI9054 EEPROM!\n"); -} - - -static void clearPci9054 (void) -{ - /* - * Set EEPROM write-protect register to 0 - */ - out_be32 ((void *)(pci9054_iobase + 0x0c), - in_be32 ((void *)(pci9054_iobase + 0x0c)) & 0xffff00ff); - - /* Long Serial EEPROM Load Registers... */ - PciEepromWriteLongVPD (0x00, 0xffffffff); - PciEepromWriteLongVPD (0x04, 0xffffffff); /* other input controller */ - - printf ("Finished clearing PLX PCI9054 EEPROM!\n"); -} - - -/* ------------------------------------------------------------------------- */ -int do_pci9054 (cmd_tbl_t * cmdtp, int flag, int argc, - char * const argv[]) -{ - if (strcmp (argv[1], "info") == 0) { - showPci9054 (); - return 0; - } - - if (strcmp (argv[1], "update") == 0) { - updatePci9054 (); - return 0; - } - - if (strcmp (argv[1], "clear") == 0) { - clearPci9054 (); - return 0; - } - - return cmd_usage(cmdtp); -} - -U_BOOT_CMD( - pci9054, 3, 1, do_pci9054, - "PLX PCI9054 EEPROM access", - "pci9054 info - print EEPROM values\n" - "pci9054 update - updates EEPROM with default values" -); - -/* ------------------------------------------------------------------------- */ diff --git a/board/esd/dasa_sim/dasa_sim.c b/board/esd/dasa_sim/dasa_sim.c deleted file mode 100644 index b779a09e828..00000000000 --- a/board/esd/dasa_sim/dasa_sim.c +++ /dev/null @@ -1,198 +0,0 @@ -/* - * (C) Copyright 2001 - * Stefan Roese, esd gmbh germany, stefan.roese@esd-electronics.com - * - * SPDX-License-Identifier: GPL-2.0+ - */ - -#include -#include -#include "dasa_sim.h" - -/* ------------------------------------------------------------------------- */ - -#undef FPGA_DEBUG - -#define _NOT_USED_ 0xFFFFFFFF - -/* ------------------------------------------------------------------------- */ - -/* fpga configuration data - generated by bit2inc */ -static unsigned char fpgadata[] = { -#include "fpgadata.c" -}; - -#define FPGA_PRG_SLEEP 32 /* fpga program sleep-time */ -#define LOAD_LONG(a) a - - -/****************************************************************************** - * - * sysFpgaBoot - Load fpga-image into fpga - * - */ -static int fpgaBoot (void) -{ - int i, j, index, len; - unsigned char b; - int imageSize; - - imageSize = sizeof (fpgadata); - - /* display infos on fpgaimage */ - index = 15; - for (i = 0; i < 4; i++) { - len = fpgadata[index]; - index += len + 3; - } - - /* search for preamble 0xFF2X */ - for (index = 0; index < imageSize - 1; index++) { - if ((fpgadata[index] == 0xff) - && ((fpgadata[index + 1] & 0xf0) == 0x20)) - break; - } - - /* enable cs1 instead of user0... */ - *(unsigned long *) 0x50000084 &= ~0x00000002; - -#ifdef FPGA_DEBUG - printf ("%s\n", - ((in_be32 ((void *)0x50000084) & 0x00010000) == 0) ? - "NOT DONE" : "DONE"); -#endif - - /* init fpga by asserting and deasserting PROGRAM* (USER2)... */ - *(unsigned long *) 0x50000084 &= ~0x00000400; - udelay (FPGA_PRG_SLEEP * 1000); - - *(unsigned long *) 0x50000084 |= 0x00000400; - udelay (FPGA_PRG_SLEEP * 1000); - -#ifdef FPGA_DEBUG - printf ("%s\n", - ((in_be32 ((void *)0x50000084) & 0x00010000) == 0) ? - "NOT DONE" : "DONE"); -#endif - - /* cs1: disable burst, disable ready */ - *(unsigned long *) 0x50000114 &= ~0x00000300; - - /* cs1: set write timing */ - *(unsigned long *) 0x50000118 |= 0x00010900; - - /* write configuration-data into fpga... */ - for (i = index; i < imageSize; i++) { - b = fpgadata[i]; - for (j = 0; j < 8; j++) { - *(unsigned long *) 0x30000000 = - ((b & 0x80) == 0x80) - ? LOAD_LONG (0x03030101) - : LOAD_LONG (0x02020000); - b <<= 1; - } - } - -#ifdef FPGA_DEBUG - printf ("%s\n", - ((in_be32 ((void *)0x50000084) & 0x00010000) == 0) ? - "NOT DONE" : "DONE"); -#endif - - /* set cs1 to 32 bit data-width, disable burst, enable ready */ - *(unsigned long *) 0x50000114 |= 0x00000202; - *(unsigned long *) 0x50000114 &= ~0x00000100; - - /* cs1: set iop access to little endian */ - *(unsigned long *) 0x50000114 &= ~0x00000010; - - /* cs1: set read and write timing */ - *(unsigned long *) 0x50000118 = 0x00010000; - *(unsigned long *) 0x5000011c = 0x00010001; - -#ifdef FPGA_DEBUG - printf ("%s\n", - ((in_be32 ((void *)0x50000084) & 0x00010000) == 0) ? - "NOT DONE" : "DONE"); -#endif - - /* wait for 30 ms... */ - udelay (30 * 1000); - /* check if fpga's DONE signal - correctly booted ? */ - if ((*(unsigned long *) 0x50000084 & 0x00010000) == 0) - return -1; - - return 0; -} - - -int board_early_init_f (void) -{ - /* - * Init pci regs - */ - *(unsigned long *) 0x50000304 = 0x02900007; /* enable mem/io/master bits */ - *(unsigned long *) 0x500001b4 = 0x00000000; /* disable pci interrupt output enable */ - *(unsigned long *) 0x50000354 = 0x00c05800; /* disable emun interrupt output enable */ - *(unsigned long *) 0x50000344 = 0x00000000; /* disable pme interrupt output enable */ - *(unsigned long *) 0x50000310 = 0x00000000; /* pcibar0 */ - *(unsigned long *) 0x50000314 = 0x00000000; /* pcibar1 */ - *(unsigned long *) 0x50000318 = 0x00000000; /* pcibar2 */ - - return 0; -} - - -/* - * Check Board Identity: - */ - -int checkboard (void) -{ - int index; - int len; - char str[64]; - int i = getenv_f("serial#", str, sizeof (str)); - int fpga; - unsigned short val; - - puts ("Board: "); - - /* - * Boot onboard FPGA - */ - fpga = fpgaBoot (); - - if (!i || strncmp (str, "DASA_SIM", 8)) { - puts ("### No HW ID - assuming DASA_SIM"); - } - - puts (str); - - if (fpga == 0) { - val = *(unsigned short *) 0x30000202; - printf (" (Id=%d Version=%d Revision=%d)", - (val & 0x07f8) >> 3, val & 0x0001, (val & 0x0006) >> 1); - - puts ("\nFPGA: "); - - /* display infos on fpgaimage */ - index = 15; - for (i = 0; i < 4; i++) { - len = fpgadata[index]; - printf ("%s ", &(fpgadata[index + 1])); - index += len + 3; - } - } else { - puts ("\nFPGA: Booting failed!"); - } - - putc ('\n'); - - return 0; -} - -phys_size_t initdram (int board_type) -{ - return (16 * 1024 * 1024); -} diff --git a/board/esd/dasa_sim/dasa_sim.h b/board/esd/dasa_sim/dasa_sim.h deleted file mode 100644 index 75e7950bcd9..00000000000 --- a/board/esd/dasa_sim/dasa_sim.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * (C) Copyright 2000 - * Wolfgang Denk, DENX Software Engineering, wd@denx.de. - * - * SPDX-License-Identifier: GPL-2.0+ - */ - -/**************************************************************************** - * FLASH Memory Map as used by TQ Monitor: - * - * Start Address Length - * +-----------------------+ 0x4000_0000 Start of Flash ----------------- - * | MON8xx code | 0x4000_0100 Reset Vector - * +-----------------------+ 0x400?_???? - * | (unused) | - * +-----------------------+ 0x4001_FF00 - * | Ethernet Addresses | 0x78 - * +-----------------------+ 0x4001_FF78 - * | (Reserved for MON8xx) | 0x44 - * +-----------------------+ 0x4001_FFBC - * | Lock Address | 0x04 - * +-----------------------+ 0x4001_FFC0 ^ - * | Hardware Information | 0x40 | MON8xx - * +=======================+ 0x4002_0000 (sector border) ----------------- - * | Autostart Header | | Applications - * | ... | v - * - *****************************************************************************/ diff --git a/board/esd/dasa_sim/eeprom.c b/board/esd/dasa_sim/eeprom.c deleted file mode 100644 index 1fc78decd25..00000000000 --- a/board/esd/dasa_sim/eeprom.c +++ /dev/null @@ -1,164 +0,0 @@ -/* - * (C) Copyright 2001 - * Stefan Roese, esd gmbh germany, stefan.roese@esd-electronics.com - * - * SPDX-License-Identifier: GPL-2.0+ - */ - -#include -#include -#include - -#define EEPROM_CAP 0x50000358 -#define EEPROM_DATA 0x5000035c - - -unsigned int eepromReadLong(int offs) -{ - unsigned int value; - unsigned short ret; - int count; - - out_be16((void *)EEPROM_CAP, offs); - - count = 0; - - for (;;) - { - count++; - ret = in_be16((void *)EEPROM_CAP); - - if ((ret & 0x8000) != 0) - break; - } - - value = in_be32((void *)EEPROM_DATA); - - return value; -} - - -unsigned char eepromReadByte(int offs) -{ - unsigned int valueLong; - unsigned char *ptr; - - valueLong = eepromReadLong(offs & ~3); - ptr = (unsigned char *)&valueLong; - - return ptr[offs & 3]; -} - - -void eepromWriteLong(int offs, unsigned int value) -{ - unsigned short ret; - int count; - - count = 0; - - out_be32((void *)EEPROM_DATA, value); - out_be16((void *)EEPROM_CAP, 0x8000 + offs); - - for (;;) - { - count++; - ret = in_be16((void *)EEPROM_CAP); - - if ((ret & 0x8000) == 0) - break; - } -} - - -void eepromWriteByte(int offs, unsigned char valueByte) -{ - unsigned int valueLong; - unsigned char *ptr; - - valueLong = eepromReadLong(offs & ~3); - ptr = (unsigned char *)&valueLong; - - ptr[offs & 3] = valueByte; - - eepromWriteLong(offs & ~3, valueLong); -} - - -void i2c_read (uchar *addr, int alen, uchar *buffer, int len) -{ - int i; - int len2, ptr; - - /* printf("\naddr=%x alen=%x buffer=%x len=%x", addr[0], addr[1], *(short *)addr, alen, buffer, len); /###* test-only */ - - ptr = *(short *)addr; - - /* - * Read till lword boundary - */ - len2 = 4 - (*(short *)addr & 0x0003); - for (i=0; i> 2; - for (i=0; i> 2; - for (i=0; i -#include -#include - -/* - * include common flash code (for esd boards) - */ -#include "../common/flash.c" - -/*----------------------------------------------------------------------- - * Functions - */ -static ulong flash_get_size (vu_long *addr, flash_info_t *info); -static void flash_get_offsets (ulong base, flash_info_t *info); - - -/*----------------------------------------------------------------------- - */ - -unsigned long flash_init (void) -{ - unsigned long size_b0; - int i; - - /* Init: no FLASHes known */ - for (i=0; i> 2) - 1; - __fixup_entries = (. - _FIXUP_TABLE_)>>2; - - .data : - { - *(.data*) - *(.sdata*) - } - _edata = .; - PROVIDE (edata = .); - - . = .; - - . = ALIGN(4); - .u_boot_list : { - KEEP(*(SORT(.u_boot_list*))); - } - - - . = .; - __start___ex_table = .; - __ex_table : { *(__ex_table) } - __stop___ex_table = .; - - . = ALIGN(4096); - __init_begin = .; - .text.init : { *(.text.init) } - .data.init : { *(.data.init) } - . = ALIGN(4096); - __init_end = .; - - __bss_start = .; - .bss (NOLOAD) : - { - *(.bss*) - *(.sbss*) - *(COMMON) - . = ALIGN(4); - } - __bss_end = . ; - PROVIDE (end = .); -} -- cgit v1.2.3 From da241033ec8d27e92951c3e8a324a0eef693ff64 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Mon, 31 Mar 2014 13:05:28 +0900 Subject: board: samsung: delete unused source files Signed-off-by: Masahiro Yamada Cc: Mateusz Zalega Cc: Minkyu Kang Acked-by: Mateusz Zalega --- board/samsung/goni/mem_setup.S | 249 ------------------------------------- board/samsung/smdkc100/mem_setup.S | 181 --------------------------- 2 files changed, 430 deletions(-) delete mode 100644 board/samsung/goni/mem_setup.S delete mode 100644 board/samsung/smdkc100/mem_setup.S (limited to 'board') diff --git a/board/samsung/goni/mem_setup.S b/board/samsung/goni/mem_setup.S deleted file mode 100644 index 5dc980cf5b0..00000000000 --- a/board/samsung/goni/mem_setup.S +++ /dev/null @@ -1,249 +0,0 @@ -/* - * Copyright (C) 2009 Samsung Electrnoics - * Minkyu Kang - * Kyungmin Park - * - * SPDX-License-Identifier: GPL-2.0+ - */ - -#include - - .globl mem_ctrl_asm_init -mem_ctrl_asm_init: - cmp r7, r8 - - ldreq r0, =S5PC100_DMC_BASE @ 0xE6000000 - ldrne r0, =S5PC110_DMC0_BASE @ 0xF0000000 - ldrne r6, =S5PC110_DMC1_BASE @ 0xF1400000 - - /* DLL parameter setting */ - ldr r1, =0x50101000 - str r1, [r0, #0x018] @ PHYCONTROL0_OFFSET - strne r1, [r6, #0x018] @ PHYCONTROL0_OFFSET - ldr r1, =0x000000f4 - str r1, [r0, #0x01C] @ PHYCONTROL1_OFFSET - strne r1, [r6, #0x01C] @ PHYCONTROL1_OFFSET - ldreq r1, =0x0 - streq r1, [r0, #0x020] @ PHYCONTROL2_OFFSET - - /* DLL on */ - ldr r1, =0x50101002 - str r1, [r0, #0x018] @ PHYCONTROL0_OFFSET - strne r1, [r6, #0x018] @ PHYCONTROL0_OFFSET - - /* DLL start */ - ldr r1, =0x50101003 - str r1, [r0, #0x018] @ PHYCONTROL0_OFFSET - strne r1, [r6, #0x018] @ PHYCONTROL0_OFFSET - - mov r2, #0x4000 -wait: subs r2, r2, #0x1 - cmp r2, #0x0 - bne wait - - cmp r7, r8 - /* Force value locking for DLL off */ - str r1, [r0, #0x018] @ PHYCONTROL0_OFFSET - strne r1, [r6, #0x018] @ PHYCONTROL0_OFFSET - - /* DLL off */ - ldr r1, =0x50101009 - str r1, [r0, #0x018] @ PHYCONTROL0_OFFSET - strne r1, [r6, #0x018] @ PHYCONTROL0_OFFSET - - /* auto refresh off */ - ldr r1, =0xff001010 | (1 << 7) - ldr r2, =0xff001010 | (1 << 7) - str r1, [r0, #0x000] @ CONCONTROL_OFFSET - strne r2, [r6, #0x000] @ CONCONTROL_OFFSET - - /* - * Burst Length 4, 2 chips, 32-bit, LPDDR - * OFF: dynamic self refresh, force precharge, dynamic power down off - */ - ldr r1, =0x00212100 - ldr r2, =0x00212100 - str r1, [r0, #0x004] @ MEMCONTROL_OFFSET - strne r2, [r6, #0x004] @ MEMCONTROL_OFFSET - - /* - * Note: - * If Bank0 has Mobile RAM we place it at 0x3800'0000 (s5pc100 only) - * So finally Bank1 OneDRAM should address start at at 0x3000'0000 - */ - - /* - * DMC0: CS0 : S5PC100/S5PC110 - * 0x30 -> 0x30000000 - * 0xf8 -> 0x37FFFFFF - * [15:12] 0: Linear - * [11:8 ] 2: 9 bits - * [ 7:4 ] 2: 14 bits - * [ 3:0 ] 2: 4 banks - */ - ldr r3, =0x30f80222 - ldr r4, =0x40f00222 -swap_memory: - str r3, [r0, #0x008] @ MEMCONFIG0_OFFSET - str r4, [r0, #0x00C] @ dummy write - - /* - * DMC1: CS0 : S5PC110 - * 0x40 -> 0x40000000 - * 0xf8 -> 0x47FFFFFF (1Gib) - * 0x40 -> 0x40000000 - * 0xf0 -> 0x4FFFFFFF (2Gib) - * [15:12] 0: Linear - * [11:8 ] 2: 9 bits - Col (1Gib) - * [11:8 ] 3: 10 bits - Col (2Gib) - * [ 7:4 ] 2: 14 bits - Row - * [ 3:0 ] 2: 4 banks - */ - /* Default : 2GiB */ - ldr r4, =0x40f01322 @ 2Gib: MCP B - ldr r5, =0x50f81312 @ dummy: MCP D - cmp r9, #1 - ldreq r4, =0x40f81222 @ 1Gib: MCP A - cmp r9, #3 - ldreq r5, =0x50f81312 @ 2Gib + 1Gib: MCP D - cmp r9, #4 - ldreq r5, =0x50f01312 @ 2Gib + 2Gib: MCP E - - cmp r7, r8 - strne r4, [r6, #0x008] @ MEMCONFIG0_OFFSET - strne r5, [r6, #0x00C] @ MEMCONFIG1_OFFSET - - /* - * DMC0: CS1: S5PC100 - * 0x38 -> 0x38000000 - * 0xf8 -> 0x3fFFFFFF - * [15:12] 0: Linear - * [11:8 ] 2: 9 bits - * [ 7:4 ] 2: 14 bits - * [ 3:0 ] 2: 4 banks - */ - eoreq r3, r3, #0x08000000 - streq r3, [r0, #0xc] @ MEMCONFIG1_OFFSET - - ldr r1, =0x20000000 - str r1, [r0, #0x014] @ PRECHCONFIG_OFFSET - strne r1, [r0, #0x014] @ PRECHCONFIG_OFFSET - strne r1, [r6, #0x014] @ PRECHCONFIG_OFFSET - - /* - * S5PC100: - * DMC: CS0: 166MHz - * CS1: 166MHz - * S5PC110: - * DMC0: CS0: 166MHz - * DMC1: CS0: 200MHz - * - * 7.8us * 200MHz %LE %LONG1560(0x618) - * 7.8us * 166MHz %LE %LONG1294(0x50E) - * 7.8us * 133MHz %LE %LONG1038(0x40E), - * 7.8us * 100MHz %LE %LONG780(0x30C), - */ - ldr r1, =0x0000050E - str r1, [r0, #0x030] @ TIMINGAREF_OFFSET - ldrne r1, =0x00000618 - strne r1, [r6, #0x030] @ TIMINGAREF_OFFSET - - ldr r1, =0x14233287 - str r1, [r0, #0x034] @ TIMINGROW_OFFSET - ldrne r1, =0x182332c8 - strne r1, [r6, #0x034] @ TIMINGROW_OFFSET - - ldr r1, =0x12130005 - str r1, [r0, #0x038] @ TIMINGDATA_OFFSET - ldrne r1, =0x13130005 - strne r1, [r6, #0x038] @ TIMINGDATA_OFFSET - - ldr r1, =0x0E140222 - str r1, [r0, #0x03C] @ TIMINGPOWER_OFFSET - ldrne r1, =0x0E180222 - strne r1, [r6, #0x03C] @ TIMINGPOWER_OFFSET - - /* chip0 Deselect */ - ldr r1, =0x07000000 - str r1, [r0, #0x010] @ DIRECTCMD_OFFSET - strne r1, [r6, #0x010] @ DIRECTCMD_OFFSET - - /* chip0 PALL */ - ldr r1, =0x01000000 - str r1, [r0, #0x010] @ DIRECTCMD_OFFSET - strne r1, [r6, #0x010] @ DIRECTCMD_OFFSET - - /* chip0 REFA */ - ldr r1, =0x05000000 - str r1, [r0, #0x010] @ DIRECTCMD_OFFSET - strne r1, [r6, #0x010] @ DIRECTCMD_OFFSET - /* chip0 REFA */ - str r1, [r0, #0x010] @ DIRECTCMD_OFFSET - strne r1, [r6, #0x010] @ DIRECTCMD_OFFSET - - /* chip0 MRS */ - ldr r1, =0x00000032 - str r1, [r0, #0x010] @ DIRECTCMD_OFFSET - strne r1, [r6, #0x010] @ DIRECTCMD_OFFSET - - /* chip0 EMRS */ - ldr r1, =0x00020020 - str r1, [r0, #0x010] @ DIRECTCMD_OFFSET - strne r1, [r6, #0x010] @ DIRECTCMD_OFFSET - - /* chip1 Deselect */ - ldr r1, =0x07100000 - str r1, [r0, #0x010] @ DIRECTCMD_OFFSET - strne r1, [r6, #0x010] @ DIRECTCMD_OFFSET - - /* chip1 PALL */ - ldr r1, =0x01100000 - str r1, [r0, #0x010] @ DIRECTCMD_OFFSET - strne r1, [r6, #0x010] @ DIRECTCMD_OFFSET - - /* chip1 REFA */ - ldr r1, =0x05100000 - str r1, [r0, #0x010] @ DIRECTCMD_OFFSET - strne r1, [r6, #0x010] @ DIRECTCMD_OFFSET - /* chip1 REFA */ - str r1, [r0, #0x010] @ DIRECTCMD_OFFSET - strne r1, [r6, #0x010] @ DIRECTCMD_OFFSET - - /* chip1 MRS */ - ldr r1, =0x00100032 - str r1, [r0, #0x010] @ DIRECTCMD_OFFSET - strne r1, [r6, #0x010] @ DIRECTCMD_OFFSET - - /* chip1 EMRS */ - ldr r1, =0x00120020 - str r1, [r0, #0x010] @ DIRECTCMD_OFFSET - strne r1, [r6, #0x010] @ DIRECTCMD_OFFSET - - /* auto refresh on */ - ldr r1, =0xFF002030 | (1 << 7) - str r1, [r0, #0x000] @ CONCONTROL_OFFSET - strne r1, [r6, #0x000] @ CONCONTROL_OFFSET - - /* PwrdnConfig */ - ldr r1, =0x00100002 - str r1, [r0, #0x028] @ PWRDNCONFIG_OFFSET - strne r1, [r6, #0x028] @ PWRDNCONFIG_OFFSET - - ldr r1, =0x00212113 - str r1, [r0, #0x004] @ MEMCONTROL_OFFSET - strne r1, [r6, #0x004] @ MEMCONTROL_OFFSET - - /* Skip when S5PC110 */ - bne 1f - - /* Check OneDRAM access area at s5pc100 */ - ldreq r3, =0x38f80222 - ldreq r1, =0x37ffff00 - str r3, [r1] - ldr r2, [r1] - cmp r2, r3 - beq swap_memory -1: - mov pc, lr - - .ltorg diff --git a/board/samsung/smdkc100/mem_setup.S b/board/samsung/smdkc100/mem_setup.S deleted file mode 100644 index 2f2df0b7eb4..00000000000 --- a/board/samsung/smdkc100/mem_setup.S +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Originates from Samsung's u-boot 1.1.6 port to S5PC1xx - * - * Copyright (C) 2009 Samsung Electrnoics - * Inki Dae - * Heungjun Kim - * Minkyu Kang - * Kyungmin Park - * - * SPDX-License-Identifier: GPL-2.0+ - */ - -#include - - .globl mem_ctrl_asm_init -mem_ctrl_asm_init: - ldr r6, =S5PC100_DMC_BASE @ 0xE6000000 - - /* DLL parameter setting */ - ldr r1, =0x50101000 - str r1, [r6, #0x018] @ PHYCONTROL0 - ldr r1, =0xf4 - str r1, [r6, #0x01C] @ PHYCONTROL1 - ldr r1, =0x0 - str r1, [r6, #0x020] @ PHYCONTROL2 - - /* DLL on */ - ldr r1, =0x50101002 - str r1, [r6, #0x018] @ PHYCONTROL0 - - /* DLL start */ - ldr r1, =0x50101003 - str r1, [r6, #0x018] @ PHYCONTROL0 - - /* Force value locking for DLL off */ - str r1, [r6, #0x018] @ PHYCONTROL0 - - /* DLL off */ - ldr r1, =0x50101001 - str r1, [r6, #0x018] @ PHYCONTROL0 - - /* auto refresh off */ - ldr r1, =0xff001010 - str r1, [r6, #0x000] @ CONCONTROL - - /* - * Burst Length 4, 2 chips, 32-bit, LPDDR - * OFF: dynamic self refresh, force precharge, dynamic power down off - */ - ldr r1, =0x00212100 - str r1, [r6, #0x004] @ MEMCONTROL - - /* - * Note: - * If Bank0 has OneDRAM we place it at 0x2800'0000 - * So finally Bank1 should address start at at 0x2000'0000 - */ - mov r4, #0x0 - -swap_memory: - /* - * Bank0 - * 0x30 -> 0x30000000 - * 0xf8 -> 0x37FFFFFF - * [15:12] 0: Linear - * [11:8 ] 2: 9 bits - * [ 7:4 ] 2: 14 bits - * [ 3:0 ] 2: 4 banks - */ - ldr r1, =0x30f80222 - /* if r4 is 1, swap the bank */ - cmp r4, #0x1 - orreq r1, r1, #0x08000000 - str r1, [r6, #0x008] @ MEMCONFIG0 - - /* - * Bank1 - * 0x38 -> 0x38000000 - * 0xf8 -> 0x3fFFFFFF - * [15:12] 0: Linear - * [11:8 ] 2: 9 bits - * [ 7:4 ] 2: 14 bits - * [ 3:0 ] 2: 4 banks - */ - ldr r1, =0x38f80222 - /* if r4 is 1, swap the bank */ - cmp r4, #0x1 - biceq r1, r1, #0x08000000 - str r1, [r6, #0x00c] @ MEMCONFIG1 - - ldr r1, =0x20000000 - str r1, [r6, #0x014] @ PRECHCONFIG - - /* - * FIXME: Please verify these values - * 7.8us * 166MHz %LE %LONG1294(0x50E) - * 7.8us * 133MHz %LE %LONG1038(0x40E), - * 7.8us * 100MHz %LE %LONG780(0x30C), - * 7.8us * 20MHz %LE %LONG156(0x9C), - * 7.8us * 10MHz %LE %LONG78(0x4E) - */ - ldr r1, =0x0000050e - str r1, [r6, #0x030] @ TIMINGAREF - - /* 166 MHz */ - ldr r1, =0x0c233287 - str r1, [r6, #0x034] @ TIMINGROW - - /* twtr=3 twr=2 trtp=3 cl=3 wl=3 rl=3 */ - ldr r1, =0x32330303 - str r1, [r6, #0x038] @ TIMINGDATA - - /* tfaw=4 sxsr=0x14 txp=0x14 tcke=3 tmrd=3 */ - ldr r1, =0x04141433 - str r1, [r6, #0x03C] @ TIMINGPOWER - - /* chip0 Deselect */ - ldr r1, =0x07000000 - str r1, [r6, #0x010] @ DIRECTCMD - - /* chip0 PALL */ - ldr r1, =0x01000000 - str r1, [r6, #0x010] @ DIRECTCMD - - /* chip0 REFA */ - ldr r1, =0x05000000 - str r1, [r6, #0x010] @ DIRECTCMD - /* chip0 REFA */ - str r1, [r6, #0x010] @ DIRECTCMD - - /* chip0 MRS, CL%LE %LONG3, BL%LE %LONG4 */ - ldr r1, =0x00000032 - str r1, [r6, #0x010] @ DIRECTCMD - - /* chip1 Deselect */ - ldr r1, =0x07100000 - str r1, [r6, #0x010] @ DIRECTCMD - - /* chip1 PALL */ - ldr r1, =0x01100000 - str r1, [r6, #0x010] @ DIRECTCMD - - /* chip1 REFA */ - ldr r1, =0x05100000 - str r1, [r6, #0x010] @ DIRECTCMD - /* chip1 REFA */ - str r1, [r6, #0x010] @ DIRECTCMD - - /* chip1 MRS, CL%LE %LONG3, BL%LE %LONG4 */ - ldr r1, =0x00100032 - str r1, [r6, #0x010] @ DIRECTCMD - - /* auto refresh on */ - ldr r1, =0xff002030 - str r1, [r6, #0x000] @ CONCONTROL - - /* PwrdnConfig */ - ldr r1, =0x00100002 - str r1, [r6, #0x028] @ PWRDNCONFIG - - /* BL%LE %LONG */ - ldr r1, =0xff212100 - str r1, [r6, #0x004] @ MEMCONTROL - - - /* Try to test memory area */ - cmp r4, #0x1 - beq 1f - - mov r4, #0x1 - ldr r1, =0x37ffff00 - str r4, [r1] - str r4, [r1, #0x4] @ dummy write - ldr r0, [r1] - cmp r0, r4 - bne swap_memory - -1: - mov pc, lr - - .ltorg -- cgit v1.2.3 From 33a1ea2c8fd38b4b7d35b0cf33249bdfe7640763 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Mon, 31 Mar 2014 13:05:58 +0900 Subject: board: evb64260: delete an unused source file Signed-off-by: Masahiro Yamada Cc: Wolfgang Denk Cc: Nye Liu --- board/evb64260/ecctest.c | 111 ----------------------------------------------- 1 file changed, 111 deletions(-) delete mode 100644 board/evb64260/ecctest.c (limited to 'board') diff --git a/board/evb64260/ecctest.c b/board/evb64260/ecctest.c deleted file mode 100644 index 5d3679aa939..00000000000 --- a/board/evb64260/ecctest.c +++ /dev/null @@ -1,111 +0,0 @@ -indent: Standard input:27: Warning:old style assignment ambiguity in "=*". Assuming "= *" - -#ifdef ECC_TEST -static inline void ecc_off (void) -{ - *(volatile int *) (INTERNAL_REG_BASE_ADDR + 0x4b4) &= ~0x00200000; -} - -static inline void ecc_on (void) -{ - *(volatile int *) (INTERNAL_REG_BASE_ADDR + 0x4b4) |= 0x00200000; -} - -static int putshex (const char *buf, int len) -{ - int i; - - for (i = 0; i < len; i++) { - printf ("%02x", buf[i]); - } - return 0; -} - -static int char_memcpy (void *d, const void *s, int len) -{ - int i; - char *cd = d; - const char *cs = s; - - for (i = 0; i < len; i++) { - *(cd++) = *(cs++); - } - return 0; -} - -static int memory_test (char *buf) -{ - const char src[][16] = { - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, - 0x01, 0x01, 0x01, 0x01, 0x01, 0x01}, - {0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, - 0x02, 0x02, 0x02, 0x02, 0x02, 0x02}, - {0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, - 0x04, 0x04, 0x04, 0x04, 0x04, 0x04}, - {0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, - 0x08, 0x08, 0x08, 0x08, 0x08, 0x08}, - {0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, - 0x10, 0x10, 0x10, 0x10, 0x10, 0x10}, - {0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20}, - {0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, - 0x40, 0x40, 0x40, 0x40, 0x40, 0x40}, - {0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80}, - {0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, - 0x55, 0x55, 0x55, 0x55, 0x55, 0x55}, - {0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, - 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa}, - {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff} - }; - const int foo[] = { 0 }; - int i, j, a; - - printf ("\ntest @ %d %p\n", foo[0], buf); - for (i = 0; i < 12; i++) { - for (a = 0; a < 8; a++) { - const char *s = src[i] + a; - int align = (unsigned) (s) & 0x7; - - /* ecc_off(); */ - memcpy (buf, s, 8); - /* ecc_on(); */ - putshex (s, 8); - if (memcmp (buf, s, 8)) { - putc ('\n'); - putshex (buf, 8); - printf (" [FAIL] (%p) align=%d\n", s, align); - for (j = 0; j < 8; j++) { - s[j] == buf[j] ? puts (" ") : - printf ("%02x", - (s[j]) ^ (buf[j])); - } - putc ('\n'); - } else { - printf (" [PASS] (%p) align=%d\n", s, align); - } - /* ecc_off(); */ - char_memcpy (buf, s, 8); - /* ecc_on(); */ - putshex (s, 8); - if (memcmp (buf, s, 8)) { - putc ('\n'); - putshex (buf, 8); - printf (" [FAIL] (%p) align=%d\n", s, align); - for (j = 0; j < 8; j++) { - s[j] == buf[j] ? puts (" ") : - printf ("%02x", - (s[j]) ^ (buf[j])); - } - putc ('\n'); - } else { - printf (" [PASS] (%p) align=%d\n", s, align); - } - } - } - - return 0; -} -#endif -- cgit v1.2.3 From 652fe4044c94e6c26b3a2bdc3b7a1a59abb42078 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Mon, 31 Mar 2014 13:06:38 +0900 Subject: board: altera: delete unused source files Signed-off-by: Masahiro Yamada Cc: Chin Liang See Cc: Dinh Nguyen Cc: Scott McNutt --- board/altera/common/AMDLV065D.c | 174 -------------------------------------- board/altera/common/flash.c | 180 ---------------------------------------- 2 files changed, 354 deletions(-) delete mode 100644 board/altera/common/AMDLV065D.c delete mode 100644 board/altera/common/flash.c (limited to 'board') diff --git a/board/altera/common/AMDLV065D.c b/board/altera/common/AMDLV065D.c deleted file mode 100644 index eaa6b98025e..00000000000 --- a/board/altera/common/AMDLV065D.c +++ /dev/null @@ -1,174 +0,0 @@ -/* - * (C) Copyright 2000-2004 - * Wolfgang Denk, DENX Software Engineering, wd@denx.de. - * - * SPDX-License-Identifier: GPL-2.0+ - */ - - -#include -#if defined(CONFIG_NIOS) -#include -#else -#include -#endif - -#define SECTSZ (64 * 1024) -flash_info_t flash_info[CONFIG_SYS_MAX_FLASH_BANKS]; - -/*----------------------------------------------------------------------*/ -unsigned long flash_init (void) -{ - int i; - unsigned long addr; - flash_info_t *fli = &flash_info[0]; - - fli->size = CONFIG_SYS_FLASH_SIZE; - fli->sector_count = CONFIG_SYS_MAX_FLASH_SECT; - fli->flash_id = FLASH_MAN_AMD + FLASH_AMDLV065D; - - addr = CONFIG_SYS_FLASH_BASE; - for (i = 0; i < fli->sector_count; ++i) { - fli->start[i] = addr; - addr += SECTSZ; - fli->protect[i] = 1; - } - - return (CONFIG_SYS_FLASH_SIZE); -} -/*--------------------------------------------------------------------*/ -void flash_print_info (flash_info_t * info) -{ - int i, k; - int erased; - unsigned long *addr; - - printf (" Size: %ld KB in %d Sectors\n", - info->size >> 10, info->sector_count); - printf (" Sector Start Addresses:"); - for (i = 0; i < info->sector_count; ++i) { - - /* Check if whole sector is erased */ - erased = 1; - addr = (unsigned long *) info->start[i]; - for (k = 0; k < SECTSZ/sizeof(unsigned long); k++) { - if ( readl(addr++) != (unsigned long)-1) { - erased = 0; - break; - } - } - - /* Print the info */ - if ((i % 5) == 0) - printf ("\n "); - printf (" %08lX%s%s", - info->start[i], - erased ? " E" : " ", - info->protect[i] ? "RO " : " "); - } - printf ("\n"); -} - -/*-------------------------------------------------------------------*/ - - -int flash_erase (flash_info_t * info, int s_first, int s_last) -{ - unsigned char *addr = (unsigned char *) info->start[0]; - unsigned char *addr2; - int prot, sect; - ulong start; - - /* Some sanity checking */ - if ((s_first < 0) || (s_first > s_last)) { - printf ("- no sectors to erase\n"); - return 1; - } - - prot = 0; - for (sect = s_first; sect <= s_last; ++sect) { - if (info->protect[sect]) { - prot++; - } - } - if (prot) { - printf ("- Warning: %d protected sectors will not be erased!\n", - prot); - } else { - printf ("\n"); - } - - /* It's ok to erase multiple sectors provided we don't delay more - * than 50 usec between cmds ... at which point the erase time-out - * occurs. So don't go and put printf() calls in the loop ... it - * won't be very helpful ;-) - */ - for (sect = s_first; sect <= s_last; sect++) { - if (info->protect[sect] == 0) { /* not protected */ - addr2 = (unsigned char *) info->start[sect]; - writeb (0xaa, addr); - writeb (0x55, addr); - writeb (0x80, addr); - writeb (0xaa, addr); - writeb (0x55, addr); - writeb (0x30, addr2); - /* Now just wait for 0xff & provide some user - * feedback while we wait. - */ - start = get_timer (0); - while ( readb (addr2) != 0xff) { - udelay (1000 * 1000); - putc ('.'); - if (get_timer (start) > CONFIG_SYS_FLASH_ERASE_TOUT) { - printf ("timeout\n"); - return 1; - } - } - } - } - printf ("\n"); - return 0; -} - -/*----------------------------------------------------------------------- - * Copy memory to flash, returns: - * 0 - OK - * 1 - write timeout - * 2 - Flash not erased - */ - -int write_buff (flash_info_t * info, uchar * src, ulong addr, ulong cnt) -{ - - vu_char *cmd = (vu_char *) info->start[0]; - vu_char *dst = (vu_char *) addr; - unsigned char b; - ulong start; - - while (cnt) { - /* Check for sufficient erase */ - b = *src; - if ((readb (dst) & b) != b) { - printf ("%02x : %02x\n", readb (dst), b); - return (2); - } - - writeb (0xaa, cmd); - writeb (0x55, cmd); - writeb (0xa0, cmd); - writeb (b, dst); - - /* Verify write */ - start = get_timer (0); - while (readb (dst) != b) { - if (get_timer (start) > CONFIG_SYS_FLASH_WRITE_TOUT) { - return 1; - } - } - dst++; - src++; - cnt--; - } - - return (0); -} diff --git a/board/altera/common/flash.c b/board/altera/common/flash.c deleted file mode 100644 index 8f56a30b488..00000000000 --- a/board/altera/common/flash.c +++ /dev/null @@ -1,180 +0,0 @@ -/* - * (C) Copyright 2000-2004 - * Wolfgang Denk, DENX Software Engineering, wd@denx.de. - * - * SPDX-License-Identifier: GPL-2.0+ - */ - - -#include -#include - -flash_info_t flash_info[CONFIG_SYS_MAX_FLASH_BANKS]; - -/*--------------------------------------------------------------------*/ -void flash_print_info (flash_info_t * info) -{ - int i, k; - unsigned long size; - int erased; - volatile unsigned char *flash; - - printf (" Size: %ld KB in %d Sectors\n", - info->size >> 10, info->sector_count); - printf (" Sector Start Addresses:"); - for (i = 0; i < info->sector_count; ++i) { - - /* Check if whole sector is erased */ - if (i != (info->sector_count - 1)) - size = info->start[i + 1] - info->start[i]; - else - size = info->start[0] + info->size - info->start[i]; - erased = 1; - flash = (volatile unsigned char *) info->start[i]; - for (k = 0; k < size; k++) { - if (*flash++ != 0xff) { - erased = 0; - break; - } - } - - /* Print the info */ - if ((i % 5) == 0) - printf ("\n "); - printf (" %08lX%s%s", info->start[i], erased ? " E" : " ", - info->protect[i] ? "RO " : " "); - } - printf ("\n"); -} - -/*-------------------------------------------------------------------*/ - - -int flash_erase (flash_info_t * info, int s_first, int s_last) -{ - volatile CONFIG_SYS_FLASH_WORD_SIZE *addr = (CONFIG_SYS_FLASH_WORD_SIZE *) (info->start[0]); - volatile CONFIG_SYS_FLASH_WORD_SIZE *addr2; - int prot, sect; - unsigned oldpri; - ulong start; - - /* Some sanity checking */ - if ((s_first < 0) || (s_first > s_last)) { - printf ("- no sectors to erase\n"); - return 1; - } - - prot = 0; - for (sect = s_first; sect <= s_last; ++sect) { - if (info->protect[sect]) { - prot++; - } - } - if (prot) { - printf ("- Warning: %d protected sectors will not be erased!\n", - prot); - } else { - printf ("\n"); - } - -#ifdef DEBUG - for (sect = s_first; sect <= s_last; sect++) { - printf("- Erase: Sect: %i @ 0x%08x\n", sect, info->start[sect]); - } -#endif - - /* NOTE: disabling interrupts on Nios can be very bad since it - * also disables the LO_LIMIT exception. It's better here to - * set the interrupt priority to 3 & restore it when we're done. - */ - oldpri = ipri (3); - - /* It's ok to erase multiple sectors provided we don't delay more - * than 50 usec between cmds ... at which point the erase time-out - * occurs. So don't go and put printf() calls in the loop ... it - * won't be very helpful ;-) - */ - for (sect = s_first; sect <= s_last; sect++) { - if (info->protect[sect] == 0) { /* not protected */ - addr2 = (CONFIG_SYS_FLASH_WORD_SIZE *) (info->start[sect]); - *addr = 0xaa; - *addr = 0x55; - *addr = 0x80; - *addr = 0xaa; - *addr = 0x55; - *addr2 = 0x30; - /* Now just wait for 0xff & provide some user - * feedback while we wait. Here we have to grant - * timer interrupts. Otherwise get_timer() can't - * work right. */ - ipri(oldpri); - start = get_timer (0); - while (*addr2 != 0xff) { - udelay (1000 * 1000); - putc ('.'); - if (get_timer (start) > CONFIG_SYS_FLASH_ERASE_TOUT) { - printf ("timeout\n"); - return 1; - } - } - oldpri = ipri (3); /* disallow non important irqs again */ - } - } - - printf ("\n"); - - /* Restore interrupt priority */ - ipri (oldpri); - - return 0; -} - -/*----------------------------------------------------------------------- - * Copy memory to flash, returns: - * 0 - OK - * 1 - write timeout - * 2 - Flash not erased - */ - -int write_buff (flash_info_t * info, uchar * src, ulong addr, ulong cnt) -{ - - vu_char *cmd = (vu_char *) info->start[0]; - vu_char *dst = (vu_char *) addr; - unsigned char b; - unsigned oldpri; - ulong start; - - while (cnt) { - /* Check for sufficient erase */ - b = *src; - if ((*dst & b) != b) { - printf ("%02x : %02x\n", *dst, b); - return (2); - } - - /* Disable interrupts other than window underflow - * (interrupt priority 2) - */ - oldpri = ipri (3); - *cmd = 0xaa; - *cmd = 0x55; - *cmd = 0xa0; - *dst = b; - - /* Verify write */ - start = get_timer (0); - while (*dst != b) { - if (get_timer (start) > CONFIG_SYS_FLASH_WRITE_TOUT) { - ipri (oldpri); - return 1; - } - } - dst++; - src++; - cnt--; - ipri (oldpri); - } - - return (0); -} -- cgit v1.2.3 From b9c1f4bf8e11d3701902dcd22a2fa18de8e1250f Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Mon, 31 Mar 2014 13:09:39 +0900 Subject: board: ppmc8260: delete an unused source file Signed-off-by: Masahiro Yamada Cc: Brad Kemp --- board/ppmc8260/strataflash.c | 736 ------------------------------------------- 1 file changed, 736 deletions(-) delete mode 100644 board/ppmc8260/strataflash.c (limited to 'board') diff --git a/board/ppmc8260/strataflash.c b/board/ppmc8260/strataflash.c deleted file mode 100644 index ea3c42eed4b..00000000000 --- a/board/ppmc8260/strataflash.c +++ /dev/null @@ -1,736 +0,0 @@ -/* - * (C) Copyright 2002 - * Brad Kemp, Seranoa Networks, Brad.Kemp@seranoa.com - * - * SPDX-License-Identifier: GPL-2.0+ - */ - -#include -#include -#include - -#undef DEBUG_FLASH -/* - * This file implements a Common Flash Interface (CFI) driver for U-Boot. - * The width of the port and the width of the chips are determined at initialization. - * These widths are used to calculate the address for access CFI data structures. - * It has been tested on an Intel Strataflash implementation. - * - * References - * JEDEC Standard JESD68 - Common Flash Interface (CFI) - * JEDEC Standard JEP137-A Common Flash Interface (CFI) ID Codes - * Intel Application Note 646 Common Flash Interface (CFI) and Command Sets - * Intel 290667-008 3 Volt Intel StrataFlash Memory datasheet - * - * TODO - * Use Primary Extended Query table (PRI) and Alternate Algorithm Query Table (ALT) to determine if protection is available - * Add support for other command sets Use the PRI and ALT to determine command set - * Verify erase and program timeouts. - */ - -#define FLASH_CMD_CFI 0x98 -#define FLASH_CMD_READ_ID 0x90 -#define FLASH_CMD_RESET 0xff -#define FLASH_CMD_BLOCK_ERASE 0x20 -#define FLASH_CMD_ERASE_CONFIRM 0xD0 -#define FLASH_CMD_WRITE 0x40 -#define FLASH_CMD_PROTECT 0x60 -#define FLASH_CMD_PROTECT_SET 0x01 -#define FLASH_CMD_PROTECT_CLEAR 0xD0 -#define FLASH_CMD_CLEAR_STATUS 0x50 -#define FLASH_CMD_WRITE_TO_BUFFER 0xE8 -#define FLASH_CMD_WRITE_BUFFER_CONFIRM 0xD0 - -#define FLASH_STATUS_DONE 0x80 -#define FLASH_STATUS_ESS 0x40 -#define FLASH_STATUS_ECLBS 0x20 -#define FLASH_STATUS_PSLBS 0x10 -#define FLASH_STATUS_VPENS 0x08 -#define FLASH_STATUS_PSS 0x04 -#define FLASH_STATUS_DPS 0x02 -#define FLASH_STATUS_R 0x01 -#define FLASH_STATUS_PROTECT 0x01 - -#define FLASH_OFFSET_CFI 0x55 -#define FLASH_OFFSET_CFI_RESP 0x10 -#define FLASH_OFFSET_WTOUT 0x1F -#define FLASH_OFFSET_WBTOUT 0x20 -#define FLASH_OFFSET_ETOUT 0x21 -#define FLASH_OFFSET_CETOUT 0x22 -#define FLASH_OFFSET_WMAX_TOUT 0x23 -#define FLASH_OFFSET_WBMAX_TOUT 0x24 -#define FLASH_OFFSET_EMAX_TOUT 0x25 -#define FLASH_OFFSET_CEMAX_TOUT 0x26 -#define FLASH_OFFSET_SIZE 0x27 -#define FLASH_OFFSET_INTERFACE 0x28 -#define FLASH_OFFSET_BUFFER_SIZE 0x2A -#define FLASH_OFFSET_NUM_ERASE_REGIONS 0x2C -#define FLASH_OFFSET_ERASE_REGIONS 0x2D -#define FLASH_OFFSET_PROTECT 0x02 -#define FLASH_OFFSET_USER_PROTECTION 0x85 -#define FLASH_OFFSET_INTEL_PROTECTION 0x81 - - -#define FLASH_MAN_CFI 0x01000000 - - -typedef union { - unsigned char c; - unsigned short w; - unsigned long l; -} cfiword_t; - -typedef union { - unsigned char * cp; - unsigned short *wp; - unsigned long *lp; -} cfiptr_t; - -#define NUM_ERASE_REGIONS 4 - -flash_info_t flash_info[CONFIG_SYS_MAX_FLASH_BANKS]; /* info for FLASH chips */ - - -/*----------------------------------------------------------------------- - * Functions - */ - - -static void flash_add_byte(flash_info_t *info, cfiword_t * cword, uchar c); -static void flash_make_cmd(flash_info_t * info, uchar cmd, void * cmdbuf); -static void flash_write_cmd(flash_info_t * info, int sect, uchar offset, uchar cmd); -static int flash_isequal(flash_info_t * info, int sect, uchar offset, uchar cmd); -static int flash_isset(flash_info_t * info, int sect, uchar offset, uchar cmd); -static int flash_detect_cfi(flash_info_t * info); -static ulong flash_get_size (ulong base, int banknum); -static int flash_write_cfiword (flash_info_t *info, ulong dest, cfiword_t cword); -static int flash_full_status_check(flash_info_t * info, ulong sector, ulong tout, char * prompt); -#ifdef CONFIG_SYS_FLASH_USE_BUFFER_WRITE -static int flash_write_cfibuffer(flash_info_t * info, ulong dest, uchar * cp, int len); -#endif -/*----------------------------------------------------------------------- - * create an address based on the offset and the port width - */ -inline uchar * flash_make_addr(flash_info_t * info, int sect, int offset) -{ - return ((uchar *)(info->start[sect] + (offset * info->portwidth))); -} -/*----------------------------------------------------------------------- - * read a character at a port width address - */ -inline uchar flash_read_uchar(flash_info_t * info, uchar offset) -{ - uchar *cp; - cp = flash_make_addr(info, 0, offset); - return (cp[info->portwidth - 1]); -} - -/*----------------------------------------------------------------------- - * read a short word by swapping for ppc format. - */ -ushort flash_read_ushort(flash_info_t * info, int sect, uchar offset) -{ - uchar * addr; - - addr = flash_make_addr(info, sect, offset); - return ((addr[(2*info->portwidth) - 1] << 8) | addr[info->portwidth - 1]); - -} - -/*----------------------------------------------------------------------- - * read a long word by picking the least significant byte of each maiximum - * port size word. Swap for ppc format. - */ -ulong flash_read_long(flash_info_t * info, int sect, uchar offset) -{ - uchar * addr; - - addr = flash_make_addr(info, sect, offset); - return ( (addr[(2*info->portwidth) - 1] << 24 ) | (addr[(info->portwidth) -1] << 16) | - (addr[(4*info->portwidth) - 1] << 8) | addr[(3*info->portwidth) - 1]); - -} - -/*----------------------------------------------------------------------- - */ -unsigned long flash_init (void) -{ - unsigned long size; - int i; - unsigned long address; - - - /* The flash is positioned back to back, with the demultiplexing of the chip - * based on the A24 address line. - * - */ - - address = CONFIG_SYS_FLASH_BASE; - size = 0; - - - /* Init: no FLASHes known */ - for (i=0; i= CONFIG_SYS_FLASH_BASE) - for(i=0; flash_info[0].start[i] < CONFIG_SYS_MONITOR_BASE+monitor_flash_len-1; i++) - (void)flash_real_protect(&flash_info[0], i, 1); -#endif - - return (size); -} - -/*----------------------------------------------------------------------- - */ -int flash_erase (flash_info_t *info, int s_first, int s_last) -{ - int rcode = 0; - int prot; - int sect; - - if( info->flash_id != FLASH_MAN_CFI) { - printf ("Can't erase unknown flash type - aborted\n"); - return 1; - } - if ((s_first < 0) || (s_first > s_last)) { - printf ("- no sectors to erase\n"); - return 1; - } - - prot = 0; - for (sect=s_first; sect<=s_last; ++sect) { - if (info->protect[sect]) { - prot++; - } - } - if (prot) { - printf ("- Warning: %d protected sectors will not be erased!\n", - prot); - } else { - printf ("\n"); - } - - - for (sect = s_first; sect<=s_last; sect++) { - if (info->protect[sect] == 0) { /* not protected */ - flash_write_cmd(info, sect, 0, FLASH_CMD_CLEAR_STATUS); - flash_write_cmd(info, sect, 0, FLASH_CMD_BLOCK_ERASE); - flash_write_cmd(info, sect, 0, FLASH_CMD_ERASE_CONFIRM); - - if(flash_full_status_check(info, sect, info->erase_blk_tout, "erase")) { - rcode = 1; - } else - printf("."); - } - } - printf (" done\n"); - return rcode; -} - -/*----------------------------------------------------------------------- - */ -void flash_print_info (flash_info_t *info) -{ - int i; - - if (info->flash_id != FLASH_MAN_CFI) { - printf ("missing or unknown FLASH type\n"); - return; - } - - printf("CFI conformant FLASH (%d x %d)", - (info->portwidth << 3 ), (info->chipwidth << 3 )); - printf (" Size: %ld MB in %d Sectors\n", - info->size >> 20, info->sector_count); - printf(" Erase timeout %ld ms, write timeout %ld ms, buffer write timeout %ld ms, buffer size %d\n", - info->erase_blk_tout, info->write_tout, info->buffer_write_tout, info->buffer_size); - - printf (" Sector Start Addresses:"); - for (i=0; isector_count; ++i) { - if ((i % 5) == 0) - printf ("\n"); - printf (" %08lX%5s", - info->start[i], - info->protect[i] ? " (RO)" : " " - ); - } - printf ("\n"); - return; -} - -/*----------------------------------------------------------------------- - * Copy memory to flash, returns: - * 0 - OK - * 1 - write timeout - * 2 - Flash not erased - */ -int write_buff (flash_info_t *info, uchar *src, ulong addr, ulong cnt) -{ - ulong wp; - ulong cp; - int aln; - cfiword_t cword; - int i, rc; - - /* get lower aligned address */ - wp = (addr & ~(info->portwidth - 1)); - - /* handle unaligned start */ - if((aln = addr - wp) != 0) { - cword.l = 0; - cp = wp; - for(i=0;iportwidth) && (cnt > 0) ; i++) { - flash_add_byte(info, &cword, *src++); - cnt--; - cp++; - } - for(; (cnt == 0) && (i < info->portwidth); ++i, ++cp) - flash_add_byte(info, &cword, (*(uchar *)cp)); - if((rc = flash_write_cfiword(info, wp, cword)) != 0) - return rc; - wp = cp; - } - -#ifdef CONFIG_SYS_FLASH_USE_BUFFER_WRITE - while(cnt >= info->portwidth) { - i = info->buffer_size > cnt? cnt: info->buffer_size; - if((rc = flash_write_cfibuffer(info, wp, src,i)) != ERR_OK) - return rc; - wp += i; - src += i; - cnt -=i; - } -#else - /* handle the aligned part */ - while(cnt >= info->portwidth) { - cword.l = 0; - for(i = 0; i < info->portwidth; i++) { - flash_add_byte(info, &cword, *src++); - } - if((rc = flash_write_cfiword(info, wp, cword)) != 0) - return rc; - wp += info->portwidth; - cnt -= info->portwidth; - } -#endif /* CONFIG_SYS_FLASH_USE_BUFFER_WRITE */ - if (cnt == 0) { - return (0); - } - - /* - * handle unaligned tail bytes - */ - cword.l = 0; - for (i=0, cp=wp; (iportwidth) && (cnt>0); ++i, ++cp) { - flash_add_byte(info, &cword, *src++); - --cnt; - } - for (; iportwidth; ++i, ++cp) { - flash_add_byte(info, & cword, (*(uchar *)cp)); - } - - return flash_write_cfiword(info, wp, cword); -} - -/*----------------------------------------------------------------------- - */ -int flash_real_protect(flash_info_t *info, long sector, int prot) -{ - int retcode = 0; - - flash_write_cmd(info, sector, 0, FLASH_CMD_CLEAR_STATUS); - flash_write_cmd(info, sector, 0, FLASH_CMD_PROTECT); - if(prot) - flash_write_cmd(info, sector, 0, FLASH_CMD_PROTECT_SET); - else - flash_write_cmd(info, sector, 0, FLASH_CMD_PROTECT_CLEAR); - - if((retcode = flash_full_status_check(info, sector, info->erase_blk_tout, - prot?"protect":"unprotect")) == 0) { - - info->protect[sector] = prot; - /* Intel's unprotect unprotects all locking */ - if(prot == 0) { - int i; - for(i = 0 ; isector_count; i++) { - if(info->protect[i]) - flash_real_protect(info, i, 1); - } - } - } - - return retcode; -} -/*----------------------------------------------------------------------- - * wait for XSR.7 to be set. Time out with an error if it does not. - * This routine does not set the flash to read-array mode. - */ -static int flash_status_check(flash_info_t * info, ulong sector, ulong tout, char * prompt) -{ - ulong start; - - /* Wait for command completion */ - start = get_timer (0); - while(!flash_isset(info, sector, 0, FLASH_STATUS_DONE)) { - if (get_timer(start) > info->erase_blk_tout) { - printf("Flash %s timeout at address %lx\n", prompt, info->start[sector]); - flash_write_cmd(info, sector, 0, FLASH_CMD_RESET); - return ERR_TIMOUT; - } - } - return ERR_OK; -} -/*----------------------------------------------------------------------- - * Wait for XSR.7 to be set, if it times out print an error, otherwise do a full status check. - * This routine sets the flash to read-array mode. - */ -static int flash_full_status_check(flash_info_t * info, ulong sector, ulong tout, char * prompt) -{ - int retcode; - retcode = flash_status_check(info, sector, tout, prompt); - if((retcode == ERR_OK) && !flash_isequal(info,sector, 0, FLASH_STATUS_DONE)) { - retcode = ERR_INVAL; - printf("Flash %s error at address %lx\n", prompt,info->start[sector]); - if(flash_isset(info, sector, 0, FLASH_STATUS_ECLBS | FLASH_STATUS_PSLBS)){ - printf("Command Sequence Error.\n"); - } else if(flash_isset(info, sector, 0, FLASH_STATUS_ECLBS)){ - printf("Block Erase Error.\n"); - retcode = ERR_NOT_ERASED; - } else if (flash_isset(info, sector, 0, FLASH_STATUS_PSLBS)) { - printf("Locking Error\n"); - } - if(flash_isset(info, sector, 0, FLASH_STATUS_DPS)){ - printf("Block locked.\n"); - retcode = ERR_PROTECTED; - } - if(flash_isset(info, sector, 0, FLASH_STATUS_VPENS)) - printf("Vpp Low Error.\n"); - } - flash_write_cmd(info, sector, 0, FLASH_CMD_RESET); - return retcode; -} -/*----------------------------------------------------------------------- - */ -static void flash_add_byte(flash_info_t *info, cfiword_t * cword, uchar c) -{ - switch(info->portwidth) { - case FLASH_CFI_8BIT: - cword->c = c; - break; - case FLASH_CFI_16BIT: - cword->w = (cword->w << 8) | c; - break; - case FLASH_CFI_32BIT: - cword->l = (cword->l << 8) | c; - } -} - - -/*----------------------------------------------------------------------- - * make a proper sized command based on the port and chip widths - */ -static void flash_make_cmd(flash_info_t * info, uchar cmd, void * cmdbuf) -{ - int i; - uchar *cp = (uchar *)cmdbuf; - for(i=0; i< info->portwidth; i++) - *cp++ = ((i+1) % info->chipwidth) ? '\0':cmd; -} - -/* - * Write a proper sized command to the correct address - */ -static void flash_write_cmd(flash_info_t * info, int sect, uchar offset, uchar cmd) -{ - - volatile cfiptr_t addr; - cfiword_t cword; - addr.cp = flash_make_addr(info, sect, offset); - flash_make_cmd(info, cmd, &cword); - switch(info->portwidth) { - case FLASH_CFI_8BIT: - *addr.cp = cword.c; - break; - case FLASH_CFI_16BIT: - *addr.wp = cword.w; - break; - case FLASH_CFI_32BIT: - *addr.lp = cword.l; - break; - } -} - -/*----------------------------------------------------------------------- - */ -static int flash_isequal(flash_info_t * info, int sect, uchar offset, uchar cmd) -{ - cfiptr_t cptr; - cfiword_t cword; - int retval; - cptr.cp = flash_make_addr(info, sect, offset); - flash_make_cmd(info, cmd, &cword); - switch(info->portwidth) { - case FLASH_CFI_8BIT: - retval = (cptr.cp[0] == cword.c); - break; - case FLASH_CFI_16BIT: - retval = (cptr.wp[0] == cword.w); - break; - case FLASH_CFI_32BIT: - retval = (cptr.lp[0] == cword.l); - break; - default: - retval = 0; - break; - } - return retval; -} -/*----------------------------------------------------------------------- - */ -static int flash_isset(flash_info_t * info, int sect, uchar offset, uchar cmd) -{ - cfiptr_t cptr; - cfiword_t cword; - int retval; - cptr.cp = flash_make_addr(info, sect, offset); - flash_make_cmd(info, cmd, &cword); - switch(info->portwidth) { - case FLASH_CFI_8BIT: - retval = ((cptr.cp[0] & cword.c) == cword.c); - break; - case FLASH_CFI_16BIT: - retval = ((cptr.wp[0] & cword.w) == cword.w); - break; - case FLASH_CFI_32BIT: - retval = ((cptr.lp[0] & cword.l) == cword.l); - break; - default: - retval = 0; - break; - } - return retval; -} - -/*----------------------------------------------------------------------- - * detect if flash is compatible with the Common Flash Interface (CFI) - * http://www.jedec.org/download/search/jesd68.pdf - * -*/ -static int flash_detect_cfi(flash_info_t * info) -{ - - for(info->portwidth=FLASH_CFI_8BIT; info->portwidth <= FLASH_CFI_32BIT; - info->portwidth <<= 1) { - for(info->chipwidth =FLASH_CFI_BY8; - info->chipwidth <= info->portwidth; - info->chipwidth <<= 1) { - flash_write_cmd(info, 0, 0, FLASH_CMD_RESET); - flash_write_cmd(info, 0, FLASH_OFFSET_CFI, FLASH_CMD_CFI); - if(flash_isequal(info, 0, FLASH_OFFSET_CFI_RESP,'Q') && - flash_isequal(info, 0, FLASH_OFFSET_CFI_RESP + 1, 'R') && - flash_isequal(info, 0, FLASH_OFFSET_CFI_RESP + 2, 'Y')) - return 1; - } - } - return 0; -} -/* - * The following code cannot be run from FLASH! - * - */ -static ulong flash_get_size (ulong base, int banknum) -{ - flash_info_t * info = &flash_info[banknum]; - int i, j; - int sect_cnt; - unsigned long sector; - unsigned long tmp; - int size_ratio; - uchar num_erase_regions; - int erase_region_size; - int erase_region_count; - - info->start[0] = base; - - if(flash_detect_cfi(info)){ - size_ratio = info->portwidth / info->chipwidth; - num_erase_regions = flash_read_uchar(info, FLASH_OFFSET_NUM_ERASE_REGIONS); -#ifdef DEBUG_FLASH - printf("found %d erase regions\n", num_erase_regions); -#endif - sect_cnt = 0; - sector = base; - for(i = 0 ; i < num_erase_regions; i++) { - if(i > NUM_ERASE_REGIONS) { - printf("%d erase regions found, only %d used\n", - num_erase_regions, NUM_ERASE_REGIONS); - break; - } - tmp = flash_read_long(info, 0, FLASH_OFFSET_ERASE_REGIONS); - erase_region_size = (tmp & 0xffff)? ((tmp & 0xffff) * 256): 128; - tmp >>= 16; - erase_region_count = (tmp & 0xffff) +1; - for(j = 0; j< erase_region_count; j++) { - info->start[sect_cnt] = sector; - sector += (erase_region_size * size_ratio); - info->protect[sect_cnt] = flash_isset(info, sect_cnt, FLASH_OFFSET_PROTECT, FLASH_STATUS_PROTECT); - sect_cnt++; - } - } - - info->sector_count = sect_cnt; - /* multiply the size by the number of chips */ - info->size = (1 << flash_read_uchar(info, FLASH_OFFSET_SIZE)) * size_ratio; - info->buffer_size = (1 << flash_read_ushort(info, 0, FLASH_OFFSET_BUFFER_SIZE)); - tmp = 1 << flash_read_uchar(info, FLASH_OFFSET_ETOUT); - info->erase_blk_tout = (tmp * (1 << flash_read_uchar(info, FLASH_OFFSET_EMAX_TOUT))); - tmp = 1 << flash_read_uchar(info, FLASH_OFFSET_WBTOUT); - info->buffer_write_tout = (tmp * (1 << flash_read_uchar(info, FLASH_OFFSET_WBMAX_TOUT))); - tmp = 1 << flash_read_uchar(info, FLASH_OFFSET_WTOUT); - info->write_tout = (tmp * (1 << flash_read_uchar(info, FLASH_OFFSET_WMAX_TOUT)))/ 1000; - info->flash_id = FLASH_MAN_CFI; - } - - flash_write_cmd(info, 0, 0, FLASH_CMD_RESET); - return(info->size); -} - - -/*----------------------------------------------------------------------- - */ -static int flash_write_cfiword (flash_info_t *info, ulong dest, cfiword_t cword) -{ - - cfiptr_t ctladdr; - cfiptr_t cptr; - int flag; - - ctladdr.cp = flash_make_addr(info, 0, 0); - cptr.cp = (uchar *)dest; - - - /* Check if Flash is (sufficiently) erased */ - switch(info->portwidth) { - case FLASH_CFI_8BIT: - flag = ((cptr.cp[0] & cword.c) == cword.c); - break; - case FLASH_CFI_16BIT: - flag = ((cptr.wp[0] & cword.w) == cword.w); - break; - case FLASH_CFI_32BIT: - flag = ((cptr.lp[0] & cword.l) == cword.l); - break; - default: - return 2; - } - if(!flag) - return 2; - - /* Disable interrupts which might cause a timeout here */ - flag = disable_interrupts(); - - flash_write_cmd(info, 0, 0, FLASH_CMD_CLEAR_STATUS); - flash_write_cmd(info, 0, 0, FLASH_CMD_WRITE); - - switch(info->portwidth) { - case FLASH_CFI_8BIT: - cptr.cp[0] = cword.c; - break; - case FLASH_CFI_16BIT: - cptr.wp[0] = cword.w; - break; - case FLASH_CFI_32BIT: - cptr.lp[0] = cword.l; - break; - } - - /* re-enable interrupts if necessary */ - if(flag) - enable_interrupts(); - - return flash_full_status_check(info, 0, info->write_tout, "write"); -} - -#ifdef CONFIG_SYS_FLASH_USE_BUFFER_WRITE - -/* loop through the sectors from the highest address - * when the passed address is greater or equal to the sector address - * we have a match - */ -static int find_sector(flash_info_t *info, ulong addr) -{ - int sector; - for(sector = info->sector_count - 1; sector >= 0; sector--) { - if(addr >= info->start[sector]) - break; - } - return sector; -} - -static int flash_write_cfibuffer(flash_info_t * info, ulong dest, uchar * cp, int len) -{ - - int sector; - int cnt; - int retcode; - volatile cfiptr_t src; - volatile cfiptr_t dst; - - src.cp = cp; - dst.cp = (uchar *)dest; - sector = find_sector(info, dest); - flash_write_cmd(info, sector, 0, FLASH_CMD_CLEAR_STATUS); - flash_write_cmd(info, sector, 0, FLASH_CMD_WRITE_TO_BUFFER); - if((retcode = flash_status_check(info, sector, info->buffer_write_tout, - "write to buffer")) == ERR_OK) { - switch(info->portwidth) { - case FLASH_CFI_8BIT: - cnt = len; - break; - case FLASH_CFI_16BIT: - cnt = len >> 1; - break; - case FLASH_CFI_32BIT: - cnt = len >> 2; - break; - default: - return ERR_INVAL; - break; - } - flash_write_cmd(info, sector, 0, (uchar)cnt-1); - while(cnt-- > 0) { - switch(info->portwidth) { - case FLASH_CFI_8BIT: - *dst.cp++ = *src.cp++; - break; - case FLASH_CFI_16BIT: - *dst.wp++ = *src.wp++; - break; - case FLASH_CFI_32BIT: - *dst.lp++ = *src.lp++; - break; - default: - return ERR_INVAL; - break; - } - } - flash_write_cmd(info, sector, 0, FLASH_CMD_WRITE_BUFFER_CONFIRM); - retcode = flash_full_status_check(info, sector, info->buffer_write_tout, - "buffer write"); - } - flash_write_cmd(info, sector, 0, FLASH_CMD_CLEAR_STATUS); - return retcode; -} -#endif /* CONFIG_SYS_USE_FLASH_BUFFER_WRITE */ -- cgit v1.2.3 From 773d998cafd1c3fe8f82475d7a5aec50c17222d6 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Mon, 31 Mar 2014 13:10:11 +0900 Subject: board: sandpoint: delete an unused source file Signed-off-by: Masahiro Yamada Cc: Wolfgang Denk Cc: Jim Thompson --- board/sandpoint/early_init.S | 137 ------------------------------------------- 1 file changed, 137 deletions(-) delete mode 100644 board/sandpoint/early_init.S (limited to 'board') diff --git a/board/sandpoint/early_init.S b/board/sandpoint/early_init.S deleted file mode 100644 index 5a9b924ef92..00000000000 --- a/board/sandpoint/early_init.S +++ /dev/null @@ -1,137 +0,0 @@ -/* - * (C) Copyright 2001 - * Thomas Koeller, tkoeller@gmx.net - * - * SPDX-License-Identifier: GPL-2.0+ - */ - -#ifndef __ASSEMBLY__ -#define __ASSEMBLY__ 1 -#endif - -#include -#include -#include -#include -#include - -#if defined(USE_DINK32) - /* We are running from RAM, so do not clear the MCCR1_MEMGO bit! */ - #define MCCR1VAL ((CONFIG_SYS_ROMNAL << MCCR1_ROMNAL_SHIFT) | (CONFIG_SYS_ROMFAL << MCCR1_ROMFAL_SHIFT) | MCCR1_MEMGO) -#else - #define MCCR1VAL (CONFIG_SYS_ROMNAL << MCCR1_ROMNAL_SHIFT) | (CONFIG_SYS_ROMFAL << MCCR1_ROMFAL_SHIFT) -#endif - - .text - - /* Values to program into memory controller registers */ -tbl: .long MCCR1, MCCR1VAL - .long MCCR2, CONFIG_SYS_REFINT << MCCR2_REFINT_SHIFT - .long MCCR3 - .long (((CONFIG_SYS_BSTOPRE & 0x000000f0) >> 4) << MCCR3_BSTOPRE2TO5_SHIFT) | \ - (CONFIG_SYS_REFREC << MCCR3_REFREC_SHIFT) | \ - (CONFIG_SYS_RDLAT << MCCR3_RDLAT_SHIFT) - .long MCCR4 - .long (CONFIG_SYS_PRETOACT << MCCR4_PRETOACT_SHIFT) | (CONFIG_SYS_ACTTOPRE << MCCR4_ACTTOPRE_SHIFT) | \ - (CONFIG_SYS_REGISTERD_TYPE_BUFFER << 20) | \ - (((CONFIG_SYS_BSTOPRE & 0x00000300) >> 8) << MCCR4_BSTOPRE0TO1_SHIFT ) | \ - ((CONFIG_SYS_SDMODE_CAS_LAT << 4) | (CONFIG_SYS_SDMODE_WRAP << 3) | \ - (CONFIG_SYS_SDMODE_BURSTLEN) << MCCR4_SDMODE_SHIFT) | \ - (CONFIG_SYS_ACTTORW << MCCR4_ACTTORW_SHIFT) | \ - ((CONFIG_SYS_BSTOPRE & 0x0000000f) << MCCR4_BSTOPRE6TO9_SHIFT ) - .long MSAR1 - .long (((CONFIG_SYS_BANK0_START & MICR_ADDR_MASK) >> MICR_ADDR_SHIFT) << 0) | \ - (((CONFIG_SYS_BANK1_START & MICR_ADDR_MASK) >> MICR_ADDR_SHIFT) << 8) | \ - (((CONFIG_SYS_BANK2_START & MICR_ADDR_MASK) >> MICR_ADDR_SHIFT) << 16) | \ - (((CONFIG_SYS_BANK3_START & MICR_ADDR_MASK) >> MICR_ADDR_SHIFT) << 24) - .long EMSAR1 - .long (((CONFIG_SYS_BANK0_START & MICR_EADDR_MASK) >> MICR_EADDR_SHIFT) << 0) | \ - (((CONFIG_SYS_BANK1_START & MICR_EADDR_MASK) >> MICR_EADDR_SHIFT) << 8) | \ - (((CONFIG_SYS_BANK2_START & MICR_EADDR_MASK) >> MICR_EADDR_SHIFT) << 16) | \ - (((CONFIG_SYS_BANK3_START & MICR_EADDR_MASK) >> MICR_EADDR_SHIFT) << 24) - .long MSAR2 - .long (((CONFIG_SYS_BANK4_START & MICR_ADDR_MASK) >> MICR_ADDR_SHIFT) << 0) | \ - (((CONFIG_SYS_BANK5_START & MICR_ADDR_MASK) >> MICR_ADDR_SHIFT) << 8) | \ - (((CONFIG_SYS_BANK6_START & MICR_ADDR_MASK) >> MICR_ADDR_SHIFT) << 16) | \ - (((CONFIG_SYS_BANK7_START & MICR_ADDR_MASK) >> MICR_ADDR_SHIFT) << 24) - .long EMSAR2 - .long (((CONFIG_SYS_BANK4_START & MICR_EADDR_MASK) >> MICR_EADDR_SHIFT) << 0) | \ - (((CONFIG_SYS_BANK5_START & MICR_EADDR_MASK) >> MICR_EADDR_SHIFT) << 8) | \ - (((CONFIG_SYS_BANK6_START & MICR_EADDR_MASK) >> MICR_EADDR_SHIFT) << 16) | \ - (((CONFIG_SYS_BANK7_START & MICR_EADDR_MASK) >> MICR_EADDR_SHIFT) << 24) - .long MEAR1 - .long (((CONFIG_SYS_BANK0_END & MICR_ADDR_MASK) >> MICR_ADDR_SHIFT) << 0) | \ - (((CONFIG_SYS_BANK1_END & MICR_ADDR_MASK) >> MICR_ADDR_SHIFT) << 8) | \ - (((CONFIG_SYS_BANK2_END & MICR_ADDR_MASK) >> MICR_ADDR_SHIFT) << 16) | \ - (((CONFIG_SYS_BANK3_END & MICR_ADDR_MASK) >> MICR_ADDR_SHIFT) << 24) - .long EMEAR1 - .long (((CONFIG_SYS_BANK0_END & MICR_EADDR_MASK) >> MICR_EADDR_SHIFT) << 0) | \ - (((CONFIG_SYS_BANK1_END & MICR_EADDR_MASK) >> MICR_EADDR_SHIFT) << 8) | \ - (((CONFIG_SYS_BANK2_END & MICR_EADDR_MASK) >> MICR_EADDR_SHIFT) << 16) | \ - (((CONFIG_SYS_BANK3_END & MICR_EADDR_MASK) >> MICR_EADDR_SHIFT) << 24) - .long MEAR2 - .long (((CONFIG_SYS_BANK4_END & MICR_ADDR_MASK) >> MICR_ADDR_SHIFT) << 0) | \ - (((CONFIG_SYS_BANK5_END & MICR_ADDR_MASK) >> MICR_ADDR_SHIFT) << 8) | \ - (((CONFIG_SYS_BANK6_END & MICR_ADDR_MASK) >> MICR_ADDR_SHIFT) << 16) | \ - (((CONFIG_SYS_BANK7_END & MICR_ADDR_MASK) >> MICR_ADDR_SHIFT) << 24) - .long EMEAR2 - .long (((CONFIG_SYS_BANK4_END & MICR_EADDR_MASK) >> MICR_EADDR_SHIFT) << 0) | \ - (((CONFIG_SYS_BANK5_END & MICR_EADDR_MASK) >> MICR_EADDR_SHIFT) << 8) | \ - (((CONFIG_SYS_BANK6_END & MICR_EADDR_MASK) >> MICR_EADDR_SHIFT) << 16) | \ - (((CONFIG_SYS_BANK7_END & MICR_EADDR_MASK) >> MICR_EADDR_SHIFT) << 24) - .long 0 - - - /* - * Early CPU initialization. Set up memory controller, so we can access any RAM at all. This - * must be done in assembly, since we have no stack at this point. - */ - .global early_init_f -early_init_f: - mflr r10 - - /* basic memory controller configuration */ - lis r3, CONFIG_ADDR_HIGH - lis r4, CONFIG_DATA_HIGH - bl lab -lab: mflr r5 - lwzu r0, tbl - lab(r5) -loop: lwz r1, 4(r5) - stwbrx r0, 0, r3 - eieio - stwbrx r1, 0, r4 - eieio - lwzu r0, 8(r5) - cmpli cr0, 0, r0, 0 - bne cr0, loop - - /* set bank enable bits */ - lis r0, MBER@h - ori r0, 0, MBER@l - li r1, CONFIG_SYS_BANK_ENABLE - stwbrx r0, 0, r3 - eieio - stb r1, 0(r4) - eieio - - /* delay loop */ - lis r0, 0x0003 - mtctr r0 -delay: bdnz delay - - /* enable memory controller */ - lis r0, MCCR1@h - ori r0, 0, MCCR1@l - stwbrx r0, 0, r3 - eieio - lwbrx r0, 0, r4 - oris r0, 0, MCCR1_MEMGO@h - stwbrx r0, 0, r4 - eieio - - /* set up stack pointer */ - lis r1, CONFIG_SYS_INIT_SP_OFFSET@h - ori r1, r1, CONFIG_SYS_INIT_SP_OFFSET@l - - mtlr r10 - blr -- cgit v1.2.3 From ddd880f8d43036f4c6717fe61a10ead6e4423987 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Mon, 31 Mar 2014 13:12:12 +0900 Subject: board: Marvell: delete an unused source file Signed-off-by: Masahiro Yamada Cc: Prafulla Wadaskar Cc: Lei Wen --- board/Marvell/common/ecctest.c | 115 ----------------------------------------- 1 file changed, 115 deletions(-) delete mode 100644 board/Marvell/common/ecctest.c (limited to 'board') diff --git a/board/Marvell/common/ecctest.c b/board/Marvell/common/ecctest.c deleted file mode 100644 index 0a9a2a4c4fd..00000000000 --- a/board/Marvell/common/ecctest.c +++ /dev/null @@ -1,115 +0,0 @@ -/* - * (C) Copyright 2001 - * - * SPDX-License-Identifier: GPL-2.0+ - */ - -#ifdef ECC_TEST -static inline void ecc_off (void) -{ - *(volatile int *) (INTERNAL_REG_BASE_ADDR + 0x4b4) &= ~0x00200000; -} - -static inline void ecc_on (void) -{ - *(volatile int *) (INTERNAL_REG_BASE_ADDR + 0x4b4) |= 0x00200000; -} - -static int putshex (const char *buf, int len) -{ - int i; - - for (i = 0; i < len; i++) { - printf ("%02x", buf[i]); - } - return 0; -} - -static int char_memcpy (void *d, const void *s, int len) -{ - int i; - char *cd = d; - const char *cs = s; - - for (i = 0; i < len; i++) { - *(cd++) = *(cs++); - } - return 0; -} - -static int memory_test (char *buf) -{ - const char src[][16] = { - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, - 0x01, 0x01, 0x01, 0x01, 0x01, 0x01}, - {0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, - 0x02, 0x02, 0x02, 0x02, 0x02, 0x02}, - {0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, - 0x04, 0x04, 0x04, 0x04, 0x04, 0x04}, - {0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, - 0x08, 0x08, 0x08, 0x08, 0x08, 0x08}, - {0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, - 0x10, 0x10, 0x10, 0x10, 0x10, 0x10}, - {0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20}, - {0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, - 0x40, 0x40, 0x40, 0x40, 0x40, 0x40}, - {0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80}, - {0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, - 0x55, 0x55, 0x55, 0x55, 0x55, 0x55}, - {0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, - 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa}, - {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff} - }; - const int foo[] = { 0 }; - int i, j, a; - - printf ("\ntest @ %d %p\n", foo[0], buf); - for (i = 0; i < 12; i++) { - for (a = 0; a < 8; a++) { - const char *s = src[i] + a; - int align = (unsigned) (s) & 0x7; - - /* ecc_off(); */ - memcpy (buf, s, 8); - /* ecc_on(); */ - putshex (s, 8); - if (memcmp (buf, s, 8)) { - putc ('\n'); - putshex (buf, 8); - printf (" [FAIL] (%p) align=%d\n", s, align); - for (j = 0; j < 8; j++) { - s[j] == buf[j] ? puts (" ") : - printf ("%02x", - (s[j]) ^ (buf[j])); - } - putc ('\n'); - } else { - printf (" [PASS] (%p) align=%d\n", s, align); - } - /* ecc_off(); */ - char_memcpy (buf, s, 8); - /* ecc_on(); */ - putshex (s, 8); - if (memcmp (buf, s, 8)) { - putc ('\n'); - putshex (buf, 8); - printf (" [FAIL] (%p) align=%d\n", s, align); - for (j = 0; j < 8; j++) { - s[j] == buf[j] ? puts (" ") : - printf ("%02x", - (s[j]) ^ (buf[j])); - } - putc ('\n'); - } else { - printf (" [PASS] (%p) align=%d\n", s, align); - } - } - } - - return 0; -} -#endif -- cgit v1.2.3 From d62bb61f7c448703acd80f4086a0277da7382526 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Mon, 31 Mar 2014 13:12:52 +0900 Subject: board: prodrive: delete unused source files Signed-off-by: Masahiro Yamada Cc: Stefan Roese Acked-by: Stefan Roese --- board/prodrive/common/flash.c | 544 ------------------------------------------ board/prodrive/common/fpga.c | 167 ------------- 2 files changed, 711 deletions(-) delete mode 100644 board/prodrive/common/flash.c delete mode 100644 board/prodrive/common/fpga.c (limited to 'board') diff --git a/board/prodrive/common/flash.c b/board/prodrive/common/flash.c deleted file mode 100644 index 99540518523..00000000000 --- a/board/prodrive/common/flash.c +++ /dev/null @@ -1,544 +0,0 @@ -/* - * (C) Copyright 2006 - * Stefan Roese, DENX Software Engineering, sr@denx.de. - * - * SPDX-License-Identifier: GPL-2.0+ - */ - -#include -#include - -flash_info_t flash_info[CONFIG_SYS_MAX_FLASH_BANKS]; /* info for FLASH chips */ - -/* - * Functions - */ -static int write_word(flash_info_t *info, ulong dest, ulong data); - -void flash_print_info(flash_info_t *info) -{ - int i; - int k; - int size; - int erased; - volatile unsigned long *flash; - - if (info->flash_id == FLASH_UNKNOWN) { - printf ("missing or unknown FLASH type\n"); - return; - } - - switch (info->flash_id & FLASH_VENDMASK) { - case FLASH_MAN_AMD: printf ("AMD "); break; - case FLASH_MAN_FUJ: printf ("FUJITSU "); break; - case FLASH_MAN_SST: printf ("SST "); break; - case FLASH_MAN_STM: printf ("ST "); break; - case FLASH_MAN_EXCEL: printf ("Excel Semiconductor "); break; - default: printf ("Unknown Vendor "); break; - } - - switch (info->flash_id & FLASH_TYPEMASK) { - case FLASH_AM400B: printf ("AM29LV400B (4 Mbit, bottom boot sect)\n"); - break; - case FLASH_AM400T: printf ("AM29LV400T (4 Mbit, top boot sector)\n"); - break; - case FLASH_AM800B: printf ("AM29LV800B (8 Mbit, bottom boot sect)\n"); - break; - case FLASH_AM800T: printf ("AM29LV800T (8 Mbit, top boot sector)\n"); - break; - case FLASH_AM160B: printf ("AM29LV160B (16 Mbit, bottom boot sect)\n"); - break; - case FLASH_AM160T: printf ("AM29LV160T (16 Mbit, top boot sector)\n"); - break; - case FLASH_AM320T: printf ("AM29LV320T (32 M, top sector)\n"); - break; - case FLASH_AM320B: printf ("AM29LV320B (32 M, bottom sector)\n"); - break; - case FLASH_AMDL322T: printf ("AM29DL322T (32 M, top sector)\n"); - break; - case FLASH_AMDL322B: printf ("AM29DL322B (32 M, bottom sector)\n"); - break; - case FLASH_AMDL323T: printf ("AM29DL323T (32 M, top sector)\n"); - break; - case FLASH_AMDL323B: printf ("AM29DL323B (32 M, bottom sector)\n"); - break; - case FLASH_SST020: printf ("SST39LF/VF020 (2 Mbit, uniform sector size)\n"); - break; - case FLASH_SST040: printf ("SST39LF/VF040 (4 Mbit, uniform sector size)\n"); - break; - default: printf ("Unknown Chip Type\n"); - break; - } - - printf (" Size: %ld MB in %d Sectors\n", - info->size >> 20, info->sector_count); - - printf (" Sector Start Addresses:"); - for (i=0; isector_count; ++i) { -#ifdef CONFIG_SYS_FLASH_EMPTY_INFO - /* - * Check if whole sector is erased - */ - if (i != (info->sector_count-1)) - size = info->start[i+1] - info->start[i]; - else - size = info->start[0] + info->size - info->start[i]; - erased = 1; - flash = (volatile unsigned long *)info->start[i]; - size = size >> 2; /* divide by 4 for longword access */ - for (k=0; kstart[i], - erased ? " E" : " ", - info->protect[i] ? "RO " : " "); -#else - if ((i % 5) == 0) - printf ("\n "); - printf (" %08lX%s", - info->start[i], - info->protect[i] ? " (RO)" : " "); -#endif - - } - printf ("\n"); - return; -} - -/* - * The following code cannot be run from FLASH! - */ -static ulong flash_get_size(vu_long *addr, flash_info_t *info) -{ - short i; - short n; - CONFIG_SYS_FLASH_WORD_SIZE value; - ulong base = (ulong)addr; - volatile CONFIG_SYS_FLASH_WORD_SIZE *addr2 = (CONFIG_SYS_FLASH_WORD_SIZE *)addr; - - /* Write auto select command: read Manufacturer ID */ - addr2[CONFIG_SYS_FLASH_ADDR0] = (CONFIG_SYS_FLASH_WORD_SIZE)0x00AA00AA; - addr2[CONFIG_SYS_FLASH_ADDR1] = (CONFIG_SYS_FLASH_WORD_SIZE)0x00550055; - addr2[CONFIG_SYS_FLASH_ADDR0] = (CONFIG_SYS_FLASH_WORD_SIZE)0x00900090; - - value = addr2[CONFIG_SYS_FLASH_READ0]; - - switch (value) { - case (CONFIG_SYS_FLASH_WORD_SIZE)AMD_MANUFACT: - info->flash_id = FLASH_MAN_AMD; - break; - case (CONFIG_SYS_FLASH_WORD_SIZE)FUJ_MANUFACT: - info->flash_id = FLASH_MAN_FUJ; - break; - case (CONFIG_SYS_FLASH_WORD_SIZE)SST_MANUFACT: - info->flash_id = FLASH_MAN_SST; - break; - case (CONFIG_SYS_FLASH_WORD_SIZE)STM_MANUFACT: - info->flash_id = FLASH_MAN_STM; - break; - case (CONFIG_SYS_FLASH_WORD_SIZE)EXCEL_MANUFACT: - info->flash_id = FLASH_MAN_EXCEL; - break; - default: - info->flash_id = FLASH_UNKNOWN; - info->sector_count = 0; - info->size = 0; - return (0); /* no or unknown flash */ - } - - value = addr2[CONFIG_SYS_FLASH_READ1]; /* device ID */ - - switch (value) { - case (CONFIG_SYS_FLASH_WORD_SIZE)AMD_ID_LV400T: - info->flash_id += FLASH_AM400T; - info->sector_count = 11; - info->size = 0x00080000; - break; /* => 0.5 MB */ - - case (CONFIG_SYS_FLASH_WORD_SIZE)AMD_ID_LV400B: - info->flash_id += FLASH_AM400B; - info->sector_count = 11; - info->size = 0x00080000; - break; /* => 0.5 MB */ - - case (CONFIG_SYS_FLASH_WORD_SIZE)AMD_ID_LV800T: - info->flash_id += FLASH_AM800T; - info->sector_count = 19; - info->size = 0x00100000; - break; /* => 1 MB */ - - case (CONFIG_SYS_FLASH_WORD_SIZE)AMD_ID_LV800B: - info->flash_id += FLASH_AM800B; - info->sector_count = 19; - info->size = 0x00100000; - break; /* => 1 MB */ - - case (CONFIG_SYS_FLASH_WORD_SIZE)AMD_ID_LV160T: - info->flash_id += FLASH_AM160T; - info->sector_count = 35; - info->size = 0x00200000; - break; /* => 2 MB */ - - case (CONFIG_SYS_FLASH_WORD_SIZE)AMD_ID_LV160B: - info->flash_id += FLASH_AM160B; - info->sector_count = 35; - info->size = 0x00200000; - break; /* => 2 MB */ - - case (CONFIG_SYS_FLASH_WORD_SIZE)AMD_ID_LV320T: - info->flash_id += FLASH_AM320T; - info->sector_count = 71; - info->size = 0x00400000; break; /* => 4 MB */ - - case (CONFIG_SYS_FLASH_WORD_SIZE)AMD_ID_LV320B: - info->flash_id += FLASH_AM320B; - info->sector_count = 71; - info->size = 0x00400000; break; /* => 4 MB */ - - case (CONFIG_SYS_FLASH_WORD_SIZE)AMD_ID_DL322T: - info->flash_id += FLASH_AMDL322T; - info->sector_count = 71; - info->size = 0x00400000; break; /* => 4 MB */ - - case (CONFIG_SYS_FLASH_WORD_SIZE)AMD_ID_DL322B: - info->flash_id += FLASH_AMDL322B; - info->sector_count = 71; - info->size = 0x00400000; break; /* => 4 MB */ - - case (CONFIG_SYS_FLASH_WORD_SIZE)AMD_ID_DL323T: - info->flash_id += FLASH_AMDL323T; - info->sector_count = 71; - info->size = 0x00400000; break; /* => 4 MB */ - - case (CONFIG_SYS_FLASH_WORD_SIZE)AMD_ID_DL323B: - info->flash_id += FLASH_AMDL323B; - info->sector_count = 71; - info->size = 0x00400000; break; /* => 4 MB */ - - case (CONFIG_SYS_FLASH_WORD_SIZE)SST_ID_xF020: - info->flash_id += FLASH_SST020; - info->sector_count = 64; - info->size = 0x00040000; - break; /* => 256 kB */ - - case (CONFIG_SYS_FLASH_WORD_SIZE)SST_ID_xF040: - info->flash_id += FLASH_SST040; - info->sector_count = 128; - info->size = 0x00080000; - break; /* => 512 kB */ - - default: - info->flash_id = FLASH_UNKNOWN; - return (0); /* => no or unknown flash */ - - } - - /* set up sector start address table */ - if ((info->flash_id & FLASH_VENDMASK) == FLASH_MAN_SST) { - for (i = 0; i < info->sector_count; i++) - info->start[i] = base + (i * 0x00001000); - } else if (((info->flash_id & FLASH_TYPEMASK) == FLASH_AMDL322B) || - ((info->flash_id & FLASH_TYPEMASK) == FLASH_AMDL323B) || - ((info->flash_id & FLASH_TYPEMASK) == FLASH_AM320B) || - ((info->flash_id & FLASH_TYPEMASK) == FLASH_AMDL324B)) { - /* set sector offsets for bottom boot block type */ - for (i=0; i<8; ++i) { /* 8 x 8k boot sectors */ - info->start[i] = base; - base += 8 << 10; - } - while (i < info->sector_count) { /* 64k regular sectors */ - info->start[i] = base; - base += 64 << 10; - ++i; - } - } else if (((info->flash_id & FLASH_TYPEMASK) == FLASH_AMDL322T) || - ((info->flash_id & FLASH_TYPEMASK) == FLASH_AMDL323T) || - ((info->flash_id & FLASH_TYPEMASK) == FLASH_AM320T) || - ((info->flash_id & FLASH_TYPEMASK) == FLASH_AMDL324T)) { - /* set sector offsets for top boot block type */ - base += info->size; - i = info->sector_count; - for (n=0; n<8; ++n) { /* 8 x 8k boot sectors */ - base -= 8 << 10; - --i; - info->start[i] = base; - } - while (i > 0) { /* 64k regular sectors */ - base -= 64 << 10; - --i; - info->start[i] = base; - } - } else { - if (info->flash_id & FLASH_BTYPE) { - /* set sector offsets for bottom boot block type */ - info->start[0] = base + 0x00000000; - info->start[1] = base + 0x00004000; - info->start[2] = base + 0x00006000; - info->start[3] = base + 0x00008000; - for (i = 4; i < info->sector_count; i++) { - info->start[i] = base + (i * 0x00010000) - 0x00030000; - } - } else { - /* set sector offsets for top boot block type */ - i = info->sector_count - 1; - info->start[i--] = base + info->size - 0x00004000; - info->start[i--] = base + info->size - 0x00006000; - info->start[i--] = base + info->size - 0x00008000; - for (; i >= 0; i--) { - info->start[i] = base + i * 0x00010000; - } - } - } - - /* check for protected sectors */ - for (i = 0; i < info->sector_count; i++) { - /* read sector protection at sector address, (A7 .. A0) = 0x02 */ - /* D0 = 1 if protected */ - addr2 = (volatile CONFIG_SYS_FLASH_WORD_SIZE *)(info->start[i]); - if ((info->flash_id & FLASH_VENDMASK) != FLASH_MAN_AMD) - info->protect[i] = 0; - else - info->protect[i] = addr2[CONFIG_SYS_FLASH_READ2] & 1; - } - - /* - * Prevent writes to uninitialized FLASH. - */ - if (info->flash_id != FLASH_UNKNOWN) { - addr2 = (CONFIG_SYS_FLASH_WORD_SIZE *)info->start[0]; - *addr2 = (CONFIG_SYS_FLASH_WORD_SIZE)0x00F000F0; /* reset bank */ - } - - return (info->size); -} - - -int flash_erase(flash_info_t *info, int s_first, int s_last) -{ - volatile CONFIG_SYS_FLASH_WORD_SIZE *addr = (CONFIG_SYS_FLASH_WORD_SIZE *)(info->start[0]); - volatile CONFIG_SYS_FLASH_WORD_SIZE *addr2; - int flag, prot, sect, l_sect; - ulong start, now, last; - - if ((s_first < 0) || (s_first > s_last)) { - if (info->flash_id == FLASH_UNKNOWN) - printf ("- missing\n"); - else - printf ("- no sectors to erase\n"); - return 1; - } - - if (info->flash_id == FLASH_UNKNOWN) { - printf ("Can't erase unknown flash type - aborted\n"); - return 1; - } - - prot = 0; - for (sect=s_first; sect<=s_last; ++sect) - if (info->protect[sect]) - prot++; - - if (prot) - printf ("- Warning: %d protected sectors will not be erased!\n", prot); - else - printf ("\n"); - - l_sect = -1; - - /* Disable interrupts which might cause a timeout here */ - flag = disable_interrupts(); - - /* Start erase on unprotected sectors */ - for (sect = s_first; sect<=s_last; sect++) { - if (info->protect[sect] == 0) { /* not protected */ - addr2 = (CONFIG_SYS_FLASH_WORD_SIZE *)(info->start[sect]); - if ((info->flash_id & FLASH_VENDMASK) == FLASH_MAN_SST) { - addr[CONFIG_SYS_FLASH_ADDR0] = (CONFIG_SYS_FLASH_WORD_SIZE)0x00AA00AA; - addr[CONFIG_SYS_FLASH_ADDR1] = (CONFIG_SYS_FLASH_WORD_SIZE)0x00550055; - addr[CONFIG_SYS_FLASH_ADDR0] = (CONFIG_SYS_FLASH_WORD_SIZE)0x00800080; - addr[CONFIG_SYS_FLASH_ADDR0] = (CONFIG_SYS_FLASH_WORD_SIZE)0x00AA00AA; - addr[CONFIG_SYS_FLASH_ADDR1] = (CONFIG_SYS_FLASH_WORD_SIZE)0x00550055; - addr2[0] = (CONFIG_SYS_FLASH_WORD_SIZE)0x00300030; /* sector erase */ - - /* re-enable interrupts if necessary */ - if (flag) { - enable_interrupts(); - flag = 0; - } - - /* data polling for D7 */ - start = get_timer (0); - while ((addr2[0] & (CONFIG_SYS_FLASH_WORD_SIZE)0x00800080) != - (CONFIG_SYS_FLASH_WORD_SIZE)0x00800080) { - if (get_timer(start) > CONFIG_SYS_FLASH_WRITE_TOUT) - return (1); - } - } else { - if (sect == s_first) { - addr[CONFIG_SYS_FLASH_ADDR0] = (CONFIG_SYS_FLASH_WORD_SIZE)0x00AA00AA; - addr[CONFIG_SYS_FLASH_ADDR1] = (CONFIG_SYS_FLASH_WORD_SIZE)0x00550055; - addr[CONFIG_SYS_FLASH_ADDR0] = (CONFIG_SYS_FLASH_WORD_SIZE)0x00800080; - addr[CONFIG_SYS_FLASH_ADDR0] = (CONFIG_SYS_FLASH_WORD_SIZE)0x00AA00AA; - addr[CONFIG_SYS_FLASH_ADDR1] = (CONFIG_SYS_FLASH_WORD_SIZE)0x00550055; - } - addr2[0] = (CONFIG_SYS_FLASH_WORD_SIZE)0x00300030; /* sector erase */ - } - l_sect = sect; - } - } - - /* re-enable interrupts if necessary */ - if (flag) - enable_interrupts(); - - /* wait at least 80us - let's wait 1 ms */ - udelay (1000); - - /* - * We wait for the last triggered sector - */ - if (l_sect < 0) - goto DONE; - - start = get_timer (0); - last = start; - addr = (CONFIG_SYS_FLASH_WORD_SIZE *)(info->start[l_sect]); - while ((addr[0] & (CONFIG_SYS_FLASH_WORD_SIZE)0x00800080) != (CONFIG_SYS_FLASH_WORD_SIZE)0x00800080) { - if ((now = get_timer(start)) > CONFIG_SYS_FLASH_ERASE_TOUT) { - printf ("Timeout\n"); - return 1; - } - /* show that we're waiting */ - if ((now - last) > 1000) { /* every second */ - putc ('.'); - last = now; - } - } - -DONE: - /* reset to read mode */ - addr = (CONFIG_SYS_FLASH_WORD_SIZE *)info->start[0]; - addr[0] = (CONFIG_SYS_FLASH_WORD_SIZE)0x00F000F0; /* reset bank */ - - printf (" done\n"); - return 0; -} - -/* - * Copy memory to flash, returns: - * 0 - OK - * 1 - write timeout - * 2 - Flash not erased - */ -int write_buff(flash_info_t *info, uchar *src, ulong addr, ulong cnt) -{ - ulong cp, wp, data; - int i, l, rc; - - wp = (addr & ~3); /* get lower word aligned address */ - - /* - * handle unaligned start bytes - */ - if ((l = addr - wp) != 0) { - data = 0; - for (i=0, cp=wp; i0; ++i) { - data = (data << 8) | *src++; - --cnt; - ++cp; - } - for (; cnt==0 && i<4; ++i, ++cp) { - data = (data << 8) | (*(uchar *)cp); - } - - if ((rc = write_word(info, wp, data)) != 0) { - return (rc); - } - wp += 4; - } - - /* - * handle word aligned part - */ - while (cnt >= 4) { - data = 0; - for (i=0; i<4; ++i) - data = (data << 8) | *src++; - if ((rc = write_word(info, wp, data)) != 0) - return (rc); - wp += 4; - cnt -= 4; - } - - if (cnt == 0) - return (0); - - /* - * handle unaligned tail bytes - */ - data = 0; - for (i=0, cp=wp; i<4 && cnt>0; ++i, ++cp) { - data = (data << 8) | *src++; - --cnt; - } - for (; i<4; ++i, ++cp) - data = (data << 8) | (*(uchar *)cp); - - return (write_word(info, wp, data)); -} - -/* - * Write a word to Flash, returns: - * 0 - OK - * 1 - write timeout - * 2 - Flash not erased - */ -static int write_word(flash_info_t *info, ulong dest, ulong data) -{ - volatile CONFIG_SYS_FLASH_WORD_SIZE *addr2 = (CONFIG_SYS_FLASH_WORD_SIZE *)(info->start[0]); - volatile CONFIG_SYS_FLASH_WORD_SIZE *dest2 = (CONFIG_SYS_FLASH_WORD_SIZE *)dest; - volatile CONFIG_SYS_FLASH_WORD_SIZE *data2 = (CONFIG_SYS_FLASH_WORD_SIZE *)&data; - ulong start; - int flag; - int i; - - /* Check if Flash is (sufficiently) erased */ - if ((*((vu_long *)dest) & data) != data) - return (2); - - /* Disable interrupts which might cause a timeout here */ - flag = disable_interrupts(); - - for (i=0; i<4/sizeof(CONFIG_SYS_FLASH_WORD_SIZE); i++) { - addr2[CONFIG_SYS_FLASH_ADDR0] = (CONFIG_SYS_FLASH_WORD_SIZE)0x00AA00AA; - addr2[CONFIG_SYS_FLASH_ADDR1] = (CONFIG_SYS_FLASH_WORD_SIZE)0x00550055; - addr2[CONFIG_SYS_FLASH_ADDR0] = (CONFIG_SYS_FLASH_WORD_SIZE)0x00A000A0; - - dest2[i] = data2[i]; - - /* re-enable interrupts if necessary */ - if (flag) - enable_interrupts(); - - /* data polling for D7 */ - start = get_timer (0); - while ((dest2[i] & (CONFIG_SYS_FLASH_WORD_SIZE)0x00800080) != - (data2[i] & (CONFIG_SYS_FLASH_WORD_SIZE)0x00800080)) { - if (get_timer(start) > CONFIG_SYS_FLASH_WRITE_TOUT) - return (1); - } - } - - return (0); -} diff --git a/board/prodrive/common/fpga.c b/board/prodrive/common/fpga.c deleted file mode 100644 index 9dce131376d..00000000000 --- a/board/prodrive/common/fpga.c +++ /dev/null @@ -1,167 +0,0 @@ -/* - * (C) Copyright 2006 - * Stefan Roese, DENX Software Engineering, sr@denx.de. - * - * (C) Copyright 2001-2004 - * Matthias Fuchs, esd gmbh germany, matthias.fuchs@esd-electronics.com - * Stefan Roese, esd gmbh germany, stefan.roese@esd-electronics.com - * - * SPDX-License-Identifier: GPL-2.0+ - */ - -#include -#include -#include - -/* ------------------------------------------------------------------------- */ - -#ifdef FPGA_DEBUG -#define DBG(x...) printf(x) -#else -#define DBG(x...) -#endif /* DEBUG */ - -#define FPGA_PRG CONFIG_SYS_FPGA_PRG /* FPGA program pin (cpu output)*/ -#define FPGA_CLK CONFIG_SYS_FPGA_CLK /* FPGA clk pin (cpu output) */ -#define FPGA_DATA CONFIG_SYS_FPGA_DATA /* FPGA data pin (cpu output) */ -#define FPGA_DONE CONFIG_SYS_FPGA_DONE /* FPGA done pin (cpu input) */ -#define FPGA_INIT CONFIG_SYS_FPGA_INIT /* FPGA init pin (cpu input) */ - -#define ERROR_FPGA_PRG_INIT_LOW -1 /* Timeout after PRG* asserted */ -#define ERROR_FPGA_PRG_INIT_HIGH -2 /* Timeout after PRG* deasserted */ -#define ERROR_FPGA_PRG_DONE -3 /* Timeout after programming */ - -#ifndef OLD_VAL -# define OLD_VAL 0 -#endif - -#if 0 /* test-only */ -#define FPGA_WRITE_1 { \ - SET_FPGA(OLD_VAL | FPGA_PRG | 0 | FPGA_DATA); /* set clock to 0 */ \ - SET_FPGA(OLD_VAL | FPGA_PRG | 0 | FPGA_DATA); /* set data to 1 */ \ - SET_FPGA(OLD_VAL | FPGA_PRG | FPGA_CLK | FPGA_DATA); /* set clock to 1 */ \ - SET_FPGA(OLD_VAL | FPGA_PRG | FPGA_CLK | FPGA_DATA);} /* set data to 1 */ - -#define FPGA_WRITE_0 { \ - SET_FPGA(OLD_VAL | FPGA_PRG | 0 | FPGA_DATA); /* set clock to 0 */ \ - SET_FPGA(OLD_VAL | FPGA_PRG | 0 | 0 ); /* set data to 0 */ \ - SET_FPGA(OLD_VAL | FPGA_PRG | FPGA_CLK | 0 ); /* set clock to 1 */ \ - SET_FPGA(OLD_VAL | FPGA_PRG | FPGA_CLK | FPGA_DATA);} /* set data to 1 */ -#else -#define FPGA_WRITE_1 { \ - SET_FPGA(OLD_VAL | FPGA_PRG | 0 | FPGA_DATA); /* set data to 1 */ \ - SET_FPGA(OLD_VAL | FPGA_PRG | FPGA_CLK | FPGA_DATA);} /* set data to 1 */ - -#define FPGA_WRITE_0 { \ - SET_FPGA(OLD_VAL | FPGA_PRG | 0 | 0 ); /* set data to 0 */ \ - SET_FPGA(OLD_VAL | FPGA_PRG | FPGA_CLK | 0 );} /* set data to 1 */ -#endif - -static int fpga_boot(unsigned char *fpgadata, int size) -{ - int i,index,len; - int count; - int j; - - /* display infos on fpgaimage */ - index = 15; - for (i=0; i<4; i++) { - len = fpgadata[index]; - DBG("FPGA: %s\n", &(fpgadata[index+1])); - index += len+3; - } - - /* search for preamble 0xFFFFFFFF */ - while (1) { - if ((fpgadata[index] == 0xff) && (fpgadata[index+1] == 0xff) && - (fpgadata[index+2] == 0xff) && (fpgadata[index+3] == 0xff)) - break; /* preamble found */ - else - index++; - } - - DBG("FPGA: configdata starts at position 0x%x\n",index); - DBG("FPGA: length of fpga-data %d\n", size-index); - - /* - * Setup port pins for fpga programming - */ - SET_FPGA(FPGA_PRG | FPGA_CLK | FPGA_DATA); /* set pins to high */ - - DBG("%s, ",(FPGA_DONE_STATE == 0) ? "NOT DONE" : "DONE" ); - DBG("%s\n",(FPGA_INIT_STATE == 0) ? "NOT INIT" : "INIT" ); - - /* - * Init fpga by asserting and deasserting PROGRAM* - */ - SET_FPGA(0 | FPGA_CLK | FPGA_DATA); /* set prog active */ - - /* Wait for FPGA init line low */ - count = 0; - while (FPGA_INIT_STATE) { - udelay(1000); /* wait 1ms */ - /* Check for timeout - 100us max, so use 3ms */ - if (count++ > 3) { - DBG("FPGA: Booting failed!\n"); - return ERROR_FPGA_PRG_INIT_LOW; - } - } - - DBG("%s, ",(FPGA_DONE_STATE == 0) ? "NOT DONE" : "DONE" ); - DBG("%s\n",(FPGA_INIT_STATE == 0) ? "NOT INIT" : "INIT" ); - - /* deassert PROGRAM* */ - SET_FPGA(FPGA_PRG | FPGA_CLK | FPGA_DATA); /* set prog inactive */ - - /* Wait for FPGA end of init period . */ - count = 0; - while (!(FPGA_INIT_STATE)) { - udelay(1000); /* wait 1ms */ - /* Check for timeout */ - if (count++ > 3) { - DBG("FPGA: Booting failed!\n"); - return ERROR_FPGA_PRG_INIT_HIGH; - } - } - - DBG("%s, ",(FPGA_DONE_STATE == 0) ? "NOT DONE" : "DONE" ); - DBG("%s\n",(FPGA_INIT_STATE == 0) ? "NOT INIT" : "INIT" ); - - DBG("write configuration data into fpga\n"); - /* write configuration-data into fpga... */ - - /* - * Load uncompressed image into fpga - */ - for (i=index; i 3) { - DBG("FPGA: Booting failed!\n"); - return ERROR_FPGA_PRG_DONE; - } - } - - DBG("FPGA: Booting successful!\n"); - return 0; -} -- cgit v1.2.3 From a839ce064b957f908293b44e0117f7b4219acaf7 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Mon, 31 Mar 2014 13:14:12 +0900 Subject: board: dave: delete unused source files Signed-off-by: Masahiro Yamada Cc: Andrea Marson --- board/dave/PPChameleonEVB/fpgadata.c | 2277 ---------------------------------- board/dave/common/fpga.c | 240 ---- board/dave/common/pci.c | 186 --- 3 files changed, 2703 deletions(-) delete mode 100644 board/dave/PPChameleonEVB/fpgadata.c delete mode 100644 board/dave/common/fpga.c delete mode 100644 board/dave/common/pci.c (limited to 'board') diff --git a/board/dave/PPChameleonEVB/fpgadata.c b/board/dave/PPChameleonEVB/fpgadata.c deleted file mode 100644 index a1b230ac2e7..00000000000 --- a/board/dave/PPChameleonEVB/fpgadata.c +++ /dev/null @@ -1,2277 +0,0 @@ -0x1f, 0x8b, 0x08, 0x08, 0x80, 0xb0, 0xc0, 0x3e, -0x00, 0x03, 0x61, 0x73, 0x68, 0x34, 0x30, 0x35, -0x5f, 0x31, 0x5f, 0x30, 0x30, 0x2e, 0x62, 0x69, -0x74, 0x00, 0x94, 0x9b, 0x7f, 0x70, 0x14, 0x65, -0x9a, 0xc7, 0x9f, 0xe9, 0xee, 0x24, 0x9d, 0x99, -0x4e, 0xa6, 0x0d, 0x84, 0x42, 0xe5, 0x47, 0xe7, -0xc7, 0xba, 0xa3, 0x37, 0x0c, 0x63, 0x82, 0x9a, -0x05, 0x32, 0x69, 0x03, 0x7f, 0xe4, 0x84, 0x2d, -0xd9, 0xbd, 0xba, 0xaa, 0xdb, 0x5a, 0x6b, 0x1d, -0x5d, 0xbc, 0xe2, 0xb6, 0xd0, 0xca, 0xea, 0x55, -0x1d, 0x67, 0x6d, 0xdd, 0xbd, 0x24, 0x39, 0x08, -0x07, 0x2b, 0x01, 0xb9, 0x23, 0xee, 0x51, 0x5c, -0xf3, 0x63, 0xcb, 0xa8, 0xa9, 0xad, 0x11, 0x76, -0x0d, 0x0a, 0xa5, 0x4d, 0x2e, 0x8b, 0x21, 0x44, -0xc8, 0xb1, 0xd6, 0x6e, 0x44, 0x97, 0x1d, 0x34, -0xab, 0x23, 0x72, 0x18, 0xd1, 0x92, 0x44, 0x20, -0xb9, 0xf7, 0xed, 0xee, 0xf7, 0xed, 0x9f, 0x33, -0xc9, 0x8e, 0x7f, 0xf8, 0xe4, 0x9d, 0xd7, 0xf6, -0x7d, 0x9e, 0x79, 0xfb, 0x79, 0x3e, 0xfd, 0x7d, -0xde, 0x86, 0xd2, 0xe8, 0xb8, 0xf9, 0x0f, 0x40, -0xe8, 0x31, 0x90, 0x1f, 0x7b, 0x66, 0xc3, 0xb2, -0xe4, 0x7d, 0x8f, 0xde, 0xfb, 0x68, 0x32, 0x99, -0x78, 0xea, 0xc7, 0xeb, 0xe1, 0x71, 0x88, 0xd4, -0x3d, 0x73, 0x5f, 0xf2, 0x89, 0x7f, 0xfc, 0xe9, -0xbd, 0xcb, 0x96, 0xc1, 0x8f, 0xf1, 0x5f, 0xc9, -0x64, 0xfd, 0xd2, 0xe4, 0x7d, 0x4b, 0xef, 0xad, -0x87, 0xf5, 0x50, 0x7a, 0x6f, 0x72, 0xf9, 0xb2, -0x65, 0xcb, 0x97, 0x35, 0xc0, 0x13, 0x10, 0xaa, -0x3f, 0x3c, 0x8d, 0x3f, 0x2f, 0xbf, 0xf0, 0xb7, -0x7f, 0x9f, 0x04, 0x14, 0x02, 0x80, 0x92, 0x64, -0x28, 0x4d, 0xfe, 0x1d, 0x49, 0x86, 0x94, 0x10, -0xa0, 0xa6, 0x25, 0x49, 0xd0, 0xc9, 0xdf, 0x60, -0x7d, 0x5f, 0x9a, 0x04, 0xc5, 0xf9, 0x77, 0x28, -0x09, 0x2a, 0xac, 0x03, 0x75, 0x07, 0x54, 0x24, -0x61, 0xe6, 0x8f, 0x2a, 0x20, 0x6a, 0xfe, 0x85, -0xf3, 0xa7, 0x87, 0x50, 0xde, 0x59, 0xf6, 0xa7, -0xe9, 0x9a, 0x46, 0x4d, 0x6e, 0x16, 0xd7, 0x0f, -0xa9, 0xc0, 0xae, 0x7f, 0x61, 0x56, 0xd7, 0xff, -0x9a, 0x5e, 0xff, 0x2f, 0x9d, 0x0f, 0x15, 0xb3, -0x98, 0x0e, 0x20, 0xb0, 0xf5, 0x58, 0xf3, 0x11, -0xc4, 0x20, 0x0c, 0x1c, 0x02, 0x0d, 0x14, 0x6c, -0x78, 0xaf, 0x3f, 0x40, 0xad, 0x93, 0x45, 0x53, -0x70, 0x03, 0x35, 0x65, 0xa3, 0xa3, 0xfc, 0x3c, -0x38, 0x87, 0x9a, 0x40, 0x9a, 0xe0, 0x53, 0x30, -0x4d, 0x46, 0x8e, 0xf1, 0x57, 0x4d, 0x63, 0x82, -0x1f, 0x87, 0x56, 0x6b, 0x7e, 0xff, 0xfc, 0x5f, -0xc1, 0x71, 0x94, 0xc8, 0x46, 0xba, 0x9a, 0x13, -0xdc, 0x76, 0x94, 0x80, 0xb2, 0x4c, 0x38, 0x61, -0x8e, 0x1c, 0xe3, 0xae, 0x52, 0x23, 0x2b, 0xd0, -0x28, 0x0e, 0x0a, 0x3b, 0xe0, 0x28, 0xc4, 0xf5, -0x88, 0x1c, 0xae, 0x85, 0x76, 0x88, 0x83, 0x98, -0xe4, 0x24, 0x73, 0x24, 0xc9, 0x0d, 0x53, 0xa3, -0x1f, 0x2f, 0xd2, 0xfc, 0xe8, 0xd0, 0x0b, 0xc7, -0x21, 0xa1, 0x47, 0xba, 0xfb, 0x13, 0xb0, 0x1d, -0x12, 0x70, 0x7b, 0x92, 0x8b, 0x9b, 0x23, 0x19, -0xee, 0x0a, 0x35, 0xc6, 0x05, 0xba, 0x9e, 0xef, -0x55, 0x5e, 0x81, 0x1b, 0x90, 0xd2, 0xa3, 0xfb, -0xf8, 0xa5, 0xca, 0x19, 0x58, 0x19, 0x93, 0x32, -0x35, 0x71, 0x73, 0x24, 0xc3, 0x5f, 0xa1, 0xc6, -0xc8, 0x6a, 0x3a, 0x5f, 0x0b, 0x9d, 0x80, 0x69, -0x68, 0xd2, 0xa3, 0x23, 0xfc, 0x4d, 0x62, 0x24, -0xa3, 0xe3, 0xa6, 0xa1, 0x3b, 0x8d, 0x1c, 0xa4, -0xe9, 0x7a, 0xe4, 0x5e, 0x7a, 0xfd, 0x8d, 0xf0, -0x19, 0xa4, 0xa0, 0xdc, 0x71, 0x59, 0x66, 0x8c, -0x0b, 0x74, 0xfd, 0xa3, 0x45, 0x71, 0xd9, 0x5c, -0xff, 0x3d, 0x12, 0xbc, 0x8f, 0xd7, 0xdf, 0xf9, -0x1b, 0x7b, 0xd9, 0xcc, 0xb8, 0x86, 0x77, 0xbf, -0x75, 0x7d, 0x61, 0xad, 0x19, 0x04, 0xc4, 0x7d, -0xb7, 0xe3, 0x10, 0x17, 0xd7, 0xee, 0x74, 0x84, -0x85, 0x19, 0x13, 0xf8, 0x5e, 0x31, 0x3f, 0xe3, -0xf0, 0x23, 0xe8, 0x43, 0x4b, 0xb2, 0x91, 0x1f, -0x84, 0x53, 0xf2, 0x5e, 0xb4, 0xf4, 0xc3, 0xd2, -0x4d, 0xdc, 0x45, 0x73, 0x04, 0x1b, 0xc8, 0x32, -0x46, 0xd9, 0xf5, 0x5b, 0xc4, 0xb5, 0xf0, 0x25, -0x5a, 0xa9, 0x47, 0x77, 0xf1, 0x6b, 0x95, 0x8f, -0x60, 0x25, 0x8a, 0x26, 0xf9, 0x61, 0xf8, 0x12, -0xf0, 0x48, 0x03, 0x7f, 0x16, 0x61, 0x23, 0x8b, -0x47, 0xce, 0x73, 0x74, 0x3f, 0xa8, 0x0b, 0x7b, -0xcd, 0x20, 0x7c, 0x61, 0x44, 0xa3, 0x51, 0x2f, -0x67, 0x61, 0xf9, 0x82, 0xbf, 0xa2, 0x5a, 0xf1, -0x19, 0x29, 0xa6, 0xf1, 0x11, 0x8b, 0x7a, 0xa5, -0x1b, 0x02, 0x0e, 0x02, 0x8a, 0xc4, 0xe1, 0x0c, -0x8e, 0x8f, 0xe4, 0x89, 0xcf, 0xca, 0x2c, 0x1e, -0x19, 0x62, 0xbf, 0xef, 0xe0, 0xed, 0xfb, 0xa0, -0x0f, 0x96, 0xe8, 0x91, 0x75, 0xdc, 0x02, 0xd8, -0x8a, 0x0d, 0xb1, 0x95, 0xfb, 0xc0, 0x1c, 0xa1, -0x06, 0x1e, 0xb9, 0xc6, 0xe2, 0xa9, 0xc0, 0x7e, -0xa1, 0x0f, 0x3d, 0x99, 0x8d, 0xfc, 0x1d, 0xb7, -0xbc, 0x7a, 0x2b, 0x8a, 0x6b, 0x2e, 0x7f, 0x0d, -0x43, 0xdc, 0xc4, 0xe9, 0xec, 0xfa, 0x1b, 0xe8, -0x7e, 0xcb, 0xe0, 0x6d, 0xd6, 0x0e, 0x92, 0x7e, -0xb7, 0x2f, 0x9e, 0x78, 0x07, 0x9e, 0x67, 0xd7, -0xcf, 0x56, 0xe6, 0xe0, 0x1b, 0x48, 0xa1, 0x68, -0x96, 0x5f, 0x21, 0x0c, 0x71, 0x4d, 0x07, 0xcb, -0x34, 0xde, 0x1a, 0x31, 0x0c, 0x21, 0x85, 0xff, -0x9f, 0xfc, 0x84, 0x40, 0xfd, 0x6d, 0x09, 0x69, -0xa1, 0x09, 0xec, 0x66, 0x14, 0xf1, 0x97, 0x14, -0x6c, 0xc8, 0xe5, 0x88, 0xcf, 0x82, 0x35, 0xc2, -0x8c, 0xf3, 0x40, 0xf7, 0xbf, 0x28, 0x1f, 0x86, -0x49, 0x48, 0xa9, 0xd1, 0x2e, 0xfe, 0x09, 0x38, -0x0d, 0x2b, 0x55, 0xa9, 0x8b, 0xaf, 0xa5, 0x23, -0x63, 0xd4, 0xe8, 0x67, 0xf7, 0x0b, 0x12, 0xd6, -0xc3, 0xeb, 0x90, 0x50, 0x23, 0xbb, 0xda, 0x8a, -0xdb, 0x4a, 0x21, 0xb1, 0x21, 0xb6, 0x8f, 0xab, -0x35, 0x47, 0xba, 0xb8, 0x31, 0x6a, 0x64, 0x41, -0xb6, 0xe6, 0x37, 0x14, 0xb1, 0x6f, 0xd7, 0xc3, -0x36, 0x48, 0xb4, 0x88, 0xf3, 0x9c, 0xf3, 0x6f, -0x37, 0x8d, 0x53, 0x6c, 0x3f, 0xc4, 0xe6, 0x0a, -0xf0, 0x2a, 0xc4, 0xd5, 0x88, 0xcc, 0x09, 0xe2, -0x66, 0x88, 0x3f, 0x34, 0x1f, 0x1b, 0x74, 0x64, -0x80, 0x1a, 0xfd, 0x21, 0xba, 0x1f, 0x36, 0x95, -0xa5, 0xa9, 0x53, 0x69, 0x18, 0x84, 0x94, 0x28, -0xa1, 0x88, 0xe2, 0xf3, 0xf7, 0x22, 0x4f, 0xf7, -0x67, 0x77, 0xa5, 0xe9, 0xd4, 0xc3, 0x4f, 0xb7, -0x7f, 0x80, 0x8d, 0xa6, 0x87, 0xa2, 0xbb, 0xdb, -0xc7, 0x7c, 0xfe, 0x7e, 0x5c, 0x4c, 0xef, 0xc7, -0xf9, 0x45, 0xd6, 0xe0, 0x3a, 0x7e, 0x0f, 0x8e, -0x4f, 0x53, 0x4b, 0xf9, 0x3a, 0xde, 0x35, 0xbf, -0x89, 0x18, 0xa7, 0x58, 0xfe, 0x69, 0x98, 0x9f, -0x85, 0x63, 0xf8, 0xb6, 0x8a, 0xb4, 0xb5, 0x29, -0x30, 0x2a, 0x24, 0xe6, 0x85, 0xdb, 0x38, 0x6b, -0x04, 0xd9, 0xc6, 0x59, 0x16, 0xcf, 0x16, 0xe8, -0x30, 0x9d, 0xda, 0x1d, 0xee, 0x80, 0xcd, 0x5c, -0x62, 0x30, 0x2c, 0xb7, 0x61, 0x37, 0x05, 0xe2, -0x66, 0x05, 0xf3, 0xf7, 0x7c, 0x88, 0x5e, 0xbf, -0x5b, 0x38, 0x6c, 0x46, 0x6f, 0x37, 0x0e, 0xe3, -0x0b, 0xd8, 0x08, 0x3b, 0xc2, 0xce, 0x8c, 0x8f, -0xd9, 0x7e, 0xd0, 0x0c, 0x7f, 0x13, 0x6a, 0x74, -0x01, 0xdf, 0x81, 0xd7, 0x9f, 0x4a, 0x97, 0x77, -0xf1, 0x7e, 0x7f, 0x73, 0x2c, 0x5f, 0x0d, 0x86, -0xac, 0xfd, 0xd0, 0xcd, 0x8f, 0x55, 0x63, 0x63, -0xc3, 0xd2, 0xa0, 0xf9, 0xdf, 0xb0, 0xfc, 0x23, -0xca, 0x1a, 0x09, 0x3b, 0x44, 0xb7, 0xf0, 0x9a, -0x38, 0x28, 0x18, 0xd1, 0xd6, 0x7c, 0xf1, 0x1f, -0x62, 0xfb, 0x39, 0x56, 0x14, 0x83, 0x37, 0x20, -0x81, 0x22, 0x63, 0xdc, 0xeb, 0xf0, 0x32, 0x2c, -0xe9, 0xe2, 0x3f, 0xe4, 0x62, 0x22, 0x19, 0xd9, -0xae, 0x71, 0x39, 0xf3, 0x2b, 0x8d, 0x1b, 0xb2, -0xf7, 0x83, 0xb0, 0x56, 0xa8, 0x11, 0xf0, 0xdd, -0x51, 0xcb, 0x89, 0xd0, 0x2e, 0xc4, 0xcf, 0xe3, -0xdb, 0x64, 0x87, 0xeb, 0x7e, 0x39, 0x89, 0x8d, -0x21, 0xb6, 0xdf, 0x90, 0xfc, 0x88, 0x79, 0xb7, -0x66, 0xe7, 0x65, 0x62, 0x2f, 0xc2, 0x12, 0x15, -0xdf, 0x86, 0x0b, 0xd8, 0xfd, 0x2b, 0x3f, 0xc0, -0x19, 0x46, 0x8e, 0xcd, 0xef, 0xec, 0xfc, 0x11, -0x7c, 0x82, 0x1a, 0xb3, 0xd1, 0x0d, 0xdf, 0xae, -0x80, 0xb7, 0xdb, 0x1a, 0xb5, 0xe8, 0x06, 0x7e, -0x3f, 0x5c, 0x47, 0x0b, 0xb3, 0xd1, 0x4d, 0xfc, -0x45, 0xf8, 0xa7, 0x8e, 0x46, 0x62, 0x5c, 0xae, -0xa6, 0xf3, 0xc5, 0x4a, 0x9c, 0x6f, 0x43, 0x38, -0x7b, 0x68, 0xd8, 0xbb, 0x1b, 0xf0, 0x2f, 0x10, -0xfd, 0xb5, 0x37, 0xdf, 0x2e, 0xce, 0xf0, 0xfd, -0x6d, 0x34, 0x3e, 0x20, 0xbc, 0xa9, 0x4e, 0xa3, -0xd4, 0x58, 0x34, 0x17, 0x99, 0x07, 0x67, 0x3a, -0x9a, 0xc6, 0xe2, 0x37, 0xad, 0xfa, 0xb5, 0x73, -0x82, 0x9f, 0x82, 0xe9, 0xb6, 0xa6, 0x4b, 0xb8, -0x7e, 0xe9, 0x1a, 0x8d, 0xff, 0xcb, 0xf3, 0xf7, -0xc1, 0x75, 0x58, 0x92, 0x8b, 0xa4, 0x39, 0xb9, -0x65, 0x6b, 0xe6, 0xdb, 0xab, 0xc5, 0x71, 0x7b, -0xfd, 0x17, 0xd5, 0xbe, 0x8a, 0x38, 0x31, 0x2e, -0xb3, 0xdf, 0x17, 0x60, 0x5f, 0x08, 0x7f, 0x3b, -0x78, 0x67, 0x2b, 0xd7, 0x4a, 0xf2, 0xd5, 0x40, -0x77, 0xda, 0xe1, 0xaf, 0x68, 0x19, 0x76, 0xfe, -0x51, 0x84, 0x1d, 0xa5, 0x35, 0x46, 0xf4, 0xda, -0x1e, 0x44, 0x3c, 0xd4, 0x7e, 0x3f, 0x46, 0x12, -0xd1, 0xd1, 0xd0, 0x46, 0x23, 0x9e, 0x45, 0x56, -0x60, 0x07, 0xd9, 0xfe, 0xec, 0xa9, 0x24, 0x45, -0x01, 0x7b, 0x27, 0xf2, 0x0f, 0x92, 0xfc, 0x99, -0x5e, 0x90, 0xf9, 0x2b, 0x7f, 0xfd, 0xb2, 0xd7, -0x83, 0x42, 0xbd, 0x82, 0x31, 0x78, 0x60, 0xce, -0x21, 0x6c, 0x2c, 0x4a, 0x47, 0x83, 0xea, 0x51, -0x96, 0xdd, 0x2f, 0x55, 0xb2, 0x55, 0xef, 0xb2, -0x7c, 0x12, 0xce, 0xe1, 0x7c, 0x2e, 0x65, 0xf9, -0x95, 0xac, 0xde, 0x85, 0x2c, 0x43, 0x5f, 0x4d, -0xd7, 0x7f, 0x40, 0xd8, 0x68, 0x16, 0x29, 0x8d, -0xab, 0x41, 0xaf, 0x40, 0xe2, 0xf1, 0x58, 0x26, -0xec, 0xaf, 0xbf, 0xd9, 0x07, 0xd9, 0x7e, 0x28, -0x8a, 0xc3, 0x2b, 0x64, 0xb0, 0x93, 0xab, 0x26, -0xf5, 0x3a, 0x1b, 0xeb, 0x36, 0xea, 0xf5, 0x3d, -0xee, 0xf9, 0x6c, 0xbf, 0x89, 0x73, 0x25, 0x78, -0x5e, 0x8e, 0x0f, 0x46, 0xb4, 0x62, 0x80, 0x43, -0x62, 0x5c, 0x15, 0x65, 0x9b, 0x07, 0xde, 0xd1, -0x28, 0x0f, 0xb0, 0xfc, 0x03, 0x65, 0x1b, 0x43, -0xb8, 0xec, 0x0e, 0x62, 0xa7, 0x14, 0x38, 0xa3, -0xa4, 0xc8, 0xfa, 0x49, 0x7c, 0x96, 0xeb, 0xe7, -0x7e, 0xc3, 0xff, 0x1f, 0xc2, 0xa1, 0x7b, 0x17, -0x7f, 0xa5, 0xb3, 0xfc, 0x73, 0xb0, 0xf2, 0xa6, -0x3c, 0xad, 0x34, 0x0d, 0x44, 0x5a, 0x31, 0xb4, -0x4c, 0x93, 0xec, 0xc1, 0xea, 0xd7, 0x35, 0x1c, -0x1f, 0x5a, 0xdf, 0x59, 0xfe, 0xd1, 0xcb, 0x18, -0xe4, 0x5c, 0x80, 0x3f, 0x75, 0x19, 0x06, 0xde, -0x36, 0x28, 0x75, 0xe9, 0x39, 0xcb, 0x70, 0xf3, -0x0f, 0x02, 0x06, 0x39, 0x39, 0x91, 0xf8, 0xeb, -0xc4, 0x9e, 0x00, 0xfe, 0x11, 0x8b, 0x58, 0xf5, -0xc9, 0xc1, 0xf3, 0x8a, 0xbb, 0xac, 0xb3, 0xfb, -0xab, 0x9f, 0xe5, 0x1f, 0xfd, 0xb6, 0x5e, 0x1a, -0xb4, 0xcb, 0x24, 0x9e, 0xae, 0x30, 0x3a, 0xf8, -0x87, 0xed, 0xcf, 0xb9, 0xbd, 0xf4, 0x47, 0x1f, -0xc2, 0xbc, 0xe1, 0xd8, 0x06, 0x4e, 0x50, 0xd1, -0x59, 0x7e, 0xb8, 0x04, 0x27, 0x68, 0x10, 0x26, -0xb8, 0x69, 0x58, 0xaa, 0x07, 0xf2, 0xcf, 0x84, -0x4a, 0xe7, 0x33, 0xfe, 0xc9, 0xe0, 0x6a, 0xf8, -0xbe, 0x67, 0x9b, 0x05, 0xf0, 0xcf, 0xa0, 0xc0, -0x76, 0x4b, 0x4e, 0x7c, 0xdf, 0xbf, 0x7e, 0xce, -0xe2, 0x1f, 0xfa, 0xf9, 0xb0, 0x68, 0x2d, 0x8d, -0x86, 0x0e, 0xcf, 0x43, 0x40, 0x7c, 0xdc, 0xfc, -0xf3, 0x58, 0x68, 0x11, 0xad, 0xfe, 0xdf, 0xc0, -0x5e, 0xc3, 0x28, 0x36, 0x30, 0x20, 0x17, 0x71, -0x80, 0x81, 0x83, 0x7f, 0xa0, 0x1c, 0xbe, 0xcc, -0x18, 0x90, 0x73, 0x12, 0x7e, 0x47, 0x40, 0xc8, -0xe2, 0x9f, 0x1c, 0x35, 0x3c, 0xfc, 0x53, 0x69, -0xc7, 0x07, 0xa6, 0x65, 0x16, 0x96, 0xd4, 0x00, -0x21, 0x22, 0xcc, 0x3f, 0x29, 0x02, 0x42, 0x36, -0xff, 0xf4, 0x54, 0x9e, 0xc5, 0xb7, 0xad, 0x01, -0x39, 0xd9, 0xfc, 0xf1, 0xb9, 0x6c, 0xe7, 0xff, -0xdb, 0xf6, 0xc1, 0xdb, 0x26, 0xe4, 0x8c, 0x1a, -0xfc, 0x13, 0xf1, 0xf1, 0x4f, 0x84, 0xf0, 0x0f, -0xbd, 0xbe, 0x0e, 0xfb, 0x61, 0xab, 0x09, 0x39, -0xd7, 0x2c, 0x7f, 0xbd, 0xfc, 0x83, 0x8d, 0x71, -0x96, 0x7f, 0x5a, 0x30, 0x4f, 0xb6, 0x9b, 0x90, -0x33, 0x8c, 0xb6, 0xdb, 0x61, 0x94, 0x5c, 0xf1, -0xb4, 0xf9, 0x24, 0x57, 0xd4, 0x53, 0x31, 0x04, -0x06, 0xe4, 0xbc, 0x07, 0x17, 0x38, 0x8a, 0x3d, -0xe0, 0x36, 0xec, 0x7a, 0xd4, 0xa2, 0x66, 0x21, -0xe7, 0xa9, 0x3e, 0xd4, 0x28, 0x09, 0xe2, 0x1f, -0x30, 0x8b, 0x5a, 0x84, 0x54, 0xb7, 0xd3, 0x70, -0xbf, 0xb3, 0xcc, 0xd5, 0x5b, 0xa8, 0xd0, 0x35, -0xa7, 0x1f, 0x7c, 0xfc, 0x43, 0xaa, 0xed, 0x4b, -0x50, 0xed, 0x2c, 0xbb, 0x15, 0x36, 0xff, 0xc8, -0x34, 0xff, 0xcc, 0x9f, 0x6b, 0xd3, 0x0e, 0xb7, -0x0d, 0xee, 0x72, 0x95, 0x69, 0x66, 0x9c, 0x12, -0xe8, 0xef, 0x2b, 0x0a, 0x8c, 0x76, 0xc6, 0x60, -0x33, 0xfe, 0xbd, 0x9d, 0xd8, 0x63, 0xf3, 0x0f, -0xdb, 0x9f, 0xc7, 0x44, 0xca, 0x3f, 0xf5, 0x59, -0x5c, 0x88, 0xef, 0x77, 0x3b, 0x2e, 0x5a, 0xc6, -0x59, 0x8e, 0xae, 0xa7, 0xbb, 0x8c, 0xf1, 0xde, -0xbb, 0xda, 0x64, 0xcc, 0x5d, 0xd6, 0x03, 0xf8, -0xa7, 0xbb, 0xe8, 0x2b, 0x0a, 0x39, 0x7f, 0xe6, -0x4e, 0xc3, 0x11, 0xf7, 0x7c, 0x71, 0x92, 0x4b, -0x79, 0xf8, 0x07, 0x1c, 0xb4, 0xd3, 0x09, 0x07, -0x61, 0x0d, 0x2a, 0xc8, 0x3f, 0x62, 0xe5, 0x80, -0xf0, 0x2a, 0x47, 0xfd, 0x8d, 0x29, 0x5e, 0x7f, -0x43, 0x16, 0xef, 0x31, 0x1e, 0xab, 0x3c, 0xcc, -0xa2, 0xa7, 0x6c, 0x73, 0xc6, 0xbf, 0xd4, 0x15, -0x4f, 0xba, 0x1f, 0x0e, 0x56, 0x92, 0x41, 0xb2, -0xc8, 0x92, 0xdf, 0xc2, 0x49, 0xa8, 0x0b, 0xf6, -0x37, 0xd7, 0x41, 0xaf, 0xdf, 0x03, 0x34, 0x3e, -0x35, 0xfe, 0x69, 0xcc, 0xb8, 0x8c, 0xe8, 0xfd, -0x1b, 0x93, 0x4d, 0xda, 0x91, 0x30, 0x6f, 0xc3, -0x44, 0x28, 0x05, 0x3b, 0x83, 0x78, 0x7b, 0xa8, -0x83, 0xee, 0x7f, 0x45, 0x30, 0xf9, 0x27, 0x46, -0x68, 0xe7, 0x4d, 0x93, 0x76, 0x30, 0xf6, 0x70, -0xa6, 0x31, 0xdf, 0xe2, 0x9f, 0x41, 0x9b, 0x7f, -0xac, 0xfc, 0x23, 0x06, 0xa5, 0x1d, 0x66, 0x0c, -0xb1, 0xfc, 0x53, 0x15, 0x32, 0xaa, 0x7f, 0x56, -0x6c, 0xad, 0xc0, 0x77, 0x6b, 0x32, 0xcf, 0xfd, -0x3b, 0xa8, 0xb2, 0xeb, 0xc3, 0x22, 0x4c, 0x3b, -0x8d, 0x59, 0x89, 0xd0, 0xce, 0x75, 0xad, 0xd1, -0xc4, 0x1e, 0x32, 0xe2, 0x34, 0x86, 0x58, 0xfe, -0x31, 0xf8, 0x87, 0x3c, 0x9d, 0xe1, 0xec, 0xa1, -0x98, 0xd9, 0x23, 0xe4, 0xcf, 0x27, 0xfd, 0x2c, -0xff, 0xa8, 0x95, 0x53, 0xaa, 0x55, 0xbf, 0xa6, -0xd2, 0xe7, 0xd0, 0x0a, 0x5a, 0xbf, 0xf0, 0xc8, -0xeb, 0xf8, 0xf9, 0xfd, 0x86, 0xf9, 0xd5, 0x08, -0xdb, 0x3f, 0x3d, 0x38, 0xff, 0x18, 0x4e, 0xb5, -0x72, 0x37, 0xe1, 0x77, 0x98, 0x67, 0xec, 0x65, -0xb3, 0x7c, 0xe2, 0xe4, 0x9f, 0x17, 0x60, 0x1f, -0x85, 0x9c, 0x0f, 0x42, 0xee, 0x7c, 0xf5, 0xb4, -0xc1, 0x3f, 0x4f, 0x9e, 0xc4, 0x23, 0x59, 0x96, -0x7f, 0xd2, 0x02, 0x0b, 0xda, 0x39, 0x35, 0x6f, -0x3e, 0x1f, 0x65, 0xfb, 0xb3, 0xa1, 0xa8, 0x57, -0xb4, 0x9c, 0xba, 0xa5, 0x9e, 0x83, 0x67, 0x83, -0xf3, 0xe7, 0x90, 0x60, 0xd7, 0x5f, 0x3a, 0xb8, -0xca, 0x8f, 0x85, 0x0e, 0xfe, 0xa1, 0xeb, 0xd9, -0x0c, 0x8e, 0xea, 0xf6, 0x27, 0x77, 0x99, 0xab, -0x71, 0xf0, 0x0f, 0x5d, 0xcf, 0x49, 0xca, 0x3f, -0x99, 0xea, 0x2b, 0x26, 0xd8, 0x04, 0xd6, 0x5f, -0x9b, 0x7f, 0x2a, 0xe9, 0x7c, 0x8c, 0xcd, 0x79, -0xeb, 0xb5, 0x83, 0x7f, 0x84, 0x32, 0x38, 0x2a, -0x5b, 0xd1, 0x38, 0x84, 0x0d, 0xfa, 0xbc, 0x3f, -0x82, 0x89, 0x71, 0x58, 0x39, 0xaa, 0xc4, 0x47, -0xd7, 0x38, 0xf9, 0x47, 0x2f, 0x7d, 0x92, 0xc4, -0x67, 0x00, 0x3b, 0x75, 0xc2, 0x55, 0x5f, 0x46, -0x0c, 0x03, 0xf3, 0xcf, 0x05, 0x17, 0xff, 0x68, -0x0b, 0xb1, 0x77, 0x4a, 0xd3, 0xa0, 0xe9, 0xa6, -0xd2, 0xe4, 0xad, 0xef, 0x6a, 0xca, 0xc3, 0x3f, -0x45, 0x53, 0x94, 0x7f, 0xbe, 0x16, 0xc7, 0xd1, -0x7d, 0x9a, 0x34, 0x42, 0xf5, 0x1f, 0x22, 0x04, -0x9d, 0xf3, 0xea, 0x3f, 0xba, 0x6c, 0x41, 0x4e, -0x92, 0xfb, 0x18, 0x3a, 0x95, 0x7b, 0x50, 0x67, -0xb6, 0x22, 0x4e, 0xb1, 0xe7, 0x57, 0xb0, 0xdd, -0xa7, 0xff, 0xd8, 0xfc, 0x33, 0x86, 0x93, 0xe9, -0x5d, 0xa8, 0x34, 0x79, 0x87, 0xe4, 0x7c, 0x42, -0xf7, 0xea, 0x3f, 0x95, 0x8c, 0x7f, 0x3e, 0x81, -0x4e, 0x54, 0xad, 0x95, 0xf6, 0xd8, 0xfc, 0xd9, -0x4b, 0x23, 0x6c, 0xeb, 0x3f, 0x3a, 0xd5, 0x7f, -0x32, 0x7f, 0x73, 0x0e, 0xc6, 0xf5, 0xfb, 0xb3, -0x65, 0xdd, 0xed, 0x8c, 0x9f, 0x0d, 0x45, 0x22, -0x8f, 0xfe, 0x33, 0xde, 0x7c, 0x13, 0x6f, 0x8d, -0x26, 0x3d, 0xe1, 0x8c, 0x0f, 0x97, 0x5f, 0xff, -0xc9, 0xe0, 0xc7, 0xf6, 0x41, 0x75, 0xb9, 0x26, -0xa5, 0x22, 0x7e, 0x3e, 0x77, 0xf0, 0x4f, 0xc8, -0x5c, 0x6d, 0xf9, 0x09, 0xfc, 0xfc, 0xd8, 0xa9, -0x28, 0x7b, 0x36, 0x1c, 0xb3, 0xf5, 0xab, 0x61, -0xbf, 0xfe, 0x93, 0xa5, 0xfc, 0xf3, 0x00, 0x7e, -0x0c, 0x47, 0x10, 0x43, 0xe2, 0x32, 0x8e, 0x29, -0x18, 0x01, 0xfc, 0x93, 0xc5, 0xfc, 0xf3, 0x00, -0xbe, 0x49, 0xc3, 0x9b, 0x9e, 0x7e, 0x40, 0xed, -0x38, 0x50, 0x73, 0xb8, 0x65, 0x82, 0xdb, 0x6f, -0xdc, 0xb6, 0x7c, 0x20, 0xff, 0x3c, 0x24, 0x4a, -0xa6, 0xda, 0x93, 0xe4, 0x05, 0xd0, 0xb5, 0x06, -0x41, 0xaa, 0xe3, 0x77, 0xd0, 0x91, 0xb3, 0xd4, -0x70, 0xf0, 0x4f, 0xd9, 0x09, 0xec, 0x94, 0x11, -0x84, 0x77, 0xe1, 0xa6, 0xdc, 0x24, 0x44, 0x5b, -0xf9, 0x9f, 0x99, 0xb2, 0x4f, 0xc6, 0x0e, 0x94, -0xcd, 0x3f, 0x2f, 0x17, 0x59, 0x41, 0x38, 0x16, -0x11, 0xa0, 0x1a, 0x8e, 0xe8, 0xf1, 0xd7, 0x22, -0x09, 0x1a, 0xf6, 0xb3, 0xd4, 0x70, 0xe8, 0x3f, -0xbb, 0x8c, 0xe7, 0x29, 0x92, 0x46, 0xe6, 0xc2, -0xef, 0xa1, 0x46, 0x17, 0xc7, 0xdb, 0x56, 0xc2, -0x1f, 0x68, 0x62, 0xd9, 0x4a, 0xf9, 0x87, 0xce, -0x47, 0xb0, 0x9f, 0x3a, 0xf5, 0x7d, 0x65, 0xef, -0xb6, 0xaa, 0x2a, 0x0c, 0x42, 0x8b, 0x0c, 0x22, -0x32, 0xf2, 0x95, 0x65, 0xd8, 0xcf, 0x5f, 0x2d, -0x73, 0x69, 0xd0, 0x9a, 0x57, 0xc3, 0xee, 0x74, -0x35, 0x32, 0xf4, 0x46, 0x96, 0x88, 0xac, 0xfd, -0xe6, 0xd4, 0x7f, 0x7a, 0x28, 0xe4, 0xfc, 0x40, -0xf8, 0x7d, 0x73, 0xfd, 0x9e, 0x05, 0x63, 0x7c, -0x0c, 0x86, 0x2c, 0xfe, 0xe1, 0x2c, 0xc3, 0xa1, -0xff, 0x80, 0x55, 0x74, 0x3a, 0xf8, 0x03, 0x44, -0xff, 0x81, 0x47, 0x3b, 0xda, 0x0b, 0xeb, 0x3f, -0x63, 0xf0, 0x29, 0xad, 0x6e, 0x9f, 0xd6, 0xd4, -0xb5, 0x0e, 0xef, 0x5a, 0x5e, 0x2b, 0xce, 0x42, -0xff, 0xd9, 0xd3, 0x36, 0x26, 0x6c, 0x53, 0xaa, -0x5b, 0x36, 0xec, 0x8b, 0xac, 0x2f, 0xa0, 0xff, -0xcc, 0xa7, 0xfa, 0x4f, 0x77, 0xf1, 0x98, 0xf8, -0x0a, 0xae, 0xd7, 0x2d, 0x72, 0xf3, 0x61, 0x3f, -0xff, 0x38, 0xf2, 0x0f, 0xe5, 0x9f, 0xe6, 0xe1, -0xd0, 0x36, 0x50, 0x54, 0xb1, 0xae, 0x6d, 0x00, -0x76, 0xe5, 0xd5, 0x7f, 0x1a, 0xca, 0xd2, 0x98, -0xf7, 0x12, 0x10, 0x05, 0x9e, 0x80, 0x5f, 0x1d, -0x48, 0x6d, 0x35, 0x7e, 0xfd, 0xc1, 0xd6, 0x7f, -0x46, 0x17, 0x5a, 0x4e, 0xed, 0x6e, 0xff, 0x0a, -0x6e, 0xc5, 0xde, 0x7a, 0x28, 0x7a, 0xbe, 0x7d, -0xbd, 0x36, 0x0b, 0xfd, 0x67, 0x17, 0xde, 0x6f, -0xef, 0x40, 0xbd, 0x2e, 0x9d, 0x6f, 0x67, 0xfa, -0xd8, 0x57, 0xd4, 0xb0, 0xf9, 0x67, 0x93, 0x6c, -0x41, 0x0e, 0xe0, 0xb2, 0x8e, 0xef, 0x2f, 0xf1, -0x9e, 0x2d, 0x61, 0x05, 0x15, 0xe0, 0x9f, 0x22, -0xcb, 0xa9, 0x0a, 0xc2, 0x3f, 0xa2, 0xd6, 0x2c, -0xca, 0x6d, 0x82, 0xe2, 0xe5, 0x3d, 0x5b, 0xff, -0x99, 0x7f, 0xdb, 0x61, 0x07, 0x4f, 0xaa, 0xca, -0xea, 0xb0, 0xdc, 0xec, 0xd7, 0xdf, 0xbc, 0xfa, -0x8f, 0xb5, 0xc8, 0xd3, 0xea, 0x91, 0xa7, 0x03, -0xf5, 0x3d, 0x5b, 0xff, 0xc9, 0x51, 0xfd, 0x27, -0xc3, 0x8f, 0xa1, 0x49, 0x31, 0xd5, 0x1c, 0xfd, -0x45, 0x41, 0xfd, 0x87, 0xf2, 0x0f, 0x0e, 0xb2, -0x82, 0xf3, 0x4f, 0x4a, 0x8e, 0x13, 0x63, 0x16, -0xfa, 0xcf, 0x2f, 0x9b, 0xbf, 0x03, 0x53, 0xb0, -0x74, 0x77, 0x4f, 0x36, 0x1c, 0xa3, 0xb2, 0x4f, -0x90, 0xfe, 0x43, 0xf3, 0x4f, 0x03, 0x17, 0x49, -0x6f, 0x23, 0x20, 0xd4, 0x10, 0xa0, 0xcf, 0xdb, -0xfa, 0x8f, 0x66, 0xf0, 0xcf, 0x93, 0x7a, 0x64, -0x23, 0xb7, 0x12, 0xfa, 0xc4, 0x25, 0x80, 0xf3, -0xd5, 0x02, 0xdd, 0xcb, 0x3f, 0xb6, 0xfe, 0xd3, -0x23, 0x9a, 0xfc, 0x13, 0xfd, 0x87, 0xc8, 0x1d, -0xf0, 0x5b, 0xd4, 0x78, 0x69, 0xed, 0x86, 0x55, -0x8b, 0x74, 0x2f, 0xff, 0x38, 0xf4, 0x9f, 0x85, -0x56, 0xbe, 0x3d, 0x18, 0xca, 0x09, 0x37, 0x30, -0xef, 0x2d, 0xc5, 0x69, 0x16, 0xe5, 0xe7, 0x1f, -0xf8, 0xb7, 0x29, 0xf8, 0x57, 0x52, 0xa4, 0x72, -0xf8, 0xa6, 0x7b, 0xa7, 0xab, 0xfe, 0x70, 0x74, -0xb2, 0x86, 0x95, 0x2d, 0x86, 0x46, 0xb6, 0xfe, -0x43, 0xf8, 0xa7, 0x4f, 0xc3, 0x8b, 0x4c, 0x57, -0x8c, 0x70, 0x3b, 0xa1, 0x4a, 0x5a, 0xf3, 0x25, -0xb7, 0x80, 0xe6, 0x9f, 0xb3, 0xa8, 0x0f, 0xbe, -0x63, 0xe8, 0x3f, 0x2c, 0xfe, 0x00, 0x78, 0xbe, -0x82, 0xbf, 0x55, 0xb9, 0xff, 0x85, 0x2d, 0xa1, -0xaa, 0x93, 0x3f, 0x54, 0xdb, 0x1e, 0xf1, 0x3d, -0xb8, 0x39, 0xf4, 0x1f, 0x9a, 0x7f, 0x80, 0xd3, -0xe5, 0x36, 0x55, 0x51, 0x7e, 0xb8, 0x92, 0x5b, -0xeb, 0x7c, 0xb0, 0x8d, 0x79, 0xf5, 0x1f, 0xcb, -0x5f, 0x8d, 0xd7, 0xb9, 0xc1, 0x75, 0x75, 0xe9, -0x48, 0x27, 0xff, 0x33, 0x23, 0x6d, 0x2e, 0xce, -0xcc, 0x09, 0x78, 0x7e, 0xc4, 0xfc, 0x63, 0xf2, -0x92, 0x8e, 0x79, 0xf8, 0x1b, 0x35, 0x25, 0x44, -0xb9, 0x39, 0xbd, 0xbe, 0x7a, 0x94, 0x65, 0xeb, -0x0f, 0xc9, 0x56, 0xd2, 0xce, 0xcd, 0x19, 0x87, -0x0f, 0x60, 0x85, 0x2e, 0xe9, 0x0e, 0xfd, 0x07, -0xa6, 0x05, 0x8f, 0xfe, 0x83, 0x28, 0xff, 0x74, -0x54, 0x7c, 0x04, 0xe7, 0x1f, 0xac, 0x56, 0xd6, -0xfe, 0xbc, 0x39, 0x40, 0xff, 0x51, 0x19, 0xff, -0x90, 0x7a, 0x47, 0x1e, 0xea, 0x7f, 0x59, 0xfc, -0xa1, 0xd2, 0x2d, 0xc6, 0x3a, 0xc4, 0x0e, 0xab, -0xde, 0x85, 0xf3, 0xf0, 0x0f, 0xde, 0x5d, 0xca, -0x46, 0x23, 0x3e, 0xf0, 0x0b, 0x55, 0x81, 0x6d, -0x60, 0xe6, 0x67, 0x22, 0x83, 0x0c, 0xa7, 0x8f, -0xc2, 0x46, 0x9f, 0xfe, 0x03, 0xc7, 0x63, 0xa4, -0xbf, 0xc0, 0x67, 0x85, 0x0b, 0xea, 0x72, 0x7d, -0x01, 0xe2, 0x17, 0x30, 0x7f, 0xe9, 0xc6, 0xd0, -0x4b, 0x9c, 0xfc, 0x43, 0xea, 0xd7, 0xc3, 0x3a, -0x86, 0x96, 0x29, 0x68, 0x82, 0x72, 0xdd, 0x2e, -0x5b, 0x57, 0x90, 0x5f, 0xff, 0xb1, 0xf9, 0x67, -0xaa, 0x85, 0x18, 0xe5, 0x13, 0xfc, 0x4d, 0x64, -0xc9, 0x3e, 0xec, 0x2b, 0x87, 0xfe, 0x23, 0x7f, -0x4c, 0x69, 0xe7, 0x0a, 0x3a, 0x8e, 0xee, 0x22, -0xc6, 0xf4, 0xec, 0xf4, 0x9f, 0x61, 0x44, 0x8c, -0x30, 0x36, 0x54, 0x5f, 0xff, 0xcb, 0xd6, 0x7f, -0xf0, 0xf3, 0x97, 0x23, 0xda, 0x77, 0xcd, 0xa4, -0xff, 0xa8, 0x95, 0x57, 0x55, 0xd7, 0xaf, 0x1f, -0xd8, 0x9f, 0x1a, 0x61, 0xfb, 0x27, 0x1b, 0x7a, -0xcd, 0xa7, 0xf6, 0x04, 0xe8, 0x3f, 0x41, 0xfc, -0xe3, 0xbf, 0x6c, 0x10, 0xff, 0xe0, 0x7a, 0xe4, -0x5d, 0xed, 0xcd, 0x02, 0xfd, 0xaf, 0x6c, 0xd1, -0xea, 0xfc, 0x8f, 0x5d, 0x01, 0xfc, 0x93, 0x0e, -0xcd, 0xf3, 0xa9, 0x1f, 0x7e, 0xc3, 0xd9, 0xff, -0x12, 0x28, 0xe4, 0x0c, 0xbb, 0x8c, 0x6c, 0x34, -0x59, 0x33, 0x1c, 0xc0, 0x3f, 0x0b, 0x7f, 0x4d, -0xd4, 0x1e, 0xbd, 0x04, 0xd3, 0x8e, 0x6a, 0x81, -0xd0, 0x4d, 0xd5, 0x21, 0x04, 0x79, 0xf8, 0xa7, -0x07, 0xd7, 0x2f, 0x6f, 0x34, 0xa6, 0xf4, 0x33, -0x5e, 0xfd, 0x87, 0xed, 0x9f, 0xc1, 0xdb, 0xf6, -0xf8, 0x9e, 0x16, 0x87, 0x15, 0x6f, 0x3e, 0x71, -0xea, 0x3f, 0xff, 0x19, 0xe0, 0xe6, 0x56, 0xcf, -0x88, 0x43, 0xff, 0x99, 0x3b, 0x10, 0x10, 0xc6, -0x76, 0xcf, 0xc8, 0x79, 0xb6, 0x3f, 0x73, 0x36, -0xff, 0xd8, 0xb2, 0x0f, 0xc5, 0x1e, 0x5b, 0xff, -0xf1, 0xf3, 0x4f, 0xd0, 0x63, 0x78, 0x1e, 0xfe, -0xb1, 0xd5, 0x0c, 0xcb, 0x10, 0x26, 0x43, 0x33, -0xf2, 0x4f, 0x90, 0x8c, 0x53, 0x88, 0x7f, 0x0a, -0xce, 0x0f, 0xe2, 0x1f, 0x87, 0x0c, 0xa2, 0xe5, -0xef, 0x7f, 0x35, 0xd8, 0xfd, 0x2f, 0xdb, 0x4d, -0xe4, 0x1d, 0x39, 0x6b, 0xf7, 0xbf, 0xca, 0x28, -0xb4, 0xcc, 0x19, 0xd3, 0xde, 0xcb, 0xa7, 0x6f, -0x04, 0xf0, 0x4f, 0x17, 0xff, 0x67, 0xc3, 0xd8, -0x19, 0x34, 0xff, 0x14, 0xbb, 0x7f, 0x1b, 0x64, -0x06, 0x39, 0xba, 0x85, 0x3d, 0xcd, 0x97, 0xd4, -0x59, 0xf0, 0x4f, 0x90, 0xcc, 0xe5, 0xf0, 0x37, -0x48, 0xff, 0x29, 0x14, 0x4f, 0xba, 0x1f, 0xb4, -0xca, 0xf5, 0xf9, 0x65, 0x1c, 0xd3, 0x58, 0x8c, -0xf9, 0xc7, 0xd6, 0x1f, 0x42, 0x87, 0x67, 0x9a, -0x4f, 0xf4, 0x9f, 0x20, 0xfe, 0xc9, 0x9a, 0x8d, -0x30, 0x62, 0x8c, 0x7a, 0xf9, 0x87, 0xed, 0x7f, -0xc6, 0x3f, 0x84, 0x76, 0xfe, 0x1d, 0x1b, 0x51, -0x6a, 0xcc, 0xc0, 0x3f, 0xc9, 0x62, 0xc7, 0x6d, -0xe2, 0x15, 0x2e, 0x86, 0x04, 0x56, 0x5f, 0x42, -0x76, 0xb7, 0x08, 0x59, 0xb7, 0xed, 0x59, 0x1f, -0x0f, 0xe4, 0xd8, 0xf5, 0x09, 0xff, 0xf4, 0x59, -0xb4, 0xa3, 0xbc, 0x4d, 0xb1, 0xe7, 0x0f, 0x5e, -0xfe, 0xb1, 0xf5, 0x9f, 0x85, 0x76, 0xbe, 0xed, -0x37, 0xf3, 0xb9, 0x57, 0xe8, 0x70, 0xf3, 0x8f, -0x59, 0xbf, 0xc6, 0x8c, 0x6a, 0x75, 0xae, 0xcd, -0x90, 0x7d, 0x58, 0xd9, 0xba, 0xca, 0xf8, 0xc7, -0xa5, 0xff, 0xf4, 0x91, 0xfe, 0x17, 0xd1, 0x7f, -0xb6, 0x12, 0x10, 0x7a, 0xd6, 0x5e, 0xf6, 0x45, -0x6a, 0xb8, 0xfa, 0x5f, 0x76, 0xbe, 0xda, 0xaa, -0x98, 0xb2, 0x0f, 0x1b, 0x41, 0xf9, 0xf9, 0x27, -0x28, 0xed, 0x30, 0x23, 0x80, 0x7f, 0x70, 0xbe, -0xe5, 0xbc, 0x69, 0x33, 0xa8, 0xff, 0x05, 0x57, -0xac, 0x7a, 0xb7, 0x8a, 0x14, 0xfa, 0x44, 0xc0, -0xfc, 0x9d, 0x84, 0x7f, 0xe8, 0xf5, 0x09, 0xff, -0x9c, 0x33, 0x92, 0xf6, 0x1c, 0xbb, 0xcc, 0xc9, -0xc4, 0x58, 0x8c, 0x0d, 0xd1, 0xa7, 0xff, 0x6c, -0x16, 0xd6, 0xba, 0x65, 0x9f, 0x35, 0x81, 0x7a, -0x8e, 0xcd, 0x3f, 0x45, 0x71, 0x26, 0xfb, 0x08, -0xde, 0x69, 0xd4, 0x68, 0x76, 0xf2, 0x4f, 0x1c, -0x0e, 0x59, 0xd1, 0x10, 0x8e, 0x8a, 0x76, 0x58, -0x06, 0x18, 0x21, 0xac, 0xf1, 0xf2, 0x0f, 0x0e, -0xcb, 0x69, 0xe3, 0xe9, 0xdb, 0x70, 0xf3, 0x88, -0xa5, 0xff, 0x44, 0xb0, 0xbf, 0x1a, 0xe5, 0x1f, -0x9e, 0x4e, 0x37, 0xf4, 0x1f, 0xa2, 0x17, 0x91, -0x6a, 0x75, 0x23, 0x44, 0x8e, 0x6d, 0xd4, 0x50, -0xc7, 0xed, 0x08, 0xe4, 0x4a, 0x02, 0xf8, 0xe7, -0x26, 0xd9, 0x8d, 0x8a, 0xe4, 0x68, 0x7b, 0x05, -0xf5, 0xbf, 0x64, 0x06, 0x39, 0x53, 0xc4, 0x50, -0x62, 0x81, 0xfd, 0x2f, 0x08, 0xe2, 0x1f, 0x62, -0x00, 0x7e, 0xbe, 0xf0, 0xef, 0x07, 0x27, 0xff, -0xb8, 0x69, 0x53, 0x15, 0x8f, 0xcd, 0xb6, 0xff, -0x65, 0x9c, 0x36, 0xf1, 0x9d, 0x3f, 0xc9, 0xdf, -0xff, 0x32, 0xa2, 0x51, 0x31, 0xfb, 0xfe, 0xd7, -0x15, 0x74, 0x06, 0xd5, 0xc1, 0xda, 0x37, 0x0a, -0xeb, 0x3f, 0xac, 0xff, 0x55, 0x3d, 0xa5, 0x6c, -0x87, 0xea, 0xe6, 0xb2, 0x13, 0x01, 0xe7, 0x97, -0xec, 0xfe, 0x57, 0xd6, 0xee, 0x7f, 0x9d, 0x83, -0x76, 0x01, 0x32, 0xf8, 0x79, 0xca, 0xff, 0xfc, -0xe5, 0xe4, 0x9f, 0x45, 0x0e, 0x0c, 0x18, 0xa8, -0x39, 0x5c, 0x4a, 0xf4, 0x10, 0x1f, 0xff, 0x08, -0x74, 0xbf, 0xb5, 0x88, 0xf8, 0x6a, 0xb4, 0xed, -0xf5, 0x3f, 0x4a, 0xd7, 0xe6, 0x1d, 0xd5, 0xbc, -0x44, 0x8f, 0xfd, 0xd8, 0xfd, 0xaf, 0x62, 0xba, -0x1e, 0x75, 0xa1, 0x15, 0x9f, 0x0c, 0xff, 0x47, -0x62, 0x9c, 0x8c, 0xa6, 0x03, 0xe2, 0x33, 0xc2, -0xe2, 0xdf, 0x53, 0x74, 0x05, 0x3e, 0x42, 0x75, -0x64, 0xfe, 0x55, 0x79, 0x0d, 0xac, 0x44, 0xd2, -0x31, 0xa3, 0x3f, 0x6b, 0x74, 0xc4, 0xd8, 0xf9, -0x1f, 0x27, 0xff, 0x90, 0xfc, 0x59, 0x45, 0x92, -0xc6, 0x1f, 0xbb, 0xf1, 0x63, 0x17, 0x2a, 0x6b, -0xb5, 0xfa, 0xe9, 0xec, 0x20, 0x90, 0xe8, 0xed, -0x7f, 0xf5, 0xa1, 0x2a, 0xe2, 0xd4, 0x59, 0x78, -0x11, 0x2d, 0x4d, 0x8a, 0x39, 0xcb, 0x5f, 0xd1, -0x71, 0xfe, 0x67, 0xdc, 0xa3, 0xff, 0x28, 0x38, -0x68, 0xd5, 0xc4, 0xd8, 0x78, 0xf2, 0x6e, 0x08, -0x4b, 0x6e, 0x85, 0x5f, 0x74, 0xf3, 0x0f, 0x81, -0x9c, 0x23, 0xb8, 0x4c, 0x94, 0xe4, 0xe0, 0x32, -0x34, 0x6a, 0x52, 0x96, 0x8f, 0x19, 0xd8, 0x13, -0xa7, 0xfc, 0x13, 0x77, 0xf3, 0x8f, 0xa3, 0x1e, -0x75, 0xab, 0x29, 0x58, 0xdc, 0x31, 0x6b, 0xfe, -0x81, 0xc9, 0x8a, 0x94, 0x2a, 0x75, 0xcf, 0x19, -0x93, 0x67, 0xa1, 0xff, 0x18, 0xd5, 0x56, 0xc5, -0xfb, 0xff, 0x85, 0xfe, 0x82, 0xfc, 0x23, 0xd4, -0xc2, 0x4b, 0xb4, 0x5f, 0x43, 0xbe, 0x15, 0x83, -0xeb, 0x35, 0xfd, 0x88, 0x60, 0xf3, 0x8f, 0x56, -0x2f, 0x24, 0x1e, 0x8b, 0x15, 0xee, 0x7f, 0x35, -0x88, 0x69, 0xd6, 0xef, 0x43, 0x66, 0x23, 0x66, -0x95, 0xdf, 0x5f, 0x47, 0xff, 0x6b, 0xa1, 0xab, -0x9a, 0x37, 0x91, 0x83, 0x3d, 0x33, 0xf1, 0xcf, -0x2d, 0x4b, 0xed, 0x41, 0xb7, 0xf0, 0x7c, 0xa9, -0xd5, 0xd0, 0x4f, 0x9a, 0xf2, 0x9d, 0xff, 0xb1, -0xf9, 0xe7, 0x92, 0x61, 0x7c, 0x57, 0xab, 0x50, -0x0a, 0xf5, 0xbf, 0x2c, 0xfe, 0xd9, 0x8e, 0xbd, -0x5b, 0xfd, 0x2a, 0x24, 0xd2, 0xa2, 0xdc, 0x1c, -0x74, 0xde, 0x29, 0x1f, 0xff, 0xb4, 0x94, 0x76, -0x05, 0x9c, 0xbf, 0xb2, 0xfb, 0x5f, 0xda, 0x5c, -0x0f, 0xcf, 0xc4, 0x77, 0x45, 0x0a, 0xe9, 0x3f, -0x76, 0xff, 0x8b, 0x7c, 0x2b, 0xe6, 0xed, 0x7f, -0xd1, 0xeb, 0xfb, 0xf8, 0x47, 0xda, 0x12, 0xa4, -0xff, 0xd8, 0xfd, 0xaf, 0x0e, 0xcc, 0x3f, 0x21, -0x02, 0x39, 0x15, 0x37, 0x76, 0x3f, 0x27, 0x2e, -0x41, 0x3d, 0x1b, 0xda, 0x7a, 0x18, 0x11, 0xc9, -0x79, 0xfb, 0x5f, 0xa4, 0xff, 0x8e, 0xda, 0x70, -0x34, 0x44, 0x25, 0x48, 0xff, 0x51, 0x3c, 0xfd, -0x2f, 0x93, 0x16, 0xb6, 0xc0, 0x92, 0x36, 0x71, -0x9c, 0xdb, 0x57, 0xa8, 0xff, 0x45, 0xf5, 0x9f, -0x4d, 0x7c, 0x3f, 0xbc, 0x4d, 0xea, 0xcb, 0x26, -0x7e, 0x51, 0xa1, 0xfe, 0x97, 0xcd, 0x3f, 0x39, -0x92, 0x3d, 0xd0, 0xc3, 0x41, 0xf9, 0xdc, 0xd1, -0xff, 0x2a, 0xba, 0xda, 0x72, 0x1d, 0xd5, 0x93, -0x22, 0xf5, 0x06, 0x5c, 0xc4, 0x86, 0xf4, 0xcf, -0x76, 0xff, 0x82, 0xd4, 0xaf, 0x15, 0xde, 0xfe, -0xd7, 0x7e, 0x5c, 0x64, 0x0f, 0x90, 0x45, 0x8e, -0x76, 0xec, 0x44, 0x77, 0x6f, 0x11, 0x9f, 0xa9, -0x58, 0xe0, 0x5b, 0xbf, 0x93, 0x37, 0x88, 0x77, -0xdf, 0x32, 0xe6, 0x4b, 0x27, 0xa0, 0xaa, 0xab, -0xb4, 0xb5, 0xda, 0x35, 0xff, 0x6e, 0xdd, 0xdd, -0xff, 0x32, 0xf2, 0x4f, 0xad, 0x01, 0x39, 0x70, -0x00, 0x62, 0x9b, 0x4b, 0x83, 0xf4, 0x34, 0xbb, -0xff, 0x15, 0x33, 0xfa, 0x17, 0xaf, 0x61, 0xa7, -0x4a, 0x7a, 0x8a, 0xbe, 0x80, 0x24, 0x2a, 0x33, -0xf3, 0x27, 0xf3, 0x77, 0xb9, 0xd9, 0xff, 0xb2, -0xd7, 0xd3, 0x4b, 0x07, 0x3f, 0x85, 0xff, 0xe2, -0x52, 0x5d, 0xe5, 0xff, 0x11, 0x78, 0xfe, 0xc7, -0xc9, 0x3f, 0xec, 0xa1, 0xfe, 0xd6, 0xe1, 0x7a, -0x24, 0x8d, 0xbb, 0xf4, 0x9f, 0x7c, 0xfd, 0xaf, -0xd2, 0x0c, 0xf7, 0x19, 0x1c, 0x4f, 0x57, 0x1f, -0x09, 0x2f, 0x0f, 0x3a, 0x7f, 0xeb, 0xe2, 0x1f, -0x6b, 0xb0, 0x27, 0xfd, 0x86, 0x50, 0xad, 0x89, -0xc7, 0x02, 0xe6, 0x7b, 0xf4, 0x1f, 0x1c, 0x84, -0xd2, 0x64, 0xf3, 0x20, 0x1c, 0x55, 0x0e, 0x6e, -0x7e, 0xd6, 0x3a, 0x0f, 0x3c, 0x60, 0xc6, 0x87, -0xf7, 0x9e, 0xff, 0x91, 0xe2, 0xe8, 0xc6, 0x3a, -0x6b, 0x3f, 0x4c, 0x40, 0x1d, 0x92, 0x32, 0x56, -0x7c, 0x22, 0x8e, 0x46, 0x98, 0x93, 0x7f, 0x6e, -0x19, 0x4e, 0x95, 0x8d, 0xf3, 0xa3, 0x30, 0xa9, -0x36, 0x22, 0xea, 0xe6, 0x20, 0x35, 0x86, 0x02, -0xf8, 0x27, 0x65, 0x62, 0xb3, 0xd9, 0x2d, 0x5d, -0xe3, 0xda, 0x3f, 0xf5, 0xfe, 0xfe, 0xd7, 0x0a, -0x02, 0x39, 0x47, 0x2c, 0xda, 0x91, 0x8e, 0x71, -0xae, 0xf3, 0xcf, 0xd5, 0xbe, 0xfe, 0x97, 0x70, -0x34, 0x14, 0xd7, 0xb7, 0x3b, 0x7e, 0x7d, 0xd7, -0x7e, 0x50, 0xf2, 0xf6, 0xbf, 0xcc, 0xe8, 0x89, -0x19, 0x77, 0x3c, 0xab, 0xf3, 0xf5, 0xbf, 0xec, -0x5f, 0xdf, 0xb5, 0x7f, 0xea, 0xf2, 0xf5, 0xbf, -0xf2, 0xe8, 0x3f, 0x6f, 0xe5, 0xed, 0x7f, 0xcd, -0x4a, 0xff, 0x19, 0x2d, 0xf2, 0xfc, 0xfa, 0x7c, -0xd2, 0xc9, 0x6f, 0x47, 0xbd, 0xfa, 0x4f, 0xce, -0xce, 0x3f, 0xb3, 0xd2, 0x7f, 0xc6, 0x43, 0x8b, -0xcc, 0x43, 0xce, 0xcf, 0x92, 0xea, 0xaf, 0x99, -0xd8, 0x23, 0xe4, 0xd7, 0x7f, 0xfe, 0x5a, 0x2c, -0x27, 0x90, 0x33, 0x16, 0x5d, 0x4e, 0x68, 0x47, -0x33, 0x8e, 0x3d, 0x0f, 0xfb, 0x14, 0x21, 0xa7, -0xfe, 0x63, 0xf4, 0xbf, 0x06, 0x02, 0xe2, 0x63, -0xfa, 0xeb, 0xd3, 0x7f, 0xf0, 0xa0, 0xc9, 0x3f, -0x56, 0x34, 0x1a, 0x78, 0x3f, 0x1f, 0xba, 0xfa, -0x5f, 0xf0, 0x16, 0xdc, 0xe7, 0xca, 0x36, 0xfe, -0xfc, 0xe3, 0xea, 0x7f, 0xc9, 0x6f, 0x99, 0xfc, -0xc3, 0xbc, 0xf3, 0xf3, 0x9e, 0xb7, 0xff, 0x55, -0xeb, 0xea, 0x1e, 0xfa, 0xf3, 0x8f, 0xb7, 0xff, -0x55, 0xe7, 0x54, 0x7b, 0x22, 0x31, 0x9f, 0x22, -0x14, 0xd0, 0xff, 0xb2, 0xab, 0xcf, 0x9c, 0xac, -0x30, 0x2b, 0xfe, 0xf1, 0x97, 0xc5, 0xc2, 0xfc, -0x53, 0x40, 0xd8, 0xf1, 0xe8, 0x3f, 0xa1, 0x84, -0xba, 0xa6, 0xe0, 0xfc, 0x20, 0xfd, 0x27, 0x1c, -0x20, 0x04, 0x15, 0xd4, 0x7f, 0xfc, 0x65, 0x37, -0xa8, 0xff, 0x55, 0xc6, 0xfa, 0x5f, 0x05, 0xf4, -0x0d, 0x37, 0xff, 0x7c, 0xea, 0xfa, 0x76, 0x84, -0x77, 0xf0, 0xa1, 0x85, 0x46, 0xa7, 0x38, 0x67, -0xff, 0x2b, 0x67, 0x9e, 0x7f, 0xf6, 0x1f, 0xfb, -0xb1, 0xf9, 0x07, 0x9c, 0xfc, 0x73, 0xc0, 0xec, -0x7f, 0x51, 0xef, 0x2a, 0x06, 0xe4, 0x02, 0xfd, -0x2f, 0xcc, 0x3f, 0x2f, 0xc1, 0x53, 0x33, 0xe8, -0x3f, 0xee, 0xfe, 0x17, 0x5e, 0xff, 0x83, 0x85, -0xf5, 0x9c, 0x80, 0xfe, 0x97, 0x43, 0x1d, 0x9a, -0xa9, 0xff, 0x95, 0xef, 0xbc, 0x59, 0xbe, 0xfe, -0xd7, 0x4f, 0x0c, 0xc8, 0x01, 0xaa, 0xf6, 0x30, -0xc3, 0xa9, 0xff, 0xb0, 0xeb, 0xb3, 0xfc, 0x23, -0x14, 0xc8, 0x3f, 0xde, 0xfe, 0x17, 0xbe, 0x49, -0x7f, 0x5a, 0xec, 0x3f, 0xf6, 0x13, 0xd4, 0xff, -0xea, 0xf4, 0xd0, 0xce, 0x7f, 0x07, 0x9d, 0xff, -0xb9, 0xac, 0xb0, 0xfe, 0xd7, 0xed, 0xbd, 0xe4, -0x35, 0x13, 0x3d, 0x10, 0x7b, 0x4c, 0xa3, 0x24, -0x53, 0xd3, 0xcf, 0xe2, 0xcf, 0x59, 0xcf, 0xef, -0x8b, 0x27, 0xf9, 0x29, 0xf5, 0x2d, 0xfb, 0xfc, -0xaa, 0xd5, 0xff, 0xba, 0x8e, 0x8e, 0x8c, 0x95, -0xbb, 0xf5, 0x9f, 0x1d, 0x45, 0x9f, 0xe0, 0x45, -0x6e, 0x67, 0xab, 0x4d, 0x52, 0xe3, 0x59, 0xb8, -0xb8, 0xb9, 0x4f, 0xab, 0x22, 0xd2, 0xd0, 0xe5, -0x0e, 0x7a, 0x7d, 0x40, 0xfb, 0xe0, 0x45, 0xcb, -0x3b, 0x89, 0xb9, 0xb9, 0x17, 0xa8, 0x10, 0xa4, -0x54, 0x0d, 0x86, 0xbd, 0xfa, 0xcf, 0xa1, 0x42, -0xf9, 0x5c, 0x31, 0xf5, 0x1f, 0x16, 0x9f, 0x4a, -0xd3, 0x5f, 0xd2, 0x9d, 0x31, 0xbc, 0x33, 0x1c, -0xb7, 0x0f, 0xba, 0x84, 0x8e, 0x90, 0x8e, 0x86, -0xab, 0xff, 0x65, 0xce, 0x2f, 0x58, 0x8f, 0xdc, -0xfd, 0xaf, 0xcf, 0xf3, 0xd4, 0x3b, 0xee, 0x84, -0xcd, 0x3f, 0x74, 0xfd, 0xac, 0xff, 0x15, 0x24, -0xfb, 0xe4, 0xd1, 0x7f, 0xcc, 0xc1, 0x62, 0xf2, -0x6d, 0xf1, 0xcc, 0xe7, 0x7f, 0x24, 0xeb, 0xb4, -0x0f, 0xd1, 0x7f, 0xbc, 0xf1, 0x91, 0xb1, 0xd1, -0x7f, 0xa7, 0x57, 0xff, 0xb1, 0xfd, 0x95, 0xb1, -0xc1, 0xce, 0xc3, 0x1f, 0x99, 0xd3, 0x9b, 0xbc, -0x61, 0x1e, 0x8d, 0x76, 0x9d, 0xff, 0x51, 0x4c, -0xa7, 0xda, 0xad, 0xf3, 0x3f, 0xd7, 0xda, 0x2d, -0x7f, 0x5f, 0x25, 0xff, 0xa1, 0x1a, 0xd0, 0xff, -0xfa, 0xdc, 0xda, 0x2d, 0xf2, 0x34, 0x79, 0xff, -0x6b, 0xd4, 0xde, 0x3f, 0x6f, 0x06, 0xf5, 0xbf, -0xae, 0xc2, 0x67, 0x36, 0xed, 0x2c, 0xcd, 0xb6, -0x74, 0xcf, 0xf6, 0xfc, 0xb3, 0x61, 0x28, 0xf3, -0xe5, 0x19, 0xf4, 0x1f, 0x37, 0xff, 0x20, 0xb1, -0x7b, 0x86, 0xfe, 0x97, 0xfb, 0xd7, 0xaf, 0x8d, -0xed, 0x69, 0x67, 0x23, 0x0c, 0x5d, 0x9c, 0xfd, -0xaf, 0x13, 0xce, 0xfd, 0xd0, 0x08, 0xf4, 0x45, -0xb0, 0x59, 0xf4, 0xbf, 0xd2, 0x37, 0xe0, 0x7e, -0xb1, 0xcc, 0xf7, 0x3e, 0x82, 0xa7, 0xff, 0x45, -0xf7, 0x03, 0x18, 0xb4, 0x06, 0xe2, 0xee, 0x82, -0xef, 0x7f, 0x39, 0xf4, 0x9f, 0xb3, 0x98, 0x87, -0x6b, 0x47, 0x44, 0x80, 0xc2, 0xfd, 0xaf, 0x45, -0xe6, 0x69, 0x67, 0x83, 0x7f, 0x90, 0x92, 0x15, -0xd7, 0xce, 0xd0, 0xff, 0x92, 0xcc, 0xd3, 0xce, -0x98, 0x7f, 0xd0, 0x97, 0x68, 0x99, 0x2e, 0xc1, -0x8c, 0xfc, 0x83, 0x83, 0x30, 0xb0, 0x93, 0xbc, -0xff, 0x75, 0x5d, 0x4e, 0x8d, 0x3c, 0x65, 0xf6, -0x4f, 0x53, 0x79, 0xfb, 0x5f, 0x34, 0x08, 0x25, -0x1b, 0x0d, 0x1a, 0x97, 0xba, 0x9c, 0xf1, 0x79, -0xdf, 0xdf, 0xff, 0xa2, 0x4f, 0x8b, 0x46, 0xfe, -0x8c, 0xeb, 0x9d, 0xeb, 0x66, 0x3c, 0xff, 0x6c, -0x3a, 0x55, 0x61, 0xbc, 0xf8, 0xf6, 0x61, 0xcc, -0xd5, 0x08, 0xdb, 0xeb, 0xef, 0x7f, 0xf9, 0xdf, -0xf6, 0xf2, 0xc7, 0xd3, 0xdb, 0xff, 0x22, 0x6d, -0x82, 0x55, 0x2d, 0xf2, 0x37, 0xd0, 0x88, 0xa4, -0xc7, 0x9d, 0xe7, 0x9f, 0x2f, 0xe4, 0xef, 0x7f, -0x61, 0xa3, 0x41, 0x4d, 0xc9, 0x0f, 0x77, 0xce, -0x56, 0xff, 0xf9, 0xb8, 0xf3, 0x34, 0xa4, 0x9a, -0xc5, 0x00, 0x10, 0xe2, 0xfc, 0xfc, 0xb3, 0xbd, -0x8b, 0xfb, 0x44, 0xdc, 0x96, 0x36, 0xf4, 0x1c, -0x7f, 0x47, 0x26, 0x4f, 0xff, 0x6b, 0x1b, 0x24, -0x9a, 0xc3, 0x81, 0x7a, 0x45, 0x70, 0xff, 0x6b, -0x33, 0x24, 0x1e, 0x0a, 0xcb, 0x5c, 0xc7, 0xac, -0xf8, 0x67, 0x55, 0x4e, 0x26, 0xef, 0x7f, 0x3d, -0xa7, 0x05, 0x80, 0x90, 0xa3, 0xff, 0xc5, 0xf4, -0x9f, 0x39, 0x63, 0xc5, 0x93, 0x78, 0xb7, 0x2c, -0x19, 0x99, 0x65, 0xff, 0x8b, 0xfb, 0x0a, 0xd3, -0x4e, 0xbd, 0x5a, 0x36, 0x12, 0x00, 0x8a, 0x36, -0xff, 0x38, 0xf4, 0x1f, 0x62, 0xdc, 0x13, 0x0a, -0x23, 0x3e, 0x3d, 0x03, 0xff, 0x58, 0x4e, 0xad, -0x0e, 0xbd, 0xca, 0xa5, 0xd7, 0x95, 0x9a, 0xef, -0xbb, 0xd5, 0x1a, 0x20, 0x24, 0x90, 0xaf, 0xd6, -0xc8, 0x15, 0x41, 0xfa, 0x4f, 0x31, 0x89, 0xde, -0x4f, 0xc8, 0x8b, 0x60, 0xfe, 0x8e, 0xe4, 0x29, -0x17, 0xff, 0x98, 0xe7, 0x9f, 0xf9, 0xf5, 0x0b, -0x26, 0xa1, 0xee, 0x7b, 0x65, 0x72, 0xc1, 0xf3, -0x3f, 0xbe, 0xfe, 0x97, 0xe3, 0x7d, 0xb1, 0x92, -0x3c, 0xfd, 0x2f, 0xab, 0xdb, 0xa5, 0xc1, 0x84, -0x72, 0x3f, 0x79, 0xdf, 0x70, 0x56, 0xe7, 0x7f, -0x34, 0x6e, 0xb2, 0xe3, 0x35, 0xa8, 0xea, 0x12, -0x2f, 0x71, 0xa6, 0xfe, 0xb3, 0x06, 0xf3, 0x8f, -0x60, 0x7e, 0x55, 0x11, 0xd4, 0xff, 0xe2, 0xda, -0xd1, 0x11, 0xbd, 0x76, 0x6f, 0x38, 0x48, 0x7f, -0xb6, 0xcf, 0x3f, 0x3b, 0xfa, 0x5f, 0x23, 0xd0, -0x27, 0x7e, 0xeb, 0xe4, 0x1d, 0xd9, 0x36, 0x9f, -0xfe, 0x03, 0xee, 0xfe, 0x97, 0x05, 0x39, 0xbb, -0xe1, 0x6b, 0xb4, 0x4c, 0x2b, 0x0f, 0xd2, 0x7f, -0x2e, 0xd3, 0xed, 0xc6, 0xf4, 0x9f, 0x12, 0x5c, -0xc4, 0xe5, 0x6b, 0xb0, 0x7c, 0xf3, 0xcf, 0x93, -0x41, 0xfa, 0x8f, 0xad, 0xff, 0x93, 0xf7, 0x97, -0xbb, 0x8c, 0x63, 0x1b, 0x53, 0xd0, 0x81, 0x56, -0xd4, 0x2e, 0x7c, 0xcf, 0xd0, 0x7f, 0xac, 0x83, -0xd0, 0x9f, 0x9b, 0xad, 0x31, 0x4f, 0xff, 0x0b, -0x19, 0x4e, 0x8d, 0x70, 0x48, 0xa9, 0x92, 0xa4, -0x67, 0xf8, 0x47, 0x9c, 0xeb, 0x6f, 0xcc, 0xfa, -0xfb, 0x5f, 0xca, 0x12, 0x3d, 0x4c, 0xfc, 0xed, -0x08, 0xc5, 0x20, 0x36, 0x62, 0x3c, 0xaf, 0xdd, -0xcd, 0xfc, 0x1d, 0xcc, 0xd7, 0xff, 0xd2, 0x45, -0x04, 0x8a, 0x22, 0xde, 0xcb, 0xf9, 0x9f, 0x70, -0xdd, 0xfd, 0xaf, 0xe3, 0xe6, 0xb1, 0x8d, 0x2c, -0x4e, 0x76, 0x0d, 0xf3, 0xa4, 0xff, 0x67, 0xef, -0xfa, 0x63, 0xab, 0xb8, 0xb2, 0xf3, 0x7d, 0xf3, -0xc6, 0x30, 0xb6, 0x9f, 0xed, 0xb1, 0x81, 0x96, -0x2c, 0x04, 0x06, 0x03, 0x5b, 0x97, 0xba, 0xe0, -0xc5, 0x88, 0xb0, 0x0e, 0x31, 0x83, 0x49, 0x54, -0x16, 0xa2, 0x80, 0x36, 0x6d, 0xb5, 0x2b, 0x45, -0x91, 0x45, 0xa8, 0x8a, 0x54, 0xb6, 0x62, 0x7f, -0xfc, 0xe1, 0x25, 0xab, 0xcd, 0x80, 0xc9, 0xc6, -0x59, 0xd3, 0xae, 0x93, 0xcd, 0x6a, 0x89, 0xb2, -0xbb, 0x7d, 0x04, 0x54, 0x50, 0x97, 0x56, 0x40, -0xd2, 0x2c, 0x34, 0x28, 0x79, 0x10, 0x4b, 0x71, -0x12, 0x27, 0x58, 0xd9, 0x54, 0x9b, 0x1f, 0x94, -0x7d, 0xd1, 0xd2, 0xc4, 0x0d, 0x0e, 0x71, 0x48, -0x94, 0x3a, 0xc1, 0xe0, 0xce, 0x9d, 0xb9, 0x3f, -0xe7, 0x9e, 0x7b, 0x67, 0x1c, 0x36, 0x9b, 0x48, -0x8d, 0xff, 0x3a, 0x7a, 0x1e, 0x9e, 0xe6, 0x1e, -0xc6, 0xf7, 0x7e, 0xf3, 0x9d, 0xef, 0x7c, 0x67, -0x05, 0xe9, 0x6f, 0x8a, 0xd6, 0x7b, 0x1e, 0xa8, -0x7f, 0xd1, 0x24, 0xbc, 0x8e, 0xc6, 0x56, 0xb7, -0xa3, 0xda, 0xc4, 0x79, 0xd4, 0xa6, 0xe5, 0x7f, -0x2e, 0xa2, 0x71, 0x74, 0x3d, 0xaa, 0x19, 0xcf, -0x7f, 0xcf, 0xc0, 0xff, 0xec, 0xe0, 0xf8, 0x27, -0xfc, 0x6b, 0x0a, 0x96, 0x7b, 0x35, 0x27, 0x76, -0x1a, 0xf5, 0x3f, 0xfc, 0x7d, 0xbf, 0x5c, 0x3c, -0x56, 0x5a, 0xd4, 0x52, 0x79, 0xd8, 0x52, 0x11, -0x94, 0xca, 0xff, 0x54, 0x2f, 0x9b, 0x52, 0x42, -0x87, 0xdd, 0x05, 0xe8, 0x2b, 0xf1, 0xfb, 0x29, -0x96, 0xfd, 0xc4, 0x07, 0xdf, 0x40, 0x52, 0xff, -0x53, 0xff, 0xb8, 0x43, 0x40, 0xdd, 0x98, 0xdf, -0x86, 0x7e, 0x7e, 0x38, 0xbf, 0x55, 0xad, 0xef, -0x70, 0xfc, 0x73, 0x4d, 0xb4, 0xa8, 0x53, 0x75, -0x17, 0xf3, 0x43, 0x68, 0xdc, 0x5b, 0x85, 0xea, -0xb6, 0xc9, 0xe7, 0x7b, 0xfb, 0x10, 0xac, 0xff, -0xf9, 0x50, 0x84, 0xcd, 0x11, 0x22, 0x3a, 0xc6, -0x18, 0x21, 0xa8, 0xfe, 0x75, 0x98, 0xa3, 0x9d, -0x91, 0xa0, 0x37, 0x1d, 0xff, 0x2c, 0x6d, 0x18, -0xcc, 0xb1, 0xc7, 0x80, 0x20, 0xe4, 0xdd, 0xe9, -0xf8, 0x27, 0x7e, 0x91, 0x4f, 0x0a, 0xcb, 0x25, -0xfc, 0x93, 0x53, 0x61, 0xf0, 0x79, 0x23, 0xfe, -0xb9, 0x7a, 0xfd, 0x4f, 0xb2, 0xd1, 0x49, 0xc6, -0x3f, 0x97, 0x14, 0xd8, 0x9c, 0xbc, 0x7f, 0x10, -0xff, 0x08, 0xc7, 0x74, 0xb2, 0xfe, 0x0e, 0xd7, -0xbf, 0x5c, 0x1a, 0x38, 0xf7, 0x24, 0x18, 0x21, -0x05, 0xff, 0x48, 0x68, 0x67, 0x04, 0xfd, 0x1a, -0x97, 0xbd, 0x18, 0x23, 0x24, 0xe1, 0x9f, 0xf0, -0xfd, 0xeb, 0x1d, 0xd2, 0x1d, 0x40, 0x69, 0x1f, -0xd2, 0xf6, 0x85, 0xdf, 0x50, 0x26, 0xdc, 0xa8, -0xb4, 0x0a, 0xe0, 0x9f, 0x63, 0xd5, 0x58, 0x08, -0x17, 0x65, 0xe3, 0x02, 0x7a, 0x0e, 0xcd, 0x91, -0xf2, 0x03, 0xe1, 0x1f, 0x91, 0xf6, 0x31, 0xe9, -0x7f, 0x98, 0xfe, 0x79, 0x8e, 0x9d, 0x49, 0xff, -0x03, 0xd1, 0x3e, 0x99, 0xf4, 0x3f, 0x02, 0xed, -0x33, 0x29, 0xfd, 0xcf, 0xb4, 0xf2, 0x94, 0xac, -0xf5, 0xaf, 0x49, 0xf1, 0x3f, 0x7f, 0x38, 0xfd, -0x4f, 0x16, 0xfc, 0x83, 0xe6, 0xb3, 0xd5, 0x95, -0xd0, 0x98, 0x95, 0x8a, 0x7f, 0x38, 0xff, 0xd3, -0x7a, 0xae, 0x48, 0xda, 0xb8, 0xc2, 0x4f, 0xf2, -0x3a, 0xfc, 0xf3, 0x00, 0xa3, 0x7d, 0xa6, 0x9d, -0xf3, 0x15, 0xfc, 0x03, 0xd5, 0xbf, 0x4c, 0xfc, -0x0f, 0x58, 0xff, 0xa2, 0xc2, 0xef, 0xfe, 0xe0, -0xaa, 0xf5, 0x3f, 0x90, 0xfe, 0xd9, 0xc0, 0xe7, -0x28, 0xf8, 0x87, 0xf3, 0x45, 0xff, 0x94, 0xae, -0xff, 0x99, 0x2c, 0xff, 0x13, 0xd7, 0xbf, 0x2c, -0x95, 0xf6, 0xd1, 0xe8, 0x7f, 0x8c, 0x7c, 0x85, -0x0e, 0xff, 0x88, 0x32, 0x18, 0x5f, 0xe5, 0x7f, -0xe8, 0xf7, 0x63, 0xfc, 0x13, 0xf5, 0xbf, 0x6f, -0xef, 0xe6, 0xb4, 0x4f, 0x51, 0xc1, 0x3f, 0xa0, -0xfe, 0xc7, 0xd6, 0xf2, 0x1b, 0xb2, 0xfe, 0x07, -0xe3, 0x9f, 0xba, 0xe3, 0xdd, 0x21, 0xec, 0xe9, -0x4b, 0x1c, 0x64, 0x08, 0xd6, 0xff, 0x60, 0xd9, -0xcf, 0x47, 0x74, 0xff, 0xe9, 0xb2, 0xe2, 0x17, -0x31, 0xb8, 0xfe, 0xc5, 0xf4, 0x3f, 0xdf, 0xb2, -0x88, 0xf0, 0xfb, 0x5b, 0xc0, 0xfb, 0x1a, 0x88, -0x7f, 0x54, 0x18, 0x09, 0xe2, 0x1f, 0xc2, 0x96, -0x8f, 0xfe, 0x1d, 0xa3, 0xcd, 0x89, 0xd0, 0x45, -0x10, 0x3e, 0x01, 0xf8, 0x67, 0x14, 0x48, 0x8b, -0xa1, 0xfe, 0xb5, 0x41, 0x7f, 0xde, 0xd5, 0x24, -0xf0, 0x8f, 0xf3, 0xf1, 0xf8, 0x1f, 0xe3, 0xf5, -0x2a, 0xfe, 0x69, 0xd9, 0x39, 0x68, 0xb7, 0x46, -0xc0, 0x40, 0xca, 0x8f, 0x9b, 0xac, 0x7f, 0xd5, -0x84, 0x68, 0xc7, 0x13, 0xd7, 0x7b, 0xb4, 0x3b, -0xca, 0xcf, 0x4b, 0x8c, 0x08, 0xaa, 0x51, 0xfa, -0xbf, 0x24, 0xb5, 0x2a, 0x16, 0x4a, 0xc5, 0xfd, -0xef, 0x94, 0x11, 0x02, 0xf0, 0xcf, 0xb3, 0x35, -0x63, 0xf9, 0x76, 0xcc, 0xff, 0x74, 0x4a, 0xfc, -0x21, 0xcc, 0xff, 0x3c, 0x1e, 0x2c, 0x19, 0x75, -0x48, 0xd9, 0xab, 0x33, 0x53, 0xff, 0xfb, 0x62, -0x54, 0x49, 0x9e, 0x87, 0xd5, 0xe0, 0xf3, 0x90, -0xc0, 0x3f, 0xb9, 0xc5, 0x1d, 0x3d, 0xb8, 0xdb, -0x2b, 0xcc, 0xde, 0x8d, 0x4a, 0x3e, 0x4f, 0x42, -0xfc, 0xcf, 0x4b, 0x35, 0xa4, 0xec, 0xd5, 0x39, -0x15, 0x7a, 0x1e, 0x14, 0xfc, 0x53, 0xae, 0x1b, -0xad, 0x8e, 0x60, 0x70, 0x27, 0xf8, 0x60, 0x28, -0xf8, 0xc7, 0xbd, 0x99, 0x7c, 0xdb, 0x4d, 0xa9, -0xfa, 0x67, 0xfc, 0x3c, 0x34, 0x77, 0x38, 0x2d, -0x28, 0xea, 0x76, 0xff, 0x0e, 0xf8, 0x3c, 0x28, -0xf8, 0xa7, 0xb3, 0x89, 0x64, 0x63, 0x63, 0xaa, -0xfe, 0x19, 0xe3, 0x9f, 0xe6, 0x2d, 0x54, 0xfd, -0xb2, 0x85, 0xc2, 0x00, 0x5d, 0xff, 0x7b, 0x8c, -0x7f, 0x4e, 0x16, 0x08, 0xfe, 0xd9, 0xa2, 0xf4, -0xbf, 0x27, 0xf9, 0x9f, 0xc8, 0xff, 0x67, 0x98, -0x66, 0xe3, 0x46, 0x1a, 0xe0, 0xfe, 0xf7, 0x11, -0x2d, 0xff, 0xb3, 0x96, 0xca, 0xae, 0x7c, 0x9c, -0x16, 0xe7, 0x4e, 0x83, 0xfe, 0x39, 0xda, 0x4f, -0x3a, 0x54, 0xdb, 0x1f, 0x13, 0xfe, 0x69, 0x8e, -0xd4, 0x3e, 0xb9, 0x70, 0x75, 0x9d, 0x69, 0xfd, -0xef, 0x78, 0xff, 0xb1, 0x38, 0xed, 0xe3, 0x83, -0xf9, 0x4c, 0xe2, 0x9f, 0x55, 0x4c, 0xed, 0xb3, -0x13, 0xee, 0x7f, 0xd7, 0xe2, 0x1f, 0x97, 0x1d, -0x43, 0x73, 0x0d, 0xf8, 0x67, 0xe5, 0xe6, 0xc2, -0x24, 0xf1, 0x0f, 0x95, 0xf1, 0x7c, 0x35, 0x23, -0xfe, 0x71, 0xe2, 0x7e, 0xf9, 0xac, 0xf8, 0x67, -0x1d, 0x28, 0xfb, 0xd1, 0xe3, 0x1f, 0xa7, 0x10, -0xe4, 0xf5, 0x8d, 0xff, 0x0a, 0xfe, 0x91, 0xd5, -0x3b, 0xe7, 0x92, 0xc2, 0xe6, 0x35, 0x49, 0xfc, -0xb3, 0x6a, 0x4b, 0x21, 0xa6, 0x7d, 0x6e, 0xf0, -0xa1, 0x44, 0xdd, 0x21, 0xe1, 0x1f, 0x27, 0x04, -0x39, 0x7d, 0x4e, 0x60, 0x79, 0x38, 0x40, 0x4e, -0x26, 0xfc, 0xb3, 0xd1, 0x21, 0x36, 0x47, 0xab, -0x2b, 0x53, 0xf5, 0xcf, 0x39, 0x2c, 0xfb, 0x71, -0x28, 0x8d, 0x56, 0x99, 0x09, 0xff, 0x6c, 0x6c, -0x8e, 0x68, 0xbd, 0xdc, 0xca, 0xce, 0x3f, 0xcf, -0x84, 0x7f, 0xc2, 0x0f, 0xab, 0xa3, 0xdf, 0xae, -0x9d, 0x93, 0x05, 0xff, 0xac, 0xc4, 0x6d, 0x5f, -0x65, 0xda, 0x08, 0x9f, 0x8a, 0x7f, 0x30, 0x6d, -0xee, 0x45, 0x68, 0x67, 0xc9, 0x03, 0xeb, 0x32, -0xe1, 0x9f, 0x32, 0xfd, 0x7b, 0xd9, 0x05, 0xf2, -0xa5, 0x0a, 0xfe, 0x19, 0xa2, 0x7f, 0xbf, 0xa8, -0x0a, 0xae, 0x7f, 0xd1, 0xef, 0x8f, 0xf1, 0xcf, -0xca, 0xce, 0x66, 0x8a, 0x76, 0x0a, 0x60, 0xfd, -0x4b, 0x83, 0x7f, 0x72, 0xe1, 0xea, 0x40, 0xfc, -0x63, 0xd1, 0xfc, 0x10, 0xfd, 0x73, 0xb9, 0x40, -0xde, 0xd6, 0x3d, 0xf0, 0xfc, 0x52, 0xf4, 0xcf, -0xa5, 0xa6, 0x3b, 0xf1, 0xdd, 0x06, 0xcd, 0x0e, -0x59, 0x48, 0x73, 0xac, 0xe8, 0xd6, 0xe1, 0x1f, -0x9f, 0x5c, 0xb6, 0x44, 0x5e, 0x2f, 0xac, 0x7f, -0x6e, 0xc5, 0xcf, 0x1b, 0xd3, 0xbb, 0xa6, 0xe1, -0x1f, 0xbc, 0xde, 0x95, 0xfd, 0x54, 0x2d, 0xe9, -0x81, 0xfd, 0x3b, 0x12, 0xfe, 0x71, 0xc4, 0xdf, -0xda, 0x99, 0xf0, 0x4f, 0xbb, 0x5f, 0x20, 0xdb, -0x38, 0x2a, 0x40, 0xe7, 0x9d, 0xca, 0xff, 0x34, -0x11, 0x3d, 0x73, 0x63, 0x55, 0xa2, 0x11, 0xa9, -0x0d, 0xc0, 0x3f, 0xb9, 0xc5, 0xa5, 0xb5, 0xe4, -0x74, 0xf3, 0x9c, 0x6c, 0xf8, 0xc7, 0x69, 0x69, -0x88, 0xb2, 0xe1, 0x56, 0xc5, 0xb2, 0x1f, 0xac, -0x98, 0x6a, 0x60, 0xfd, 0x71, 0x09, 0xfc, 0x83, -0xef, 0x3f, 0x5a, 0xdd, 0xbc, 0x76, 0x77, 0x36, -0xfe, 0x5a, 0x22, 0xfb, 0x11, 0xf4, 0xcf, 0x12, -0xfe, 0xc1, 0xdb, 0x4e, 0xe4, 0x5f, 0xe7, 0xdf, -0x80, 0x44, 0xd9, 0x0f, 0x3e, 0xbf, 0xae, 0x4f, -0xe0, 0x9f, 0x19, 0xcc, 0xff, 0x87, 0x1b, 0x29, -0xb8, 0xa4, 0x11, 0x0c, 0xc4, 0x3f, 0x7f, 0x4f, -0x41, 0xce, 0xa0, 0x45, 0x68, 0x9f, 0x91, 0xac, -0xf5, 0xaf, 0x7d, 0xf1, 0xea, 0x06, 0x89, 0x02, -0x0a, 0xc4, 0x3f, 0x15, 0x87, 0xf4, 0xb4, 0x09, -0xc4, 0xff, 0x54, 0xe8, 0x60, 0xb0, 0xf8, 0x20, -0x19, 0xf9, 0x9f, 0x35, 0x46, 0xfc, 0x83, 0x0e, -0x71, 0x7e, 0x29, 0x49, 0xfb, 0xe0, 0x60, 0xb9, -0xae, 0xfe, 0x45, 0xee, 0xbf, 0x36, 0x05, 0xff, -0xcc, 0x60, 0xfc, 0xcf, 0x08, 0xe8, 0xff, 0xb3, -0x40, 0xc1, 0x3f, 0x01, 0x3d, 0xfd, 0x0b, 0x98, -0x06, 0xa9, 0x4a, 0xeb, 0xff, 0xaa, 0xa5, 0xfa, -0xe7, 0x17, 0xd0, 0xad, 0xe8, 0x7b, 0x4a, 0x23, -0xd8, 0x32, 0xb0, 0xfe, 0x55, 0x8a, 0xdb, 0xbe, -0x72, 0x77, 0x31, 0xda, 0x50, 0x0a, 0x64, 0xfc, -0xf3, 0x1e, 0xd5, 0xff, 0x40, 0xf9, 0x01, 0xf1, -0xcf, 0x3c, 0x10, 0xf6, 0x34, 0x68, 0xf1, 0xcf, -0x42, 0xb6, 0xba, 0xd7, 0xd9, 0x32, 0x2b, 0x0d, -0xfc, 0x4f, 0x94, 0xb4, 0x41, 0x87, 0x25, 0x36, -0x0d, 0xff, 0x3c, 0x26, 0x55, 0xbb, 0xd2, 0xf1, -0x4f, 0xdb, 0xc7, 0xea, 0xff, 0x22, 0x42, 0x17, -0x0b, 0x1b, 0x01, 0xb1, 0xf3, 0xae, 0xd6, 0xc0, -0xff, 0xbc, 0xc2, 0x8d, 0x80, 0xb4, 0xf8, 0x27, -0x17, 0x1e, 0xd3, 0x56, 0xf4, 0x61, 0x3f, 0xae, -0x7f, 0xb1, 0x42, 0x58, 0x18, 0x74, 0x40, 0xf8, -0x27, 0xd2, 0x3f, 0x6f, 0xf5, 0x67, 0xe1, 0xd3, -0x9f, 0xb5, 0xbd, 0xef, 0xd5, 0xe3, 0x9f, 0x82, -0xd0, 0xff, 0xc5, 0xf0, 0x0f, 0x16, 0xe2, 0x4e, -0x4d, 0xa9, 0x7f, 0xe5, 0xcf, 0x15, 0x95, 0xc0, -0xa8, 0x7f, 0xfe, 0x6f, 0x3d, 0x3e, 0x84, 0xf9, -0x9f, 0x60, 0x85, 0x9e, 0xff, 0x61, 0x7a, 0x12, -0xa8, 0xff, 0x0b, 0xe8, 0x77, 0x33, 0xf0, 0x3f, -0x8d, 0x26, 0xff, 0x1f, 0x85, 0xff, 0x49, 0xd1, -0xff, 0x5c, 0x55, 0xff, 0x57, 0x56, 0xfe, 0x27, -0x02, 0x39, 0x9b, 0x32, 0xf3, 0x3f, 0xe9, 0xfa, -0x43, 0xb0, 0xfe, 0xa5, 0xc2, 0x00, 0x0d, 0xfe, -0xd1, 0xd2, 0x3e, 0x10, 0xfe, 0xa9, 0xa1, 0xf8, -0x67, 0xcd, 0xdb, 0x7d, 0x34, 0xf0, 0x53, 0xfb, -0xbf, 0xa2, 0x63, 0xcb, 0x23, 0xc1, 0x44, 0x0a, -0xfe, 0x79, 0x84, 0xb4, 0x9d, 0x46, 0x77, 0x5b, -0x0b, 0xe1, 0x37, 0x4d, 0xff, 0x97, 0x36, 0x80, -0xfb, 0xbf, 0x22, 0x7d, 0x4b, 0x15, 0x4f, 0x63, -0x47, 0x4a, 0xff, 0x57, 0x6c, 0x84, 0xc8, 0xf9, -0x9f, 0xbf, 0x30, 0xf1, 0x3f, 0x94, 0x1d, 0x02, -0xf1, 0x12, 0x58, 0xff, 0x1a, 0x27, 0xa7, 0xff, -0x34, 0xda, 0x11, 0x96, 0x52, 0xff, 0x8a, 0x8d, -0x19, 0xa3, 0x20, 0x69, 0x04, 0xa4, 0xf2, 0x3f, -0xb3, 0x84, 0xfe, 0x2f, 0xb5, 0x5e, 0x23, 0xe1, -0x1f, 0x9f, 0x90, 0x3c, 0xcf, 0x8b, 0xc0, 0x40, -0x56, 0x08, 0x4b, 0xf8, 0xc7, 0x25, 0x8b, 0xba, -0x4c, 0xab, 0x7b, 0xe3, 0x28, 0xd9, 0x28, 0x27, -0xe0, 0x9f, 0xaf, 0x48, 0xb6, 0x3f, 0xd7, 0x97, -0x36, 0x40, 0xe7, 0x3b, 0x50, 0xff, 0xc2, 0xf8, -0xf9, 0xb7, 0x89, 0xc7, 0x46, 0xcb, 0xff, 0x48, -0x68, 0x67, 0x93, 0xf8, 0xc9, 0xce, 0x04, 0xfe, -0x69, 0xaa, 0x30, 0xfc, 0x59, 0xf1, 0xf5, 0xea, -0xf5, 0xcf, 0x1a, 0xfc, 0x43, 0xef, 0x07, 0xd9, -0x69, 0xfa, 0xe4, 0x93, 0x38, 0x3f, 0xdc, 0xdf, -0xd2, 0xe5, 0xe7, 0xbb, 0xa7, 0xad, 0x7f, 0x0d, -0x83, 0xfd, 0x5f, 0x14, 0xed, 0x18, 0xf9, 0x1f, -0xee, 0x7f, 0x78, 0xc1, 0x23, 0x81, 0x5a, 0x0f, -0xe5, 0xfd, 0x5f, 0x25, 0xc6, 0x07, 0x8a, 0xcf, -0x83, 0x81, 0xff, 0x41, 0xaa, 0xfa, 0xf7, 0x76, -0x19, 0x18, 0xc0, 0xf5, 0xaf, 0x15, 0xf9, 0x41, -0xe7, 0xbd, 0xdc, 0xb2, 0x93, 0x62, 0xdb, 0x3b, -0xc4, 0xff, 0xcc, 0x8e, 0xf3, 0x33, 0x37, 0xc2, -0x3f, 0x98, 0xf6, 0x39, 0x4c, 0x69, 0x1f, 0xd0, -0xff, 0xc7, 0x91, 0xf1, 0x67, 0x9b, 0x98, 0x96, -0xf9, 0x80, 0xfe, 0x79, 0x38, 0x07, 0xec, 0x27, -0xb6, 0x5e, 0xff, 0x8c, 0x78, 0xfd, 0xcb, 0xd0, -0xef, 0x2f, 0xea, 0x9f, 0xf9, 0x7e, 0x1e, 0xd5, -0x5b, 0x99, 0x9f, 0x76, 0xa5, 0x84, 0x7f, 0xd8, -0xfd, 0xd8, 0x58, 0x1d, 0xc1, 0xd0, 0xce, 0x76, -0x18, 0xff, 0x7c, 0xc8, 0xf1, 0x0f, 0x3b, 0x8f, -0xfe, 0x04, 0x9f, 0x3e, 0xdf, 0x97, 0xcf, 0x23, -0x1b, 0xc0, 0x3f, 0xf4, 0xbc, 0x9b, 0x86, 0xf1, -0x8c, 0x46, 0x28, 0xfb, 0x14, 0xc7, 0x3f, 0x88, -0xd6, 0xb3, 0xf2, 0x86, 0x42, 0x8c, 0xdc, 0xff, -0xc5, 0xfc, 0xfa, 0x0c, 0xf5, 0x2f, 0xba, 0x5e, -0xa1, 0xfe, 0xa5, 0xca, 0x7e, 0xa0, 0xfe, 0xaf, -0x6b, 0xc4, 0xfe, 0x77, 0x4b, 0x73, 0xfe, 0x9e, -0x65, 0xfd, 0x5f, 0xc7, 0x6a, 0xb2, 0xe0, 0x81, -0x37, 0xb8, 0x9e, 0x07, 0xf3, 0x3f, 0x76, 0x94, -0x9f, 0xf7, 0x13, 0x97, 0x0d, 0x31, 0xff, 0x1f, -0x81, 0xff, 0x99, 0x69, 0xac, 0x7f, 0xb9, 0x7a, -0xff, 0x67, 0xba, 0xba, 0x59, 0xd0, 0x7a, 0x05, -0xfd, 0xf3, 0x74, 0x96, 0xf6, 0x91, 0x4c, 0xfa, -0x67, 0xdb, 0xbc, 0xde, 0x1c, 0xf6, 0xb7, 0x9c, -0x2f, 0xe8, 0x9f, 0xdd, 0xfd, 0x0e, 0x65, 0xc3, -0x3c, 0xed, 0x3f, 0x04, 0xfd, 0x7f, 0x32, 0xe1, -0x1f, 0x64, 0x33, 0xfd, 0xcf, 0x58, 0x40, 0x6d, -0x0f, 0xf1, 0x27, 0x3b, 0x44, 0xfc, 0x33, 0xe0, -0xd1, 0xfd, 0xc1, 0xb9, 0x9b, 0xfd, 0xbd, 0x9c, -0x34, 0xe1, 0x1f, 0xfa, 0x33, 0xaf, 0x5e, 0xd4, -0xff, 0x68, 0xf0, 0x40, 0xc7, 0x00, 0xfd, 0x7a, -0xdc, 0xff, 0xe5, 0x12, 0x90, 0xf3, 0xa2, 0x02, -0x7b, 0x78, 0xff, 0x57, 0x23, 0xbd, 0xde, 0xe1, -0x78, 0xa0, 0xac, 0xdf, 0xd8, 0x4f, 0xfd, 0x80, -0xe6, 0xa7, 0xd3, 0x66, 0x22, 0xd5, 0xb3, 0x91, -0xed, 0xcf, 0x3d, 0xa4, 0x6d, 0xf9, 0x5c, 0xdd, -0x77, 0xf3, 0x73, 0xa8, 0x11, 0xd0, 0x50, 0xc0, -0xf0, 0x0f, 0xfa, 0x19, 0xad, 0xd6, 0x0d, 0xf9, -0xbf, 0x11, 0x6e, 0x1b, 0x2b, 0x2a, 0x67, 0x5b, -0x51, 0x21, 0xfe, 0x9b, 0x82, 0xfe, 0x39, 0xe0, -0xf8, 0x47, 0xf5, 0x6b, 0x9d, 0x4d, 0x3f, 0xe1, -0xfd, 0x5f, 0xfe, 0x74, 0x26, 0xea, 0x50, 0xfd, -0x6c, 0x99, 0xdf, 0x9d, 0xd0, 0xff, 0x55, 0x21, -0xac, 0xb7, 0x57, 0x5e, 0x66, 0x75, 0x33, 0xed, -0x88, 0xe7, 0xff, 0xbf, 0x45, 0x77, 0x24, 0x43, -0x7e, 0xf8, 0xfd, 0x08, 0xf8, 0xe7, 0x3d, 0xad, -0x10, 0x5a, 0x38, 0x1f, 0xb9, 0xff, 0xa1, 0xf5, -0x94, 0x81, 0x7f, 0x60, 0xff, 0xbf, 0x01, 0x3f, -0xef, 0xca, 0xa2, 0x10, 0x5a, 0x8b, 0x7f, 0x50, -0x81, 0xe7, 0x47, 0x94, 0x25, 0x0c, 0x88, 0x85, -0x30, 0x01, 0xff, 0xcc, 0x24, 0x6a, 0x9f, 0x7f, -0x4f, 0xac, 0xf7, 0x59, 0x0d, 0xfe, 0xa9, 0x61, -0x8b, 0x1a, 0x4d, 0x2c, 0xf3, 0x08, 0x8c, 0x7f, -0xce, 0x5a, 0xe4, 0x21, 0x19, 0xc7, 0x6a, 0xb1, -0x52, 0xcd, 0x18, 0xc6, 0x4b, 0xc1, 0xaa, 0xd7, -0x35, 0xfc, 0xcf, 0xcc, 0x0b, 0xd4, 0xe4, 0xf0, -0x4c, 0xe9, 0x97, 0xbb, 0x96, 0x8c, 0x56, 0x1f, -0xeb, 0x98, 0xf0, 0xcd, 0xfc, 0x0f, 0x5d, 0xa6, -0xb7, 0x8f, 0x08, 0xbf, 0x85, 0xbf, 0x2f, 0x3b, -0x89, 0x7f, 0x2a, 0x0e, 0xf1, 0xb4, 0xeb, 0xfd, -0x27, 0x39, 0xfe, 0x99, 0xb1, 0xd5, 0x61, 0x68, -0xf0, 0x7c, 0x5c, 0x0d, 0xc4, 0x69, 0x99, 0x23, -0x01, 0x63, 0xfe, 0xff, 0x2b, 0xf4, 0x7f, 0x9d, -0x89, 0xfc, 0x30, 0x7b, 0xa3, 0xfc, 0x58, 0x26, -0xfc, 0xc3, 0xf4, 0xe7, 0xaf, 0x91, 0x36, 0x28, -0x3b, 0x9a, 0xf8, 0xa0, 0xa9, 0x7f, 0x15, 0x82, -0x5e, 0x6a, 0xfb, 0xd3, 0x6b, 0x2f, 0x09, 0x83, -0x06, 0xee, 0xff, 0x33, 0x1d, 0xc0, 0x3f, 0x98, -0x7f, 0x8e, 0xf9, 0x8a, 0x2c, 0xfe, 0xcf, 0x9d, -0xee, 0xed, 0x8a, 0xfb, 0x9f, 0x80, 0x07, 0xae, -0x53, 0xf5, 0x3f, 0x37, 0xa3, 0xdf, 0x05, 0xcb, -0x62, 0xb4, 0x73, 0xab, 0x2b, 0xc0, 0x9e, 0xa9, -0x2d, 0xf3, 0x5f, 0x88, 0x47, 0x63, 0x24, 0xfd, -0x9f, 0x71, 0xf6, 0x28, 0x3e, 0x4c, 0x36, 0x82, -0x59, 0x49, 0xfc, 0x13, 0xbb, 0xb3, 0x96, 0x6b, -0x48, 0xfe, 0x07, 0xc3, 0xb4, 0x5f, 0x09, 0xce, -0x47, 0x2f, 0x26, 0xf3, 0x19, 0x23, 0x94, 0x9c, -0x7f, 0xb1, 0xa4, 0xe4, 0x6c, 0xb3, 0xc6, 0x8b, -0xf7, 0xd8, 0xcd, 0xa7, 0xc2, 0xe0, 0x79, 0x5f, -0xd5, 0xff, 0xd0, 0xeb, 0xbd, 0x08, 0xff, 0x2c, -0x89, 0xd8, 0x9e, 0xe0, 0x00, 0xe1, 0xbb, 0xa2, -0x80, 0xf1, 0x3f, 0xeb, 0xe5, 0xf9, 0x17, 0x02, -0xda, 0xa1, 0x46, 0xd0, 0x80, 0xfe, 0x87, 0x5e, -0x3f, 0x4c, 0xe6, 0x5f, 0x44, 0x63, 0x2f, 0xde, -0x0a, 0x83, 0x5a, 0x29, 0x78, 0x55, 0xe9, 0xff, -0xca, 0xed, 0x8d, 0xe6, 0x5f, 0xd4, 0x46, 0x32, -0x98, 0x24, 0xfe, 0x31, 0xce, 0xbf, 0xc0, 0xf8, -0x67, 0xe5, 0x6a, 0xa1, 0xbe, 0x63, 0xe1, 0x60, -0x4e, 0x18, 0xe4, 0x44, 0xfe, 0xe7, 0x6f, 0x11, -0x9e, 0xa7, 0xb0, 0x9e, 0xd2, 0x38, 0x35, 0xd2, -0xf9, 0xfb, 0xe5, 0x24, 0xfe, 0x59, 0x51, 0xb1, -0xd0, 0x67, 0xbf, 0x7d, 0x50, 0xe9, 0x7f, 0x7f, -0x30, 0x97, 0xe8, 0x7f, 0x6f, 0x72, 0x6d, 0xc6, -0xf6, 0x14, 0xef, 0x43, 0xcd, 0xeb, 0x2a, 0x21, -0x3e, 0xe4, 0x29, 0x76, 0xfd, 0xb1, 0x02, 0x56, -0x17, 0xe3, 0x45, 0xcd, 0x2f, 0x07, 0x2f, 0x93, -0x42, 0x18, 0xf7, 0xff, 0xe9, 0x4a, 0xe2, 0x9f, -0x3d, 0x02, 0x1f, 0x52, 0xfc, 0x1f, 0xd9, 0xef, -0xfa, 0x56, 0xf6, 0xab, 0x37, 0x25, 0xff, 0xe7, -0x57, 0xe8, 0xf5, 0xcf, 0x27, 0x1b, 0xc1, 0x68, -0x20, 0xf8, 0xff, 0xcc, 0xc4, 0xb6, 0xcf, 0x6d, -0xb9, 0xc8, 0xff, 0xe7, 0x20, 0x5a, 0xec, 0x62, -0xd8, 0xe3, 0x2b, 0xf8, 0x67, 0x8a, 0x88, 0x7f, -0x28, 0xcd, 0x55, 0xdc, 0x81, 0x9a, 0x6f, 0xac, -0x76, 0x1b, 0xf1, 0x32, 0x9b, 0x74, 0xf8, 0xc7, -0xde, 0x1f, 0xa6, 0x7d, 0x51, 0x4c, 0xfb, 0x68, -0xeb, 0x89, 0x6f, 0x70, 0xff, 0x9f, 0xbf, 0xea, -0x27, 0xf7, 0x3f, 0xed, 0x9c, 0xfd, 0x0c, 0xb7, -0x75, 0x6a, 0x93, 0xf1, 0x8f, 0xc7, 0xf8, 0xcf, -0x88, 0xff, 0x89, 0x7e, 0xbb, 0x99, 0xe8, 0x85, -0x72, 0x9b, 0x93, 0xf8, 0x67, 0x1a, 0xe7, 0x1b, -0x1d, 0xb7, 0xd8, 0x49, 0x69, 0x37, 0x6b, 0x20, -0x0b, 0xff, 0xd3, 0xe6, 0xb0, 0x6e, 0x77, 0x6c, -0xfb, 0xb3, 0x1e, 0xe2, 0x7f, 0xc4, 0xfe, 0xf7, -0x0d, 0x44, 0xff, 0x13, 0x1e, 0x5b, 0xdd, 0x31, -0x5f, 0xa1, 0x32, 0x42, 0x1c, 0xff, 0x04, 0x0c, -0xff, 0x4c, 0x39, 0xa3, 0xfc, 0xd9, 0x02, 0xf8, -0xa7, 0xc7, 0xb9, 0x3f, 0xd6, 0xff, 0x84, 0x68, -0xc7, 0x7f, 0x7a, 0xc7, 0x0d, 0xe5, 0x0d, 0x5d, -0x6b, 0xcc, 0xf8, 0xa7, 0x18, 0xee, 0x96, 0xb1, -0x7a, 0x70, 0xf7, 0xf5, 0x48, 0xd3, 0x08, 0x76, -0x6a, 0x0a, 0x5d, 0xaf, 0x6f, 0x1f, 0x45, 0xa7, -0xfb, 0x62, 0xff, 0x1f, 0xff, 0xe9, 0xbe, 0xd6, -0xf8, 0x45, 0x3e, 0xc2, 0x3f, 0x5d, 0x91, 0x10, -0x3a, 0x0a, 0x5c, 0x96, 0xff, 0x83, 0x33, 0xfb, -0xd0, 0xaf, 0x8b, 0x91, 0xff, 0x0f, 0xf6, 0x2f, -0x9a, 0x57, 0xaa, 0xfe, 0x2e, 0xc5, 0x3f, 0xdb, -0x22, 0x85, 0x46, 0x18, 0x7c, 0xb3, 0x63, 0x91, -0xc0, 0xff, 0xf4, 0xc5, 0xb6, 0x3f, 0x98, 0x2f, -0xba, 0x47, 0x90, 0x3d, 0x4b, 0x0a, 0x46, 0x4f, -0xf0, 0x7f, 0x0e, 0x44, 0xb7, 0xd5, 0x26, 0x31, -0x8d, 0x1d, 0xec, 0xe8, 0x9f, 0x29, 0xf4, 0xbf, -0xf7, 0xa0, 0xe7, 0x72, 0x91, 0x69, 0xcf, 0xf8, -0x94, 0xe7, 0xd0, 0x47, 0xa2, 0x8d, 0x33, 0x56, -0x54, 0xc6, 0x41, 0x95, 0xd0, 0x0f, 0x1b, 0xc3, -0x00, 0x92, 0x96, 0xbf, 0x4e, 0xc3, 0x3f, 0x45, -0xf7, 0xa2, 0xe2, 0x7e, 0x73, 0x26, 0xe2, 0x7f, -0x6a, 0x40, 0xfc, 0xb3, 0xd7, 0xde, 0xe4, 0xab, -0xc7, 0x6e, 0xf2, 0x13, 0x01, 0xff, 0xdc, 0xe4, -0x79, 0xea, 0xf5, 0x06, 0xfe, 0x67, 0x3a, 0x42, -0xfb, 0xd6, 0x36, 0x9f, 0x8a, 0xf0, 0x00, 0x15, -0x06, 0xe3, 0x27, 0x70, 0x20, 0x4e, 0x94, 0x9f, -0xc0, 0x3f, 0x41, 0xb8, 0xff, 0x9c, 0xef, 0x8c, -0x9a, 0xbc, 0xc6, 0x83, 0x58, 0xff, 0x13, 0x2e, -0x33, 0x3c, 0xf1, 0x4f, 0x85, 0x27, 0xce, 0xdb, -0x6b, 0x2f, 0xf9, 0x49, 0xfc, 0x53, 0xd1, 0xc7, -0xf5, 0x51, 0xbf, 0xb5, 0x56, 0x9d, 0x24, 0x83, -0x9c, 0xe2, 0xf3, 0x2b, 0xc0, 0xa3, 0x31, 0x24, -0xfc, 0x83, 0x50, 0xf8, 0x1e, 0xb8, 0x37, 0xdc, -0x0e, 0xa2, 0x3e, 0x10, 0x5d, 0x80, 0xc4, 0x1f, -0x1b, 0x85, 0x77, 0xe7, 0x87, 0x3b, 0xb0, 0x21, -0x10, 0x7f, 0x76, 0xa1, 0x79, 0xc8, 0xf1, 0xc3, -0x1d, 0xd2, 0x10, 0x5c, 0xcd, 0xf7, 0x07, 0xe1, -0x7f, 0xb6, 0x83, 0x2c, 0x63, 0x20, 0xfc, 0x98, -0x2f, 0x8c, 0x83, 0xab, 0xf9, 0xfe, 0xc9, 0xfe, -0x7c, 0xc6, 0xf2, 0xef, 0xe2, 0x59, 0x7e, 0x83, -0xe8, 0xdb, 0x68, 0x76, 0xc9, 0x10, 0xd8, 0x1f, -0xfb, 0xfb, 0x3f, 0xe1, 0xfc, 0xdb, 0x6e, 0x90, -0x21, 0xe7, 0x39, 0x81, 0x5f, 0x9a, 0xdc, 0xcf, -0xca, 0x95, 0x59, 0xae, 0xaa, 0xab, 0xfb, 0x98, -0x5f, 0xff, 0x07, 0xf8, 0x59, 0x35, 0x31, 0x31, -0x51, 0x4a, 0x09, 0xfe, 0x3f, 0x5f, 0xff, 0x19, -0xfb, 0x7b, 0xfc, 0x7c, 0x3f, 0xfc, 0x7c, 0x3f, -0xbc, 0x8a, 0xfc, 0x7f, 0xbe, 0x1f, 0xa6, 0xfd, -0x7c, 0xd6, 0xf6, 0x9f, 0xcf, 0xd6, 0xf5, 0xa2, -0x3f, 0x36, 0x7e, 0x9b, 0x50, 0x02, 0x6d, 0x7d, -0xb0, 0x91, 0x06, 0x0d, 0x46, 0x7d, 0x38, 0xda, -0x5d, 0xaf, 0xa3, 0x9d, 0x3b, 0xc0, 0xfa, 0xa0, -0xa1, 0x2c, 0x08, 0xf0, 0x63, 0x39, 0xa1, 0x7e, -0x17, 0x15, 0x52, 0xab, 0xa1, 0xf7, 0x05, 0x01, -0xff, 0x27, 0xfc, 0x21, 0x95, 0x60, 0xae, 0xb6, -0x3e, 0xc8, 0x02, 0xb5, 0x3f, 0x11, 0xaa, 0x0f, -0xe6, 0x13, 0x65, 0xc1, 0x5e, 0x9d, 0x3f, 0x64, -0x8e, 0xb1, 0xc7, 0x59, 0xea, 0x83, 0xb4, 0x3f, -0x6e, 0xcc, 0x22, 0x83, 0x62, 0xb7, 0xf3, 0xb1, -0xb0, 0xa6, 0xfa, 0xe0, 0xe1, 0x78, 0x2c, 0x08, -0x6e, 0x8b, 0xbb, 0x25, 0xf6, 0x87, 0x5c, 0x01, -0xd6, 0x07, 0x05, 0x7d, 0x14, 0x8a, 0xdc, 0x90, -0x04, 0x59, 0x38, 0x50, 0x1f, 0x6c, 0xb2, 0x0f, -0xa1, 0xd7, 0xe0, 0xb2, 0xa9, 0x60, 0x94, 0x24, -0xf0, 0x63, 0xae, 0x5e, 0x6f, 0xe0, 0xce, 0x36, -0xd5, 0x07, 0xbf, 0xa8, 0xca, 0xa2, 0x58, 0xa9, -0x54, 0xac, 0x0f, 0xee, 0xd6, 0xa7, 0xb1, 0xa0, -0xf2, 0x63, 0xd8, 0x1f, 0xe9, 0x55, 0xb4, 0x1c, -0x2c, 0x0b, 0x72, 0xa3, 0x24, 0xad, 0x3f, 0x52, -0x06, 0x7e, 0x4c, 0xa8, 0xfe, 0x7c, 0x9d, 0xd3, -0x20, 0x8b, 0x53, 0xfb, 0xe3, 0x90, 0x3a, 0x16, -0x4d, 0xe0, 0xc7, 0xe8, 0xf5, 0x42, 0x7d, 0x70, -0x73, 0xc4, 0x8f, 0xc9, 0x7c, 0xce, 0x83, 0x8a, -0x3f, 0x64, 0xa6, 0xfe, 0x38, 0xce, 0x8f, 0x75, -0x55, 0x0a, 0xf5, 0x41, 0x6a, 0xcb, 0xec, 0xe8, -0xeb, 0x83, 0x09, 0x7f, 0x48, 0x1a, 0x54, 0xc8, -0x9f, 0xbc, 0x99, 0xd0, 0x87, 0x83, 0x65, 0x32, -0xc1, 0x58, 0xc0, 0xd8, 0x1f, 0xd7, 0xa8, 0x04, -0x62, 0x7d, 0xb0, 0x62, 0x97, 0x58, 0x0f, 0x6d, -0x02, 0xd6, 0x5b, 0x25, 0xcd, 0x87, 0x9d, 0x6e, -0x28, 0xcb, 0x02, 0xf5, 0xc1, 0x87, 0x45, 0x7d, -0xd4, 0x71, 0x46, 0x8b, 0x25, 0xf5, 0x51, 0x0b, -0x58, 0x7d, 0x10, 0xd4, 0x47, 0x1d, 0x4f, 0x04, -0x52, 0x7d, 0x30, 0xe2, 0x63, 0xe7, 0x64, 0xac, -0x0f, 0x7a, 0x15, 0x89, 0x69, 0x20, 0x75, 0x29, -0xfc, 0x18, 0x9e, 0xa7, 0x6c, 0x6d, 0x4d, 0xd1, -0x6f, 0x08, 0xf5, 0x41, 0x24, 0xe9, 0xa3, 0xbe, -0x91, 0x5a, 0x1f, 0xec, 0x89, 0xfd, 0xb1, 0x6b, -0xa3, 0x69, 0xb0, 0x19, 0xea, 0x83, 0xb3, 0x13, -0x7a, 0x0f, 0x50, 0xff, 0x23, 0xf0, 0x63, 0x15, -0x4c, 0xdf, 0xfb, 0x7d, 0x3c, 0x0d, 0x56, 0x3a, -0xb6, 0xd8, 0xaf, 0x86, 0x18, 0x3f, 0xf6, 0x2f, -0xf5, 0xbf, 0xe8, 0x21, 0x77, 0x7b, 0x1b, 0xfa, -0x69, 0x31, 0xf2, 0x47, 0x7a, 0x21, 0x20, 0x46, -0x49, 0x67, 0xef, 0x8e, 0xad, 0x9f, 0x3a, 0x24, -0x7f, 0xc8, 0x1d, 0x7c, 0x75, 0x1e, 0xd3, 0x83, -0x2d, 0x94, 0x84, 0x61, 0x49, 0x7f, 0xc8, 0x34, -0x3d, 0x8c, 0x50, 0x1f, 0x9c, 0x7e, 0x88, 0xca, -0xa2, 0xc2, 0xd5, 0x45, 0x65, 0x17, 0x32, 0x16, -0xe4, 0x47, 0xc2, 0x7a, 0x9f, 0x15, 0xf8, 0x31, -0xe1, 0x18, 0xd2, 0xea, 0x51, 0xc5, 0xfa, 0xa0, -0xf1, 0xbc, 0x7b, 0x52, 0xad, 0x0f, 0x36, 0xeb, -0xc7, 0x52, 0x40, 0xfc, 0x98, 0xa8, 0x07, 0x96, -0x82, 0xe7, 0xf0, 0x84, 0x35, 0x50, 0x1f, 0xfe, -0x63, 0x5a, 0x0f, 0x7a, 0xc4, 0x61, 0x63, 0x41, -0xc2, 0xb4, 0x2c, 0x23, 0xfe, 0xd8, 0x49, 0x7d, -0x54, 0xc0, 0x57, 0x57, 0x6c, 0xff, 0x4f, 0xdc, -0x16, 0x17, 0x7e, 0x32, 0x67, 0x88, 0x04, 0x8a, -0x3e, 0xfc, 0x72, 0xfd, 0x93, 0xe8, 0x8f, 0xd9, -0xf9, 0x35, 0x5c, 0x77, 0xb1, 0x3b, 0x1a, 0x0b, -0xf2, 0x6c, 0xdd, 0xc5, 0x58, 0xf1, 0x92, 0xa8, -0x0f, 0xde, 0x2d, 0x3e, 0x2d, 0xde, 0xaa, 0x73, -0xb5, 0x66, 0x7d, 0x54, 0xc9, 0x11, 0xd0, 0xce, -0x93, 0x43, 0xcd, 0x25, 0x07, 0xea, 0x8f, 0x1b, -0x65, 0xfb, 0xf3, 0x00, 0xda, 0x6d, 0xe3, 0x7e, -0x25, 0xf6, 0xbf, 0x5f, 0xa5, 0x04, 0xe1, 0xaf, -0x2e, 0x72, 0x7d, 0xb8, 0x2d, 0xe9, 0xa3, 0x9a, -0x4b, 0xa0, 0xde, 0x9e, 0xeb, 0xc3, 0xeb, 0x93, -0xfa, 0x70, 0xf0, 0xef, 0xe5, 0x1c, 0xc3, 0x4b, -0xc5, 0x7a, 0xf1, 0x79, 0xc8, 0xe9, 0xf4, 0x51, -0x6c, 0xff, 0x19, 0x72, 0x0f, 0xf1, 0x7e, 0x84, -0x77, 0xc4, 0xef, 0xaf, 0x85, 0xf1, 0xcf, 0x4d, -0xc2, 0xf3, 0xf0, 0x64, 0xe4, 0x6f, 0xd9, 0xc1, -0xef, 0xdf, 0x25, 0xc1, 0x07, 0xec, 0x79, 0x10, -0xf4, 0x51, 0x6a, 0x5a, 0x00, 0xfc, 0x33, 0xea, -0x72, 0x7d, 0x78, 0x14, 0x38, 0xdb, 0xa7, 0xa8, -0x7a, 0xa1, 0x71, 0x8e, 0x7f, 0x66, 0xd6, 0xa2, -0xf7, 0xdc, 0x95, 0xa5, 0xd3, 0x2d, 0xd3, 0x5e, -0x70, 0x7e, 0x17, 0xa2, 0x9d, 0xda, 0x36, 0x6e, -0x8b, 0xfd, 0x42, 0xf8, 0x6e, 0x87, 0xf1, 0xcf, -0x1d, 0x2f, 0xb2, 0xc7, 0xcd, 0x9f, 0x7e, 0x02, -0x5d, 0x62, 0xfd, 0x95, 0x0e, 0x4f, 0x4b, 0x7f, -0xdc, 0xa1, 0xa9, 0xd4, 0x07, 0x05, 0x7f, 0x72, -0xc0, 0xa8, 0x81, 0x14, 0x52, 0x05, 0x7d, 0xb8, -0x23, 0xe2, 0x1f, 0xdd, 0x7c, 0xc9, 0x8b, 0x0b, -0xe8, 0xf7, 0x7b, 0x92, 0x3e, 0xea, 0x07, 0x90, -0x3e, 0x6a, 0x7d, 0x57, 0x43, 0x99, 0xe1, 0xd5, -0x2d, 0x76, 0x8c, 0x7f, 0xf2, 0xc6, 0xfd, 0x87, -0xeb, 0xc3, 0xcb, 0xd3, 0xb1, 0x3e, 0x7c, 0x0e, -0x2c, 0x8b, 0x02, 0xfd, 0x21, 0x05, 0xbd, 0xca, -0x68, 0x16, 0x7d, 0xf8, 0x7e, 0xa2, 0xff, 0x89, -0xce, 0x3b, 0xcd, 0xfc, 0x50, 0x11, 0xff, 0x2c, -0x70, 0x85, 0xd3, 0xb6, 0x11, 0x3e, 0x7f, 0x85, -0xfa, 0xe0, 0x4d, 0x0b, 0xec, 0xf4, 0xeb, 0xb9, -0x3e, 0xbc, 0x69, 0xba, 0x88, 0x7f, 0x9a, 0x8a, -0x1a, 0x7d, 0x14, 0xdb, 0x7f, 0xba, 0xae, 0xed, -0x74, 0xe9, 0x7c, 0x58, 0x7b, 0xcc, 0x5b, 0x0a, -0xcf, 0x27, 0xbd, 0xc0, 0xf6, 0x9f, 0x63, 0x33, -0xf8, 0x18, 0x14, 0x5c, 0x38, 0x5b, 0x47, 0x96, -0xb9, 0x3c, 0x56, 0x88, 0x91, 0x5f, 0x7d, 0xc0, -0xf6, 0x9f, 0x15, 0x04, 0xff, 0xd4, 0xe0, 0x7a, -0xd9, 0x2b, 0x68, 0xe9, 0xc6, 0x5a, 0x50, 0x4f, -0xc5, 0xf5, 0x51, 0x4e, 0x31, 0xf6, 0x87, 0x8c, -0xf1, 0x4f, 0x23, 0x72, 0x82, 0x06, 0x05, 0x11, -0x35, 0x9c, 0xe5, 0xf8, 0xc7, 0x16, 0xf5, 0x51, -0xbe, 0xe7, 0xff, 0x50, 0x5a, 0xef, 0x7d, 0xc9, -0xfa, 0xe0, 0x1e, 0x7b, 0xbf, 0x50, 0x16, 0xcc, -0x3d, 0xac, 0xf1, 0x1b, 0x17, 0xf4, 0x51, 0xfb, -0x39, 0x7a, 0xf9, 0x30, 0xd7, 0xe0, 0xff, 0x02, -0xb8, 0xff, 0x1c, 0x9f, 0x0f, 0x3b, 0x20, 0xd6, -0x8b, 0xdf, 0xb5, 0x71, 0xf5, 0x50, 0xbd, 0x7e, -0xcd, 0x47, 0xcc, 0x1f, 0xdb, 0x49, 0xfa, 0x03, -0xa4, 0xcc, 0x87, 0x75, 0xb8, 0x3e, 0x8a, 0xb9, -0x61, 0x53, 0xd8, 0xd3, 0x08, 0xe0, 0x1f, 0xc7, -0x96, 0xaa, 0x81, 0x8b, 0x75, 0xf8, 0x87, 0xfe, -0xff, 0x22, 0x57, 0xf8, 0x6b, 0xbd, 0x4e, 0x9a, -0xaf, 0x2a, 0xea, 0xc3, 0x99, 0x3f, 0xb6, 0xb3, -0xe7, 0x76, 0x09, 0xed, 0xbc, 0x55, 0x47, 0xeb, -0x83, 0x53, 0xa5, 0xf9, 0x68, 0xf4, 0xeb, 0x05, -0x7d, 0x94, 0xa1, 0xff, 0x5d, 0xd0, 0x47, 0xed, -0x7a, 0x62, 0x23, 0xc7, 0x3f, 0x61, 0x50, 0xe0, -0xc7, 0xd6, 0xb4, 0x2b, 0x0e, 0x3d, 0xbf, 0xb8, -0x3e, 0xca, 0xd9, 0x8d, 0x37, 0x0d, 0x7a, 0xb7, -0x4b, 0x4a, 0x55, 0x5f, 0xe2, 0xfd, 0x71, 0x83, -0xb1, 0x50, 0x53, 0xd4, 0x47, 0x21, 0xf4, 0x33, -0xfb, 0x3a, 0x71, 0x75, 0x60, 0x63, 0x6f, 0x3f, -0xd7, 0x47, 0xd9, 0xe2, 0xfb, 0x97, 0xad, 0xd1, -0x87, 0x8b, 0xfa, 0xa8, 0x70, 0x51, 0x71, 0x7d, -0x70, 0xc4, 0x7e, 0x3c, 0xdc, 0x5d, 0xc1, 0xf9, -0x0e, 0xaf, 0xf2, 0xe7, 0xad, 0x5e, 0xc9, 0xcf, -0xb4, 0x11, 0x57, 0x39, 0xef, 0xd8, 0xfe, 0x33, -0xcf, 0x3d, 0xe1, 0xb0, 0xd3, 0x0d, 0xeb, 0xa3, -0xaa, 0xa1, 0xf3, 0x6e, 0x94, 0xdd, 0xcf, 0xde, -0x4c, 0xfe, 0x90, 0xe7, 0xd8, 0xfe, 0x13, 0x54, -0x28, 0xd7, 0x63, 0x7d, 0x54, 0x4e, 0x5b, 0x1f, -0x74, 0x0b, 0xbe, 0x38, 0x16, 0xa4, 0x14, 0x0d, -0xa6, 0x21, 0xf3, 0xbb, 0x99, 0x42, 0x58, 0xc0, -0x3f, 0x7b, 0x88, 0x3f, 0xc0, 0xe1, 0xfc, 0xdb, -0xf1, 0xfb, 0xf8, 0x91, 0x58, 0xff, 0xd3, 0x4f, -0x3e, 0x89, 0xf1, 0x1e, 0xc7, 0x3f, 0x33, 0x70, -0x19, 0x31, 0x5e, 0x5d, 0x31, 0xb6, 0x05, 0xc8, -0xcb, 0xfe, 0xd8, 0x49, 0x7d, 0x14, 0x01, 0xc9, -0x2f, 0xcb, 0xb6, 0xea, 0x5a, 0xfc, 0xb3, 0x87, -0x80, 0x9c, 0xfb, 0xad, 0x7f, 0x53, 0x60, 0x0f, -0xc0, 0xff, 0x84, 0xf8, 0x27, 0x5e, 0x54, 0x71, -0xa7, 0x81, 0xdf, 0xe0, 0xfc, 0x4f, 0xd9, 0x3e, -0x14, 0x83, 0x84, 0xa2, 0x65, 0x10, 0x8a, 0x73, -0xfe, 0x67, 0xf5, 0x0c, 0xa2, 0x56, 0x7a, 0x00, -0xb0, 0x65, 0xe6, 0xfd, 0x71, 0xaa, 0x3f, 0xf6, -0x8b, 0x39, 0x83, 0x3f, 0x12, 0xc7, 0x3f, 0xfd, -0x94, 0xff, 0x79, 0xb4, 0xda, 0xf0, 0x87, 0x09, -0xf8, 0x63, 0xb7, 0x00, 0xb6, 0x5a, 0x40, 0x7f, -0x5c, 0x89, 0xed, 0x3f, 0x55, 0x99, 0xf8, 0x9f, -0x51, 0xf7, 0x76, 0x85, 0xfd, 0x30, 0xf7, 0xc7, -0xdd, 0x12, 0x93, 0x3c, 0x27, 0xf8, 0x58, 0x58, -0xa3, 0x3e, 0x7c, 0xc6, 0x09, 0xff, 0x49, 0x2e, -0x8b, 0x12, 0xfb, 0x35, 0x34, 0xfc, 0x0f, 0x71, -0xa3, 0xea, 0x33, 0xe5, 0x5f, 0xe0, 0x7f, 0x66, -0x12, 0xfc, 0xb3, 0x11, 0xb0, 0xc5, 0xd6, 0xe8, -0xc3, 0x0f, 0x04, 0x5c, 0x06, 0x9f, 0xa6, 0x0f, -0xa7, 0xfa, 0xa8, 0xea, 0x13, 0x3f, 0x34, 0x34, -0xfe, 0x88, 0xfc, 0x4f, 0xac, 0x86, 0xaa, 0x7b, -0x2b, 0xbf, 0x85, 0x0b, 0xc5, 0x71, 0x30, 0x17, -0xd6, 0x87, 0xe7, 0x8a, 0x94, 0xf6, 0x31, 0x08, -0x77, 0x25, 0xfc, 0xe3, 0xe2, 0xb6, 0xb8, 0x0d, -0xf7, 0xe5, 0x17, 0x24, 0x8c, 0xa0, 0x35, 0xfa, -0x70, 0xc2, 0xff, 0xec, 0xc9, 0x67, 0xf2, 0xc7, -0x5e, 0x51, 0x21, 0xf0, 0x3f, 0x19, 0xfc, 0x91, -0x38, 0xfe, 0x99, 0x92, 0xc9, 0x1f, 0xbb, 0xab, -0x86, 0xcc, 0x07, 0x41, 0xd5, 0x9c, 0x08, 0xaa, -0xd4, 0xfb, 0x63, 0x33, 0x7d, 0xd4, 0x8b, 0xdd, -0x26, 0x7d, 0xb8, 0xca, 0xff, 0x40, 0xb6, 0x90, -0x10, 0xff, 0x33, 0x93, 0x80, 0x9c, 0x2a, 0x4b, -0x1d, 0x0b, 0x02, 0xf1, 0x3f, 0x68, 0x17, 0xd1, -0x83, 0xdd, 0x6f, 0x3b, 0xda, 0xf5, 0xca, 0xf8, -0x27, 0x4a, 0x5a, 0xbd, 0xc9, 0x6f, 0x5c, 0xf2, -0xc7, 0x8e, 0x6d, 0x9d, 0xee, 0x07, 0xc6, 0x82, -0x00, 0xfd, 0x71, 0x58, 0x1f, 0x75, 0x5c, 0x77, -0x19, 0xa0, 0x0f, 0x77, 0xa8, 0x3e, 0x7c, 0x57, -0xde, 0x23, 0x42, 0xb5, 0x8c, 0xfd, 0x71, 0x56, -0x1c, 0xf4, 0xa6, 0xf4, 0xc7, 0x71, 0xfc, 0x63, -0xd8, 0x7f, 0xb8, 0x3f, 0x76, 0xe0, 0xde, 0x96, -0xe1, 0xef, 0x97, 0xfb, 0x63, 0xf7, 0xf4, 0xdc, -0x9e, 0x8b, 0x40, 0xce, 0xd7, 0xab, 0x55, 0x5b, -0x48, 0x68, 0x3e, 0x2c, 0xc5, 0x3f, 0x8f, 0x19, -0xf1, 0x0f, 0xef, 0x8f, 0xe3, 0xfa, 0xf0, 0xf6, -0xb8, 0xbf, 0x29, 0xd6, 0x47, 0xad, 0x3a, 0x47, -0x83, 0xb2, 0x3c, 0x1f, 0x96, 0xee, 0x3f, 0x2e, -0xbd, 0xff, 0x3b, 0xe3, 0xdb, 0x2e, 0xd3, 0xa0, -0x24, 0xf7, 0xc7, 0x05, 0xe4, 0xfa, 0xaf, 0x55, -0xc9, 0xeb, 0x1d, 0xd0, 0xf4, 0xc7, 0x71, 0xfc, -0x23, 0xe4, 0xb3, 0x35, 0x91, 0x4f, 0xb1, 0x3f, -0x8e, 0x2d, 0x8a, 0xef, 0x9f, 0x05, 0xce, 0x08, -0xa1, 0x68, 0x02, 0x9a, 0xe0, 0x8f, 0x9d, 0x23, -0xf9, 0xe9, 0x4b, 0xa6, 0xe5, 0xb4, 0xc4, 0xff, -0xd0, 0xfb, 0x67, 0xf8, 0x67, 0x08, 0x18, 0x0b, -0x02, 0xea, 0xa3, 0x08, 0x9e, 0x69, 0x61, 0x63, -0xd9, 0x1b, 0xd5, 0xf3, 0x0b, 0xf4, 0x47, 0x32, -0x9c, 0x77, 0xa2, 0x3e, 0x8a, 0xa4, 0xe5, 0x01, -0x9a, 0x9f, 0xa5, 0xb1, 0x2d, 0xb6, 0x4e, 0x1f, -0xfe, 0x0f, 0x5b, 0xfd, 0x68, 0x51, 0x7f, 0x49, -0xf3, 0x73, 0x8c, 0xbc, 0x68, 0x8b, 0x46, 0x40, -0x25, 0x11, 0xff, 0xf4, 0xc9, 0xab, 0x7b, 0x3f, -0x4f, 0x26, 0xa6, 0xbd, 0x0b, 0xe3, 0x1f, 0x15, -0xed, 0x08, 0x41, 0xec, 0x0f, 0x79, 0x87, 0xae, -0x3f, 0xae, 0x29, 0x15, 0xff, 0x88, 0xfe, 0x00, -0xd3, 0xc9, 0xf4, 0x5b, 0xfa, 0x49, 0x43, 0xb4, -0xf0, 0x78, 0xbd, 0xec, 0x7e, 0xea, 0xf5, 0xb0, -0xa7, 0x01, 0xe0, 0x7f, 0x10, 0x30, 0x1f, 0x04, -0xa8, 0x7f, 0x65, 0xf0, 0x87, 0x9c, 0x6b, 0xf2, -0x47, 0x2a, 0x11, 0xfd, 0xf9, 0x52, 0xf9, 0xfb, -0xdd, 0x3b, 0x55, 0x7d, 0xb8, 0xf0, 0x18, 0x9c, -0x8f, 0xa7, 0x99, 0xa4, 0xfb, 0x23, 0x91, 0xb4, -0xec, 0x8b, 0xdd, 0xe3, 0x59, 0xc6, 0x76, 0xab, -0xf8, 0x47, 0x9a, 0x8f, 0x76, 0x40, 0x68, 0x9c, -0xe7, 0xc1, 0x2c, 0x09, 0xff, 0xac, 0x2d, 0x38, -0x0c, 0xed, 0x9c, 0x47, 0x2d, 0x49, 0xfc, 0x73, -0x18, 0xf6, 0x47, 0xa2, 0x69, 0x79, 0xbc, 0x44, -0xda, 0xe2, 0x88, 0xe2, 0x4e, 0xf5, 0x07, 0x98, -0x71, 0x41, 0x1c, 0x6b, 0xb8, 0xbc, 0xb4, 0x41, -0x68, 0x8b, 0x83, 0xfc, 0x01, 0xae, 0x39, 0xc1, -0xdb, 0x4c, 0x7e, 0xaa, 0x31, 0x0a, 0x90, 0xfc, -0x01, 0x9e, 0x10, 0x65, 0xf0, 0xd0, 0x7a, 0xb1, -0x3f, 0x00, 0xe3, 0x7f, 0xd6, 0xda, 0x82, 0x1a, -0xfc, 0xa1, 0x44, 0x3e, 0x35, 0xfe, 0x00, 0x82, -0x1b, 0x24, 0x5c, 0x08, 0xfb, 0x3d, 0xcd, 0x87, -0x25, 0x34, 0x48, 0x0a, 0xff, 0x23, 0xc1, 0x18, -0x81, 0xcf, 0xe9, 0xcd, 0xe2, 0x0f, 0xf9, 0x45, -0xe9, 0x98, 0x8e, 0x8f, 0xf2, 0x59, 0x06, 0x7f, -0x48, 0x2f, 0x0d, 0xff, 0x48, 0xf3, 0x61, 0x47, -0xd1, 0x72, 0x71, 0x99, 0x6b, 0x00, 0xfe, 0x27, -0xae, 0x7f, 0xd1, 0xea, 0x5e, 0x93, 0x4c, 0x6b, -0x98, 0xf0, 0x8f, 0x09, 0x0f, 0xdc, 0xf1, 0x86, -0xa6, 0xfe, 0xe5, 0x01, 0xf8, 0x27, 0x67, 0x98, -0x0f, 0xeb, 0x24, 0xf0, 0x8f, 0x7d, 0xf5, 0xfe, -0x90, 0xc9, 0xf9, 0x68, 0x3f, 0x92, 0xea, 0x59, -0x44, 0xef, 0xcd, 0xf9, 0x1f, 0x79, 0x3e, 0x9a, -0xd6, 0x1f, 0x00, 0x9e, 0x8f, 0x96, 0xc5, 0x1f, -0xc0, 0x6e, 0xd2, 0xda, 0x02, 0x40, 0xfc, 0xcf, -0x64, 0xfd, 0x01, 0x3c, 0xc8, 0x1f, 0x40, 0xe9, -0x6f, 0xe5, 0xfc, 0x8f, 0x30, 0x1f, 0x2d, 0x44, -0x3b, 0x43, 0xe9, 0xfe, 0x00, 0xd7, 0x1e, 0x12, -0xd8, 0x8c, 0xce, 0x54, 0xfc, 0xe3, 0x57, 0x30, -0xb5, 0x06, 0x9e, 0x06, 0xdb, 0x9a, 0xf6, 0xfe, -0x4e, 0xfc, 0x91, 0xca, 0xc4, 0x0d, 0x29, 0xdc, -0x7f, 0xb6, 0x73, 0x5b, 0x92, 0xc8, 0x1f, 0xa9, -0x0c, 0xf9, 0x03, 0x9c, 0x24, 0xab, 0x9b, 0xa7, -0xce, 0x87, 0x3d, 0x29, 0xf1, 0x3f, 0x72, 0xfd, -0xcb, 0xd6, 0xec, 0x3f, 0xe2, 0x7c, 0x34, 0xe1, -0x7c, 0x99, 0x40, 0x47, 0xe1, 0xf5, 0x9e, 0x85, -0xfc, 0xb1, 0x0d, 0xc1, 0xeb, 0x3a, 0x7f, 0x00, -0x4d, 0xc0, 0xf9, 0x1f, 0xc9, 0x1f, 0xe0, 0x7c, -0x06, 0x7f, 0xc8, 0x9c, 0x70, 0xbd, 0xb6, 0x9f, -0x4b, 0xe9, 0x8f, 0x1b, 0x20, 0xe7, 0x1d, 0xc6, -0x3f, 0x3b, 0xc5, 0xfc, 0xf8, 0x49, 0xfc, 0xe3, -0x44, 0x6a, 0x13, 0xac, 0x0f, 0x1f, 0x09, 0xde, -0xa4, 0xfa, 0x70, 0xba, 0xde, 0xdd, 0x97, 0x56, -0x47, 0xbf, 0x2a, 0x27, 0xfd, 0x91, 0xb0, 0x09, -0xf6, 0xe5, 0xb8, 0x1f, 0x50, 0x68, 0xeb, 0x7e, -0x1b, 0x91, 0xd1, 0xb1, 0x06, 0xfc, 0x53, 0x33, -0x96, 0x9b, 0xa4, 0x3f, 0xc0, 0xa4, 0xe6, 0x83, -0x68, 0xf8, 0x1f, 0x93, 0x3f, 0xf6, 0x26, 0x1c, -0xd4, 0x4a, 0x83, 0x7a, 0x27, 0x8f, 0x7f, 0xe8, -0xf3, 0xc9, 0xf1, 0xcf, 0x34, 0xc3, 0xf3, 0x00, -0xcc, 0x87, 0x3d, 0xa2, 0x7e, 0x2d, 0x3f, 0xe8, -0x35, 0xf8, 0xc7, 0xc0, 0xff, 0xd0, 0x1f, 0xd8, -0x1f, 0x3b, 0x83, 0xfe, 0xc7, 0xd8, 0x2f, 0x2f, -0xe9, 0x7f, 0x6c, 0x99, 0xed, 0xb9, 0x1e, 0x07, -0x81, 0x96, 0xff, 0xb9, 0x56, 0x87, 0x0f, 0x61, -0xfe, 0xe7, 0xa0, 0xd6, 0x9f, 0x4a, 0x83, 0x7f, -0xb8, 0x3f, 0x76, 0x26, 0x7f, 0xc8, 0x93, 0x99, -0xfc, 0x01, 0x24, 0x7f, 0x24, 0x75, 0xec, 0x8e, -0x09, 0xff, 0xfc, 0xe4, 0x20, 0x47, 0x3b, 0x98, -0xf6, 0xa9, 0xfe, 0x44, 0xf1, 0x8f, 0x26, 0xf8, -0xe4, 0xfd, 0xb1, 0xe9, 0x4f, 0x46, 0x7f, 0x6c, -0x76, 0xfd, 0x31, 0x11, 0xff, 0x68, 0x03, 0xed, -0x7c, 0xd8, 0x38, 0x70, 0x92, 0x9f, 0x70, 0xfc, -0xb3, 0x87, 0xf1, 0x3f, 0x20, 0x7f, 0xf2, 0x8c, -0x41, 0xff, 0x13, 0xf3, 0x3f, 0x75, 0x22, 0xfe, -0xb1, 0x7a, 0x0c, 0xf3, 0x41, 0xa0, 0x85, 0xef, -0x30, 0xe0, 0x9f, 0x38, 0xb1, 0x55, 0x52, 0x3e, -0xef, 0x4d, 0xe2, 0x9f, 0x87, 0xeb, 0xd9, 0xdd, -0xc6, 0xf7, 0x5f, 0x2d, 0xdc, 0x7f, 0x3f, 0xbd, -0xff, 0x49, 0xfb, 0x23, 0x31, 0xfc, 0xb3, 0x88, -0xe3, 0x1f, 0xc3, 0x7c, 0x3a, 0x61, 0x3e, 0x2c, -0xe5, 0x7f, 0xbc, 0x88, 0xcf, 0x94, 0x0b, 0x61, -0x63, 0x06, 0xfc, 0xe3, 0x02, 0xfc, 0xcf, 0x00, -0xc3, 0x3f, 0x6c, 0x3e, 0x2c, 0xf3, 0x47, 0xda, -0x68, 0xb1, 0xb1, 0x1a, 0x2c, 0x78, 0x99, 0x06, -0x03, 0x37, 0xd2, 0xef, 0x67, 0xfe, 0x48, 0x5f, -0x63, 0x63, 0x41, 0xa6, 0x31, 0xd8, 0xf3, 0x2a, -0xd3, 0xff, 0xb0, 0xf9, 0xd4, 0xcc, 0x1f, 0xd2, -0x05, 0xb6, 0x91, 0x61, 0x86, 0x7f, 0xf8, 0xfb, -0x11, 0x3d, 0xbf, 0xd8, 0x58, 0xab, 0xe3, 0xfc, -0xd8, 0xfa, 0x88, 0xe9, 0x7f, 0x14, 0x7f, 0xc8, -0xf0, 0xfe, 0xc9, 0x6e, 0xb3, 0x22, 0x0c, 0x1e, -0x49, 0xdc, 0x3f, 0xe0, 0x8f, 0xc4, 0xae, 0x17, -0xf0, 0x0f, 0xbb, 0x9e, 0xeb, 0x6d, 0xa8, 0x3f, -0x52, 0xde, 0x25, 0x69, 0x5c, 0x13, 0x0f, 0xaa, -0x96, 0xf3, 0xc9, 0xf1, 0xcf, 0x16, 0x8a, 0x7f, -0x28, 0x9f, 0xf3, 0x34, 0xb4, 0xde, 0x67, 0xb3, -0xe1, 0x1f, 0x76, 0x3d, 0xd7, 0x07, 0x96, 0x28, -0xfe, 0x19, 0x82, 0x8e, 0x39, 0x83, 0x3f, 0x12, -0x34, 0x96, 0x7d, 0x98, 0xeb, 0x7f, 0x14, 0xfe, -0x07, 0x1a, 0x83, 0x35, 0x0c, 0xe0, 0x9f, 0xa4, -0xde, 0x03, 0x1b, 0x65, 0x2b, 0xf9, 0x11, 0xfa, -0xe3, 0x6a, 0xb6, 0x26, 0xf8, 0xae, 0x47, 0x70, -0xb0, 0x51, 0x5e, 0xaf, 0xe2, 0x0f, 0x29, 0x2c, -0xf3, 0x22, 0xb0, 0x5e, 0x8e, 0x7f, 0x4e, 0x55, -0x5c, 0xb1, 0x27, 0x76, 0x24, 0x68, 0x9f, 0x8d, -0x0c, 0xff, 0xbc, 0x13, 0x57, 0x54, 0x85, 0xfa, -0xd7, 0x4c, 0x15, 0xed, 0x0c, 0x06, 0xf1, 0xc4, -0x90, 0x9d, 0x23, 0x91, 0x75, 0x40, 0xd5, 0x31, -0x6b, 0x54, 0xad, 0x7f, 0xa9, 0xc7, 0xd0, 0x52, -0x6b, 0xb0, 0xb8, 0x2f, 0xcc, 0x4f, 0xa5, 0x41, -0xff, 0x43, 0x82, 0x87, 0xc2, 0x20, 0xc4, 0x3f, -0xb1, 0xf1, 0x54, 0x95, 0x88, 0x7f, 0x56, 0x9b, -0xf1, 0x0f, 0x2e, 0xcd, 0x14, 0x0e, 0xe7, 0xdf, -0xe7, 0xfa, 0x1f, 0x95, 0xff, 0x81, 0xfc, 0xa3, -0x14, 0xfe, 0xa7, 0x46, 0xfa, 0xda, 0xd7, 0x48, -0xe1, 0x95, 0x52, 0x1f, 0xdf, 0x61, 0xf8, 0xa7, -0x14, 0x3d, 0x0f, 0xb5, 0xba, 0x7e, 0xc9, 0xde, -0x24, 0xff, 0x33, 0x60, 0x43, 0xf8, 0x47, 0xe8, -0x30, 0x8d, 0x2a, 0xf2, 0x5d, 0x50, 0xfd, 0x4b, -0x80, 0x01, 0x49, 0xc7, 0x00, 0x41, 0xff, 0xe3, -0xdc, 0xac, 0xa0, 0x9d, 0x41, 0x3c, 0x1f, 0xa4, -0x14, 0x0d, 0x0a, 0x79, 0x2a, 0x0e, 0xbe, 0x2a, -0xf9, 0x03, 0x18, 0xf1, 0x4f, 0xcc, 0xff, 0xfc, -0x33, 0xcd, 0x0f, 0xd6, 0xff, 0xbc, 0x17, 0xc8, -0xb4, 0xd8, 0x85, 0xb8, 0x22, 0x86, 0x27, 0x86, -0xbc, 0xa6, 0xe0, 0x1f, 0x57, 0xf5, 0x87, 0x1c, -0x8f, 0x19, 0xa1, 0x51, 0xce, 0xa8, 0x27, 0xf5, -0x3f, 0xf3, 0x12, 0xeb, 0x3d, 0x40, 0x2b, 0x80, -0x64, 0x3e, 0x1a, 0xdf, 0x7f, 0xb6, 0x60, 0xfd, -0xb3, 0x95, 0x7c, 0xed, 0xea, 0x4e, 0x30, 0xd2, -0x82, 0xfe, 0xa7, 0x1e, 0x83, 0x9c, 0xa3, 0x09, -0xda, 0xe7, 0x2d, 0x3a, 0x31, 0x04, 0xf0, 0x07, -0xc8, 0xf2, 0x3e, 0xae, 0xf1, 0x07, 0x48, 0x04, -0x16, 0x0b, 0x54, 0xfc, 0x53, 0x6b, 0xc2, 0x33, -0x8d, 0x60, 0xfd, 0x2b, 0xd3, 0x7c, 0x10, 0x5a, -0xff, 0xaa, 0x32, 0xe3, 0x1f, 0xa9, 0xfe, 0x95, -0x01, 0xff, 0x28, 0xf5, 0x2f, 0x49, 0xc6, 0x73, -0x38, 0xae, 0x10, 0x75, 0x33, 0xa3, 0xc8, 0x0f, -0x24, 0xfe, 0xe7, 0x72, 0x22, 0x3f, 0x9b, 0x37, -0x46, 0x1d, 0xf7, 0x0f, 0xe4, 0x59, 0xea, 0xc4, -0xfa, 0x57, 0x51, 0x2d, 0x7b, 0x05, 0x11, 0xec, -0xd9, 0x69, 0x79, 0x45, 0xf2, 0x89, 0x4e, 0xff, -0x43, 0x06, 0xa5, 0x05, 0x44, 0xf6, 0xb3, 0x8b, -0x0e, 0x0a, 0xb9, 0x5f, 0xa9, 0x7f, 0xe5, 0x55, -0xd8, 0xe3, 0x12, 0x44, 0x94, 0xef, 0xeb, 0x30, -0xfb, 0x43, 0x6e, 0xa6, 0x8e, 0x07, 0xec, 0xfe, -0x0f, 0x4a, 0xf5, 0xaf, 0x74, 0xfc, 0x03, 0xd4, -0xbf, 0x12, 0x69, 0x6f, 0x93, 0x14, 0xe9, 0x62, -0xfd, 0xeb, 0x60, 0x92, 0xf6, 0x89, 0xe6, 0xc3, -0xb6, 0xc5, 0x9f, 0x60, 0xc7, 0x80, 0x3a, 0x4d, -0xfd, 0x6b, 0x30, 0x9a, 0x4e, 0xbe, 0x1e, 0x1b, -0xfb, 0x3f, 0x42, 0x1b, 0xdb, 0x7f, 0x9c, 0xe4, -0x7f, 0x58, 0xfd, 0x6b, 0x9b, 0x4c, 0x83, 0xe0, -0xc6, 0xf9, 0x29, 0xb8, 0xe3, 0x3e, 0xe1, 0x0f, -0xd9, 0xd3, 0x43, 0xf5, 0x3f, 0x16, 0xa7, 0x7d, -0xfc, 0x5f, 0x05, 0x5f, 0x2e, 0xd7, 0x6d, 0xcf, -0x5f, 0xf1, 0x7e, 0x13, 0x5c, 0xab, 0xe8, 0x7f, -0xea, 0x93, 0xdb, 0x38, 0xf1, 0x87, 0x7c, 0x34, -0x3f, 0x52, 0xc2, 0xc1, 0x2d, 0x52, 0xfd, 0x6b, -0xd7, 0x13, 0xae, 0x5a, 0xb6, 0x88, 0xe6, 0x5b, -0x8d, 0x77, 0x5f, 0x41, 0xa7, 0x77, 0x44, 0xa3, -0x63, 0x05, 0x7f, 0xc8, 0x99, 0xcc, 0x1f, 0x52, -0xb0, 0xa5, 0x65, 0x8c, 0xf4, 0x3d, 0xd9, 0xfc, -0x21, 0x0f, 0x24, 0xae, 0x2f, 0x79, 0x34, 0xff, -0x9e, 0x0d, 0x9d, 0x77, 0xdd, 0x72, 0xd0, 0x28, -0xd7, 0xbf, 0x1e, 0x4f, 0xac, 0x77, 0x9c, 0x4e, -0x8c, 0x65, 0x46, 0x88, 0x82, 0x1e, 0x3b, 0x77, -0x08, 0xdd, 0x09, 0x9f, 0x77, 0xa3, 0xf9, 0x11, -0x4b, 0xc1, 0x3f, 0xf3, 0x0c, 0xfa, 0xe7, 0x79, -0x80, 0x3f, 0xa4, 0x59, 0xff, 0x93, 0x63, 0x78, -0x06, 0xa8, 0x7f, 0x41, 0xef, 0xfb, 0xbf, 0x04, -0xeb, 0x5f, 0x2e, 0xfc, 0x5a, 0xba, 0x09, 0xaa, -0x7f, 0x61, 0xfc, 0xe3, 0xcb, 0xeb, 0x3d, 0x43, -0xd7, 0x7b, 0x06, 0x9d, 0xcf, 0xc5, 0xfe, 0x87, -0x6c, 0xff, 0xd9, 0x3b, 0x23, 0x95, 0xef, 0x3a, -0x9d, 0xa9, 0xfe, 0xe5, 0xd5, 0xae, 0xcd, 0x7f, -0x80, 0x4e, 0xa3, 0xd6, 0x4c, 0xfc, 0x0f, 0x5a, -0x5c, 0x76, 0xfa, 0x76, 0xe2, 0x8d, 0xa2, 0xb1, -0xa4, 0xf2, 0x3f, 0xb9, 0x58, 0xe6, 0x2d, 0x09, -0xed, 0x50, 0x95, 0x17, 0xa6, 0xa5, 0x1b, 0x1d, -0x4c, 0xe5, 0x7f, 0x48, 0xe0, 0x84, 0x69, 0xb4, -0xee, 0x45, 0x8b, 0x64, 0xfe, 0xc7, 0x07, 0x9e, -0x9f, 0x28, 0xc0, 0x0e, 0x36, 0x83, 0xe8, 0x39, -0xef, 0x0b, 0xf8, 0x93, 0x4c, 0xf3, 0xd1, 0x42, -0x84, 0xec, 0x5d, 0x2e, 0x5e, 0xa7, 0xab, 0x7f, -0x4d, 0x95, 0xbe, 0x7f, 0x29, 0xaa, 0x7b, 0x38, -0x3c, 0x1f, 0x2f, 0xb9, 0x4b, 0x15, 0xfe, 0x07, -0x9c, 0x2f, 0xb3, 0x0c, 0x07, 0x7f, 0x8a, 0x8e, -0x0f, 0x2d, 0x87, 0xea, 0x5f, 0xea, 0xf3, 0xe0, -0xa1, 0x6a, 0xdb, 0xaa, 0x40, 0xff, 0xe1, 0x37, -0x65, 0xe3, 0x7f, 0x16, 0xbe, 0x5e, 0xfd, 0x72, -0xd5, 0x1f, 0xa1, 0xc7, 0x00, 0xfe, 0x87, 0xc0, -0x1e, 0x6b, 0x90, 0x07, 0x97, 0x50, 0x4b, 0xae, -0xce, 0xcb, 0xa3, 0xdc, 0x25, 0xb4, 0x22, 0x9d, -0xff, 0x61, 0xfd, 0x5f, 0x17, 0xd1, 0x84, 0x7b, -0x9d, 0x66, 0x3e, 0x9a, 0xd0, 0x1f, 0x87, 0x3f, -0x59, 0x89, 0xf3, 0xdf, 0x8c, 0x47, 0xcf, 0x97, -0x0b, 0x2b, 0xaa, 0x17, 0x65, 0xe0, 0x7f, 0x1c, -0xac, 0x28, 0x38, 0x8a, 0xf6, 0x61, 0x85, 0xe1, -0x52, 0x68, 0x3e, 0x9a, 0xb4, 0xde, 0x25, 0x5e, -0xd5, 0xb0, 0xf5, 0x05, 0x0f, 0x57, 0xc4, 0x9c, -0x2e, 0xab, 0x25, 0xe1, 0x8f, 0x2d, 0xe5, 0x33, -0x1a, 0x3b, 0xb8, 0x15, 0x3b, 0xd2, 0x57, 0x21, -0x6c, 0x9d, 0xed, 0xb4, 0x58, 0x0d, 0xd0, 0x7c, -0xb4, 0x04, 0xed, 0x53, 0xeb, 0x85, 0xff, 0xbf, -0x57, 0xd0, 0x72, 0x3c, 0x3a, 0xa4, 0x0d, 0xe6, -0x7f, 0xba, 0xe4, 0x83, 0xa9, 0x7a, 0x14, 0x8d, -0xfa, 0x6d, 0x99, 0xf8, 0x1f, 0x3f, 0x52, 0xfc, -0x2e, 0x40, 0x1f, 0xee, 0x6d, 0xcc, 0xc4, 0xff, -0x04, 0xcd, 0x7e, 0x3c, 0xb1, 0xa2, 0xb3, 0x31, -0x1b, 0xff, 0xb3, 0xc8, 0xaf, 0x1c, 0xb2, 0x96, -0x55, 0x44, 0x13, 0x4e, 0xe1, 0xfa, 0x57, 0x87, -0x54, 0x06, 0x5a, 0xe2, 0x3b, 0x43, 0xd6, 0x74, -0x74, 0xa4, 0x69, 0x8b, 0xa1, 0xfe, 0x25, 0x9d, -0xbf, 0x35, 0x41, 0xbe, 0xc5, 0x1e, 0xf3, 0xda, -0xf4, 0xfe, 0xd8, 0x42, 0x80, 0x0b, 0x61, 0x0d, -0xbd, 0x23, 0xc5, 0x89, 0xa6, 0xc7, 0xd6, 0xa5, -0xd5, 0xbf, 0xa6, 0x2e, 0x88, 0x11, 0xd1, 0x4b, -0xf9, 0x97, 0xfc, 0xcb, 0xa8, 0xf5, 0x46, 0xec, -0x8f, 0xa4, 0x9b, 0x0f, 0x8b, 0x83, 0x7c, 0x67, -0x5c, 0x08, 0xdb, 0x89, 0x3f, 0x71, 0x1a, 0xb5, -0xfc, 0x0f, 0x09, 0xfa, 0x70, 0x23, 0x98, 0xd3, -0xec, 0xf7, 0x36, 0x58, 0xfd, 0xc1, 0x11, 0xd7, -0x4b, 0xaf, 0x7f, 0x6d, 0x16, 0x11, 0x51, 0x63, -0xaa, 0x3f, 0xb6, 0xc5, 0x10, 0x0e, 0x76, 0xfc, -0x3e, 0x9a, 0x99, 0xff, 0x79, 0x10, 0x07, 0x4e, -0x7b, 0x47, 0x5d, 0x8a, 0x3f, 0xb6, 0x55, 0x8e, -0x15, 0xe9, 0x3d, 0x79, 0x0f, 0x95, 0x36, 0x2e, -0x45, 0xcd, 0x1a, 0xfd, 0x0f, 0xc5, 0x3f, 0x53, -0x48, 0x30, 0x6c, 0xb5, 0xa1, 0x7f, 0x0c, 0x7e, -0x55, 0x74, 0xca, 0x46, 0x7f, 0xec, 0xc3, 0x0d, -0x83, 0x05, 0x1c, 0xcc, 0xfa, 0x92, 0x55, 0xeb, -0x77, 0x97, 0xbc, 0x6d, 0x95, 0x9e, 0xec, 0x8f, -0xed, 0x68, 0x68, 0xdb, 0xb1, 0xaa, 0x36, 0xf4, -0x13, 0xb4, 0x70, 0x53, 0x65, 0xa7, 0xc6, 0x1f, -0x5b, 0x01, 0x42, 0xd8, 0xbf, 0xb1, 0xb5, 0xb3, -0x66, 0x0b, 0x30, 0x1f, 0x16, 0x38, 0xdf, 0x5b, -0xf2, 0xc3, 0x16, 0x56, 0xd0, 0xd5, 0x16, 0x13, -0xf3, 0x61, 0x27, 0x82, 0xb9, 0xd2, 0xf9, 0x15, -0x0b, 0xa1, 0xeb, 0x86, 0xf3, 0xed, 0x21, 0xfe, -0x69, 0x2d, 0x17, 0x86, 0xf3, 0x48, 0xe5, 0x7f, -0xd4, 0xfb, 0x1f, 0xb5, 0x56, 0xf8, 0x77, 0xa3, -0x3f, 0x2b, 0x39, 0x9d, 0xd6, 0x22, 0x09, 0xff, -0x1c, 0x80, 0xaf, 0xef, 0xb4, 0x6e, 0x43, 0xd8, -0x61, 0x29, 0xbc, 0x1e, 0x81, 0xfe, 0xd8, 0x34, -0xc0, 0x78, 0xb2, 0x79, 0x2c, 0x0c, 0xd6, 0xa1, -0x1d, 0x41, 0x53, 0xc9, 0xf1, 0x2c, 0x47, 0xf2, -0xc7, 0x96, 0xe6, 0xdd, 0x57, 0x93, 0xf9, 0x17, -0xe5, 0x10, 0xff, 0xff, 0xcd, 0xce, 0x81, 0x9e, -0x46, 0xbc, 0xff, 0x2c, 0x4a, 0xe7, 0x7f, 0xfa, -0x31, 0xde, 0x0e, 0xde, 0xf5, 0xdb, 0xfb, 0xe6, -0x16, 0xf3, 0x5a, 0x7f, 0x6c, 0x12, 0xfc, 0x17, -0x16, 0x42, 0x0f, 0x75, 0x2f, 0x0b, 0xf1, 0xd5, -0xb7, 0x0f, 0x16, 0xca, 0xf3, 0xb5, 0xfe, 0xd8, -0x24, 0xb8, 0x17, 0x07, 0x7d, 0xd6, 0xc2, 0xe0, -0xde, 0xf2, 0xf2, 0x3e, 0xa7, 0x98, 0x3a, 0x1f, -0xed, 0x21, 0x6f, 0x71, 0x69, 0x56, 0x93, 0x55, -0x08, 0x7a, 0x77, 0xec, 0x1f, 0xc2, 0xd7, 0x9b, -0xf8, 0x1f, 0x6b, 0x84, 0xbf, 0x9f, 0xee, 0x08, -0xf7, 0xe7, 0x26, 0x4f, 0x9d, 0x0f, 0x22, 0xae, -0x37, 0xbc, 0xfe, 0x15, 0x1c, 0x14, 0xf3, 0xd8, -0x3f, 0xf3, 0xb1, 0x52, 0xa1, 0x68, 0xe4, 0x7f, -0x46, 0xa7, 0x8e, 0x87, 0xfb, 0xc9, 0xaa, 0xd2, -0x54, 0xfc, 0xc9, 0x65, 0x74, 0x57, 0xa9, 0xae, -0xd3, 0x5c, 0xff, 0x9a, 0xac, 0x3f, 0xf6, 0xe4, -0xea, 0x5f, 0xa2, 0x4d, 0xf1, 0x6e, 0xfa, 0x7e, -0x91, 0x45, 0xff, 0x33, 0x8b, 0x37, 0x52, 0x21, -0x65, 0x3e, 0x1a, 0xcf, 0x8f, 0x40, 0xd4, 0xac, -0xe1, 0xfa, 0xe7, 0xdf, 0xcf, 0x7c, 0xd8, 0xa4, -0x2d, 0x79, 0x5a, 0xfd, 0xeb, 0xb5, 0x74, 0xfd, -0xb3, 0x84, 0x7f, 0x92, 0x36, 0x86, 0xda, 0xfa, -0xd7, 0x37, 0x30, 0x0c, 0xb8, 0x42, 0xd9, 0x8f, -0x94, 0xfa, 0x17, 0x1f, 0x0b, 0xfb, 0x54, 0x06, -0xfd, 0xf3, 0xb5, 0xd8, 0x1f, 0x52, 0x86, 0x3d, -0x9f, 0x66, 0xfd, 0x4b, 0x87, 0x7f, 0x0c, 0xf5, -0xaf, 0x0c, 0xf5, 0x44, 0x70, 0x3e, 0xac, 0xa1, -0xff, 0xeb, 0xb3, 0x50, 0xff, 0x5a, 0xff, 0xe9, -0xce, 0x87, 0x05, 0x96, 0x39, 0x3f, 0x65, 0x3e, -0xc8, 0xa4, 0xf4, 0xcf, 0xf8, 0xb7, 0x49, 0x22, -0x28, 0x5b, 0xff, 0xbb, 0x1a, 0x20, 0x59, 0xff, -0x43, 0xfd, 0x21, 0xdd, 0xfb, 0xc4, 0x65, 0x56, -0x4a, 0xeb, 0x9d, 0x94, 0xfe, 0x27, 0xc1, 0xff, -0xbc, 0x22, 0xf4, 0xbb, 0xc1, 0xf7, 0xff, 0x69, -0xcc, 0x07, 0xc9, 0x3e, 0x1f, 0x76, 0x32, 0xfa, -0x1f, 0x70, 0x3e, 0x08, 0xa0, 0x7f, 0xa6, 0xdf, -0xaf, 0xe0, 0x9f, 0xa9, 0x4a, 0xa0, 0x9d, 0x8f, -0x96, 0x0c, 0xe2, 0xc6, 0xf0, 0x93, 0x75, 0xca, -0x7c, 0x90, 0xbe, 0xf8, 0xb4, 0xf2, 0xff, 0x37, -0xd2, 0xff, 0xcc, 0x27, 0xfe, 0x90, 0x63, 0x77, -0xe0, 0x89, 0x57, 0xed, 0xea, 0x7c, 0x10, 0xd2, -0xff, 0x45, 0xf4, 0x3f, 0xdb, 0xa8, 0xfe, 0x99, -0x04, 0xc3, 0x2a, 0xff, 0xe3, 0xb1, 0xd5, 0xf1, -0xeb, 0x23, 0xfd, 0xb3, 0x43, 0x02, 0x78, 0x3e, -0x08, 0x7e, 0x8d, 0x85, 0xf3, 0x99, 0x9c, 0x0f, -0xb2, 0x98, 0x2e, 0x53, 0xa3, 0xff, 0x81, 0xe6, -0x83, 0x98, 0xf6, 0xdb, 0x34, 0xfc, 0x43, 0x82, -0x13, 0x2a, 0xff, 0x03, 0xe3, 0x9f, 0x38, 0x20, -0xe7, 0x6f, 0x5e, 0x3b, 0x1f, 0x36, 0x8b, 0xfe, -0x07, 0xe3, 0x1f, 0x2f, 0xce, 0x46, 0x20, 0xf4, -0x7f, 0xf1, 0xfc, 0x3c, 0xf3, 0x10, 0x30, 0x1f, -0x8d, 0x57, 0x73, 0xe8, 0x32, 0x07, 0xe8, 0x1b, -0xf7, 0x80, 0x52, 0xff, 0xba, 0xe4, 0xde, 0x45, -0xd5, 0x3e, 0x7c, 0xbd, 0x43, 0x62, 0x23, 0xb3, -0x99, 0xff, 0x19, 0x0f, 0x26, 0x16, 0xb4, 0x0e, -0x14, 0xba, 0xf2, 0xed, 0xe1, 0x1b, 0x52, 0x2b, -0xfe, 0x86, 0x16, 0x5e, 0xff, 0x02, 0xf0, 0xcf, -0x3b, 0xe8, 0x78, 0x5f, 0xe3, 0x36, 0x3c, 0x31, -0xd6, 0xe9, 0x0d, 0x1e, 0x7e, 0xb4, 0xfa, 0x5f, -0x2d, 0x8f, 0xd7, 0xbf, 0x00, 0xfd, 0x4f, 0xbf, -0x1f, 0x3e, 0x18, 0x78, 0x10, 0x61, 0x33, 0xea, -0x0d, 0x9f, 0x90, 0xf5, 0x2d, 0x96, 0x65, 0x9a, -0x0f, 0x12, 0xa5, 0xbd, 0x11, 0x85, 0xdf, 0x1f, -0x5e, 0xbf, 0xab, 0xb1, 0x54, 0x7d, 0xa4, 0xa3, -0x85, 0xed, 0x27, 0xff, 0xd7, 0xde, 0xd5, 0x07, -0xd7, 0x55, 0x5c, 0xf7, 0xb3, 0xf7, 0xed, 0x95, -0xaf, 0xa4, 0x27, 0xeb, 0x3e, 0xe9, 0x3d, 0xfb, -0xc1, 0x18, 0xb8, 0x92, 0x0d, 0x68, 0x88, 0x21, -0x4f, 0xc2, 0x80, 0x83, 0x29, 0xba, 0x7a, 0xfa, -0xb0, 0xfc, 0x01, 0x7e, 0xd8, 0xb2, 0x51, 0xa9, -0xa6, 0x73, 0xcd, 0xb8, 0x0c, 0x9d, 0x71, 0x33, -0xb6, 0x3b, 0x0d, 0x74, 0x9a, 0xc2, 0x7d, 0x92, -0x30, 0x9a, 0x40, 0xca, 0xab, 0xe3, 0x0e, 0x62, -0x86, 0x19, 0x5e, 0x52, 0x4f, 0xca, 0x4c, 0x68, -0x47, 0x40, 0x08, 0xce, 0x40, 0xe2, 0x27, 0x23, -0x1b, 0x07, 0x13, 0xaa, 0x52, 0x27, 0xf1, 0x50, -0x0f, 0xb6, 0x3b, 0x2e, 0xe3, 0xb4, 0x06, 0x9c, -0xc1, 0x09, 0x76, 0xc0, 0xb8, 0x67, 0x77, 0xef, -0xc7, 0xde, 0xf7, 0x25, 0x19, 0x02, 0xed, 0x24, -0xf7, 0xfc, 0xe3, 0xdf, 0xec, 0x5b, 0x5d, 0xef, -0xdd, 0xbb, 0x7b, 0xf6, 0xb7, 0x67, 0xf7, 0x9c, -0x53, 0xc2, 0x7f, 0x38, 0xf8, 0x00, 0x52, 0x85, -0xc5, 0xec, 0x46, 0xfd, 0x2b, 0x76, 0x87, 0xb9, -0x66, 0x77, 0xbd, 0x5e, 0xea, 0xff, 0x15, 0x18, -0x0f, 0xe7, 0x61, 0x0f, 0x03, 0x9f, 0xd8, 0x17, -0xd8, 0x7a, 0xd7, 0x56, 0xe6, 0xfc, 0xcb, 0x35, -0xfb, 0x30, 0x70, 0x82, 0x5b, 0xe4, 0xa2, 0xe2, -0xc6, 0x7e, 0x87, 0xb9, 0xf8, 0xd9, 0xfa, 0x54, -0xa5, 0xfb, 0x3f, 0xee, 0xfd, 0x67, 0xe4, 0xc3, -0x1a, 0xe3, 0xb7, 0x2f, 0xa9, 0xad, 0x47, 0xf0, -0x45, 0x3a, 0x2a, 0xd9, 0x7f, 0x9c, 0xf9, 0xf2, -0x1c, 0xf0, 0xc0, 0xce, 0x94, 0x97, 0x20, 0x48, -0x79, 0xfa, 0xe7, 0x98, 0x6c, 0xff, 0xd9, 0xe3, -0x1e, 0x0c, 0x7d, 0xdf, 0x5e, 0x6c, 0x69, 0x5f, -0x57, 0x2e, 0x67, 0x25, 0x79, 0x6d, 0xb3, 0x92, -0x2c, 0xc7, 0x7f, 0xb8, 0xd9, 0x87, 0x81, 0x29, -0x56, 0x62, 0x47, 0x53, 0x11, 0xfc, 0xc9, 0x4c, -0x15, 0x10, 0x5c, 0x5a, 0xc9, 0xfe, 0xb3, 0xc7, -0xeb, 0x28, 0xf8, 0xf2, 0x34, 0x8b, 0x9f, 0xa0, -0xef, 0x99, 0x81, 0xff, 0x3c, 0xb6, 0x3b, 0xf2, -0x2f, 0xf0, 0x1a, 0x76, 0x54, 0x54, 0xe8, 0xab, -0x0e, 0xb3, 0x71, 0x3c, 0x52, 0xe7, 0xfb, 0x7f, -0x95, 0xf0, 0x1f, 0x76, 0xec, 0x35, 0xca, 0xb6, -0x51, 0x8e, 0x86, 0xb1, 0xeb, 0x4d, 0xe5, 0x66, -0x29, 0xde, 0x45, 0x31, 0xff, 0x39, 0xab, 0x6c, -0x87, 0x11, 0xdb, 0xe0, 0x19, 0x63, 0xd9, 0xfb, -0x5a, 0xf5, 0x49, 0x69, 0xff, 0x85, 0xfc, 0x47, -0x2f, 0x1e, 0x6f, 0x51, 0x65, 0x04, 0xf2, 0x53, -0x6d, 0x29, 0xe5, 0x0d, 0x78, 0x3e, 0x63, 0x1c, -0xab, 0x4f, 0xd6, 0x35, 0x49, 0xf1, 0xb1, 0x4b, -0xf9, 0xcf, 0xd3, 0xf0, 0x06, 0xb4, 0x4f, 0xe0, -0xb6, 0xe2, 0xb7, 0xf0, 0x89, 0xfd, 0x7c, 0xbe, -0xf1, 0xbf, 0x23, 0x4b, 0x67, 0xe6, 0x3f, 0x1a, -0x03, 0xe6, 0x59, 0xf8, 0x31, 0x9d, 0x05, 0xff, -0xf9, 0x15, 0x1b, 0x36, 0x08, 0xe8, 0x4f, 0xb4, -0x94, 0x19, 0x9d, 0x89, 0xff, 0xfc, 0x17, 0xfc, -0x30, 0xdd, 0x9a, 0xd1, 0x72, 0xfc, 0xbe, 0xca, -0x77, 0xcc, 0xb6, 0x9d, 0x33, 0xf1, 0x1f, 0xe3, -0x25, 0xad, 0x35, 0xbd, 0x72, 0x9c, 0x1f, 0xdc, -0xb4, 0x9a, 0x5a, 0x6e, 0x78, 0x06, 0xfe, 0xb3, -0xeb, 0xd9, 0x36, 0x63, 0x65, 0x9d, 0x8e, 0xf5, -0xb3, 0x00, 0x2b, 0xb5, 0xa6, 0xe1, 0x19, 0xf8, -0x8f, 0x7d, 0xd6, 0xe8, 0xd0, 0xe6, 0xb2, 0x92, -0x03, 0xd0, 0xa1, 0xad, 0x1e, 0x96, 0xfd, 0xbf, -0xca, 0xf0, 0x9f, 0x33, 0x6c, 0x7e, 0x99, 0x0d, -0xd3, 0xcd, 0x67, 0x94, 0x5f, 0xb3, 0xd4, 0x8d, -0xd3, 0x33, 0xdd, 0x7f, 0x36, 0xce, 0xb5, 0x75, -0xb0, 0x8c, 0x90, 0xbc, 0xa3, 0x56, 0x46, 0x77, -0x8c, 0x54, 0xe5, 0x3f, 0xf8, 0x45, 0x76, 0x9b, -0xad, 0x6e, 0xa2, 0xd8, 0x6b, 0x74, 0x6d, 0x2a, -0x10, 0xff, 0xa7, 0x84, 0xdd, 0xa5, 0xa7, 0xe0, -0x05, 0xbb, 0x25, 0xa3, 0x65, 0x9a, 0x0e, 0xc1, -0x1e, 0xf8, 0xb6, 0xa5, 0x0d, 0xca, 0xf1, 0xb1, -0x03, 0xfc, 0x47, 0x11, 0xf1, 0x97, 0xcc, 0x1f, -0xd1, 0x85, 0x66, 0xdb, 0x9b, 0xca, 0x19, 0xfb, -0x47, 0xc6, 0x97, 0x98, 0xa1, 0xec, 0x9d, 0xaa, -0xe7, 0x5f, 0xef, 0xc0, 0xb9, 0xc2, 0x73, 0xe9, -0x28, 0x03, 0xbf, 0xd2, 0x3a, 0x32, 0x8b, 0x77, -0x4a, 0xfc, 0xa7, 0x5c, 0xfc, 0x1f, 0xac, 0x6f, -0xdc, 0xc2, 0x1c, 0xe1, 0xdf, 0x29, 0x3d, 0xff, -0x2a, 0xe1, 0x3f, 0x73, 0xdc, 0xc0, 0x0b, 0xc2, -0x11, 0xde, 0x4c, 0xc1, 0x9a, 0x82, 0x14, 0x3f, -0xb9, 0x84, 0xff, 0xc8, 0xfe, 0x5f, 0xbf, 0x44, -0xd0, 0xca, 0x40, 0xdd, 0x4c, 0xfc, 0x47, 0x44, -0x2c, 0xf9, 0xa9, 0xcd, 0xf4, 0xcf, 0x2a, 0x03, -0xeb, 0xbb, 0xe3, 0xad, 0x84, 0xff, 0x3c, 0xc2, -0xc0, 0x0b, 0xc2, 0x1e, 0x72, 0x84, 0xf5, 0x27, -0xd4, 0xdf, 0xab, 0xb4, 0x79, 0xf5, 0xcb, 0xd8, -0x7f, 0x22, 0x6f, 0xc1, 0x6f, 0xec, 0x3f, 0xca, -0x37, 0x0e, 0xf2, 0x92, 0x76, 0x16, 0x88, 0xec, -0x1a, 0xdf, 0xff, 0xab, 0x0c, 0xff, 0x39, 0xc9, -0x5e, 0xdc, 0x8e, 0xd8, 0xac, 0x84, 0x62, 0x57, -0x54, 0xca, 0x8f, 0xe6, 0x80, 0x6e, 0x76, 0xfe, -0x75, 0xfd, 0x71, 0x2c, 0xb9, 0x14, 0xf6, 0x31, -0x46, 0x74, 0x32, 0x52, 0xb0, 0x03, 0xfc, 0xa7, -0x84, 0xb6, 0x3d, 0xc4, 0x88, 0x8d, 0x85, 0x6a, -0x13, 0x01, 0x20, 0x08, 0xf8, 0xbf, 0x97, 0xd4, -0x3f, 0x0c, 0xdf, 0x61, 0x6a, 0x6a, 0x5a, 0x19, -0x34, 0xf8, 0x1f, 0xde, 0x5f, 0x99, 0xff, 0xf0, -0x40, 0x1c, 0x27, 0xc1, 0xb6, 0x21, 0x5f, 0xaf, -0x31, 0xfb, 0xcf, 0x31, 0x43, 0xaf, 0x5f, 0x52, -0x3e, 0x3f, 0x9a, 0x7c, 0x7f, 0x20, 0x8f, 0x6a, -0x73, 0xf7, 0xc8, 0x3d, 0xf0, 0xda, 0x81, 0x8e, -0x63, 0xf8, 0xe9, 0x25, 0xff, 0xaf, 0x32, 0xfc, -0xe7, 0x3d, 0x1c, 0x36, 0x2f, 0xf7, 0x34, 0xe6, -0x57, 0xed, 0x42, 0x0d, 0x76, 0x8b, 0x71, 0x05, -0x48, 0xfe, 0x5f, 0xc8, 0x7f, 0x92, 0xa5, 0xb7, -0x3b, 0xde, 0x86, 0x4e, 0x35, 0x3a, 0xdd, 0x7a, -0x06, 0x15, 0xdd, 0xf5, 0x7b, 0xa3, 0xff, 0x36, -0x02, 0x9e, 0xff, 0x97, 0x5d, 0x86, 0xff, 0x9c, -0x04, 0x76, 0xbe, 0x8c, 0xf3, 0x6b, 0x0a, 0x86, -0xd9, 0x42, 0x9c, 0x53, 0x8c, 0x99, 0xec, 0x3f, -0x2c, 0x50, 0xff, 0x84, 0xf2, 0x9f, 0x74, 0x0c, -0x57, 0x40, 0x96, 0xca, 0x79, 0x06, 0xfb, 0x0f, -0xbb, 0x86, 0xd7, 0x66, 0x60, 0x37, 0x8e, 0xd9, -0x79, 0x68, 0x83, 0x3a, 0xa5, 0x9a, 0xfd, 0x47, -0xa4, 0x2d, 0x80, 0xd5, 0xb9, 0xc8, 0x31, 0x7a, -0x80, 0x2d, 0x34, 0xb9, 0x08, 0x54, 0xb3, 0xff, -0x44, 0xce, 0xc2, 0xc7, 0xa4, 0x13, 0xd6, 0x98, -0x91, 0xd3, 0xf0, 0x31, 0xed, 0x84, 0xc7, 0xa6, -0x67, 0xef, 0xff, 0xf5, 0xaf, 0x17, 0x69, 0xff, -0xf9, 0xde, 0x45, 0xdd, 0x7f, 0xf6, 0x0c, 0x5f, -0x55, 0xce, 0xbf, 0x6a, 0xcb, 0x9d, 0x27, 0xce, -0xfa, 0xfe, 0x33, 0x0b, 0xbd, 0xbe, 0x66, 0xa2, -0x7b, 0x36, 0xfe, 0x5f, 0x0e, 0xf8, 0x72, 0x15, -0xfb, 0x4f, 0x45, 0x50, 0x64, 0xff, 0xa1, 0x33, -0xdf, 0x7f, 0x76, 0xc7, 0x43, 0xd5, 0xfb, 0xcf, -0xa7, 0x3e, 0xcd, 0xfd, 0xe7, 0x93, 0x95, 0xec, -0x3f, 0xa5, 0x66, 0x1f, 0x0e, 0x0e, 0x54, 0x38, -0xff, 0x2a, 0x8a, 0x0f, 0x30, 0xf5, 0xd4, 0x69, -0xfe, 0xbe, 0xff, 0x3f, 0xed, 0x3f, 0xbe, 0xff, -0xd7, 0x17, 0x68, 0xff, 0xa1, 0x9f, 0xb7, 0xfd, -0xe7, 0x2b, 0x17, 0x7d, 0xff, 0xf9, 0x1a, 0x0e, -0xc8, 0xe7, 0x66, 0xff, 0xa9, 0x90, 0x18, 0xb7, -0xd8, 0xff, 0xeb, 0x22, 0xec, 0x3f, 0xb3, 0xca, -0xaf, 0x5a, 0xc9, 0xff, 0x6b, 0x66, 0xff, 0xf7, -0xb2, 0xf9, 0x61, 0x83, 0xe0, 0x91, 0x80, 0xfd, -0x47, 0x2d, 0x63, 0xff, 0x29, 0xed, 0xcf, 0x40, -0xfc, 0x9f, 0x32, 0xcd, 0x26, 0xc1, 0x44, 0x78, -0x92, 0xfd, 0x67, 0x76, 0xfe, 0x5f, 0x3e, 0xff, -0x81, 0x8b, 0xb4, 0xff, 0x54, 0xf1, 0xff, 0x2a, -0x1b, 0xff, 0x30, 0x51, 0x45, 0xff, 0xf8, 0xf6, -0x1f, 0xef, 0xfe, 0x73, 0x59, 0xff, 0xaf, 0x2a, -0xf1, 0x7f, 0xda, 0xca, 0xf0, 0x1f, 0x19, 0xf0, -0x8c, 0x21, 0xcd, 0xb3, 0xb3, 0xff, 0x2c, 0x2c, -0xe7, 0xff, 0x95, 0xa8, 0xba, 0x7e, 0x39, 0xf6, -0x1f, 0xc9, 0xff, 0xeb, 0x12, 0x49, 0xff, 0x7c, -0xe8, 0x37, 0x7b, 0x31, 0xb7, 0x08, 0x31, 0x50, -0xc6, 0xfe, 0x53, 0xf5, 0x7d, 0x99, 0xfd, 0xc7, -0xcf, 0x3f, 0x68, 0xd1, 0x6a, 0xfa, 0xc7, 0x75, -0xcd, 0xa8, 0xe0, 0xff, 0x55, 0x16, 0x4c, 0x3e, -0x26, 0xc7, 0xff, 0x91, 0xf9, 0x0f, 0x09, 0x1c, -0x9c, 0x3d, 0x25, 0xfd, 0xe1, 0x89, 0xf2, 0xf6, -0x9f, 0xf7, 0x45, 0x76, 0xf8, 0x59, 0xfb, 0x7f, -0x7d, 0x54, 0x1a, 0xd8, 0xa7, 0xaa, 0xff, 0x57, -0x00, 0xd4, 0x4d, 0xf0, 0x08, 0x36, 0x5f, 0x2d, -0xe7, 0xff, 0xb5, 0xb9, 0xe2, 0x78, 0x23, 0x9b, -0xdf, 0xaa, 0x4f, 0xb5, 0x96, 0xf8, 0x7f, 0xb9, -0xf6, 0x9f, 0x9b, 0xa5, 0xf3, 0x3e, 0x04, 0x06, -0x82, 0xc3, 0xe5, 0xfc, 0xbf, 0xf8, 0xdb, 0xd1, -0x40, 0x3e, 0xb8, 0x35, 0xd2, 0x89, 0x86, 0xc4, -0x7f, 0xbe, 0x29, 0x46, 0x4b, 0xd9, 0xb0, 0x87, -0xc8, 0x7f, 0x0a, 0x45, 0xf7, 0x7f, 0x0a, 0x10, -0xa4, 0x3d, 0xc7, 0x05, 0xd8, 0x2e, 0x2e, 0x42, -0xeb, 0x8f, 0x40, 0x6b, 0x90, 0xff, 0x9c, 0x64, -0xf1, 0x0f, 0x69, 0xa5, 0xf5, 0x3d, 0x3f, 0x62, -0x18, 0xc2, 0xbe, 0xea, 0x8e, 0x1f, 0x37, 0xfe, -0x8f, 0x14, 0x2d, 0xb9, 0x49, 0x32, 0x04, 0x8d, -0x10, 0x66, 0x51, 0x49, 0x9f, 0xf5, 0xf4, 0x89, -0x4a, 0xc5, 0xf8, 0x99, 0x5b, 0x6e, 0x9a, 0xbc, -0x01, 0x07, 0x29, 0xb7, 0xd8, 0x94, 0x8f, 0xff, -0x6c, 0x14, 0x0f, 0x83, 0x4f, 0xd2, 0x6e, 0xff, -0xf8, 0xfe, 0x5f, 0x5e, 0xbc, 0xcd, 0x66, 0x7f, -0xe0, 0xe9, 0x5e, 0xa2, 0xd8, 0x83, 0xd0, 0x31, -0x89, 0xfc, 0x4a, 0x8a, 0xff, 0x13, 0xf7, 0xf8, -0xf0, 0xbb, 0x65, 0x0c, 0x41, 0xd8, 0x3f, 0x93, -0x41, 0xff, 0xaf, 0x32, 0x7c, 0xf8, 0x75, 0x70, -0x33, 0xbc, 0x93, 0x11, 0xe1, 0x41, 0x29, 0xc5, -0xff, 0x91, 0xf2, 0xc3, 0x1a, 0x5e, 0xfc, 0x67, -0xc7, 0x10, 0xf4, 0x0b, 0xed, 0xe1, 0x42, 0x4b, -0xf0, 0xfc, 0xeb, 0x5e, 0xe0, 0xfc, 0x67, 0xca, -0xa7, 0x3d, 0x37, 0x63, 0xb7, 0x7c, 0x04, 0x4e, -0xc6, 0xb4, 0x83, 0x34, 0x55, 0x74, 0xfe, 0x15, -0xaf, 0x36, 0x1f, 0xcd, 0x8f, 0x74, 0x71, 0x9e, -0xe8, 0xc7, 0x3f, 0x8c, 0x56, 0xa9, 0xff, 0x1e, -0x1c, 0x1c, 0xe6, 0xfd, 0xef, 0xc7, 0x77, 0x3a, -0x50, 0xac, 0x4f, 0x56, 0x6d, 0xf1, 0xfd, 0x4f, -0x0f, 0xf1, 0xf3, 0xf4, 0x0a, 0xf1, 0x9f, 0xcb, -0xf2, 0x9f, 0x87, 0xc5, 0x8b, 0x4b, 0xf1, 0x9f, -0x83, 0xf7, 0x0f, 0x8b, 0xe3, 0xb9, 0x8d, 0x08, -0x0b, 0x9b, 0xcf, 0x7f, 0x0a, 0xea, 0xd3, 0x7a, -0x65, 0xfe, 0x83, 0x03, 0xf3, 0xb9, 0x2a, 0xf1, -0x0f, 0x4b, 0x80, 0x56, 0xca, 0x7f, 0xfc, 0xf5, -0xee, 0x1d, 0x9b, 0x81, 0x86, 0x19, 0xf8, 0x4f, -0x7c, 0x91, 0xeb, 0xed, 0xfe, 0x0e, 0x07, 0x22, -0xfe, 0x1e, 0x15, 0x86, 0x20, 0xbb, 0x6a, 0x7e, -0x58, 0x0e, 0x6a, 0xa5, 0xfa, 0xf8, 0x84, 0xe1, -0x62, 0xff, 0x2f, 0x08, 0xf0, 0x1f, 0x7c, 0xbe, -0xb8, 0xff, 0xb3, 0xd9, 0x29, 0xc9, 0x16, 0xf9, -0x7f, 0x0d, 0x82, 0xcb, 0x7f, 0x9a, 0xc5, 0x6b, -0x36, 0x48, 0xef, 0x5b, 0xd0, 0x4e, 0x97, 0xc4, -0x7f, 0xae, 0xc6, 0x67, 0xce, 0xec, 0x72, 0x3c, -0xe2, 0xcb, 0xda, 0x7f, 0x44, 0x36, 0xd8, 0x35, -0xfe, 0xb5, 0xf0, 0xc8, 0xaf, 0xe1, 0xa7, 0xc5, -0xe7, 0x5f, 0xd5, 0xf3, 0xc3, 0x6a, 0x63, 0xc5, -0xfc, 0xe7, 0x5e, 0x28, 0xba, 0xff, 0xfc, 0x27, -0x7a, 0x93, 0xec, 0xff, 0xd5, 0x56, 0x14, 0xff, -0x67, 0x77, 0xf9, 0xfc, 0xb0, 0xa2, 0x3f, 0x4f, -0x8c, 0x09, 0xff, 0xaf, 0xb4, 0x14, 0xff, 0xb9, -0x3c, 0xff, 0xf1, 0xfc, 0xd7, 0x04, 0x11, 0x92, -0xe2, 0x1f, 0xc2, 0x2e, 0xea, 0x57, 0x53, 0x8a, -0x68, 0x9e, 0xe2, 0xda, 0x7f, 0xfc, 0xf8, 0x87, -0xd2, 0x78, 0x33, 0x9c, 0xc4, 0x7c, 0xd2, 0xc0, -0x3b, 0x50, 0xec, 0xff, 0x25, 0xe5, 0x87, 0xfd, -0xc8, 0xf6, 0x69, 0x0f, 0xbd, 0x4e, 0xf8, 0x7f, -0xfd, 0x5d, 0x31, 0xff, 0x91, 0xf6, 0xe3, 0x05, -0x0e, 0xe4, 0xf8, 0xab, 0xa7, 0x94, 0x11, 0xa1, -0xba, 0x0f, 0x7a, 0xe3, 0x81, 0xf8, 0x41, 0xda, -0xa7, 0x75, 0x31, 0x7f, 0x95, 0x23, 0xfa, 0x8b, -0xe4, 0x2f, 0x84, 0x61, 0x64, 0xbb, 0xe3, 0xff, -0xe5, 0x3e, 0x1e, 0xb4, 0x31, 0x8f, 0xff, 0x88, -0xfc, 0xb0, 0x73, 0x25, 0xfe, 0xf3, 0x1b, 0x78, -0x55, 0x80, 0x83, 0xde, 0xfd, 0xe7, 0x36, 0x5f, -0xff, 0xc8, 0xf9, 0x40, 0x15, 0x67, 0x59, 0x77, -0xf9, 0xcf, 0x76, 0xf7, 0x7d, 0xcd, 0x47, 0x7f, -0xdc, 0xef, 0xac, 0x56, 0x6f, 0xc1, 0xfb, 0xa3, -0x08, 0xce, 0xb1, 0x40, 0xbe, 0x3b, 0x44, 0xc6, -0x34, 0xb8, 0x30, 0xca, 0x7f, 0x0a, 0xe4, 0x87, -0xf5, 0xb4, 0x8d, 0xc8, 0xef, 0x76, 0x33, 0x8b, -0xff, 0x9c, 0x17, 0x86, 0x1d, 0xeb, 0x07, 0xce, -0xfd, 0x67, 0xcf, 0xfe, 0x93, 0x87, 0x27, 0x75, -0xf7, 0x7d, 0xbd, 0x8b, 0x40, 0xa6, 0xe3, 0xf6, -0x7e, 0xa8, 0xd4, 0xff, 0x4b, 0x8a, 0x7f, 0x38, -0xc5, 0x77, 0xf7, 0x07, 0x27, 0x7c, 0x45, 0x34, -0xc5, 0x23, 0xfa, 0x06, 0xf8, 0x8f, 0xa6, 0x3e, -0x43, 0xbd, 0xf7, 0xfd, 0x5e, 0xa9, 0x61, 0x87, -0x3e, 0x50, 0x68, 0x0c, 0xc4, 0x7f, 0x26, 0x5e, -0x3c, 0xde, 0xe3, 0x3e, 0x11, 0x72, 0x0d, 0x23, -0xf1, 0xb3, 0xee, 0xa3, 0xdc, 0xfa, 0xc4, 0x5f, -0xef, 0x4e, 0xf3, 0xb4, 0x68, 0x8d, 0xa7, 0x95, -0xaf, 0x53, 0x56, 0x12, 0x3d, 0x1d, 0xb9, 0x80, -0x0b, 0xfd, 0xf5, 0x85, 0x40, 0xfc, 0x9f, 0xc9, -0xb8, 0xe7, 0xbf, 0x33, 0xe9, 0xde, 0xdf, 0x10, -0x2b, 0x5a, 0x03, 0xae, 0x5f, 0xda, 0x4b, 0xb9, -0x56, 0xe1, 0xff, 0xe5, 0x7e, 0x2f, 0x1b, 0x16, -0xc3, 0x32, 0x85, 0xb3, 0x9d, 0x93, 0xc1, 0xb4, -0x68, 0x3c, 0x70, 0xf1, 0x0f, 0xc5, 0xc2, 0x17, -0xe0, 0x3f, 0x9a, 0xc3, 0x7f, 0x9c, 0xfc, 0xb0, -0x3f, 0x50, 0xbe, 0x39, 0xfa, 0xbc, 0xc1, 0xdd, -0xa0, 0x0e, 0x68, 0x13, 0x90, 0x2f, 0xac, 0x4a, -0x35, 0x49, 0xfc, 0x07, 0x36, 0xfb, 0xe3, 0x81, -0xe7, 0xcf, 0x7d, 0x39, 0xf2, 0x3e, 0x7c, 0xf4, -0xf4, 0xad, 0x4e, 0xa0, 0x48, 0x45, 0xac, 0xef, -0x1e, 0xff, 0xc9, 0xfa, 0xf7, 0x9f, 0x4f, 0x13, -0x0e, 0x5e, 0x8e, 0x3c, 0xe8, 0x84, 0xed, 0x65, -0x1e, 0xdf, 0xb4, 0x4c, 0xfc, 0x9f, 0xa3, 0xf6, -0x4d, 0xdc, 0x6c, 0x18, 0xbc, 0x48, 0x1f, 0x3d, -0x1b, 0x79, 0x8f, 0x1e, 0x1c, 0x2e, 0xf2, 0xff, -0x92, 0xed, 0x3f, 0xfa, 0x32, 0x04, 0x11, 0x97, -0x08, 0xd5, 0xb9, 0xf6, 0x9f, 0x80, 0xff, 0x97, -0x63, 0xff, 0x29, 0xbd, 0xff, 0xcc, 0x8e, 0x75, -0x4e, 0x71, 0xff, 0xa6, 0x64, 0xc0, 0xff, 0xcb, -0xb1, 0xff, 0x44, 0x26, 0xf4, 0x53, 0xb0, 0x4c, -0xf6, 0xff, 0xfa, 0x86, 0x6b, 0xff, 0xa9, 0x9b, -0x48, 0x4b, 0xf6, 0x9f, 0xf8, 0x33, 0xf1, 0xff, -0x20, 0x37, 0x4e, 0x36, 0x4e, 0x90, 0x53, 0xf0, -0x37, 0xe2, 0x36, 0xb8, 0x18, 0x3f, 0xec, 0xfc, -0x45, 0x3f, 0xc8, 0x01, 0x6e, 0xd5, 0xdd, 0xe7, -0x1f, 0xb7, 0x5f, 0x86, 0xa3, 0xb0, 0x06, 0x3b, -0x61, 0xe1, 0xc7, 0xb4, 0xa2, 0x23, 0x58, 0xf9, -0xf3, 0x2f, 0x37, 0x30, 0xc5, 0x62, 0x8f, 0x11, -0xb9, 0x25, 0xc5, 0xf9, 0x2f, 0xbe, 0xca, 0x0e, -0x49, 0x5d, 0xda, 0x16, 0x48, 0x84, 0xc1, 0x03, -0x63, 0x82, 0x1f, 0xff, 0xd9, 0xe7, 0x3f, 0x69, -0xff, 0xbc, 0xc6, 0x9d, 0x2f, 0xa7, 0x5c, 0x50, -0x64, 0xff, 0x19, 0x65, 0xab, 0x7f, 0xda, 0x3b, -0x0f, 0x92, 0x3d, 0xc2, 0xf2, 0xd7, 0x8a, 0xab, -0x41, 0xee, 0xf3, 0x85, 0xfd, 0x67, 0x71, 0xa1, -0xb1, 0xdd, 0xe5, 0x3f, 0x13, 0x11, 0xc1, 0x88, -0xae, 0x60, 0xf1, 0x9f, 0x3f, 0xc8, 0xf3, 0x40, -0xd0, 0xb2, 0xfd, 0xe7, 0x16, 0xb9, 0x37, 0xae, -0x28, 0x34, 0xca, 0xf1, 0x7f, 0xcc, 0x0b, 0xfa, -0xad, 0xe5, 0xed, 0x3f, 0xb8, 0x49, 0x29, 0x4a, -0x9b, 0x2b, 0x25, 0x3a, 0x0c, 0xda, 0x7f, 0x74, -0xcf, 0x6c, 0x5e, 0x7e, 0x63, 0xb5, 0x4a, 0xf6, -0xff, 0xaa, 0x66, 0xff, 0x49, 0x7b, 0x25, 0xc7, -0x66, 0xb2, 0xff, 0x90, 0xcf, 0x64, 0xff, 0xe9, -0xae, 0x98, 0xff, 0xa2, 0x42, 0x3e, 0x88, 0xd9, -0xda, 0x7f, 0xe2, 0xe7, 0xc8, 0xc5, 0xf9, 0xbf, -0x97, 0xe4, 0x87, 0x2d, 0xe1, 0x3f, 0x81, 0xf5, -0xba, 0x8c, 0xfd, 0x07, 0x66, 0xb2, 0xff, 0x74, -0x05, 0xec, 0x3f, 0xbb, 0xb5, 0xd9, 0xf8, 0x7f, -0x5d, 0xac, 0xfd, 0xc7, 0xf7, 0xff, 0x1a, 0x9f, -0x4d, 0xfc, 0x9f, 0x8b, 0xb6, 0xff, 0xbc, 0x3d, -0x4b, 0xfb, 0xcf, 0x82, 0x67, 0xc9, 0x62, 0xf3, -0xa0, 0xde, 0x5a, 0xe9, 0xfc, 0xab, 0x02, 0xa8, -0x91, 0xfc, 0xdf, 0x8b, 0xe3, 0xff, 0xcc, 0x74, -0xff, 0x67, 0x56, 0xf6, 0x9f, 0x2a, 0xe7, 0x5f, -0x25, 0x80, 0x3c, 0x16, 0xc8, 0x7f, 0xf1, 0xf9, -0xc4, 0xff, 0xf1, 0xec, 0x3f, 0x2d, 0xcc, 0xfe, -0x43, 0x2f, 0xca, 0xfe, 0x53, 0xfb, 0xe1, 0x43, -0x33, 0xda, 0x7f, 0x7c, 0xff, 0xaf, 0xcb, 0x9e, -0x51, 0x2b, 0xef, 0xbf, 0x74, 0x71, 0xff, 0xa7, -0x3b, 0x60, 0xff, 0x31, 0x8f, 0xe6, 0x3a, 0x8f, -0x3b, 0xf1, 0x7f, 0x4a, 0xec, 0x3f, 0x06, 0x27, -0x42, 0x45, 0xf6, 0x1f, 0xdd, 0x8f, 0xf6, 0xe3, -0x35, 0xfb, 0xe4, 0x2a, 0x6e, 0x11, 0xd2, 0x17, -0x1f, 0x0b, 0xd8, 0x7f, 0xc6, 0xe1, 0x49, 0xf2, -0xa2, 0x52, 0xc1, 0xec, 0x73, 0x84, 0x3d, 0x8a, -0x81, 0x29, 0xcf, 0xff, 0xcb, 0xa2, 0xaf, 0xab, -0xc5, 0xda, 0xe6, 0x75, 0x4f, 0xc3, 0xc7, 0x9d, -0x9f, 0x7c, 0xfe, 0xb3, 0x34, 0xf1, 0x8c, 0x97, -0xc6, 0x42, 0x2f, 0x56, 0x9b, 0xa7, 0x54, 0x87, -0xf8, 0x95, 0x8f, 0xff, 0x43, 0x8a, 0x17, 0x26, -0xef, 0x86, 0x8c, 0x1f, 0xff, 0x27, 0xeb, 0xd9, -0x7f, 0xaa, 0xc5, 0xfb, 0xf5, 0xd7, 0xeb, 0xc9, -0xd1, 0xcd, 0x7a, 0x79, 0x7b, 0x8e, 0xb7, 0xa2, -0x3d, 0x12, 0xf4, 0xff, 0xda, 0xac, 0x8b, 0x43, -0x99, 0xb5, 0x22, 0xbb, 0x41, 0x1d, 0xaf, 0xa6, -0xcc, 0x10, 0xff, 0x07, 0x3b, 0xe1, 0x1e, 0x2f, -0xdb, 0x05, 0xf6, 0x4f, 0xcd, 0xe6, 0x03, 0xee, -0xc1, 0xeb, 0xde, 0x80, 0xff, 0x97, 0xad, 0x6d, -0xa6, 0xff, 0x23, 0x3a, 0xc1, 0xcb, 0x76, 0xe1, -0xdd, 0xff, 0x79, 0x97, 0x5d, 0x44, 0x39, 0x8c, -0xe3, 0xa1, 0xc8, 0xfe, 0x23, 0x48, 0x8e, 0x97, -0xed, 0xe2, 0x63, 0x37, 0xec, 0xcf, 0xc7, 0xf9, -0x0b, 0x6d, 0xb7, 0xbe, 0x16, 0xe0, 0x3f, 0x15, -0xf2, 0xf1, 0xe5, 0x5f, 0xff, 0x5d, 0xe7, 0xe3, -0x6b, 0xd5, 0xc1, 0xcd, 0x8e, 0xa7, 0x8d, 0x2a, -0x2d, 0x30, 0x86, 0x25, 0x1e, 0xf8, 0x4c, 0xcf, -0x0f, 0xf3, 0x21, 0x7e, 0x9e, 0xf9, 0x10, 0xcd, -0xa2, 0x12, 0xa8, 0x94, 0x0f, 0x71, 0x41, 0xa1, -0xf4, 0xb1, 0x0f, 0xa7, 0x10, 0xfc, 0x65, 0xf9, -0x7c, 0x88, 0x7a, 0x99, 0x8e, 0xa4, 0x0c, 0x98, -0xe5, 0xfb, 0x5f, 0x2f, 0xd3, 0xed, 0xa3, 0x0c, -0x98, 0xe5, 0xf3, 0x21, 0x46, 0x0b, 0x95, 0xfb, -0x3c, 0xcc, 0x87, 0x58, 0x1d, 0xfc, 0x21, 0xd7, -0xff, 0x02, 0xe7, 0x23, 0xd7, 0x7e, 0x4c, 0x1f, -0x3a, 0x1a, 0x52, 0x0b, 0xf3, 0xc3, 0xca, 0xfd, -0xff, 0x70, 0xea, 0xf3, 0xed, 0x7f, 0x7b, 0xd6, -0xfa, 0x90, 0x29, 0x3d, 0xfe, 0xb4, 0x30, 0x3f, -0x6c, 0x91, 0x84, 0xfa, 0xf0, 0xf7, 0xbc, 0xfe, -0xbe, 0xae, 0xc8, 0x16, 0xf3, 0x88, 0x7e, 0x13, -0xa8, 0x59, 0x01, 0xe2, 0xea, 0xbe, 0xc8, 0x56, -0x73, 0x48, 0xbf, 0x2f, 0xde, 0xf0, 0x2a, 0x03, -0x99, 0xf9, 0xf4, 0xb2, 0x42, 0xbb, 0x57, 0xbf, -0xb7, 0x47, 0xdd, 0x4a, 0x86, 0xcc, 0x3b, 0x75, -0x70, 0x81, 0x3a, 0xc5, 0x41, 0xb7, 0x9e, 0x98, -0x22, 0xa2, 0x24, 0x51, 0x88, 0xb9, 0x7c, 0x15, -0x6c, 0x85, 0x18, 0x76, 0xbf, 0xd1, 0xa4, 0xd1, -0x61, 0x01, 0x92, 0x74, 0x3b, 0x69, 0x41, 0x30, -0xdf, 0x29, 0xb1, 0xf0, 0x27, 0xdb, 0xf0, 0x9e, -0x6f, 0x03, 0xb1, 0x60, 0x10, 0xe6, 0xc1, 0x4e, -0x5b, 0x00, 0x4d, 0x45, 0x40, 0x06, 0x95, 0x79, -0x49, 0x75, 0x94, 0x6c, 0x24, 0x83, 0xb0, 0x01, -0x12, 0x52, 0xfd, 0x7d, 0x83, 0x57, 0xde, 0x48, -0x6e, 0xb3, 0xd7, 0x75, 0xd1, 0x31, 0x75, 0x1b, -0x19, 0xb2, 0xef, 0x34, 0x12, 0x07, 0x38, 0x98, -0x8f, 0x80, 0x20, 0xc8, 0x63, 0x49, 0xa1, 0xdd, -0x6b, 0xcf, 0xbe, 0x2e, 0xd3, 0xd0, 0x35, 0xaa, -0x10, 0xfc, 0x9f, 0x2c, 0x48, 0x9a, 0x35, 0x40, -0x86, 0xc1, 0xb2, 0x93, 0xd0, 0x07, 0xc4, 0xa6, -0x06, 0x02, 0x2c, 0xb1, 0xfd, 0xf7, 0xdd, 0xd7, -0x4f, 0xef, 0x26, 0x49, 0xbb, 0xcf, 0x80, 0x31, -0xda, 0x4a, 0x34, 0x3b, 0x6d, 0xe8, 0x63, 0xd4, -0x10, 0xc0, 0xa6, 0x16, 0xd1, 0x80, 0x01, 0xa9, -0xfe, 0x2a, 0x75, 0x6d, 0x76, 0x20, 0xbf, 0xbe, -0x8d, 0xce, 0x55, 0xd3, 0xd9, 0xcc, 0xe9, 0x81, -0xb6, 0x44, 0x9d, 0xda, 0x35, 0x9a, 0xc9, 0x23, -0xa8, 0x51, 0xcd, 0xd1, 0x8c, 0x11, 0xbf, 0x45, -0x05, 0xbf, 0x3d, 0xf6, 0x02, 0x32, 0x07, 0xd6, -0x17, 0x12, 0x19, 0x7a, 0x39, 0xb9, 0x13, 0x41, -0x6c, 0x8b, 0x3a, 0x44, 0xd6, 0xc1, 0x40, 0x21, -0x91, 0x52, 0xff, 0x94, 0x44, 0x18, 0x58, 0x4a, -0x3d, 0xf3, 0x0f, 0xd6, 0x67, 0x1a, 0xa0, 0x09, -0xa8, 0xad, 0x53, 0xa6, 0xf9, 0x4c, 0x02, 0x31, -0x80, 0x6e, 0x1b, 0xb5, 0x97, 0x4e, 0x28, 0xaa, -0x86, 0xa4, 0x4d, 0x75, 0xe8, 0x92, 0xfa, 0xc7, -0x52, 0x34, 0x60, 0x1d, 0x9d, 0xcc, 0x33, 0x00, -0x2d, 0xa8, 0x43, 0x38, 0x30, 0x6c, 0xcd, 0xa8, -0x71, 0x40, 0x97, 0xd4, 0x3f, 0x19, 0x75, 0x11, -0xf9, 0x63, 0xd8, 0x60, 0xc6, 0x73, 0x64, 0x13, -0x07, 0x89, 0x9c, 0x6a, 0xc1, 0x61, 0xd6, 0xed, -0x39, 0xd5, 0x20, 0x87, 0xe1, 0x6b, 0xd8, 0xff, -0xd2, 0xfb, 0x9a, 0x11, 0xf6, 0x99, 0x6e, 0xc4, -0x16, 0x45, 0x58, 0xb5, 0xaf, 0xc1, 0x6d, 0x76, -0xe4, 0x6e, 0x2c, 0xb9, 0x89, 0x1d, 0x25, 0x21, -0xb0, 0xe7, 0x21, 0x90, 0xc6, 0x4f, 0x9a, 0xa6, -0xec, 0xa8, 0xd1, 0xad, 0x69, 0xc3, 0x34, 0x95, -0x65, 0x40, 0xdf, 0xcb, 0x41, 0x1f, 0x02, 0x70, -0x4a, 0xa4, 0xef, 0x85, 0x92, 0xc2, 0x3d, 0x55, -0x84, 0x8d, 0x0c, 0x07, 0x14, 0x38, 0x50, 0xd8, -0x61, 0x8b, 0x5b, 0x22, 0xf5, 0x8f, 0x42, 0x52, -0xf6, 0x6a, 0xa3, 0x99, 0x8d, 0x2e, 0x06, 0xd6, -0x69, 0x74, 0x2f, 0x49, 0x4d, 0xf2, 0x92, 0x83, -0x0c, 0xa4, 0xb0, 0x44, 0xaa, 0xbf, 0x2f, 0xad, -0x5a, 0xd9, 0x41, 0x63, 0x03, 0xd0, 0x61, 0x01, -0xb4, 0x04, 0x82, 0x49, 0x0e, 0x46, 0x08, 0x4c, -0x0e, 0xa6, 0x10, 0xd8, 0x52, 0xff, 0xa4, 0x79, -0xcf, 0xf1, 0x2e, 0x04, 0x17, 0x18, 0xf8, 0x46, -0x0c, 0x50, 0x06, 0x22, 0x1a, 0xc8, 0xef, 0xbb, -0x96, 0x5a, 0xd9, 0xa4, 0xd1, 0xd7, 0x0f, 0x3b, -0x10, 0x5c, 0x82, 0xaf, 0x19, 0x1b, 0xa6, 0x9b, -0xd8, 0xfb, 0xf6, 0xc7, 0x76, 0x50, 0x83, 0xbd, -0x6f, 0x7f, 0xcc, 0x8e, 0x49, 0xdf, 0x4b, 0x1d, -0x24, 0x1b, 0x60, 0x3d, 0x8e, 0x45, 0x0e, 0x12, -0x76, 0x02, 0x4b, 0x68, 0x1f, 0x96, 0x20, 0xd0, -0x70, 0x98, 0xc6, 0xec, 0x84, 0x29, 0x8d, 0x9f, -0x1a, 0xb2, 0xd5, 0x1e, 0xb0, 0x12, 0xe3, 0xb4, -0x86, 0x74, 0xd9, 0x19, 0x2b, 0x9e, 0x54, 0x4b, -0x01, 0x18, 0xde, 0x92, 0x54, 0x68, 0xc2, 0x4d, -0xb3, 0x66, 0x00, 0xb6, 0x07, 0xa7, 0x40, 0x97, -0x98, 0x0b, 0xd4, 0xc6, 0x49, 0xd1, 0x4f, 0x9b, -0xb0, 0x84, 0x03, 0xef, 0x78, 0x01, 0xdb, 0xd3, -0xa7, 0xc4, 0xb2, 0xa3, 0x56, 0x4b, 0x32, 0xd9, -0x17, 0xb9, 0xc3, 0x3e, 0x64, 0xdd, 0x90, 0x6c, -0x60, 0x60, 0x8a, 0x83, 0x39, 0x4e, 0x89, 0xd4, -0x9e, 0xa9, 0x3e, 0xb2, 0x35, 0x3b, 0x64, 0xdd, -0xa9, 0x5f, 0xb6, 0x5f, 0xe5, 0x20, 0x99, 0x60, -0xe0, 0xb0, 0xe9, 0x80, 0x23, 0xd6, 0x7d, 0xc9, -0x84, 0xac, 0x4f, 0xb0, 0xbe, 0x3d, 0x64, 0xdd, -0x94, 0x6c, 0xd8, 0x1f, 0xd9, 0x6a, 0x1f, 0x71, -0x40, 0x56, 0x94, 0x34, 0xb3, 0x9f, 0xe6, 0x27, -0x1b, 0x0a, 0x31, 0xa9, 0x3e, 0xe5, 0x8f, 0x1d, -0x84, 0xfd, 0x09, 0x06, 0xe6, 0xb3, 0xc7, 0xde, -0xf1, 0x50, 0x94, 0xff, 0x47, 0xd0, 0x92, 0x8d, -0x5a, 0xcb, 0x93, 0xeb, 0x25, 0xfd, 0x03, 0x6c, -0x3c, 0xf4, 0xb7, 0x34, 0x69, 0xea, 0xb0, 0xac, -0x88, 0x86, 0x7c, 0x80, 0x03, 0xc3, 0x96, 0x46, -0x1b, 0xeb, 0xb4, 0x41, 0x6b, 0x5e, 0x32, 0xbe, -0x9d, 0x6c, 0xe4, 0x40, 0x95, 0x40, 0x4b, 0x76, -0xd0, 0xda, 0x90, 0x54, 0xa5, 0xfa, 0xbd, 0x66, -0x22, 0x45, 0x56, 0xc3, 0x3a, 0x1c, 0xff, 0xea, -0x16, 0x32, 0x04, 0xcb, 0x21, 0x51, 0xe0, 0xe0, -0x4e, 0x04, 0x24, 0xe5, 0x00, 0xbf, 0x3d, 0xbd, -0x38, 0x7e, 0xf2, 0x5a, 0x9b, 0x52, 0x07, 0x5c, -0xed, 0xe0, 0x14, 0x24, 0x3e, 0x60, 0xfa, 0x87, -0x01, 0x69, 0x3c, 0xf4, 0xae, 0xa4, 0xd6, 0xb7, -0x71, 0xfc, 0xd4, 0xb1, 0xd1, 0x85, 0x1f, 0x2e, -0xad, 0xe9, 0x12, 0xb0, 0x04, 0x90, 0xeb, 0x77, -0x5d, 0x99, 0xe9, 0x1a, 0x68, 0x5a, 0x8f, 0xec, -0x53, 0x35, 0xb3, 0x19, 0x63, 0x40, 0x8b, 0x31, -0x70, 0x07, 0x82, 0x44, 0x24, 0x91, 0xb1, 0x51, -0xff, 0x68, 0x09, 0x90, 0xfa, 0xa7, 0x8e, 0x64, -0x0e, 0x0c, 0xa4, 0x12, 0x1a, 0x8d, 0x90, 0x4c, -0x61, 0xc0, 0x48, 0x44, 0xd5, 0x6e, 0x06, 0x52, -0x08, 0xd2, 0x02, 0x68, 0xaa, 0x29, 0xf5, 0x0f, -0x98, 0x66, 0x4c, 0xa7, 0x94, 0xe0, 0x0e, 0x2f, -0x0d, 0xa8, 0x02, 0x0d, 0xa6, 0x02, 0x29, 0x07, -0x00, 0x77, 0x83, 0x03, 0xfc, 0xf6, 0xa4, 0x15, -0xc5, 0xb6, 0xf3, 0x46, 0xbf, 0xad, 0x28, 0x60, -0x33, 0xed, 0xa5, 0x31, 0x90, 0x6d, 0x33, 0x10, -0x00, 0x2b, 0x41, 0x20, 0xb5, 0xa7, 0xd7, 0x9c, -0x63, 0x31, 0x25, 0x1f, 0xc1, 0xfe, 0xb4, 0x1c, -0x6d, 0x8f, 0xe0, 0x30, 0x65, 0xa0, 0xc1, 0x72, -0xf4, 0x8f, 0x34, 0x5f, 0xcc, 0xf9, 0x4c, 0xed, -0xcc, 0x8b, 0x3c, 0x6a, 0x47, 0x18, 0xb8, 0x91, -0xa9, 0x1d, 0x8b, 0x0e, 0x51, 0x06, 0xe6, 0x18, -0x30, 0x04, 0xf3, 0x11, 0x48, 0x0d, 0x22, 0x34, -0x45, 0x98, 0xd2, 0xb0, 0x6d, 0x0e, 0xba, 0x41, -0x2f, 0x20, 0x48, 0x2a, 0x0c, 0x28, 0x06, 0x61, -0x0b, 0x81, 0x5e, 0x90, 0xc7, 0x83, 0x50, 0x32, -0x26, 0x92, 0xbb, 0x76, 0x88, 0x9a, 0x91, 0x41, -0x38, 0x04, 0x4b, 0xa0, 0x96, 0x95, 0x1c, 0x32, -0x17, 0x21, 0x50, 0x4c, 0x90, 0xeb, 0xab, 0x6a, -0xbb, 0xb9, 0x3a, 0xd3, 0x9c, 0xdb, 0x39, 0x42, -0x10, 0x98, 0xcd, 0x71, 0xfa, 0x2a, 0x69, 0xef, -0xba, 0x3d, 0x83, 0x60, 0x3f, 0x69, 0xe9, 0x5a, -0x9d, 0x59, 0xa7, 0x53, 0xb9, 0xfe, 0x42, 0xf5, -0xde, 0xc9, 0xbb, 0x52, 0x1b, 0xc6, 0xe8, 0x3f, -0xaa, 0x7f, 0x3e, 0x79, 0xd7, 0x96, 0x0d, 0x4f, -0x26, 0xfe, 0x89, 0x95, 0x18, 0x1b, 0x1e, 0x15, -0x20, 0x85, 0x40, 0x6e, 0x3f, 0xe5, 0x49, 0x01, -0xf1, 0x3f, 0x15, 0x5b, 0x69, 0x04, 0x39, 0x58, -0x24, 0xda, 0x23, 0x00, 0xff, 0x49, 0x92, 0x1e, -0x2b, 0x96, 0xa4, 0x7d, 0x04, 0xd7, 0x2f, 0xb1, -0x90, 0xc5, 0x10, 0xc4, 0x92, 0xa3, 0xdd, 0x2d, -0x31, 0xbb, 0x87, 0x81, 0x3e, 0x04, 0x72, 0xfd, -0x8d, 0x99, 0xd8, 0x00, 0x5d, 0x8f, 0x8b, 0x89, -0x8a, 0xa0, 0x67, 0x3d, 0x49, 0x98, 0xbd, 0x19, -0x18, 0xa0, 0x77, 0x40, 0xc2, 0xec, 0xca, 0xe8, -0x03, 0xd1, 0x04, 0x96, 0x48, 0xd5, 0xb5, 0x16, -0x45, 0x33, 0x87, 0x75, 0x63, 0x54, 0x6b, 0x49, -0x6b, 0x99, 0xe1, 0xb8, 0xa1, 0x6a, 0xc4, 0x05, -0x1b, 0xd7, 0xb6, 0x71, 0x20, 0x3f, 0xbe, 0x0e, -0x14, 0x1b, 0xf2, 0x99, 0x36, 0x1c, 0x78, 0x8a, -0x6d, 0xe6, 0xf5, 0x36, 0x8a, 0x60, 0x4c, 0x00, -0x70, 0x4a, 0xe4, 0xfa, 0x51, 0xa5, 0x19, 0x46, -0x0b, 0x7f, 0x96, 0x4a, 0xae, 0x8e, 0xac, 0x83, -0x43, 0x85, 0xf6, 0x54, 0x83, 0x00, 0x37, 0x20, -0xa8, 0x69, 0x16, 0x40, 0x6e, 0x4f, 0xad, 0xba, -0xad, 0x6b, 0x28, 0xe7, 0xd2, 0x80, 0xb1, 0x79, -0x02, 0x1c, 0xe1, 0xc4, 0xa0, 0x97, 0x81, 0xfb, -0x8c, 0x7f, 0x90, 0xfb, 0xbf, 0x7e, 0x65, 0xfa, -0xe7, 0xb9, 0x17, 0x76, 0x5d, 0x5b, 0xcb, 0xc1, -0xf7, 0x77, 0x5d, 0xbb, 0xa2, 0x7e, 0xed, 0xca, -0xe9, 0x1d, 0x2f, 0x2c, 0xfa, 0xe7, 0xda, 0xfa, -0xf4, 0xca, 0x43, 0x1c, 0xc8, 0xed, 0x59, 0xf6, -0xe0, 0xed, 0x17, 0xfe, 0x7d, 0xcf, 0x99, 0x77, -0xcf, 0x71, 0xf0, 0xe2, 0x99, 0xf7, 0xcf, 0x2d, -0xfb, 0x64, 0xcd, 0xd1, 0x6f, 0x5d, 0x38, 0x71, -0xfe, 0xdc, 0xb2, 0x07, 0xd6, 0x5c, 0xe0, 0x00, -0x3e, 0x83, 0xdc, 0xfa, 0x44, 0xed, 0x55, 0xe9, -0x15, 0xb9, 0x1d, 0x9b, 0x3a, 0xcf, 0x35, 0x7e, -0xb7, 0xfb, 0x42, 0xee, 0xb7, 0x7f, 0x7b, 0xeb, -0x53, 0x2b, 0x1e, 0x7c, 0x73, 0x45, 0xee, 0xf1, -0xf3, 0x9d, 0x17, 0x56, 0x5c, 0xfd, 0xe6, 0x8a, -0x33, 0x8f, 0x9f, 0x97, 0xeb, 0x77, 0x3e, 0x70, -0xfb, 0xd1, 0x6f, 0xbd, 0x78, 0xe2, 0xdd, 0x73, -0x9d, 0x4e, 0x33, 0xce, 0x77, 0xf2, 0x86, 0x9d, -0x78, 0x1f, 0xeb, 0xdf, 0x7e, 0x94, 0xb5, 0x30, -0x50, 0x7f, 0xe1, 0xe5, 0xfd, 0x47, 0x77, 0xdc, -0x74, 0xe2, 0xd1, 0x8d, 0xcb, 0xd8, 0x1f, 0x3e, -0x8b, 0x7f, 0x88, 0xe0, 0xed, 0xe6, 0x17, 0x47, -0xdf, 0x3d, 0xb7, 0x30, 0xc9, 0xc1, 0xa9, 0xbf, -0x0e, 0x34, 0xa8, 0x75, 0x8b, 0xf9, 0xa4, 0x7e, -0xb5, 0x9e, 0x2d, 0x28, 0x08, 0xe0, 0x6a, 0x5a, -0x3b, 0x09, 0x5b, 0xb1, 0x64, 0x4e, 0xbc, 0x76, -0x9f, 0x82, 0x20, 0x73, 0x35, 0x25, 0x72, 0x7f, -0x52, 0x97, 0x1f, 0x8e, 0x5e, 0xe9, 0xb0, 0x41, -0xe4, 0x87, 0x30, 0x64, 0xce, 0xe7, 0xc0, 0xe1, -0x87, 0x52, 0xfd, 0x62, 0x7e, 0xe8, 0x01, 0x5c, -0x91, 0x19, 0x51, 0xe4, 0xfc, 0x30, 0xd0, 0x20, -0xa4, 0x6d, 0x50, 0x13, 0xcb, 0xd9, 0x02, 0x30, -0xda, 0xb6, 0x91, 0x01, 0x8d, 0x6c, 0x47, 0x46, -0xc4, 0x4a, 0x02, 0xe3, 0x59, 0xeb, 0xd9, 0x46, -0xa2, 0xc3, 0xdd, 0x0d, 0xf6, 0x58, 0x4f, 0x07, -0x59, 0x30, 0xba, 0xdc, 0x88, 0x1d, 0xa0, 0xdb, -0xc8, 0x02, 0x1b, 0xc1, 0xeb, 0x74, 0x5b, 0x96, -0x83, 0x42, 0xf0, 0xf9, 0x0e, 0x3f, 0xb4, 0x0c, -0x48, 0xea, 0xec, 0xf9, 0xde, 0x7f, 0xc4, 0x80, -0xc1, 0x81, 0x2f, 0x51, 0xa4, 0x85, 0x38, 0xad, -0x32, 0x7c, 0x7e, 0x21, 0x2d, 0xb4, 0xf4, 0x1c, -0xbd, 0x6a, 0x12, 0xc1, 0x16, 0x7d, 0x9c, 0x5e, -0x45, 0x6a, 0xed, 0xb4, 0x19, 0xd8, 0xa3, 0x7d, -0x89, 0xae, 0xcc, 0xce, 0xcb, 0xf7, 0x8e, 0xc1, -0x75, 0xf4, 0xae, 0x6c, 0xd3, 0x44, 0xcf, 0xd3, -0xb1, 0x56, 0x58, 0x95, 0x6d, 0xca, 0x23, 0xb8, -0x0e, 0x7f, 0x42, 0x30, 0x2e, 0xe9, 0x4f, 0xad, -0xd0, 0x08, 0xcd, 0x10, 0x2f, 0xa8, 0x39, 0x98, -0x8b, 0x4a, 0x2b, 0x8e, 0xdc, 0x87, 0xaf, 0x36, -0x58, 0xb2, 0xd4, 0x07, 0xa6, 0xff, 0x07, 0xb8, -0x55, 0xd5, 0x71, 0xb5, 0xa7, 0x5b, 0x74, 0x36, -0x8b, 0x70, 0xd9, 0x37, 0x51, 0xa5, 0xf5, 0xb2, -0xdd, 0x6d, 0x86, 0xc4, 0xf5, 0x1e, 0x64, 0x8b, -0x74, 0x0b, 0xf1, 0xcc, 0xe7, 0xf8, 0x7c, 0xd3, -0xb1, 0xbc, 0x25, 0xf9, 0x06, 0x53, 0x17, 0x76, -0x3a, 0xb6, 0x25, 0x35, 0xc7, 0xf4, 0x56, 0xaa, -0x65, 0x15, 0x56, 0x22, 0xd7, 0x47, 0xd2, 0xcb, -0x95, 0x24, 0x53, 0xf4, 0x49, 0x48, 0x63, 0x6f, -0xd7, 0xb0, 0x92, 0x7b, 0x10, 0xec, 0x12, 0x3f, -0x5d, 0x62, 0x7b, 0xf5, 0x75, 0x62, 0x2a, 0x16, -0x8c, 0xc3, 0x55, 0x06, 0xea, 0x2c, 0x0e, 0xa0, -0x76, 0x0c, 0x36, 0x31, 0xc0, 0xae, 0x32, 0xb1, -0x9c, 0xf6, 0x57, 0x19, 0xb8, 0x02, 0xba, 0x62, -0x32, 0x7e, 0xc8, 0x49, 0x91, 0x2e, 0xf3, 0xc3, -0x31, 0x06, 0x72, 0x7b, 0x97, 0x88, 0x92, 0x9c, -0xbf, 0x9e, 0xb2, 0x37, 0x2f, 0xe1, 0x87, 0x66, -0x11, 0x30, 0x0b, 0x9e, 0x7d, 0xde, 0xc4, 0xb7, -0x4c, 0x71, 0x92, 0xa6, 0x0f, 0x3b, 0x00, 0x5e, -0xa1, 0x0e, 0xd8, 0x2b, 0x4a, 0xa2, 0x92, 0xfe, -0x37, 0x7b, 0x4d, 0xc1, 0xdf, 0xd8, 0xd1, 0x25, -0x02, 0x40, 0xfe, 0x36, 0xc2, 0x7a, 0xc0, 0x60, -0x44, 0x4c, 0xfc, 0x44, 0x91, 0xbf, 0x79, 0xed, -0x21, 0x12, 0x3f, 0xf4, 0x40, 0xaa, 0xa8, 0xc4, -0x7f, 0x7e, 0x86, 0xa4, 0xc5, 0x43, 0x18, 0x7b, -0x14, 0x20, 0xc6, 0x5e, 0xdc, 0x01, 0xa2, 0xa4, -0xa8, 0x3d, 0xf8, 0x21, 0xf1, 0x8b, 0x02, 0x38, -0x20, 0x86, 0xdb, 0x00, 0x07, 0xb8, 0x3f, 0xa5, -0xbd, 0xf6, 0xf4, 0xe3, 0xb8, 0xed, 0xb2, 0xe3, -0x96, 0xca, 0x06, 0xf0, 0x56, 0x5b, 0xb7, 0x68, -0x92, 0xb0, 0x92, 0x20, 0xf0, 0x87, 0x4f, 0x3f, -0xb0, 0x91, 0xef, 0xf1, 0x5b, 0x6f, 0xaf, 0x14, -0x04, 0x20, 0xb5, 0x67, 0x03, 0xb2, 0x41, 0xe4, -0x87, 0x83, 0xda, 0x06, 0x25, 0x66, 0xff, 0xcc, -0xe5, 0x87, 0x03, 0x2e, 0x10, 0xfc, 0xd0, 0x5f, -0xdf, 0x09, 0xe3, 0x6f, 0x0b, 0xac, 0xe5, 0x7a, -0x6c, 0xbf, 0x00, 0xc9, 0xd8, 0xfe, 0x9a, 0xbf, -0x22, 0x08, 0x32, 0xb1, 0x43, 0x74, 0x2b, 0x59, -0x60, 0x2e, 0x1f, 0xbc, 0x44, 0x7a, 0x5f, 0xd2, -0x87, 0xb4, 0xf0, 0x49, 0xeb, 0xea, 0x24, 0xd9, -0xaf, 0x08, 0x50, 0xbb, 0x1f, 0x5c, 0xe0, 0x94, -0x48, 0xfa, 0x27, 0xd3, 0xdb, 0xa7, 0xb6, 0x73, -0xda, 0x09, 0x12, 0xff, 0xbc, 0xc1, 0x66, 0x8c, -0x31, 0xf1, 0xf3, 0x84, 0xa0, 0x8e, 0xfa, 0x5e, -0x69, 0xfc, 0x34, 0x11, 0x8b, 0x69, 0x1b, 0xc6, -0x87, 0x0d, 0x7b, 0x85, 0xd0, 0x3f, 0x9b, 0x78, -0x89, 0xab, 0x88, 0xfa, 0xd5, 0x82, 0xd7, 0x43, -0x26, 0x0e, 0xe0, 0x8d, 0x76, 0xd2, 0xaa, 0x19, -0xd7, 0xbf, 0x8b, 0xe0, 0x52, 0xab, 0x26, 0x49, -0xb6, 0xab, 0xbc, 0x04, 0x81, 0xf8, 0x29, 0x29, -0xeb, 0x9f, 0x5e, 0x8b, 0xde, 0xdf, 0x32, 0x17, -0x77, 0x68, 0x90, 0x1f, 0x5d, 0x4a, 0x2e, 0x47, -0x10, 0x3b, 0xb6, 0xe8, 0x7e, 0x04, 0xcb, 0x11, -0x50, 0x07, 0x48, 0xe3, 0x99, 0xac, 0x45, 0x36, -0x88, 0xfd, 0x8f, 0xed, 0xc1, 0xd1, 0x72, 0x09, -0x7e, 0x08, 0x9c, 0x1d, 0x9b, 0x18, 0x2d, 0xec, -0x27, 0x3b, 0x04, 0x51, 0xec, 0x97, 0xf4, 0x0f, -0x8e, 0x37, 0x64, 0x83, 0x7c, 0xfc, 0x7c, 0x83, -0xb1, 0xc1, 0x7c, 0x5f, 0x80, 0x1f, 0x3a, 0x40, -0xaa, 0x8f, 0xf3, 0xcb, 0xec, 0x8a, 0xeb, 0xbd, -0x38, 0x5d, 0x68, 0x26, 0xab, 0x1b, 0xbd, 0x1a, -0x72, 0x29, 0x13, 0x41, 0x0f, 0x02, 0x2a, 0x00, -0x01, 0xa9, 0x7f, 0x70, 0xbe, 0x14, 0xe2, 0x1d, -0xb8, 0xf3, 0xa8, 0xc3, 0x09, 0x15, 0x9f, 0x20, -0x51, 0xd2, 0x0d, 0x99, 0x42, 0x3c, 0xa5, 0x22, -0x30, 0x1c, 0x60, 0xfa, 0xcf, 0x47, 0x65, 0xa1, -0xeb, 0x9c, 0x1f, 0xda, 0x66, 0x2b, 0xaa, 0x1d, -0x82, 0xfc, 0xd0, 0x74, 0x89, 0xa2, 0x0b, 0xe4, -0xf1, 0x93, 0x6e, 0x6d, 0x62, 0xfc, 0x50, 0x1b, -0x57, 0x5a, 0x91, 0x93, 0x75, 0xb4, 0x70, 0x7e, -0x38, 0x06, 0x86, 0x51, 0x37, 0x86, 0x25, 0x79, -0xc6, 0x0f, 0xc7, 0xa4, 0xf6, 0x10, 0x57, 0xff, -0x24, 0x85, 0xfe, 0xe9, 0x73, 0xf5, 0x0f, 0x03, -0x8b, 0x70, 0x9c, 0x2b, 0x4c, 0xff, 0x48, 0xfd, -0x63, 0x72, 0x25, 0x53, 0x63, 0x8e, 0xe5, 0x50, -0x7b, 0x3f, 0x21, 0xd4, 0xce, 0x16, 0x6d, 0x9c, -0xa0, 0x22, 0xca, 0x39, 0x1a, 0xa9, 0x4b, 0x9e, -0x5f, 0x16, 0x7e, 0x26, 0x54, 0xb5, 0xd8, 0x26, -0x1b, 0x81, 0x86, 0x5b, 0xeb, 0x63, 0x70, 0xaf, -0x86, 0x5f, 0x70, 0x38, 0x77, 0x6c, 0xd1, 0xd2, -0xda, 0xb9, 0x0a, 0x7e, 0x41, 0x7f, 0xbe, 0x67, -0x80, 0xc0, 0x57, 0xac, 0xb9, 0x5b, 0x22, 0x2c, -0x8c, 0x54, 0xca, 0x8c, 0xea, 0x11, 0x0a, 0xaf, -0x22, 0x31, 0xe3, 0x60, 0x9f, 0x21, 0x4a, 0x6c, -0xa9, 0x3d, 0xc8, 0xdf, 0x96, 0x98, 0x0d, 0x99, -0x48, 0x26, 0xb7, 0x13, 0xda, 0xcd, 0x06, 0x33, -0x32, 0x00, 0x3f, 0xa3, 0xed, 0xfd, 0xd1, 0x4c, -0x24, 0x0e, 0xbf, 0xc0, 0x12, 0x06, 0xf4, 0xbd, -0x52, 0x7b, 0xba, 0x29, 0xee, 0x46, 0x53, 0x7d, -0x49, 0x40, 0xb5, 0x33, 0x99, 0x4c, 0xf5, 0x45, -0x63, 0x7f, 0xef, 0x82, 0xc7, 0x5d, 0x20, 0xeb, -0x1f, 0x13, 0xf9, 0x61, 0xb2, 0xe0, 0x1e, 0x9e, -0x54, 0xb2, 0x23, 0xfa, 0xfd, 0xd3, 0x8f, 0xfc, -0x50, 0x43, 0x7e, 0x68, 0xdb, 0x9b, 0xee, 0x66, -0x44, 0xd1, 0x88, 0x8d, 0x53, 0x87, 0x16, 0x7a, -0x40, 0x1e, 0x3f, 0x66, 0xaf, 0x1a, 0x4b, 0xd4, -0xf4, 0x22, 0x5d, 0xee, 0xc9, 0xc4, 0xe2, 0xb4, -0x97, 0xc4, 0x4c, 0x13, 0xd5, 0x0e, 0x15, 0xfa, -0x87, 0x95, 0x00, 0x31, 0xa5, 0xf1, 0xa3, 0x31, -0x96, 0xea, 0x6a, 0x3e, 0x7d, 0x58, 0xc5, 0x61, -0x60, 0xe0, 0x30, 0x18, 0x16, 0x1b, 0x07, 0x3e, -0x1e, 0xb2, 0x20, 0x09, 0xa3, 0x85, 0x90, 0x37, -0x83, 0xfc, 0x90, 0x83, 0x1e, 0xaf, 0x44, 0x1e, -0x3f, 0xb7, 0x2d, 0x5c, 0x67, 0x8e, 0x4e, 0x6f, -0x5c, 0x32, 0x7e, 0x5b, 0xcd, 0x3a, 0xf3, 0xd0, -0xb4, 0xb1, 0xa4, 0xe1, 0x36, 0xb2, 0xce, 0x1c, -0x98, 0xbe, 0x01, 0x41, 0x84, 0x95, 0x20, 0x90, -0xda, 0x43, 0xfa, 0xe9, 0xb6, 0xae, 0x05, 0x39, -0x5c, 0xf4, 0x7f, 0xf2, 0xb0, 0x43, 0x03, 0x3c, -0x3e, 0xc0, 0x01, 0x2c, 0x37, 0x24, 0xfd, 0x83, -0xeb, 0xb5, 0xcf, 0x0f, 0x57, 0xca, 0xfc, 0x70, -0x57, 0x05, 0x7e, 0xd8, 0xe9, 0xf3, 0xc3, 0x35, -0x32, 0x3f, 0x3c, 0xf3, 0x3b, 0xe2, 0x87, 0x57, -0x32, 0x5a, 0xf8, 0xcb, 0xdc, 0x85, 0xf3, 0x9d, -0xe7, 0x38, 0x51, 0x44, 0x7e, 0xf8, 0x44, 0x6d, -0x90, 0x1f, 0x9e, 0x90, 0xeb, 0xf3, 0xff, 0xfd, -0xc3, 0x13, 0x58, 0xff, 0x13, 0x4e, 0x14, 0x91, -0x1f, 0x3e, 0x50, 0xc4, 0x0f, 0x03, 0xed, 0x59, -0xe6, 0xf2, 0xc3, 0x85, 0x97, 0xdf, 0x7e, 0x74, -0x47, 0x3b, 0x23, 0x96, 0xf7, 0x17, 0xd5, 0x3f, -0xfe, 0xe9, 0x5b, 0x9f, 0x02, 0x83, 0xe0, 0xfc, -0xc6, 0x7f, 0xbb, 0xa3, 0x9f, 0xfe, 0x29, 0xa1, -0x84, 0x12, 0x4a, 0x28, 0xa1, 0x84, 0x12, 0x4a, -0x28, 0xa1, 0x84, 0x12, 0xca, 0xef, 0xbb, 0xf0, -0xbd, 0x03, 0x0d, 0xf7, 0x0e, 0xa1, 0x84, 0x12, -0x4a, 0x28, 0xa1, 0x84, 0x12, 0x4a, 0x28, 0xa1, -0x84, 0x12, 0x4a, 0x75, 0xe1, 0x7b, 0x87, 0x9a, -0x70, 0xef, 0x10, 0x4a, 0x28, 0xa1, 0x84, 0x12, -0x4a, 0x28, 0xa1, 0x84, 0x12, 0x4a, 0x28, 0xa1, -0x54, 0x17, 0xbe, 0x77, 0xd0, 0xf8, 0xde, 0xe1, -0xff, 0xba, 0x29, 0xa1, 0x84, 0x12, 0x4a, 0x28, -0xa1, 0x84, 0x12, 0x4a, 0x28, 0xa1, 0x84, 0x12, -0xca, 0x17, 0x28, 0x29, 0x16, 0x72, 0x19, 0x5e, -0xf9, 0x20, 0x05, 0x36, 0xf3, 0x62, 0x8a, 0xa4, -0xc0, 0xbc, 0xe8, 0xf3, 0x04, 0xe7, 0x6f, 0xd5, -0x14, 0xe4, 0x89, 0xff, 0xcc, 0xe3, 0x77, 0x15, -0xd7, 0xfb, 0x5f, 0x2b, 0x92, 0xad, 0x46, 0xf1, -0x33, 0x01, 0x00, diff --git a/board/dave/common/fpga.c b/board/dave/common/fpga.c deleted file mode 100644 index 0869ca0718b..00000000000 --- a/board/dave/common/fpga.c +++ /dev/null @@ -1,240 +0,0 @@ -/* - * (C) Copyright 2001-2003 - * Matthias Fuchs, esd gmbh germany, matthias.fuchs@esd-electronics.com - * Stefan Roese, esd gmbh germany, stefan.roese@esd-electronics.com - * - * SPDX-License-Identifier: GPL-2.0+ - */ - -#include -#include -#include - -/* ------------------------------------------------------------------------- */ - -#ifdef FPGA_DEBUG -#define DBG(x...) printf(x) -#else -#define DBG(x...) -#endif /* DEBUG */ - -#define MAX_ONES 226 - -#ifdef CONFIG_SYS_FPGA_PRG -# define FPGA_PRG CONFIG_SYS_FPGA_PRG /* FPGA program pin (ppc output)*/ -# define FPGA_CLK CONFIG_SYS_FPGA_CLK /* FPGA clk pin (ppc output) */ -# define FPGA_DATA CONFIG_SYS_FPGA_DATA /* FPGA data pin (ppc output) */ -# define FPGA_DONE CONFIG_SYS_FPGA_DONE /* FPGA done pin (ppc input) */ -# define FPGA_INIT CONFIG_SYS_FPGA_INIT /* FPGA init pin (ppc input) */ -#else -# define FPGA_PRG 0x04000000 /* FPGA program pin (ppc output) */ -# define FPGA_CLK 0x02000000 /* FPGA clk pin (ppc output) */ -# define FPGA_DATA 0x01000000 /* FPGA data pin (ppc output) */ -# define FPGA_DONE 0x00800000 /* FPGA done pin (ppc input) */ -# define FPGA_INIT 0x00400000 /* FPGA init pin (ppc input) */ -#endif - -#define ERROR_FPGA_PRG_INIT_LOW -1 /* Timeout after PRG* asserted */ -#define ERROR_FPGA_PRG_INIT_HIGH -2 /* Timeout after PRG* deasserted */ -#define ERROR_FPGA_PRG_DONE -3 /* Timeout after programming */ - -#define SET_FPGA(data) out32(GPIO0_OR, data) - -#define FPGA_WRITE_1 { \ - SET_FPGA(FPGA_PRG | FPGA_DATA); /* set clock to 0 */ \ - SET_FPGA(FPGA_PRG | FPGA_DATA); /* set data to 1 */ \ - SET_FPGA(FPGA_PRG | FPGA_CLK | FPGA_DATA); /* set clock to 1 */ \ - SET_FPGA(FPGA_PRG | FPGA_CLK | FPGA_DATA);} /* set data to 1 */ - -#define FPGA_WRITE_0 { \ - SET_FPGA(FPGA_PRG | FPGA_DATA); /* set clock to 0 */ \ - SET_FPGA(FPGA_PRG); /* set data to 0 */ \ - SET_FPGA(FPGA_PRG | FPGA_CLK); /* set clock to 1 */ \ - SET_FPGA(FPGA_PRG | FPGA_CLK | FPGA_DATA);} /* set data to 1 */ - -#if 0 -static int fpga_boot (unsigned char *fpgadata, int size) -{ - int i, index, len; - int count; - -#ifdef CONFIG_SYS_FPGA_SPARTAN2 - int j; -#else - unsigned char b; - int bit; -#endif - - /* display infos on fpgaimage */ - index = 15; - for (i = 0; i < 4; i++) { - len = fpgadata[index]; - DBG ("FPGA: %s\n", &(fpgadata[index + 1])); - index += len + 3; - } - -#ifdef CONFIG_SYS_FPGA_SPARTAN2 - /* search for preamble 0xFFFFFFFF */ - while (1) { - if ((fpgadata[index] == 0xff) && (fpgadata[index + 1] == 0xff) - && (fpgadata[index + 2] == 0xff) - && (fpgadata[index + 3] == 0xff)) - break; /* preamble found */ - else - index++; - } -#else - /* search for preamble 0xFF2X */ - for (index = 0; index < size - 1; index++) { - if ((fpgadata[index] == 0xff) - && ((fpgadata[index + 1] & 0xf0) == 0x30)) - break; - } - index += 2; -#endif - - DBG ("FPGA: configdata starts at position 0x%x\n", index); - DBG ("FPGA: length of fpga-data %d\n", size - index); - - /* - * Setup port pins for fpga programming - */ - out32 (GPIO0_ODR, 0x00000000); /* no open drain pins */ - out32 (GPIO0_TCR, in32 (GPIO0_TCR) | FPGA_PRG | FPGA_CLK | FPGA_DATA); /* setup for output */ - out32 (GPIO0_OR, in32 (GPIO0_OR) | FPGA_PRG | FPGA_CLK | FPGA_DATA); /* set pins to high */ - - DBG ("%s, ", - ((in32 (GPIO0_IR) & FPGA_DONE) == 0) ? "NOT DONE" : "DONE"); - DBG ("%s\n", - ((in32 (GPIO0_IR) & FPGA_INIT) == 0) ? "NOT INIT" : "INIT"); - - /* - * Init fpga by asserting and deasserting PROGRAM* - */ - SET_FPGA (FPGA_CLK | FPGA_DATA); - - /* Wait for FPGA init line low */ - count = 0; - while (in32 (GPIO0_IR) & FPGA_INIT) { - udelay (1000); /* wait 1ms */ - /* Check for timeout - 100us max, so use 3ms */ - if (count++ > 3) { - DBG ("FPGA: Booting failed!\n"); - return ERROR_FPGA_PRG_INIT_LOW; - } - } - - DBG ("%s, ", - ((in32 (GPIO0_IR) & FPGA_DONE) == 0) ? "NOT DONE" : "DONE"); - DBG ("%s\n", - ((in32 (GPIO0_IR) & FPGA_INIT) == 0) ? "NOT INIT" : "INIT"); - - /* deassert PROGRAM* */ - SET_FPGA (FPGA_PRG | FPGA_CLK | FPGA_DATA); - - /* Wait for FPGA end of init period . */ - count = 0; - while (!(in32 (GPIO0_IR) & FPGA_INIT)) { - udelay (1000); /* wait 1ms */ - /* Check for timeout */ - if (count++ > 3) { - DBG ("FPGA: Booting failed!\n"); - return ERROR_FPGA_PRG_INIT_HIGH; - } - } - - DBG ("%s, ", - ((in32 (GPIO0_IR) & FPGA_DONE) == 0) ? "NOT DONE" : "DONE"); - DBG ("%s\n", - ((in32 (GPIO0_IR) & FPGA_INIT) == 0) ? "NOT INIT" : "INIT"); - - DBG ("write configuration data into fpga\n"); - /* write configuration-data into fpga... */ - -#ifdef CONFIG_SYS_FPGA_SPARTAN2 - /* - * Load uncompressed image into fpga - */ - for (i = index; i < size; i++) { - for (j = 0; j < 8; j++) { - if ((fpgadata[i] & 0x80) == 0x80) { - FPGA_WRITE_1; - } else { - FPGA_WRITE_0; - } - fpgadata[i] <<= 1; - } - } -#else /* ! CONFIG_SYS_FPGA_SPARTAN2 */ - /* send 0xff 0x20 */ - FPGA_WRITE_1; - FPGA_WRITE_1; - FPGA_WRITE_1; - FPGA_WRITE_1; - FPGA_WRITE_1; - FPGA_WRITE_1; - FPGA_WRITE_1; - FPGA_WRITE_1; - FPGA_WRITE_0; - FPGA_WRITE_0; - FPGA_WRITE_1; - FPGA_WRITE_0; - FPGA_WRITE_0; - FPGA_WRITE_0; - FPGA_WRITE_0; - FPGA_WRITE_0; - - /* - ** Bit_DeCompression - ** Code 1 .. maxOnes : n '1's followed by '0' - ** maxOnes + 1 .. maxOnes + 1 : n - 1 '1's no '0' - ** maxOnes + 2 .. 254 : n - (maxOnes + 2) '0's followed by '1' - ** 255 : '1' - */ - - for (i = index; i < size; i++) { - b = fpgadata[i]; - if ((b >= 1) && (b <= MAX_ONES)) { - for (bit = 0; bit < b; bit++) { - FPGA_WRITE_1; - } - FPGA_WRITE_0; - } else if (b == (MAX_ONES + 1)) { - for (bit = 1; bit < b; bit++) { - FPGA_WRITE_1; - } - } else if ((b >= (MAX_ONES + 2)) && (b <= 254)) { - for (bit = 0; bit < (b - (MAX_ONES + 2)); bit++) { - FPGA_WRITE_0; - } - FPGA_WRITE_1; - } else if (b == 255) { - FPGA_WRITE_1; - } - } -#endif /* CONFIG_SYS_FPGA_SPARTAN2 */ - - DBG ("%s, ", - ((in32 (GPIO0_IR) & FPGA_DONE) == 0) ? "NOT DONE" : "DONE"); - DBG ("%s\n", - ((in32 (GPIO0_IR) & FPGA_INIT) == 0) ? "NOT INIT" : "INIT"); - - /* - * Check if fpga's DONE signal - correctly booted ? - */ - - /* Wait for FPGA end of programming period . */ - count = 0; - while (!(in32 (GPIO0_IR) & FPGA_DONE)) { - udelay (1000); /* wait 1ms */ - /* Check for timeout */ - if (count++ > 3) { - DBG ("FPGA: Booting failed!\n"); - return ERROR_FPGA_PRG_DONE; - } - } - - DBG ("FPGA: Booting successful!\n"); - return 0; -} -#endif /* 0 */ diff --git a/board/dave/common/pci.c b/board/dave/common/pci.c deleted file mode 100644 index 71bc8ac096a..00000000000 --- a/board/dave/common/pci.c +++ /dev/null @@ -1,186 +0,0 @@ -/* - * (C) Copyright 2001 - * Stefan Roese, esd gmbh germany, stefan.roese@esd-electronics.com - * - * SPDX-License-Identifier: GPL-2.0+ - */ - -#include -#include -#include -#include - - -u_long pci9054_iobase; - - -#define PCI_PRIMARY_CAR (0x500000dc) /* PCI config address reg */ -#define PCI_PRIMARY_CDR (0x80000000) /* PCI config data reg */ - - -/*-----------------------------------------------------------------------------+ -| Subroutine: pci9054_read_config_dword -| Description: Read a PCI configuration register -| Inputs: -| hose PCI Controller -| dev PCI Bus+Device+Function number -| offset Configuration register number -| value Address of the configuration register value -| Return value: -| 0 Successful -+-----------------------------------------------------------------------------*/ -int pci9054_read_config_dword(struct pci_controller *hose, - pci_dev_t dev, int offset, u32* value) -{ - unsigned long conAdrVal; - unsigned long val; - - /* generate coded value for CON_ADR register */ - conAdrVal = dev | (offset & 0xfc) | 0x80000000; - - /* Load the CON_ADR (CAR) value first, then read from CON_DATA (CDR) */ - *(unsigned long *)PCI_PRIMARY_CAR = conAdrVal; - - /* Note: *pResult comes back as -1 if machine check happened */ - val = in32r(PCI_PRIMARY_CDR); - - *value = (unsigned long) val; - - out32r(PCI_PRIMARY_CAR, 0); - - if ((*(unsigned long *)0x50000304) & 0x60000000) - { - /* clear pci master/target abort bits */ - *(unsigned long *)0x50000304 = *(unsigned long *)0x50000304; - } - - return 0; -} - -/*-----------------------------------------------------------------------------+ -| Subroutine: pci9054_write_config_dword -| Description: Write a PCI configuration register. -| Inputs: -| hose PCI Controller -| dev PCI Bus+Device+Function number -| offset Configuration register number -| Value Configuration register value -| Return value: -| 0 Successful -| Updated for pass2 errata #6. Need to disable interrupts and clear the -| PCICFGADR reg after writing the PCICFGDATA reg. -+-----------------------------------------------------------------------------*/ -int pci9054_write_config_dword(struct pci_controller *hose, - pci_dev_t dev, int offset, u32 value) -{ - unsigned long conAdrVal; - - conAdrVal = dev | (offset & 0xfc) | 0x80000000; - - *(unsigned long *)PCI_PRIMARY_CAR = conAdrVal; - - out32r(PCI_PRIMARY_CDR, value); - - out32r(PCI_PRIMARY_CAR, 0); - - /* clear pci master/target abort bits */ - *(unsigned long *)0x50000304 = *(unsigned long *)0x50000304; - - return (0); -} - -/*----------------------------------------------------------------------- - */ - -#ifdef CONFIG_DASA_SIM -static void pci_dasa_sim_config_pci9054(struct pci_controller *hose, pci_dev_t dev, - struct pci_config_table *_) -{ - unsigned int iobase; - unsigned short status = 0; - unsigned char timer; - - /* - * Configure PLX PCI9054 - */ - pci_read_config_word(CONFIG_SYS_PCI9054_DEV_FN, PCI_COMMAND, &status); - status |= PCI_COMMAND_MASTER | PCI_COMMAND_IO | PCI_COMMAND_MEMORY; - pci_write_config_word(CONFIG_SYS_PCI9054_DEV_FN, PCI_COMMAND, status); - - /* Check the latency timer for values >= 0x60. - */ - pci_read_config_byte(CONFIG_SYS_PCI9054_DEV_FN, PCI_LATENCY_TIMER, &timer); - if (timer < 0x60) - { - pci_write_config_byte(CONFIG_SYS_PCI9054_DEV_FN, PCI_LATENCY_TIMER, 0x60); - } - - /* Set I/O base register. - */ - pci_write_config_dword(CONFIG_SYS_PCI9054_DEV_FN, PCI_BASE_ADDRESS_0, CONFIG_SYS_PCI9054_IOBASE); - pci_read_config_dword(CONFIG_SYS_PCI9054_DEV_FN, PCI_BASE_ADDRESS_0, &iobase); - - pci9054_iobase = pci_mem_to_phys(CONFIG_SYS_PCI9054_DEV_FN, iobase & PCI_BASE_ADDRESS_MEM_MASK); - - if (pci9054_iobase == 0xffffffff) - { - printf("Error: Can not set I/O base register.\n"); - return; - } -} -#endif - -static struct pci_config_table pci9054_config_table[] = { -#ifndef CONFIG_PCI_PNP - { PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, - PCI_BUS(CONFIG_SYS_ETH_DEV_FN), PCI_DEV(CONFIG_SYS_ETH_DEV_FN), PCI_FUNC(CONFIG_SYS_ETH_DEV_FN), - pci_cfgfunc_config_device, { CONFIG_SYS_ETH_IOBASE, - CONFIG_SYS_ETH_IOBASE, - PCI_COMMAND_IO | PCI_COMMAND_MASTER }}, -#ifdef CONFIG_DASA_SIM - { PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, - PCI_BUS(CONFIG_SYS_PCI9054_DEV_FN), PCI_DEV(CONFIG_SYS_PCI9054_DEV_FN), PCI_FUNC(CONFIG_SYS_PCI9054_DEV_FN), - pci_dasa_sim_config_pci9054 }, -#endif -#endif - { } -}; - -static struct pci_controller pci9054_hose = { - config_table: pci9054_config_table, -}; - -void pci_init(void) -{ - struct pci_controller *hose = &pci9054_hose; - - /* - * Register the hose - */ - hose->first_busno = 0; - hose->last_busno = 0xff; - - /* System memory space */ - pci_set_region(hose->regions + 0, - 0x00000000, 0x00000000, 0x01000000, - PCI_REGION_MEM | PCI_REGION_SYS_MEMORY); - - /* PCI Memory space */ - pci_set_region(hose->regions + 1, - 0x00000000, 0xc0000000, 0x10000000, - PCI_REGION_MEM); - - pci_set_ops(hose, - pci_hose_read_config_byte_via_dword, - pci_hose_read_config_word_via_dword, - pci9054_read_config_dword, - pci_hose_write_config_byte_via_dword, - pci_hose_write_config_word_via_dword, - pci9054_write_config_dword); - - hose->region_count = 2; - - pci_register_hose(hose); - - hose->last_busno = pci_hose_scan(hose); -} -- cgit v1.2.3 From cd8aa893b4326ebbe96db4066b01dd8f6e1e3d5e Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Mon, 31 Mar 2014 13:14:46 +0900 Subject: board: hidden_dragon: remove an unused source file Signed-off-by: Masahiro Yamada Cc: Yusdi Santoso --- board/hidden_dragon/early_init.S | 137 --------------------------------------- 1 file changed, 137 deletions(-) delete mode 100644 board/hidden_dragon/early_init.S (limited to 'board') diff --git a/board/hidden_dragon/early_init.S b/board/hidden_dragon/early_init.S deleted file mode 100644 index 5a9b924ef92..00000000000 --- a/board/hidden_dragon/early_init.S +++ /dev/null @@ -1,137 +0,0 @@ -/* - * (C) Copyright 2001 - * Thomas Koeller, tkoeller@gmx.net - * - * SPDX-License-Identifier: GPL-2.0+ - */ - -#ifndef __ASSEMBLY__ -#define __ASSEMBLY__ 1 -#endif - -#include -#include -#include -#include -#include - -#if defined(USE_DINK32) - /* We are running from RAM, so do not clear the MCCR1_MEMGO bit! */ - #define MCCR1VAL ((CONFIG_SYS_ROMNAL << MCCR1_ROMNAL_SHIFT) | (CONFIG_SYS_ROMFAL << MCCR1_ROMFAL_SHIFT) | MCCR1_MEMGO) -#else - #define MCCR1VAL (CONFIG_SYS_ROMNAL << MCCR1_ROMNAL_SHIFT) | (CONFIG_SYS_ROMFAL << MCCR1_ROMFAL_SHIFT) -#endif - - .text - - /* Values to program into memory controller registers */ -tbl: .long MCCR1, MCCR1VAL - .long MCCR2, CONFIG_SYS_REFINT << MCCR2_REFINT_SHIFT - .long MCCR3 - .long (((CONFIG_SYS_BSTOPRE & 0x000000f0) >> 4) << MCCR3_BSTOPRE2TO5_SHIFT) | \ - (CONFIG_SYS_REFREC << MCCR3_REFREC_SHIFT) | \ - (CONFIG_SYS_RDLAT << MCCR3_RDLAT_SHIFT) - .long MCCR4 - .long (CONFIG_SYS_PRETOACT << MCCR4_PRETOACT_SHIFT) | (CONFIG_SYS_ACTTOPRE << MCCR4_ACTTOPRE_SHIFT) | \ - (CONFIG_SYS_REGISTERD_TYPE_BUFFER << 20) | \ - (((CONFIG_SYS_BSTOPRE & 0x00000300) >> 8) << MCCR4_BSTOPRE0TO1_SHIFT ) | \ - ((CONFIG_SYS_SDMODE_CAS_LAT << 4) | (CONFIG_SYS_SDMODE_WRAP << 3) | \ - (CONFIG_SYS_SDMODE_BURSTLEN) << MCCR4_SDMODE_SHIFT) | \ - (CONFIG_SYS_ACTTORW << MCCR4_ACTTORW_SHIFT) | \ - ((CONFIG_SYS_BSTOPRE & 0x0000000f) << MCCR4_BSTOPRE6TO9_SHIFT ) - .long MSAR1 - .long (((CONFIG_SYS_BANK0_START & MICR_ADDR_MASK) >> MICR_ADDR_SHIFT) << 0) | \ - (((CONFIG_SYS_BANK1_START & MICR_ADDR_MASK) >> MICR_ADDR_SHIFT) << 8) | \ - (((CONFIG_SYS_BANK2_START & MICR_ADDR_MASK) >> MICR_ADDR_SHIFT) << 16) | \ - (((CONFIG_SYS_BANK3_START & MICR_ADDR_MASK) >> MICR_ADDR_SHIFT) << 24) - .long EMSAR1 - .long (((CONFIG_SYS_BANK0_START & MICR_EADDR_MASK) >> MICR_EADDR_SHIFT) << 0) | \ - (((CONFIG_SYS_BANK1_START & MICR_EADDR_MASK) >> MICR_EADDR_SHIFT) << 8) | \ - (((CONFIG_SYS_BANK2_START & MICR_EADDR_MASK) >> MICR_EADDR_SHIFT) << 16) | \ - (((CONFIG_SYS_BANK3_START & MICR_EADDR_MASK) >> MICR_EADDR_SHIFT) << 24) - .long MSAR2 - .long (((CONFIG_SYS_BANK4_START & MICR_ADDR_MASK) >> MICR_ADDR_SHIFT) << 0) | \ - (((CONFIG_SYS_BANK5_START & MICR_ADDR_MASK) >> MICR_ADDR_SHIFT) << 8) | \ - (((CONFIG_SYS_BANK6_START & MICR_ADDR_MASK) >> MICR_ADDR_SHIFT) << 16) | \ - (((CONFIG_SYS_BANK7_START & MICR_ADDR_MASK) >> MICR_ADDR_SHIFT) << 24) - .long EMSAR2 - .long (((CONFIG_SYS_BANK4_START & MICR_EADDR_MASK) >> MICR_EADDR_SHIFT) << 0) | \ - (((CONFIG_SYS_BANK5_START & MICR_EADDR_MASK) >> MICR_EADDR_SHIFT) << 8) | \ - (((CONFIG_SYS_BANK6_START & MICR_EADDR_MASK) >> MICR_EADDR_SHIFT) << 16) | \ - (((CONFIG_SYS_BANK7_START & MICR_EADDR_MASK) >> MICR_EADDR_SHIFT) << 24) - .long MEAR1 - .long (((CONFIG_SYS_BANK0_END & MICR_ADDR_MASK) >> MICR_ADDR_SHIFT) << 0) | \ - (((CONFIG_SYS_BANK1_END & MICR_ADDR_MASK) >> MICR_ADDR_SHIFT) << 8) | \ - (((CONFIG_SYS_BANK2_END & MICR_ADDR_MASK) >> MICR_ADDR_SHIFT) << 16) | \ - (((CONFIG_SYS_BANK3_END & MICR_ADDR_MASK) >> MICR_ADDR_SHIFT) << 24) - .long EMEAR1 - .long (((CONFIG_SYS_BANK0_END & MICR_EADDR_MASK) >> MICR_EADDR_SHIFT) << 0) | \ - (((CONFIG_SYS_BANK1_END & MICR_EADDR_MASK) >> MICR_EADDR_SHIFT) << 8) | \ - (((CONFIG_SYS_BANK2_END & MICR_EADDR_MASK) >> MICR_EADDR_SHIFT) << 16) | \ - (((CONFIG_SYS_BANK3_END & MICR_EADDR_MASK) >> MICR_EADDR_SHIFT) << 24) - .long MEAR2 - .long (((CONFIG_SYS_BANK4_END & MICR_ADDR_MASK) >> MICR_ADDR_SHIFT) << 0) | \ - (((CONFIG_SYS_BANK5_END & MICR_ADDR_MASK) >> MICR_ADDR_SHIFT) << 8) | \ - (((CONFIG_SYS_BANK6_END & MICR_ADDR_MASK) >> MICR_ADDR_SHIFT) << 16) | \ - (((CONFIG_SYS_BANK7_END & MICR_ADDR_MASK) >> MICR_ADDR_SHIFT) << 24) - .long EMEAR2 - .long (((CONFIG_SYS_BANK4_END & MICR_EADDR_MASK) >> MICR_EADDR_SHIFT) << 0) | \ - (((CONFIG_SYS_BANK5_END & MICR_EADDR_MASK) >> MICR_EADDR_SHIFT) << 8) | \ - (((CONFIG_SYS_BANK6_END & MICR_EADDR_MASK) >> MICR_EADDR_SHIFT) << 16) | \ - (((CONFIG_SYS_BANK7_END & MICR_EADDR_MASK) >> MICR_EADDR_SHIFT) << 24) - .long 0 - - - /* - * Early CPU initialization. Set up memory controller, so we can access any RAM at all. This - * must be done in assembly, since we have no stack at this point. - */ - .global early_init_f -early_init_f: - mflr r10 - - /* basic memory controller configuration */ - lis r3, CONFIG_ADDR_HIGH - lis r4, CONFIG_DATA_HIGH - bl lab -lab: mflr r5 - lwzu r0, tbl - lab(r5) -loop: lwz r1, 4(r5) - stwbrx r0, 0, r3 - eieio - stwbrx r1, 0, r4 - eieio - lwzu r0, 8(r5) - cmpli cr0, 0, r0, 0 - bne cr0, loop - - /* set bank enable bits */ - lis r0, MBER@h - ori r0, 0, MBER@l - li r1, CONFIG_SYS_BANK_ENABLE - stwbrx r0, 0, r3 - eieio - stb r1, 0(r4) - eieio - - /* delay loop */ - lis r0, 0x0003 - mtctr r0 -delay: bdnz delay - - /* enable memory controller */ - lis r0, MCCR1@h - ori r0, 0, MCCR1@l - stwbrx r0, 0, r3 - eieio - lwbrx r0, 0, r4 - oris r0, 0, MCCR1_MEMGO@h - stwbrx r0, 0, r4 - eieio - - /* set up stack pointer */ - lis r1, CONFIG_SYS_INIT_SP_OFFSET@h - ori r1, r1, CONFIG_SYS_INIT_SP_OFFSET@l - - mtlr r10 - blr -- cgit v1.2.3 From 46d330a6badd60e96127a3c6f722d3d3193d5a31 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Mon, 31 Mar 2014 13:30:18 +0900 Subject: kbuild: do not use $(BOARD) to specify exact object name Signed-off-by: Masahiro Yamada --- board/broadcom/bcm28155_ap/Makefile | 2 +- board/compulab/cm_t335/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'board') diff --git a/board/broadcom/bcm28155_ap/Makefile b/board/broadcom/bcm28155_ap/Makefile index b18785a0786..4bb9e708239 100644 --- a/board/broadcom/bcm28155_ap/Makefile +++ b/board/broadcom/bcm28155_ap/Makefile @@ -4,4 +4,4 @@ # SPDX-License-Identifier: GPL-2.0+ # -obj-y += $(BOARD).o +obj-y += bcm28155_ap.o diff --git a/board/compulab/cm_t335/Makefile b/board/compulab/cm_t335/Makefile index 0e6e96e039d..b405caaa5cb 100644 --- a/board/compulab/cm_t335/Makefile +++ b/board/compulab/cm_t335/Makefile @@ -6,5 +6,5 @@ # SPDX-License-Identifier: GPL-2.0+ # -obj-y += $(BOARD).o +obj-y += cm_t335.o obj-$(CONFIG_SPL_BUILD) += mux.o spl.o -- cgit v1.2.3 From a146e8b189abf73b8bac0bfa9c8c3c1b3bfe5507 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Fri, 4 Apr 2014 15:25:02 +0900 Subject: powerpc: remove NX823 board support Enough time has passed since this board was moved to Orphan. Remove. - Remove board/nx823/* - Remove include/configs/NX823.h - Clean-up ifdef(CONFIG_NX823) - Move the entry from boards.cfg to doc/README.scrapyard Signed-off-by: Masahiro Yamada --- arch/powerpc/include/asm/u-boot.h | 3 - board/nx823/Makefile | 8 - board/nx823/flash.c | 449 -------------------------------------- board/nx823/nx823.c | 374 ------------------------------- board/nx823/u-boot.lds | 82 ------- board/nx823/u-boot.lds.debug | 121 ---------- boards.cfg | 1 - doc/README.scrapyard | 5 +- include/asm-generic/u-boot.h | 3 - include/commproc.h | 27 --- include/configs/NX823.h | 344 ----------------------------- 11 files changed, 3 insertions(+), 1414 deletions(-) delete mode 100644 board/nx823/Makefile delete mode 100644 board/nx823/flash.c delete mode 100644 board/nx823/nx823.c delete mode 100644 board/nx823/u-boot.lds delete mode 100644 board/nx823/u-boot.lds.debug delete mode 100644 include/configs/NX823.h (limited to 'board') diff --git a/arch/powerpc/include/asm/u-boot.h b/arch/powerpc/include/asm/u-boot.h index 3c284205748..f4d4a6b3003 100644 --- a/arch/powerpc/include/asm/u-boot.h +++ b/arch/powerpc/include/asm/u-boot.h @@ -106,9 +106,6 @@ typedef struct bd_info { unsigned int bi_opbfreq; /* OPB clock in Hz */ int bi_iic_fast[2]; /* Use fast i2c mode */ #endif -#if defined(CONFIG_NX823) - unsigned char bi_sernum[8]; -#endif #if defined(CONFIG_4xx) #if defined(CONFIG_440GX) || \ defined(CONFIG_460EX) || defined(CONFIG_460GT) diff --git a/board/nx823/Makefile b/board/nx823/Makefile deleted file mode 100644 index a22be5c3e6e..00000000000 --- a/board/nx823/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -# -# (C) Copyright 2001-2006 -# Wolfgang Denk, DENX Software Engineering, wd@denx.de. -# -# SPDX-License-Identifier: GPL-2.0+ -# - -obj-y = nx823.o flash.o diff --git a/board/nx823/flash.c b/board/nx823/flash.c deleted file mode 100644 index fbe17dd966c..00000000000 --- a/board/nx823/flash.c +++ /dev/null @@ -1,449 +0,0 @@ -/* - * (C) Copyright 2001 - * Kyle Harris, Nexus Technologies, Inc. kharris@nexus-tech.net - * - * (C) Copyright 2001 - * Wolfgang Denk, DENX Software Engineering, wd@denx.de. - * - * SPDX-License-Identifier: GPL-2.0+ - */ - -#include -#include - -DECLARE_GLOBAL_DATA_PTR; - -flash_info_t flash_info[CONFIG_SYS_MAX_FLASH_BANKS]; /* info for FLASH chips */ - -/*----------------------------------------------------------------------- - * Protection Flags: - */ -#define FLAG_PROTECT_SET 0x01 -#define FLAG_PROTECT_CLEAR 0x02 - -/* Board support for 1 or 2 flash devices */ -#undef FLASH_PORT_WIDTH32 -#define FLASH_PORT_WIDTH16 - -#ifdef FLASH_PORT_WIDTH16 -#define FLASH_PORT_WIDTH ushort -#define FLASH_PORT_WIDTHV vu_short -#else -#define FLASH_PORT_WIDTH ulong -#define FLASH_PORT_WIDTHV vu_long -#endif - -#define FPW FLASH_PORT_WIDTH -#define FPWV FLASH_PORT_WIDTHV - -/*----------------------------------------------------------------------- - * Functions - */ -static ulong flash_get_size (FPW *addr, flash_info_t *info); -static int write_data (flash_info_t *info, ulong dest, FPW data); -static void flash_get_offsets (ulong base, flash_info_t *info); - -/*----------------------------------------------------------------------- - */ - -unsigned long flash_init (void) -{ - volatile immap_t *immap = (immap_t *)CONFIG_SYS_IMMR; - volatile memctl8xx_t *memctl = &immap->im_memctl; - unsigned long size_b0; - int i; - - /* Init: no FLASHes known */ - for (i=0; imemc_or0 = CONFIG_SYS_OR_TIMING_FLASH | (-size_b0 & 0xFFFF8000); - memctl->memc_br0 = (CONFIG_SYS_FLASH_BASE & BR_BA_MSK) | BR_PS_16 | BR_MS_GPCM | BR_V; - - /* Re-do sizing to get full correct info */ - size_b0 = flash_get_size((FPW *)CONFIG_SYS_FLASH_BASE, &flash_info[0]); - - flash_get_offsets (CONFIG_SYS_FLASH_BASE, &flash_info[0]); - - /* monitor protection ON by default */ - (void)flash_protect(FLAG_PROTECT_SET, - CONFIG_SYS_FLASH_BASE, - CONFIG_SYS_FLASH_BASE+monitor_flash_len-1, - &flash_info[0]); - - flash_info[0].size = size_b0; - - return (size_b0); -} - -/*----------------------------------------------------------------------- - */ -static void flash_get_offsets (ulong base, flash_info_t *info) -{ - int i; - - if (info->flash_id == FLASH_UNKNOWN) { - return; - } - - if ((info->flash_id & FLASH_VENDMASK) == FLASH_MAN_INTEL) { - for (i = 0; i < info->sector_count; i++) { - info->start[i] = base + (i * 0x00020000); - } - } -} - -/*----------------------------------------------------------------------- - */ -void flash_print_info (flash_info_t *info) -{ - int i; - - if (info->flash_id == FLASH_UNKNOWN) { - printf ("missing or unknown FLASH type\n"); - return; - } - - switch (info->flash_id & FLASH_VENDMASK) { - case FLASH_MAN_INTEL: printf ("INTEL "); break; - default: printf ("Unknown Vendor "); break; - } - - switch (info->flash_id & FLASH_TYPEMASK) { - case FLASH_28F320J3A: - printf ("28F320J3A\n"); break; - case FLASH_28F640J3A: - printf ("28F640J3A\n"); break; - case FLASH_28F128J3A: - printf ("28F128J3A\n"); break; - default: printf ("Unknown Chip Type\n"); break; - } - - printf (" Size: %ld MB in %d Sectors\n", - info->size >> 20, info->sector_count); - - printf (" Sector Start Addresses:"); - for (i=0; isector_count; ++i) { - if ((i % 5) == 0) - printf ("\n "); - printf (" %08lX%s", - info->start[i], - info->protect[i] ? " (RO)" : " " - ); - } - printf ("\n"); - return; -} - -/*----------------------------------------------------------------------- - */ - - -/*----------------------------------------------------------------------- - */ - -/* - * The following code cannot be run from FLASH! - */ - -static ulong flash_get_size (FPW *addr, flash_info_t *info) -{ - FPW value; - - /* Write auto select command: read Manufacturer ID */ - addr[0x5555] = (FPW)0x00AA00AA; - addr[0x2AAA] = (FPW)0x00550055; - addr[0x5555] = (FPW)0x00900090; - - value = addr[0]; - - switch (value) { - case (FPW)INTEL_MANUFACT: - info->flash_id = FLASH_MAN_INTEL; - break; - default: - info->flash_id = FLASH_UNKNOWN; - info->sector_count = 0; - info->size = 0; - addr[0] = (FPW)0x00FF00FF; /* restore read mode */ - return (0); /* no or unknown flash */ - } - - value = addr[1]; /* device ID */ - - switch (value) { - case (FPW)INTEL_ID_28F320J3A: - info->flash_id += FLASH_28F320J3A; - info->sector_count = 32; - info->size = 0x00400000; - break; /* => 4 MB */ - - case (FPW)INTEL_ID_28F640J3A: - info->flash_id += FLASH_28F640J3A; - info->sector_count = 64; - info->size = 0x00800000; - break; /* => 8 MB */ - - case (FPW)INTEL_ID_28F128J3A: - info->flash_id += FLASH_28F128J3A; - info->sector_count = 128; - info->size = 0x01000000; - break; /* => 16 MB */ - - default: - info->flash_id = FLASH_UNKNOWN; - break; - } - - if (info->sector_count > CONFIG_SYS_MAX_FLASH_SECT) { - printf ("** ERROR: sector count %d > max (%d) **\n", - info->sector_count, CONFIG_SYS_MAX_FLASH_SECT); - info->sector_count = CONFIG_SYS_MAX_FLASH_SECT; - } - - addr[0] = (FPW)0x00FF00FF; /* restore read mode */ - - return (info->size); -} - - -/*----------------------------------------------------------------------- - */ - -int flash_erase (flash_info_t *info, int s_first, int s_last) -{ - int flag, prot, sect; - ulong type, start, now, last; - int rcode = 0; - - if ((s_first < 0) || (s_first > s_last)) { - if (info->flash_id == FLASH_UNKNOWN) { - printf ("- missing\n"); - } else { - printf ("- no sectors to erase\n"); - } - return 1; - } - - type = (info->flash_id & FLASH_VENDMASK); - if ((type != FLASH_MAN_INTEL)) { - printf ("Can't erase unknown flash type %08lx - aborted\n", - info->flash_id); - return 1; - } - - prot = 0; - for (sect=s_first; sect<=s_last; ++sect) { - if (info->protect[sect]) { - prot++; - } - } - - if (prot) { - printf ("- Warning: %d protected sectors will not be erased!\n", - prot); - } else { - printf ("\n"); - } - - start = get_timer (0); - last = start; - /* Start erase on unprotected sectors */ - for (sect = s_first; sect<=s_last; sect++) { - if (info->protect[sect] == 0) { /* not protected */ - FPWV *addr = (FPWV *)(info->start[sect]); - FPW status; - - /* Disable interrupts which might cause a timeout here */ - flag = disable_interrupts(); - - *addr = (FPW)0x00500050; /* clear status register */ - *addr = (FPW)0x00200020; /* erase setup */ - *addr = (FPW)0x00D000D0; /* erase confirm */ - - /* re-enable interrupts if necessary */ - if (flag) - enable_interrupts(); - - /* wait at least 80us - let's wait 1 ms */ - udelay (1000); - - while (((status = *addr) & (FPW)0x00800080) != (FPW)0x00800080) { - if ((now=get_timer(start)) > CONFIG_SYS_FLASH_ERASE_TOUT) { - printf ("Timeout\n"); - *addr = (FPW)0x00B000B0; /* suspend erase */ - *addr = (FPW)0x00FF00FF; /* reset to read mode */ - rcode = 1; - break; - } - - /* show that we're waiting */ - if ((now - last) > 1000) { /* every second */ - putc ('.'); - last = now; - } - } - - *addr = (FPW)0x00FF00FF; /* reset to read mode */ - printf (" done\n"); - } - } - return rcode; -} - -/*----------------------------------------------------------------------- - * Copy memory to flash, returns: - * 0 - OK - * 1 - write timeout - * 2 - Flash not erased - * 4 - Flash not identified - */ - -int write_buff (flash_info_t *info, uchar *src, ulong addr, ulong cnt) -{ - ulong cp, wp; - FPW data; - int count, i, l, rc, port_width; - - if (info->flash_id == FLASH_UNKNOWN) { - return 4; - } -/* get lower word aligned address */ -#ifdef FLASH_PORT_WIDTH16 - wp = (addr & ~1); - port_width = 2; -#else - wp = (addr & ~3); - port_width = 4; -#endif - - /* save sernum if needed */ - if (addr >= CONFIG_SYS_FLASH_SN_SECTOR && addr < CONFIG_SYS_FLASH_SN_BASE) - { - u_long dest = CONFIG_SYS_FLASH_SN_BASE; - u_short *sn = (u_short *)gd->bd->bi_sernum; - - printf("(saving sernum)"); - for (i=0; i<4; i++) - { - if ((rc = write_data(info, dest, sn[i])) != 0) { - return (rc); - } - dest += port_width; - } - } - - /* - * handle unaligned start bytes - */ - if ((l = addr - wp) != 0) { - data = 0; - for (i=0, cp=wp; i0; ++i) { - data = (data << 8) | *src++; - --cnt; - ++cp; - } - for (; cnt==0 && i= port_width) { - data = 0; - for (i=0; i 0x800) - { - putc('.'); - count = 0; - } - } - - if (cnt == 0) { - return (0); - } - - /* - * handle unaligned tail bytes - */ - data = 0; - for (i=0, cp=wp; i0; ++i, ++cp) { - data = (data << 8) | *src++; - --cnt; - } - for (; i CONFIG_SYS_FLASH_WRITE_TOUT) { - *addr = (FPW)0x00FF00FF; /* restore read mode */ - return (1); - } - } - - *addr = (FPW)0x00FF00FF; /* restore read mode */ - - return (0); -} diff --git a/board/nx823/nx823.c b/board/nx823/nx823.c deleted file mode 100644 index d49fa8ca21a..00000000000 --- a/board/nx823/nx823.c +++ /dev/null @@ -1,374 +0,0 @@ -/* - * (C) Copyright 2001 - * Kyle Harris, Nexus Technologies, Inc. kharris@nexus-tech.net - * - * (C) Copyright 2001-2002 - * Wolfgang Denk, DENX Software Engineering, wd@denx.de. - * - * SPDX-License-Identifier: GPL-2.0+ - */ - -#include -#include -#include -#include - -DECLARE_GLOBAL_DATA_PTR; - -static long int dram_size (long int, long int *, long int); - -#define _NOT_USED_ 0xFFFFFFFF - -const uint sdram_table[] = { -#if (MPC8XX_SPEED <= 50000000L) - /* - * Single Read. (Offset 0 in UPMA RAM) - */ - 0x0F07EC04, 0x01BBD804, 0x1FF7F440, 0xFFFFFC07, - 0xFFFFFFFF, - - /* - * SDRAM Initialization (offset 5 in UPMA RAM) - * - * This is no UPM entry point. The following definition uses - * the remaining space to establish an initialization - * sequence, which is executed by a RUN command. - * - */ - 0x1FE7F434, 0xEFABE834, 0x1FA7D435, - - /* - * Burst Read. (Offset 8 in UPMA RAM) - */ - 0x0F07EC04, 0x10EFDC04, 0xF0AFFC00, 0xF0AFFC00, - 0xF1AFFC00, 0xFFAFFC40, 0xFFAFFC07, 0xFFFFFFFF, - 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, - 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, - - /* - * Single Write. (Offset 18 in UPMA RAM) - */ - 0x0E07E804, 0x01BBD000, 0x1FF7F447, 0xFFFFFFFF, - 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, - - /* - * Burst Write. (Offset 20 in UPMA RAM) - */ - 0x0E07E800, 0x10EFD400, 0xF0AFFC00, 0xF0AFFC00, - 0xF1AFFC47, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, - 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, - 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, - - /* - * Refresh (Offset 30 in UPMA RAM) - */ - 0x1FF7DC84, 0xFFFFFC04, 0xFFFFFC84, 0xFFFFFC07, - 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, - 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, - - /* - * Exception. (Offset 3c in UPMA RAM) - */ - 0x7FFFFC07, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF -#else - - /* - * Single Read. (Offset 0 in UPMA RAM) - */ - 0x1F07FC04, 0xEEAFEC04, 0x11AFDC04, 0xEFBBF800, - 0x1FF7F447, - - /* - * SDRAM Initialization (offset 5 in UPMA RAM) - * - * This is no UPM entry point. The following definition uses - * the remaining space to establish an initialization - * sequence, which is executed by a RUN command. - * - */ - 0x1FF7F434, 0xEFEBE834, 0x1FB7D435, - - /* - * Burst Read. (Offset 8 in UPMA RAM) - */ - 0x1F07FC04, 0xEEAFEC04, 0x10AFDC04, 0xF0AFFC00, - 0xF0AFFC00, 0xF1AFFC00, 0xEFBBF800, 0x1FF7F447, - _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_, - _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_, - - /* - * Single Write. (Offset 18 in UPMA RAM) - */ - 0x1F07FC04, 0xEEAFE800, 0x01BBD004, 0x1FF7F447, - _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_, - - /* - * Burst Write. (Offset 20 in UPMA RAM) - */ - 0x1F07FC04, 0xEEAFE800, 0x10AFD400, 0xF0AFFC00, - 0xF0AFFC00, 0xE1BBF804, 0x1FF7F447, _NOT_USED_, - _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_, - _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_, - - /* - * Refresh (Offset 30 in UPMA RAM) - */ - 0x1FF7DC84, 0xFFFFFC04, 0xFFFFFC04, 0xFFFFFC04, - 0xFFFFFC84, 0xFFFFFC07, - _NOT_USED_, _NOT_USED_, _NOT_USED_, - _NOT_USED_, _NOT_USED_, _NOT_USED_, - - /* - * Exception. (Offset 3c in UPMA RAM) - */ - 0x7FFFFC07, /* last */ - _NOT_USED_, _NOT_USED_, _NOT_USED_, -#endif -}; - -/* ------------------------------------------------------------------------- */ - - -/* - * Check Board Identity: - * - */ - -int checkboard (void) -{ - printf ("Board: Nexus NX823"); - return (0); -} - -/* ------------------------------------------------------------------------- */ - -phys_size_t initdram (int board_type) -{ - volatile immap_t *immap = (immap_t *) CONFIG_SYS_IMMR; - volatile memctl8xx_t *memctl = &immap->im_memctl; - long int size_b0, size_b1, size8, size9; - - upmconfig (UPMA, (uint *) sdram_table, - sizeof (sdram_table) / sizeof (uint)); - - /* - * Up to 2 Banks of 64Mbit x 2 devices - * Initial builds only have 1 - */ - memctl->memc_mptpr = CONFIG_SYS_MPTPR_1BK_4K; - memctl->memc_mar = 0x00000088; - - /* - * Map controller SDRAM bank 0 - */ - memctl->memc_or1 = CONFIG_SYS_OR1_PRELIM; - memctl->memc_br1 = CONFIG_SYS_BR1_PRELIM; - memctl->memc_mamr = CONFIG_SYS_MAMR_8COL & (~(MAMR_PTAE)); /* no refresh yet */ - udelay (200); - - /* - * Map controller SDRAM bank 1 - */ - memctl->memc_or2 = CONFIG_SYS_OR2_PRELIM; - memctl->memc_br2 = CONFIG_SYS_BR2_PRELIM; - - /* - * Perform SDRAM initializsation sequence - */ - memctl->memc_mcr = 0x80002105; /* SDRAM bank 0 */ - udelay (1); - memctl->memc_mcr = 0x80002230; /* SDRAM bank 0 - execute twice */ - udelay (1); - - memctl->memc_mcr = 0x80004105; /* SDRAM bank 1 */ - udelay (1); - memctl->memc_mcr = 0x80004230; /* SDRAM bank 1 - execute twice */ - udelay (1); - - memctl->memc_mamr |= MAMR_PTAE; /* enable refresh */ - udelay (1000); - - /* - * Preliminary prescaler for refresh (depends on number of - * banks): This value is selected for four cycles every 62.4 us - * with two SDRAM banks or four cycles every 31.2 us with one - * bank. It will be adjusted after memory sizing. - */ - memctl->memc_mptpr = CONFIG_SYS_MPTPR_2BK_8K; - - memctl->memc_mar = 0x00000088; - - - /* - * Check Bank 0 Memory Size for re-configuration - * - * try 8 column mode - */ - size8 = dram_size (CONFIG_SYS_MAMR_8COL, (long *) SDRAM_BASE1_PRELIM, - SDRAM_MAX_SIZE); - - udelay (1000); - - /* - * try 9 column mode - */ - size9 = dram_size (CONFIG_SYS_MAMR_9COL, (long *) SDRAM_BASE1_PRELIM, - SDRAM_MAX_SIZE); - - if (size8 < size9) { /* leave configuration at 9 columns */ - size_b0 = size9; -/* debug ("SDRAM Bank 0 in 9 column mode: %ld MB\n", size >> 20); */ - } else { /* back to 8 columns */ - size_b0 = size8; - memctl->memc_mamr = CONFIG_SYS_MAMR_8COL; - udelay (500); -/* debug ("SDRAM Bank 0 in 8 column mode: %ld MB\n", size >> 20); */ - } - - /* - * Check Bank 1 Memory Size - * use current column settings - * [9 column SDRAM may also be used in 8 column mode, - * but then only half the real size will be used.] - */ - size_b1 = dram_size (memctl->memc_mamr, (long *) SDRAM_BASE2_PRELIM, - SDRAM_MAX_SIZE); -/* debug ("SDRAM Bank 1: %ld MB\n", size8 >> 20); */ - - udelay (1000); - - /* - * Adjust refresh rate depending on SDRAM type, both banks - * For types > 128 MBit leave it at the current (fast) rate - */ - if ((size_b0 < 0x02000000) && (size_b1 < 0x02000000)) { - /* reduce to 15.6 us (62.4 us / quad) */ - memctl->memc_mptpr = CONFIG_SYS_MPTPR_2BK_4K; - udelay (1000); - } - - /* - * Final mapping: map bigger bank first - */ - if (size_b1 > size_b0) { /* SDRAM Bank 1 is bigger - map first */ - - memctl->memc_or2 = - ((-size_b1) & 0xFFFF0000) | CONFIG_SYS_OR_TIMING_SDRAM; - memctl->memc_br2 = - (CONFIG_SYS_SDRAM_BASE & BR_BA_MSK) | BR_MS_UPMA | BR_V; - - if (size_b0 > 0) { - /* - * Position Bank 0 immediately above Bank 1 - */ - memctl->memc_or1 = - ((-size_b0) & 0xFFFF0000) | - CONFIG_SYS_OR_TIMING_SDRAM; - memctl->memc_br1 = - ((CONFIG_SYS_SDRAM_BASE & BR_BA_MSK) | BR_MS_UPMA | - BR_V) - + size_b1; - } else { - unsigned long reg; - - /* - * No bank 0 - * - * invalidate bank - */ - memctl->memc_br1 = 0; - - /* adjust refresh rate depending on SDRAM type, one bank */ - reg = memctl->memc_mptpr; - reg >>= 1; /* reduce to CONFIG_SYS_MPTPR_1BK_8K / _4K */ - memctl->memc_mptpr = reg; - } - - } else { /* SDRAM Bank 0 is bigger - map first */ - - memctl->memc_or1 = - ((-size_b0) & 0xFFFF0000) | CONFIG_SYS_OR_TIMING_SDRAM; - memctl->memc_br1 = - (CONFIG_SYS_SDRAM_BASE & BR_BA_MSK) | BR_MS_UPMA | BR_V; - - if (size_b1 > 0) { - /* - * Position Bank 1 immediately above Bank 0 - */ - memctl->memc_or2 = - ((-size_b1) & 0xFFFF0000) | - CONFIG_SYS_OR_TIMING_SDRAM; - memctl->memc_br2 = - ((CONFIG_SYS_SDRAM_BASE & BR_BA_MSK) | BR_MS_UPMA | - BR_V) - + size_b0; - } else { - unsigned long reg; - - /* - * No bank 1 - * - * invalidate bank - */ - memctl->memc_br2 = 0; - - /* adjust refresh rate depending on SDRAM type, one bank */ - reg = memctl->memc_mptpr; - reg >>= 1; /* reduce to CONFIG_SYS_MPTPR_1BK_8K / _4K */ - memctl->memc_mptpr = reg; - } - } - - udelay (10000); - - return (size_b0 + size_b1); -} - -/* ------------------------------------------------------------------------- */ - -/* - * Check memory range for valid RAM. A simple memory test determines - * the actually available RAM size between addresses `base' and - * `base + maxsize'. Some (not all) hardware errors are detected: - * - short between address lines - * - short between data lines - */ - -static long int dram_size (long int mamr_value, long int *base, - long int maxsize) -{ - volatile immap_t *immap = (immap_t *) CONFIG_SYS_IMMR; - volatile memctl8xx_t *memctl = &immap->im_memctl; - - memctl->memc_mamr = mamr_value; - - return (get_ram_size (base, maxsize)); -} - -int misc_init_r (void) -{ - int i; - char tmp[50]; - uchar ethaddr[6]; - bd_t *bd = gd->bd; - ulong *my_sernum = (unsigned long *)&bd->bi_sernum; - - /* load unique serial number */ - for (i = 0; i < 8; ++i) - bd->bi_sernum[i] = *(u_char *) (CONFIG_SYS_FLASH_SN_BASE + i); - - /* save env variables according to sernum */ - sprintf (tmp, "%08lx%08lx", my_sernum[0], my_sernum[1]); - setenv ("serial#", tmp); - - if (!eth_getenv_enetaddr("ethaddr", ethaddr)) { - ethaddr[0] = 0x10; - ethaddr[1] = 0x20; - ethaddr[2] = 0x30; - ethaddr[3] = bd->bi_sernum[1] << 4 | bd->bi_sernum[2]; - ethaddr[4] = bd->bi_sernum[5]; - ethaddr[5] = bd->bi_sernum[6]; - } - - return 0; -} diff --git a/board/nx823/u-boot.lds b/board/nx823/u-boot.lds deleted file mode 100644 index 7ae91ffb2e1..00000000000 --- a/board/nx823/u-boot.lds +++ /dev/null @@ -1,82 +0,0 @@ -/* - * (C) Copyright 2001-2010 - * Wolfgang Denk, DENX Software Engineering, wd@denx.de. - * - * SPDX-License-Identifier: GPL-2.0+ - */ - -OUTPUT_ARCH(powerpc) - -SECTIONS -{ - /* Read-only sections, merged into text segment: */ - . = + SIZEOF_HEADERS; - .text : - { - arch/powerpc/cpu/mpc8xx/start.o (.text*) - arch/powerpc/cpu/mpc8xx/traps.o (.text*) - - *(.text*) - } - _etext = .; - PROVIDE (etext = .); - .rodata : - { - *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) - } - - /* Read-write section, merged into data segment: */ - . = (. + 0x00FF) & 0xFFFFFF00; - _erotext = .; - PROVIDE (erotext = .); - .reloc : - { - _GOT2_TABLE_ = .; - KEEP(*(.got2)) - KEEP(*(.got)) - PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4); - _FIXUP_TABLE_ = .; - KEEP(*(.fixup)) - } - __got2_entries = ((_GLOBAL_OFFSET_TABLE_ - _GOT2_TABLE_) >> 2) - 1; - __fixup_entries = (. - _FIXUP_TABLE_)>>2; - - .data : - { - *(.data*) - *(.sdata*) - } - _edata = .; - PROVIDE (edata = .); - - . = .; - - . = ALIGN(4); - .u_boot_list : { - KEEP(*(SORT(.u_boot_list*))); - } - - - . = .; - __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) : - { - *(.bss*) - *(.sbss*) - *(COMMON) - . = ALIGN(4); - } - __bss_end = . ; - PROVIDE (end = .); -} diff --git a/board/nx823/u-boot.lds.debug b/board/nx823/u-boot.lds.debug deleted file mode 100644 index b0091db0c6b..00000000000 --- a/board/nx823/u-boot.lds.debug +++ /dev/null @@ -1,121 +0,0 @@ -/* - * (C) Copyright 2001 - * Wolfgang Denk, DENX Software Engineering, wd@denx.de. - * - * SPDX-License-Identifier: GPL-2.0+ - */ - -OUTPUT_ARCH(powerpc) -/* Do we need any of these for elf? - __DYNAMIC = 0; */ -SECTIONS -{ - /* 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 */ - - arch/powerpc/cpu/mpc8xx/start.o (.text) - common/dlmalloc.o (.text) - lib/vsprintf.o (.text) - lib/crc32.o (.text) - - . = env_offset; - common/env_embedded.o(.text) - - *(.text) - *(.got1) - } - _etext = .; - PROVIDE (etext = .); - .rodata : - { - *(.rodata) - *(.rodata1) - *(.rodata.str1.4) - *(.eh_frame) - } - .fini : { *(.fini) } =0 - .ctors : { *(.ctors) } - .dtors : { *(.dtors) } - - /* Read-write section, merged into data segment: */ - . = (. + 0x0FFF) & 0xFFFFF000; - _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 = .); - - - . = ALIGN(4); - .u_boot_list : { - KEEP(*(SORT(.u_boot_list*))); - } - - - __start___ex_table = .; - __ex_table : { *(__ex_table) } - __stop___ex_table = .; - - . = ALIGN(4096); - __init_begin = .; - .text.init : { *(.text.init) } - .data.init : { *(.data.init) } - . = ALIGN(4096); - __init_end = .; - - __bss_start = .; - .bss : - { - *(.sbss) *(.scommon) - *(.dynbss) - *(.bss) - *(COMMON) - } - __bss_end = . ; - PROVIDE (end = .); -} diff --git a/boards.cfg b/boards.cfg index 2b9b0c09700..26e784b01c4 100644 --- a/boards.cfg +++ b/boards.cfg @@ -1255,4 +1255,3 @@ Orphan powerpc mpc8xx - - fads Orphan powerpc mpc8xx - - genietv GENIETV - - Orphan powerpc mpc8xx - - mbx8xx MBX - - Orphan powerpc mpc8xx - - mbx8xx MBX860T - - -Orphan powerpc mpc8xx - - nx823 NX823 - - diff --git a/doc/README.scrapyard b/doc/README.scrapyard index 0a6c6b56178..7f519916fd3 100644 --- a/doc/README.scrapyard +++ b/doc/README.scrapyard @@ -11,8 +11,9 @@ easily if here is something they might want to dig for... Board Arch CPU Commit Removed Last known maintainer/contact ================================================================================================= -idmr m68k mcf52x2 - 2014-01-28 -M5271EVB m68k mcf52x2 - 2014-01-28 +nx823 powerpc mpc8xx - 2014-04-04 +idmr m68k mcf52x2 ba650e9b 2014-01-28 +M5271EVB m68k mcf52x2 ba650e9b 2014-01-28 dvl_host arm ixp e317de6b 2014-01-28 Michael Schwingen actux4 arm ixp 6ff7aafa 2014-01-28 Michael Schwingen actux3 arm ixp 38da33f3 2014-01-28 Michael Schwingen diff --git a/include/asm-generic/u-boot.h b/include/asm-generic/u-boot.h index e78196797bd..c18e4ca27a3 100644 --- a/include/asm-generic/u-boot.h +++ b/include/asm-generic/u-boot.h @@ -108,9 +108,6 @@ typedef struct bd_info { unsigned int bi_opbfreq; /* OPB clock in Hz */ int bi_iic_fast[2]; /* Use fast i2c mode */ #endif -#if defined(CONFIG_NX823) - unsigned char bi_sernum[8]; -#endif #if defined(CONFIG_4xx) #if defined(CONFIG_440GX) || \ defined(CONFIG_460EX) || defined(CONFIG_460GT) diff --git a/include/commproc.h b/include/commproc.h index c10a79c8393..12b94210607 100644 --- a/include/commproc.h +++ b/include/commproc.h @@ -888,33 +888,6 @@ typedef struct scc_enet { #define SICR_ENET_CLKRT ((uint)0x00003E00) #endif /* CONFIG_LWMON */ -/*** NX823 ***********************************************/ - -#if defined(CONFIG_NX823) -/* Bits in parallel I/O port registers that have to be set/cleared - * to configure the pins for SCC1 use. - */ -#define PROFF_ENET PROFF_SCC2 -#define CPM_CR_ENET CPM_CR_CH_SCC2 -#define SCC_ENET 1 -#define PA_ENET_RXD ((ushort)0x0004) /* PA 13 */ -#define PA_ENET_TXD ((ushort)0x0008) /* PA 12 */ -#define PA_ENET_RCLK ((ushort)0x0200) /* PA 6 */ -#define PA_ENET_TCLK ((ushort)0x0800) /* PA 4 */ - -#define PB_ENET_TENA ((uint)0x00002000) /* PB 18 */ - -#define PC_ENET_CLSN ((ushort)0x0040) /* PC 9 */ -#define PC_ENET_RENA ((ushort)0x0080) /* PC 8 */ - -/* Control bits in the SICR to route TCLK (CLK3) and RCLK (CLK1) to - * SCC2. Also, make sure GR2 (bit 16) and SC2 (bit 17) are zero. - */ -#define SICR_ENET_MASK ((uint)0x0000ff00) -#define SICR_ENET_CLKRT ((uint)0x00002f00) - -#endif /* CONFIG_NX823 */ - /*** MBX ************************************************************/ #ifdef CONFIG_MBX diff --git a/include/configs/NX823.h b/include/configs/NX823.h deleted file mode 100644 index 6d468dfcd10..00000000000 --- a/include/configs/NX823.h +++ /dev/null @@ -1,344 +0,0 @@ -/* - * (C) Copyright 2001 - * Kyle Harris, Nexus Technologies, Inc. kharris@nexus-tech.net - * - * (C) Copyright 2001 - * Wolfgang Denk, DENX Software Engineering, wd@denx.de. - * - * SPDX-License-Identifier: GPL-2.0+ - */ - -/* - * board/config.h - configuration options, board specific - */ - -#ifndef __CONFIG_H -#define __CONFIG_H - -/* - * High Level Configuration Options - * (easy to change) - */ - -#define CONFIG_MPC823 1 /* This is a MPC823 CPU */ -#define CONFIG_NX823 1 /* ...on a NEXUS 823 module */ - -#define CONFIG_SYS_TEXT_BASE 0x40000000 - -/*#define CONFIG_VIDEO 1 */ - -#define CONFIG_8xx_GCLK_FREQ MPC8XX_SPEED -#define CONFIG_8xx_CONS_SMC1 1 /* Console is on SMC1 */ -#undef CONFIG_8xx_CONS_SMC2 -#undef CONFIG_8xx_CONS_NONE -#define CONFIG_BAUDRATE 57600 /* console baudrate = 115kbps */ -#define CONFIG_BOOTDELAY 2 /* autoboot after 2 seconds */ -#define CONFIG_BOOTARGS "ramdisk_size=8000 "\ - "root=/dev/nfs rw nfsroot=10.77.77.250:/ppcroot "\ - "nfsaddrs=10.77.77.20:10.77.77.250" -#define CONFIG_BOOTCOMMAND "bootm 400e0000" - -#define CONFIG_LOADS_ECHO 1 /* echo on for serial download */ -#undef CONFIG_SYS_LOADS_BAUD_CHANGE /* don't allow baudrate change */ -#undef CONFIG_WATCHDOG /* watchdog disabled, for now */ -#define CONFIG_SOURCE - -/* - * BOOTP options - */ -#define CONFIG_BOOTP_SUBNETMASK -#define CONFIG_BOOTP_GATEWAY -#define CONFIG_BOOTP_HOSTNAME -#define CONFIG_BOOTP_BOOTPATH -#define CONFIG_BOOTP_BOOTFILESIZE - - -/* - * Command line configuration. - */ -#include - -#define CONFIG_CMD_SOURCE - - -/* call various generic functions */ -#define CONFIG_MISC_INIT_R - -/* - * Miscellaneous configurable options - */ -#define CONFIG_SYS_LONGHELP /* undef to save memory */ -#if defined(CONFIG_CMD_KGDB) -#define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */ -#else -#define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */ -#endif -#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */ -#define CONFIG_SYS_MAXARGS 16 /* max number of command args */ -#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */ - -#define CONFIG_SYS_MEMTEST_START 0x0400000 /* memtest works on */ -#define CONFIG_SYS_MEMTEST_END 0x0C00000 /* 4 ... 12 MB in DRAM */ - -#define CONFIG_SYS_LOAD_ADDR 0x100000 /* default load address */ - -/* - * Low Level Configuration Settings - * (address mappings, register initial values, etc.) - * You should know what you are doing if you make changes here. - */ -/*----------------------------------------------------------------------- - * Internal Memory Mapped Register - */ -#define CONFIG_SYS_IMMR 0xFFF00000 - -/*----------------------------------------------------------------------- - * Definitions for initial stack pointer and data area (in DPRAM) - */ -#define CONFIG_SYS_INIT_RAM_ADDR CONFIG_SYS_IMMR -#define CONFIG_SYS_INIT_RAM_SIZE 0x2F00 /* Size of used area in DPRAM */ -#define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) -#define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET - -/*----------------------------------------------------------------------- - * Start addresses for the final memory configuration - * (Set up by the startup code) - * Please note that CONFIG_SYS_SDRAM_BASE _must_ start at 0 - */ -#define CONFIG_SYS_SDRAM_BASE 0x00000000 -#define CONFIG_SYS_FLASH_BASE 0x40000000 -#define CONFIG_SYS_MONITOR_LEN (128 << 10) /* Reserve 128 kB for Monitor */ -#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE -#define CONFIG_SYS_MALLOC_LEN (128 << 10) /* Reserve 128 kB for malloc() */ - -/* - * For booting Linux, the board info and command line data - * have to be in the first 8 MB of memory, since this is - * the maximum mapped by the Linux kernel during initialization. - */ -#define CONFIG_SYS_BOOTMAPSZ (8 << 20) /* Initial Memory map for Linux */ - -/*----------------------------------------------------------------------- - * FLASH organization - */ -#define CONFIG_SYS_MAX_FLASH_BANKS 1 /* max number of memory banks */ -#define CONFIG_SYS_MAX_FLASH_SECT 128 /* max number of sectors on one chip */ - -#define CONFIG_SYS_FLASH_ERASE_TOUT 120000 /* Timeout for Flash Erase (in ms) */ -#define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Timeout for Flash Write (in ms) */ - -#define CONFIG_ENV_IS_IN_FLASH 1 -#define xEMBED -#ifdef EMBED -#define CONFIG_ENV_SIZE 0x200 /* FIXME How big when embedded?? */ -#define CONFIG_ENV_ADDR CONFIG_SYS_MONITOR_BASE -#else -#define CONFIG_ENV_ADDR 0x40020000 /* absolute address for now */ -#define CONFIG_ENV_SIZE 0x20000 /* 8K ouch, this may later be */ -#endif - -#define CONFIG_SYS_FLASH_SN_BASE 0x4001fff0 /* programmer automagically puts */ -#define CONFIG_SYS_FLASH_SN_SECTOR 0x40000000 /* a serial number here */ -#define CONFIG_SYS_FLASH_SN_BYTES 8 - -/*----------------------------------------------------------------------- - * Cache Configuration - */ -#define CONFIG_SYS_CACHELINE_SIZE 16 /* For all MPC8xx CPUs */ -#if defined(CONFIG_CMD_KGDB) -#define CONFIG_SYS_CACHELINE_SHIFT 4 /* log base 2 of the above value */ -#endif - -/*----------------------------------------------------------------------- - * SYPCR - System Protection Control 11-9 - * SYPCR can only be written once after reset! - *----------------------------------------------------------------------- - * Software & Bus Monitor Timer max, Bus Monitor enable, SW Watchdog freeze - */ -#if defined(CONFIG_WATCHDOG) -#define CONFIG_SYS_SYPCR (SYPCR_SWTC | SYPCR_BMT | SYPCR_BME | SYPCR_SWF | \ - SYPCR_SWE | SYPCR_SWP) -#else -#define CONFIG_SYS_SYPCR (SYPCR_SWTC | SYPCR_BMT | SYPCR_BME | SYPCR_SWF | SYPCR_SWP) -#endif - -/*----------------------------------------------------------------------- - * SIUMCR - SIU Module Configuration 12-30 - *----------------------------------------------------------------------- - * PCMCIA config., multi-function pin tri-state - */ -#define CONFIG_SYS_SIUMCR (SIUMCR_DBGC00 | SIUMCR_DBPC00) - -/*----------------------------------------------------------------------- - * TBSCR - Time Base Status and Control 12-16 - *----------------------------------------------------------------------- - * Clear Reference Interrupt Status, Timebase freezing enabled - */ -#define CONFIG_SYS_TBSCR (TBSCR_REFA | TBSCR_REFB | TBSCR_TBF) - -/*----------------------------------------------------------------------- - * RTCSC - Real-Time Clock Status and Control Register 12-18 - *----------------------------------------------------------------------- - */ -#define CONFIG_SYS_RTCSC (RTCSC_SEC | RTCSC_ALR | RTCSC_RTF| RTCSC_RTE) - -/*----------------------------------------------------------------------- - * PISCR - Periodic Interrupt Status and Control 12-23 - *----------------------------------------------------------------------- - * Clear Periodic Interrupt Status, Interrupt Timer freezing enabled - */ -#define CONFIG_SYS_PISCR (PISCR_PS | PISCR_PITF) - -/*----------------------------------------------------------------------- - * PLPRCR - PLL, Low-Power, and Reset Control Register 5-7 - *----------------------------------------------------------------------- - * Reset PLL lock status sticky bit, timer expired status bit and timer - * interrupt status bit - */ -#define MPC8XX_SPEED 66666666L -#define MPC8XX_XIN 32768 /* 32.768 kHz crystal */ -#define MPC8XX_FACT (MPC8XX_SPEED/MPC8XX_XIN) -#define CONFIG_SYS_PLPRCR_MF ((MPC8XX_FACT-1) << PLPRCR_MF_SHIFT) -#define CONFIG_SYS_PLPRCR (CONFIG_SYS_PLPRCR_MF | PLPRCR_TEXPS | PLPRCR_TMIST) - -/*----------------------------------------------------------------------- - * SCCR - System Clock and reset Control Register 5-3 - *----------------------------------------------------------------------- - * Set clock output, timebase and RTC source and divider, - * power management and some other internal clocks - */ -#define SCCR_MASK SCCR_EBDF11 -#define CONFIG_SYS_SCCR (SCCR_TBS | \ - SCCR_COM00 | SCCR_DFSYNC00 | SCCR_DFBRG00 | \ - SCCR_DFNL000 | SCCR_DFNH000 | SCCR_DFLCD000 | \ - SCCR_DFALCD00) - -/*----------------------------------------------------------------------- - * - *----------------------------------------------------------------------- - * - */ -#define CONFIG_SYS_DER 0 - -/* - * Init Memory Controller: - * - * BR0 and OR0 (FLASH) - */ - -#define FLASH_BASE0_PRELIM 0x40000000 /* FLASH bank #0 */ - -/* used to re-map FLASH both when starting from SRAM or FLASH: - * restrict access enough to keep SRAM working (if any) - * but not too much to meddle with FLASH accesses - */ -#define CONFIG_SYS_REMAP_OR_AM 0x80000000 /* OR addr mask */ -#define CONFIG_SYS_PRELIM_OR_AM 0xE0000000 /* OR addr mask */ - -/* FLASH timing: ACS = 00, TRLX = 0, CSNT = 1, SCY = 8, EHTR = 0 */ -#define CONFIG_SYS_OR_TIMING_FLASH (OR_CSNT_SAM | OR_ACS_DIV1 | OR_BI | \ - OR_SCY_8_CLK ) - -#define CONFIG_SYS_OR0_REMAP (CONFIG_SYS_REMAP_OR_AM | CONFIG_SYS_OR_TIMING_FLASH) -#define CONFIG_SYS_OR0_PRELIM (CONFIG_SYS_PRELIM_OR_AM | CONFIG_SYS_OR_TIMING_FLASH) -#define CONFIG_SYS_BR0_PRELIM ((FLASH_BASE0_PRELIM & BR_BA_MSK) | BR_PS_16 | BR_V ) - -/* - * BR1/2 and OR1/2 (SDRAM) - */ -#define SDRAM_BASE1_PRELIM 0x00000000 /* SDRAM bank #0 */ -#define SDRAM_BASE2_PRELIM 0x20000000 /* SDRAM bank #1 */ -#define SDRAM_MAX_SIZE 0x04000000 /* max 64 MB per bank */ - -/* SDRAM timing: Multiplexed addresses, drive GPL5 high on first cycle */ -#define CONFIG_SYS_OR_TIMING_SDRAM (OR_G5LS | OR_CSNT_SAM) - -#define CONFIG_SYS_OR1_PRELIM (CONFIG_SYS_PRELIM_OR_AM | CONFIG_SYS_OR_TIMING_SDRAM ) -#define CONFIG_SYS_BR1_PRELIM ((SDRAM_BASE1_PRELIM & BR_BA_MSK) | BR_MS_UPMA | BR_V ) -#define CONFIG_SYS_OR2_PRELIM CONFIG_SYS_OR1_PRELIM -#define CONFIG_SYS_BR2_PRELIM ((SDRAM_BASE2_PRELIM & BR_BA_MSK) | BR_MS_UPMA | BR_V ) - -/* IO and memory mapped stuff */ -#define NX823_IO_OR_AM 0xFFFF0000 /* mask for IO addresses */ -#define NX823_IO_BASE 0xFF000000 /* start of IO */ -#define GPOUT_OFFSET (3<<16) -#define QUART_OFFSET (4<<16) -#define VIDAC_OFFSET (5<<16) -#define CPLD_OFFSET (6<<16) -#define SED1386_OFFSET (7<<16) - -/* - * BR3 and OR3 (general purpose output latches) - */ -#define GPOUT_BASE (NX823_IO_BASE + GPOUT_OFFSET) -#define GPOUT_TIMING (OR_CSNT_SAM | OR_TRLX | OR_BI) -#define CONFIG_SYS_OR3_PRELIM (NX823_IO_OR_AM | GPOUT_TIMING) -#define CONFIG_SYS_BR3_PRELIM (GPOUT_BASE | BR_V) - -/* - * BR4 and OR4 (QUART) - */ -#define QUART_BASE (NX823_IO_BASE + QUART_OFFSET) -#define QUART_TIMING (OR_ACS_DIV4 | OR_SCY_3_CLK | OR_CSNT_SAM | OR_TRLX) -#define CONFIG_SYS_OR4_PRELIM (NX823_IO_OR_AM | QUART_TIMING | OR_BI) -#define CONFIG_SYS_BR4_PRELIM (QUART_BASE | BR_PS_8 | BR_V) - -/* - * BR5 and OR5 (Video DAC) - */ -#define VIDAC_BASE (NX823_IO_BASE + VIDAC_OFFSET) -#define VIDAC_TIMING (OR_ACS_DIV4 | OR_SCY_3_CLK | OR_CSNT_SAM | OR_EHTR) -#define CONFIG_SYS_OR5_PRELIM (NX823_IO_OR_AM | VIDAC_TIMING | OR_BI) -#define CONFIG_SYS_BR5_PRELIM (VIDAC_BASE | BR_PS_8 | BR_V) - -/* - * BR6 and OR6 (CPLD) - * FIXME timing not verified for CPLD - */ -#define CPLD_BASE (NX823_IO_BASE + CPLD_OFFSET) -#define CPLD_TIMING (OR_ACS_DIV4 | OR_SCY_3_CLK | OR_CSNT_SAM | OR_EHTR) -#define CONFIG_SYS_OR6_PRELIM (NX823_IO_OR_AM | CPLD_TIMING | OR_BI) -#define CONFIG_SYS_BR6_PRELIM (CPLD_BASE | BR_PS_8 | BR_V ) - -/* - * BR7 and OR7 (SED1386) - * FIXME timing not verified for SED controller - */ -#define SED1386_BASE 0xF7000000 -#define CONFIG_SYS_OR7_PRELIM (0xFF000000 | OR_BI | OR_SETA) -#define CONFIG_SYS_BR7_PRELIM (SED1386_BASE | BR_PS_16 | BR_V ) - -/* - * Memory Periodic Timer Prescaler - */ - -/* periodic timer for refresh */ -#define CONFIG_SYS_MAMR_PTA 97 /* start with divider for 100 MHz */ - -/* refresh rate 15.6 us (= 64 ms / 4K = 62.4 / quad bursts) for <= 128 MBit */ -#define CONFIG_SYS_MPTPR_2BK_4K MPTPR_PTP_DIV16 /* setting for 2 banks */ -#define CONFIG_SYS_MPTPR_1BK_4K MPTPR_PTP_DIV32 /* setting for 1 bank */ - -/* refresh rate 7.8 us (= 64 ms / 8K = 31.2 / quad bursts) for 256 MBit */ -#define CONFIG_SYS_MPTPR_2BK_8K MPTPR_PTP_DIV8 /* setting for 2 banks */ -#define CONFIG_SYS_MPTPR_1BK_8K MPTPR_PTP_DIV16 /* setting for 1 bank */ - -/* - * MAMR settings for SDRAM - */ - -/* 8 column SDRAM */ -#define CONFIG_SYS_MAMR_8COL ((CONFIG_SYS_MAMR_PTA << MAMR_PTA_SHIFT) | MAMR_PTAE | \ - MAMR_AMA_TYPE_0 | MAMR_DSA_1_CYCL | MAMR_G0CLA_A11 | \ - MAMR_RLFA_1X | MAMR_WLFA_1X | MAMR_TLFA_4X) -/* 9 column SDRAM */ -#define CONFIG_SYS_MAMR_9COL ((CONFIG_SYS_MAMR_PTA << MAMR_PTA_SHIFT) | MAMR_PTAE | \ - MAMR_AMA_TYPE_1 | MAMR_DSA_1_CYCL | MAMR_G0CLA_A10 | \ - MAMR_RLFA_1X | MAMR_WLFA_1X | MAMR_TLFA_4X) - -#define CONFIG_ENV_OVERWRITE /* allow changes to ethaddr (for now) */ -#define CONFIG_ETHADDR 00:10:20:30:40:50 -#define CONFIG_IPADDR 10.77.77.20 -#define CONFIG_SERVERIP 10.77.77.250 - -#endif /* __CONFIG_H */ -- cgit v1.2.3 From d6b11fd1f0ef1b6cbc81ca7655c47bf68a16f32d Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Fri, 4 Apr 2014 15:25:03 +0900 Subject: powerpc: remove MBX and MBX860T boards support Enough time has passed since these boards were moved to Orphan. Remove. - Remove board/mbx8xx/* - Remove include/configs/{MBX.h,MBX860T.h} - Clean-up if defined(CONFIG_MBX) - Move the entries from boards.cfg to doc/README.scrapyard Signed-off-by: Masahiro Yamada --- arch/powerpc/cpu/mpc8xx/cpu_init.c | 16 -- arch/powerpc/cpu/mpc8xx/scc.c | 4 - arch/powerpc/cpu/mpc8xx/serial.c | 4 - arch/powerpc/include/asm/immap_512x.h | 1 - board/mbx8xx/Makefile | 8 - board/mbx8xx/README | 68 ------ board/mbx8xx/csr.h | 44 ---- board/mbx8xx/dimm.h | 98 --------- board/mbx8xx/flash.c | 392 --------------------------------- board/mbx8xx/mbx8xx.c | 383 -------------------------------- board/mbx8xx/pcmcia.c | 156 -------------- board/mbx8xx/u-boot.lds | 82 ------- board/mbx8xx/u-boot.lds.debug | 122 ----------- board/mbx8xx/vpd.c | 180 ---------------- board/mbx8xx/vpd.h | 119 ---------- boards.cfg | 2 - doc/README.scrapyard | 1 + include/common.h | 7 - include/commproc.h | 32 --- include/configs/MBX.h | 290 ------------------------- include/configs/MBX860T.h | 395 ---------------------------------- post/cpu/mpc8xx/ether.c | 4 - post/cpu/mpc8xx/uart.c | 4 - 23 files changed, 1 insertion(+), 2411 deletions(-) delete mode 100644 board/mbx8xx/Makefile delete mode 100644 board/mbx8xx/README delete mode 100644 board/mbx8xx/csr.h delete mode 100644 board/mbx8xx/dimm.h delete mode 100644 board/mbx8xx/flash.c delete mode 100644 board/mbx8xx/mbx8xx.c delete mode 100644 board/mbx8xx/pcmcia.c delete mode 100644 board/mbx8xx/u-boot.lds delete mode 100644 board/mbx8xx/u-boot.lds.debug delete mode 100644 board/mbx8xx/vpd.c delete mode 100644 board/mbx8xx/vpd.h delete mode 100644 include/configs/MBX.h delete mode 100644 include/configs/MBX860T.h (limited to 'board') diff --git a/arch/powerpc/cpu/mpc8xx/cpu_init.c b/arch/powerpc/cpu/mpc8xx/cpu_init.c index 53f873d1abf..69455c7be02 100644 --- a/arch/powerpc/cpu/mpc8xx/cpu_init.c +++ b/arch/powerpc/cpu/mpc8xx/cpu_init.c @@ -29,12 +29,10 @@ void cpm_load_patch (volatile immap_t * immr); */ void cpu_init_f (volatile immap_t * immr) { -#ifndef CONFIG_MBX volatile memctl8xx_t *memctl = &immr->im_memctl; # ifdef CONFIG_SYS_PLPRCR ulong mfmask; # endif -#endif ulong reg; /* SYPCR - contains watchdog control (11-9) */ @@ -74,8 +72,6 @@ void cpu_init_f (volatile immap_t * immr) immr->im_clkrstk.cark_plprcrk = KAPWR_KEY; -#ifndef CONFIG_MBX /* MBX board does things different */ - /* If CONFIG_SYS_PLPRCR (set in the various *_config.h files) tries to * set the MF field, then just copy CONFIG_SYS_PLPRCR over car_plprcr, * otherwise OR in CONFIG_SYS_PLPRCR so we do not change the current MF @@ -203,8 +199,6 @@ void cpu_init_f (volatile immap_t * immr) memctl->memc_br7 = CONFIG_SYS_BR7_PRELIM; #endif -#endif /* ! CONFIG_MBX */ - /* * Reset CPM */ @@ -213,16 +207,6 @@ void cpu_init_f (volatile immap_t * immr) __asm__ ("eieio"); } while (immr->im_cpm.cp_cpcr & CPM_CR_FLG); -#ifdef CONFIG_MBX - /* - * on the MBX, things are a little bit different: - * - we need to read the VPD to get board information - * - the plprcr is set up dynamically - * - the memory controller is set up dynamically - */ - mbx_init (); -#endif /* CONFIG_MBX */ - #ifdef CONFIG_RPXCLASSIC rpxclassic_init (); #endif diff --git a/arch/powerpc/cpu/mpc8xx/scc.c b/arch/powerpc/cpu/mpc8xx/scc.c index 2ef77b4c14d..94c9969e3f1 100644 --- a/arch/powerpc/cpu/mpc8xx/scc.c +++ b/arch/powerpc/cpu/mpc8xx/scc.c @@ -492,10 +492,6 @@ static int scc_init (struct eth_device *dev, bd_t * bis) immr->im_cpm.cp_pbdat &= ~0x00000010; #endif /* QS860T */ -#ifdef CONFIG_MBX - board_ether_init (); -#endif - #if defined(CONFIG_NETVIA) #if defined(PA_ENET_PDN) immr->im_ioport.iop_papar &= ~PA_ENET_PDN; diff --git a/arch/powerpc/cpu/mpc8xx/serial.c b/arch/powerpc/cpu/mpc8xx/serial.c index 4e840498d79..cb48ed942f9 100644 --- a/arch/powerpc/cpu/mpc8xx/serial.c +++ b/arch/powerpc/cpu/mpc8xx/serial.c @@ -225,10 +225,6 @@ static int smc_init (void) up->smc_tstate = 0; #endif -#if defined(CONFIG_MBX) - board_serial_init(); -#endif /* CONFIG_MBX */ - /* Set UART mode, 8 bit, no parity, one stop. * Enable receive and transmit. */ diff --git a/arch/powerpc/include/asm/immap_512x.h b/arch/powerpc/include/asm/immap_512x.h index bed80aa9332..6086a73ba95 100644 --- a/arch/powerpc/include/asm/immap_512x.h +++ b/arch/powerpc/include/asm/immap_512x.h @@ -59,7 +59,6 @@ typedef struct sysconf512x { u8 res2[0x28]; law512x_t ddrlaw; /* DDR Local Access Window */ u8 res3[0x18]; - u32 mbxbar; /* MBX Base Address */ u32 srambar; /* SRAM Base Address */ u32 nfcbar; /* NFC Base Address */ u8 res4[0x34]; diff --git a/board/mbx8xx/Makefile b/board/mbx8xx/Makefile deleted file mode 100644 index 2074b6b904c..00000000000 --- a/board/mbx8xx/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -# -# (C) Copyright 2000-2006 -# Wolfgang Denk, DENX Software Engineering, wd@denx.de. -# -# SPDX-License-Identifier: GPL-2.0+ -# - -obj-y = mbx8xx.o flash.o vpd.o pcmcia.o diff --git a/board/mbx8xx/README b/board/mbx8xx/README deleted file mode 100644 index c889fe97911..00000000000 --- a/board/mbx8xx/README +++ /dev/null @@ -1,68 +0,0 @@ -IMPORTANT NOTE - read before defining CONFIG_SYS_USE_OSCCLK in your board - config file!!! - - -WARNING: Wrong settings of this parameter have the potential to -damage hardware by running the MBX's CPU at frequencies that exceed -it's rating and/or overdriving the it's SPLL! - - -Ramblings: -1) Motorola offered 12 different variants of the MBX, 6 823s and 6 860s. -2) Of these 12 variants, only 2 were entry level boards. -3) I believe that the 2 entry level boards were the only ones that - used OSCM clocking. I can't be completely certain of this at this - point. -4) Motorola never offered an MBX that ran faster than 50Mhz. -5) The 10, non-entry level boards, ran at 40Mhz. -6) The EXTCLK input has a minimum clock of 15Mhz for the 823/860. -7) Motorola no longer sells MBXs. - -Based on this information, I can surmise that the default power-on -reset clocking was one of the following three options. - -Multiplier SPLL Options ------------------------------------- -513 OSCM is SPLL input -5 OSCM is SPLL input -1 EXTCLK is SPLL input - -The forth option: - -5 EXTCLK is SPLL input - -is not possible on MBXs. This is because the minimum EXTCLK input -frequency is 15Mhz. 5 * 15Mhz = 75 Mhz. There was no variant that ran -above 50 Mhz. - -The board I have borrowed definitely uses a multiplier of 1 for -EXTCLK and runs at 40Mhz. I even went so far as to put a scope on it. - -One of the two default OSCM modes are most likely what was used on -the entry level boards to cheapen them by eliminating the external -crystal oscillator. - -To add insult to injury, the stupid 860 PLPRCR register retains it's -multiplication factor through hard resets. You can't clear it out -because it is battery backed and once it is set wrong, it stays -wrong. The only way to reset it, so that it takes on it's default -multiplier is to disconnect all power including external, batteries, -as well discharging caps on the board. This precludes the fact that -your 860 may be quite DEAD by this time! - -If you don't setup the multiplication factor for boards that use the -OSCM input, they won't run correctly, but at least they won't be -dead. - -Addtionally, there is no good way to determine the clock input source -from CPU register data. The only way to deal with this is either hard -code it, determine the correct value with some rather NASTY timing -loops, or try to grok it from external data sources. Motorola -firmware opts for the NASTY timing loops, but needs to configure the -serial ports to do so. - - -You may have a legitimate need to define CONFIG_SYS_USE_OSCCLK if your -MBX8xx board is using the OSCM clocking mode. - -You better know what you are doing here. diff --git a/board/mbx8xx/csr.h b/board/mbx8xx/csr.h deleted file mode 100644 index 937060973ea..00000000000 --- a/board/mbx8xx/csr.h +++ /dev/null @@ -1,44 +0,0 @@ -#ifndef __csr_h -#define __csr_h - -/* - * (C) Copyright 2000 - * Sysgo Real-Time Solutions, GmbH - * Marius Groeger - * - * Control and Status Register definitions for the MBX - * - *-------------------------------------------------------------------- - * SPDX-License-Identifier: GPL-2.0+ - */ - -/* bits for control register #1 / status register #1 */ -#define CSR1_ETEN 0x80 /* Ethernet Transceiver Enabled */ -#define CSR1_ELEN 0x40 /* Ethernet XCVR in Internal Loopback */ -#define CSR1_EAEN 0x20 /* Auto selection TP/AUI Enabled */ -#define CSR1_TPEN 0x10 /* TP manually selected */ -#define CSR1_FDDIS 0x08 /* Full Duplex Mode disabled */ -#define CSR1_FCTEN 0x04 /* Collision Testing of XCVR disabled */ -#define CSR1_COM1EN 0x02 /* COM1 signals routed to RS232 Transceiver */ -#define CSR1_XCVRDIS 0x01 /* Onboard RS232 Transceiver Disabled */ - -/* bits for control register #2 */ -#define CR2_VDDSEL 0xC0 /* PCMCIA Supply Voltage */ -#define CR2_VPPSEL 0x30 /* PCMCIA Programming Voltage */ -#define CR2_BRDFAIL 0x08 /* Board fail */ -#define CR2_SWS1 0x04 /* Software Status #2 LED */ -#define CR2_SWS2 0x02 /* Software Status #2 LED */ -#define CR2_QSPANRST 0x01 /* Reset QSPAN */ - -/* bits for status register #2 */ -#define SR2_VDDSEL 0xC0 /* PCMCIA Supply Voltage */ -#define SR2_VPPSEL 0x30 /* PCMCIA Programming Voltage */ -#define SR2_BATGD 0x08 /* Low Voltage indication for onboard bat */ -#define SR2_NVBATGD 0x04 /* Low Voltage indication for NVRAM */ -#define SR2_RDY 0x02 /* Flash programming status bit */ -#define SR2_FT 0x01 /* Reserved for Factory test purposes */ - -#define MBX_CSR1 (*((uchar *)CONFIG_SYS_CSR_BASE)) -#define MBX_CSR2 (*((uchar *)CONFIG_SYS_CSR_BASE + 1)) - -#endif /* __csr_h */ diff --git a/board/mbx8xx/dimm.h b/board/mbx8xx/dimm.h deleted file mode 100644 index b40f1123563..00000000000 --- a/board/mbx8xx/dimm.h +++ /dev/null @@ -1,98 +0,0 @@ -#ifndef __dimm_h -#define __dimm_h - -/* - * Module name: %M% - * Description: - * Serial Presence Detect Definitions Module - * SCCS identification: %I% - * Branch: %B% - * Sequence: %S% - * Date newest applied delta was created (MM/DD/YY): %G% - * Time newest applied delta was created (HH:MM:SS): %U% - * SCCS file name %F% - * Fully qualified SCCS file name: - * %P% - * Copyright: - * (C) COPYRIGHT MOTOROLA, INC. 1996 - * ALL RIGHTS RESERVED - * Notes: - * 1. All data was taken from an IBM application note titled - * "Serial Presence Detect Definitions". - * History: - * Date Who - * - * 10/24/96 Rob Baxter - * Initial release. - * - */ - -/* - * serial PD byte assignment address map (256 byte EEPROM) - */ -typedef struct dimm -{ - uchar n_bytes; /* 00 number of bytes written/used */ - uchar t_bytes; /* 01 total number of bytes in serial PD device */ - uchar fmt; /* 02 fundamental memory type (FPM/EDO/SDRAM) */ - uchar n_row; /* 03 number of rows */ - uchar n_col; /* 04 number of columns */ - uchar n_banks; /* 05 number of banks */ - uchar data_w_lo; /* 06 data width */ - uchar data_w_hi; /* 07 data width */ - uchar ifl; /* 08 interface levels */ - uchar a_ras; /* 09 RAS access */ - uchar a_cas; /* 0A CAS access */ - uchar ct; /* 0B configuration type (non-parity/parity/ECC) */ - uchar refresh_rt; /* 0C refresh rate/type */ - uchar p_dram_o; /* 0D primary DRAM organization */ - uchar s_dram_o; /* 0E secondary DRAM organization (parity/ECC-checkbits) */ - uchar reserved[17]; /* 0F reserved fields for future offerings */ - uchar ss_info[32]; /* 20 superset information (may be used in the future) */ - uchar m_info[64]; /* 40 manufacturer information (optional) */ - uchar unused[128]; /* 80 unused storage locations */ -} dimm_t; - -/* - * memory type definitions - */ -#define DIMM_MT_FPM 1 /* standard FPM (fast page mode) DRAM */ -#define DIMM_MT_EDO 2 /* EDO (extended data out) */ -#define DIMM_MT_PN 3 /* pipelined nibble */ -#define DIMM_MT_SDRAM 4 /* SDRAM (synchronous DRAM) */ - -/* - * row addresses definitions - */ -#define DIMM_RA_RDNDNT (1<<7) /* redundant addressing */ -#define DIMM_RA_MASK 0x7f /* number of row addresses mask */ - -/* - * module interface levels definitions - */ -#define DIMM_IFL_TTL 0 /* TTL/5V tolerant */ -#define DIMM_IFL_LVTTL 1 /* LVTTL (not 5V tolerant) */ -#define DIMM_IFL_HSTL15 2 /* HSTL 1.5 */ -#define DIMM_IFL_SSTL33 3 /* SSTL 3.3 */ -#define DIMM_IFL_SSTL25 4 /* SSTL 2.5 */ - -/* - * DIMM configuration type definitions - */ -#define DIMM_CT_NONE 0 /* none */ -#define DIMM_CT_PARITY 1 /* parity */ -#define DIMM_CT_ECC 2 /* ECC */ - -/* - * row addresses definitions - */ -#define DIMM_RRT_SR (1<<7) /* self refresh flag */ -#define DIMM_RRT_MASK 0x7f /* refresh rate mask */ -#define DIMM_RRT_NRML 0x00 /* normal (15.625us) */ -#define DIMM_RRT_R_3_9 0x01 /* reduced .25x (3.9us) */ -#define DIMM_RRT_R_7_8 0x02 /* reduced .5x (7.8us) */ -#define DIMM_RRT_E_31_3 0x03 /* extended 2x (31.3us) */ -#define DIMM_RRT_E_62_5 0x04 /* extended 4x (62.5us) */ -#define DIMM_RRT_E_125 0x05 /* extended 8x (125us) */ - -#endif /* __dimm_h */ diff --git a/board/mbx8xx/flash.c b/board/mbx8xx/flash.c deleted file mode 100644 index fa07152cc8e..00000000000 --- a/board/mbx8xx/flash.c +++ /dev/null @@ -1,392 +0,0 @@ -/* - * (C) Copyright 2000 - * Marius Groeger - * Sysgo Real-Time Solutions, GmbH - * - * (C) Copyright 2000 - * Wolfgang Denk, DENX Software Engineering, wd@denx.de. - * - * Flash Routines for AM290[48]0B devices - * - *-------------------------------------------------------------------- - * SPDX-License-Identifier: GPL-2.0+ - */ - -#include -#include -#include "vpd.h" - -flash_info_t flash_info[CONFIG_SYS_MAX_FLASH_BANKS]; /* info for FLASH chips */ - -/*----------------------------------------------------------------------- - * Functions - */ - -static ulong flash_get_size (vu_long *addr, flash_info_t *info); -static int write_word (flash_info_t *info, ulong dest, ulong data); - -/*----------------------------------------------------------------------- - */ - -unsigned long flash_init (void) -{ - unsigned long size, totsize; - int i; - ulong addr; - - /* Init: no FLASHes known */ - for (i=0; i= CONFIG_SYS_FLASH_BASE - /* monitor protection ON by default */ - flash_protect(FLAG_PROTECT_SET, - CONFIG_SYS_MONITOR_BASE, - CONFIG_SYS_MONITOR_BASE+monitor_flash_len-1, - &flash_info[0]); -#endif - - return (totsize); -} - -/*----------------------------------------------------------------------- - */ -void flash_print_info (flash_info_t *info) -{ - int i; - - if (info->flash_id == FLASH_UNKNOWN) { - printf ("missing or unknown FLASH type\n"); - return; - } - - switch (info->flash_id >> 16) { - case 0x1: - printf ("AMD "); - break; - default: - printf ("Unknown Vendor "); - break; - } - - switch (info->flash_id & FLASH_TYPEMASK) { - case AMD_ID_F040B: - printf ("AM29F040B (4 Mbit)\n"); - break; - case AMD_ID_F080B: - printf ("AM29F080B (8 Mbit)\n"); - break; - case AMD_ID_F016D: - printf ("AM29F016D (16 Mbit)\n"); - break; - default: - printf ("Unknown Chip Type\n"); - break; - } - - printf (" Size: %ld MB in %d Sectors\n", - info->size >> 20, info->sector_count); - - printf (" Sector Start Addresses:"); - for (i=0; isector_count; ++i) { - if ((i % 5) == 0) - printf ("\n "); - printf (" %08lX%s", - info->start[i], - info->protect[i] ? " (RO)" : " " - ); - } - printf ("\n"); - return; -} - -/* - * The following code cannot be run from FLASH! - */ - -static ulong flash_get_size (vu_long *addr, flash_info_t *info) -{ - short i; - ulong vendor, devid; - ulong base = (ulong)addr; - - /* Write auto select command: read Manufacturer ID */ - addr[0x0555] = 0xAAAAAAAA; - addr[0x02AA] = 0x55555555; - addr[0x0555] = 0x90909090; - - vendor = addr[0]; - devid = addr[1] & 0xff; - - /* only support AMD */ - if (vendor != 0x01010101) { - return 0; - } - - vendor &= 0xf; - devid &= 0xff; - - if (devid == AMD_ID_F040B) { - info->flash_id = vendor << 16 | devid; - info->sector_count = 8; - info->size = info->sector_count * 0x10000; - } - else if (devid == AMD_ID_F080B) { - info->flash_id = vendor << 16 | devid; - info->sector_count = 16; - info->size = 4 * info->sector_count * 0x10000; - } - else if (devid == AMD_ID_F016D) { - info->flash_id = vendor << 16 | devid; - info->sector_count = 32; - info->size = 4 * info->sector_count * 0x10000; - } - else { - printf ("## Unknown Flash Type: %08lx\n", devid); - return 0; - } - - /* check for protected sectors */ - for (i = 0; i < info->sector_count; i++) { - /* sector base address */ - info->start[i] = base + i * (info->size / info->sector_count); - /* read sector protection at sector address, (A7 .. A0) = 0x02 */ - /* D0 = 1 if protected */ - addr = (volatile unsigned long *)(info->start[i]); - info->protect[i] = addr[2] & 1; - } - - /* - * Prevent writes to uninitialized FLASH. - */ - if (info->flash_id != FLASH_UNKNOWN) { - addr = (vu_long *)info->start[0]; - addr[0] = 0xF0; /* reset bank */ - } - - return (info->size); -} - - -/*----------------------------------------------------------------------- - */ - -int flash_erase (flash_info_t *info, int s_first, int s_last) -{ - vu_long *addr = (vu_long*)(info->start[0]); - int flag, prot, sect, l_sect; - ulong start, now, last; - - if ((s_first < 0) || (s_first > s_last)) { - if (info->flash_id == FLASH_UNKNOWN) { - printf ("- missing\n"); - } else { - printf ("- no sectors to erase\n"); - } - return 1; - } - - prot = 0; - for (sect = s_first; sect <= s_last; sect++) { - if (info->protect[sect]) { - prot++; - } - } - - if (prot) { - printf ("- Warning: %d protected sectors will not be erased!\n", - prot); - } else { - printf ("\n"); - } - - l_sect = -1; - - /* Disable interrupts which might cause a timeout here */ - flag = disable_interrupts(); - - addr[0x0555] = 0XAAAAAAAA; - addr[0x02AA] = 0x55555555; - addr[0x0555] = 0x80808080; - addr[0x0555] = 0XAAAAAAAA; - addr[0x02AA] = 0x55555555; - - /* Start erase on unprotected sectors */ - for (sect = s_first; sect<=s_last; sect++) { - if (info->protect[sect] == 0) { /* not protected */ - addr = (vu_long*)(info->start[sect]); - addr[0] = 0x30303030; - l_sect = sect; - } - } - - /* re-enable interrupts if necessary */ - if (flag) - enable_interrupts(); - - /* wait at least 80us - let's wait 1 ms */ - udelay (1000); - - /* - * We wait for the last triggered sector - */ - if (l_sect < 0) - goto DONE; - - start = get_timer (0); - last = start; - addr = (vu_long*)(info->start[l_sect]); - while ((addr[0] & 0x80808080) != 0x80808080) { - if ((now = get_timer(start)) > CONFIG_SYS_FLASH_ERASE_TOUT) { - printf ("Timeout\n"); - return 1; - } - /* show that we're waiting */ - if ((now - last) > 1000) { /* every second */ - serial_putc ('.'); - last = now; - } - } - - DONE: - /* reset to read mode */ - addr = (volatile unsigned long *)info->start[0]; - addr[0] = 0xF0F0F0F0; /* reset bank */ - - printf (" done\n"); - return 0; -} - -/*----------------------------------------------------------------------- - * Copy memory to flash, returns: - * 0 - OK - * 1 - write timeout - * 2 - Flash not erased - */ - -int write_buff (flash_info_t *info, uchar *src, ulong addr, ulong cnt) -{ - ulong cp, wp, data; - int i, l, rc; - - wp = (addr & ~3); /* get lower word aligned address */ - - /* - * handle unaligned start bytes - */ - if ((l = addr - wp) != 0) { - data = 0; - for (i=0, cp=wp; i0; ++i) { - data = (data << 8) | *src++; - --cnt; - ++cp; - } - for (; cnt==0 && i<4; ++i, ++cp) { - data = (data << 8) | (*(uchar *)cp); - } - - if ((rc = write_word(info, wp, data)) != 0) { - return (rc); - } - wp += 4; - } - - /* - * handle word aligned part - */ - while (cnt >= 4) { - data = 0; - for (i=0; i<4; ++i) { - data = (data << 8) | *src++; - } - if ((rc = write_word(info, wp, data)) != 0) { - return (rc); - } - wp += 4; - cnt -= 4; - } - - if (cnt == 0) { - return (0); - } - - /* - * handle unaligned tail bytes - */ - data = 0; - for (i=0, cp=wp; i<4 && cnt>0; ++i, ++cp) { - data = (data << 8) | *src++; - --cnt; - } - for (; i<4; ++i, ++cp) { - data = (data << 8) | (*(uchar *)cp); - } - - return (write_word(info, wp, data)); -} - -/*----------------------------------------------------------------------- - * Write a word to Flash, returns: - * 0 - OK - * 1 - write timeout - * 2 - Flash not erased - */ -static int write_word (flash_info_t *info, ulong dest, ulong data) -{ - vu_long *addr = (vu_long*)(info->start[0]); - ulong start; - int flag; - - /* Check if Flash is (sufficiently) erased */ - if ((*((vu_long *)dest) & data) != data) { - return (2); - } - /* Disable interrupts which might cause a timeout here */ - flag = disable_interrupts(); - - addr[0x0555] = 0xAAAAAAAA; - addr[0x02AA] = 0x55555555; - addr[0x0555] = 0xA0A0A0A0; - - *((vu_long *)dest) = data; - - /* re-enable interrupts if necessary */ - if (flag) - enable_interrupts(); - - /* data polling for D7 */ - start = get_timer (0); - while ((*((vu_long *)dest) & 0x80808080) != (data & 0x80808080)) { - if (get_timer(start) > CONFIG_SYS_FLASH_WRITE_TOUT) { - return (1); - } - } - return (0); -} - -/*----------------------------------------------------------------------- - */ diff --git a/board/mbx8xx/mbx8xx.c b/board/mbx8xx/mbx8xx.c deleted file mode 100644 index 98c723f0475..00000000000 --- a/board/mbx8xx/mbx8xx.c +++ /dev/null @@ -1,383 +0,0 @@ -/* - * (C) Copyright 2000 - * Sysgo Real-Time Solutions, GmbH - * Marius Groeger - * - * Board specific routines for the MBX - * - * - initialisation - * - interface to VPD data (mac address, clock speeds) - * - memory controller - * - serial io initialisation - * - ethernet io initialisation - * - * ----------------------------------------------------------------- - * SPDX-License-Identifier: GPL-2.0+ - */ - -#include -#include -#include -#include -#include "dimm.h" -#include "vpd.h" -#include "csr.h" - -/* ------------------------------------------------------------------------- */ - -static const uint sdram_table_40[] = { - /* DRAM - single read. (offset 0 in upm RAM) - */ - 0xCFAFC004, 0x0FAFC404, 0x0CAF0C04, 0x30AF0C00, - 0xF1BF4805, 0xFFFFC005, 0xFFFFC005, 0xFFFFC005, - - /* DRAM - burst read. (offset 8 in upm RAM) - */ - 0xCFAFC004, 0x0FAFC404, 0x0CAF0C04, 0x03AF0C08, - 0x0CAF0C04, 0x03AF0C08, 0x0CAF0C04, 0x03AF0C08, - 0x0CAF0C04, 0x30AF0C00, 0xF3BF4805, 0xFFFFC005, - 0xFFFFC005, 0xFFFFC005, 0xFFFFC005, 0xFFFFC005, - - /* DRAM - single write. (offset 18 in upm RAM) - */ - 0xCFFF0004, 0x0FFF0404, 0x0CFF0C00, 0x33FF4804, - 0xFFFFC005, 0xFFFFC005, 0xFFFFC005, 0xFFFFC005, - - /* DRAM - burst write. (offset 20 in upm RAM) - */ - 0xCFFF0004, 0x0FFF0404, 0x0CFF0C00, 0x03FF0C0C, - 0x0CFF0C00, 0x03FF0C0C, 0x0CFF0C00, 0x03FF0C0C, - 0x0CFF0C00, 0x33FF4804, 0xFFFFC005, 0xFFFFC005, - 0xFFFFC005, 0xFFFFC005, 0xFFFFC005, 0xFFFFC005, - - /* refresh (offset 30 in upm RAM) - */ - 0xFCFFC004, 0xC0FFC004, 0x01FFC004, 0x0FFFC004, - 0x3FFFC004, 0xFFFFC005, 0xFFFFC005, 0xFFFFC005, - 0xFFFFC005, 0xFFFFC005, 0xFFFFC005, 0xFFFFC005, - - /* exception. (offset 3c in upm RAM) - */ - 0xFFFFC007, 0xFFFFC007, 0xFFFFC007, 0xFFFFC007, -}; - -static const uint sdram_table_50[] = { - /* DRAM - single read. (offset 0 in upm RAM) - */ - 0xCFAFC004, 0x0FAFC404, 0x0CAF8C04, 0x10AF0C04, - 0xF0AF0C00, 0xF3BF4805, 0xFFFFC005, 0xFFFFC005, - - /* DRAM - burst read. (offset 8 in upm RAM) - */ - 0xCFAFC004, 0X0FAFC404, 0X0CAF8C04, 0X00AF0C04, - /* 0X07AF0C08, 0X0CAF0C04, 0X01AF0C04, 0X0FAF0C04, */ - 0X07AF0C08, 0X0CAF0C04, 0X01AF0C04, 0X0FAF0C08, - 0X0CAF0C04, 0X01AF0C04, 0X0FAF0C08, 0X0CAF0C04, - /* 0X10AF0C04, 0XF0AFC000, 0XF3FF4805, 0XFFFFC005, */ - 0X10AF0C04, 0XF0AFC000, 0XF3BF4805, 0XFFFFC005, - - /* DRAM - single write. (offset 18 in upm RAM) - */ - 0xCFFF0004, 0x0FFF0404, 0x0CFF0C00, 0x13FF4804, - 0xFFFFC004, 0xFFFFC005, 0xFFFFC005, 0xFFFFC005, - - /* DRAM - burst write. (offset 20 in upm RAM) - */ - 0xCFFF0004, 0x0FFF0404, 0x0CFF0C00, 0x03FF0C0C, - 0x0CFF0C00, 0x03FF0C0C, 0x0CFF0C00, 0x03FF0C0C, - 0x0CFF0C00, 0x13FF4804, 0xFFFFC004, 0xFFFFC005, - 0xFFFFC005, 0xFFFFC005, 0xFFFFC005, 0xFFFFC005, - - /* refresh (offset 30 in upm RAM) - */ - 0xFCFFC004, 0xC0FFC004, 0x01FFC004, 0x0FFFC004, - 0x1FFFC004, 0xFFFFC004, 0xFFFFC005, 0xFFFFC005, - 0xFFFFC005, 0xFFFFC005, 0xFFFFC005, 0xFFFFC005, - - /* exception. (offset 3c in upm RAM) - */ - 0xFFFFC007, 0xFFFFC007, 0xFFFFC007, 0xFFFFC007, -}; - -/* ------------------------------------------------------------------------- */ - -#ifdef CONFIG_SYS_USE_OSCCLK -static unsigned int get_reffreq(void); -#endif -static unsigned int board_get_cpufreq(void); - -void mbx_init (void) -{ - volatile immap_t *immr = (immap_t *) CONFIG_SYS_IMMR; - volatile memctl8xx_t *memctl = &immr->im_memctl; - ulong speed, plprcr, sccr; - ulong br0_32 = memctl->memc_br0 & 0x400; - - /* real-time clock status and control register */ - immr->im_sitk.sitk_rtcsck = KAPWR_KEY; - immr->im_sit.sit_rtcsc = 0x00C3; - - /* SIEL and SIMASK Registers (see MBX PRG 2-3) */ - immr->im_siu_conf.sc_simask = 0x00000000; - immr->im_siu_conf.sc_siel = 0xAAAA0000; - immr->im_siu_conf.sc_tesr = 0xFFFFFFFF; - - /* - * Prepare access to i2c bus. The MBX offers 3 devices on the i2c bus: - * 1. Vital Product Data (contains clock speeds, MAC address etc, see vpd.h) - * 2. RAM Specs (see dimm.h) - * 2. DIMM Specs (see dimm.h) - */ - vpd_init (); - - /* system clock and reset control register */ - immr->im_clkrstk.cark_sccrk = KAPWR_KEY; - sccr = immr->im_clkrst.car_sccr; - sccr &= SCCR_MASK; - sccr |= CONFIG_SYS_SCCR; - immr->im_clkrst.car_sccr = sccr; - - speed = board_get_cpufreq (); - -#if ((CONFIG_SYS_PLPRCR & PLPRCR_MF_MSK) != 0) - plprcr = CONFIG_SYS_PLPRCR; -#else - plprcr = immr->im_clkrst.car_plprcr; - plprcr &= PLPRCR_MF_MSK; /* isolate MF field */ - plprcr |= CONFIG_SYS_PLPRCR; /* reset control bits */ -#endif - -#ifdef CONFIG_SYS_USE_OSCCLK /* See doc/README.MBX ! */ - plprcr |= ((speed + get_reffreq() / 2) / refclock - 1) << 20; -#endif - - immr->im_clkrstk.cark_plprcrk = KAPWR_KEY; - immr->im_clkrst.car_plprcr = plprcr; - - /* - * preliminary setup of memory controller: - * - map Flash, otherwise configuration/status - * registers won't be accessible when read - * by board_init_f. - * - map NVRAM and configuation/status registers. - * - map pci registers. - * - DON'T map ram yet, this is done in initdram(). - */ - switch (speed / 1000000) { - case 40: - memctl->memc_br0 = 0xFE000000 | br0_32 | 1; - memctl->memc_or0 = 0xFF800930; - memctl->memc_or4 = CONFIG_SYS_NVRAM_OR | 0x920; - memctl->memc_br4 = CONFIG_SYS_NVRAM_BASE | 0x401; - break; - case 50: - memctl->memc_br0 = 0xFE000000 | br0_32 | 1; - memctl->memc_or0 = 0xFF800940; - memctl->memc_or4 = CONFIG_SYS_NVRAM_OR | 0x930; - memctl->memc_br4 = CONFIG_SYS_NVRAM_BASE | 0x401; - break; - default: - hang (); - break; - } -#ifdef CONFIG_USE_PCI - memctl->memc_or5 = CONFIG_SYS_PCIMEM_OR; - memctl->memc_br5 = CONFIG_SYS_PCIMEM_BASE | 0x001; - memctl->memc_or6 = CONFIG_SYS_PCIBRIDGE_OR; - memctl->memc_br6 = CONFIG_SYS_PCIBRIDGE_BASE | 0x001; -#endif - /* - * FIXME: I do not understand why I have to call this to - * initialise the control register here before booting from - * the PCMCIA card but if I do not the Linux kernel falls - * over in a big heap. If you can answer this question I - * would like to know about it. - */ - board_ether_init(); -} - -void board_serial_init (void) -{ - MBX_CSR1 &= ~(CSR1_COM1EN | CSR1_XCVRDIS); -} - -void board_ether_init (void) -{ - MBX_CSR1 &= ~(CSR1_EAEN | CSR1_ELEN); - MBX_CSR1 |= CSR1_ETEN | CSR1_TPEN | CSR1_FDDIS; -} - -static unsigned int board_get_cpufreq (void) -{ -#ifndef CONFIG_8xx_GCLK_FREQ - vpd_packet_t *packet; - ulong *p; - - packet = vpd_find_packet (VPD_PID_ICS); - p = (ulong *)packet->data; - return *p; -#else - return((unsigned int)CONFIG_8xx_GCLK_FREQ ); -#endif /* CONFIG_8xx_GCLK_FREQ */ -} - -#ifdef CONFIG_SYS_USE_OSCCLK -static unsigned int get_reffreq (void) -{ - vpd_packet_t *packet; - ulong *p; - - packet = vpd_find_packet (VPD_PID_RCS); - p = (ulong *)packet->data; - return *p; -} -#endif - -static void board_get_enetaddr(uchar *addr) -{ - int i; - vpd_packet_t *packet; - - packet = vpd_find_packet (VPD_PID_EA); - for (i = 0; i < 6; i++) - addr[i] = packet->data[i]; -} - -int misc_init_r(void) -{ - uchar enetaddr[6]; - - if (!eth_getenv_enetaddr("ethaddr", enetaddr)) { - board_get_enetaddr(enetaddr); - eth_setenv_enetaddr("ethaddr", enetaddr); - } - - return 0; -} - -/* - * Check Board Identity: - */ - -int checkboard (void) -{ - vpd_packet_t *packet; - int i; - const char *const fmt = - "\n *** Warning: Low Battery Status - %s Battery ***"; - - puts ("Board: "); - - packet = vpd_find_packet (VPD_PID_PID); - for (i = 0; i < packet->size; i++) { - serial_putc (packet->data[i]); - } - packet = vpd_find_packet (VPD_PID_MT); - for (i = 0; i < packet->size; i++) { - serial_putc (packet->data[i]); - } - serial_putc ('('); - packet = vpd_find_packet (VPD_PID_FAN); - for (i = 0; i < packet->size; i++) { - serial_putc (packet->data[i]); - } - serial_putc (')'); - - if (!(MBX_CSR2 & SR2_BATGD)) - printf (fmt, "On-Board"); - if (!(MBX_CSR2 & SR2_NVBATGD)) - printf (fmt, "NVRAM"); - - serial_putc ('\n'); - - return (0); -} - -/* ------------------------------------------------------------------------- */ - -static ulong get_ramsize (dimm_t * dimm) -{ - ulong size = 0; - - if (dimm->fmt == 1 || dimm->fmt == 2 || dimm->fmt == 3 - || dimm->fmt == 4) { - size = (1 << (dimm->n_row + dimm->n_col)) * dimm->n_banks * - ((dimm->data_w_hi << 8 | dimm->data_w_lo) / 8); - } - - return size; -} - -phys_size_t initdram (int board_type) -{ - volatile immap_t *immap = (immap_t *) CONFIG_SYS_IMMR; - volatile memctl8xx_t *memctl = &immap->im_memctl; - unsigned long ram_sz = 0; - unsigned long dimm_sz = 0; - dimm_t vpd_dimm, vpd_dram; - unsigned int speed = board_get_cpufreq () / 1000000; - - if (vpd_read (0xa2, (uchar *) & vpd_dimm, sizeof (vpd_dimm), 0) > 0) { - dimm_sz = get_ramsize (&vpd_dimm); - } - if (vpd_read (0xa6, (uchar *) & vpd_dram, sizeof (vpd_dram), 0) > 0) { - ram_sz = get_ramsize (&vpd_dram); - } - - /* - * Only initialize memory controller when running from FLASH. - * When running from RAM, don't touch it. - */ - if ((ulong) initdram & 0xff000000) { - ulong dimm_bank; - ulong br0_32 = memctl->memc_br0 & 0x400; - - switch (speed) { - case 40: - upmconfig (UPMA, (uint *) sdram_table_40, - sizeof (sdram_table_40) / sizeof (uint)); - memctl->memc_mptpr = 0x0200; - memctl->memc_mamr = dimm_sz ? 0x06801000 : 0x13801000; - memctl->memc_or7 = 0xff800930; - memctl->memc_br7 = 0xfc000000 | (br0_32 ^ br0_32) | 1; - break; - case 50: - upmconfig (UPMA, (uint *) sdram_table_50, - sizeof (sdram_table_50) / sizeof (uint)); - memctl->memc_mptpr = 0x0200; - memctl->memc_mamr = dimm_sz ? 0x08801000 : 0x1880100; - memctl->memc_or7 = 0xff800940; - memctl->memc_br7 = 0xfc000000 | (br0_32 ^ br0_32) | 1; - break; - default: - hang (); - break; - } - - /* now map ram and dimm, largest one first */ - dimm_bank = dimm_sz / 2; - if (!dimm_sz) { - memctl->memc_or1 = ~(ram_sz - 1) | 0x400; - memctl->memc_br1 = CONFIG_SYS_SDRAM_BASE | 0x81; - memctl->memc_br2 = 0; - memctl->memc_br3 = 0; - } else if (ram_sz > dimm_bank) { - memctl->memc_or1 = ~(ram_sz - 1) | 0x400; - memctl->memc_br1 = CONFIG_SYS_SDRAM_BASE | 0x81; - memctl->memc_or2 = ~(dimm_bank - 1) | 0x400; - memctl->memc_br2 = (CONFIG_SYS_SDRAM_BASE + ram_sz) | 0x81; - memctl->memc_or3 = ~(dimm_bank - 1) | 0x400; - memctl->memc_br3 = (CONFIG_SYS_SDRAM_BASE + ram_sz + dimm_bank) \ - | 0x81; - } else { - memctl->memc_or2 = ~(dimm_bank - 1) | 0x400; - memctl->memc_br2 = CONFIG_SYS_SDRAM_BASE | 0x81; - memctl->memc_or3 = ~(dimm_bank - 1) | 0x400; - memctl->memc_br3 = (CONFIG_SYS_SDRAM_BASE + dimm_bank) | 0x81; - memctl->memc_or1 = ~(ram_sz - 1) | 0x400; - memctl->memc_br1 = (CONFIG_SYS_SDRAM_BASE + dimm_sz) | 0x81; - } - } - - return ram_sz + dimm_sz; -} diff --git a/board/mbx8xx/pcmcia.c b/board/mbx8xx/pcmcia.c deleted file mode 100644 index 497e260a0a4..00000000000 --- a/board/mbx8xx/pcmcia.c +++ /dev/null @@ -1,156 +0,0 @@ -#include -#include -#include - -#include "csr.h" - -#undef CONFIG_PCMCIA - -#if defined(CONFIG_CMD_PCMCIA) -#define CONFIG_PCMCIA -#endif - -#if defined(CONFIG_CMD_IDE) && defined(CONFIG_IDE_8xx_PCCARD) -#define CONFIG_PCMCIA -#endif - -#ifdef CONFIG_PCMCIA - -/* A lot of this has been taken from the RPX code in this file it works from me. - I have added the voltage selection for the MBX board. */ - -/* MBX voltage bit in control register #2 */ -#define CR2_VPP12 ((uchar)0x10) -#define CR2_VPPVDD ((uchar)0x20) -#define CR2_VDD5 ((uchar)0x40) -#define CR2_VDD3 ((uchar)0x80) - -#define PCMCIA_BOARD_MSG "MBX860" - -int pcmcia_voltage_set (int slot, int vcc, int vpp) -{ - uchar reg = 0; - - debug ("voltage_set: PCMCIA_BOARD_MSG Slot %c, Vcc=%d.%d, Vpp=%d.%d\n", - 'A' + slot, vcc / 10, vcc % 10, vpp / 10, vcc % 10); - - switch (vcc) { - case 0: - break; - case 33: - reg |= CR2_VDD3; - break; - case 50: - reg |= CR2_VDD5; - break; - default: - return 1; - } - - switch (vpp) { - case 0: - break; - case 33: - case 50: - if (vcc == vpp) { - reg |= CR2_VPPVDD; - } else { - return 1; - } - break; - case 120: - reg |= CR2_VPP12; - break; - default: - return 1; - } - - /* first, turn off all power */ - MBX_CSR2 &= ~(CR2_VDDSEL | CR2_VPPSEL); - - /* enable new powersettings */ - MBX_CSR2 |= reg; - debug ("MBX_CSR2 read = 0x%02x\n", MBX_CSR2); - - return (0); -} - -int pcmcia_hardware_enable (int slot) -{ - volatile pcmconf8xx_t *pcmp; - uint reg, mask; - - debug ("hardware_enable: " PCMCIA_BOARD_MSG " Slot %c\n", - 'A' + slot); - - udelay (10000); - - pcmp = (pcmconf8xx_t *) (&(((immap_t *) CONFIG_SYS_IMMR)->im_pcmcia)); - - /* clear interrupt state, and disable interrupts */ - pcmp->pcmc_pscr = PCMCIA_MASK (_slot_); - pcmp->pcmc_per &= ~PCMCIA_MASK (_slot_); - - /* - * Disable interrupts, DMA, and PCMCIA buffers - * (isolate the interface) and assert RESET signal - */ - debug ("Disable PCMCIA buffers and assert RESET\n"); - reg = 0; - reg |= __MY_PCMCIA_GCRX_CXRESET; /* active high */ - reg |= __MY_PCMCIA_GCRX_CXOE; /* active low */ - PCMCIA_PGCRX (_slot_) = reg; - udelay (500); - - /* remove all power */ - pcmcia_voltage_set (slot, 0, 0); - /* - * Make sure there is a card in the slot, then configure the interface. - */ - udelay(10000); - debug ("[%d] %s: PIPR(%p)=0x%x\n", - __LINE__,__FUNCTION__, - &(pcmp->pcmc_pipr),pcmp->pcmc_pipr); - if (pcmp->pcmc_pipr & (0x10000000 >> (slot << 4))) { - printf (" No Card found\n"); - return (1); - } - - /* - * Power On. - */ - mask = PCMCIA_VS1 (_slot_) | PCMCIA_VS2 (_slot_); - reg = pcmp->pcmc_pipr; - debug ("PIPR: 0x%x ==> VS1=o%s, VS2=o%s\n", reg, - (reg & PCMCIA_VS1 (slot)) ? "n" : "ff", - (reg & PCMCIA_VS2 (slot)) ? "n" : "ff"); - - if ((reg & mask) == mask) { - pcmcia_voltage_set (_slot_, 50, 0); - printf (" 5.0V card found: "); - } else { - pcmcia_voltage_set (_slot_, 33, 0); - printf (" 3.3V card found: "); - } - - debug ("Enable PCMCIA buffers and stop RESET\n"); - reg = PCMCIA_PGCRX (_slot_); - reg &= ~__MY_PCMCIA_GCRX_CXRESET; /* active high */ - reg &= ~__MY_PCMCIA_GCRX_CXOE; /* active low */ - PCMCIA_PGCRX (_slot_) = reg; - - udelay (250000); /* some cards need >150 ms to come up :-( */ - - debug ("# hardware_enable done\n"); - - return (0); - } - -#if defined(CONFIG_CMD_PCMCIA) -int pcmcia_hardware_disable (int slot) -{ - return 0; /* No hardware to disable */ -} -#endif - -#endif /* CONFIG_PCMCIA */ diff --git a/board/mbx8xx/u-boot.lds b/board/mbx8xx/u-boot.lds deleted file mode 100644 index 0eb2fba00c2..00000000000 --- a/board/mbx8xx/u-boot.lds +++ /dev/null @@ -1,82 +0,0 @@ -/* - * (C) Copyright 2000-2010 - * Wolfgang Denk, DENX Software Engineering, wd@denx.de. - * - * SPDX-License-Identifier: GPL-2.0+ - */ - -OUTPUT_ARCH(powerpc) - -SECTIONS -{ - /* Read-only sections, merged into text segment: */ - . = + SIZEOF_HEADERS; - .text : - { - arch/powerpc/cpu/mpc8xx/start.o (.text*) - arch/powerpc/cpu/mpc8xx/traps.o (.text*) - - *(.text*) - } - _etext = .; - PROVIDE (etext = .); - .rodata : - { - *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) - } - - /* Read-write section, merged into data segment: */ - . = (. + 0x00FF) & 0xFFFFFF00; - _erotext = .; - PROVIDE (erotext = .); - .reloc : - { - _GOT2_TABLE_ = .; - KEEP(*(.got2)) - KEEP(*(.got)) - PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4); - _FIXUP_TABLE_ = .; - KEEP(*(.fixup)) - } - __got2_entries = ((_GLOBAL_OFFSET_TABLE_ - _GOT2_TABLE_) >> 2) - 1; - __fixup_entries = (. - _FIXUP_TABLE_)>>2; - - .data : - { - *(.data*) - *(.sdata*) - } - _edata = .; - PROVIDE (edata = .); - - . = .; - - . = ALIGN(4); - .u_boot_list : { - KEEP(*(SORT(.u_boot_list*))); - } - - - . = .; - __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) : - { - *(.bss*) - *(.sbss*) - *(COMMON) - . = ALIGN(4); - } - __bss_end = . ; - PROVIDE (end = .); -} diff --git a/board/mbx8xx/u-boot.lds.debug b/board/mbx8xx/u-boot.lds.debug deleted file mode 100644 index 7cfed1f1d57..00000000000 --- a/board/mbx8xx/u-boot.lds.debug +++ /dev/null @@ -1,122 +0,0 @@ -/* - * (C) Copyright 2000 - * Wolfgang Denk, DENX Software Engineering, wd@denx.de. - * - * SPDX-License-Identifier: GPL-2.0+ - */ - -OUTPUT_ARCH(powerpc) -/* Do we need any of these for elf? - __DYNAMIC = 0; */ -SECTIONS -{ - /* 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 */ - - arch/powerpc/cpu/mpc8xx/start.o (.text) - common/dlmalloc.o (.text) - lib/vsprintf.o (.text) - lib/crc32.o (.text) - arch/powerpc/lib/extable.o (.text) - - . = env_offset; - common/env_embedded.o(.text) - - *(.text) - *(.got1) - } - _etext = .; - PROVIDE (etext = .); - .rodata : - { - *(.rodata) - *(.rodata1) - *(.rodata.str1.4) - *(.eh_frame) - } - .fini : { *(.fini) } =0 - .ctors : { *(.ctors) } - .dtors : { *(.dtors) } - - /* Read-write section, merged into data segment: */ - . = (. + 0x0FFF) & 0xFFFFF000; - _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 = .); - - - . = ALIGN(4); - .u_boot_list : { - KEEP(*(SORT(.u_boot_list*))); - } - - - __start___ex_table = .; - __ex_table : { *(__ex_table) } - __stop___ex_table = .; - - . = ALIGN(4096); - __init_begin = .; - .text.init : { *(.text.init) } - .data.init : { *(.data.init) } - . = ALIGN(4096); - __init_end = .; - - __bss_start = .; - .bss : - { - *(.sbss) *(.scommon) - *(.dynbss) - *(.bss) - *(COMMON) - } - __bss_end = . ; - PROVIDE (end = .); -} diff --git a/board/mbx8xx/vpd.c b/board/mbx8xx/vpd.c deleted file mode 100644 index 1ba754ee23c..00000000000 --- a/board/mbx8xx/vpd.c +++ /dev/null @@ -1,180 +0,0 @@ -/* - * (C) Copyright 2000 - * Sysgo Real-Time Solutions, GmbH - * Marius Groeger - * - * Code in faintly related to linux/arch/powerpc/8xx_io: - * MPC8xx CPM I2C interface. Copyright (c) 1999 Dan Malek (dmalek@jlc.net). - * - * This file implements functions to read the MBX's Vital Product Data - * (VPD). I can't use the more general i2c code in mpc8xx/... since I need - * the VPD at a time where there is no RAM available yet. Hence the VPD is - * read into a special area in the DPRAM (see config_MBX.h::CFG_DPRAMVPD). - * - * ----------------------------------------------------------------- - * SPDX-License-Identifier: GPL-2.0+ - */ - -#include -#ifdef CONFIG_8xx -#include -#endif -#include "vpd.h" - -/* Location of receive/transmit buffer descriptors - * Allocate one transmit bd and one receive bd. - * IIC_BD_FREE points to free bd space which we'll use as tx buffer. - */ -#define IIC_BD_TX1 (BD_IIC_START + 0*sizeof(cbd_t)) -#define IIC_BD_TX2 (BD_IIC_START + 1*sizeof(cbd_t)) -#define IIC_BD_RX (BD_IIC_START + 2*sizeof(cbd_t)) -#define IIC_BD_FREE (BD_IIC_START + 3*sizeof(cbd_t)) - -/* FIXME -- replace 0x2000 with offsetof */ -#define VPD_P ((vpd_t *)(CONFIG_SYS_IMMR + 0x2000 + CONFIG_SYS_DPRAMVPD)) - -/* transmit/receive buffers */ -#define IIC_RX_LENGTH 128 - -#define WITH_MICROCODE_PATCH - -vpd_packet_t * vpd_find_packet(u_char ident) -{ - vpd_packet_t *packet; - vpd_t *vpd = VPD_P; - - packet = (vpd_packet_t *)&vpd->packets; - while ((packet->identifier != ident) && packet->identifier != 0xFF) - { - packet = (vpd_packet_t *)((char *)packet + packet->size + 2); - } - return packet; -} - -void vpd_init(void) -{ - volatile immap_t *im = (immap_t *)CONFIG_SYS_IMMR; - volatile cpm8xx_t *cp = &(im->im_cpm); - volatile i2c8xx_t *i2c = (i2c8xx_t *)&(im->im_i2c); - volatile iic_t *iip; -#ifdef WITH_MICROCODE_PATCH - ulong reloc = 0; -#endif - - iip = (iic_t *)&cp->cp_dparam[PROFF_IIC]; - - /* - * kludge: when running from flash, no microcode patch can be - * installed. However, the DPMEM usually contains non-zero - * garbage at the relocatable patch base location, so lets clear - * it now. This way the rest of the code can support the microcode - * patch dynamically. - */ - if ((ulong)vpd_init & 0xff000000) - iip->iic_rpbase = 0; - -#ifdef WITH_MICROCODE_PATCH - /* Check for and use a microcode relocation patch. */ - if ((reloc = iip->iic_rpbase)) - iip = (iic_t *)&cp->cp_dpmem[iip->iic_rpbase]; -#endif - /* Initialize Port B IIC pins */ - cp->cp_pbpar |= 0x00000030; - cp->cp_pbdir |= 0x00000030; - cp->cp_pbodr |= 0x00000030; - - i2c->i2c_i2mod = 0x04; /* filter clock */ - i2c->i2c_i2add = 0x34; /* select an arbitrary (unique) address */ - i2c->i2c_i2brg = 0x07; /* make clock run maximum slow */ - i2c->i2c_i2cmr = 0x00; /* disable interrupts */ - i2c->i2c_i2cer = 0x1f; /* clear events */ - i2c->i2c_i2com = 0x01; /* configure i2c to work as master */ - - if (vpd_read(0xa4, (uchar*)VPD_P, VPD_EEPROM_SIZE, 0) != VPD_EEPROM_SIZE) - { - hang(); - } -} - - -/* Read from I2C. - * This is a two step process. First, we send the "dummy" write - * to set the device offset for the read. Second, we perform - * the read operation. - */ -int vpd_read(uint iic_device, uchar *buf, int count, int offset) -{ - volatile immap_t *im = (immap_t *)CONFIG_SYS_IMMR; - volatile cpm8xx_t *cp = &(im->im_cpm); - volatile i2c8xx_t *i2c = (i2c8xx_t *)&(im->im_i2c); - volatile iic_t *iip; - volatile cbd_t *tbdf1, *tbdf2, *rbdf; - uchar *tb; - uchar event; -#ifdef WITH_MICROCODE_PATCH - ulong reloc = 0; -#endif - - iip = (iic_t *)&cp->cp_dparam[PROFF_IIC]; -#ifdef WITH_MICROCODE_PATCH - /* Check for and use a microcode relocation patch. */ - if ((reloc = iip->iic_rpbase)) - iip = (iic_t *)&cp->cp_dpmem[iip->iic_rpbase]; -#endif - tbdf1 = (cbd_t *)&cp->cp_dpmem[IIC_BD_TX1]; - tbdf2 = (cbd_t *)&cp->cp_dpmem[IIC_BD_TX2]; - rbdf = (cbd_t *)&cp->cp_dpmem[IIC_BD_RX]; - - /* Send a "dummy write" operation. This is a write request with - * only the offset sent, followed by another start condition. - * This will ensure we start reading from the first location - * of the EEPROM. - */ - tb = (uchar*)&cp->cp_dpmem[IIC_BD_FREE]; - tb[0] = iic_device & 0xfe; /* device address */ - tb[1] = offset; /* offset */ - tbdf1->cbd_bufaddr = (uint)tb; - tbdf1->cbd_datlen = 2; - tbdf1->cbd_sc = 0x8400; - - tb += 2; - tb[0] = iic_device | 1; /* device address */ - tbdf2->cbd_bufaddr = (uint)tb; - tbdf2->cbd_datlen = count+1; - tbdf2->cbd_sc = 0xbc00; - - rbdf->cbd_bufaddr = (uint)buf; - rbdf->cbd_datlen = 0; - rbdf->cbd_sc = 0xb000; - - iip->iic_tbase = IIC_BD_TX1; - iip->iic_tbptr = IIC_BD_TX1; - iip->iic_rbase = IIC_BD_RX; - iip->iic_rbptr = IIC_BD_RX; - iip->iic_rfcr = 0x15; - iip->iic_tfcr = 0x15; - iip->iic_mrblr = count; - iip->iic_rstate = 0; - iip->iic_tstate = 0; - - i2c->i2c_i2cer = 0x1f; /* clear event mask */ - i2c->i2c_i2mod |= 1; /* enable iic operation */ - i2c->i2c_i2com |= 0x80; /* start master */ - - /* wait for IIC transfer */ - do { - __asm__ volatile ("eieio"); - event = i2c->i2c_i2cer; - } while (event == 0); - - if ((event & 0x10) || (event & 0x04)) { - count = -1; - goto bailout; - } - -bailout: - i2c->i2c_i2mod &= ~1; /* turn off iic operation */ - i2c->i2c_i2cer = 0x1f; /* clear event mask */ - - return count; -} diff --git a/board/mbx8xx/vpd.h b/board/mbx8xx/vpd.h deleted file mode 100644 index 1d9eb7fe200..00000000000 --- a/board/mbx8xx/vpd.h +++ /dev/null @@ -1,119 +0,0 @@ -#ifndef __vpd_h -#define __vpd_h - -/* - * Module name: %M% - * Description: - * Vital Product Data (VPD) Header Module - * SCCS identification: %I% - * Branch: %B% - * Sequence: %S% - * Date newest applied delta was created (MM/DD/YY): %G% - * Time newest applied delta was created (HH:MM:SS): %U% - * SCCS file name %F% - * Fully qualified SCCS file name: - * %P% - * Copyright: - * (C) COPYRIGHT MOTOROLA, INC. 1996 - * ALL RIGHTS RESERVED - * Notes: - * History: - * Date Who - * - * 10/24/96 Rob Baxter - * Initial release. - * - */ - -#define VPD_EEPROM_SIZE 256 /* EEPROM size in bytes */ - -/* - * packet tuple identifiers - * - * 0x0D - 0xBF reserved - * 0xC0 - 0xFE user defined - */ -#define VPD_PID_GI 0x00 /* guaranteed illegal */ -#define VPD_PID_PID 0x01 /* product identifier (ASCII) */ -#define VPD_PID_FAN 0x02 /* factory assembly-number (ASCII) */ -#define VPD_PID_SN 0x03 /* serial-number (ASCII) */ -#define VPD_PID_PCO 0x04 /* product configuration options(binary) */ -#define VPD_PID_ICS 0x05 /* internal clock speed in HZ (integer) */ -#define VPD_PID_ECS 0x06 /* external clock speed in HZ (integer) */ -#define VPD_PID_RCS 0x07 /* reference clock speed in HZ(integer) */ -#define VPD_PID_EA 0x08 /* ethernet address (binary) */ -#define VPD_PID_MT 0x09 /* microprocessor type (ASCII) */ -#define VPD_PID_CRC 0x0A /* EEPROM CRC (integer) */ -#define VPD_PID_FMC 0x0B /* FLASH memory configuration (binary) */ -#define VPD_PID_VLSI 0x0C /* VLSI revisions/versions (binary) */ -#define VPD_PID_TERM 0xFF /* termination */ - -/* - * VPD structure (format) - */ -#define VPD_EYE_SIZE 8 /* eyecatcher size */ -typedef struct vpd_header -{ - uchar eyecatcher[VPD_EYE_SIZE]; /* eyecatcher - "MOTOROLA" */ - ushort size; /* size of EEPROM */ -} vpd_header_t; - -#define VPD_DATA_SIZE (VPD_EEPROM_SIZE-sizeof(vpd_header_t)) -typedef struct vpd -{ - vpd_header_t header; /* header */ - uchar packets[VPD_DATA_SIZE]; /* data */ -} vpd_t; - -/* - * packet tuple structure (format) - */ -typedef struct vpd_packet -{ - uchar identifier; /* identifier (PIDs above) */ - uchar size; /* size of the following data area */ - uchar data[1]; /* data (size is dependent upon PID) */ -} vpd_packet_t; - -/* - * MBX product configuration options bit definitions - * - * Notes: - * 1. The bit numbering is reversed in perspective with the C compiler. - */ -#define PCO_BBRAM (1<<0) /* battery-backed RAM (BBRAM) and socket */ -#define PCO_BOOTROM (1<<1) /* boot ROM and socket (i.e., socketed FLASH) */ -#define PCO_KAPWR (1<<2) /* keep alive power source (lithium battey) and control circuit */ -#define PCO_ENET_TP (1<<3) /* ethernet twisted pair (TP) connector (RJ45) */ -#define PCO_ENET_AUI (1<<4) /* ethernet attachment unit interface (AUI) header */ -#define PCO_PCMCIA (1<<5) /* PCMCIA socket */ -#define PCO_DIMM (1<<6) /* DIMM module socket */ -#define PCO_DTT (1<<7) /* digital thermometer and thermostat (DTT) device */ -#define PCO_LCD (1<<8) /* liquid crystal display (LCD) device */ -#define PCO_PCI (1<<9) /* PCI-Bus bridge device (QSpan) and ISA-Bus bridge device (Winbond) */ -#define PCO_PCIO (1<<10) /* PC I/O (COM1, COM2, FDC, LPT, Keyboard/Mouse) */ -#define PCO_EIDE (1<<11) /* enhanced IDE (EIDE) header */ -#define PCO_FDC (1<<12) /* floppy disk controller (FDC) header */ -#define PCO_LPT_8XX (1<<13) /* parallel port header via MPC8xx */ -#define PCO_LPT_PCIO (1<<14) /* parallel port header via PC I/O */ - -/* - * FLASH memory configuration packet data - */ -typedef struct vpd_fmc -{ - ushort mid; /* manufacturer's idenitfier */ - ushort did; /* manufacturer's device idenitfier */ - uchar ddw; /* device data width (e.g., 8-bits, 16-bits) */ - uchar nod; /* number of devices present */ - uchar noc; /* number of columns */ - uchar cw; /* column width in bits */ - uchar wedw; /* write/erase data width */ -} vpd_fmc_t; - -/* function prototypes */ -extern void vpd_init(void); -extern int vpd_read(uint iic_device, uchar *buf, int count, int offset); -extern vpd_packet_t *vpd_find_packet(u_char ident); - -#endif /* __vpd_h */ diff --git a/boards.cfg b/boards.cfg index 26e784b01c4..384f319382a 100644 --- a/boards.cfg +++ b/boards.cfg @@ -1253,5 +1253,3 @@ Orphan powerpc mpc8xx - - fads Orphan powerpc mpc8xx - - fads FADS850SAR - - Orphan powerpc mpc8xx - - fads FADS860T - - Orphan powerpc mpc8xx - - genietv GENIETV - - -Orphan powerpc mpc8xx - - mbx8xx MBX - - -Orphan powerpc mpc8xx - - mbx8xx MBX860T - - diff --git a/doc/README.scrapyard b/doc/README.scrapyard index 7f519916fd3..4e0ad323c7b 100644 --- a/doc/README.scrapyard +++ b/doc/README.scrapyard @@ -11,6 +11,7 @@ easily if here is something they might want to dig for... Board Arch CPU Commit Removed Last known maintainer/contact ================================================================================================= +mbx8xx powerpc mpc8xx - 2014-04-04 nx823 powerpc mpc8xx - 2014-04-04 idmr m68k mcf52x2 ba650e9b 2014-01-28 M5271EVB m68k mcf52x2 ba650e9b 2014-01-28 diff --git a/include/common.h b/include/common.h index cbd3c9e043d..580615b9ef1 100644 --- a/include/common.h +++ b/include/common.h @@ -511,13 +511,6 @@ void rpxclassic_init (void); void rpxlite_init (void); -#ifdef CONFIG_MBX -/* $(BOARD)/mbx8xx.c */ -void mbx_init (void); -void board_serial_init (void); -void board_ether_init (void); -#endif - #ifdef CONFIG_HERMES /* $(BOARD)/hermes.c */ void hermes_start_lxt980 (int speed); diff --git a/include/commproc.h b/include/commproc.h index 12b94210607..62468c30aad 100644 --- a/include/commproc.h +++ b/include/commproc.h @@ -12,10 +12,6 @@ * CPM capabilities. I (or someone else) will add definitions as they * are needed. -- Dan * - * On the MBX board, EPPC-Bug loads CPM microcode into the first 512 - * bytes of the DP RAM and relocates the I2C parameter area to the - * IDMA1 space. The remaining DP RAM is available for buffer descriptors - * or other use. */ #ifndef __CPM_8XX__ #define __CPM_8XX__ @@ -135,7 +131,6 @@ typedef struct cpm_buf_desc { #define PROFF_SMC2 ((uint)0x0380) /* Define enough so I can at least use the serial port as a UART. - * The MBX uses SMC1 as the host serial port. */ typedef struct smc_uart { ushort smc_rbase; /* Rx Buffer descriptor base address */ @@ -888,33 +883,6 @@ typedef struct scc_enet { #define SICR_ENET_CLKRT ((uint)0x00003E00) #endif /* CONFIG_LWMON */ -/*** MBX ************************************************************/ - -#ifdef CONFIG_MBX -/* Bits in parallel I/O port registers that have to be set/cleared - * to configure the pins for SCC1 use. The TCLK and RCLK seem unique - * to the MBX860 board. Any two of the four available clocks could be - * used, and the MPC860 cookbook manual has an example using different - * clock pins. - */ -#define PROFF_ENET PROFF_SCC1 -#define CPM_CR_ENET CPM_CR_CH_SCC1 -#define SCC_ENET 0 -#define PA_ENET_RXD ((ushort)0x0001) -#define PA_ENET_TXD ((ushort)0x0002) -#define PA_ENET_TCLK ((ushort)0x0200) -#define PA_ENET_RCLK ((ushort)0x0800) -#define PC_ENET_TENA ((ushort)0x0001) -#define PC_ENET_CLSN ((ushort)0x0010) -#define PC_ENET_RENA ((ushort)0x0020) - -/* Control bits in the SICR to route TCLK (CLK2) and RCLK (CLK4) to - * SCC1. Also, make sure GR1 (bit 24) and SC1 (bit 25) are zero. - */ -#define SICR_ENET_MASK ((uint)0x000000ff) -#define SICR_ENET_CLKRT ((uint)0x0000003d) -#endif /* CONFIG_MBX */ - /*** KM8XX *********************************************************/ /* The KM8XX Service Module uses SCC3 for Ethernet */ diff --git a/include/configs/MBX.h b/include/configs/MBX.h deleted file mode 100644 index 96edd442d0c..00000000000 --- a/include/configs/MBX.h +++ /dev/null @@ -1,290 +0,0 @@ -/* - * (C) Copyright 2000 - * Sysgo Real-Time Solutions, GmbH - * Marius Groeger - * - * Configuation settings for the MBX8xx board. - * - * ----------------------------------------------------------------- - * SPDX-License-Identifier: GPL-2.0+ - */ -/* - * Changed 2002-10-01 - * Added PCMCIA defines mostly taken from other U-Boot boards that - * have PCMCIA already working. If you find any bugs, incorrect assumptions - * feel free to fix them yourself and submit a patch. - * Rod Boyce - -#define CONFIG_MPC860 1 -#define CONFIG_MPC860T 1 -#define CONFIG_MBX 1 - -#define CONFIG_SYS_TEXT_BASE 0xfe000000 - -#define CONFIG_8xx_CPUCLOCK 40 -#define CONFIG_8xx_BUSCLOCK (CONFIG_8xx_CPUCLOCK) -#define TARGET_SYSTEM_FREQUENCY 40 - -#define CONFIG_8xx_CONS_SMC1 1 /* Console is on SMC1 */ -#undef CONFIG_8xx_CONS_SMC2 -#define CONFIG_BAUDRATE 9600 - -#define MPC8XX_FACT 10 /* Multiply by 10 */ -#define MPC8XX_XIN 40000000 /* 50 MHz in */ -#define MPC8XX_HZ ((MPC8XX_XIN) * (MPC8XX_FACT)) - -#define CONFIG_CLOCKS_IN_MHZ 1 /* clocks passsed to Linux in MHz */ - -#if 1 -#define CONFIG_8xx_BOOTDELAY -1 /* autoboot disabled */ -#define CONFIG_8xx_TFTP_MODE -#else -#define CONFIG_8xx_BOOTDELAY 5 /* autoboot after 5 seconds */ -#undef CONFIG_8xx_TFTP_MODE -#endif - -#define CONFIG_MISC_INIT_R - -#define CONFIG_DRAM_SPEED (CONFIG_8xx_BUSCLOCK) /* MHz */ -#define CONFIG_BOOTCOMMAND "bootm FE020000" /* autoboot command */ -#define CONFIG_BOOTARGS " " -/* - * Miscellaneous configurable options - */ -#undef CONFIG_SYS_LONGHELP /* undef to save memory */ -#define CONFIG_SYS_PROMPT ":>" /* Monitor Command Prompt */ -#define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */ -#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */ -#define CONFIG_SYS_MAXARGS 16 /* max number of command args */ -#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */ - -#define CONFIG_SYS_MEMTEST_START 0x0400000 /* memtest works on */ -#define CONFIG_SYS_MEMTEST_END 0x0800000 /* 4 ... 8 MB in DRAM */ - -#define CONFIG_SYS_LOAD_ADDR 0x100000 /* default load address */ - -/* - * Low Level Configuration Settings - * (address mappings, register initial values, etc.) - * You should know what you are doing if you make changes here. - */ -/*----------------------------------------------------------------------- - * Internal Memory Mapped Register - */ -#define CONFIG_SYS_IMMR 0xFFA00000 -#define CONFIG_SYS_IMMR_SIZE ((uint)(64 * 1024)) -#define CONFIG_SYS_NVRAM_BASE 0xFA000000 /* NVRAM */ -#define CONFIG_SYS_NVRAM_OR 0xffe00000 /* w/o speed dependent flags!! */ -#define CONFIG_SYS_CSR_BASE 0xFA100000 /* Control/Status Registers */ -#define CONFIG_SYS_PCIMEM_BASE 0x80000000 /* PCI I/O and Memory Spaces */ -#define CONFIG_SYS_PCIMEM_OR 0xA0000108 -#define CONFIG_SYS_PCIBRIDGE_BASE 0xFA210000 /* PCI-Bus Bridge Registers */ -#define CONFIG_SYS_PCIBRIDGE_OR 0xFFFF0108 - -/*----------------------------------------------------------------------- - * Definitions for initial stack pointer and data area (in DPRAM) - */ -#define CONFIG_SYS_INIT_RAM_ADDR CONFIG_SYS_IMMR -#define CONFIG_SYS_INIT_RAM_SIZE 0x2f00 /* Size of used area in DPRAM */ -#define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) -#define CONFIG_SYS_INIT_VPD_SIZE 256 /* size in bytes reserved for vpd buffer */ -#define CONFIG_SYS_INIT_VPD_OFFSET (CONFIG_SYS_GBL_DATA_OFFSET - CONFIG_SYS_INIT_VPD_SIZE) -#define CONFIG_SYS_INIT_SP_OFFSET (CONFIG_SYS_INIT_VPD_OFFSET-8) - -/*----------------------------------------------------------------------- - * Offset in DPMEM where we keep the VPD data - */ -#define CONFIG_SYS_DPRAMVPD (CONFIG_SYS_INIT_VPD_OFFSET - 0x2000) - -/*----------------------------------------------------------------------- - * Start addresses for the final memory configuration - * (Set up by the startup code) - * Please note that CONFIG_SYS_SDRAM_BASE _must_ start at 0 - */ -#define CONFIG_SYS_SDRAM_BASE 0x00000000 -#define CONFIG_SYS_FLASH_BASE 0x00000000 -/*0xFE000000*/ -#define CONFIG_SYS_FLASH_SIZE ((uint)(8 * 1024 * 1024)) /* max 8Mbyte */ -#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE -#define CONFIG_SYS_MONITOR_LEN (256 << 10) /* Reserve 256 kB for Monitor */ -#define CONFIG_SYS_HWINFO_ADDR (CONFIG_SYS_FLASH_BASE + CONFIG_SYS_MONITOR_LEN - CONFIG_SYS_HWINFO_LEN) -#define CONFIG_SYS_MALLOC_LEN (256 << 10) /* Reserve 256 kB for malloc() */ - -/* - * For booting Linux, the board info and command line data - * have to be in the first 8 MB of memory, since this is - * the maximum mapped by the Linux kernel during initialization. - */ -#define CONFIG_SYS_BOOTMAPSZ (8 << 20) /* Initial Memory map for Linux */ - -/*----------------------------------------------------------------------- - * FLASH organization - */ -#define CONFIG_SYS_MAX_FLASH_BANKS 4 /* max number of memory banks */ -#define CONFIG_SYS_MAX_FLASH_SECT 16 /* max number of sectors on one chip */ - -#define CONFIG_SYS_FLASH_ERASE_TOUT 120000 /* Timeout for Flash Erase (in ms) */ -#define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Timeout for Flash Write (in ms) */ - -/*----------------------------------------------------------------------- - * NVRAM Configuration - * - * Note: the MBX is special because there is already a firmware on this - * board: EPPC-Bug from Motorola. To avoid collisions in NVRAM Usage, we - * access the NVRAM at the offset 0x1000. - */ -#define CONFIG_ENV_IS_IN_NVRAM 1 /* turn on NVRAM env feature */ -#define CONFIG_ENV_ADDR (CONFIG_SYS_NVRAM_BASE + 0x1000) -#define CONFIG_ENV_SIZE 0x1000 - -/*----------------------------------------------------------------------- - * Cache Configuration - */ -#define CONFIG_SYS_CACHELINE_SIZE 16 /* For all MPC8xx CPUs */ -#if defined(CONFIG_CMD_KGDB) -#define CONFIG_SYS_CACHELINE_SHIFT 4 /* log base 2 of the above value */ -#endif - -/*----------------------------------------------------------------------- - * SYPCR - System Protection Control 11-9 - * SYPCR can only be written once after reset! - *----------------------------------------------------------------------- - * Software & Bus Monitor Timer max, Bus Monitor enable, SW Watchdog freeze - */ -#if defined(CONFIG_WATCHDOG) -#define CONFIG_SYS_SYPCR (SYPCR_SWTC | SYPCR_BMT | SYPCR_BME | SYPCR_SWF | \ - SYPCR_SWE | SYPCR_SWRI| SYPCR_SWP) -#else -#define CONFIG_SYS_SYPCR (SYPCR_SWTC | SYPCR_BMT | SYPCR_BME | SYPCR_SWF) -#endif - -/*----------------------------------------------------------------------- - * SIUMCR - SIU Module Configuration 11-6 - *----------------------------------------------------------------------- - * PCMCIA config., multi-function pin tri-state - */ -#define CONFIG_SYS_SIUMCR (SIUMCR_DBGC11 | SIUMCR_DPC | SIUMCR_MLRC10 | SIUMCR_SEME) - -/*----------------------------------------------------------------------- - * TBSCR - Time Base Status and Control 11-26 - *----------------------------------------------------------------------- - * Clear Reference Interrupt Status, Timebase freezing enabled - */ -#define CONFIG_SYS_TBSCR (TBSCR_REFA | TBSCR_REFB | TBSCR_TBF) - -/*----------------------------------------------------------------------- - * PISCR - Periodic Interrupt Status and Control 11-31 - *----------------------------------------------------------------------- - * Clear Periodic Interrupt Status, Interrupt Timer freezing enabled - */ -#define CONFIG_SYS_PISCR (PISCR_PS | PISCR_PITF | PISCR_PTE) - -/*----------------------------------------------------------------------- - * PLPRCR - PLL, Low-Power, and Reset Control Register 15-30 - *----------------------------------------------------------------------- - * Reset PLL lock status sticky bit, timer expired status bit and timer - * interrupt status bit - leave PLL multiplication factor unchanged ! - */ -#define CONFIG_SYS_PLPRCR (PLPRCR_SPLSS | PLPRCR_TEXPS | PLPRCR_TMIST) - -/*----------------------------------------------------------------------- - * SCCR - System Clock and reset Control Register 15-27 - *----------------------------------------------------------------------- - * Set clock output, timebase and RTC source and divider, - * power management and some other internal clocks - */ -#define SCCR_MASK (SCCR_RTDIV | SCCR_RTSEL) -#define CONFIG_SYS_SCCR SCCR_TBS - - /*----------------------------------------------------------------------- - * - *----------------------------------------------------------------------- - * - */ -#define CONFIG_SYS_DER 0 - -/* Because of the way the 860 starts up and assigns CS0 the -* entire address space, we have to set the memory controller -* differently. Normally, you write the option register -* first, and then enable the chip select by writing the -* base register. For CS0, you must write the base register -* first, followed by the option register. -*/ - -/* - * Init Memory Controller: - * - * BR0/1 and OR0/1 (FLASH) - */ -/* the other CS:s are determined by looking at parameters in BCSRx */ - - -#define BCSR_ADDR ((uint) 0xFF010000) -#define BCSR_SIZE ((uint)(64 * 1024)) - -#define FLASH_BASE0_PRELIM 0xFE000000 /* FLASH bank #0 */ -#define FLASH_BASE1_PRELIM 0xFF010000 /* FLASH bank #0 */ - -#define CONFIG_SYS_REMAP_OR_AM 0x80000000 /* OR addr mask */ -#define CONFIG_SYS_PRELIM_OR_AM 0xFFF00000 /* OR addr mask */ - -/* FLASH timing: ACS = 10, TRLX = 1, CSNT = 1, SCY = 3, EHTR = 0 */ -#define CONFIG_SYS_OR_TIMING_FLASH (OR_CSNT_SAM | OR_ACS_DIV4 | OR_BI | OR_SCY_3_CLK | OR_TRLX) - -#define CONFIG_SYS_OR0_REMAP (CONFIG_SYS_REMAP_OR_AM | CONFIG_SYS_OR_TIMING_FLASH) -#define CONFIG_SYS_OR0_PRELIM (0xFF800000 | OR_CSNT_SAM | OR_BI | OR_SCY_3_CLK) /* 1 Mbyte until detected and only 1 Mbyte is needed*/ -#define CONFIG_SYS_BR0_PRELIM (0xFE000000 | BR_V ) - -/* BCSRx - Board Control and Status Registers */ -#define CONFIG_SYS_OR1_REMAP CONFIG_SYS_OR0_REMAP -#define CONFIG_SYS_OR1_PRELIM 0xFFC00000 | OR_ACS_DIV4 -#define CONFIG_SYS_BR1_PRELIM (0x00000000 | BR_MS_UPMA | BR_V ) - - -/* - * Memory Periodic Timer Prescaler - */ - -/* periodic timer for refresh */ -#define CONFIG_SYS_MAMR_PTA 97 /* start with divider for 100 MHz */ - -/* refresh rate 15.6 us (= 64 ms / 4K = 62.4 / quad bursts) for <= 128 MBit */ -#define CONFIG_SYS_MPTPR_2BK_4K MPTPR_PTP_DIV16 /* setting for 2 banks */ -#define CONFIG_SYS_MPTPR_1BK_4K MPTPR_PTP_DIV32 /* setting for 1 bank */ - -/* refresh rate 7.8 us (= 64 ms / 8K = 31.2 / quad bursts) for 256 MBit */ -#define CONFIG_SYS_MPTPR_2BK_8K MPTPR_PTP_DIV8 /* setting for 2 banks */ -#define CONFIG_SYS_MPTPR_1BK_8K MPTPR_PTP_DIV16 /* setting for 1 bank */ - -/* - * MAMR settings for SDRAM - */ - -/* 8 column SDRAM */ -#define CONFIG_SYS_MAMR_8COL ((CONFIG_SYS_MAMR_PTA << MAMR_PTA_SHIFT) | MAMR_PTAE | \ - MAMR_AMA_TYPE_0 | MAMR_DSA_1_CYCL | MAMR_G0CLA_A11 | \ - MAMR_RLFA_1X | MAMR_WLFA_1X | MAMR_TLFA_4X) -/* 9 column SDRAM */ -#define CONFIG_SYS_MAMR_9COL ((CONFIG_SYS_MAMR_PTA << MAMR_PTA_SHIFT) | MAMR_PTAE | \ - MAMR_AMA_TYPE_1 | MAMR_DSA_1_CYCL | MAMR_G0CLA_A10 | \ - MAMR_RLFA_1X | MAMR_WLFA_1X | MAMR_TLFA_4X) - -#define CONFIG_SYS_MAMR 0x13821000 - -/* values according to the manual */ - - -#define PCMCIA_MEM_ADDR ((uint)0xff020000) -#define PCMCIA_MEM_SIZE ((uint)(64 * 1024)) - -#define BCSR0 ((uint) (BCSR_ADDR + 00)) -#define BCSR1 ((uint) (BCSR_ADDR + 0x04)) -#define BCSR2 ((uint) (BCSR_ADDR + 0x08)) -#define BCSR3 ((uint) (BCSR_ADDR + 0x0c)) -#define BCSR4 ((uint) (BCSR_ADDR + 0x10)) - -/* FADS bitvalues by Helmut Buchsbaum - * see MPC8xxADS User's Manual for a proper description - * of the following structures - */ - -#define BCSR0_ERB ((uint)0x80000000) -#define BCSR0_IP ((uint)0x40000000) -#define BCSR0_BDIS ((uint)0x10000000) -#define BCSR0_BPS_MASK ((uint)0x0C000000) -#define BCSR0_ISB_MASK ((uint)0x01800000) -#define BCSR0_DBGC_MASK ((uint)0x00600000) -#define BCSR0_DBPC_MASK ((uint)0x00180000) -#define BCSR0_EBDF_MASK ((uint)0x00060000) - -#define BCSR1_FLASH_EN ((uint)0x80000000) -#define BCSR1_DRAM_EN ((uint)0x40000000) -#define BCSR1_ETHEN ((uint)0x20000000) -#define BCSR1_IRDEN ((uint)0x10000000) -#define BCSR1_FLASH_CFG_EN ((uint)0x08000000) -#define BCSR1_CNT_REG_EN_PROTECT ((uint)0x04000000) -#define BCSR1_BCSR_EN ((uint)0x02000000) -#define BCSR1_RS232EN_1 ((uint)0x01000000) -#define BCSR1_PCCEN ((uint)0x00800000) -#define BCSR1_PCCVCC0 ((uint)0x00400000) -#define BCSR1_PCCVPP_MASK ((uint)0x00300000) -#define BCSR1_DRAM_HALF_WORD ((uint)0x00080000) -#define BCSR1_RS232EN_2 ((uint)0x00040000) -#define BCSR1_SDRAM_EN ((uint)0x00020000) -#define BCSR1_PCCVCC1 ((uint)0x00010000) - -#define BCSR2_FLASH_PD_MASK ((uint)0xF0000000) -#define BCSR2_DRAM_PD_MASK ((uint)0x07800000) -#define BCSR2_DRAM_PD_SHIFT (23) -#define BCSR2_EXTTOLI_MASK ((uint)0x00780000) -#define BCSR2_DBREVNR_MASK ((uint)0x00030000) - -#define BCSR3_DBID_MASK ((ushort)0x3800) -#define BCSR3_CNT_REG_EN_PROTECT ((ushort)0x0400) -#define BCSR3_BREVNR0 ((ushort)0x0080) -#define BCSR3_FLASH_PD_MASK ((ushort)0x0070) -#define BCSR3_BREVN1 ((ushort)0x0008) -#define BCSR3_BREVN2_MASK ((ushort)0x0003) - -#define BCSR4_ETHLOOP ((uint)0x80000000) -#define BCSR4_TFPLDL ((uint)0x40000000) -#define BCSR4_TPSQEL ((uint)0x20000000) -#define BCSR4_SIGNAL_LAMP ((uint)0x10000000) -#ifdef CONFIG_MPC823 -#define BCSR4_USB_EN ((uint)0x08000000) -#endif /* CONFIG_MPC823 */ -#ifdef CONFIG_MPC860SAR -#define BCSR4_UTOPIA_EN ((uint)0x08000000) -#endif /* CONFIG_MPC860SAR */ -#ifdef CONFIG_MPC860T -#define BCSR4_FETH_EN ((uint)0x08000000) -#endif /* CONFIG_MPC860T */ -#define BCSR4_USB_SPEED ((uint)0x04000000) -#define BCSR4_VCCO ((uint)0x02000000) -#define BCSR4_VIDEO_ON ((uint)0x00800000) -#define BCSR4_VDO_EKT_CLK_EN ((uint)0x00400000) -#define BCSR4_VIDEO_RST ((uint)0x00200000) -#define BCSR4_MODEM_EN ((uint)0x00100000) -#define BCSR4_DATA_VOICE ((uint)0x00080000) - -#define CONFIG_DRAM_40MHZ 1 - -#ifdef CONFIG_MPC860T - -/* Interrupt level assignments. -*/ -#define FEC_INTERRUPT SIU_LEVEL1 /* FEC interrupt */ - -#endif /* CONFIG_MPC860T */ - -/* We don't use the 8259. -*/ -#define NR_8259_INTS 0 - -#define CONFIG_CMD_NET -/* - * MPC8xx CPM Options - */ -#define CONFIG_SCC_ENET 1 -#define CONFIG_SCC1_ENET 1 -#define CONFIG_FEC_ENET 1 -#undef CONFIG_CPM_IIC -#undef CONFIG_UCODE_PATCH - - -#define CONFIG_DISK_SPINUP_TIME 1000000 - - -/* PCMCIA configuration */ - -#define PCMCIA_MAX_SLOTS 2 - -#ifdef CONFIG_MPC860 -#define PCMCIA_SLOT_A 1 -#endif - -#endif /* __CONFIG_H */ diff --git a/post/cpu/mpc8xx/ether.c b/post/cpu/mpc8xx/ether.c index 91505475e85..53c0e4dfda1 100644 --- a/post/cpu/mpc8xx/ether.c +++ b/post/cpu/mpc8xx/ether.c @@ -374,10 +374,6 @@ static void scc_init (int scc_index) *((uchar *) BCSR0) |= BCSR0_ETHEN; #endif -#ifdef CONFIG_MBX - board_ether_init (); -#endif - /* * Set the ENT/ENR bits in the GSMR Low -- Enable Transmit/Receive */ diff --git a/post/cpu/mpc8xx/uart.c b/post/cpu/mpc8xx/uart.c index 106a9b87d2c..25d63d8120f 100644 --- a/post/cpu/mpc8xx/uart.c +++ b/post/cpu/mpc8xx/uart.c @@ -141,10 +141,6 @@ static void smc_init (int smc_index) up->smc_rfcr = SMC_EB; up->smc_tfcr = SMC_EB; -#if defined(CONFIG_MBX) - board_serial_init (); -#endif - /* Set UART mode, 8 bit, no parity, one stop. * Enable receive and transmit. * Set local loopback mode. -- cgit v1.2.3 From b8a49bdaaad386d09a47d450d00c4e64f1f354a3 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Fri, 4 Apr 2014 15:25:04 +0900 Subject: powerpc: remove genietv board support Enough time has passed since this board was moved to Orphan. Remove. - Remove board/genietv/* - Remove include/configs/GENIETV.h - Clean-up if defined(CONFIG_GENIETV) - Move the entry from boards.cfg to doc/README.scrapyard Signed-off-by: Masahiro Yamada --- board/genietv/Makefile | 8 - board/genietv/flash.c | 449 ----------------------------------------- board/genietv/genietv.c | 360 --------------------------------- board/genietv/u-boot.lds | 101 --------- board/genietv/u-boot.lds.debug | 127 ------------ boards.cfg | 1 - doc/README.console | 1 - doc/README.scrapyard | 1 + doc/README.video | 2 - include/commproc.h | 26 --- include/configs/GENIETV.h | 354 -------------------------------- 11 files changed, 1 insertion(+), 1429 deletions(-) delete mode 100644 board/genietv/Makefile delete mode 100644 board/genietv/flash.c delete mode 100644 board/genietv/genietv.c delete mode 100644 board/genietv/u-boot.lds delete mode 100644 board/genietv/u-boot.lds.debug delete mode 100644 include/configs/GENIETV.h (limited to 'board') diff --git a/board/genietv/Makefile b/board/genietv/Makefile deleted file mode 100644 index fd11f14b3a6..00000000000 --- a/board/genietv/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -# -# (C) Copyright 2000-2006 -# Wolfgang Denk, DENX Software Engineering, wd@denx.de. -# -# SPDX-License-Identifier: GPL-2.0+ -# - -obj-y = genietv.o flash.o diff --git a/board/genietv/flash.c b/board/genietv/flash.c deleted file mode 100644 index 5f57978a333..00000000000 --- a/board/genietv/flash.c +++ /dev/null @@ -1,449 +0,0 @@ -/* - * (C) Copyright 2000-2011 - * Wolfgang Denk, DENX Software Engineering, wd@denx.de. - * - * SPDX-License-Identifier: GPL-2.0+ - */ - -#include -#include - -flash_info_t flash_info[CONFIG_SYS_MAX_FLASH_BANKS]; - -/*----------------------------------------------------------------------- - * Functions - */ -static ulong flash_get_size(vu_long *addr, flash_info_t *info); -static int write_word(flash_info_t *info, ulong dest, ulong data); -static void flash_get_offsets(ulong base, flash_info_t *info); - -/*----------------------------------------------------------------------- - */ - -unsigned long flash_init(void) -{ - unsigned long size_b0; - int i; - - /* Init: no FLASHes known */ - for (i = 0; i < CONFIG_SYS_MAX_FLASH_BANKS; ++i) - flash_info[i].flash_id = FLASH_UNKNOWN; - - /* Detect size */ - size_b0 = flash_get_size((vu_long *)CONFIG_SYS_FLASH_BASE, - &flash_info[0]); - - /* Setup offsets */ - flash_get_offsets(CONFIG_SYS_FLASH_BASE, &flash_info[0]); - -#if CONFIG_SYS_MONITOR_BASE >= CONFIG_SYS_FLASH_BASE - /* Monitor protection ON by default */ - flash_protect(FLAG_PROTECT_SET, - CONFIG_SYS_MONITOR_BASE, - CONFIG_SYS_MONITOR_BASE+monitor_flash_len-1, - &flash_info[0]); -#endif - - flash_info[0].size = size_b0; - - return size_b0; -} - -/*----------------------------------------------------------------------- - * Fix this to support variable sector sizes -*/ -static void flash_get_offsets(ulong base, flash_info_t *info) -{ - int i; - - /* set up sector start address table */ - if ((info->flash_id & FLASH_TYPEMASK) == FLASH_AM040) { - /* set sector offsets for bottom boot block type */ - for (i = 0; i < info->sector_count; i++) - info->start[i] = base + (i * 0x00010000); - } -} - -/*----------------------------------------------------------------------- - */ -void flash_print_info(flash_info_t *info) -{ - int i; - - if (info->flash_id == FLASH_UNKNOWN) { - puts("missing or unknown FLASH type\n"); - return; - } - - switch (info->flash_id & FLASH_VENDMASK) { - case FLASH_MAN_AMD: - printf("AMD "); - break; - case FLASH_MAN_FUJ: - printf("FUJITSU "); - break; - case FLASH_MAN_BM: - printf("BRIGHT MICRO "); - break; - default: - printf("Unknown Vendor "); - break; - } - - switch (info->flash_id & FLASH_TYPEMASK) { - case FLASH_AM040: - printf("29F040 or 29LV040 (4 Mbit, uniform sectors)\n"); - break; - case FLASH_AM400B: - printf("AM29LV400B (4 Mbit, bottom boot sect)\n"); - break; - case FLASH_AM400T: - printf("AM29LV400T (4 Mbit, top boot sector)\n"); - break; - case FLASH_AM800B: - printf("AM29LV800B (8 Mbit, bottom boot sect)\n"); - break; - case FLASH_AM800T: - printf("AM29LV800T (8 Mbit, top boot sector)\n"); - break; - case FLASH_AM160B: - printf("AM29LV160B (16 Mbit, bottom boot sect)\n"); - break; - case FLASH_AM160T: - printf("AM29LV160T (16 Mbit, top boot sector)\n"); - break; - case FLASH_AM320B: - printf("AM29LV320B (32 Mbit, bottom boot sect)\n"); - break; - case FLASH_AM320T: - printf("AM29LV320T (32 Mbit, top boot sector)\n"); - break; - default: - printf("Unknown Chip Type\n"); - break; - } - - if (info->size >> 20) { - printf(" Size: %ld MB in %d Sectors\n", - info->size >> 20, - info->sector_count); - } else { - printf(" Size: %ld KB in %d Sectors\n", - info->size >> 10, - info->sector_count); - } - - puts(" Sector Start Addresses:"); - - for (i = 0; i < info->sector_count; ++i) { - if ((i % 5) == 0) - puts("\n "); - - printf(" %08lX%s", - info->start[i], - info->protect[i] ? " (RO)" : " "); - } - - putc('\n'); - return; -} -/*----------------------------------------------------------------------- - */ - -/* - * The following code cannot be run from FLASH! - */ - -static ulong flash_get_size(vu_long *addr, flash_info_t *info) -{ - short i; - volatile unsigned char *caddr; - char value; - - caddr = (volatile unsigned char *)addr ; - - /* Write auto select command: read Manufacturer ID */ - - debug("Base address is: %8p\n", caddr); - - caddr[0x0555] = 0xAA; - caddr[0x02AA] = 0x55; - caddr[0x0555] = 0x90; - - value = caddr[0]; - - debug("Manufact ID: %02x\n", value); - - switch (value) { - case 0x1: /* AMD_MANUFACT */ - info->flash_id = FLASH_MAN_AMD; - break; - case 0x4: /* FUJ_MANUFACT */ - info->flash_id = FLASH_MAN_FUJ; - break; - default: - info->flash_id = FLASH_UNKNOWN; - info->sector_count = 0; - info->size = 0; - break; - } - - value = caddr[1]; /* device ID */ - - debug("Device ID: %02x\n", value); - - switch (value) { - case AMD_ID_LV040B: - info->flash_id += FLASH_AM040; - info->sector_count = 8; - info->size = 0x00080000; - break; /* => 512Kb */ - - default: - info->flash_id = FLASH_UNKNOWN; - return 0; /* => no or unknown flash */ - } - - flash_get_offsets((ulong)addr, &flash_info[0]); - - /* check for protected sectors */ - for (i = 0; i < info->sector_count; i++) { - /* - * read sector protection at sector address, - * (A7 .. A0) = 0x02 - * D0 = 1 if protected - */ - caddr = (volatile unsigned char *)(info->start[i]); - info->protect[i] = caddr[2] & 1; - } - - /* - * Prevent writes to uninitialized FLASH. - */ - if (info->flash_id != FLASH_UNKNOWN) { - caddr = (volatile unsigned char *)info->start[0]; - *caddr = 0xF0; /* reset bank */ - } - - return info->size; -} - -int flash_erase(flash_info_t *info, int s_first, int s_last) -{ - volatile unsigned char *addr = - (volatile unsigned char *)(info->start[0]); - int flag, prot, sect, l_sect; - ulong start, now, last; - - if ((s_first < 0) || (s_first > s_last)) { - if (info->flash_id == FLASH_UNKNOWN) - printf("- missing\n"); - else - printf("- no sectors to erase\n"); - - return 1; - } - - if ((info->flash_id == FLASH_UNKNOWN) || - (info->flash_id > FLASH_AMD_COMP)) { - printf("Can't erase unknown flash type - aborted\n"); - return 1; - } - - prot = 0; - for (sect = s_first; sect <= s_last; ++sect) { - if (info->protect[sect]) - prot++; - } - - if (prot) { - printf("- Warning: %d protected sectors will not be erased!\n", - prot); - } else { - printf("\n"); - } - - l_sect = -1; - - /* Disable interrupts which might cause a timeout here */ - flag = disable_interrupts(); - - addr[0x0555] = 0xAA; - addr[0x02AA] = 0x55; - addr[0x0555] = 0x80; - addr[0x0555] = 0xAA; - addr[0x02AA] = 0x55; - - /* Start erase on unprotected sectors */ - for (sect = s_first; sect <= s_last; sect++) { - if (info->protect[sect] == 0) { /* not protected */ - addr = (volatile unsigned char *)(info->start[sect]); - addr[0] = 0x30; - l_sect = sect; - } - } - - /* re-enable interrupts if necessary */ - if (flag) - enable_interrupts(); - - /* wait at least 80us - let's wait 1 ms */ - udelay(1000); - - /* - * We wait for the last triggered sector - */ - if (l_sect < 0) - goto DONE; - - start = get_timer(0); - last = start; - addr = (volatile unsigned char *)(info->start[l_sect]); - - while ((addr[0] & 0xFF) != 0xFF) { - - now = get_timer(start); - - if (now > CONFIG_SYS_FLASH_ERASE_TOUT) { - printf("Timeout\n"); - return 1; - } - /* show that we're waiting */ - if ((now - last) > 1000) { /* every second */ - putc('.'); - last = now; - } - } - -DONE: - /* reset to read mode */ - addr = (volatile unsigned char *)info->start[0]; - - addr[0] = 0xF0; /* reset bank */ - - printf(" done\n"); - return 0; -} - -/*----------------------------------------------------------------------- - * Copy memory to flash, returns: - * 0 - OK - * 1 - write timeout - * 2 - Flash not erased - */ - -int write_buff(flash_info_t *info, uchar *src, ulong addr, ulong cnt) -{ - ulong cp, wp, data; - int i, l, rc; - - wp = (addr & ~3); /* get lower word aligned address */ - - /* - * handle unaligned start bytes - */ - l = addr - wp; - - if (l != 0) { - data = 0; - for (i = 0, cp = wp; i < l; ++i, ++cp) - data = (data << 8) | (*(uchar *)cp); - - for (; i < 4 && cnt > 0; ++i) { - data = (data << 8) | *src++; - --cnt; - ++cp; - } - for (; cnt == 0 && i < 4; ++i, ++cp) - data = (data << 8) | (*(uchar *)cp); - - rc = write_word(info, wp, data); - - if (rc != 0) - return rc; - - wp += 4; - } - - /* - * handle word aligned part - */ - while (cnt >= 4) { - data = 0; - for (i = 0; i < 4; ++i) - data = (data << 8) | *src++; - - rc = write_word(info, wp, data); - - if (rc != 0) - return rc; - - wp += 4; - cnt -= 4; - } - - if (cnt == 0) - return 0; - - /* - * handle unaligned tail bytes - */ - data = 0; - for (i = 0, cp = wp; i < 4 && cnt > 0; ++i, ++cp) { - data = (data << 8) | *src++; - --cnt; - } - for (; i < 4; ++i, ++cp) - data = (data << 8) | (*(uchar *)cp); - - return write_word(info, wp, data); -} - -/*----------------------------------------------------------------------- - * Write a word to Flash, returns: - * 0 - OK - * 1 - write timeout - * 2 - Flash not erased - */ -static int write_word(flash_info_t *info, ulong dest, ulong data) -{ - volatile unsigned char *cdest, *cdata; - volatile unsigned char *addr = - (volatile unsigned char *)(info->start[0]); - ulong start; - int flag, count = 4 ; - - cdest = (volatile unsigned char *)dest ; - cdata = (volatile unsigned char *)&data ; - - /* Check if Flash is (sufficiently) erased */ - if ((*((vu_long *)dest) & data) != data) - return 2; - - while (count--) { - - /* Disable interrupts which might cause a timeout here */ - flag = disable_interrupts(); - - addr[0x0555] = 0xAA; - addr[0x02AA] = 0x55; - addr[0x0555] = 0xA0; - - *cdest = *cdata; - - /* re-enable interrupts if necessary */ - if (flag) - enable_interrupts(); - - /* data polling for D7 */ - start = get_timer(0); - while ((*cdest ^ *cdata) & 0x80) { - if (get_timer(start) > CONFIG_SYS_FLASH_WRITE_TOUT) - return 1; - } - - cdata++ ; - cdest++ ; - } - return 0; -} diff --git a/board/genietv/genietv.c b/board/genietv/genietv.c deleted file mode 100644 index 0a015ea2ded..00000000000 --- a/board/genietv/genietv.c +++ /dev/null @@ -1,360 +0,0 @@ -/* - * genietv/genietv.c - * - * The GENIETV is using the following physical memorymap (copied from - * the FADS configuration): - * - * ff020000 -> ff02ffff : pcmcia - * ff010000 -> ff01ffff : BCSR connected to CS1, setup by 8xxROM - * ff000000 -> ff00ffff : IMAP internal in the cpu - * 02800000 -> 0287ffff : flash connected to CS0 - * 00000000 -> nnnnnnnn : sdram setup by U-Boot - * - * CS pins are connected as follows: - * - * CS0 -512Kb boot flash - * CS1 - SDRAM #1 - * CS2 - SDRAM #2 - * CS3 - Flash #1 - * CS4 - Flash #2 - * CS5 - LON (if present) - * CS6 - PCMCIA #1 - * CS7 - PCMCIA #2 - * - * Ports are configured as follows: - * - * PA7 - SDRAM banks enable - */ - -#include -#include - -#define CONFIG_SYS_PA7 0x0100 - -/* ------------------------------------------------------------------------- */ - -static long int dram_size (long int, long int *, long int); - -/* ------------------------------------------------------------------------- */ - -#define _NOT_USED_ 0xFFFFFFFF - -const uint sdram_table[] = { - /* - * Single Read. (Offset 0 in UPMB RAM) - */ - 0x1F0DFC04, 0xEEAFBC04, 0x11AF7C04, 0xEFBEEC00, - 0x1FFDDC47, /* last */ - /* - * SDRAM Initialization (offset 5 in UPMB RAM) - * - * This is no UPM entry point. The following definition uses - * the remaining space to establish an initialization - * sequence, which is executed by a RUN command. - * - */ - 0x1FFDDC34, 0xEFEEAC34, 0x1FBD5C35, /* last */ - /* - * Burst Read. (Offset 8 in UPMB RAM) - */ - 0x1F0DFC04, 0xEEAFBC04, 0x10AF7C04, 0xF0AFFC00, - 0xF0AFFC00, 0xF1AFFC00, 0xEFBEEC00, 0x1FFDDC47, /* last */ - _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_, - _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_, - /* - * Single Write. (Offset 18 in UPMB RAM) - */ - 0x1F2DFC04, 0xEEAFAC00, 0x01BE4C04, 0x1FFDDC47, /* last */ - _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_, - /* - * Burst Write. (Offset 20 in UPMB RAM) - */ - 0x1F0DFC04, 0xEEAFAC00, 0x10AF5C00, 0xF0AFFC00, - 0xF0AFFC00, 0xE1BEEC04, 0x1FFDDC47, /* last */ - _NOT_USED_, - _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_, - _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_, - /* - * Refresh (Offset 30 in UPMB RAM) - */ - 0x1FFD7C84, 0xFFFFFC04, 0xFFFFFC04, 0xFFFFFC04, - 0xFFFFFC84, 0xFFFFFC07, /* last */ - _NOT_USED_, _NOT_USED_, - _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_, - /* - * Exception. (Offset 3c in UPMB RAM) - */ - 0x7FFFFC07, /* last */ - _NOT_USED_, _NOT_USED_, _NOT_USED_, -}; - -/* ------------------------------------------------------------------------- */ - - -/* - * Check Board Identity - */ - -int checkboard (void) -{ - puts ("Board: GenieTV\n"); - return 0; -} - -#if 0 -static void PrintState (void) -{ - volatile immap_t *im = (immap_t *) CONFIG_SYS_IMMR; - volatile memctl8xx_t *memctl = &im->im_memctl; - - printf ("\n0 - FLASH: B=%08x O=%08x", memctl->memc_br0, - memctl->memc_or0); - printf ("\n1 - SDRAM: B=%08x O=%08x", memctl->memc_br1, - memctl->memc_or1); - printf ("\n2 - SDRAM: B=%08x O=%08x", memctl->memc_br2, - memctl->memc_or2); -} -#endif - -/* ------------------------------------------------------------------------- */ - -phys_size_t initdram (int board_type) -{ - volatile immap_t *im = (immap_t *) CONFIG_SYS_IMMR; - volatile memctl8xx_t *memctl = &im->im_memctl; - long int size_b0, size_b1, size8; - - /* Enable SDRAM */ - - /* Configuring PA7 for general purpouse output pin */ - im->im_ioport.iop_papar &= ~CONFIG_SYS_PA7; /* 0 = general purpouse */ - im->im_ioport.iop_padir |= CONFIG_SYS_PA7; /* 1 = output */ - - /* Enable SDRAM - PA7 = 1 */ - im->im_ioport.iop_padat |= CONFIG_SYS_PA7; /* value of PA7 */ - - /* - * Preliminary prescaler for refresh (depends on number of - * banks): This value is selected for four cycles every 62.4 us - * with two SDRAM banks or four cycles every 31.2 us with one - * bank. It will be adjusted after memory sizing. - */ - memctl->memc_mptpr = CONFIG_SYS_MPTPR_2BK_4K; - - memctl->memc_mbmr = CONFIG_SYS_MBMR_8COL; - - upmconfig (UPMB, (uint *) sdram_table, - sizeof (sdram_table) / sizeof (uint)); - - /* - * Map controller banks 1 and 2 to the SDRAM banks 1 and 2 at - * preliminary addresses - these have to be modified after the - * SDRAM size has been determined. - */ - - memctl->memc_or1 = 0xF0000000 | CONFIG_SYS_OR_TIMING_SDRAM; - memctl->memc_br1 = - ((SDRAM_BASE1_PRELIM & BR_BA_MSK) | BR_MS_UPMB | BR_V); - - memctl->memc_or2 = 0xF0000000 | CONFIG_SYS_OR_TIMING_SDRAM; - memctl->memc_br2 = - ((SDRAM_BASE2_PRELIM & BR_BA_MSK) | BR_MS_UPMB | BR_V); - - /* perform SDRAM initialization sequence */ - memctl->memc_mar = 0x00000088; - - memctl->memc_mcr = 0x80802105; /* SDRAM bank 0 */ - - memctl->memc_mcr = 0x80804105; /* SDRAM bank 1 */ - - /* Execute refresh 8 times */ - memctl->memc_mbmr = (CONFIG_SYS_MBMR_8COL & ~MBMR_TLFB_MSK) | MBMR_TLFB_8X; - - memctl->memc_mcr = 0x80802130; /* SDRAM bank 0 - execute twice */ - - memctl->memc_mcr = 0x80804130; /* SDRAM bank 1 - execute twice */ - - /* Execute refresh 4 times */ - memctl->memc_mbmr = CONFIG_SYS_MBMR_8COL; - - /* - * Check Bank 0 Memory Size for re-configuration - * - * try 8 column mode - */ - -#if 0 - PrintState (); -#endif -/* printf ("\nChecking bank1..."); */ - size8 = dram_size (CONFIG_SYS_MBMR_8COL, (long *) SDRAM_BASE1_PRELIM, - SDRAM_MAX_SIZE); - - size_b0 = size8; - -/* printf ("\nChecking bank2..."); */ - size_b1 = - dram_size (memctl->memc_mbmr, (long *) SDRAM_BASE2_PRELIM, - SDRAM_MAX_SIZE); - - /* - * Final mapping: map bigger bank first - */ - - memctl->memc_or1 = ((-size_b0) & 0xFFFF0000) | CONFIG_SYS_OR_TIMING_SDRAM; - memctl->memc_br1 = (CONFIG_SYS_SDRAM_BASE & BR_BA_MSK) | BR_MS_UPMB | BR_V; - - if (size_b1 > 0) { - /* - * Position Bank 1 immediately above Bank 0 - */ - memctl->memc_or2 = - ((-size_b1) & 0xFFFF0000) | CONFIG_SYS_OR_TIMING_SDRAM; - memctl->memc_br2 = - ((CONFIG_SYS_SDRAM_BASE & BR_BA_MSK) | BR_MS_UPMB | BR_V) + - (size_b0 & BR_BA_MSK); - } else { - /* - * No bank 1 - * - * invalidate bank - */ - memctl->memc_br2 = 0; - /* adjust refresh rate depending on SDRAM type, one bank */ - memctl->memc_mptpr = CONFIG_SYS_MPTPR_1BK_4K; - } - - /* If no memory detected, disable SDRAM */ - if ((size_b0 + size_b1) == 0) { - printf ("disabling SDRAM!\n"); - /* Disable SDRAM - PA7 = 1 */ - im->im_ioport.iop_padat &= ~CONFIG_SYS_PA7; /* value of PA7 */ - } -/* else */ -/* printf("done! (%08lx)\n", size_b0 + size_b1); */ - -#if 0 - PrintState (); -#endif - return (size_b0 + size_b1); -} - -/* ------------------------------------------------------------------------- */ - -/* - * Check memory range for valid RAM. A simple memory test determines - * the actually available RAM size between addresses `base' and - * `base + maxsize'. Some (not all) hardware errors are detected: - * - short between address lines - * - short between data lines - */ - -static long int dram_size (long int mbmr_value, long int *base, - long int maxsize) -{ - long size; - - /*memctl->memc_mbmr = mbmr_value; */ - - size = get_ram_size (base, maxsize); - - if (size) { -/* printf("(%08lx)", size); */ - } else { - printf ("(0)"); - } - - return (size); -} - -#if defined(CONFIG_CMD_PCMCIA) - -#ifdef CONFIG_SYS_PCMCIA_MEM_ADDR -volatile unsigned char *pcmcia_mem = (unsigned char *) CONFIG_SYS_PCMCIA_MEM_ADDR; -#endif - -int pcmcia_init (void) -{ - volatile pcmconf8xx_t *pcmp; - uint v, slota, slotb; - - /* - ** Enable the PCMCIA for a Flash card. - */ - pcmp = (pcmconf8xx_t *) (&(((immap_t *) CONFIG_SYS_IMMR)->im_pcmcia)); - -#if 0 - pcmp->pcmc_pbr0 = CONFIG_SYS_PCMCIA_MEM_ADDR; - pcmp->pcmc_por0 = 0xc00ff05d; -#endif - - /* Set all slots to zero by default. */ - pcmp->pcmc_pgcra = 0; - pcmp->pcmc_pgcrb = 0; -#ifdef PCMCIA_SLOT_A - pcmp->pcmc_pgcra = 0x40; -#endif -#ifdef PCMCIA_SLOT_B - pcmp->pcmc_pgcrb = 0x40; -#endif - - /* Check if any PCMCIA card is luged in. */ - slota = (pcmp->pcmc_pipr & 0x18000000) == 0; - slotb = (pcmp->pcmc_pipr & 0x00001800) == 0; - - if (!(slota || slotb)) { - printf ("No card present\n"); -#ifdef PCMCIA_SLOT_A - pcmp->pcmc_pgcra = 0; -#endif -#ifdef PCMCIA_SLOT_B - pcmp->pcmc_pgcrb = 0; -#endif - return -1; - } else - printf ("Unknown card ("); - - v = 0; - - switch ((pcmp->pcmc_pipr >> 14) & 3) { - case 0x00: - printf ("5V"); - v = 5; - break; - case 0x01: - printf ("5V and 3V"); - v = 3; - break; - case 0x03: - printf ("5V, 3V and x.xV"); - v = 3; - break; - } - - switch (v) { - case 3: - printf ("; using 3V"); - /* Enable 3 volt Vcc. */ - - break; - - default: - printf ("; unknown voltage"); - return -1; - } - printf (")\n"); - /* disable pcmcia reset after a while */ - - udelay (20); - - pcmp->pcmc_pgcrb = 0; - - /* If you using a real hd you should give a short - * spin-up time. */ -#ifdef CONFIG_DISK_SPINUP_TIME - udelay (CONFIG_DISK_SPINUP_TIME); -#endif - - return 0; -} -#endif diff --git a/board/genietv/u-boot.lds b/board/genietv/u-boot.lds deleted file mode 100644 index 70ab702fd97..00000000000 --- a/board/genietv/u-boot.lds +++ /dev/null @@ -1,101 +0,0 @@ -/* - * (C) Copyright 2000-2010 - * Wolfgang Denk, DENX Software Engineering, wd@denx.de. - * - * SPDX-License-Identifier: GPL-2.0+ - */ - -OUTPUT_ARCH(powerpc) - -SECTIONS -{ - /* Read-only sections, merged into text segment: */ - . = + SIZEOF_HEADERS; - .text : - { - /* WARNING - the following is hand-optimized to fit within */ - /* the sector layout of our flash chips! XXX FIXME XXX */ - - arch/powerpc/cpu/mpc8xx/start.o (.text*) - arch/powerpc/cpu/mpc8xx/traps.o (.text*) - lib/built-in.o (.text*) - net/built-in.o (.text*) - arch/powerpc/cpu/mpc8xx/built-in.o (.text*) - board/genietv/built-in.o (.text*) - arch/powerpc/lib/built-in.o (.text*) - *(.text.do_load_serial*) - *(.text.do_mem_*) - *(.text.do_bootm*) - - . = env_offset; - common/env_embedded.o (.text*) - - *(.text*) - } - _etext = .; - PROVIDE (etext = .); - .rodata : - { - *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) - } - - /* Read-write section, merged into data segment: */ - . = (. + 0x0FFF) & 0xFFFFF000; - _erotext = .; - PROVIDE (erotext = .); - .reloc : - { - _GOT2_TABLE_ = .; - KEEP(*(.got2)) - KEEP(*(.got)) - PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4); - _FIXUP_TABLE_ = .; - KEEP(*(.fixup)) - } - __got2_entries = ((_GLOBAL_OFFSET_TABLE_ - _GOT2_TABLE_) >> 2) - 1; - __fixup_entries = (. - _FIXUP_TABLE_)>>2; - - .data : - { - *(.data*) - *(.sdata*) - } - _edata = .; - PROVIDE (edata = .); - - . = .; - - . = ALIGN(4); - .u_boot_list : { - KEEP(*(SORT(.u_boot_list*))); - } - - - . = .; - __start___ex_table = .; - __ex_table : { *(__ex_table) } - __stop___ex_table = .; - - . = ALIGN(4096); - __init_begin = .; - .text.init : { *(.text.init) } - .data.init : { *(.data.init) } - . = ALIGN(4096); - __init_end = .; - - __bss_start = .; - .bss (NOLOAD) : - { - *(.bss*) - *(.sbss*) - *(COMMON) - } - . = ALIGN(256 * 1024); - .ppcenv : - { - common/env_embedded.o (.ppcenv) - } - . = ALIGN(4); - __bss_end = . ; - PROVIDE (end = .); -} diff --git a/board/genietv/u-boot.lds.debug b/board/genietv/u-boot.lds.debug deleted file mode 100644 index cc8cd3a6317..00000000000 --- a/board/genietv/u-boot.lds.debug +++ /dev/null @@ -1,127 +0,0 @@ -/* - * (C) Copyright 2000 - * Wolfgang Denk, DENX Software Engineering, wd@denx.de. - * - * SPDX-License-Identifier: GPL-2.0+ - */ - -OUTPUT_ARCH(powerpc) -/* Do we need any of these for elf? - __DYNAMIC = 0; */ -SECTIONS -{ - /* 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 */ - - arch/powerpc/cpu/mpc8xx/start.o (.text) - common/dlmalloc.o (.text) - arch/powerpc/lib/ppcstring.o (.text) - lib/vsprintf.o (.text) - lib/crc32.o (.text) - lib/zlib.o (.text) - - . = env_offset; - common/env_embedded.o(.text) - *(.text) - *(.got1) - } - _etext = .; - PROVIDE (etext = .); - .rodata : - { - *(.rodata) - *(.rodata1) - *(.rodata.str1.4) - *(.eh_frame) - } - .fini : { *(.fini) } =0 - .ctors : { *(.ctors) } - .dtors : { *(.dtors) } - - /* Read-write section, merged into data segment: */ - . = (. + 0x0FFF) & 0xFFFFF000; - _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 = .); - - - . = ALIGN(4); - .u_boot_list : { - KEEP(*(SORT(.u_boot_list*))); - } - - - __start___ex_table = .; - __ex_table : { *(__ex_table) } - __stop___ex_table = .; - - . = ALIGN(4096); - __init_begin = .; - .text.init : { *(.text.init) } - .data.init : { *(.data.init) } - . = ALIGN(4096); - __init_end = .; - - __bss_start = .; - .bss : - { - *(.sbss) *(.scommon) - *(.dynbss) - *(.bss) - *(COMMON) - } - . = ALIGN(256 * 1024); - .ppcenv : - { - common/env_embedded.o (.ppcenv) - } - __bss_end = . ; - PROVIDE (end = .); -} diff --git a/boards.cfg b/boards.cfg index 384f319382a..e411a7b90c3 100644 --- a/boards.cfg +++ b/boards.cfg @@ -1252,4 +1252,3 @@ Orphan powerpc mpc8xx - - fads Orphan powerpc mpc8xx - - fads FADS823 - - Orphan powerpc mpc8xx - - fads FADS850SAR - - Orphan powerpc mpc8xx - - fads FADS860T - - -Orphan powerpc mpc8xx - - genietv GENIETV - - diff --git a/doc/README.console b/doc/README.console index e7970ed3796..aadf596a8a8 100644 --- a/doc/README.console +++ b/doc/README.console @@ -99,4 +99,3 @@ The driver has been tested with the following configurations (see CREDITS for other contact informations): - MPC823FADS with AD7176 on a PAL TV (YCbYCr) - arsenio@tin.it -- GENIETV with AD7177 on a PAL TV (YCbYCr) - arsenio@tin.it diff --git a/doc/README.scrapyard b/doc/README.scrapyard index 4e0ad323c7b..b068544c3ba 100644 --- a/doc/README.scrapyard +++ b/doc/README.scrapyard @@ -11,6 +11,7 @@ easily if here is something they might want to dig for... Board Arch CPU Commit Removed Last known maintainer/contact ================================================================================================= +genietv powerpc mpc8xx - 2014-04-04 mbx8xx powerpc mpc8xx - 2014-04-04 nx823 powerpc mpc8xx - 2014-04-04 idmr m68k mcf52x2 ba650e9b 2014-01-28 diff --git a/doc/README.video b/doc/README.video index f09d5f9f6bf..dadbfcd2fdc 100644 --- a/doc/README.video +++ b/doc/README.video @@ -11,8 +11,6 @@ U-Boot MPC8xx video controller driver The driver has been tested with the following configurations: - MPC823FADS with AD7176 on a PAL TV (YCbYCr) - arsenio@tin.it -- GENIETV with AD7177 on a PAL TV (YCbYCr) - arsenio@tin.it - "video-mode" environment variable =============================== diff --git a/include/commproc.h b/include/commproc.h index 62468c30aad..e3bc6d65d3b 100644 --- a/include/commproc.h +++ b/include/commproc.h @@ -704,32 +704,6 @@ typedef struct scc_enet { #define PD_MII_MASK ((ushort)0x1FFF) /* PD 3-15 */ #endif /* CONFIG_GEN860T */ -/*** GENIETV ********************************************************/ - -#if defined(CONFIG_GENIETV) -/* Ethernet is only on SCC2 */ - -#define CONFIG_SCC2_ENET -#define PROFF_ENET PROFF_SCC2 -#define CPM_CR_ENET CPM_CR_CH_SCC2 -#define SCC_ENET 1 -#define CPMVEC_ENET CPMVEC_SCC2 - -#define PA_ENET_RXD ((ushort)0x0004) /* PA 13 */ -#define PA_ENET_TXD ((ushort)0x0008) /* PA 12 */ -#define PA_ENET_TCLK ((ushort)0x0400) /* PA 5 */ -#define PA_ENET_RCLK ((ushort)0x0200) /* PA 6 */ - -#define PB_ENET_TENA ((uint)0x00002000) /* PB 18 */ - -#define PC_ENET_CLSN ((ushort)0x0040) /* PC 9 */ -#define PC_ENET_RENA ((ushort)0x0080) /* PC 8 */ - -#define SICR_ENET_MASK ((uint)0x0000ff00) -#define SICR_ENET_CLKRT ((uint)0x00002e00) - -#endif /* CONFIG_GENIETV */ - /*** HERMES-PRO ******************************************************/ /* The HERMES-PRO uses the FEC on a MPC860T for Ethernet */ diff --git a/include/configs/GENIETV.h b/include/configs/GENIETV.h deleted file mode 100644 index 6a34b12bc67..00000000000 --- a/include/configs/GENIETV.h +++ /dev/null @@ -1,354 +0,0 @@ - /* - * A collection of structures, addresses, and values associated with - * the Motorola 860T FADS board. Copied from the MBX stuff. - * Magnus Damm added defines for 8xxrom and extended bd_info. - * Helmut Buchsbaum added bitvalues for BCSRx - * - * Copyright (c) 1998 Dan Malek (dmalek@jlc.net) - */ - -/* - * The GENIETV is using the following physical memorymap (copied from - * the FADS configuration): - * - * ff020000 -> ff02ffff : pcmcia - * ff010000 -> ff01ffff : BCSR connected to CS1, setup by 8xxROM - * ff000000 -> ff00ffff : IMAP internal in the cpu - * 30000000 -> 300fffff : flash connected to CS0 - * 00000000 -> nnnnnnnn : sdram setup by U-Boot - * - * CS pins are connected as follows: - * - * CS0 -512Kb boot flash - * CS1 - SDRAM #1 - * CS2 - SDRAM #2 - * CS3 - Flash #1 - * CS4 - Flash #2 - * CS5 - Lon (if present) - * CS6 - PCMCIA #1 - * CS7 - PCMCIA #2 - */ - -/* ------------------------------------------------------------------------- */ - -/* - * board/config.h - configuration options, board specific - */ - -#ifndef __CONFIG_H -#define __CONFIG_H - -#define CONFIG_SYS_TEXT_BASE 0x00000000 - -#define CONFIG_ETHADDR 08:00:22:50:70:63 /* Ethernet address */ -#define CONFIG_ENV_OVERWRITE 1 /* Overwrite the environment */ - -#define CONFIG_SYS_ALLOC_DPRAM /* Use dynamic DPRAM allocation */ - -#define CONFIG_SYS_AUTOLOAD "n" /* No autoload */ - -/*#define CONFIG_VIDEO 1 / To enable the video initialization */ -/*#define CONFIG_VIDEO_ADDR 0x00200000 */ -/*#define CONFIG_HARD_I2C 1 / I2C with hardware support */ -/*#define CONFIG_PCMCIA 1 / To enable the PCMCIA initialization */ - -/*#define CONFIG_SYS_PCMCIA_IO_ADDR 0xff020000 */ -/*#define CONFIG_SYS_PCMCIA_IO_SIZE 0x10000 */ -/*#define CONFIG_SYS_PCMCIA_MEM_ADDR 0xe0000000 */ -/*#define CONFIG_SYS_PCMCIA_MEM_SIZE 0x10000 */ - -/* Video related */ - -/*#define CONFIG_VIDEO_LOGO 1 / Show the logo */ -/*#define CONFIG_VIDEO_ENCODER_AD7177 1 / Enable this encoder */ -/*#define CONFIG_VIDEO_ENCODER_AD7177_ADDR 0xF4 / ALSB to ground */ - -/* Wireless 56Khz 4PPM keyboard on SMCx */ - -/*#define CONFIG_KEYBOARD 0 */ -/*#define CONFIG_WL_4PPM_KEYBOARD_SMC 0 / SMC to use (0 indexed) */ - -/* - * High Level Configuration Options - * (easy to change) - */ -#include - -#define CONFIG_GENIETV 1 -#define CONFIG_MPC823 1 - -#define CONFIG_8xx_CONS_SMC1 1 /* Console is on SMC1 */ -#undef CONFIG_8xx_CONS_SMC2 -#undef CONFIG_8xx_CONS_NONE -#define CONFIG_BAUDRATE 9600 - -#define MPC8XX_FACT 12 /* Multiply by 12 */ -#define MPC8XX_XIN 5000000 /* 4 MHz clock */ - -#define MPC8XX_HZ ((MPC8XX_XIN) * (MPC8XX_FACT)) -#define CONFIG_SYS_PLPRCR_MF ((MPC8XX_FACT-1) << 20) -#define CONFIG_8xx_GCLK_FREQ MPC8XX_HZ /* Force it - dont measure it */ - -#define CONFIG_CLOCKS_IN_MHZ 1 /* clocks passsed to Linux in MHz */ - -#if 1 -#define CONFIG_BOOTDELAY 1 /* autoboot after 2 seconds */ -#define CONFIG_LOADS_ECHO 0 /* Dont echoes received characters */ -#define CONFIG_BOOTARGS "" -#define CONFIG_BOOTCOMMAND \ -"bootp; tftp; " \ -"setenv bootargs console=tty0 console=ttyS0 " \ -"root=/dev/nfs nfsroot=${serverip}:${rootpath} " \ -"ip=${ipaddr}:${serverip}:${gatewayip}:${subnetmask}:${hostname}:eth0:off ;" \ -"bootm " -#else -#define CONFIG_BOOTDELAY 0 /* autoboot disabled */ -#endif - -#undef CONFIG_WATCHDOG /* watchdog disabled */ - - -/* - * BOOTP options - */ -#define CONFIG_BOOTP_BOOTFILESIZE -#define CONFIG_BOOTP_BOOTPATH -#define CONFIG_BOOTP_GATEWAY -#define CONFIG_BOOTP_HOSTNAME - - -/* - * Command line configuration. - */ -#include - - -/* - * Miscellaneous configurable options - */ -#define CONFIG_SYS_LONGHELP /* undef to save memory */ -#define CONFIG_SYS_PROMPT ":>" /* Monitor Command Prompt */ -#if defined(CONFIG_CMD_KGDB) -#define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */ -#else -#define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */ -#endif -#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */ -#define CONFIG_SYS_MAXARGS 8 /* max number of command args */ -#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */ - -#define CONFIG_SYS_MEMTEST_START 0x00004000 /* memtest works on */ -#define CONFIG_SYS_MEMTEST_END 0x00800000 /* 0 ... 8 MB in DRAM */ - -#define CONFIG_SYS_LOAD_ADDR 0x00100000 /* default load address */ - -#define CONFIG_SYS_BAUDRATE_TABLE { 4800, 9600, 19200, 38400, 57600, 115200 } - -/* - * Low Level Configuration Settings - * (address mappings, register initial values, etc.) - * You should know what you are doing if you make changes here. - */ -/*----------------------------------------------------------------------- - * Internal Memory Mapped Register - */ -#define CONFIG_SYS_IMMR 0xFF000000 -#define CONFIG_SYS_IMMR_SIZE ((uint)(64 * 1024)) - -/*----------------------------------------------------------------------- - * Definitions for initial stack pointer and data area (in DPRAM) - */ -#define CONFIG_SYS_INIT_RAM_ADDR CONFIG_SYS_IMMR -#define CONFIG_SYS_INIT_RAM_SIZE 0x2F00 /* Size of used area in DPRAM */ -#define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) -#define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET - -/*----------------------------------------------------------------------- - * Start addresses for the final memory configuration - * (Set up by the startup code) - * Please note that CONFIG_SYS_SDRAM_BASE _must_ start at 0 - * Also NOTE that it doesn't mean SDRAM - it means MEMORY. - */ -#define CONFIG_SYS_SDRAM_BASE 0x00000000 -#define CONFIG_SYS_FLASH_BASE 0x02800000 -#define CONFIG_SYS_FLASH_SIZE ((uint)(8 * 1024 * 1024)) /* max 8Mbyte */ -#if 0 -#define CONFIG_SYS_MONITOR_LEN (256 << 10) /* Reserve 128 kB for Monitor */ -#else -#define CONFIG_SYS_MONITOR_LEN (512 << 10) /* Reserve 512 kB for Monitor */ -#endif -#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE -#define CONFIG_SYS_MALLOC_LEN (256 << 10) /* Reserve 128 kB for malloc() */ - -/* - * For booting Linux, the board info and command line data - * have to be in the first 8 MB of memory, since this is - * the maximum mapped by the Linux kernel during initialization. - */ -#define CONFIG_SYS_BOOTMAPSZ (8 << 20) /* Initial Memory map for Linux */ -/*----------------------------------------------------------------------- - * FLASH organization - */ -#define CONFIG_SYS_MAX_FLASH_BANKS 1 /* max number of memory banks */ -#define CONFIG_SYS_MAX_FLASH_SECT 8 /* max number of sectors on one chip */ - -#define CONFIG_SYS_FLASH_ERASE_TOUT 120000 /* Timeout for Flash Erase (in ms) */ -#define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Timeout for Flash Write (in ms) */ - -#define CONFIG_ENV_IS_IN_FLASH 1 -#define CONFIG_ENV_OFFSET 0x10000 /* Offset of Environment Sector */ -#define CONFIG_ENV_SIZE 0x10000 /* Total Size of Environment Sector (64k)*/ - -/* values according to the manual */ - -/*----------------------------------------------------------------------- - * Cache Configuration - */ -#define CONFIG_SYS_CACHELINE_SIZE 16 /* For all MPC8xx CPUs */ -#if defined(CONFIG_CMD_KGDB) -#define CONFIG_SYS_CACHELINE_SHIFT 4 /* log base 2 of the above value */ -#endif - -/*----------------------------------------------------------------------- - * SYPCR - System Protection Control 11-9 - * SYPCR can only be written once after reset! - *----------------------------------------------------------------------- - * Software & Bus Monitor Timer max, Bus Monitor enable, SW Watchdog freeze - */ -#if defined(CONFIG_WATCHDOG) -#define CONFIG_SYS_SYPCR (SYPCR_SWTC | SYPCR_BMT | SYPCR_BME | SYPCR_SWF | \ - SYPCR_SWE | SYPCR_SWRI| SYPCR_SWP) -#else -#define CONFIG_SYS_SYPCR (SYPCR_SWTC | SYPCR_BMT | SYPCR_BME | SYPCR_SWF | SYPCR_SWP) -#endif - -/*----------------------------------------------------------------------- - * SIUMCR - SIU Module Configuration 11-6 - *----------------------------------------------------------------------- - * PCMCIA config., multi-function pin tri-state - * -#define CONFIG_SYS_SIUMCR (SIUMCR_DBGC00 | SIUMCR_DBPC00 | SIUMCR_MLRC01) - */ -#define CONFIG_SYS_SIUMCR (SIUMCR_DBGC00 | SIUMCR_DBPC00 | SIUMCR_MLRC10) - -/*----------------------------------------------------------------------- - * TBSCR - Time Base Status and Control 11-26 - *----------------------------------------------------------------------- - * Clear Reference Interrupt Status, Timebase freezing enabled - */ -#define CONFIG_SYS_TBSCR (TBSCR_REFA | TBSCR_REFB | TBSCR_TBE) - -/*----------------------------------------------------------------------- - * PISCR - Periodic Interrupt Status and Control 11-31 - *----------------------------------------------------------------------- - * Clear Periodic Interrupt Status, Interrupt Timer freezing enabled - */ -#define CONFIG_SYS_PISCR (PISCR_PS | PISCR_PITF) - -/*----------------------------------------------------------------------- - * PLPRCR - PLL, Low-Power, and Reset Control Register 15-30 - *----------------------------------------------------------------------- - * Reset PLL lock status sticky bit, timer expired status bit and timer * - * interrupt status bit - leave PLL multiplication factor unchanged ! - * - * #define CONFIG_SYS_PLPRCR (PLPRCR_SPLSS | PLPRCR_TEXPS | PLPRCR_TMIST) - */ -#define CONFIG_SYS_PLPRCR (PLPRCR_SPLSS | PLPRCR_TEXPS | PLPRCR_TMIST | CONFIG_SYS_PLPRCR_MF) - -/*----------------------------------------------------------------------- - * SCCR - System Clock and reset Control Register 15-27 - *----------------------------------------------------------------------- - * Set clock output, timebase and RTC source and divider, - * power management and some other internal clocks - */ -#define SCCR_MASK SCCR_EBDF11 -#define CONFIG_SYS_SCCR (SCCR_TBS | \ - SCCR_COM00 | SCCR_DFSYNC00 | SCCR_DFBRG00 | \ - SCCR_DFNL000 | SCCR_DFNH000 | SCCR_DFLCD000 | \ - SCCR_DFALCD00) - -/*----------------------------------------------------------------------- - * - *----------------------------------------------------------------------- - * - */ -#define CONFIG_SYS_DER 0 - -/* Because of the way the 860 starts up and assigns CS0 the -* entire address space, we have to set the memory controller -* differently. Normally, you write the option register -* first, and then enable the chip select by writing the -* base register. For CS0, you must write the base register -* first, followed by the option register. -*/ - -/* - * Init Memory Controller: - * - * BR0 and OR0(FLASH) - */ - -#define FLASH_BASE0_PRELIM 0x02800000 /* FLASH bank #0 */ - -#define CONFIG_SYS_REMAP_OR_AM 0x80000000 /* OR addr mask */ -#define CONFIG_SYS_PRELIM_OR_AM 0xFF800000 /* OR addr mask (512Kb) */ - -/* FLASH timing */ -#define CONFIG_SYS_OR_TIMING_FLASH (OR_CSNT_SAM | OR_ACS_DIV2 | OR_BI | \ - OR_SCY_15_CLK | OR_TRLX ) - -/*#define CONFIG_SYS_OR0_REMAP (CONFIG_SYS_REMAP_OR_AM | CONFIG_SYS_OR_TIMING_FLASH) */ -#define CONFIG_SYS_OR0_PRELIM (CONFIG_SYS_PRELIM_OR_AM | CONFIG_SYS_OR_TIMING_FLASH) /* 0xfff80ff4 */ -#define CONFIG_SYS_BR0_PRELIM ((FLASH_BASE0_PRELIM & BR_BA_MSK) | BR_V | BR_PS_8) /* 0x02800401 */ - -/* - * BR1/2 and OR1/2 (SDRAM) -*/ - -#define CONFIG_SYS_OR_TIMING_SDRAM 0x00000A00 - -#define SDRAM_MAX_SIZE 0x04000000 /* 64Mb bank */ -#define SDRAM_BASE1_PRELIM 0x00000000 /* First bank */ -#define SDRAM_BASE2_PRELIM 0x10000000 /* Second bank */ - -/* - * Memory Periodic Timer Prescaler - */ - -/* periodic timer for refresh */ -#define CONFIG_SYS_MBMR_PTB 0x5d /* start with divider for 100 MHz */ - -/* refresh rate 15.6 us (= 64 ms / 4K = 62.4 / quad bursts) for <= 128 MBit */ -#define CONFIG_SYS_MPTPR_2BK_4K MPTPR_PTP_DIV16 /* setting for 2 banks */ -#define CONFIG_SYS_MPTPR_1BK_4K MPTPR_PTP_DIV32 -/* - * MBMR settings for SDRAM - */ - -/* 8 column SDRAM */ -#define CONFIG_SYS_MBMR_8COL ((CONFIG_SYS_MBMR_PTB << MAMR_PTA_SHIFT) | MAMR_PTAE | \ - MAMR_G0CLA_A11 | MAMR_RLFA_1X | MAMR_WLFA_1X \ - | MAMR_TLFA_4X) /* 0x5d802114 */ - -/* values according to the manual */ - -#define CONFIG_DRAM_50MHZ 1 -#define CONFIG_SDRAM_50MHZ - -/* We don't use the 8259. -*/ -#define NR_8259_INTS 0 - -/* - * MPC8xx CPM Options - */ -#define CONFIG_SCC_ENET 1 - -#define CONFIG_DISK_SPINUP_TIME 1000000 - -/* PCMCIA configuration */ - -#define PCMCIA_MAX_SLOTS 1 -#define PCMCIA_SLOT_B 1 - -#endif /* __CONFIG_H */ -- cgit v1.2.3 From aa6e1e45cfc16d9ea199d18c639cca2a388823a2 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Fri, 4 Apr 2014 15:25:05 +0900 Subject: powerpc: remove ADS860, FADS823, FADS850SAR, FADS860T support Enough time has passed since these boards were moved to Orphan. Remove. - Remove include/configs/{ADS860.h,FADS823.h,FADS850SAR.h,FADS860T.h} - Cleanup defined(CONFIG_ADS), defined(CONFIG_MPC823FADS), defined(CONFIG_MPC850SAR), defined(CONFIG_SYS_DAUGHTERBOARD) - Remove the entries from boards.cfg Signed-off-by: Masahiro Yamada --- arch/powerpc/cpu/mpc8xx/scc.c | 12 - arch/powerpc/cpu/mpc8xx/serial.c | 2 +- board/fads/fads.c | 65 ------ board/fads/fads.h | 5 - board/fads/lamp.c | 4 - board/fads/pcmcia.c | 13 -- boards.cfg | 4 - include/commproc.h | 88 -------- include/configs/ADS860.h | 60 ----- include/configs/FADS823.h | 472 --------------------------------------- include/configs/FADS850SAR.h | 415 ---------------------------------- include/configs/FADS860T.h | 58 ----- include/pcmcia.h | 2 - 13 files changed, 1 insertion(+), 1199 deletions(-) delete mode 100644 include/configs/ADS860.h delete mode 100644 include/configs/FADS823.h delete mode 100644 include/configs/FADS850SAR.h delete mode 100644 include/configs/FADS860T.h (limited to 'board') diff --git a/arch/powerpc/cpu/mpc8xx/scc.c b/arch/powerpc/cpu/mpc8xx/scc.c index 94c9969e3f1..647f05817bc 100644 --- a/arch/powerpc/cpu/mpc8xx/scc.c +++ b/arch/powerpc/cpu/mpc8xx/scc.c @@ -461,18 +461,6 @@ static int scc_init (struct eth_device *dev, bd_t * bis) #error Configuration Error: exactly ONE of PB_ENET_TENA, PC_ENET_TENA must be defined #endif -#if defined(CONFIG_ADS) && defined(CONFIG_MPC860) - /* - * Port C is used to control the PHY,MC68160. - */ - immr->im_ioport.iop_pcdir |= - (PC_ENET_ETHLOOP | PC_ENET_TPFLDL | PC_ENET_TPSQEL); - - immr->im_ioport.iop_pcdat |= PC_ENET_TPFLDL; - immr->im_ioport.iop_pcdat &= ~(PC_ENET_ETHLOOP | PC_ENET_TPSQEL); - *((uint *) BCSR1) &= ~BCSR1_ETHEN; -#endif /* MPC860ADS */ - #ifdef CONFIG_RPXCLASSIC *((uchar *) BCSR0) &= ~BCSR0_ETHLPBK; *((uchar *) BCSR0) |= (BCSR0_ETHEN | BCSR0_COLTEST | BCSR0_FULLDPLX); diff --git a/arch/powerpc/cpu/mpc8xx/serial.c b/arch/powerpc/cpu/mpc8xx/serial.c index cb48ed942f9..f7ca11e3945 100644 --- a/arch/powerpc/cpu/mpc8xx/serial.c +++ b/arch/powerpc/cpu/mpc8xx/serial.c @@ -173,7 +173,7 @@ static int smc_init (void) # endif #endif -#if defined(CONFIG_FADS) || defined(CONFIG_ADS) +#if defined(CONFIG_FADS) /* Enable RS232 */ #if defined(CONFIG_8xx_CONS_SMC1) *((uint *) BCSR1) &= ~BCSR1_RS232EN_1; diff --git a/board/fads/fads.c b/board/fads/fads.c index 89dd9efe784..fdb46b1f359 100644 --- a/board/fads/fads.c +++ b/board/fads/fads.c @@ -210,11 +210,7 @@ static int _draminit (uint base, uint noMbytes, uint edo, uint delay) switch (noMbytes) { case 4: /* 4 Mbyte uses only CS2 */ -#ifdef CONFIG_ADS - memctl->memc_mamr = 0xc0a21114; -#else memctl->memc_mamr = 0x13a01114; /* PTA 0x13 AMA 010 */ -#endif memctl->memc_or2 = 0xffc00800; /* 4M */ break; @@ -226,11 +222,7 @@ static int _draminit (uint base, uint noMbytes, uint edo, uint delay) break; case 16: /* 16 Mbyte uses only CS2 */ -#ifdef CONFIG_ADS /* XXX: why PTA=0x60 only in 16M case? - NTL */ - memctl->memc_mamr = 0x60b21114; /* PTA 0x60 AMA 011 */ -#else memctl->memc_mamr = 0x13b01114; /* PTA 0x13 AMA 011 */ -#endif memctl->memc_or2 = 0xff000800; /* 16M */ break; @@ -674,42 +666,6 @@ int testdram (void) * Check Board Identity: */ -#if defined(CONFIG_FADS) && defined(CONFIG_SYS_DAUGHTERBOARD) -static void checkdboard(void) -{ - /* get db type from BCSR 3 */ - uint k = (*((uint *)BCSR3) >> 24) & 0x3f; - - puts (" with db "); - - switch(k) { - case 0x03 : - puts ("MPC823"); - break; - case 0x20 : - puts ("MPC801"); - break; - case 0x21 : - puts ("MPC850"); - break; - case 0x22 : - puts ("MPC821, MPC860 / MPC860SAR / MPC860T"); - break; - case 0x23 : - puts ("MPC860SAR"); - break; - case 0x24 : - case 0x2A : - puts ("MPC860T"); - break; - case 0x3F : - puts ("MPC850SAR"); - break; - default : printf("0x%x", k); - } -} -#endif /* defined(CONFIG_FADS) && defined(CONFIG_SYS_DAUGHTERBOARD) */ - int checkboard (void) { #if defined(CONFIG_MPC86xADS) @@ -732,27 +688,12 @@ int checkboard (void) puts (" rev "); switch (r) { -#if defined(CONFIG_ADS) - case 0x00: - puts ("ENG - this board sucks, check the errata, not supported\n"); - return -1; - case 0x01: - puts ("PILOT - warning, read errata \n"); - break; - case 0x02: - puts ("A - warning, read errata \n"); - break; - case 0x03: - puts ("B\n"); - break; -#else /* FADS */ case 0x00: puts ("ENG\n"); break; case 0x01: puts ("PILOT\n"); break; -#endif /* CONFIG_ADS */ default: printf ("unknown (0x%x)\n", r); return -1; @@ -865,12 +806,6 @@ int pcmcia_init(void) #endif case 5: printf("; using 5V"); -#ifdef CONFIG_ADS - /* - ** Enable 5 volt Vcc. - */ - *((uint *)BCSR1) &= ~BCSR1_PCCVCCON; -#endif #ifdef CONFIG_FADS /* ** Enable 5 volt Vcc. diff --git a/board/fads/fads.h b/board/fads/fads.h index fa49080fb73..1be00b90483 100644 --- a/board/fads/fads.h +++ b/board/fads/fads.h @@ -66,13 +66,8 @@ * motherboard and FEC Ethernet on daughterboard. All new PQ1 chips have * got FEC so FEC is the default. */ -#ifndef CONFIG_ADS #undef CONFIG_SCC1_ENET /* Disable SCC1 ethernet */ #define CONFIG_FEC_ENET /* Use FEC ethernet */ -#else /* Old ADS has not got FEC option */ -#define CONFIG_SCC1_ENET /* Use SCC1 ethernet */ -#undef CONFIG_FEC_ENET /* No FEC ethernet */ -#endif /* !CONFIG_ADS */ #if defined(CONFIG_SCC1_ENET) && defined(CONFIG_FEC_ENET) #error Both CONFIG_SCC1_ENET and CONFIG_FEC_ENET configured diff --git a/board/fads/lamp.c b/board/fads/lamp.c index 4e58291c069..ffcc2b3c41f 100644 --- a/board/fads/lamp.c +++ b/board/fads/lamp.c @@ -1,7 +1,5 @@ #include -#ifndef CONFIG_ADS /* Old ADS has not got any user-controllable LED */ - #include void @@ -43,5 +41,3 @@ fast_blink(unsigned int n) signal_delay(0x00100000); } } - -#endif /* !CONFIG_ADS */ diff --git a/board/fads/pcmcia.c b/board/fads/pcmcia.c index 99fe0b4fb97..996f032f644 100644 --- a/board/fads/pcmcia.c +++ b/board/fads/pcmcia.c @@ -14,11 +14,7 @@ #ifdef CONFIG_PCMCIA -#ifdef CONFIG_ADS -#define PCMCIA_BOARD_MSG "ADS" -#else #define PCMCIA_BOARD_MSG "FADS" -#endif int pcmcia_voltage_set(int slot, int vcc, int vpp) { @@ -33,9 +29,6 @@ int pcmcia_voltage_set(int slot, int vcc, int vpp) switch(vcc) { case 0: reg = 0; break; -#ifdef CONFIG_ADS - case 50: reg = BCSR1_PCCVCCON; break; -#endif #ifdef CONFIG_FADS case 33: reg = BCSR1_PCCVCC0 | BCSR1_PCCVCC1; break; case 50: reg = BCSR1_PCCVCC1; break; @@ -45,9 +38,6 @@ int pcmcia_voltage_set(int slot, int vcc, int vpp) /* first, turn off all power */ -#ifdef CONFIG_ADS - *((uint *)BCSR1) |= BCSR1_PCCVCCON; -#endif #ifdef CONFIG_FADS *((uint *)BCSR1) &= ~(BCSR1_PCCVCC0 | BCSR1_PCCVCC1); #endif @@ -55,9 +45,6 @@ int pcmcia_voltage_set(int slot, int vcc, int vpp) /* enable new powersettings */ -#ifdef CONFIG_ADS - *((uint *)BCSR1) &= ~reg; -#endif #ifdef CONFIG_FADS *((uint *)BCSR1) |= reg; #endif diff --git a/boards.cfg b/boards.cfg index e411a7b90c3..2125e9042f4 100644 --- a/boards.cfg +++ b/boards.cfg @@ -1248,7 +1248,3 @@ Orphan powerpc mpc8260 - - - Orphan powerpc mpc8260 - - rpxsuper RPXsuper - - Orphan powerpc mpc8xx - - - RPXClassic - - Orphan powerpc mpc8xx - - - RPXlite - - -Orphan powerpc mpc8xx - - fads ADS860 - - -Orphan powerpc mpc8xx - - fads FADS823 - - -Orphan powerpc mpc8xx - - fads FADS850SAR - - -Orphan powerpc mpc8xx - - fads FADS860T - - diff --git a/include/commproc.h b/include/commproc.h index e3bc6d65d3b..605aac2ec22 100644 --- a/include/commproc.h +++ b/include/commproc.h @@ -429,38 +429,6 @@ typedef struct scc_enet { * #define FEC_ENET to enable the SCC resp. FEC ethernet drivers. **********************************************************************/ - -/*** ADS *************************************************************/ - -#if defined(CONFIG_MPC860) && defined(CONFIG_ADS) -/* This ENET stuff is for the MPC860ADS with ethernet on SCC1. - */ - -#define PROFF_ENET PROFF_SCC1 -#define CPM_CR_ENET CPM_CR_CH_SCC1 -#define SCC_ENET 0 - -#define PA_ENET_RXD ((ushort)0x0001) -#define PA_ENET_TXD ((ushort)0x0002) -#define PA_ENET_TCLK ((ushort)0x0100) -#define PA_ENET_RCLK ((ushort)0x0200) - -#define PB_ENET_TENA ((uint)0x00001000) - -#define PC_ENET_CLSN ((ushort)0x0010) -#define PC_ENET_RENA ((ushort)0x0020) - -#define SICR_ENET_MASK ((uint)0x000000ff) -#define SICR_ENET_CLKRT ((uint)0x0000002c) - -/* 68160 PHY control */ - -#define PC_ENET_ETHLOOP ((ushort)0x0800) -#define PC_ENET_TPFLDL ((ushort)0x0400) -#define PC_ENET_TPSQEL ((ushort)0x0200) - -#endif /* MPC860ADS */ - /*** BSEIP **********************************************************/ #ifdef CONFIG_BSEIP @@ -563,62 +531,6 @@ typedef struct scc_enet { #endif -/*** FADS823 ********************************************************/ - -#if defined(CONFIG_MPC823FADS) && defined(CONFIG_FADS) -/* This ENET stuff is for the MPC823FADS with ethernet on SCC2. - */ -#ifdef CONFIG_SCC2_ENET -#define PROFF_ENET PROFF_SCC2 -#define CPM_CR_ENET CPM_CR_CH_SCC2 -#define SCC_ENET 1 -#define CPMVEC_ENET CPMVEC_SCC2 -#endif - -#ifdef CONFIG_SCC1_ENET -#define PROFF_ENET PROFF_SCC1 -#define CPM_CR_ENET CPM_CR_CH_SCC1 -#define SCC_ENET 0 -#define CPMVEC_ENET CPMVEC_SCC1 -#endif - -#define PA_ENET_RXD ((ushort)0x0004) -#define PA_ENET_TXD ((ushort)0x0008) -#define PA_ENET_TCLK ((ushort)0x0400) -#define PA_ENET_RCLK ((ushort)0x0200) - -#define PB_ENET_TENA ((uint)0x00002000) - -#define PC_ENET_CLSN ((ushort)0x0040) -#define PC_ENET_RENA ((ushort)0x0080) - -#define SICR_ENET_MASK ((uint)0x0000ff00) -#define SICR_ENET_CLKRT ((uint)0x00002e00) - -#endif /* CONFIG_FADS823FADS */ - -/*** FADS850SAR ********************************************************/ - -#if defined(CONFIG_MPC850SAR) && defined(CONFIG_FADS) -/* This ENET stuff is for the MPC850SAR with ethernet on SCC2. Some of - * this may be unique to the FADS850SAR configuration. - * Note TENA is on Port B. - */ -#define PROFF_ENET PROFF_SCC2 -#define CPM_CR_ENET CPM_CR_CH_SCC2 -#define SCC_ENET 1 -#define PA_ENET_RXD ((ushort)0x0004) /* PA 13 */ -#define PA_ENET_TXD ((ushort)0x0008) /* PA 12 */ -#define PA_ENET_RCLK ((ushort)0x0200) /* PA 6 */ -#define PA_ENET_TCLK ((ushort)0x0800) /* PA 4 */ -#define PB_ENET_TENA ((uint)0x00002000) /* PB 18 */ -#define PC_ENET_CLSN ((ushort)0x0040) /* PC 9 */ -#define PC_ENET_RENA ((ushort)0x0080) /* PC 8 */ - -#define SICR_ENET_MASK ((uint)0x0000ff00) -#define SICR_ENET_CLKRT ((uint)0x00002f00) /* RCLK-CLK2, TCLK-CLK4 */ -#endif /* CONFIG_FADS850SAR */ - /*** FADS860T********************************************************/ #if defined(CONFIG_FADS) && defined(CONFIG_MPC86x) diff --git a/include/configs/ADS860.h b/include/configs/ADS860.h deleted file mode 100644 index 82ea172d7a6..00000000000 --- a/include/configs/ADS860.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - * A collection of structures, addresses, and values associated with - * the Motorola 860 ADS board. Copied from the MBX stuff. - * Magnus Damm added defines for 8xxrom and extended bd_info. - * Helmut Buchsbaum added bitvalues for BCSRx - * - * Copyright (c) 1998 Dan Malek (dmalek@jlc.net) - * - * Modified by, Yuli Barcohen, Arabella Software Ltd., yuli@arabellasw.com - * - * Values common to all FADS family boards are in board/fads/fads.h - */ - -#ifndef __CONFIG_H -#define __CONFIG_H - -/* Board type */ -#define CONFIG_ADS 1 /* Old Motorola MPC821/860ADS */ - -/* Processor type */ -#define CONFIG_MPC860 1 - -#define CONFIG_SYS_TEXT_BASE 0xFE000000 - -#define CONFIG_8xx_CONS_SMC1 1 /* Console is on SMC1 */ -#undef CONFIG_8xx_CONS_SMC2 -#undef CONFIG_8xx_CONS_NONE - -#define CONFIG_BAUDRATE 38400 /* Console baudrate */ - -#if 0 -#define CONFIG_SYS_8XX_FACT 1526 /* 32.768 kHz crystal on XTAL/EXTAL */ -#else -#define CONFIG_SYS_8XX_FACT 12 /* 4 MHz oscillator on EXTCLK */ -#endif - -#define CONFIG_SYS_PLPRCR (((CONFIG_SYS_8XX_FACT-1) << PLPRCR_MF_SHIFT) | \ - PLPRCR_SPLSS | PLPRCR_TEXPS | PLPRCR_TMIST) - -#define CONFIG_DRAM_50MHZ 1 - - -/* - * Command line configuration. - */ -#include - -#define CONFIG_CMD_DHCP -#define CONFIG_CMD_IMMAP -#define CONFIG_CMD_PCMCIA -#define CONFIG_CMD_PING - -/* This is picked up again in fads.h */ -#define FADS_COMMANDS_ALREADY_DEFINED - -#include "../../board/fads/fads.h" - -#define CONFIG_SYS_PC_IDE_RESET ((ushort)0x0008) /* PC 12 */ - -#endif /* __CONFIG_H */ diff --git a/include/configs/FADS823.h b/include/configs/FADS823.h deleted file mode 100644 index 50de4ea084c..00000000000 --- a/include/configs/FADS823.h +++ /dev/null @@ -1,472 +0,0 @@ - /* - * A collection of structures, addresses, and values associated with - * the Motorola 860T FADS board. Copied from the MBX stuff. - * Magnus Damm added defines for 8xxrom and extended bd_info. - * Helmut Buchsbaum added bitvalues for BCSRx - * - * Copyright (c) 1998 Dan Malek (dmalek@jlc.net) - */ - -/* - * 1999-nov-26: The FADS is using the following physical memorymap: - * - * ff020000 -> ff02ffff : pcmcia io remapping - * ff010000 -> ff01ffff : BCSR connected to CS1, setup by U-Boot - * ff000000 -> ff00ffff : IMAP internal in the cpu - * e0000000 -> f3ffffff : pcmcia memory remapping by m8xx_pcmcia - * fe000000 -> fe1fffff : flash connected to CS0, setup by U-Boot - * 00000000 -> nnnnnnnn : sdram/dram setup by U-Boot -*/ - -#define CONFIG_SYS_PCMCIA_IO_ADDR 0xff020000 -#define CONFIG_SYS_PCMCIA_IO_SIZE 0x10000 -#define CONFIG_SYS_PCMCIA_MEM_ADDR 0xe0000000 -#define CONFIG_SYS_PCMCIA_MEM_SIZE 0x10000 -#define CONFIG_SYS_IMMR 0xFF000000 -#define CONFIG_SYS_SDRAM_SIZE (4<<20) /* standard FADS has 4M */ -#define CONFIG_SYS_SDRAM_BASE 0x00000000 -#define CONFIG_SYS_FLASH_BASE 0x02800000 -#define BCSR_ADDR ((uint) 0xff010000) -#define FLASH_BASE0_PRELIM 0x02800000 /* FLASH bank #0 */ - -/* ------------------------------------------------------------------------- */ - -/* - * board/config.h - configuration options, board specific - */ - -#ifndef __CONFIG_H -#define __CONFIG_H - -#define CONFIG_SYS_TEXT_BASE 0xFE000000 - -#define CONFIG_ETHADDR 08:00:22:50:70:63 /* Ethernet address */ -#define CONFIG_ENV_OVERWRITE 1 /* Overwrite the environment */ - -#define CONFIG_VIDEO 1 /* To enable video controller support */ -#define CONFIG_HARD_I2C 1 /* To I2C with hardware support */ -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ -#define CONFIG_SYS_I2C_SLAVE 0x7F - -/*#define CONFIG_PCMCIA 1 / * To enable PCMCIA support */ - -/* Video related */ - -#define CONFIG_VIDEO_LOGO 1 /* Show the logo */ -#define CONFIG_VIDEO_ENCODER_AD7176 1 /* Enable this encoder */ -#define CONFIG_VIDEO_ENCODER_AD7176_ADDR 0x54 /* Default on fads */ -#define CONFIG_VIDEO_SIZE (2*1024*1024) -/* #define CONFIG_VIDEO_ADDR (gd->bd->bi_memsize - CONFIG_VIDEO_SIZE) Frame buffer address */ - -/* Wireless 56Khz 4PPM keyboard on SMCx */ - -/*#define CONFIG_KEYBOARD 1 */ -#define CONFIG_WL_4PPM_KEYBOARD_SMC 0 /* SMC to use (0 indexed) */ - -/* - * High Level Configuration Options - * (easy to change) - */ -#define CONFIG_MPC823 1 -#define CONFIG_MPC823FADS 1 -#define CONFIG_FADS 1 - -#define CONFIG_8xx_CONS_SMC1 1 /* Console is on SMC1 */ -#undef CONFIG_8xx_CONS_SMC2 -#undef CONFIG_8xx_CONS_NONE -#define CONFIG_BAUDRATE 115200 - -/* Set the CPU speed to 50Mhz on the FADS */ - -#if 0 -#define MPC8XX_FACT 10 /* Multiply by 10 */ -#define MPC8XX_XIN 5000000 /* 5 MHz in */ -#else -#define MPC8XX_FACT 10 /* Multiply by 10 */ -#define MPC8XX_XIN 5000000 /* 5 MHz in */ -#define CONFIG_SYS_PLPRCR_MF (MPC8XX_FACT-1) << 20 /* From 0 to 4095 */ -#endif -#define MPC8XX_HZ ((MPC8XX_XIN) * (MPC8XX_FACT)) - -#define CONFIG_CLOCKS_IN_MHZ 1 /* clocks passsed to Linux in MHz */ - -#if 1 -#define CONFIG_BOOTDELAY 2 /* autoboot after 2 seconds */ -#define CONFIG_LOADS_ECHO 0 /* Dont echoes received characters */ -#define CONFIG_BOOTARGS "" -#define CONFIG_BOOTCOMMAND \ -"bootp ;" \ -"setenv bootargs console=tty0 console=ttyS0 " \ -"root=/dev/nfs nfsroot=${serverip}:${rootpath} " \ -"ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}:eth0:off ;" \ -"bootm" -#else -#define CONFIG_BOOTDELAY 0 /* autoboot disabled */ -#endif - -#undef CONFIG_WATCHDOG /* watchdog disabled */ - - -/* - * BOOTP options - */ -#define CONFIG_BOOTP_SUBNETMASK -#define CONFIG_BOOTP_GATEWAY -#define CONFIG_BOOTP_HOSTNAME -#define CONFIG_BOOTP_BOOTPATH -#define CONFIG_BOOTP_BOOTFILESIZE -#define CONFIG_BOOTP_SUBNETMASK -#define CONFIG_BOOTP_GATEWAY -#define CONFIG_BOOTP_HOSTNAME -#define CONFIG_BOOTP_NISDOMAIN -#define CONFIG_BOOTP_BOOTPATH -#define CONFIG_BOOTP_DNS -#define CONFIG_BOOTP_DNS2 -#define CONFIG_BOOTP_SEND_HOSTNAME -#define CONFIG_BOOTP_NTPSERVER -#define CONFIG_BOOTP_TIMEOFFSET - - -/* - * Command line configuration. - */ -#include - - -/* - * Miscellaneous configurable options - */ -#define CONFIG_SYS_LONGHELP /* undef to save memory */ -#define CONFIG_SYS_PROMPT ":>" /* Monitor Command Prompt */ -#if defined(CONFIG_CMD_KGDB) -#define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */ -#else -#define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */ -#endif -#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */ -#define CONFIG_SYS_MAXARGS 16 /* max number of command args */ -#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */ - -#define CONFIG_SYS_MEMTEST_START 0x00004000 /* memtest works on */ -#define CONFIG_SYS_MEMTEST_END 0x01000000 /* 0 ... 16 MB in DRAM */ - -#define CONFIG_SYS_LOAD_ADDR 0x00100000 /* default load address */ - -/* - * Low Level Configuration Settings - * (address mappings, register initial values, etc.) - * You should know what you are doing if you make changes here. - */ -/*----------------------------------------------------------------------- - * Internal Memory Mapped Register - */ -#define CONFIG_SYS_IMMR_SIZE ((uint)(64 * 1024)) - -/*----------------------------------------------------------------------- - * Definitions for initial stack pointer and data area (in DPRAM) - */ -#define CONFIG_SYS_INIT_RAM_ADDR CONFIG_SYS_IMMR -#define CONFIG_SYS_INIT_RAM_SIZE 0x2F00 /* Size of used area in DPRAM */ -#define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) -#define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET - -/*----------------------------------------------------------------------- - * Start addresses for the final memory configuration - * (Set up by the startup code) - * Please note that CONFIG_SYS_SDRAM_BASE _must_ start at 0 - * Also NOTE that it doesn't mean SDRAM - it means MEMORY. - */ -#define CONFIG_SYS_FLASH_SIZE ((uint)(8 * 1024 * 1024)) /* max 8Mbyte */ -#if 0 -#define CONFIG_SYS_MONITOR_LEN (256 << 10) /* Reserve 256 kB for Monitor */ -#else -#define CONFIG_SYS_MONITOR_LEN (512 << 10) /* Reserve 512 kB for Monitor */ -#endif -#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE -#define CONFIG_SYS_MALLOC_LEN (128 << 10) /* Reserve 128 kB for malloc() */ - -/* - * For booting Linux, the board info and command line data - * have to be in the first 8 MB of memory, since this is - * the maximum mapped by the Linux kernel during initialization. - */ -#define CONFIG_SYS_BOOTMAPSZ (8 << 20) /* Initial Memory map for Linux */ -/*----------------------------------------------------------------------- - * FLASH organization - */ -#define CONFIG_SYS_MAX_FLASH_BANKS 1 /* max number of memory banks */ -#define CONFIG_SYS_MAX_FLASH_SECT 8 /* max number of sectors on one chip */ - -#define CONFIG_SYS_FLASH_ERASE_TOUT 120000 /* Timeout for Flash Erase (in ms) */ -#define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Timeout for Flash Write (in ms) */ - -#define CONFIG_ENV_IS_IN_FLASH 1 -#define CONFIG_ENV_OFFSET 0x00040000 /* Offset of Environment Sector */ -#define CONFIG_ENV_SIZE 0x40000 /* Total Size of Environment Sector */ -#define CONFIG_SYS_USE_PPCENV /* Environment embedded in sect .ppcenv */ - -/*----------------------------------------------------------------------- - * Cache Configuration - */ -#define CONFIG_SYS_CACHELINE_SIZE 16 /* For all MPC8xx CPUs */ -#if defined(CONFIG_CMD_KGDB) -#define CONFIG_SYS_CACHELINE_SHIFT 4 /* log base 2 of the above value */ -#endif - -/*----------------------------------------------------------------------- - * SYPCR - System Protection Control 11-9 - * SYPCR can only be written once after reset! - *----------------------------------------------------------------------- - * Software & Bus Monitor Timer max, Bus Monitor enable, SW Watchdog freeze - */ -#if defined(CONFIG_WATCHDOG) -#define CONFIG_SYS_SYPCR (SYPCR_SWTC | SYPCR_BMT | SYPCR_BME | SYPCR_SWF | \ - SYPCR_SWE | SYPCR_SWRI| SYPCR_SWP) -#else -#define CONFIG_SYS_SYPCR (SYPCR_SWTC | SYPCR_BMT | SYPCR_BME | SYPCR_SWF | SYPCR_SWP) -#endif - -/*----------------------------------------------------------------------- - * SIUMCR - SIU Module Configuration 11-6 - *----------------------------------------------------------------------- - * PCMCIA config., multi-function pin tri-state - */ -#define CONFIG_SYS_SIUMCR (SIUMCR_DBGC00 | SIUMCR_DBPC00 | SIUMCR_MLRC01) - -/*----------------------------------------------------------------------- - * TBSCR - Time Base Status and Control 11-26 - *----------------------------------------------------------------------- - * Clear Reference Interrupt Status, Timebase freezing enabled - */ -#define CONFIG_SYS_TBSCR (TBSCR_REFA | TBSCR_REFB | TBSCR_TBE) - -/*----------------------------------------------------------------------- - * PISCR - Periodic Interrupt Status and Control 11-31 - *----------------------------------------------------------------------- - * Clear Periodic Interrupt Status, Interrupt Timer freezing enabled - */ -#define CONFIG_SYS_PISCR (PISCR_PS | PISCR_PITF) - -/*----------------------------------------------------------------------- - * PLPRCR - PLL, Low-Power, and Reset Control Register 15-30 - *----------------------------------------------------------------------- - * Reset PLL lock status sticky bit, timer expired status bit and timer * - * interrupt status bit - leave PLL multiplication factor unchanged ! - */ -#define CONFIG_SYS_PLPRCR (PLPRCR_SPLSS | PLPRCR_TEXPS | PLPRCR_TMIST | CONFIG_SYS_PLPRCR_MF) - -/*----------------------------------------------------------------------- - * SCCR - System Clock and reset Control Register 15-27 - *----------------------------------------------------------------------- - * Set clock output, timebase and RTC source and divider, - * power management and some other internal clocks - */ -#define SCCR_MASK SCCR_EBDF11 -#define CONFIG_SYS_SCCR (SCCR_TBS | \ - SCCR_COM00 | SCCR_DFSYNC00 | SCCR_DFBRG00 | \ - SCCR_DFNL000 | SCCR_DFNH000 | SCCR_DFLCD000 | \ - SCCR_DFALCD00) - - /*----------------------------------------------------------------------- - * - *----------------------------------------------------------------------- - * - */ -#define CONFIG_SYS_DER 0 - -/* Because of the way the 860 starts up and assigns CS0 the -* entire address space, we have to set the memory controller -* differently. Normally, you write the option register -* first, and then enable the chip select by writing the -* base register. For CS0, you must write the base register -* first, followed by the option register. -*/ - -/* - * Init Memory Controller: - * - * BR0/1 and OR0/1 (FLASH) - */ -/* the other CS:s are determined by looking at parameters in BCSRx */ - -#define BCSR_SIZE ((uint)(64 * 1024)) - -#define FLASH_BASE1_PRELIM 0x00000000 /* FLASH bank #1 */ - -#define CONFIG_SYS_REMAP_OR_AM 0x80000000 /* OR addr mask */ -#define CONFIG_SYS_PRELIM_OR_AM 0xFFE00000 /* OR addr mask */ - -/* FLASH timing: ACS = 10, TRLX = 1, CSNT = 1, SCY = 3, EHTR = 0 */ -#define CONFIG_SYS_OR_TIMING_FLASH (OR_CSNT_SAM | OR_ACS_DIV4 | OR_BI | OR_SCY_3_CLK | OR_TRLX) - -#define CONFIG_SYS_OR0_REMAP (CONFIG_SYS_REMAP_OR_AM | CONFIG_SYS_OR_TIMING_FLASH) -#define CONFIG_SYS_OR0_PRELIM (CONFIG_SYS_PRELIM_OR_AM | CONFIG_SYS_OR_TIMING_FLASH) /* 1 Mbyte until detected and only 1 Mbyte is needed*/ -#define CONFIG_SYS_BR0_PRELIM ((FLASH_BASE0_PRELIM & BR_BA_MSK) | BR_V ) - -/* BCSRx - Board Control and Status Registers */ -#define CONFIG_SYS_OR1_REMAP CONFIG_SYS_OR0_REMAP -#define CONFIG_SYS_OR1_PRELIM 0xffff8110 /* 64Kbyte address space */ -#define CONFIG_SYS_BR1_PRELIM ((BCSR_ADDR) | BR_V ) - - -/* - * Memory Periodic Timer Prescaler - */ - -/* periodic timer for refresh */ -#define CONFIG_SYS_MAMR_PTA 97 /* start with divider for 100 MHz */ - -/* refresh rate 15.6 us (= 64 ms / 4K = 62.4 / quad bursts) for <= 128 MBit */ -#define CONFIG_SYS_MPTPR_2BK_4K MPTPR_PTP_DIV16 /* setting for 2 banks */ -#define CONFIG_SYS_MPTPR_1BK_4K MPTPR_PTP_DIV32 /* setting for 1 bank */ - -/* refresh rate 7.8 us (= 64 ms / 8K = 31.2 / quad bursts) for 256 MBit */ -#define CONFIG_SYS_MPTPR_2BK_8K MPTPR_PTP_DIV8 /* setting for 2 banks */ -#define CONFIG_SYS_MPTPR_1BK_8K MPTPR_PTP_DIV16 /* setting for 1 bank */ - -/* - * MAMR settings for SDRAM - */ - -/* 8 column SDRAM */ -#define CONFIG_SYS_MAMR_8COL ((CONFIG_SYS_MAMR_PTA << MAMR_PTA_SHIFT) | MAMR_PTAE | \ - MAMR_AMA_TYPE_0 | MAMR_DSA_1_CYCL | MAMR_G0CLA_A11 | \ - MAMR_RLFA_1X | MAMR_WLFA_1X | MAMR_TLFA_4X) -/* 9 column SDRAM */ -#define CONFIG_SYS_MAMR_9COL ((CONFIG_SYS_MAMR_PTA << MAMR_PTA_SHIFT) | MAMR_PTAE | \ - MAMR_AMA_TYPE_1 | MAMR_DSA_1_CYCL | MAMR_G0CLA_A10 | \ - MAMR_RLFA_1X | MAMR_WLFA_1X | MAMR_TLFA_4X) - -#define CONFIG_SYS_MAMR 0x13a01114 - -/* values according to the manual */ - -#define BCSR0 ((uint) (BCSR_ADDR + 00)) -#define BCSR1 ((uint) (BCSR_ADDR + 0x04)) -#define BCSR2 ((uint) (BCSR_ADDR + 0x08)) -#define BCSR3 ((uint) (BCSR_ADDR + 0x0c)) -#define BCSR4 ((uint) (BCSR_ADDR + 0x10)) - -/* FADS bitvalues by Helmut Buchsbaum - * see MPC8xxADS User's Manual for a proper description - * of the following structures - */ - -#define BCSR0_ERB ((uint)0x80000000) -#define BCSR0_IP ((uint)0x40000000) -#define BCSR0_BDIS ((uint)0x10000000) -#define BCSR0_BPS_MASK ((uint)0x0C000000) -#define BCSR0_ISB_MASK ((uint)0x01800000) -#define BCSR0_DBGC_MASK ((uint)0x00600000) -#define BCSR0_DBPC_MASK ((uint)0x00180000) -#define BCSR0_EBDF_MASK ((uint)0x00060000) - -#define BCSR1_FLASH_EN ((uint)0x80000000) -#define BCSR1_DRAM_EN ((uint)0x40000000) -#define BCSR1_ETHEN ((uint)0x20000000) -#define BCSR1_IRDEN ((uint)0x10000000) -#define BCSR1_FLASH_CFG_EN ((uint)0x08000000) -#define BCSR1_CNT_REG_EN_PROTECT ((uint)0x04000000) -#define BCSR1_BCSR_EN ((uint)0x02000000) -#define BCSR1_RS232EN_1 ((uint)0x01000000) -#define BCSR1_PCCEN ((uint)0x00800000) -#define BCSR1_PCCVCC0 ((uint)0x00400000) -#define BCSR1_PCCVPP_MASK ((uint)0x00300000) -#define BCSR1_DRAM_HALF_WORD ((uint)0x00080000) -#define BCSR1_RS232EN_2 ((uint)0x00040000) -#define BCSR1_SDRAM_EN ((uint)0x00020000) -#define BCSR1_PCCVCC1 ((uint)0x00010000) - -#define BCSR2_FLASH_PD_MASK ((uint)0xF0000000) -#define BCSR2_FLASH_PD_SHIFT 28 -#define BCSR2_DRAM_PD_MASK ((uint)0x07800000) -#define BCSR2_DRAM_PD_SHIFT 23 -#define BCSR2_EXTTOLI_MASK ((uint)0x00780000) -#define BCSR2_DBREVNR_MASK ((uint)0x00030000) - -#define BCSR3_DBID_MASK ((ushort)0x3800) -#define BCSR3_CNT_REG_EN_PROTECT ((ushort)0x0400) -#define BCSR3_BREVNR0 ((ushort)0x0080) -#define BCSR3_FLASH_PD_MASK ((ushort)0x0070) -#define BCSR3_BREVN1 ((ushort)0x0008) -#define BCSR3_BREVN2_MASK ((ushort)0x0003) - -#define BCSR4_ETHLOOP ((uint)0x80000000) -#define BCSR4_TFPLDL ((uint)0x40000000) -#define BCSR4_TPSQEL ((uint)0x20000000) -#define BCSR4_SIGNAL_LAMP ((uint)0x10000000) -#ifdef CONFIG_MPC823 -#define BCSR4_USB_EN ((uint)0x08000000) -#endif /* CONFIG_MPC823 */ -#ifdef CONFIG_MPC860SAR -#define BCSR4_UTOPIA_EN ((uint)0x08000000) -#endif /* CONFIG_MPC860SAR */ -#ifdef CONFIG_MPC860T -#define BCSR4_FETH_EN ((uint)0x08000000) -#endif /* CONFIG_MPC860T */ -#ifdef CONFIG_MPC823 -#define BCSR4_USB_SPEED ((uint)0x04000000) -#endif /* CONFIG_MPC823 */ -#ifdef CONFIG_MPC860T -#define BCSR4_FETHCFG0 ((uint)0x04000000) -#endif /* CONFIG_MPC860T */ -#ifdef CONFIG_MPC823 -#define BCSR4_VCCO ((uint)0x02000000) -#endif /* CONFIG_MPC823 */ -#ifdef CONFIG_MPC860T -#define BCSR4_FETHFDE ((uint)0x02000000) -#endif /* CONFIG_MPC860T */ -#ifdef CONFIG_MPC823 -#define BCSR4_VIDEO_ON ((uint)0x00800000) -#endif /* CONFIG_MPC823 */ -#ifdef CONFIG_MPC823 -#define BCSR4_VDO_EKT_CLK_EN ((uint)0x00400000) -#endif /* CONFIG_MPC823 */ -#ifdef CONFIG_MPC860T -#define BCSR4_FETHCFG1 ((uint)0x00400000) -#endif /* CONFIG_MPC860T */ -#ifdef CONFIG_MPC823 -#define BCSR4_VIDEO_RST ((uint)0x00200000) -#endif /* CONFIG_MPC823 */ -#ifdef CONFIG_MPC860T -#define BCSR4_FETHRST ((uint)0x00200000) -#endif /* CONFIG_MPC860T */ -#ifdef CONFIG_MPC823 -#define BCSR4_MODEM_EN ((uint)0x00100000) -#endif /* CONFIG_MPC823 */ -#ifdef CONFIG_MPC823 -#define BCSR4_DATA_VOICE ((uint)0x00080000) -#endif /* CONFIG_MPC823 */ -#ifdef CONFIG_MPC850 -#define BCSR4_DATA_VOICE ((uint)0x00080000) -#endif /* CONFIG_MPC850 */ - -#define CONFIG_DRAM_50MHZ 1 -#define CONFIG_SDRAM_50MHZ - -/* We don't use the 8259. -*/ -#define NR_8259_INTS 0 - -/* - * MPC8xx CPM Options - */ -#define CONFIG_SCC_ENET 1 -#define CONFIG_SCC2_ENET 1 -#undef CONFIG_FEC_ENET -#undef CONFIG_CPM_IIC -#undef CONFIG_UCODE_PATCH - -#define CONFIG_DISK_SPINUP_TIME 1000000 - -/* PCMCIA configuration */ - -#define PCMCIA_MAX_SLOTS 1 - -#ifdef CONFIG_MPC860 -#define PCMCIA_SLOT_A 1 -#endif - -#define CONFIG_SYS_DAUGHTERBOARD - -#endif /* __CONFIG_H */ diff --git a/include/configs/FADS850SAR.h b/include/configs/FADS850SAR.h deleted file mode 100644 index d48460b9f5c..00000000000 --- a/include/configs/FADS850SAR.h +++ /dev/null @@ -1,415 +0,0 @@ - /* - * A collection of structures, addresses, and values associated with - * the Motorola 860T FADS board. Copied from the MBX stuff. - * Magnus Damm added defines for 8xxrom and extended bd_info. - * Helmut Buchsbaum added bitvalues for BCSRx - * - * Copyright (c) 1998 Dan Malek (dmalek@jlc.net) - */ - -/* - * 1999-nov-26: The FADS is using the following physical memorymap: - * - * ff020000 -> ff02ffff : pcmcia - * ff010000 -> ff01ffff : BCSR connected to CS1, setup by 8xxrom - * ff000000 -> ff00ffff : IMAP internal in the cpu - * fe000000 -> ffnnnnnn : flash connected to CS0, setup by 8xxrom - * 00000000 -> nnnnnnnn : sdram/dram setup by 8xxrom - */ - -/* ------------------------------------------------------------------------- */ - -/* - * board/config.h - configuration options, board specific - */ - -#ifndef __CONFIG_H -#define __CONFIG_H - -/* - * High Level Configuration Options - * (easy to change) - */ -#define CONFIG_MPC850 1 -#define CONFIG_MPC850SAR 1 -#define CONFIG_FADS 1 - -#define CONFIG_SYS_TEXT_BASE 0xFE000000 - -#define CONFIG_8xx_CONS_SMC1 1 /* Console is on SMC1 */ -#undef CONFIG_8xx_CONS_SMC2 -#undef CONFIG_8xx_CONS_NONE -#define CONFIG_BAUDRATE 9600 - -#if 0 -#define MPC8XX_FACT 10 /* Multiply by 10 */ -#define MPC8XX_XIN 50000000 /* 50 MHz in */ -#else -#define MPC8XX_FACT 12 /* Multiply by 12 */ -#define MPC8XX_XIN 4000000 /* 4 MHz in */ -#endif -#define MPC8XX_HZ ((MPC8XX_XIN) * (MPC8XX_FACT)) - -#define CONFIG_CLOCKS_IN_MHZ 1 /* clocks passsed to Linux in MHz */ - -#if 1 -#define CONFIG_BOOTDELAY -1 /* autoboot disabled */ -#else -#define CONFIG_BOOTDELAY 5 /* autoboot after 5 seconds */ -#endif - -#define CONFIG_BOOTCOMMAND "bootm 02880000" /* autoboot command */ -#define CONFIG_BOOTARGS " " - -#undef CONFIG_WATCHDOG /* watchdog disabled */ - - -/* - * BOOTP options - */ -#define CONFIG_BOOTP_BOOTFILESIZE -#define CONFIG_BOOTP_BOOTPATH -#define CONFIG_BOOTP_GATEWAY -#define CONFIG_BOOTP_HOSTNAME - - -/* - * Command line configuration. - */ -#include - - -/* - * Miscellaneous configurable options - */ -#undef CONFIG_SYS_LONGHELP /* undef to save memory */ -#define CONFIG_SYS_PROMPT ":>" /* Monitor Command Prompt */ -#if defined(CONFIG_CMD_KGDB) -#define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */ -#else -#define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */ -#endif -#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */ -#define CONFIG_SYS_MAXARGS 16 /* max number of command args */ -#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */ - -#define CONFIG_SYS_MEMTEST_START 0x00004000 /* memtest works on */ -#define CONFIG_SYS_MEMTEST_END 0x00800000 /* 0 ... 8 MB in DRAM */ - -#define CONFIG_SYS_LOAD_ADDR 0x00100000 /* default load address */ - -/* - * Low Level Configuration Settings - * (address mappings, register initial values, etc.) - * You should know what you are doing if you make changes here. - */ -/*----------------------------------------------------------------------- - * Internal Memory Mapped Register - */ -#define CONFIG_SYS_IMMR 0xFF000000 -#define CONFIG_SYS_IMMR_SIZE ((uint)(64 * 1024)) - -/*----------------------------------------------------------------------- - * Definitions for initial stack pointer and data area (in DPRAM) - */ -#define CONFIG_SYS_INIT_RAM_ADDR CONFIG_SYS_IMMR -#define CONFIG_SYS_INIT_RAM_SIZE 0x2F00 /* Size of used area in DPRAM */ -#define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) -#define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET - -/*----------------------------------------------------------------------- - * Start addresses for the final memory configuration - * (Set up by the startup code) - * Please note that CONFIG_SYS_SDRAM_BASE _must_ start at 0 - * Also NOTE that it doesn't mean SDRAM - it means MEMORY. - */ -#define CONFIG_SYS_SDRAM_BASE 0x00000000 -#define CONFIG_SYS_SDRAM_SIZE (4<<20) /* standard FADS has 4M */ -#define CONFIG_SYS_FLASH_BASE 0x02800000 -#define CONFIG_SYS_FLASH_SIZE ((uint)(8 * 1024 * 1024)) /* max 8Mbyte */ -#if 0 -#define CONFIG_SYS_MONITOR_LEN (256 << 10) /* Reserve 128 kB for Monitor */ -#else -#define CONFIG_SYS_MONITOR_LEN (512 << 10) /* Reserve 512 kB for Monitor */ -#endif -#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE -#define CONFIG_SYS_MALLOC_LEN (256 << 10) /* Reserve 128 kB for malloc() */ - -/* - * For booting Linux, the board info and command line data - * have to be in the first 8 MB of memory, since this is - * the maximum mapped by the Linux kernel during initialization. - */ -#define CONFIG_SYS_BOOTMAPSZ (8 << 20) /* Initial Memory map for Linux */ -/*----------------------------------------------------------------------- - * FLASH organization - */ -#define CONFIG_SYS_MAX_FLASH_BANKS 1 /* max number of memory banks */ -#define CONFIG_SYS_MAX_FLASH_SECT 8 /* max number of sectors on one chip */ - -#define CONFIG_SYS_FLASH_ERASE_TOUT 120000 /* Timeout for Flash Erase (in ms) */ -#define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Timeout for Flash Write (in ms) */ - -#define CONFIG_ENV_IS_IN_FLASH 1 -#define CONFIG_ENV_OFFSET 0x00040000 /* Offset of Environment Sector */ -#define CONFIG_ENV_SIZE 0x40000 /* Total Size of Environment Sector */ -#define CONFIG_SYS_USE_PPCENV /* Environment embedded in sect .ppcenv */ - -/*----------------------------------------------------------------------- - * Cache Configuration - */ -#define CONFIG_SYS_CACHELINE_SIZE 16 /* For all MPC8xx CPUs */ -#if defined(CONFIG_CMD_KGDB) -#define CONFIG_SYS_CACHELINE_SHIFT 4 /* log base 2 of the above value */ -#endif - -/*----------------------------------------------------------------------- - * SYPCR - System Protection Control 11-9 - * SYPCR can only be written once after reset! - *----------------------------------------------------------------------- - * Software & Bus Monitor Timer max, Bus Monitor enable, SW Watchdog freeze - */ -#if defined(CONFIG_WATCHDOG) -#define CONFIG_SYS_SYPCR (SYPCR_SWTC | SYPCR_BMT | SYPCR_BME | SYPCR_SWF | \ - SYPCR_SWE | SYPCR_SWRI| SYPCR_SWP) -#else -#define CONFIG_SYS_SYPCR (SYPCR_SWTC | SYPCR_BMT | SYPCR_BME | SYPCR_SWF | SYPCR_SWP) -#endif - -/*----------------------------------------------------------------------- - * SIUMCR - SIU Module Configuration 11-6 - *----------------------------------------------------------------------- - * PCMCIA config., multi-function pin tri-state - */ -#define CONFIG_SYS_SIUMCR (SIUMCR_DBGC00 | SIUMCR_DBPC00 | SIUMCR_MLRC01) - -/*----------------------------------------------------------------------- - * TBSCR - Time Base Status and Control 11-26 - *----------------------------------------------------------------------- - * Clear Reference Interrupt Status, Timebase freezing enabled - */ -#define CONFIG_SYS_TBSCR (TBSCR_REFA | TBSCR_REFB | TBSCR_TBE) - -/*----------------------------------------------------------------------- - * PISCR - Periodic Interrupt Status and Control 11-31 - *----------------------------------------------------------------------- - * Clear Periodic Interrupt Status, Interrupt Timer freezing enabled - */ -#define CONFIG_SYS_PISCR (PISCR_PS | PISCR_PITF) - -/*----------------------------------------------------------------------- - * PLPRCR - PLL, Low-Power, and Reset Control Register 15-30 - *----------------------------------------------------------------------- - * Reset PLL lock status sticky bit, timer expired status bit and timer * - * interrupt status bit - leave PLL multiplication factor unchanged ! - */ -#define CONFIG_SYS_PLPRCR (((MPC8XX_FACT-1) << 20) | \ - PLPRCR_SPLSS | PLPRCR_TEXPS | PLPRCR_TMIST) - -/*----------------------------------------------------------------------- - * SCCR - System Clock and reset Control Register 15-27 - *----------------------------------------------------------------------- - * Set clock output, timebase and RTC source and divider, - * power management and some other internal clocks - */ -#define SCCR_MASK SCCR_EBDF11 -#define CONFIG_SYS_SCCR (SCCR_TBS | \ - SCCR_COM00 | SCCR_DFSYNC00 | SCCR_DFBRG00 | \ - SCCR_DFNL000 | SCCR_DFNH000 | SCCR_DFLCD000 | \ - SCCR_DFALCD00) - - /*----------------------------------------------------------------------- - * - *----------------------------------------------------------------------- - * - */ -#define CONFIG_SYS_DER 0 - -/* Because of the way the 860 starts up and assigns CS0 the -* entire address space, we have to set the memory controller -* differently. Normally, you write the option register -* first, and then enable the chip select by writing the -* base register. For CS0, you must write the base register -* first, followed by the option register. -*/ - -/* - * Init Memory Controller: - * - * BR0/1 and OR0/1 (FLASH) - */ -/* the other CS:s are determined by looking at parameters in BCSRx */ - - -#define BCSR_ADDR ((uint) 0x02100000) -#define BCSR_SIZE ((uint)(64 * 1024)) - -#define FLASH_BASE0_PRELIM 0x02800000 /* FLASH bank #0 */ -#define FLASH_BASE1_PRELIM 0x00000000 /* FLASH bank #1 */ - -#define CONFIG_SYS_REMAP_OR_AM 0x80000000 /* OR addr mask */ -#define CONFIG_SYS_PRELIM_OR_AM 0xFFE00000 /* OR addr mask */ - -/* FLASH timing: ACS = 10, TRLX = 1, CSNT = 1, SCY = 3, EHTR = 0 */ -#define CONFIG_SYS_OR_TIMING_FLASH (OR_CSNT_SAM | OR_ACS_DIV4 | OR_BI | OR_SCY_3_CLK | OR_TRLX) - -#define CONFIG_SYS_OR0_REMAP (CONFIG_SYS_REMAP_OR_AM | CONFIG_SYS_OR_TIMING_FLASH) -#define CONFIG_SYS_OR0_PRELIM (CONFIG_SYS_PRELIM_OR_AM | CONFIG_SYS_OR_TIMING_FLASH) /* 1 Mbyte until detected and only 1 Mbyte is needed*/ -#define CONFIG_SYS_BR0_PRELIM ((FLASH_BASE0_PRELIM & BR_BA_MSK) | BR_V ) - -/* BCSRx - Board Control and Status Registers */ -#define CONFIG_SYS_OR1_REMAP CONFIG_SYS_OR0_REMAP -#define CONFIG_SYS_OR1_PRELIM 0xffff8110 /* 64Kbyte address space */ -#define CONFIG_SYS_BR1_PRELIM ((BCSR_ADDR) | BR_V ) - - -/* - * Memory Periodic Timer Prescaler - */ - -/* periodic timer for refresh */ -#define CONFIG_SYS_MAMR_PTA 97 /* start with divider for 100 MHz */ - -/* refresh rate 15.6 us (= 64 ms / 4K = 62.4 / quad bursts) for <= 128 MBit */ -#define CONFIG_SYS_MPTPR_2BK_4K MPTPR_PTP_DIV16 /* setting for 2 banks */ -#define CONFIG_SYS_MPTPR_1BK_4K MPTPR_PTP_DIV32 /* setting for 1 bank */ - -/* refresh rate 7.8 us (= 64 ms / 8K = 31.2 / quad bursts) for 256 MBit */ -#define CONFIG_SYS_MPTPR_2BK_8K MPTPR_PTP_DIV8 /* setting for 2 banks */ -#define CONFIG_SYS_MPTPR_1BK_8K MPTPR_PTP_DIV16 /* setting for 1 bank */ - -/* - * MAMR settings for SDRAM - */ - -/* 8 column SDRAM */ -#define CONFIG_SYS_MAMR_8COL ((CONFIG_SYS_MAMR_PTA << MAMR_PTA_SHIFT) | MAMR_PTAE | \ - MAMR_AMA_TYPE_0 | MAMR_DSA_1_CYCL | MAMR_G0CLA_A11 | \ - MAMR_RLFA_1X | MAMR_WLFA_1X | MAMR_TLFA_4X) -/* 9 column SDRAM */ -#define CONFIG_SYS_MAMR_9COL ((CONFIG_SYS_MAMR_PTA << MAMR_PTA_SHIFT) | MAMR_PTAE | \ - MAMR_AMA_TYPE_1 | MAMR_DSA_1_CYCL | MAMR_G0CLA_A10 | \ - MAMR_RLFA_1X | MAMR_WLFA_1X | MAMR_TLFA_4X) - -#define CONFIG_SYS_MAMR 0x13a01114 - -/* values according to the manual */ - - -#define PCMCIA_MEM_ADDR ((uint)0xff020000) -#define PCMCIA_MEM_SIZE ((uint)(64 * 1024)) - -#define BCSR0 ((uint) (BCSR_ADDR + 00)) -#define BCSR1 ((uint) (BCSR_ADDR + 0x04)) -#define BCSR2 ((uint) (BCSR_ADDR + 0x08)) -#define BCSR3 ((uint) (BCSR_ADDR + 0x0c)) -#define BCSR4 ((uint) (BCSR_ADDR + 0x10)) - -/* FADS bitvalues by Helmut Buchsbaum - * see MPC8xxADS User's Manual for a proper description - * of the following structures - */ - -#define BCSR0_ERB ((uint)0x80000000) -#define BCSR0_IP ((uint)0x40000000) -#define BCSR0_BDIS ((uint)0x10000000) -#define BCSR0_BPS_MASK ((uint)0x0C000000) -#define BCSR0_ISB_MASK ((uint)0x01800000) -#define BCSR0_DBGC_MASK ((uint)0x00600000) -#define BCSR0_DBPC_MASK ((uint)0x00180000) -#define BCSR0_EBDF_MASK ((uint)0x00060000) - -#define BCSR1_FLASH_EN ((uint)0x80000000) -#define BCSR1_DRAM_EN ((uint)0x40000000) -#define BCSR1_ETHEN ((uint)0x20000000) -#define BCSR1_IRDEN ((uint)0x10000000) -#define BCSR1_FLASH_CFG_EN ((uint)0x08000000) -#define BCSR1_CNT_REG_EN_PROTECT ((uint)0x04000000) -#define BCSR1_BCSR_EN ((uint)0x02000000) -#define BCSR1_RS232EN_1 ((uint)0x01000000) -#define BCSR1_PCCEN ((uint)0x00800000) -#define BCSR1_PCCVCC0 ((uint)0x00400000) -#define BCSR1_PCCVPP_MASK ((uint)0x00300000) -#define BCSR1_DRAM_HALF_WORD ((uint)0x00080000) -#define BCSR1_RS232EN_2 ((uint)0x00040000) -#define BCSR1_SDRAM_EN ((uint)0x00020000) -#define BCSR1_PCCVCC1 ((uint)0x00010000) - -#define BCSR2_FLASH_PD_MASK ((uint)0xF0000000) -#define BCSR2_FLASH_PD_SHIFT 28 -#define BCSR2_DRAM_PD_MASK ((uint)0x07800000) -#define BCSR2_DRAM_PD_SHIFT 23 -#define BCSR2_EXTTOLI_MASK ((uint)0x00780000) -#define BCSR2_DBREVNR_MASK ((uint)0x00030000) - -#define BCSR3_DBID_MASK ((ushort)0x3800) -#define BCSR3_CNT_REG_EN_PROTECT ((ushort)0x0400) -#define BCSR3_BREVNR0 ((ushort)0x0080) -#define BCSR3_FLASH_PD_MASK ((ushort)0x0070) -#define BCSR3_BREVN1 ((ushort)0x0008) -#define BCSR3_BREVN2_MASK ((ushort)0x0003) - -#define BCSR4_ETHLOOP ((uint)0x80000000) -#define BCSR4_TFPLDL ((uint)0x40000000) -#define BCSR4_TPSQEL ((uint)0x20000000) -#define BCSR4_SIGNAL_LAMP ((uint)0x10000000) -#ifdef CONFIG_MPC823 -#define BCSR4_USB_EN ((uint)0x08000000) -#endif /* CONFIG_MPC823 */ -#ifdef CONFIG_MPC860SAR -#define BCSR4_UTOPIA_EN ((uint)0x08000000) -#endif /* CONFIG_MPC860SAR */ -#ifdef CONFIG_MPC860T -#define BCSR4_FETH_EN ((uint)0x08000000) -#endif /* CONFIG_MPC860T */ -#ifdef CONFIG_MPC823 -#define BCSR4_USB_SPEED ((uint)0x04000000) -#endif /* CONFIG_MPC823 */ -#ifdef CONFIG_MPC860T -#define BCSR4_FETHCFG0 ((uint)0x04000000) -#endif /* CONFIG_MPC860T */ -#ifdef CONFIG_MPC823 -#define BCSR4_VCCO ((uint)0x02000000) -#endif /* CONFIG_MPC823 */ -#ifdef CONFIG_MPC860T -#define BCSR4_FETHFDE ((uint)0x02000000) -#endif /* CONFIG_MPC860T */ -#ifdef CONFIG_MPC823 -#define BCSR4_VIDEO_ON ((uint)0x00800000) -#endif /* CONFIG_MPC823 */ -#ifdef CONFIG_MPC823 -#define BCSR4_VDO_EKT_CLK_EN ((uint)0x00400000) -#endif /* CONFIG_MPC823 */ -#ifdef CONFIG_MPC860T -#define BCSR4_FETHCFG1 ((uint)0x00400000) -#endif /* CONFIG_MPC860T */ -#ifdef CONFIG_MPC823 -#define BCSR4_VIDEO_RST ((uint)0x00200000) -#endif /* CONFIG_MPC823 */ -#ifdef CONFIG_MPC860T -#define BCSR4_FETHRST ((uint)0x00200000) -#endif /* CONFIG_MPC860T */ -#define BCSR4_MODEM_EN ((uint)0x00100000) -#define BCSR4_DATA_VOICE ((uint)0x00080000) - -#define CONFIG_DRAM_50MHZ 1 -#define CONFIG_SDRAM_50MHZ - -/* We don't use the 8259. -*/ -#define NR_8259_INTS 0 - -#define CONFIG_DISK_SPINUP_TIME 1000000 - - -/* PCMCIA configuration */ - -#define PCMCIA_MAX_SLOTS 2 - -#ifdef CONFIG_MPC860 -#define PCMCIA_SLOT_A 1 -#endif - -#define CONFIG_SYS_DAUGHTERBOARD - -#endif /* __CONFIG_H */ diff --git a/include/configs/FADS860T.h b/include/configs/FADS860T.h deleted file mode 100644 index ed7484bd1c9..00000000000 --- a/include/configs/FADS860T.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * A collection of structures, addresses, and values associated with - * the Motorola 860T FADS board. Copied from the MBX stuff. - * Magnus Damm added defines for 8xxrom and extended bd_info. - * Helmut Buchsbaum added bitvalues for BCSRx - * - * Copyright (c) 1998 Dan Malek (dmalek@jlc.net) - * - * Modified by, Yuli Barcohen, Arabella Software Ltd., yuli@arabellasw.com - * - * Values common to all FADS family boards are in board/fads/fads.h - */ - -#ifndef __CONFIG_H -#define __CONFIG_H - -/* board type */ -#define CONFIG_FADS 1 /* old/new FADS + new ADS */ - -/* processor type */ -#define CONFIG_MPC860T 1 /* 860T */ - -#define CONFIG_SYS_TEXT_BASE 0xFE000000 - -#define CONFIG_8xx_CONS_SMC1 1 /* Console is on SMC1 */ -#undef CONFIG_8xx_CONS_SMC2 -#undef CONFIG_8xx_CONS_NONE -#define CONFIG_BAUDRATE 38400 -#define CONFIG_LOADS_ECHO 1 /* echo on for serial download */ - -#if 0 /* old FADS */ -# define CONFIG_SYS_8XX_FACT 12 /* 4 MHz oscillator on EXTCLK */ -#else /* new FADS */ -# define CONFIG_SYS_8XX_FACT 10 /* 5 MHz oscillator on EXTCLK */ -#endif - -#define CONFIG_SYS_PLPRCR (((CONFIG_SYS_8XX_FACT-1) << PLPRCR_MF_SHIFT) | \ - PLPRCR_SPLSS | PLPRCR_TEXPS | PLPRCR_TMIST) - -#define CONFIG_DRAM_50MHZ 1 -#define CONFIG_SDRAM_50MHZ 1 - -#include "../../board/fads/fads.h" - -#ifdef USE_REAL_FLASH_VALUES -/* - * These values fit our FADS860T ... - * The "default" behaviour with 1Mbyte initial doesn't work for us! - */ -#undef CONFIG_SYS_OR0_PRELIM -#undef CONFIG_SYS_BR0_PRELIM -#define CONFIG_SYS_OR0_PRELIM 0x0FFC00D34 /* Real values for the board */ -#define CONFIG_SYS_BR0_PRELIM 0x02800001 /* Real values for the board */ -#endif - -#define CONFIG_SYS_DAUGHTERBOARD /* FADS has processor-specific daughterboard */ - -#endif /* __CONFIG_H */ diff --git a/include/pcmcia.h b/include/pcmcia.h index ce8c8ed5e91..1ad3e636a9c 100644 --- a/include/pcmcia.h +++ b/include/pcmcia.h @@ -24,8 +24,6 @@ /* The RPX series use SLOT_B */ #if defined(CONFIG_RPXCLASSIC) || defined(CONFIG_RPXLITE) # define CONFIG_PCMCIA_SLOT_B -#elif defined(CONFIG_ADS) /* The ADS board uses SLOT_A */ -# define CONFIG_PCMCIA_SLOT_A #elif defined(CONFIG_FADS) /* The FADS series are a mess */ # if defined(CONFIG_MPC86x) || defined(CONFIG_MPC821) # define CONFIG_PCMCIA_SLOT_A -- cgit v1.2.3 From 4fb3925ff8b64422eb904c630e914c29ed824e85 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Fri, 4 Apr 2014 15:25:06 +0900 Subject: powerpc: remove RPXClassic, RPXlite boards support Enough time has passed since these boards were moved to Orphan. Remove. - Remove board/RPXlite/* - Remove board/RPXClassic/* - Remove include/configs/RPXlite.h - Remove include/configs/RPXClassic.h - Clean-up defined(CONFIG_RPXCLASSIC) - Move the entry from boards.cfg to doc/README.scrapyard Signed-off-by: Masahiro Yamada --- arch/powerpc/cpu/mpc8xx/cpu_init.c | 5 - arch/powerpc/cpu/mpc8xx/scc.c | 7 - arch/powerpc/cpu/mpc8xx/serial.c | 2 +- board/RPXClassic/Makefile | 8 - board/RPXClassic/README | 19 - board/RPXClassic/RPXClassic.c | 260 ----------- board/RPXClassic/eccx.c | 335 -------------- board/RPXClassic/flash.c | 431 ------------------ board/RPXClassic/u-boot.lds | 82 ---- board/RPXClassic/u-boot.lds.debug | 121 ----- board/RPXlite/Makefile | 8 - board/RPXlite/README | 877 ------------------------------------- board/RPXlite/README.PlanetCore | 163 ------- board/RPXlite/RPXlite.c | 149 ------- board/RPXlite/flash.c | 508 --------------------- board/RPXlite/u-boot.lds | 82 ---- board/RPXlite/u-boot.lds.debug | 121 ----- boards.cfg | 2 - doc/README.scrapyard | 2 + drivers/pcmcia/mpc8xx_pcmcia.c | 2 +- drivers/pcmcia/rpx_pcmcia.c | 4 +- include/common.h | 4 - include/commproc.h | 35 -- include/configs/RPXClassic.h | 483 -------------------- include/configs/RPXlite.h | 395 ----------------- include/pcmcia.h | 2 +- post/cpu/mpc8xx/ether.c | 7 - post/cpu/mpc8xx/uart.c | 2 +- 28 files changed, 8 insertions(+), 4108 deletions(-) delete mode 100644 board/RPXClassic/Makefile delete mode 100644 board/RPXClassic/README delete mode 100644 board/RPXClassic/RPXClassic.c delete mode 100644 board/RPXClassic/eccx.c delete mode 100644 board/RPXClassic/flash.c delete mode 100644 board/RPXClassic/u-boot.lds delete mode 100644 board/RPXClassic/u-boot.lds.debug delete mode 100644 board/RPXlite/Makefile delete mode 100644 board/RPXlite/README delete mode 100644 board/RPXlite/README.PlanetCore delete mode 100644 board/RPXlite/RPXlite.c delete mode 100644 board/RPXlite/flash.c delete mode 100644 board/RPXlite/u-boot.lds delete mode 100644 board/RPXlite/u-boot.lds.debug delete mode 100644 include/configs/RPXClassic.h delete mode 100644 include/configs/RPXlite.h (limited to 'board') diff --git a/arch/powerpc/cpu/mpc8xx/cpu_init.c b/arch/powerpc/cpu/mpc8xx/cpu_init.c index 69455c7be02..9c3102dc69f 100644 --- a/arch/powerpc/cpu/mpc8xx/cpu_init.c +++ b/arch/powerpc/cpu/mpc8xx/cpu_init.c @@ -138,7 +138,6 @@ void cpu_init_f (volatile immap_t * immr) defined(CONFIG_MHPC) || \ defined(CONFIG_R360MPI) || \ defined(CONFIG_RMU) || \ - defined(CONFIG_RPXCLASSIC) || \ defined(CONFIG_RPXLITE) || \ defined(CONFIG_SPC1920) || \ defined(CONFIG_SPD823TS) @@ -207,10 +206,6 @@ void cpu_init_f (volatile immap_t * immr) __asm__ ("eieio"); } while (immr->im_cpm.cp_cpcr & CPM_CR_FLG); -#ifdef CONFIG_RPXCLASSIC - rpxclassic_init (); -#endif - #if defined(CONFIG_RPXLITE) && defined(CONFIG_ENV_IS_IN_NVRAM) rpxlite_init (); #endif diff --git a/arch/powerpc/cpu/mpc8xx/scc.c b/arch/powerpc/cpu/mpc8xx/scc.c index 647f05817bc..5da697366de 100644 --- a/arch/powerpc/cpu/mpc8xx/scc.c +++ b/arch/powerpc/cpu/mpc8xx/scc.c @@ -461,11 +461,6 @@ static int scc_init (struct eth_device *dev, bd_t * bis) #error Configuration Error: exactly ONE of PB_ENET_TENA, PC_ENET_TENA must be defined #endif -#ifdef CONFIG_RPXCLASSIC - *((uchar *) BCSR0) &= ~BCSR0_ETHLPBK; - *((uchar *) BCSR0) |= (BCSR0_ETHEN | BCSR0_COLTEST | BCSR0_FULLDPLX); -#endif - #ifdef CONFIG_RPXLITE *((uchar *) BCSR0) |= BCSR0_ETHEN; #endif @@ -512,8 +507,6 @@ static int scc_init (struct eth_device *dev, bd_t * bis) */ #if defined (CONFIG_FADS) udelay (10000); /* wait 10 ms */ -#elif defined(CONFIG_RPXCLASSIC) - udelay (100000); /* wait 100 ms */ #endif return 1; diff --git a/arch/powerpc/cpu/mpc8xx/serial.c b/arch/powerpc/cpu/mpc8xx/serial.c index f7ca11e3945..932141144ce 100644 --- a/arch/powerpc/cpu/mpc8xx/serial.c +++ b/arch/powerpc/cpu/mpc8xx/serial.c @@ -182,7 +182,7 @@ static int smc_init (void) #endif #endif /* CONFIG_FADS */ -#if defined(CONFIG_RPXLITE) || defined(CONFIG_RPXCLASSIC) +#if defined(CONFIG_RPXLITE) /* Enable Monitor Port Transceiver */ *((uchar *) BCSR0) |= BCSR0_ENMONXCVR ; #endif /* CONFIG_RPXLITE */ diff --git a/board/RPXClassic/Makefile b/board/RPXClassic/Makefile deleted file mode 100644 index 87db754faa2..00000000000 --- a/board/RPXClassic/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -# -# (C) Copyright 2000-2006 -# Wolfgang Denk, DENX Software Engineering, wd@denx.de. -# -# SPDX-License-Identifier: GPL-2.0+ -# - -obj-y = RPXClassic.o flash.o eccx.o diff --git a/board/RPXClassic/README b/board/RPXClassic/README deleted file mode 100644 index e03f670d1c1..00000000000 --- a/board/RPXClassic/README +++ /dev/null @@ -1,19 +0,0 @@ -# Porting U-Boot onto RPXClassic LF_BW31 board -# Written by Pierre AUBERT -# E-Mail p.aubert@staubli.com -# Stäubli Faverges - -# -# Sept. 20 2001 -# -# Cross compile: Montavista Hardhat ported on HP-UX 10.20 -# - -Flash memories : AM29DL323B (2 banks flash memories) 16 Mb from 0xff000000 -DRAM : 16 Mb from 0 -NVRAM : 512 kb from 0xfa000000 - - -- environment is stored in NVRAM -- Mac address is read from EEPROM -- ethernet on SCC1 or fast ethernet on FEC are running (depending on the - configuration flag CONFIG_FEC_ENET) diff --git a/board/RPXClassic/RPXClassic.c b/board/RPXClassic/RPXClassic.c deleted file mode 100644 index 15b7232fd7b..00000000000 --- a/board/RPXClassic/RPXClassic.c +++ /dev/null @@ -1,260 +0,0 @@ -/* - * (C) Copyright 2001 - * Stäubli Faverges - - * Pierre AUBERT p.aubert@staubli.com - * U-Boot port on RPXClassic LF (CLLF_BW31) board - * - * (C) Copyright 2000 - * Wolfgang Denk, DENX Software Engineering, wd@denx.de. - * - * SPDX-License-Identifier: GPL-2.0+ - */ - -#include -#include -#include -#include -#include - -/* ------------------------------------------------------------------------- */ - -static long int dram_size (long int, long int *, long int); -static unsigned char aschex_to_byte (unsigned char *cp); - -/* ------------------------------------------------------------------------- */ - -#define _NOT_USED_ 0xFFFFCC25 - -const uint sdram_table[] = -{ - /* - * Single Read. (Offset 00h in UPMA RAM) - */ - 0xCFFFCC24, 0x0FFFCC04, 0X0CAFCC04, 0X03AFCC08, - 0x3FBFCC27, /* last */ - _NOT_USED_, _NOT_USED_, _NOT_USED_, - - /* - * Burst Read. (Offset 08h in UPMA RAM) - */ - 0xCFFFCC24, 0x0FFFCC04, 0x0CAFCC84, 0x03AFCC88, - 0x3FBFCC27, /* last */ - _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_, - _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_, - _NOT_USED_, _NOT_USED_, _NOT_USED_, - - /* - * Single Write. (Offset 18h in UPMA RAM) - */ - 0xCFFFCC24, 0x0FFFCC04, 0x0CFFCC04, 0x03FFCC00, - 0x3FFFCC27, /* last */ - _NOT_USED_, _NOT_USED_, _NOT_USED_, - - /* - * Burst Write. (Offset 20h in UPMA RAM) - */ - 0xCFFFCC24, 0x0FFFCC04, 0x0CFFCC80, 0x03FFCC8C, - 0x0CFFCC00, 0x33FFCC27, /* last */ - _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_, - _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_, - _NOT_USED_, _NOT_USED_, - - /* - * Refresh. (Offset 30h in UPMA RAM) - */ - 0xC0FFCC24, 0x03FFCC24, 0x0FFFCC24, 0x0FFFCC24, - 0x3FFFCC27, /* last */ - _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_, - _NOT_USED_, _NOT_USED_, _NOT_USED_, - - /* - * Exception. (Offset 3Ch in UPMA RAM) - */ - _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_ -}; - -/* ------------------------------------------------------------------------- */ - - -/* - * Check Board Identity: - */ - -int checkboard (void) -{ - puts ("Board: RPXClassic\n"); - return (0); -} - -/*----------------------------------------------------------------------------- - * board_get_enetaddr -- Read the MAC Address in the I2C EEPROM - *----------------------------------------------------------------------------- - */ -static void board_get_enetaddr(uchar *enet) -{ - int i; - char buff[256], *cp; - - /* Initialize I2C */ - i2c_init (CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE); - - /* Read 256 bytes in EEPROM */ - i2c_read (0x54, 0, 1, (uchar *)buff, 128); - i2c_read (0x54, 128, 1, (uchar *)buff + 128, 128); - - /* Retrieve MAC address in buffer (key EA) */ - for (cp = buff;;) { - if (cp[0] == 'E' && cp[1] == 'A') { - cp += 3; - /* Read MAC address */ - for (i = 0; i < 6; i++, cp += 2) { - enet[i] = aschex_to_byte ((unsigned char *)cp); - } - } - /* Scan to the end of the record */ - while ((*cp != '\n') && (*cp != (char)0xff)) { - cp++; - } - /* If the next character is a \n, 0 or ff, we are done. */ - cp++; - if ((*cp == '\n') || (*cp == 0) || (*cp == (char)0xff)) - break; - } - -#ifdef CONFIG_FEC_ENET - /* The MAC address is the same as normal ethernet except the 3rd byte */ - /* (See the E.P. Planet Core Overview manual */ - enet[3] |= 0x80; -#endif - - printf("MAC address = %pM\n", enet); -} - -int misc_init_r(void) -{ - uchar enetaddr[6]; - - if (!eth_getenv_enetaddr("ethaddr", enetaddr)) { - board_get_enetaddr(enetaddr); - eth_setenv_enetaddr("ethaddr", enetaddr); - } - - return 0; -} - -void rpxclassic_init (void) -{ - /* Enable NVRAM */ - *((uchar *) BCSR0) |= BCSR0_ENNVRAM; - -#ifdef CONFIG_FEC_ENET - - /* Validate the fast ethernet tranceiver */ - *((volatile uchar *) BCSR2) &= ~BCSR2_MIICTL; - *((volatile uchar *) BCSR2) &= ~BCSR2_MIIPWRDWN; - *((volatile uchar *) BCSR2) |= BCSR2_MIIRST; - *((volatile uchar *) BCSR2) |= BCSR2_MIIPWRDWN; -#endif - -} - -/* ------------------------------------------------------------------------- */ - -phys_size_t initdram (int board_type) -{ - volatile immap_t *immap = (immap_t *) CONFIG_SYS_IMMR; - volatile memctl8xx_t *memctl = &immap->im_memctl; - long int size10; - - upmconfig (UPMA, (uint *) sdram_table, - sizeof (sdram_table) / sizeof (uint)); - - /* Refresh clock prescalar */ - memctl->memc_mptpr = CONFIG_SYS_MPTPR; - - memctl->memc_mar = 0x00000000; - - /* Map controller banks 1 to the SDRAM bank */ - memctl->memc_or1 = CONFIG_SYS_OR1_PRELIM; - memctl->memc_br1 = CONFIG_SYS_BR1_PRELIM; - - memctl->memc_mamr = CONFIG_SYS_MAMR_10COL & (~(MAMR_PTAE)); /* no refresh yet */ - - udelay (200); - - /* perform SDRAM initializsation sequence */ - - memctl->memc_mcr = 0x80002230; /* SDRAM bank 0 - refresh twice */ - udelay (1); - - memctl->memc_mamr |= MAMR_PTAE; /* enable refresh */ - - udelay (1000); - - /* Check Bank 0 Memory Size - * try 10 column mode - */ - - size10 = dram_size (CONFIG_SYS_MAMR_10COL, SDRAM_BASE_PRELIM, - SDRAM_MAX_SIZE); - - return (size10); -} - -/* ------------------------------------------------------------------------- */ - -/* - * Check memory range for valid RAM. A simple memory test determines - * the actually available RAM size between addresses `base' and - * `base + maxsize'. Some (not all) hardware errors are detected: - * - short between address lines - * - short between data lines - */ - -static long int dram_size (long int mamr_value, long int *base, long int maxsize) -{ - volatile immap_t *immap = (immap_t *) CONFIG_SYS_IMMR; - volatile memctl8xx_t *memctl = &immap->im_memctl; - - memctl->memc_mamr = mamr_value; - - return (get_ram_size(base, maxsize)); -} -/*----------------------------------------------------------------------------- - * aschex_to_byte -- - *----------------------------------------------------------------------------- - */ -static unsigned char aschex_to_byte (unsigned char *cp) -{ - u_char byte, c; - - c = *cp++; - - if ((c >= 'A') && (c <= 'F')) { - c -= 'A'; - c += 10; - } else if ((c >= 'a') && (c <= 'f')) { - c -= 'a'; - c += 10; - } else { - c -= '0'; - } - - byte = c * 16; - - c = *cp; - - if ((c >= 'A') && (c <= 'F')) { - c -= 'A'; - c += 10; - } else if ((c >= 'a') && (c <= 'f')) { - c -= 'a'; - c += 10; - } else { - c -= '0'; - } - - byte += c; - - return (byte); -} diff --git a/board/RPXClassic/eccx.c b/board/RPXClassic/eccx.c deleted file mode 100644 index 766a19eb1e8..00000000000 --- a/board/RPXClassic/eccx.c +++ /dev/null @@ -1,335 +0,0 @@ -/* - * (C) Copyright 2002 - * Stäubli Faverges - - * Pierre AUBERT p.aubert@staubli.com - * - * SPDX-License-Identifier: GPL-2.0+ - */ -/* Video support for the ECCX daughter board */ - - -#include -#include - -#ifdef CONFIG_VIDEO_SED13806 -#include - - -/* Screen configurations: the initialization of the SD13806 depends on - screen and on display mode. We handle only 8bpp and 16 bpp modes */ - -/* ECCX board is supplied with a NEC NL6448BC20 screen */ -#ifdef CONFIG_NEC_NL6448BC20 -#define DISPLAY_WIDTH 640 -#define DISPLAY_HEIGHT 480 - -#ifdef CONFIG_VIDEO_SED13806_8BPP -static const S1D_REGS init_regs [] = -{ - {0x0001,0x00}, /* Miscellaneous Register */ - {0x01FC,0x00}, /* Display Mode Register */ - {0x0004,0x1b}, /* General IO Pins Configuration Register 0 */ - {0x0005,0x00}, /* General IO Pins Configuration Register 1 */ - {0x0008,0xe5}, /* General IO Pins Control Register 0 */ - {0x0009,0x1f}, /* General IO Pins Control Register 1 */ - {0x0010,0x02}, /* Memory Clock Configuration Register */ - {0x0014,0x10}, /* LCD Pixel Clock Configuration Register */ - {0x0018,0x02}, /* CRT/TV Pixel Clock Configuration Register */ - {0x001C,0x02}, /* MediaPlug Clock Configuration Register */ - {0x001E,0x01}, /* CPU To Memory Wait State Select Register */ - {0x0021,0x04}, /* DRAM Refresh Rate Register */ - {0x002A,0x00}, /* DRAM Timings Control Register 0 */ - {0x002B,0x01}, /* DRAM Timings Control Register 1 */ - {0x0020,0x80}, /* Memory Configuration Register */ - {0x0030,0x25}, /* Panel Type Register */ - {0x0031,0x00}, /* MOD Rate Register */ - {0x0032,0x4F}, /* LCD Horizontal Display Width Register */ - {0x0034,0x13}, /* LCD Horizontal Non-Display Period Register */ - {0x0035,0x01}, /* TFT FPLINE Start Position Register */ - {0x0036,0x0B}, /* TFT FPLINE Pulse Width Register */ - {0x0038,0xDF}, /* LCD Vertical Display Height Register 0 */ - {0x0039,0x01}, /* LCD Vertical Display Height Register 1 */ - {0x003A,0x2C}, /* LCD Vertical Non-Display Period Register */ - {0x003B,0x00}, /* TFT FPFRAME Start Position Register */ - {0x003C,0x01}, /* TFT FPFRAME Pulse Width Register */ - {0x0040,0x03}, /* LCD Display Mode Register */ - {0x0041,0x02}, /* LCD Miscellaneous Register */ - {0x0042,0x00}, /* LCD Display Start Address Register 0 */ - {0x0043,0x00}, /* LCD Display Start Address Register 1 */ - {0x0044,0x00}, /* LCD Display Start Address Register 2 */ - {0x0046,0x40}, /* LCD Memory Address Offset Register 0 */ - {0x0047,0x01}, /* LCD Memory Address Offset Register 1 */ - {0x0048,0x00}, /* LCD Pixel Panning Register */ - {0x004A,0x00}, /* LCD Display FIFO High Threshold Control Register */ - {0x004B,0x00}, /* LCD Display FIFO Low Threshold Control Register */ - {0x0050,0x4F}, /* CRT/TV Horizontal Display Width Register */ - {0x0052,0x13}, /* CRT/TV Horizontal Non-Display Period Register */ - {0x0053,0x01}, /* CRT/TV HRTC Start Position Register */ - {0x0054,0x0B}, /* CRT/TV HRTC Pulse Width Register */ - {0x0056,0xDF}, /* CRT/TV Vertical Display Height Register 0 */ - {0x0057,0x01}, /* CRT/TV Vertical Display Height Register 1 */ - {0x0058,0x2B}, /* CRT/TV Vertical Non-Display Period Register */ - {0x0059,0x09}, /* CRT/TV VRTC Start Position Register */ - {0x005A,0x01}, /* CRT/TV VRTC Pulse Width Register */ - {0x005B,0x00}, /* TV Output Control Register */ - {0x0060,0x03}, /* CRT/TV Display Mode Register */ - {0x0062,0x00}, /* CRT/TV Display Start Address Register 0 */ - {0x0063,0x00}, /* CRT/TV Display Start Address Register 1 */ - {0x0064,0x00}, /* CRT/TV Display Start Address Register 2 */ - {0x0066,0x40}, /* CRT/TV Memory Address Offset Register 0 */ - {0x0067,0x01}, /* CRT/TV Memory Address Offset Register 1 */ - {0x0068,0x00}, /* CRT/TV Pixel Panning Register */ - {0x006A,0x00}, /* CRT/TV Display FIFO High Threshold Control Register */ - {0x006B,0x00}, /* CRT/TV Display FIFO Low Threshold Control Register */ - {0x0070,0x00}, /* LCD Ink/Cursor Control Register */ - {0x0071,0x00}, /* LCD Ink/Cursor Start Address Register */ - {0x0072,0x00}, /* LCD Cursor X Position Register 0 */ - {0x0073,0x00}, /* LCD Cursor X Position Register 1 */ - {0x0074,0x00}, /* LCD Cursor Y Position Register 0 */ - {0x0075,0x00}, /* LCD Cursor Y Position Register 1 */ - {0x0076,0x00}, /* LCD Ink/Cursor Blue Color 0 Register */ - {0x0077,0x00}, /* LCD Ink/Cursor Green Color 0 Register */ - {0x0078,0x00}, /* LCD Ink/Cursor Red Color 0 Register */ - {0x007A,0x1F}, /* LCD Ink/Cursor Blue Color 1 Register */ - {0x007B,0x3F}, /* LCD Ink/Cursor Green Color 1 Register */ - {0x007C,0x1F}, /* LCD Ink/Cursor Red Color 1 Register */ - {0x007E,0x00}, /* LCD Ink/Cursor FIFO Threshold Register */ - {0x0080,0x00}, /* CRT/TV Ink/Cursor Control Register */ - {0x0081,0x00}, /* CRT/TV Ink/Cursor Start Address Register */ - {0x0082,0x00}, /* CRT/TV Cursor X Position Register 0 */ - {0x0083,0x00}, /* CRT/TV Cursor X Position Register 1 */ - {0x0084,0x00}, /* CRT/TV Cursor Y Position Register 0 */ - {0x0085,0x00}, /* CRT/TV Cursor Y Position Register 1 */ - {0x0086,0x00}, /* CRT/TV Ink/Cursor Blue Color 0 Register */ - {0x0087,0x00}, /* CRT/TV Ink/Cursor Green Color 0 Register */ - {0x0088,0x00}, /* CRT/TV Ink/Cursor Red Color 0 Register */ - {0x008A,0x1F}, /* CRT/TV Ink/Cursor Blue Color 1 Register */ - {0x008B,0x3F}, /* CRT/TV Ink/Cursor Green Color 1 Register */ - {0x008C,0x1F}, /* CRT/TV Ink/Cursor Red Color 1 Register */ - {0x008E,0x00}, /* CRT/TV Ink/Cursor FIFO Threshold Register */ - {0x0100,0x00}, /* BitBlt Control Register 0 */ - {0x0101,0x00}, /* BitBlt Control Register 1 */ - {0x0102,0x00}, /* BitBlt ROP Code/Color Expansion Register */ - {0x0103,0x00}, /* BitBlt Operation Register */ - {0x0104,0x00}, /* BitBlt Source Start Address Register 0 */ - {0x0105,0x00}, /* BitBlt Source Start Address Register 1 */ - {0x0106,0x00}, /* BitBlt Source Start Address Register 2 */ - {0x0108,0x00}, /* BitBlt Destination Start Address Register 0 */ - {0x0109,0x00}, /* BitBlt Destination Start Address Register 1 */ - {0x010A,0x00}, /* BitBlt Destination Start Address Register 2 */ - {0x010C,0x00}, /* BitBlt Memory Address Offset Register 0 */ - {0x010D,0x00}, /* BitBlt Memory Address Offset Register 1 */ - {0x0110,0x00}, /* BitBlt Width Register 0 */ - {0x0111,0x00}, /* BitBlt Width Register 1 */ - {0x0112,0x00}, /* BitBlt Height Register 0 */ - {0x0113,0x00}, /* BitBlt Height Register 1 */ - {0x0114,0x00}, /* BitBlt Background Color Register 0 */ - {0x0115,0x00}, /* BitBlt Background Color Register 1 */ - {0x0118,0x00}, /* BitBlt Foreground Color Register 0 */ - {0x0119,0x00}, /* BitBlt Foreground Color Register 1 */ - {0x01E0,0x00}, /* Look-Up Table Mode Register */ - {0x01E2,0x00}, /* Look-Up Table Address Register */ - {0x01E4,0x00}, /* Look-Up Table Data Register */ - {0x01F0,0x10}, /* Power Save Configuration Register */ - {0x01F1,0x00}, /* Power Save Status Register */ - {0x01F4,0x00}, /* CPU-to-Memory Access Watchdog Timer Register */ - {0x01FC,0x01}, /* Display Mode Register */ - {0, 0} -}; -#endif /* CONFIG_VIDEO_SED13806_8BPP */ - -#ifdef CONFIG_VIDEO_SED13806_16BPP - -static const S1D_REGS init_regs [] = -{ - {0x0001,0x00}, /* Miscellaneous Register */ - {0x01FC,0x00}, /* Display Mode Register */ - {0x0004,0x1b}, /* General IO Pins Configuration Register 0 */ - {0x0005,0x00}, /* General IO Pins Configuration Register 1 */ - {0x0008,0xe5}, /* General IO Pins Control Register 0 */ - {0x0009,0x1f}, /* General IO Pins Control Register 1 */ - {0x0010,0x02}, /* Memory Clock Configuration Register */ - {0x0014,0x10}, /* LCD Pixel Clock Configuration Register */ - {0x0018,0x02}, /* CRT/TV Pixel Clock Configuration Register */ - {0x001C,0x02}, /* MediaPlug Clock Configuration Register */ - {0x001E,0x01}, /* CPU To Memory Wait State Select Register */ - {0x0021,0x04}, /* DRAM Refresh Rate Register */ - {0x002A,0x00}, /* DRAM Timings Control Register 0 */ - {0x002B,0x01}, /* DRAM Timings Control Register 1 */ - {0x0020,0x80}, /* Memory Configuration Register */ - {0x0030,0x25}, /* Panel Type Register */ - {0x0031,0x00}, /* MOD Rate Register */ - {0x0032,0x4F}, /* LCD Horizontal Display Width Register */ - {0x0034,0x13}, /* LCD Horizontal Non-Display Period Register */ - {0x0035,0x01}, /* TFT FPLINE Start Position Register */ - {0x0036,0x0B}, /* TFT FPLINE Pulse Width Register */ - {0x0038,0xDF}, /* LCD Vertical Display Height Register 0 */ - {0x0039,0x01}, /* LCD Vertical Display Height Register 1 */ - {0x003A,0x2C}, /* LCD Vertical Non-Display Period Register */ - {0x003B,0x00}, /* TFT FPFRAME Start Position Register */ - {0x003C,0x01}, /* TFT FPFRAME Pulse Width Register */ - {0x0040,0x05}, /* LCD Display Mode Register */ - {0x0041,0x02}, /* LCD Miscellaneous Register */ - {0x0042,0x00}, /* LCD Display Start Address Register 0 */ - {0x0043,0x00}, /* LCD Display Start Address Register 1 */ - {0x0044,0x00}, /* LCD Display Start Address Register 2 */ - {0x0046,0x80}, /* LCD Memory Address Offset Register 0 */ - {0x0047,0x02}, /* LCD Memory Address Offset Register 1 */ - {0x0048,0x00}, /* LCD Pixel Panning Register */ - {0x004A,0x00}, /* LCD Display FIFO High Threshold Control Register */ - {0x004B,0x00}, /* LCD Display FIFO Low Threshold Control Register */ - {0x0050,0x4F}, /* CRT/TV Horizontal Display Width Register */ - {0x0052,0x13}, /* CRT/TV Horizontal Non-Display Period Register */ - {0x0053,0x01}, /* CRT/TV HRTC Start Position Register */ - {0x0054,0x0B}, /* CRT/TV HRTC Pulse Width Register */ - {0x0056,0xDF}, /* CRT/TV Vertical Display Height Register 0 */ - {0x0057,0x01}, /* CRT/TV Vertical Display Height Register 1 */ - {0x0058,0x2B}, /* CRT/TV Vertical Non-Display Period Register */ - {0x0059,0x09}, /* CRT/TV VRTC Start Position Register */ - {0x005A,0x01}, /* CRT/TV VRTC Pulse Width Register */ - {0x005B,0x00}, /* TV Output Control Register */ - {0x0060,0x05}, /* CRT/TV Display Mode Register */ - {0x0062,0x00}, /* CRT/TV Display Start Address Register 0 */ - {0x0063,0x00}, /* CRT/TV Display Start Address Register 1 */ - {0x0064,0x00}, /* CRT/TV Display Start Address Register 2 */ - {0x0066,0x80}, /* CRT/TV Memory Address Offset Register 0 */ - {0x0067,0x02}, /* CRT/TV Memory Address Offset Register 1 */ - {0x0068,0x00}, /* CRT/TV Pixel Panning Register */ - {0x006A,0x00}, /* CRT/TV Display FIFO High Threshold Control Register */ - {0x006B,0x00}, /* CRT/TV Display FIFO Low Threshold Control Register */ - {0x0070,0x00}, /* LCD Ink/Cursor Control Register */ - {0x0071,0x00}, /* LCD Ink/Cursor Start Address Register */ - {0x0072,0x00}, /* LCD Cursor X Position Register 0 */ - {0x0073,0x00}, /* LCD Cursor X Position Register 1 */ - {0x0074,0x00}, /* LCD Cursor Y Position Register 0 */ - {0x0075,0x00}, /* LCD Cursor Y Position Register 1 */ - {0x0076,0x00}, /* LCD Ink/Cursor Blue Color 0 Register */ - {0x0077,0x00}, /* LCD Ink/Cursor Green Color 0 Register */ - {0x0078,0x00}, /* LCD Ink/Cursor Red Color 0 Register */ - {0x007A,0x1F}, /* LCD Ink/Cursor Blue Color 1 Register */ - {0x007B,0x3F}, /* LCD Ink/Cursor Green Color 1 Register */ - {0x007C,0x1F}, /* LCD Ink/Cursor Red Color 1 Register */ - {0x007E,0x00}, /* LCD Ink/Cursor FIFO Threshold Register */ - {0x0080,0x00}, /* CRT/TV Ink/Cursor Control Register */ - {0x0081,0x00}, /* CRT/TV Ink/Cursor Start Address Register */ - {0x0082,0x00}, /* CRT/TV Cursor X Position Register 0 */ - {0x0083,0x00}, /* CRT/TV Cursor X Position Register 1 */ - {0x0084,0x00}, /* CRT/TV Cursor Y Position Register 0 */ - {0x0085,0x00}, /* CRT/TV Cursor Y Position Register 1 */ - {0x0086,0x00}, /* CRT/TV Ink/Cursor Blue Color 0 Register */ - {0x0087,0x00}, /* CRT/TV Ink/Cursor Green Color 0 Register */ - {0x0088,0x00}, /* CRT/TV Ink/Cursor Red Color 0 Register */ - {0x008A,0x1F}, /* CRT/TV Ink/Cursor Blue Color 1 Register */ - {0x008B,0x3F}, /* CRT/TV Ink/Cursor Green Color 1 Register */ - {0x008C,0x1F}, /* CRT/TV Ink/Cursor Red Color 1 Register */ - {0x008E,0x00}, /* CRT/TV Ink/Cursor FIFO Threshold Register */ - {0x0100,0x00}, /* BitBlt Control Register 0 */ - {0x0101,0x00}, /* BitBlt Control Register 1 */ - {0x0102,0x00}, /* BitBlt ROP Code/Color Expansion Register */ - {0x0103,0x00}, /* BitBlt Operation Register */ - {0x0104,0x00}, /* BitBlt Source Start Address Register 0 */ - {0x0105,0x00}, /* BitBlt Source Start Address Register 1 */ - {0x0106,0x00}, /* BitBlt Source Start Address Register 2 */ - {0x0108,0x00}, /* BitBlt Destination Start Address Register 0 */ - {0x0109,0x00}, /* BitBlt Destination Start Address Register 1 */ - {0x010A,0x00}, /* BitBlt Destination Start Address Register 2 */ - {0x010C,0x00}, /* BitBlt Memory Address Offset Register 0 */ - {0x010D,0x00}, /* BitBlt Memory Address Offset Register 1 */ - {0x0110,0x00}, /* BitBlt Width Register 0 */ - {0x0111,0x00}, /* BitBlt Width Register 1 */ - {0x0112,0x00}, /* BitBlt Height Register 0 */ - {0x0113,0x00}, /* BitBlt Height Register 1 */ - {0x0114,0x00}, /* BitBlt Background Color Register 0 */ - {0x0115,0x00}, /* BitBlt Background Color Register 1 */ - {0x0118,0x00}, /* BitBlt Foreground Color Register 0 */ - {0x0119,0x00}, /* BitBlt Foreground Color Register 1 */ - {0x01E0,0x01}, /* Look-Up Table Mode Register */ - {0x01E2,0x00}, /* Look-Up Table Address Register */ - {0x01E4,0x00}, /* Look-Up Table Data Register */ - {0x01F0,0x10}, /* Power Save Configuration Register */ - {0x01F1,0x00}, /* Power Save Status Register */ - {0x01F4,0x00}, /* CPU-to-Memory Access Watchdog Timer Register */ - {0x01FC,0x01}, /* Display Mode Register */ - {0, 0} -}; - -#endif /* CONFIG_VIDEO_SED13806_16BPP */ -#endif /* CONFIG_NEC_NL6448BC20 */ - - -#ifdef CONFIG_CONSOLE_EXTRA_INFO - -/*----------------------------------------------------------------------------- - * video_get_info_str -- setup a board string: type, speed, etc. - * line_number= location to place info string beside logo - * info= buffer for info string - *----------------------------------------------------------------------------- - */ -void video_get_info_str (int line_number, char *info) -{ - if (line_number == 1) { - strcpy (info, " RPXClassic board"); - } - else { - info [0] = '\0'; - } - -} -#endif - -/*----------------------------------------------------------------------------- - * board_video_init -- init de l'EPSON, config du CS - *----------------------------------------------------------------------------- - */ -unsigned int board_video_init (void) -{ - volatile immap_t *immap = (immap_t *)CONFIG_SYS_IMMR; - volatile memctl8xx_t *memctl = &immap->im_memctl; - - /* Program ECCX registers */ - *(ECCX_CSR12) |= ECCX_860; - *(ECCX_CSR8) |= ECCX_BE | ECCX_CS2; - *(ECCX_CSR8) |= ECCX_ENEPSON; - - memctl->memc_or2 = SED13806_OR; - memctl->memc_br2 = SED13806_REG_ADDR | SED13806_ACCES; - - return (SED13806_REG_ADDR); -} - -/*----------------------------------------------------------------------------- - * board_validate_screen -- - *----------------------------------------------------------------------------- - */ -void board_validate_screen (unsigned int base) -{ - /* Activate the panel bias power */ - *(volatile unsigned char *)(base + REG_GPIO_CTRL) = 0x80; -} -/*----------------------------------------------------------------------------- - * board_get_regs -- - *----------------------------------------------------------------------------- - */ -const S1D_REGS *board_get_regs (void) -{ - return (init_regs); -} -/*----------------------------------------------------------------------------- - * board_get_width -- - *----------------------------------------------------------------------------- - */ -int board_get_width (void) -{ - return (DISPLAY_WIDTH); -} - -/*----------------------------------------------------------------------------- - * board_get_height -- - *----------------------------------------------------------------------------- - */ -int board_get_height (void) -{ - return (DISPLAY_HEIGHT); -} - -#endif /* CONFIG_VIDEO_SED13806 */ diff --git a/board/RPXClassic/flash.c b/board/RPXClassic/flash.c deleted file mode 100644 index 97ffa68aa21..00000000000 --- a/board/RPXClassic/flash.c +++ /dev/null @@ -1,431 +0,0 @@ -/* - * (C) Copyright 2001 - * Stäubli Faverges - - * Pierre AUBERT p.aubert@staubli.com - * U-Boot port on RPXClassic LF (CLLF_BW31) board - * - * RPXClassic uses Am29DL323B flash memory with 2 banks - * - * - * (C) Copyright 2000 - * Wolfgang Denk, DENX Software Engineering, wd@denx.de. - * - * SPDX-License-Identifier: GPL-2.0+ - */ - - -#include -#include - -flash_info_t flash_info[CONFIG_SYS_MAX_FLASH_BANKS]; /* info for FLASH chips */ - -/*----------------------------------------------------------------------- - * Functions - */ -static ulong flash_get_size (vu_long *addr, flash_info_t *info); -static int write_word (flash_info_t *info, ulong dest, ulong data); -static void flash_get_offsets (ulong base, flash_info_t *info); - -/*----------------------------------------------------------------------- - */ - -unsigned long flash_init (void) -{ - unsigned long size_b0 ; - int i; - - /* Init: no FLASHes known */ - for (i=0; i= CONFIG_SYS_FLASH_BASE - /* monitor protection ON by default */ - flash_protect(FLAG_PROTECT_SET, - CONFIG_SYS_MONITOR_BASE, - CONFIG_SYS_MONITOR_BASE+monitor_flash_len-1, - &flash_info[0]); -#endif - - flash_info[0].size = size_b0; - - return (size_b0); -} - -/*----------------------------------------------------------------------- - */ -static void flash_get_offsets (ulong base, flash_info_t *info) -{ - int i; - - if (info->flash_id & FLASH_BTYPE) { - /* set sector offsets for bottom boot block type */ - info->start[0] = base + 0x00000000; - info->start[1] = base + 0x00008000; - info->start[2] = base + 0x00010000; - info->start[3] = base + 0x00018000; - info->start[4] = base + 0x00020000; - info->start[5] = base + 0x00028000; - info->start[6] = base + 0x00030000; - info->start[7] = base + 0x00038000; - for (i = 8; i < info->sector_count; i++) { - info->start[i] = base + ((i-7) * 0x00040000) ; - } - } -} - -/*----------------------------------------------------------------------- - */ -void flash_print_info (flash_info_t *info) -{ - int i; - - if (info->flash_id == FLASH_UNKNOWN) { - printf ("missing or unknown FLASH type\n"); - return; - } - - switch (info->flash_id & FLASH_VENDMASK) { - case FLASH_MAN_AMD: printf ("AMD "); break; - default: printf ("Unknown Vendor "); break; - } - - switch (info->flash_id & FLASH_TYPEMASK) { - case FLASH_AMDL323B: - printf ("AMDL323DB (16 Mbytes, bottom boot sect)\n"); - break; - default: - printf ("Unknown Chip Type\n"); - break; - } - - printf (" Size: %ld MB in %d Sectors\n", - info->size >> 20, info->sector_count); - - printf (" Sector Start Addresses:"); - for (i=0; isector_count; ++i) { - if ((i % 5) == 0) - printf ("\n "); - printf (" %08lX%s", - info->start[i], - info->protect[i] ? " (RO)" : " " - ); - } - printf ("\n"); -} - -/*----------------------------------------------------------------------- - */ - - -/*----------------------------------------------------------------------- - */ - -/* - * The following code cannot be run from FLASH! - */ - -static ulong flash_get_size (vu_long *addr, flash_info_t *info) -{ - short i; - ulong value; - ulong base = (ulong)addr; - - /* Reset flash componeny */ - addr [0] = 0xf0f0f0f0; - - /* Write auto select command: read Manufacturer ID */ - addr[0xAAA] = 0xAAAAAAAA ; - addr[0x555] = 0x55555555 ; - addr[0xAAA] = 0x90909090 ; - - value = addr[0] ; - - switch (value & 0x00FF00FF) { - case AMD_MANUFACT: - info->flash_id = FLASH_MAN_AMD; - break; - default: - info->flash_id = FLASH_UNKNOWN; - info->sector_count = 0; - info->size = 0; - return (0); /* no or unknown flash */ - } - - value = addr[2] ; /* device ID */ - - switch (value & 0x00FF00FF) { - case (AMD_ID_DL323B & 0x00FF00FF): - info->flash_id += FLASH_AMDL323B; - info->sector_count = 71; - info->size = 0x01000000; /* 16 Mb */ - - break; - default: - info->flash_id = FLASH_UNKNOWN; - return (0); /* => no or unknown flash */ - - } - /* set up sector start address table */ - /* set sector offsets for bottom boot block type */ - info->start[0] = base + 0x00000000; - info->start[1] = base + 0x00008000; - info->start[2] = base + 0x00010000; - info->start[3] = base + 0x00018000; - info->start[4] = base + 0x00020000; - info->start[5] = base + 0x00028000; - info->start[6] = base + 0x00030000; - info->start[7] = base + 0x00038000; - for (i = 8; i < info->sector_count; i++) { - info->start[i] = base + ((i-7) * 0x00040000) ; - } - - /* check for protected sectors */ - for (i = 0; i < 23; i++) { - /* read sector protection at sector address, (A7 .. A0) = 0x02 */ - /* D0 = 1 if protected */ - addr = (volatile unsigned long *)(info->start[i]); - info->protect[i] = addr[4] & 1 ; - } - /* Check for protected sectors in the 2nd bank */ - addr[0x100AAA] = 0xAAAAAAAA ; - addr[0x100555] = 0x55555555 ; - addr[0x100AAA] = 0x90909090 ; - - for (i = 23; i < info->sector_count; i++) { - /* read sector protection at sector address, (A7 .. A0) = 0x02 */ - /* D0 = 1 if protected */ - addr = (volatile unsigned long *)(info->start[i]); - info->protect[i] = addr[4] & 1 ; - } - - /* - * Prevent writes to uninitialized FLASH. - */ - if (info->flash_id != FLASH_UNKNOWN) { - addr = (volatile unsigned long *)info->start[0]; - - *addr = 0xF0F0F0F0; /* reset bank 1 */ - addr = (volatile unsigned long *)info->start[23]; - - *addr = 0xF0F0F0F0; /* reset bank 2 */ - - } - - return (info->size); -} - - -/*----------------------------------------------------------------------- - */ - -int flash_erase (flash_info_t *info, int s_first, int s_last) -{ - vu_long *addr = (vu_long*)(info->start[0]); - int flag, prot, sect, l_sect; - ulong start, now, last; - - if ((s_first < 0) || (s_first > s_last)) { - if (info->flash_id == FLASH_UNKNOWN) { - printf ("- missing\n"); - } else { - printf ("- no sectors to erase\n"); - } - return 1; - } - - if ((info->flash_id == FLASH_UNKNOWN) || - (info->flash_id > FLASH_AMD_COMP)) { - printf ("Can't erase unknown flash type %08lx - aborted\n", - info->flash_id); - return 1; - } - - prot = 0; - for (sect=s_first; sect<=s_last; ++sect) { - if (info->protect[sect]) { - prot++; - } - } - - if (prot) { - printf ("- Warning: %d protected sectors will not be erased!\n", - prot); - } else { - printf ("\n"); - } - - l_sect = -1; - - /* Disable interrupts which might cause a timeout here */ - flag = disable_interrupts(); - - addr[0xAAA] = 0xAAAAAAAA; - addr[0x555] = 0x55555555; - addr[0xAAA] = 0x80808080; - addr[0xAAA] = 0xAAAAAAAA; - addr[0x555] = 0x55555555; - - /* Start erase on unprotected sectors */ - for (sect = s_first; sect<=s_last; sect++) { - if (info->protect[sect] == 0) { /* not protected */ - addr = (vu_long *)(info->start[sect]) ; - addr[0] = 0x30303030 ; - l_sect = sect; - } - } - - /* re-enable interrupts if necessary */ - if (flag) - enable_interrupts(); - - /* wait at least 80us - let's wait 1 ms */ - udelay (1000); - - /* - * We wait for the last triggered sector - */ - if (l_sect < 0) - goto DONE; - - start = get_timer (0); - last = start; - addr = (vu_long *)(info->start[l_sect]); - while ((addr[0] & 0x80808080) != 0x80808080) { - if ((now = get_timer(start)) > CONFIG_SYS_FLASH_ERASE_TOUT) { - printf ("Timeout\n"); - return 1; - } - /* show that we're waiting */ - if ((now - last) > 1000) { /* every second */ - putc ('.'); - last = now; - } - } - -DONE: - /* reset to read mode */ - addr = (vu_long *)info->start[0]; - addr[0] = 0xF0F0F0F0; /* reset bank */ - - printf (" done\n"); - return 0; -} - -/*----------------------------------------------------------------------- - * Copy memory to flash, returns: - * 0 - OK - * 1 - write timeout - * 2 - Flash not erased - */ - -int write_buff (flash_info_t *info, uchar *src, ulong addr, ulong cnt) -{ - ulong cp, wp, data; - int i, l, rc; - - wp = (addr & ~3); /* get lower word aligned address */ - - /* - * handle unaligned start bytes - */ - if ((l = addr - wp) != 0) { - data = 0; - for (i=0, cp=wp; i0; ++i) { - data = (data << 8) | *src++; - --cnt; - ++cp; - } - for (; cnt==0 && i<4; ++i, ++cp) { - data = (data << 8) | (*(uchar *)cp); - } - - if ((rc = write_word(info, wp, data)) != 0) { - return (rc); - } - wp += 4; - } - - /* - * handle word aligned part - */ - while (cnt >= 4) { - data = 0; - for (i=0; i<4; ++i) { - data = (data << 8) | *src++; - } - if ((rc = write_word(info, wp, data)) != 0) { - return (rc); - } - wp += 4; - cnt -= 4; - } - - if (cnt == 0) { - return (0); - } - - /* - * handle unaligned tail bytes - */ - data = 0; - for (i=0, cp=wp; i<4 && cnt>0; ++i, ++cp) { - data = (data << 8) | *src++; - --cnt; - } - for (; i<4; ++i, ++cp) { - data = (data << 8) | (*(uchar *)cp); - } - - return (write_word(info, wp, data)); -} - -/*----------------------------------------------------------------------- - * Write a word to Flash, returns: - * 0 - OK - * 1 - write timeout - * 2 - Flash not erased - */ -static int write_word (flash_info_t *info, ulong dest, ulong data) -{ - vu_long *addr = (vu_long *)(info->start[0]); - ulong start; - int flag; - - /* Check if Flash is (sufficiently) erased */ - if ((*((vu_long *)dest) & data) != data) { - return (2); - } - /* Disable interrupts which might cause a timeout here */ - flag = disable_interrupts(); - - addr[0xAAA] = 0xAAAAAAAA; - addr[0x555] = 0x55555555; - addr[0xAAA] = 0xA0A0A0A0; - - *((vu_long *)dest) = data; - - /* re-enable interrupts if necessary */ - if (flag) - enable_interrupts(); - - /* data polling for D7 */ - start = get_timer (0); - while ((*((vu_long *)dest) & 0x80808080) != (data & 0x80808080)) { - if (get_timer(start) > CONFIG_SYS_FLASH_WRITE_TOUT) { - return (1); - } - } - return (0); -} - -/*----------------------------------------------------------------------- - */ diff --git a/board/RPXClassic/u-boot.lds b/board/RPXClassic/u-boot.lds deleted file mode 100644 index 0eb2fba00c2..00000000000 --- a/board/RPXClassic/u-boot.lds +++ /dev/null @@ -1,82 +0,0 @@ -/* - * (C) Copyright 2000-2010 - * Wolfgang Denk, DENX Software Engineering, wd@denx.de. - * - * SPDX-License-Identifier: GPL-2.0+ - */ - -OUTPUT_ARCH(powerpc) - -SECTIONS -{ - /* Read-only sections, merged into text segment: */ - . = + SIZEOF_HEADERS; - .text : - { - arch/powerpc/cpu/mpc8xx/start.o (.text*) - arch/powerpc/cpu/mpc8xx/traps.o (.text*) - - *(.text*) - } - _etext = .; - PROVIDE (etext = .); - .rodata : - { - *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) - } - - /* Read-write section, merged into data segment: */ - . = (. + 0x00FF) & 0xFFFFFF00; - _erotext = .; - PROVIDE (erotext = .); - .reloc : - { - _GOT2_TABLE_ = .; - KEEP(*(.got2)) - KEEP(*(.got)) - PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4); - _FIXUP_TABLE_ = .; - KEEP(*(.fixup)) - } - __got2_entries = ((_GLOBAL_OFFSET_TABLE_ - _GOT2_TABLE_) >> 2) - 1; - __fixup_entries = (. - _FIXUP_TABLE_)>>2; - - .data : - { - *(.data*) - *(.sdata*) - } - _edata = .; - PROVIDE (edata = .); - - . = .; - - . = ALIGN(4); - .u_boot_list : { - KEEP(*(SORT(.u_boot_list*))); - } - - - . = .; - __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) : - { - *(.bss*) - *(.sbss*) - *(COMMON) - . = ALIGN(4); - } - __bss_end = . ; - PROVIDE (end = .); -} diff --git a/board/RPXClassic/u-boot.lds.debug b/board/RPXClassic/u-boot.lds.debug deleted file mode 100644 index b9c84c77d64..00000000000 --- a/board/RPXClassic/u-boot.lds.debug +++ /dev/null @@ -1,121 +0,0 @@ -/* - * (C) Copyright 2000 - * Wolfgang Denk, DENX Software Engineering, wd@denx.de. - * - * SPDX-License-Identifier: GPL-2.0+ - */ - -OUTPUT_ARCH(powerpc) -/* Do we need any of these for elf? - __DYNAMIC = 0; */ -SECTIONS -{ - /* 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 */ - - arch/powerpc/cpu/mpc8xx/start.o (.text) - common/dlmalloc.o (.text) - lib/vsprintf.o (.text) - lib/crc32.o (.text) - - . = env_offset; - common/env_embedded.o(.text) - - *(.text) - *(.got1) - } - _etext = .; - PROVIDE (etext = .); - .rodata : - { - *(.rodata) - *(.rodata1) - *(.rodata.str1.4) - *(.eh_frame) - } - .fini : { *(.fini) } =0 - .ctors : { *(.ctors) } - .dtors : { *(.dtors) } - - /* Read-write section, merged into data segment: */ - . = (. + 0x0FFF) & 0xFFFFF000; - _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 = .); - - - . = ALIGN(4); - .u_boot_list : { - KEEP(*(SORT(.u_boot_list*))); - } - - - __start___ex_table = .; - __ex_table : { *(__ex_table) } - __stop___ex_table = .; - - . = ALIGN(4096); - __init_begin = .; - .text.init : { *(.text.init) } - .data.init : { *(.data.init) } - . = ALIGN(4096); - __init_end = .; - - __bss_start = .; - .bss : - { - *(.sbss) *(.scommon) - *(.dynbss) - *(.bss) - *(COMMON) - } - __bss_end = . ; - PROVIDE (end = .); -} diff --git a/board/RPXlite/Makefile b/board/RPXlite/Makefile deleted file mode 100644 index c17cbacf329..00000000000 --- a/board/RPXlite/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -# -# (C) Copyright 2000-2006 -# Wolfgang Denk, DENX Software Engineering, wd@denx.de. -# -# SPDX-License-Identifier: GPL-2.0+ -# - -obj-y = RPXlite.o flash.o diff --git a/board/RPXlite/README b/board/RPXlite/README deleted file mode 100644 index 3ca671126d4..00000000000 --- a/board/RPXlite/README +++ /dev/null @@ -1,877 +0,0 @@ -# Porting U-Boot onto RPXlite board -# Written by Yoo. Jonghoon -# E-Mail : yooth@ipone.co.kr -# IP ONE Inc. - -# Since 2001. 1. 29 - -# Shell : bash -# Cross-compile tools : Montavista Hardhat -# Debugging tools : Windriver VisionProbe (PowerPC BDM) -# ppcboot ver. : ppcboot-0.8.1 - -############################################################### -# 1. Hardware setting -############################################################### - -1.1. Board, BDM settings - Install board, BDM, connect each other - -1.2. Save Register value - Boot with board-on monitor program and save the - register values with BDM. - -1.3. Configure flash programmer - Check flash memory area in the memory map. - 0xFFC00000 - 0xFFFFFFFF - - Boot monitor program is at - 0xFFF00000 - - You can program on-board flash memory with VisionClick - flash programmer. Set the target flash device as: - - 29DL800B - - (?) The flash memory device in the board *is* 29LV800B, - but I cannot program it with '29LV800B' option. - (in VisionClick flash programming tools) - I don't know why... - -1.4. Save boot monitor program *IMPORTANT* - Upload boot monitor program from board to file. - boot monitor program starts at 0xFFF00000 - -1.5. Test flash memory programming - Try to erase boot program in the flash memory, - and re-write them. - *WARNING* YOU MUST SAVE BOOT PROGRAM TO FILE - BEFORE ERASING FLASH - -############################################################### -# 2. U-Boot setting -############################################################### - -2.1. Download U-Boot tarball at - ftp://ftp.denx.de - (The latest version is ppcboot-0.8.1.tar.bz2) - - To extract the archive use the following syntax : - > bzip2 -cd ppcboot-0.8.1.tar.bz2 | tar xf - - -2.2. Add the following lines in '.profile' - export PATH=$PATH:/opt/hardhat/devkit/ppc/8xx/bin - -2.3. Make board specific config, for example: - > cd ppcboot-0.8.1 - > make TQM860L_config - - Now we can build ppcboot bin files. - After make all, you must see these files in your - ppcboot root directory. - - ppcboot - ppcboot.bin - ppcboot.srec - ppcboot.map - -2.4. Make your own board directory into the - ppcboot-0.8.1/board - and make your board-specific files here. - - For exmanple, tqm8xx files are composed of - .depend : Nothing - Makefile : To make config file - config.mk : Sets base address - flash.c : Flash memory control files - ppcboot.lds : linker(ld) script? (I don't know this yet) - tqm8xx.c : DRAM control and board check routines - - And, add your board config lines in the - ppcboot-0.8.1/Makefile - - Finally, add config_(your board).h file in the - ppcboot-0.8.1/include/ - - I've made board/rpxlite directory, and just copied - tqm8xx settings for now. - - Rebuild ppcboot for rpxlite board: - > make rpxlite_config - > make - -############################################################### -# 3. U-Boot porting -############################################################### - -3.1. My RPXlite files are based on tqm8xx board files. - > cd board - > cp -r tqm8xx RPXLITE - > cd RPXLITE - > mv tqm8xx.c RPXLITE.c - > cd ../../include - > cp config_tqm8xx.h config_RPXLITE.h - -3.2. Modified files are: - board/RPXLITE/RPXLITE.c /* DRAM-related routines */ - board/RPXLITE/flash.c /* flash-related routines */ - board/RPXLITE/config.mk /* set text base address */ - arch/powerpc/cpu/mpc8xx/serial.c /* board specific register setting */ - include/config_RPXLITE.h /* board specific registers */ - - See 'reg_config.txt' for register values in detail. - -############################################################### -# 4. Running Linux -############################################################### - - -############################################################### -# Misc Information -############################################################### - -mem_config.txt: -=============== - -Flash memory device : AM29LV800BB (1Mx8Bit) x 4 device -manufacturer id : 01 (AMD) -device id : 5B (AM29LV800B) -size : 4Mbyte -sector # : 19 - -Sector information : - -number start addr. size -00 FFC0_0000 64 -01 FFC1_0000 32 -02 FFC1_8000 32 -03 FFC2_0000 128 -04 FFC4_0000 256 -05 FFC8_0000 256 -06 FFCC_0000 256 -07 FFD0_0000 256 -08 FFD4_0000 256 -09 FFD8_0000 256 -10 FFDC_0000 256 -11 FFE0_0000 256 -12 FFE4_0000 256 -13 FFE8_0000 256 -14 FFEC_0000 256 -15 FFF0_0000 256 -16 FFF4_0000 256 -17 FFF8_0000 256 -18 FFFC_0000 256 - - -reg_config.txt: -=============== - - -/*------------------------------------------------------------------- */ -/*------------------------------------------------------------------- */ -/* SIU (System Interface Unit) */ -/* */ -/*------------------------------------------------------------------- */ -/*------------------------------------------------------------------- */ - - -/*### IMMR */ -/*### Internal Memory Map Register */ -/*### Chap. 11.4.1 */ - - ISB = 0xFA20 /* Set the Immap base = 0xFA20 0000 */ - PARTNUM = 0x21 - MASKNUM = 0x00 - - => 0xFA20 2100 - ---------------------------------------------------------------------- - -/*### SIUMCR */ -/*### SIU Module Configuration Register */ -/*### Chap. 11.4.2 */ -/*### Offset : 0x0000 0000 */ - - EARB = 0 - EARP = 0 - DSHW = 0 - DBGC = 0 - DBPC = 0 - FRC = 0 - DLK = 0 - OPAR = 0 - PNCS = 0 - DPC = 0 - MPRE = 0 - MLRC = 10 /* ~KR/~RETRY/~IRQ4/SPKROUT functions as ~KR/~TRTRY */ - AEME = 0 - SEME = 0 - BSC = 0 - GB5E = 0 - B2DD = 0 - B3DD = 0 - - => 0x0000 0800 - ---------------------------------------------------------------------- - -/*### SYPCR */ -/*### System Protection Control Register */ -/*### Chap. 11.4.3 */ -/*### Offset : 0x0000 0004 */ - - SWTC = 0xFFFF /* SW watchdog timer count = 0xFFFF */ - BMT = 0x06 /* BUS monitoring timing */ - BME = 1 /* BUS monitor enable */ - SWF = 1 - SWE = 0 /* SW watchdog disable */ - SWRI = 0 - SWP = 1 - - => 0xFFFF 0689 - ---------------------------------------------------------------------- - -/*### TESR */ -/*### Transfer Error Status Register */ -/*### Chap. 11.4.4 */ -/*### Offset : 0x0000 0020 */ - - IEXT = 0 - ITMT = 0 - IPB = 0000 - DEXT = 0 - DTMT = 0 - DPB = 0000 - - => 0x0000 0000 - ---------------------------------------------------------------------- - -/*### SIPEND */ -/*### SIU Interrupt Pending Register */ -/*### Chap. 11.5.4.1 */ -/*### Offset : 0x0000 0010 */ - - IRQ0~IRQ7 = 0 - LVL0~LVL7 = 0 - - => 0x0000 0000 - ---------------------------------------------------------------------- - -/*### SIMASK */ -/*### SIU Interrupt Mask Register */ -/*### Chap. 11.5.4.2 */ -/*### Offset : 0x0000 0014 */ - - IRM0~IRM7 = 0 /* Mask all interrupts */ - LVL0~LVL7 = 0 - - => 0x0000 0000 - ---------------------------------------------------------------------- - -/*### SIEL */ -/*### SIU Interrupt Edge/Level Register */ -/*### Chap. 11.5.4.3 */ -/*### Offset : 0x0000 0018 */ - - ED0~ED7 = 0 /* Low level triggered */ - WMn0~WMn7 = 0 /* Not allowed to exit from low-power mode */ - - => 0x0000 0000 - ---------------------------------------------------------------------- - -/*### SIVEC */ -/*### SIU Interrupt Vector Register */ -/*### Chap. 11.5.4.4 */ -/*### Offset : 0x0000 001C */ - - INTC = 3C /* The lowest interrupt is pending..(?) */ - - => 0x3C00 0000 - ---------------------------------------------------------------------- - -/*### SWSR */ -/*### Software Service Register */ -/*### Chap. 11.7.1 */ -/*### Offset : 0x0000 001E */ - - SEQ = 0 - - => 0x0000 - ---------------------------------------------------------------------- - -/*### SDCR */ -/*### SDMA Configuration Register */ -/*### Chap. 20.2.1 */ -/*### Offset : 0x0000 0032 */ - - FRZ = 0 - RAID = 01 /* Priority level 5 (BR5) (normal operation) */ - - => 0x0000 0001 - - -/*------------------------------------------------------------------- */ -/*------------------------------------------------------------------- */ -/* UPMA (User Programmable Machine A) */ -/* */ -/*------------------------------------------------------------------- */ -/*------------------------------------------------------------------- */ - -/*### Chap. 16.6.4.1 */ -/*### Offset = 0x0000 017c */ - - T0 = CFFF CC24 /* Single Read */ - T1 = 0FFF CC04 - T2 = 0CAF CC04 - T3 = 03AF CC08 - T4 = 3FBF CC27 /* last */ - T5 = FFFF CC25 - T6 = FFFF CC25 - T7 = FFFF CC25 - T8 = CFFF CC24 /* Burst Read */ - T9 = 0FFF CC04 - T10 = 0CAF CC84 - T11 = 03AF CC88 - T12 = 3FBF CC27 /* last */ - T13 = FFFF CC25 - T14 = FFFF CC25 - T15 = FFFF CC25 - T16 = FFFF CC25 - T17 = FFFF CC25 - T18 = FFFF CC25 - T19 = FFFF CC25 - T20 = FFFF CC25 - T21 = FFFF CC25 - T22 = FFFF CC25 - T23 = FFFF CC25 - T24 = CFFF CC24 /* Single Write */ - T25 = 0FFF CC04 - T26 = 0CFF CC04 - T27 = 03FF CC00 - T28 = 3FFF CC27 /* last */ - T29 = FFFF CC25 - T30 = FFFF CC25 - T31 = FFFF CC25 - T32 = CFFF CC24 /* Burst Write */ - T33 = 0FFF CC04 - T34 = 0CFF CC80 - T35 = 03FF CC8C - T36 = 0CFF CC00 - T37 = 33FF CC27 /* last */ - T38 = FFFF CC25 - T39 = FFFF CC25 - T40 = FFFF CC25 - T41 = FFFF CC25 - T42 = FFFF CC25 - T43 = FFFF CC25 - T44 = FFFF CC25 - T45 = FFFF CC25 - T46 = FFFF CC25 - T47 = FFFF CC25 - T48 = C0FF CC24 /* Refresh */ - T49 = 03FF CC24 - T50 = 0FFF CC24 - T51 = 0FFF CC24 - T52 = 3FFF CC27 /* last */ - T53 = FFFF CC25 - T54 = FFFF CC25 - T55 = FFFF CC25 - T56 = FFFF CC25 - T57 = FFFF CC25 - T58 = FFFF CC25 - T59 = FFFF CC25 - T60 = FFFF CC25 /* Exception */ - T61 = FFFF CC25 - T62 = FFFF CC25 - T63 = FFFF CC25 - - -/*------------------------------------------------------------------- */ -/*------------------------------------------------------------------- */ -/* UPMB */ -/* */ -/*------------------------------------------------------------------- */ -/*------------------------------------------------------------------- */ ---------------------------------------------------------------------- - -/*### Chap. 16.6.4.1 */ - - -/*------------------------------------------------------------------- */ -/*------------------------------------------------------------------- */ -/* MEMC */ -/* */ -/*------------------------------------------------------------------- */ -/*------------------------------------------------------------------- */ ---------------------------------------------------------------------- - -/*### BR0 & OR0 */ -/*### Base Registers & Option Registers */ -/*### Chap. 16.4.1 & 16.4.2 */ -/*### Offset : BR0(0x0000 0100) & OR0(0x0000 0104) */ -/*### Flash memory */ - - BA = 1111 1110 0000 0000 0 /* Base addr = 0xFE00 0000 */ - AT = 000 - PS = 00 - PARE = 0 - WP = 0 - MS = 0 /* GPCM */ - V = 1 /* Valid */ - - => 0xFE00 0001 - - AM = 1111 1110 0000 0000 0 /* 32MBytes */ - ATM = 000 - CSNT/SAM = 0 - ACS/G5LA,G5LS = 00 - BIH = 1 /* Burst inhibited */ - SCY = 0100 /* cycle length = 4 */ - SETA = 0 - TRLX = 0 - EHTR = 0 - - => 0xFE00 0140 - -/*### BR1 & OR1 */ -/*### Base Registers & Option Registers */ -/*### Chap. 16.4.1 & 16.4.2 */ -/*### Offset : BR1(0x0000 0108) & OR1(0x0000 010C) */ -/*### SDRAM */ - - BA = 0000 0000 0000 0000 0 /* Base addr = 0x0000 0000 */ - AT = 000 - PS = 00 - PARE = 0 - WP = 0 - MS = 1 /* UPMA */ - V = 1 /* Valid */ - - => 0x0000 0081 - - AM = 1111 1110 0000 0000 /* 32MBytes */ - ATM = 000 - CSNT/SAM = 1 - ACS/G5LA,G5LS = 11 - BIH = 0 - SCY = 0000 /* cycle length = 0 */ - SETA = 0 - TRLX = 0 - EHTR = 0 - - => 0xFE00 0E00 - -/*### BR2 & OR2 */ -/*### Base Registers & Option Registers */ -/*### Chap. 16.4.1 & 16.4.2 */ -/*### Offset : BR2(0x0000 0110) & OR2(0x0000 0114) */ - - BR2 & OR2 = 0x0000 0000 /* Not used */ - -/*### BR3 & OR3 */ -/*### Base Registers & Option Registers */ -/*### Chap. 16.4.1 & 16.4.2 */ -/*### Offset : BR3(0x0000 0118) & OR3(0x0000 011C) */ -/*### BCSR */ - - BA = 1111 1010 0100 0000 0 /* Base addr = 0xFA40 0000 */ - AT = 000 - PS = 00 - PARE = 0 - WP = 0 - MS = 0 /* GPCM */ - V = 1 /* Valid */ - - => 0xFA40 0001 - - AM = 1111 1111 0111 1111 1 /* (?) */ - ATM = 000 - CSNT/SAM = 1 - ACS/G5LA,G5LS = 00 - BIH = 1 /* Burst inhibited */ - SCY = 0001 /* cycle length = 1 */ - SETA = 0 - TRLX = 0 - - => 0xFF7F 8910 - -/*### BR4 & OR4 */ -/*### Base Registers & Option Registers */ -/*### Chap. 16.4.1 & 16.4.2 */ -/*### Offset : BR4(0x0000 0120) & OR4(0x0000 0124) */ -/*### NVRAM & SRAM */ - - BA = 1111 1010 0000 0000 0 /* Base addr = 0xFA00 0000 */ - AT = 000 - PS = 01 - PARE = 0 - WP = 0 - MS = 0 /* GPCM */ - V = 1 /* Valid */ - - => 0xFA00 0401 - - AM = 1111 1111 1111 1000 0 /* 8MByte */ - ATM = 000 - CSNT/SAM = 1 - ACS/G5LA,G5LS = 00 - BIH = 1 /* Burst inhibited */ - SCY = 0111 /* cycle length = 7 */ - SETA = 0 - TRLX = 0 - - => 0xFFF8 0970 - -/*### BR5 & OR5 */ -/*### Base Registers & Option Registers */ -/*### Chap. 16.4.1 & 16.4.2 */ -/*### Offset : BR2(0x0000 0128) & OR2(0x0000 012C) */ - - BR5 & OR5 = 0x0000 0000 /* Not used */ - -/*### BR6 & OR6 */ -/*### Base Registers & Option Registers */ -/*### Chap. 16.4.1 & 16.4.2 */ -/*### Offset : BR2(0x0000 0130) & OR2(0x0000 0134) */ - - BR6 & OR6 = 0x0000 0000 /* Not used */ - -/*### BR7 & OR7 */ -/*### Base Registers & Option Registers */ -/*### Chap. 16.4.1 & 16.4.2 */ -/*### Offset : BR7(0x0000 0138) & OR7(0x0000 013C) */ - - BR7 & OR7 = 0x0000 0000 /* Not used */ - -/*### MAR */ -/*### Memory Address Register */ -/*### Chap. 16.4.7 */ -/*### Offset : 0x0000 0164 */ - - MA = External memory address - -/*### MCR */ -/*### Memory Command Register */ -/*### Chap. 16.4.5 */ -/*### Offset : 0x0000 0168 */ - - OP = xx /* Command op code */ - UM = 1 /* Select UPMA */ - MB = 001 /* Select CS1 */ - MCLF = xxxx /* Loop times */ - MAD = xx xxxx /* Memory array index */ - -/*### MAMR */ -/*### Machine A Mode Register */ -/*### Chap. 16.4.4 */ -/*### Offset : 0x0000 0170 */ - - PTA = 0101 1000 - PTAE = 1 /* Periodic timer A enabled */ - AMA = 010 - DSA = 00 - G0CLA = 000 - GPLA4DIS = 1 - RLFA = 0100 - WLFA = 0011 - TLFA = 0000 - - => 0x58A0 1430 - -/*### MBMR */ -/*### Machine B Mode Register */ -/*### Chap. 16.4.4 */ -/*### Offset : 0x0000 0174 */ - - PTA = 0100 1110 - PTAE = 0 /* Periodic timer B disabled */ - AMA = 000 - DSA = 00 - G0CLA = 000 - GPLA4DIS = 1 - RLFA = 0000 - WLFA = 0000 - TLFA = 0000 - - => 0x4E00 1000 - -/*### MSTAT */ -/*### Memory Status Register */ -/*### Chap. 16.4.3 */ -/*### Offset : 0x0000 0178 */ - - PER0~PER7 = Parity error - WPER = Write protection error - - => 0x0000 - -/*### MPTPR */ -/*### Memory Periodic Timer Prescaler Register */ -/*### Chap. 16.4.8 */ -/*### Offset : 0x0000 017A */ - - PTP = 0000 1000 /* Divide by 8 */ - - => 0x0800 - -/*### MDR */ -/*### Memory Data Register */ -/*### Chap. 16.4.6 */ -/*### Offset : 0x0000 017C */ - - MD = Memory data contains the RAM array word - - -/*------------------------------------------------------------------- */ -/*------------------------------------------------------------------- */ -/* TIMERS */ -/* */ -/*------------------------------------------------------------------- */ -/*------------------------------------------------------------------- */ ---------------------------------------------------------------------- - -/*### TBREFx */ -/*### Timebase Reference Registers */ -/*### Chap. 11.9.2 */ -/*### Offset : TBREFF0(0x0000 0204)/TBREFF1(0x0000 0208) */ -/*### (Locked) */ - - TBREFF0 = 0xFFFF FFFF - TBREFF1 = 0xFFFF FFFF - ---------------------------------------------------------------------- - -/*### TBSCR */ -/*### Timebase Status and Control Registers */ -/*### Chap. 11.9.3 */ -/*### Offset : 0x0000 0200 */ -/*### (Locked) */ - - TBIRQ = 00000000 - REF0 = 0 - REF1 = 0 - REFE0 = 0 /* Reference interrupt disable */ - REFE1 = 0 - TBF = 1 - TBE = 1 /* Timebase enable */ - - => 0x0003 - ---------------------------------------------------------------------- - -/*### RTCSC */ -/*### Real-Time Clock Status and Control Registers */ -/*### Chap. 11.10.1 */ -/*### Offset : 0x0000 0220 */ -/*### (Locked) */ - - RTCIRQ = 00000000 - SEC = 1 - ALR = 0 - 38K = 0 /* PITRTCLK is driven by 32.768KHz */ - SIE = 0 - ALE = 0 - RTF = 0 - RTE = 1 /* Real-Time clock enabled */ - - => 0x0081 - ---------------------------------------------------------------------- - -/*### RTC */ -/*### Real-Time Clock Registers */ -/*### Chap. 11.10.2 */ -/*### Offset : 0x0000 0224 */ -/*### (Locked) */ - - RTC = Real time clock measured in second - ---------------------------------------------------------------------- - -/*### RTCAL */ -/*### Real-Time Clock Alarm Registers */ -/*### Chap. 11.10.3 */ -/*### Offset : 0x0000 022C */ -/*### (Locked) */ - - ALARM = 0xFFFF FFFF - ---------------------------------------------------------------------- - -/*### RTSEC */ -/*### Real-Time Clock Alarm Second Registers */ -/*### Chap. 11.10.4 */ -/*### Offset : 0x0000 0228 */ -/*### (Locked) */ - - COUNTER = Counter bits(fraction of a second) - ---------------------------------------------------------------------- - -/*### PISCR */ -/*### Periodic Interrupt Status and Control Register */ -/*### Chap. 11.11.1 */ -/*### Offset : 0x0000 0240 */ -/*### (Locked) */ - - PIRQ = 0 - PS = 0 /* Write 1 to clear */ - PIE = 0 - PITF = 1 - PTE = 0 /* PIT disabled */ - ---------------------------------------------------------------------- - -/*### PITC */ -/*### PIT Count Register */ -/*### Chap. 11.11.2 */ -/*### Offset : 0x0000 0244 */ -/*### (Locked) */ - - PITC = PIT count - ---------------------------------------------------------------------- - -/*### PITR */ -/*### PIT Register */ -/*### Chap. 11.11.3 */ -/*### Offset : 0x0000 0248 */ -/*### (Locked) */ - - PIT = PIT count /* Read only */ - - -/*------------------------------------------------------------------- */ -/*------------------------------------------------------------------- */ -/* CLOCKS */ -/* */ -/*------------------------------------------------------------------- */ -/*------------------------------------------------------------------- */ ---------------------------------------------------------------------- - - ---------------------------------------------------------------------- - -/*### SCCR */ -/*### System Clock and Reset Control Register */ -/*### Chap. 15.6.1 */ -/*### Offset : 0x0000 0280 */ -/*### (Locked) */ - - COM = 11 /* Clock output disabled */ - TBS = 1 /* Timebase frequency source is GCLK2 divided by 16 */ - RTDIV = 0 /* The clock is divided by 4 */ - RTSEL = 0 /* OSCM(Crystal oscillator) is selected */ - CRQEN = 0 - PRQEN = 0 - EBDF = 00 /* CLKOUT is GCLK2 divided by 1 */ - DFSYNC = 00 /* Divided by 1 (normal operation) */ - DFBRG = 00 /* Divided by 1 (normal operation) */ - DFNL = 000 - DFNH = 000 - - => 0x6200 0000 - ---------------------------------------------------------------------- - -/*### PLPRCR */ -/*### PLL, Low-Power, and Reset Control Register */ -/*### Chap. 15.6.2 */ -/*### Offset : 0x0000 0284 */ -/*### (Locked) */ - - MF = 0x005 /* 48MHz (?) ( = 8MHz * (MF+1) ) */ - SPLSS = 0 - TEXPS = 0 - TMIST = 0 - CSRC = 0 /* The general system clock is generated by the DFNH field */ - LPM = 00 /* Normal high/normal low mode */ - CSR = 0 - LOLRE = 0 - FIOPD = 0 - - => 0x0050 0000 - ---------------------------------------------------------------------- - -/*### RSR */ -/*### Reset Status Register */ -/*### Chap. 12.2 */ -/*### Offset : 0x0000 0288 */ -/*### (Locked) */ - - EHRS = External hard reset - ESRS = External soft reset - LLRS = Loss-of-lock reset - SWRS = Software watchdog reset - CSRS = Check stop reset - DBHRS = Debug port hard reset - DBSRS = Debug port soft reset - JTRS = JTAG reset - - -/*------------------------------------------------------------------- */ -/*------------------------------------------------------------------- */ -/* DMA */ -/* */ -/*------------------------------------------------------------------- */ -/*------------------------------------------------------------------- */ ---------------------------------------------------------------------- - -/*### SDSR */ -/*### SDMA Status Register */ -/*### Chap. 20.2.2 */ -/*### Offset : 0x0000 0908 */ - - SBER = 0 /* SDMA channel bus error */ - DSP2 = 0 /* DSP chain2 (Tx) interrupt */ - DSP1 = 0 /* DSP chain1 (Rx) interrupt */ - - => 0x00 - -/*### SDMR */ -/*### SDMA Mask Register */ -/*### Chap. 20.2.3 */ -/*### Offset : 0x0000 090C */ - - SBER = 0 - DSP2 = 0 - DSP1 = 0 /* All interrupts are masked */ - - => 0x00 - -/*### SDAR */ -/*### SDMA Address Register */ -/*### Chap. 20.2.4 */ -/*### Offset : 0x0000 0904 */ - - AR = 0xxxxx xxxx /* current system address */ - - => 0xFA20 23AC - -/*### IDSRx */ -/*### IDMA Status Register */ -/*### Chap. 20.3.3.2 */ -/*### Offset : IDSR1(0x0000 0910) & IDSR2(0x0000 0918) */ - - AD = 0 - DONE = 0 - OB = 0 - - => 0x00 - -/*### IDMRx */ -/*### IDMA Mask Register */ -/*### Chap. 20.3.3.3 */ -/*### Offset : IDMR1(0x0000 0914) & IDMR2(0x0000 091C) */ - - AD = 0 - DONE = 0 - OB = 0 diff --git a/board/RPXlite/README.PlanetCore b/board/RPXlite/README.PlanetCore deleted file mode 100644 index b73c5f5a87d..00000000000 --- a/board/RPXlite/README.PlanetCore +++ /dev/null @@ -1,163 +0,0 @@ -After several heart-struck failure, I got one workable way to program -each other in FLASH between PlanetCore and U-Boot. - -Hardware Platform : RPXlite DW(EP 823 H1 DW) - -1. From U-Boot to PlanetCore - -Utilities : PlanetCore Boot Loader - PCL200.mot - -[root@sam tftpboot]# ppc_8xx-objcopy -O ppcboot -PCL200.mot pcl200.bin - -[Target Operation] -u-boot>t 100000 pcl200.bin -u-boot>go 0x100000 -## Starting application at 0x00100000 ... - -MPC8xx PlanetCore Flash Burner v2.00 -Copyright 2001 Embedded Planet. All rights reserved. - -Construct Flash Device.....done. - - -Program MPC8xx PlanetCore Boot Loader v2.00 -Built Sep 19, 2001 at 14:34:42 -Image located from FC000000 to FC01B5D1. -(Skipping an image, only loading low boot image) - -Low boot board detected, skipping high boot image. -Erasing, programming and verifying will start in 20 -seconds -Press P to start immediately or ESC to cancel -Press Space or Enter for more options. -.............. - -Erasing -Programming -FLASH programmed successfully! -Press R to induce a hard reset - -MPC8xx PlanetCore Boot Loader v2.00 -Copyright 2001 Embedded Planet. All rights reserved. -DRAM available size = 64 MB -wvCV -DRAM OK -> - -2. From PlanetCore to U-Boot - -Utilities : PlanetCore FLASH Burner - PCB200.mot - -Use Flash Burner to finish the work: - -First, TFTP the U-Boot image file to RAM; For example, -RPXlite_DW.bin to 0x400000 -Second, TFTP FLASH Burner to RAM; For example, -0x100000 -Third, run the FLASH Burner and Program the U-Boot -image into the correct location in FLASH. - -[Target Operation] -MPC8xx PlanetCore Boot Loader v2.00 -Copyright 2001 Embedded Planet. All rights reserved. -DRAM available size = 64 MB -wvCV -DRAM OK ->t -Load using tftp via Ethernet -Enter server IP address <172.16.115.6> : -Enter server filename : RPXlite_DW.bin -Enter (B)inary or (S)record input mode : B -Enter address offset : <00400000 hex> : - -Total bytes = 120096 in 232184 uSecs -Loaded addresses 00400000 through 0041D51F. -Start address = 00400000 ->t -Load using tftp via Ethernet -Enter server IP address <172.16.115.6> : -Enter server filename : PCB200.mot -Enter (B)inary or (S)record input mode : S -Enter address offset : <00000000 hex> : -.512.1024..2048....4096..... -Total bytes = 326280 in 2570249 uSecs -Loaded addresses 00100000 through 0011BB51. -Start address = 00100000 ->go -[Go 00100000] - -MPC8xx PlanetCore Flash Burner v2.00 -Copyright 2001 Embedded Planet. All rights reserved. - -Construct Flash Device.....done. - -Bad start address -Start = 0xFFFFFFFF, target = 0xFFFFFFFF, length = -0xFFFFFFFF -Forcing Menu Interface - -h[elp] Show commands. -c[ode] Show information on code to be loaded. -di[splay] Display all flash sections. -du[mp] Dump memory. d ? for more info. -e[rase] Erase flash sections. -f[ill] Fill flash sections. -im[age] Toggle load high, low, or both flash -images. -in[fo] Show flash information. -ma[p] Show memory map. -mo[dify] Modify memory. m ? for more info. -p[rogram] Erase, program, and verify now. -reset Restart the loader. -s[how] Show flash sections to erase and program. -t[est] Test flash sections. -q[uit] Quit without programming. -#program 400000 ff000000 1D51F -doProgram( 400000 ff000000 1D51F ) - -Start = 0x00400000, target = 0xFF000000, length = -0x0001D51F -Erasing sector 0xFF000000, length 0x008000. -Erasing sector 0xFF008000, length 0x008000. -Erasing sector 0xFF010000, length 0x008000. -Erasing sector 0xFF018000, length 0x008000. -Programming FF000000 through FF01D51E -FLASH programmed successfully! -Press R to induce a hard reset - -Forcing Hard Reset by MachineCheck and -ResetOnCheckstop... - -U-Boot 1.1.2 (Aug 29 2004 - 15:11:27) - -CPU: PPC823EZTnnB2 at 48 MHz: 16 kB I-Cache 8 kB -D-Cache -Board: RPXlite_DW -DRAM: 64 MB -FLASH: 16 MB -*** Warning - bad CRC, using default environment - -In: serial -Out: serial -Err: serial -Net: SCC ETHERNET -u-boot> - -------------------------------------------------- - -Well, sometimes network function of PlanetCore couldn't work when -switching from U-Boot to PlanetCore. For example, you couldn't -download a file from HOST PC via TFTP. Don't worry, just restart your -HOST PC and everything would work as smooth as clockwork. I don't -know the reason WHY:-) - -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Merry Christmas and Happy New Year! - -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -===== -Best regards, - -Sam diff --git a/board/RPXlite/RPXlite.c b/board/RPXlite/RPXlite.c deleted file mode 100644 index 08575a4930c..00000000000 --- a/board/RPXlite/RPXlite.c +++ /dev/null @@ -1,149 +0,0 @@ -/* - * (C) Copyright 2000 - * Wolfgang Denk, DENX Software Engineering, wd@denx.de. - * - * SPDX-License-Identifier: GPL-2.0+ - */ - -/* - * Yoo. Jonghoon, IPone, yooth@ipone.co.kr - * U-Boot port on RPXlite board - * - * DRAM related UPMA register values are modified. - * See RPXLite engineering note : 50MHz/60ns - UPM RAM WORDS - */ - -#include -#include - -/* ------------------------------------------------------------------------- */ - -static long int dram_size (long int, long int *, long int); - -/* ------------------------------------------------------------------------- */ - -#define _NOT_USED_ 0xFFFFCC25 - -const uint sdram_table[] = { - /* - * Single Read. (Offset 00h in UPMA RAM) - */ - 0xCFFFCC24, 0x0FFFCC04, 0X0CAFCC04, 0X03AFCC08, - 0x3FBFCC27, /* last */ - _NOT_USED_, _NOT_USED_, _NOT_USED_, - - /* - * Burst Read. (Offset 08h in UPMA RAM) - */ - 0xCFFFCC24, 0x0FFFCC04, 0x0CAFCC84, 0x03AFCC88, - 0x3FBFCC27, /* last */ - _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_, - _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_, - _NOT_USED_, _NOT_USED_, _NOT_USED_, - - /* - * Single Write. (Offset 18h in UPMA RAM) - */ - 0xCFFFCC24, 0x0FFFCC04, 0x0CFFCC04, 0x03FFCC00, - 0x3FFFCC27, /* last */ - _NOT_USED_, _NOT_USED_, _NOT_USED_, - - /* - * Burst Write. (Offset 20h in UPMA RAM) - */ - 0xCFFFCC24, 0x0FFFCC04, 0x0CFFCC80, 0x03FFCC8C, - 0x0CFFCC00, 0x33FFCC27, /* last */ - _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_, - _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_, - _NOT_USED_, _NOT_USED_, - - /* - * Refresh. (Offset 30h in UPMA RAM) - */ - 0xC0FFCC24, 0x03FFCC24, 0x0FFFCC24, 0x0FFFCC24, - 0x3FFFCC27, /* last */ - _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_, - _NOT_USED_, _NOT_USED_, _NOT_USED_, - - /* - * Exception. (Offset 3Ch in UPMA RAM) - */ - _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_ -}; - -/* ------------------------------------------------------------------------- */ - - -/* - * Check Board Identity: - */ - -int checkboard (void) -{ - puts ("Board: RPXlite\n"); - return (0); -} - -/* ------------------------------------------------------------------------- */ - -phys_size_t initdram (int board_type) -{ - volatile immap_t *immap = (immap_t *) CONFIG_SYS_IMMR; - volatile memctl8xx_t *memctl = &immap->im_memctl; - long int size10; - - upmconfig (UPMA, (uint *) sdram_table, - sizeof (sdram_table) / sizeof (uint)); - - /* Refresh clock prescalar */ - memctl->memc_mptpr = CONFIG_SYS_MPTPR; - - memctl->memc_mar = 0x00000000; - - /* Map controller banks 1 to the SDRAM bank */ - memctl->memc_or1 = CONFIG_SYS_OR1_PRELIM; - memctl->memc_br1 = CONFIG_SYS_BR1_PRELIM; - - memctl->memc_mamr = CONFIG_SYS_MAMR_10COL & (~(MAMR_PTAE)); /* no refresh yet */ - - udelay (200); - - /* perform SDRAM initializsation sequence */ - - memctl->memc_mcr = 0x80002230; /* SDRAM bank 0 - refresh twice */ - udelay (1); - - memctl->memc_mamr |= MAMR_PTAE; /* enable refresh */ - - udelay (1000); - - /* Check Bank 0 Memory Size - * try 10 column mode - */ - - size10 = dram_size (CONFIG_SYS_MAMR_10COL, SDRAM_BASE_PRELIM, - SDRAM_MAX_SIZE); - - return (size10); -} - -/* ------------------------------------------------------------------------- */ - -/* - * Check memory range for valid RAM. A simple memory test determines - * the actually available RAM size between addresses `base' and - * `base + maxsize'. Some (not all) hardware errors are detected: - * - short between address lines - * - short between data lines - */ - -static long int dram_size (long int mamr_value, long int *base, - long int maxsize) -{ - volatile immap_t *immap = (immap_t *) CONFIG_SYS_IMMR; - volatile memctl8xx_t *memctl = &immap->im_memctl; - - memctl->memc_mamr = mamr_value; - - return (get_ram_size (base, maxsize)); -} diff --git a/board/RPXlite/flash.c b/board/RPXlite/flash.c deleted file mode 100644 index 21b11d4e90c..00000000000 --- a/board/RPXlite/flash.c +++ /dev/null @@ -1,508 +0,0 @@ -/* - * (C) Copyright 2000 - * Wolfgang Denk, DENX Software Engineering, wd@denx.de. - * - * SPDX-License-Identifier: GPL-2.0+ - */ - -/* - * Yoo. Jonghoon, IPone, yooth@ipone.co.kr - * U-Boot port on RPXlite board - * - * Some of flash control words are modified. (from 2x16bit device - * to 4x8bit device) - * RPXLite board I tested has only 4 AM29LV800BB devices. Other devices - * are not tested. - * - * (?) Does an RPXLite board which - * does not use AM29LV800 flash memory exist ? - * I don't know... - */ - -#include -#include - -flash_info_t flash_info[CONFIG_SYS_MAX_FLASH_BANKS]; /* info for FLASH chips */ - -/*----------------------------------------------------------------------- - * Functions - */ -static ulong flash_get_size (vu_long *addr, flash_info_t *info); -static int write_word (flash_info_t *info, ulong dest, ulong data); -static void flash_get_offsets (ulong base, flash_info_t *info); - -/*----------------------------------------------------------------------- - */ - -unsigned long flash_init (void) -{ -/* volatile immap_t *immap = (immap_t *)CONFIG_SYS_IMMR; */ -/* volatile memctl8xx_t *memctl = &immap->im_memctl; */ - unsigned long size_b0 ; - int i; - - /* Init: no FLASHes known */ - for (i=0; imemc_or0 = CONFIG_SYS_OR_TIMING_FLASH | (-size_b0 & 0xFFFF8000); - memctl->memc_br0 = (CONFIG_SYS_FLASH_BASE & BR_BA_MSK) | BR_MS_GPCM | BR_V; -%%%*/ - /* Re-do sizing to get full correct info */ - - size_b0 = flash_get_size((vu_long *)CONFIG_SYS_FLASH_BASE, &flash_info[0]); - flash_get_offsets (CONFIG_SYS_FLASH_BASE, &flash_info[0]); - -#if CONFIG_SYS_MONITOR_BASE >= CONFIG_SYS_FLASH_BASE - /* monitor protection ON by default */ - flash_protect(FLAG_PROTECT_SET, - CONFIG_SYS_MONITOR_BASE, - CONFIG_SYS_MONITOR_BASE+monitor_flash_len-1, - &flash_info[0]); -#endif - - flash_info[0].size = size_b0; - - return (size_b0); -} - -/*----------------------------------------------------------------------- - */ -static void flash_get_offsets (ulong base, flash_info_t *info) -{ - int i; - - /* set up sector start address table */ - if (info->flash_id & FLASH_BTYPE) { - /* set sector offsets for bottom boot block type */ - info->start[0] = base + 0x00000000; - info->start[1] = base + 0x00010000; - info->start[2] = base + 0x00018000; - info->start[3] = base + 0x00020000; - for (i = 4; i < info->sector_count; i++) { - info->start[i] = base + ((i-3) * 0x00040000) ; - } - } else { - /* set sector offsets for top boot block type */ - i = info->sector_count - 1; - info->start[i--] = base + info->size - 0x00010000; - info->start[i--] = base + info->size - 0x00018000; - info->start[i--] = base + info->size - 0x00020000; - for (; i >= 0; i--) { - info->start[i] = base + i * 0x00040000; - } - } - -} - -/*----------------------------------------------------------------------- - */ -void flash_print_info (flash_info_t *info) -{ - int i; - - if (info->flash_id == FLASH_UNKNOWN) { - printf ("missing or unknown FLASH type\n"); - return; - } - - switch (info->flash_id & FLASH_VENDMASK) { - case FLASH_MAN_AMD: printf ("AMD "); break; - case FLASH_MAN_FUJ: printf ("FUJITSU "); break; - default: printf ("Unknown Vendor "); break; - } - - switch (info->flash_id & FLASH_TYPEMASK) { - case FLASH_AM400B: printf ("AM29LV400B (4 Mbit, bottom boot sect)\n"); - break; - case FLASH_AM400T: printf ("AM29LV400T (4 Mbit, top boot sector)\n"); - break; - case FLASH_AM800B: printf ("AM29LV800B (8 Mbit, bottom boot sect)\n"); - break; - case FLASH_AM800T: printf ("AM29LV800T (8 Mbit, top boot sector)\n"); - break; - case FLASH_AM160B: printf ("AM29LV160B (16 Mbit, bottom boot sect)\n"); - break; - case FLASH_AM160T: printf ("AM29LV160T (16 Mbit, top boot sector)\n"); - break; - case FLASH_AM320B: printf ("AM29LV320B (32 Mbit, bottom boot sect)\n"); - break; - case FLASH_AM320T: printf ("AM29LV320T (32 Mbit, top boot sector)\n"); - break; - default: printf ("Unknown Chip Type\n"); - break; - } - - printf (" Size: %ld MB in %d Sectors\n", - info->size >> 20, info->sector_count); - - printf (" Sector Start Addresses:"); - for (i=0; isector_count; ++i) { - if ((i % 5) == 0) - printf ("\n "); - printf (" %08lX%s", - info->start[i], - info->protect[i] ? " (RO)" : " " - ); - } - printf ("\n"); - return; -} - -/*----------------------------------------------------------------------- - */ - - -/*----------------------------------------------------------------------- - */ - -/* - * The following code cannot be run from FLASH! - */ - -static ulong flash_get_size (vu_long *addr, flash_info_t *info) -{ - short i; - ulong value; - ulong base = (ulong)addr; - - /* Write auto select command: read Manufacturer ID */ - addr[0xAAA] = 0x00AA00AA ; - addr[0x555] = 0x00550055 ; - addr[0xAAA] = 0x00900090 ; - - value = addr[0] ; - - switch (value & 0x00FF00FF) { - case AMD_MANUFACT: - info->flash_id = FLASH_MAN_AMD; - break; - case FUJ_MANUFACT: - info->flash_id = FLASH_MAN_FUJ; - break; - default: - info->flash_id = FLASH_UNKNOWN; - info->sector_count = 0; - info->size = 0; - return (0); /* no or unknown flash */ - } - - value = addr[2] ; /* device ID */ - - switch (value & 0x00FF00FF) { - case (AMD_ID_LV400T & 0x00FF00FF): - info->flash_id += FLASH_AM400T; - info->sector_count = 11; - info->size = 0x00100000; - break; /* => 1 MB */ - - case (AMD_ID_LV400B & 0x00FF00FF): - info->flash_id += FLASH_AM400B; - info->sector_count = 11; - info->size = 0x00100000; - break; /* => 1 MB */ - - case (AMD_ID_LV800T & 0x00FF00FF): - info->flash_id += FLASH_AM800T; - info->sector_count = 19; - info->size = 0x00200000; - break; /* => 2 MB */ - - case (AMD_ID_LV800B & 0x00FF00FF): - info->flash_id += FLASH_AM800B; - info->sector_count = 19; - info->size = 0x00400000; /*%%% Size doubled by yooth */ - break; /* => 4 MB */ - - case (AMD_ID_LV160T & 0x00FF00FF): - info->flash_id += FLASH_AM160T; - info->sector_count = 35; - info->size = 0x00400000; - break; /* => 4 MB */ - - case (AMD_ID_LV160B & 0x00FF00FF): - info->flash_id += FLASH_AM160B; - info->sector_count = 35; - info->size = 0x00400000; - break; /* => 4 MB */ -#if 0 /* enable when device IDs are available */ - case AMD_ID_LV320T: - info->flash_id += FLASH_AM320T; - info->sector_count = 67; - info->size = 0x00800000; - break; /* => 8 MB */ - - case AMD_ID_LV320B: - info->flash_id += FLASH_AM320B; - info->sector_count = 67; - info->size = 0x00800000; - break; /* => 8 MB */ -#endif - default: - info->flash_id = FLASH_UNKNOWN; - return (0); /* => no or unknown flash */ - - } - /*%%% sector start address modified */ - /* set up sector start address table */ - if (info->flash_id & FLASH_BTYPE) { - /* set sector offsets for bottom boot block type */ - info->start[0] = base + 0x00000000; - info->start[1] = base + 0x00010000; - info->start[2] = base + 0x00018000; - info->start[3] = base + 0x00020000; - for (i = 4; i < info->sector_count; i++) { - info->start[i] = base + ((i-3) * 0x00040000) ; - } - } else { - /* set sector offsets for top boot block type */ - i = info->sector_count - 1; - info->start[i--] = base + info->size - 0x00010000; - info->start[i--] = base + info->size - 0x00018000; - info->start[i--] = base + info->size - 0x00020000; - for (; i >= 0; i--) { - info->start[i] = base + i * 0x00040000; - } - } - - /* check for protected sectors */ - for (i = 0; i < info->sector_count; i++) { - /* read sector protection at sector address, (A7 .. A0) = 0x02 */ - /* D0 = 1 if protected */ - addr = (volatile unsigned long *)(info->start[i]); - info->protect[i] = addr[4] & 1 ; - } - - /* - * Prevent writes to uninitialized FLASH. - */ - if (info->flash_id != FLASH_UNKNOWN) { - addr = (volatile unsigned long *)info->start[0]; - - *addr = 0xF0F0F0F0; /* reset bank */ - } - - return (info->size); -} - - -/*----------------------------------------------------------------------- - */ - -int flash_erase (flash_info_t *info, int s_first, int s_last) -{ - vu_long *addr = (vu_long*)(info->start[0]); - int flag, prot, sect, l_sect; - ulong start, now, last; - - if ((s_first < 0) || (s_first > s_last)) { - if (info->flash_id == FLASH_UNKNOWN) { - printf ("- missing\n"); - } else { - printf ("- no sectors to erase\n"); - } - return 1; - } - - if ((info->flash_id == FLASH_UNKNOWN) || - (info->flash_id > FLASH_AMD_COMP)) { - printf ("Can't erase unknown flash type %08lx - aborted\n", - info->flash_id); - return 1; - } - - prot = 0; - for (sect=s_first; sect<=s_last; ++sect) { - if (info->protect[sect]) { - prot++; - } - } - - if (prot) { - printf ("- Warning: %d protected sectors will not be erased!\n", - prot); - } else { - printf ("\n"); - } - - l_sect = -1; - - /* Disable interrupts which might cause a timeout here */ - flag = disable_interrupts(); - - addr[0xAAA] = 0xAAAAAAAA; - addr[0x555] = 0x55555555; - addr[0xAAA] = 0x80808080; - addr[0xAAA] = 0xAAAAAAAA; - addr[0x555] = 0x55555555; - - /* Start erase on unprotected sectors */ - for (sect = s_first; sect<=s_last; sect++) { - if (info->protect[sect] == 0) { /* not protected */ - addr = (vu_long *)(info->start[sect]) ; - addr[0] = 0x30303030 ; - l_sect = sect; - } - } - - /* re-enable interrupts if necessary */ - if (flag) - enable_interrupts(); - - /* wait at least 80us - let's wait 1 ms */ - udelay (1000); - - /* - * We wait for the last triggered sector - */ - if (l_sect < 0) - goto DONE; - - start = get_timer (0); - last = start; - addr = (vu_long *)(info->start[l_sect]); - while ((addr[0] & 0x80808080) != 0x80808080) { - if ((now = get_timer(start)) > CONFIG_SYS_FLASH_ERASE_TOUT) { - printf ("Timeout\n"); - return 1; - } - /* show that we're waiting */ - if ((now - last) > 1000) { /* every second */ - putc ('.'); - last = now; - } - } - -DONE: - /* reset to read mode */ - addr = (vu_long *)info->start[0]; - addr[0] = 0xF0F0F0F0; /* reset bank */ - - printf (" done\n"); - return 0; -} - -/*----------------------------------------------------------------------- - * Copy memory to flash, returns: - * 0 - OK - * 1 - write timeout - * 2 - Flash not erased - */ - -int write_buff (flash_info_t *info, uchar *src, ulong addr, ulong cnt) -{ - ulong cp, wp, data; - int i, l, rc; - - wp = (addr & ~3); /* get lower word aligned address */ - - /* - * handle unaligned start bytes - */ - if ((l = addr - wp) != 0) { - data = 0; - for (i=0, cp=wp; i0; ++i) { - data = (data << 8) | *src++; - --cnt; - ++cp; - } - for (; cnt==0 && i<4; ++i, ++cp) { - data = (data << 8) | (*(uchar *)cp); - } - - if ((rc = write_word(info, wp, data)) != 0) { - return (rc); - } - wp += 4; - } - - /* - * handle word aligned part - */ - while (cnt >= 4) { - data = 0; - for (i=0; i<4; ++i) { - data = (data << 8) | *src++; - } - if ((rc = write_word(info, wp, data)) != 0) { - return (rc); - } - wp += 4; - cnt -= 4; - } - - if (cnt == 0) { - return (0); - } - - /* - * handle unaligned tail bytes - */ - data = 0; - for (i=0, cp=wp; i<4 && cnt>0; ++i, ++cp) { - data = (data << 8) | *src++; - --cnt; - } - for (; i<4; ++i, ++cp) { - data = (data << 8) | (*(uchar *)cp); - } - - return (write_word(info, wp, data)); -} - -/*----------------------------------------------------------------------- - * Write a word to Flash, returns: - * 0 - OK - * 1 - write timeout - * 2 - Flash not erased - */ -static int write_word (flash_info_t *info, ulong dest, ulong data) -{ - vu_long *addr = (vu_long *)(info->start[0]); - ulong start; - int flag; - - /* Check if Flash is (sufficiently) erased */ - if ((*((vu_long *)dest) & data) != data) { - return (2); - } - /* Disable interrupts which might cause a timeout here */ - flag = disable_interrupts(); - - addr[0xAAA] = 0xAAAAAAAA; - addr[0x555] = 0x55555555; - addr[0xAAA] = 0xA0A0A0A0; - - *((vu_long *)dest) = data; - - /* re-enable interrupts if necessary */ - if (flag) - enable_interrupts(); - - /* data polling for D7 */ - start = get_timer (0); - while ((*((vu_long *)dest) & 0x80808080) != (data & 0x80808080)) { - if (get_timer(start) > CONFIG_SYS_FLASH_WRITE_TOUT) { - return (1); - } - } - return (0); -} - -/*----------------------------------------------------------------------- - */ diff --git a/board/RPXlite/u-boot.lds b/board/RPXlite/u-boot.lds deleted file mode 100644 index 0eb2fba00c2..00000000000 --- a/board/RPXlite/u-boot.lds +++ /dev/null @@ -1,82 +0,0 @@ -/* - * (C) Copyright 2000-2010 - * Wolfgang Denk, DENX Software Engineering, wd@denx.de. - * - * SPDX-License-Identifier: GPL-2.0+ - */ - -OUTPUT_ARCH(powerpc) - -SECTIONS -{ - /* Read-only sections, merged into text segment: */ - . = + SIZEOF_HEADERS; - .text : - { - arch/powerpc/cpu/mpc8xx/start.o (.text*) - arch/powerpc/cpu/mpc8xx/traps.o (.text*) - - *(.text*) - } - _etext = .; - PROVIDE (etext = .); - .rodata : - { - *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) - } - - /* Read-write section, merged into data segment: */ - . = (. + 0x00FF) & 0xFFFFFF00; - _erotext = .; - PROVIDE (erotext = .); - .reloc : - { - _GOT2_TABLE_ = .; - KEEP(*(.got2)) - KEEP(*(.got)) - PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4); - _FIXUP_TABLE_ = .; - KEEP(*(.fixup)) - } - __got2_entries = ((_GLOBAL_OFFSET_TABLE_ - _GOT2_TABLE_) >> 2) - 1; - __fixup_entries = (. - _FIXUP_TABLE_)>>2; - - .data : - { - *(.data*) - *(.sdata*) - } - _edata = .; - PROVIDE (edata = .); - - . = .; - - . = ALIGN(4); - .u_boot_list : { - KEEP(*(SORT(.u_boot_list*))); - } - - - . = .; - __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) : - { - *(.bss*) - *(.sbss*) - *(COMMON) - . = ALIGN(4); - } - __bss_end = . ; - PROVIDE (end = .); -} diff --git a/board/RPXlite/u-boot.lds.debug b/board/RPXlite/u-boot.lds.debug deleted file mode 100644 index b9c84c77d64..00000000000 --- a/board/RPXlite/u-boot.lds.debug +++ /dev/null @@ -1,121 +0,0 @@ -/* - * (C) Copyright 2000 - * Wolfgang Denk, DENX Software Engineering, wd@denx.de. - * - * SPDX-License-Identifier: GPL-2.0+ - */ - -OUTPUT_ARCH(powerpc) -/* Do we need any of these for elf? - __DYNAMIC = 0; */ -SECTIONS -{ - /* 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 */ - - arch/powerpc/cpu/mpc8xx/start.o (.text) - common/dlmalloc.o (.text) - lib/vsprintf.o (.text) - lib/crc32.o (.text) - - . = env_offset; - common/env_embedded.o(.text) - - *(.text) - *(.got1) - } - _etext = .; - PROVIDE (etext = .); - .rodata : - { - *(.rodata) - *(.rodata1) - *(.rodata.str1.4) - *(.eh_frame) - } - .fini : { *(.fini) } =0 - .ctors : { *(.ctors) } - .dtors : { *(.dtors) } - - /* Read-write section, merged into data segment: */ - . = (. + 0x0FFF) & 0xFFFFF000; - _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 = .); - - - . = ALIGN(4); - .u_boot_list : { - KEEP(*(SORT(.u_boot_list*))); - } - - - __start___ex_table = .; - __ex_table : { *(__ex_table) } - __stop___ex_table = .; - - . = ALIGN(4096); - __init_begin = .; - .text.init : { *(.text.init) } - .data.init : { *(.data.init) } - . = ALIGN(4096); - __init_end = .; - - __bss_start = .; - .bss : - { - *(.sbss) *(.scommon) - *(.dynbss) - *(.bss) - *(COMMON) - } - __bss_end = . ; - PROVIDE (end = .); -} diff --git a/boards.cfg b/boards.cfg index 2125e9042f4..1faa906c379 100644 --- a/boards.cfg +++ b/boards.cfg @@ -1246,5 +1246,3 @@ Orphan powerpc 74xx_7xx - - evb64260 Orphan powerpc mpc824x - - mousse MOUSSE - - Orphan powerpc mpc8260 - - - rsdproto - - Orphan powerpc mpc8260 - - rpxsuper RPXsuper - - -Orphan powerpc mpc8xx - - - RPXClassic - - -Orphan powerpc mpc8xx - - - RPXlite - - diff --git a/doc/README.scrapyard b/doc/README.scrapyard index b068544c3ba..99155007df7 100644 --- a/doc/README.scrapyard +++ b/doc/README.scrapyard @@ -11,6 +11,8 @@ easily if here is something they might want to dig for... Board Arch CPU Commit Removed Last known maintainer/contact ================================================================================================= +RPXClassic powerpc mpc8xx - 2014-04-04 +RPXlite powerpc mpc8xx - 2014-04-04 genietv powerpc mpc8xx - 2014-04-04 mbx8xx powerpc mpc8xx - 2014-04-04 nx823 powerpc mpc8xx - 2014-04-04 diff --git a/drivers/pcmcia/mpc8xx_pcmcia.c b/drivers/pcmcia/mpc8xx_pcmcia.c index 37325838381..663827780e9 100644 --- a/drivers/pcmcia/mpc8xx_pcmcia.c +++ b/drivers/pcmcia/mpc8xx_pcmcia.c @@ -211,7 +211,7 @@ static u_int m8xx_get_graycode(u_int size) #if 0 -#if defined(CONFIG_RPXCLASSIC) || defined(CONFIG_RPXLITE) +#if defined(CONFIG_RPXLITE) /* The RPX boards seems to have it's bus monitor timeout set to 6*8 clocks. * SYPCR is write once only, therefore must the slowest memory be faster diff --git a/drivers/pcmcia/rpx_pcmcia.c b/drivers/pcmcia/rpx_pcmcia.c index c7c425b93cf..5b24f0bfbe4 100644 --- a/drivers/pcmcia/rpx_pcmcia.c +++ b/drivers/pcmcia/rpx_pcmcia.c @@ -18,7 +18,7 @@ #endif #if defined(CONFIG_PCMCIA) \ - && (defined(CONFIG_RPXCLASSIC) || defined(CONFIG_RPXLITE)) + && defined(CONFIG_RPXLITE) #define PCMCIA_BOARD_MSG "RPX CLASSIC or RPX LITE" @@ -70,4 +70,4 @@ static int pcmcia_hardware_disable(int slot) #endif -#endif /* CONFIG_PCMCIA && (CONFIG_RPXCLASSIC || CONFIG_RPXLITE) */ +#endif /* CONFIG_PCMCIA && CONFIG_RPXLITE */ diff --git a/include/common.h b/include/common.h index 580615b9ef1..baf361b3e55 100644 --- a/include/common.h +++ b/include/common.h @@ -505,10 +505,6 @@ extern ssize_t spi_read (uchar *, int, uchar *, int); extern ssize_t spi_write (uchar *, int, uchar *, int); #endif -#ifdef CONFIG_RPXCLASSIC -void rpxclassic_init (void); -#endif - void rpxlite_init (void); #ifdef CONFIG_HERMES diff --git a/include/commproc.h b/include/commproc.h index 605aac2ec22..29a3e61e803 100644 --- a/include/commproc.h +++ b/include/commproc.h @@ -954,41 +954,6 @@ typedef struct scc_enet { #endif /* CONFIG_QS860T */ -/*** RPXCLASSIC *****************************************************/ - -#ifdef CONFIG_RPXCLASSIC - -#ifdef CONFIG_FEC_ENET - -# define FEC_ENET /* use FEC for EThernet */ -# undef SCC_ENET - -#else /* ! CONFIG_FEC_ENET */ - -/* Bits in parallel I/O port registers that have to be set/cleared - * to configure the pins for SCC1 use. - */ -#define PROFF_ENET PROFF_SCC1 -#define CPM_CR_ENET CPM_CR_CH_SCC1 -#define SCC_ENET 0 -#define PA_ENET_RXD ((ushort)0x0001) -#define PA_ENET_TXD ((ushort)0x0002) -#define PA_ENET_TCLK ((ushort)0x0200) -#define PA_ENET_RCLK ((ushort)0x0800) -#define PB_ENET_TENA ((uint)0x00001000) -#define PC_ENET_CLSN ((ushort)0x0010) -#define PC_ENET_RENA ((ushort)0x0020) - -/* Control bits in the SICR to route TCLK (CLK2) and RCLK (CLK4) to - * SCC1. Also, make sure GR1 (bit 24) and SC1 (bit 25) are zero. - */ -#define SICR_ENET_MASK ((uint)0x000000ff) -#define SICR_ENET_CLKRT ((uint)0x0000003d) - -#endif /* CONFIG_FEC_ENET */ - -#endif /* CONFIG_RPXCLASSIC */ - /*** RPXLITE ********************************************************/ #ifdef CONFIG_RPXLITE diff --git a/include/configs/RPXClassic.h b/include/configs/RPXClassic.h deleted file mode 100644 index 0f07d0cfe97..00000000000 --- a/include/configs/RPXClassic.h +++ /dev/null @@ -1,483 +0,0 @@ -/* - * (C) Copyright 2000, 2001, 2002 - * Wolfgang Denk, DENX Software Engineering, wd@denx.de. - * - * SPDX-License-Identifier: GPL-2.0+ - */ - -/* - * board/config.h - configuration options, board specific - */ - -/* Yoo. Jonghoon, IPone, yooth@ipone.co.kr - * U-Boot port on RPXlite board - */ - -#ifndef __CONFIG_H -#define __CONFIG_H - -#define RPXClassic_50MHz - -/* - * High Level Configuration Options - * (easy to change) - */ - -#define CONFIG_MPC860 1 -#define CONFIG_RPXCLASSIC 1 - -#define CONFIG_SYS_TEXT_BASE 0xff000000 - -#define CONFIG_8xx_CONS_SMC1 1 /* Console is on SMC1 */ -#undef CONFIG_8xx_CONS_SMC2 -#undef CONFIG_8xx_CONS_NONE -#define CONFIG_BAUDRATE 9600 /* console baudrate = 9600bps */ - -/* Define CONFIG_FEC_ENET to use Fast ethernet instead of ethernet on SCC1 */ -#define CONFIG_FEC_ENET -#ifdef CONFIG_FEC_ENET -#define CONFIG_SYS_DISCOVER_PHY 1 -#define CONFIG_MII 1 -#endif /* CONFIG_FEC_ENET */ -#define CONFIG_MISC_INIT_R - -/* Video console (graphic: Epson SED13806 on ECCX board, no keyboard */ -#if 1 -#define CONFIG_VIDEO_SED13806 -#define CONFIG_NEC_NL6448BC20 -#define CONFIG_VIDEO_SED13806_16BPP - -#define CONFIG_CFB_CONSOLE -#define CONFIG_VIDEO_LOGO -#define CONFIG_VIDEO_BMP_LOGO -#define CONFIG_CONSOLE_EXTRA_INFO -#define CONFIG_VGA_AS_SINGLE_DEVICE -#define CONFIG_VIDEO_SW_CURSOR -#endif - -#if 0 -#define CONFIG_BOOTDELAY -1 /* autoboot disabled */ -#else -#define CONFIG_BOOTDELAY 5 /* autoboot after 5 seconds */ -#endif - -#define CONFIG_ZERO_BOOTDELAY_CHECK 1 - -#undef CONFIG_BOOTARGS -#define CONFIG_BOOTCOMMAND \ - "tftpboot; " \ - "setenv bootargs root=/dev/nfs rw nfsroot=${serverip}:${rootpath} " \ - "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; " \ - "bootm" - -#define CONFIG_LOADS_ECHO 1 /* echo on for serial download */ -#undef CONFIG_SYS_LOADS_BAUD_CHANGE /* don't allow baudrate change */ - -#undef CONFIG_WATCHDOG /* watchdog disabled */ - -/* - * BOOTP options - */ -#define CONFIG_BOOTP_SUBNETMASK -#define CONFIG_BOOTP_GATEWAY -#define CONFIG_BOOTP_HOSTNAME -#define CONFIG_BOOTP_BOOTPATH -#define CONFIG_BOOTP_BOOTFILESIZE - - -#define CONFIG_CLOCKS_IN_MHZ 1 /* clocks passsed to Linux in MHz */ - - -/* - * Command line configuration. - */ -#include - -#define CONFIG_CMD_ELF - - -/* - * Miscellaneous configurable options - */ -#define CONFIG_SYS_RESET_ADDRESS 0x80000000 -#define CONFIG_SYS_LONGHELP /* undef to save memory */ -#if defined(CONFIG_CMD_KGDB) -#define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */ -#else -#define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */ -#endif -#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */ -#define CONFIG_SYS_MAXARGS 16 /* max number of command args */ -#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */ - -#define CONFIG_SYS_MEMTEST_START 0x0040000 /* memtest works on */ -#define CONFIG_SYS_MEMTEST_END 0x00C0000 /* 4 ... 12 MB in DRAM */ - -#define CONFIG_SYS_LOAD_ADDR 0x100000 /* default load address */ - -/* - * Low Level Configuration Settings - * (address mappings, register initial values, etc.) - * You should know what you are doing if you make changes here. - */ -/*----------------------------------------------------------------------- - * Internal Memory Mapped Register - */ -#define CONFIG_SYS_IMMR 0xFA200000 - -/*----------------------------------------------------------------------------- - * I2C Configuration - *----------------------------------------------------------------------------- - */ -#define CONFIG_SYS_I2C_SPEED 50000 -#define CONFIG_SYS_I2C_SLAVE 0x34 - - -/* enable I2C and select the hardware/software driver */ -#define CONFIG_HARD_I2C 1 /* I2C with hardware support */ -#undef CONFIG_SYS_I2C_SOFT /* I2C bit-banged */ - -#if defined(CONFIG_SYS_I2C_SOFT) -#define CONFIG_SYS_I2C 1 -/* - * Software (bit-bang) I2C driver configuration - */ -#define I2C_PORT 1 /* Port A=0, B=1, C=2, D=3 */ -#define I2C_ACTIVE (iop->pdir |= 0x00000010) -#define I2C_TRISTATE (iop->pdir &= ~0x00000010) -#define I2C_READ ((iop->pdat & 0x00000010) != 0) -#define I2C_SDA(bit) if(bit) iop->pdat |= 0x00000010; \ - else iop->pdat &= ~0x00000010 -#define I2C_SCL(bit) if(bit) iop->pdat |= 0x00000020; \ - else iop->pdat &= ~0x00000020 -#define I2C_DELAY udelay(5) /* 1/4 I2C clock duration */ - - -#define CONFIG_SYS_I2C_SOFT_SPEED 50000 -#define CONFIG_SYS_I2C_SOFT_SLAVE 0x34 -#endif - -# define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 /* EEPROM X24C16 */ -# define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 /* bytes of address */ -/* mask of address bits that overflow into the "EEPROM chip address" */ -#define CONFIG_SYS_I2C_EEPROM_ADDR_OVERFLOW 0x07 - -/*----------------------------------------------------------------------- - * Definitions for initial stack pointer and data area (in DPRAM) - */ -#define CONFIG_SYS_INIT_RAM_ADDR CONFIG_SYS_IMMR -#define CONFIG_SYS_INIT_RAM_SIZE 0x3000 /* Size of used area in DPRAM */ -#define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) -#define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET - -/*----------------------------------------------------------------------- - * Start addresses for the final memory configuration - * (Set up by the startup code) - * Please note that CONFIG_SYS_SDRAM_BASE _must_ start at 0 - */ -#define CONFIG_SYS_SDRAM_BASE 0x00000000 -#define CONFIG_SYS_FLASH_BASE 0xFF000000 - -#if defined(DEBUG) || defined (CONFIG_VIDEO_SED13806) || defined(CONFIG_CMD_IDE) -#define CONFIG_SYS_MONITOR_LEN (256 << 10) /* Reserve 256 kB for Monitor */ -#else -#define CONFIG_SYS_MONITOR_LEN (128 << 10) /* Reserve 128 kB for Monitor */ -#endif -#define CONFIG_SYS_MONITOR_BASE 0xFF000000 -/*%%% #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE */ -#define CONFIG_SYS_MALLOC_LEN (128 << 10) /* Reserve 128 kB for malloc() */ - -/* - * For booting Linux, the board info and command line data - * have to be in the first 8 MB of memory, since this is - * the maximum mapped by the Linux kernel during initialization. - */ -#define CONFIG_SYS_BOOTMAPSZ (8 << 20) /* Initial Memory map for Linux */ - -/*----------------------------------------------------------------------- - * FLASH organization - */ -#define CONFIG_SYS_MAX_FLASH_BANKS 1 /* max number of memory banks */ -#define CONFIG_SYS_MAX_FLASH_SECT 71 /* max number of sectors on one chip */ - -#define CONFIG_SYS_FLASH_ERASE_TOUT 120000 /* Timeout for Flash Erase (in ms) */ -#define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Timeout for Flash Write (in ms) */ - -#if 0 -#define CONFIG_ENV_IS_IN_FLASH 1 -#define CONFIG_ENV_OFFSET 0x20000 /* Offset of Environment Sector */ -#define CONFIG_ENV_SECT_SIZE 0x8000 -#define CONFIG_ENV_SIZE 0x8000 /* Total Size of Environment Sector */ -#else -#define CONFIG_ENV_IS_IN_NVRAM 1 -#define CONFIG_ENV_ADDR 0xfa000100 -#define CONFIG_ENV_SIZE 0x1000 -#endif - -/*----------------------------------------------------------------------- - * Cache Configuration - */ -#define CONFIG_SYS_CACHELINE_SIZE 16 /* For all MPC8xx CPUs */ -#if defined(CONFIG_CMD_KGDB) -#define CONFIG_SYS_CACHELINE_SHIFT 4 /* log base 2 of the above value */ -#endif - -/*----------------------------------------------------------------------- - * SYPCR - System Protection Control 11-9 - * SYPCR can only be written once after reset! - *----------------------------------------------------------------------- - * Software & Bus Monitor Timer max, Bus Monitor enable, SW Watchdog freeze - */ -#define CONFIG_SYS_SYPCR (SYPCR_SWTC | SYPCR_BMT | SYPCR_BME | SYPCR_SWF | \ - SYPCR_SWP) - -/*----------------------------------------------------------------------- - * SIUMCR - SIU Module Configuration 11-6 - *----------------------------------------------------------------------- - * PCMCIA config., multi-function pin tri-state - */ -#define CONFIG_SYS_SIUMCR (SIUMCR_MLRC10) - -/*----------------------------------------------------------------------- - * TBSCR - Time Base Status and Control 11-26 - *----------------------------------------------------------------------- - * Clear Reference Interrupt Status, Timebase freezing enabled - */ -#define CONFIG_SYS_TBSCR (TBSCR_REFA | TBSCR_REFB | TBSCR_TBF | TBSCR_TBE) - -/*----------------------------------------------------------------------- - * RTCSC - Real-Time Clock Status and Control Register 11-27 - *----------------------------------------------------------------------- - */ -/*%%%#define CONFIG_SYS_RTCSC (RTCSC_SEC | RTCSC_ALR | RTCSC_RTF| RTCSC_RTE) */ -#define CONFIG_SYS_RTCSC (RTCSC_SEC | RTCSC_ALR | RTCSC_RTE) - -/*----------------------------------------------------------------------- - * PISCR - Periodic Interrupt Status and Control 11-31 - *----------------------------------------------------------------------- - * Clear Periodic Interrupt Status, Interrupt Timer freezing enabled - */ -#define CONFIG_SYS_PISCR (PISCR_PS | PISCR_PITF | PISCR_PTE) - -/*----------------------------------------------------------------------- - * PLPRCR - PLL, Low-Power, and Reset Control Register 15-30 - *----------------------------------------------------------------------- - * Reset PLL lock status sticky bit, timer expired status bit and timer - * interrupt status bit - * - * If this is a 80 MHz CPU, set PLL multiplication factor to 5 (5*16=80)! - */ -/* up to 50 MHz we use a 1:1 clock */ -#define CONFIG_SYS_PLPRCR ( (4 << PLPRCR_MF_SHIFT) | PLPRCR_TEXPS | PLPRCR_SPLSS | PLPRCR_TMIST) - -/*----------------------------------------------------------------------- - * SCCR - System Clock and reset Control Register 15-27 - *----------------------------------------------------------------------- - * Set clock output, timebase and RTC source and divider, - * power management and some other internal clocks - */ -#define SCCR_MASK SCCR_EBDF00 -/* up to 50 MHz we use a 1:1 clock */ -#define CONFIG_SYS_SCCR (SCCR_COM00 | SCCR_TBS) - -/*----------------------------------------------------------------------- - * PCMCIA stuff - *----------------------------------------------------------------------- - * - */ -#define CONFIG_SYS_PCMCIA_MEM_ADDR (0xE0000000) -#define CONFIG_SYS_PCMCIA_MEM_SIZE ( 64 << 20 ) -#define CONFIG_SYS_PCMCIA_DMA_ADDR (0xE4000000) -#define CONFIG_SYS_PCMCIA_DMA_SIZE ( 64 << 20 ) -#define CONFIG_SYS_PCMCIA_ATTRB_ADDR (0xE8000000) -#define CONFIG_SYS_PCMCIA_ATTRB_SIZE ( 64 << 20 ) -#define CONFIG_SYS_PCMCIA_IO_ADDR (0xEC000000) -#define CONFIG_SYS_PCMCIA_IO_SIZE ( 64 << 20 ) - -/*----------------------------------------------------------------------- - * IDE/ATA stuff (Supports IDE harddisk on PCMCIA Adapter) - *----------------------------------------------------------------------- - */ - -#define CONFIG_IDE_PREINIT 1 /* Use preinit IDE hook */ -#define CONFIG_IDE_8xx_PCCARD 1 /* Use IDE with PC Card Adapter */ - -#undef CONFIG_IDE_8xx_DIRECT /* Direct IDE not supported */ -#undef CONFIG_IDE_LED /* LED for ide not supported */ -#undef CONFIG_IDE_RESET /* reset for ide not supported */ - -#define CONFIG_SYS_IDE_MAXBUS 1 /* max. 1 IDE bus */ -#define CONFIG_SYS_IDE_MAXDEVICE 1 /* max. 1 drive per IDE bus */ - -#define CONFIG_SYS_ATA_IDE0_OFFSET 0x0000 - -#define CONFIG_SYS_ATA_BASE_ADDR CONFIG_SYS_PCMCIA_MEM_ADDR - -/* Offset for data I/O */ -#define CONFIG_SYS_ATA_DATA_OFFSET (CONFIG_SYS_PCMCIA_MEM_SIZE + 0x320) - -/* Offset for normal register accesses */ -#define CONFIG_SYS_ATA_REG_OFFSET (2 * CONFIG_SYS_PCMCIA_MEM_SIZE + 0x320) - -/* Offset for alternate registers */ -#define CONFIG_SYS_ATA_ALT_OFFSET 0x0100 - -/*----------------------------------------------------------------------- - * - *----------------------------------------------------------------------- - * - */ -/* #define CONFIG_SYS_DER 0x2002000F */ -#define CONFIG_SYS_DER 0 - -/* - * Init Memory Controller: - * - * BR0 and OR0 (FLASH) - */ - -#define FLASH_BASE_PRELIM 0xFE000000 /* FLASH base */ -#define CONFIG_SYS_PRELIM_OR_AM 0xFE000000 /* OR addr mask */ - -/* FLASH timing: ACS = 0, TRLX = 0, CSNT = 0, SCY = 4, ETHR = 0, BIH = 1 */ -#define CONFIG_SYS_OR_TIMING_FLASH (OR_SCY_4_CLK | OR_BI) - -#define CONFIG_SYS_OR0_PRELIM (CONFIG_SYS_PRELIM_OR_AM | CONFIG_SYS_OR_TIMING_FLASH) -#define CONFIG_SYS_BR0_PRELIM ((FLASH_BASE_PRELIM & BR_BA_MSK) | BR_V) - -/* - * BR1 and OR1 (SDRAM) - * - */ -#define SDRAM_BASE_PRELIM 0x00000000 /* SDRAM base */ -#define SDRAM_MAX_SIZE 0x01000000 /* max 16 MB */ - -/* SDRAM timing: Multiplexed addresses, GPL5 output to GPL5_A (don't care) */ -#define CONFIG_SYS_OR_TIMING_SDRAM 0x00000E00 - -#define CONFIG_SYS_OR1_PRELIM (CONFIG_SYS_PRELIM_OR_AM | CONFIG_SYS_OR_TIMING_SDRAM ) -#define CONFIG_SYS_BR1_PRELIM ((SDRAM_BASE_PRELIM & BR_BA_MSK) | BR_MS_UPMA | BR_V ) - -/* RPXLITE mem setting */ -#define CONFIG_SYS_BR3_PRELIM 0xFA400001 /* BCSR */ -#define CONFIG_SYS_OR3_PRELIM 0xff7f8970 -#define CONFIG_SYS_BR4_PRELIM 0xFA000401 /* NVRAM&SRAM */ -#define CONFIG_SYS_OR4_PRELIM 0xFFF80970 - -/* ECCX CS settings */ -#define SED13806_OR 0xFFC00108 /* - 4 Mo - - Burst inhibit - - external TA */ -#define SED13806_REG_ADDR 0xa0000000 -#define SED13806_ACCES 0x801 /* 16 bit access */ - - -/* Global definitions for the ECCX board */ -#define ECCX_CSR_ADDR (0xfac00000) -#define ECCX_CSR8_OFFSET (0x8) -#define ECCX_CSR11_OFFSET (0xB) -#define ECCX_CSR12_OFFSET (0xC) - -#define ECCX_CSR8 (volatile unsigned char *)(ECCX_CSR_ADDR + ECCX_CSR8_OFFSET) -#define ECCX_CSR11 (volatile unsigned char *)(ECCX_CSR_ADDR + ECCX_CSR11_OFFSET) -#define ECCX_CSR12 (volatile unsigned char *)(ECCX_CSR_ADDR + ECCX_CSR12_OFFSET) - - -#define REG_GPIO_CTRL 0x008 - -/* Definitions for CSR8 */ -#define ECCX_ENEPSON 0x80 /* Bit 0: - 0= disable and reset SED1386 - 1= enable SED1386 */ -/* Bit 1: 0= SED1386 in Big Endian mode */ -/* 1= SED1386 in little endian mode */ -#define ECCX_LE 0x40 -#define ECCX_BE 0x00 - -/* Bit 2,3: Selection */ -/* 00 = Disabled */ -/* 01 = CS2 is used for the SED1386 */ -/* 10 = CS5 is used for the SED1386 */ -/* 11 = reserved */ -#define ECCX_CS2 0x10 -#define ECCX_CS5 0x20 - -/* Definitions for CSR12 */ -#define ECCX_ID 0x02 -#define ECCX_860 0x01 - -/* - * Memory Periodic Timer Prescaler - */ - -/* periodic timer for refresh */ -#define CONFIG_SYS_MAMR_PTA 58 - -/* - * Refresh clock Prescalar - */ -#define CONFIG_SYS_MPTPR MPTPR_PTP_DIV8 - -/* - * MAMR settings for SDRAM - */ - -/* 10 column SDRAM */ -#define CONFIG_SYS_MAMR_10COL ((CONFIG_SYS_MAMR_PTA << MAMR_PTA_SHIFT) | MAMR_PTAE | \ - MAMR_AMA_TYPE_2 | MAMR_DSA_1_CYCL | MAMR_G0CLA_A12 | \ - MAMR_GPL_A4DIS | MAMR_RLFA_4X | MAMR_WLFA_3X | MAMR_TLFA_16X) - -/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% */ -/* Configuration variable added by yooth. */ -/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% */ - -/* - * BCSRx - * - * Board Status and Control Registers - * - */ - -#define BCSR0 0xFA400000 -#define BCSR1 0xFA400001 -#define BCSR2 0xFA400002 -#define BCSR3 0xFA400003 - -#define BCSR0_ENMONXCVR 0x01 /* Monitor XVCR Control */ -#define BCSR0_ENNVRAM 0x02 /* CS4# Control */ -#define BCSR0_LED5 0x04 /* LED5 control 0='on' 1='off' */ -#define BCSR0_LED4 0x08 /* LED4 control 0='on' 1='off' */ -#define BCSR0_FULLDPLX 0x10 /* Ethernet XCVR Control */ -#define BCSR0_COLTEST 0x20 -#define BCSR0_ETHLPBK 0x40 -#define BCSR0_ETHEN 0x80 - -#define BCSR1_PCVCTL7 0x01 /* PC Slot B Control */ -#define BCSR1_PCVCTL6 0x02 -#define BCSR1_PCVCTL5 0x04 -#define BCSR1_PCVCTL4 0x08 -#define BCSR1_IPB5SEL 0x10 - -#define BCSR2_MIIRST 0x80 -#define BCSR2_MIIPWRDWN 0x40 -#define BCSR2_MIICTL 0x08 - -#define BCSR3_BWRTC 0x01 /* Real Time Clock Battery */ -#define BCSR3_BWNVR 0x02 /* NVRAM Battery */ -#define BCSR3_RDY_BSY 0x04 /* Flash Operation */ -#define BCSR3_RPXL 0x08 /* Reserved (reads back '1') */ -#define BCSR3_D27 0x10 /* Dip Switch settings */ -#define BCSR3_D26 0x20 -#define BCSR3_D25 0x40 -#define BCSR3_D24 0x80 - - -/* - * Environment setting - */ - -/* #define CONFIG_ETHADDR 00:10:EC:00:2C:A2 */ -/* #define CONFIG_IPADDR 10.10.106.1 */ -/* #define CONFIG_SERVERIP 10.10.104.11 */ - -#endif /* __CONFIG_H */ diff --git a/include/configs/RPXlite.h b/include/configs/RPXlite.h deleted file mode 100644 index a28230a5d74..00000000000 --- a/include/configs/RPXlite.h +++ /dev/null @@ -1,395 +0,0 @@ -/* - * (C) Copyright 2000 - * Wolfgang Denk, DENX Software Engineering, wd@denx.de. - * - * SPDX-License-Identifier: GPL-2.0+ - */ - -/* Yoo. Jonghoon, IPone, yooth@ipone.co.kr - * U-Boot port on RPXlite board - */ - -#ifndef __CONFIG_H -#define __CONFIG_H - -#define RPXLite_50MHz - -/* - * High Level Configuration Options - * (easy to change) - */ - -#undef CONFIG_MPC860 -#define CONFIG_MPC850 1 /* This is a MPC850 CPU */ -#define CONFIG_RPXLITE 1 - -#define CONFIG_SYS_TEXT_BASE 0xfff00000 - -#define CONFIG_8xx_CONS_SMC1 1 /* Console is on SMC1 */ -#undef CONFIG_8xx_CONS_SMC2 -#undef CONFIG_8xx_CONS_NONE -#define CONFIG_BAUDRATE 9600 /* console baudrate = 9600bps */ -#if 0 -#define CONFIG_BOOTDELAY -1 /* autoboot disabled */ -#else -#define CONFIG_BOOTDELAY 5 /* autoboot after 5 seconds */ -#endif - -#undef CONFIG_BOOTARGS -#define CONFIG_BOOTCOMMAND \ - "bootp; " \ - "setenv bootargs root=/dev/nfs rw nfsroot=${serverip}:${rootpath} " \ - "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; " \ - "bootm" - -#define CONFIG_LOADS_ECHO 1 /* echo on for serial download */ -#undef CONFIG_SYS_LOADS_BAUD_CHANGE /* don't allow baudrate change */ - -#define CONFIG_BZIP2 /* Include support for bzip2 compressed images */ - -/* enable I2C and select the hardware/software driver */ -#define CONFIG_SYS_I2C -#define CONFIG_SYS_I2C_SOFT /* I2C bit-banged */ -#define CONFIG_SYS_I2C_SOFT_SPEED 40000 /* 40 kHz is supposed to work */ -#define CONFIG_SYS_I2C_SOFT_SLAVE 0xFE -/* Software (bit-bang) I2C driver configuration */ -#define PB_SCL 0x00000020 /* PB 26 */ -#define PB_SDA 0x00000010 /* PB 27 */ - -#define I2C_INIT (immr->im_cpm.cp_pbdir |= PB_SCL) -#define I2C_ACTIVE (immr->im_cpm.cp_pbdir |= PB_SDA) -#define I2C_TRISTATE (immr->im_cpm.cp_pbdir &= ~PB_SDA) -#define I2C_READ ((immr->im_cpm.cp_pbdat & PB_SDA) != 0) -#define I2C_SDA(bit) if (bit) \ - immr->im_cpm.cp_pbdat |= PB_SDA; \ - else \ - immr->im_cpm.cp_pbdat &= ~PB_SDA -#define I2C_SCL(bit) if (bit) \ - immr->im_cpm.cp_pbdat |= PB_SCL; \ - else \ - immr->im_cpm.cp_pbdat &= ~PB_SCL -#define I2C_DELAY udelay(5) /* 1/4 I2C clock duration */ - -/* M41T11 Serial Access Timekeeper(R) SRAM */ -#define CONFIG_RTC_M41T11 1 -#define CONFIG_SYS_I2C_RTC_ADDR 0x68 -/* play along with the linux driver */ -#define CONFIG_SYS_M41T11_BASE_YEAR 1900 - -#undef CONFIG_WATCHDOG /* watchdog disabled */ - -/* - * BOOTP options - */ -#define CONFIG_BOOTP_SUBNETMASK -#define CONFIG_BOOTP_GATEWAY -#define CONFIG_BOOTP_HOSTNAME -#define CONFIG_BOOTP_BOOTPATH -#define CONFIG_BOOTP_BOOTFILESIZE - - -/* - * Command line configuration. - */ -#include - - -/* - * Miscellaneous configurable options - */ -#define CONFIG_SYS_LONGHELP /* undef to save memory */ -#if defined(CONFIG_CMD_KGDB) -#define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */ -#else -#define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */ -#endif -#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */ -#define CONFIG_SYS_MAXARGS 16 /* max number of command args */ -#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */ - -#define CONFIG_SYS_MEMTEST_START 0x00400000 /* memtest works on */ -#define CONFIG_SYS_MEMTEST_END 0x00C00000 /* 4 ... 12 MB in DRAM */ - -#define CONFIG_SYS_RESET_ADDRESS 0x09900000 - -#define CONFIG_SYS_LOAD_ADDR 0x400000 /* default load address */ - -/* - * Low Level Configuration Settings - * (address mappings, register initial values, etc.) - * You should know what you are doing if you make changes here. - */ -/*----------------------------------------------------------------------- - * Internal Memory Mapped Register - */ -#define CONFIG_SYS_IMMR 0xFA200000 - -/*----------------------------------------------------------------------- - * Definitions for initial stack pointer and data area (in DPRAM) - */ -#define CONFIG_SYS_INIT_RAM_ADDR CONFIG_SYS_IMMR -#define CONFIG_SYS_INIT_RAM_SIZE 0x2F00 /* Size of used area in DPRAM */ -#define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) -#define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET - -/*----------------------------------------------------------------------- - * Start addresses for the final memory configuration - * (Set up by the startup code) - * Please note that CONFIG_SYS_SDRAM_BASE _must_ start at 0 - */ -#define CONFIG_SYS_SDRAM_BASE 0x00000000 -#define CONFIG_SYS_FLASH_BASE 0xFFC00000 -#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE -#define CONFIG_SYS_MONITOR_LEN (256 << 10) /* Reserve 256 kB for Monitor */ -#ifdef CONFIG_BZIP2 -#define CONFIG_SYS_MALLOC_LEN (4096 << 10) /* Reserve ~4 MB for malloc() */ -#else -#define CONFIG_SYS_MALLOC_LEN (128 << 10) /* Reserve 128 KB for malloc() */ -#endif /* CONFIG_BZIP2 */ - -/* - * For booting Linux, the board info and command line data - * have to be in the first 8 MB of memory, since this is - * the maximum mapped by the Linux kernel during initialization. - */ -#define CONFIG_SYS_BOOTMAPSZ (8 << 20) /* Initial Memory map for Linux */ - -/*----------------------------------------------------------------------- - * FLASH organization - */ -#define CONFIG_SYS_MAX_FLASH_BANKS 1 /* max number of memory banks */ -#define CONFIG_SYS_MAX_FLASH_SECT 19 /* max number of sectors on one chip */ - -#define CONFIG_SYS_FLASH_ERASE_TOUT 120000 /* Timeout for Flash Erase (in ms) */ -#define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Timeout for Flash Write (in ms) */ - -#define CONFIG_SYS_DIRECT_FLASH_TFTP - -#define CONFIG_ENV_IS_IN_FLASH 1 -#define CONFIG_ENV_SECT_SIZE 0x40000 /* We use one complete sector */ -#define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN) - -#define CONFIG_ENV_OVERWRITE - -/*----------------------------------------------------------------------- - * Cache Configuration - */ -#define CONFIG_SYS_CACHELINE_SIZE 16 /* For all MPC8xx CPUs */ -#if defined(CONFIG_CMD_KGDB) -#define CONFIG_SYS_CACHELINE_SHIFT 4 /* log base 2 of the above value */ -#endif - -/*----------------------------------------------------------------------- - * SYPCR - System Protection Control 11-9 - * SYPCR can only be written once after reset! - *----------------------------------------------------------------------- - * Software & Bus Monitor Timer max, Bus Monitor enable, SW Watchdog freeze - */ -#if defined(CONFIG_WATCHDOG) -#define CONFIG_SYS_SYPCR (SYPCR_SWTC | SYPCR_BMT | SYPCR_BME | SYPCR_SWF | \ - SYPCR_SWE | SYPCR_SWRI| SYPCR_SWP) -#else -#define CONFIG_SYS_SYPCR (SYPCR_SWTC | 0x00000600 | SYPCR_BME | SYPCR_SWF | SYPCR_SWP) -#endif - -/*----------------------------------------------------------------------- - * SIUMCR - SIU Module Configuration 11-6 - *----------------------------------------------------------------------- - * PCMCIA config., multi-function pin tri-state - */ -#define CONFIG_SYS_SIUMCR (SIUMCR_MLRC10) - -/*----------------------------------------------------------------------- - * TBSCR - Time Base Status and Control 11-26 - *----------------------------------------------------------------------- - * Clear Reference Interrupt Status, Timebase freezing enabled - */ -#define CONFIG_SYS_TBSCR (TBSCR_REFA | TBSCR_REFB | TBSCR_TBF | TBSCR_TBE) - -/*----------------------------------------------------------------------- - * RTCSC - Real-Time Clock Status and Control Register 11-27 - *----------------------------------------------------------------------- - */ -/*%%%#define CONFIG_SYS_RTCSC (RTCSC_SEC | RTCSC_ALR | RTCSC_RTF| RTCSC_RTE) */ -#define CONFIG_SYS_RTCSC (RTCSC_SEC | RTCSC_RTE) - -/*----------------------------------------------------------------------- - * PISCR - Periodic Interrupt Status and Control 11-31 - *----------------------------------------------------------------------- - * Clear Periodic Interrupt Status, Interrupt Timer freezing enabled - */ -#define CONFIG_SYS_PISCR (PISCR_PS | PISCR_PITF) - -/*----------------------------------------------------------------------- - * PLPRCR - PLL, Low-Power, and Reset Control Register 15-30 - *----------------------------------------------------------------------- - * Reset PLL lock status sticky bit, timer expired status bit and timer - * interrupt status bit - * - * If this is a 80 MHz CPU, set PLL multiplication factor to 5 (5*16=80)! - */ -/* up to 50 MHz we use a 1:1 clock */ -#define CONFIG_SYS_PLPRCR ( (5 << PLPRCR_MF_SHIFT) | PLPRCR_TEXPS ) - -/*----------------------------------------------------------------------- - * SCCR - System Clock and reset Control Register 15-27 - *----------------------------------------------------------------------- - * Set clock output, timebase and RTC source and divider, - * power management and some other internal clocks - */ -#define SCCR_MASK SCCR_EBDF00 -/* up to 50 MHz we use a 1:1 clock */ -#define CONFIG_SYS_SCCR (SCCR_COM11 | SCCR_TBS) - -/*----------------------------------------------------------------------- - * PCMCIA stuff - *----------------------------------------------------------------------- - * - */ -#define CONFIG_SYS_PCMCIA_MEM_ADDR (0xE0000000) -#define CONFIG_SYS_PCMCIA_MEM_SIZE ( 64 << 20 ) -#define CONFIG_SYS_PCMCIA_DMA_ADDR (0xE4000000) -#define CONFIG_SYS_PCMCIA_DMA_SIZE ( 64 << 20 ) -#define CONFIG_SYS_PCMCIA_ATTRB_ADDR (0xE8000000) -#define CONFIG_SYS_PCMCIA_ATTRB_SIZE ( 64 << 20 ) -#define CONFIG_SYS_PCMCIA_IO_ADDR (0xEC000000) -#define CONFIG_SYS_PCMCIA_IO_SIZE ( 64 << 20 ) - -/*----------------------------------------------------------------------- - * IDE/ATA stuff (Supports IDE harddisk on PCMCIA Adapter) - *----------------------------------------------------------------------- - */ - -#define CONFIG_IDE_PREINIT 1 /* Use preinit IDE hook */ -#define CONFIG_IDE_8xx_PCCARD 1 /* Use IDE with PC Card Adapter */ - -#undef CONFIG_IDE_8xx_DIRECT /* Direct IDE not supported */ -#undef CONFIG_IDE_LED /* LED for ide not supported */ -#undef CONFIG_IDE_RESET /* reset for ide not supported */ - -#define CONFIG_SYS_IDE_MAXBUS 1 /* max. 1 IDE bus */ -#define CONFIG_SYS_IDE_MAXDEVICE 1 /* max. 1 drive per IDE bus */ - -#define CONFIG_SYS_ATA_IDE0_OFFSET 0x0000 - -#define CONFIG_SYS_ATA_BASE_ADDR CONFIG_SYS_PCMCIA_MEM_ADDR - -/* Offset for data I/O */ -#define CONFIG_SYS_ATA_DATA_OFFSET (CONFIG_SYS_PCMCIA_MEM_SIZE + 0x320) - -/* Offset for normal register accesses */ -#define CONFIG_SYS_ATA_REG_OFFSET (2 * CONFIG_SYS_PCMCIA_MEM_SIZE + 0x320) - -/* Offset for alternate registers */ -#define CONFIG_SYS_ATA_ALT_OFFSET 0x0100 - -/*----------------------------------------------------------------------- - * - *----------------------------------------------------------------------- - * - */ -/*#define CONFIG_SYS_DER 0x2002000F*/ -#define CONFIG_SYS_DER 0 - -/* - * Init Memory Controller: - * - * BR0 and OR0 (FLASH) - */ - -#define FLASH_BASE_PRELIM 0xFE000000 /* FLASH base */ -#define CONFIG_SYS_PRELIM_OR_AM 0xFE000000 /* OR addr mask */ - -/* FLASH timing: ACS = 0, TRLX = 0, CSNT = 0, SCY = 4, ETHR = 0, BIH = 1 */ -#define CONFIG_SYS_OR_TIMING_FLASH (OR_SCY_4_CLK | OR_BI) - -#define CONFIG_SYS_OR0_PRELIM (CONFIG_SYS_PRELIM_OR_AM | CONFIG_SYS_OR_TIMING_FLASH) -#define CONFIG_SYS_BR0_PRELIM ((FLASH_BASE_PRELIM & BR_BA_MSK) | BR_V) - -/* - * BR1 and OR1 (SDRAM) - * - */ -#define SDRAM_BASE_PRELIM 0x00000000 /* SDRAM base */ -#define SDRAM_MAX_SIZE 0x01000000 /* max 16 MB */ - -/* SDRAM timing: Multiplexed addresses, GPL5 output to GPL5_A (don't care) */ -#define CONFIG_SYS_OR_TIMING_SDRAM 0x00000E00 - -#define CONFIG_SYS_OR1_PRELIM (CONFIG_SYS_PRELIM_OR_AM | CONFIG_SYS_OR_TIMING_SDRAM ) -#define CONFIG_SYS_BR1_PRELIM ((SDRAM_BASE_PRELIM & BR_BA_MSK) | BR_MS_UPMA | BR_V ) - -/* RPXLITE mem setting */ -#define CONFIG_SYS_BR3_PRELIM 0xFA400001 /* BCSR */ -#define CONFIG_SYS_OR3_PRELIM 0xFFFF8910 -#define CONFIG_SYS_BR4_PRELIM 0xFA000401 /* NVRAM&SRAM */ -#define CONFIG_SYS_OR4_PRELIM 0xFFFE0970 - -/* - * Memory Periodic Timer Prescaler - */ - -/* periodic timer for refresh */ -#define CONFIG_SYS_MAMR_PTA 58 - -/* - * Refresh clock Prescalar - */ -#define CONFIG_SYS_MPTPR MPTPR_PTP_DIV8 - -/* - * MAMR settings for SDRAM - */ - -/* 10 column SDRAM */ -#define CONFIG_SYS_MAMR_10COL ((CONFIG_SYS_MAMR_PTA << MAMR_PTA_SHIFT) | MAMR_PTAE | \ - MAMR_AMA_TYPE_2 | MAMR_DSA_1_CYCL | MAMR_G0CLA_A12 | \ - MAMR_GPL_A4DIS | MAMR_RLFA_4X | MAMR_WLFA_3X | MAMR_TLFA_16X) - -/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% */ -/* Configuration variable added by yooth. */ -/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% */ - -/* - * BCSRx - * - * Board Status and Control Registers - * - */ - -#define BCSR0 0xFA400000 -#define BCSR1 0xFA400001 -#define BCSR2 0xFA400002 -#define BCSR3 0xFA400003 - -#define BCSR0_ENMONXCVR 0x01 /* Monitor XVCR Control */ -#define BCSR0_ENNVRAM 0x02 /* CS4# Control */ -#define BCSR0_LED5 0x04 /* LED5 control 0='on' 1='off' */ -#define BCSR0_LED4 0x08 /* LED4 control 0='on' 1='off' */ -#define BCSR0_FULLDPLX 0x10 /* Ethernet XCVR Control */ -#define BCSR0_COLTEST 0x20 -#define BCSR0_ETHLPBK 0x40 -#define BCSR0_ETHEN 0x80 - -#define BCSR1_PCVCTL7 0x01 /* PC Slot B Control */ -#define BCSR1_PCVCTL6 0x02 -#define BCSR1_PCVCTL5 0x04 -#define BCSR1_PCVCTL4 0x08 -#define BCSR1_IPB5SEL 0x10 - -#define BCSR2_ENPA5HDR 0x08 /* USB Control */ -#define BCSR2_ENUSBCLK 0x10 -#define BCSR2_USBPWREN 0x20 -#define BCSR2_USBSPD 0x40 -#define BCSR2_USBSUSP 0x80 - -#define BCSR3_BWRTC 0x01 /* Real Time Clock Battery */ -#define BCSR3_BWNVR 0x02 /* NVRAM Battery */ -#define BCSR3_RDY_BSY 0x04 /* Flash Operation */ -#define BCSR3_RPXL 0x08 /* Reserved (reads back '1') */ -#define BCSR3_D27 0x10 /* Dip Switch settings */ -#define BCSR3_D26 0x20 -#define BCSR3_D25 0x40 -#define BCSR3_D24 0x80 - -#endif /* __CONFIG_H */ diff --git a/include/pcmcia.h b/include/pcmcia.h index 1ad3e636a9c..952a67c17c2 100644 --- a/include/pcmcia.h +++ b/include/pcmcia.h @@ -22,7 +22,7 @@ #if !defined(CONFIG_PCMCIA_SLOT_A) && !defined(CONFIG_PCMCIA_SLOT_B) /* The RPX series use SLOT_B */ -#if defined(CONFIG_RPXCLASSIC) || defined(CONFIG_RPXLITE) +#if defined(CONFIG_RPXLITE) # define CONFIG_PCMCIA_SLOT_B #elif defined(CONFIG_FADS) /* The FADS series are a mess */ # if defined(CONFIG_MPC86x) || defined(CONFIG_MPC821) diff --git a/post/cpu/mpc8xx/ether.c b/post/cpu/mpc8xx/ether.c index 53c0e4dfda1..d12250018ae 100644 --- a/post/cpu/mpc8xx/ether.c +++ b/post/cpu/mpc8xx/ether.c @@ -365,11 +365,6 @@ static void scc_init (int scc_index) immr->im_cpm.cp_scc[scc_index].scc_psmr = SCC_PSMR_ENCRC | SCC_PSMR_NIB22 | SCC_PSMR_LPB; -#ifdef CONFIG_RPXCLASSIC - *((uchar *) BCSR0) &= ~BCSR0_ETHLPBK; - *((uchar *) BCSR0) |= (BCSR0_ETHEN | BCSR0_COLTEST | BCSR0_FULLDPLX); -#endif - #ifdef CONFIG_RPXLITE *((uchar *) BCSR0) |= BCSR0_ETHEN; #endif @@ -386,8 +381,6 @@ static void scc_init (int scc_index) */ #if defined (CONFIG_FADS) udelay (10000); /* wait 10 ms */ -#elif defined(CONFIG_RPXCLASSIC) - udelay (100000); /* wait 100 ms */ #endif } diff --git a/post/cpu/mpc8xx/uart.c b/post/cpu/mpc8xx/uart.c index 25d63d8120f..5214c71b085 100644 --- a/post/cpu/mpc8xx/uart.c +++ b/post/cpu/mpc8xx/uart.c @@ -106,7 +106,7 @@ static void smc_init (int smc_index) ~(smc_index == 1 ? BCSR1_RS232EN_1 : BCSR1_RS232EN_2); #endif -#if defined(CONFIG_RPXLITE) || defined(CONFIG_RPXCLASSIC) +#if defined(CONFIG_RPXLITE) /* Enable Monitor Port Transceiver */ *((uchar *) BCSR0) |= BCSR0_ENMONXCVR; #endif -- cgit v1.2.3 From 0ebf5f5c128207b02b2000e9f75cae3b36186c04 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Fri, 4 Apr 2014 15:25:07 +0900 Subject: powerpc: remove RPXsuper board support Enough time has passed since this board was moved to Orphan. Remove. - Remove board/rpxsuper/* - Remove include/configs/RPXsuper.h - Move the entry from boards.cfg to doc/README.scrapyard Signed-off-by: Masahiro Yamada --- board/rpxsuper/Makefile | 8 - board/rpxsuper/flash.c | 416 ------------------------------------- board/rpxsuper/mii_phy.c | 107 ---------- board/rpxsuper/readme | 30 --- board/rpxsuper/rpxsuper.c | 289 -------------------------- board/rpxsuper/rpxsuper.h | 25 --- boards.cfg | 1 - doc/README.scrapyard | 1 + include/configs/RPXsuper.h | 501 --------------------------------------------- 9 files changed, 1 insertion(+), 1377 deletions(-) delete mode 100644 board/rpxsuper/Makefile delete mode 100644 board/rpxsuper/flash.c delete mode 100644 board/rpxsuper/mii_phy.c delete mode 100644 board/rpxsuper/readme delete mode 100644 board/rpxsuper/rpxsuper.c delete mode 100644 board/rpxsuper/rpxsuper.h delete mode 100644 include/configs/RPXsuper.h (limited to 'board') diff --git a/board/rpxsuper/Makefile b/board/rpxsuper/Makefile deleted file mode 100644 index 239b419ab2c..00000000000 --- a/board/rpxsuper/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -# -# (C) Copyright 2000-2006 -# Wolfgang Denk, DENX Software Engineering, wd@denx.de. -# -# SPDX-License-Identifier: GPL-2.0+ -# - -obj-y := rpxsuper.o flash.o mii_phy.o diff --git a/board/rpxsuper/flash.c b/board/rpxsuper/flash.c deleted file mode 100644 index 24bcd7c0a3f..00000000000 --- a/board/rpxsuper/flash.c +++ /dev/null @@ -1,416 +0,0 @@ -/* - * (C) Copyright 2000 - * Marius Groeger - * Sysgo Real-Time Solutions, GmbH - * - * (C) Copyright 2000 - * Wolfgang Denk, DENX Software Engineering, wd@denx.de. - * - * Flash Routines for AMD 29F080B devices - * Added support for 64bit and AMD 29DL323B - * - *-------------------------------------------------------------------- - * SPDX-License-Identifier: GPL-2.0+ - */ - -#include -#include -#include - -flash_info_t flash_info[CONFIG_SYS_MAX_FLASH_BANKS]; - -#define RD_SWP32(x) in_le32((volatile u32*)x) - -/*----------------------------------------------------------------------- - * Functions - */ - -static ulong flash_get_size (vu_long *addr, flash_info_t *info); -static int write_word (flash_info_t *info, ulong dest, ulong data); - -/*----------------------------------------------------------------------- - */ - -unsigned long flash_init(void) -{ - int i; - - /* Init: no FLASHes known */ - for (i = 0; i < CONFIG_SYS_MAX_FLASH_BANKS; ++i) - flash_info[i].flash_id = FLASH_UNKNOWN; - - /* for now, only support the 4 MB Flash SIMM */ - (void)flash_get_size((vu_long *) CONFIG_SYS_FLASH0_BASE, - &flash_info[0]); - - /* - * protect monitor and environment sectors - */ - -#if CONFIG_SYS_MONITOR_BASE >= CONFIG_SYS_FLASH0_BASE - flash_protect(FLAG_PROTECT_SET, - CONFIG_SYS_MONITOR_BASE, - CONFIG_SYS_MONITOR_BASE + monitor_flash_len - 1, - &flash_info[0]); -#endif - -#if defined(CONFIG_ENV_IS_IN_FLASH) && defined(CONFIG_ENV_ADDR) -#ifndef CONFIG_ENV_SIZE -#define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE -#endif - flash_protect(FLAG_PROTECT_SET, - CONFIG_ENV_ADDR, - CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, &flash_info[0]); -#endif - - return CONFIG_SYS_FLASH0_SIZE * 1024 * 1024; -} - -/*----------------------------------------------------------------------- - */ -void flash_print_info (flash_info_t *info) -{ - int i; - - if (info->flash_id == FLASH_UNKNOWN) { - printf ("missing or unknown FLASH type\n"); - return; - } - - switch (info->flash_id & FLASH_VENDMASK) { - case (AMD_MANUFACT & FLASH_VENDMASK): - printf ("AMD "); - break; - case (FUJ_MANUFACT & FLASH_VENDMASK): - printf ("FUJITSU "); - break; - case (SST_MANUFACT & FLASH_VENDMASK): - printf ("SST "); - break; - default: - printf ("Unknown Vendor "); - break; - } - - switch (info->flash_id & FLASH_TYPEMASK) { - case (AMD_ID_DL323B & FLASH_TYPEMASK): - printf("AM29DL323B (32 MBit)\n"); - break; - default: - printf ("Unknown Chip Type\n"); - break; - } - - printf (" Size: %ld MB in %d Sectors\n", - info->size >> 20, info->sector_count); - - printf (" Sector Start Addresses:"); - for (i = 0; i < info->sector_count; ++i) { - if ((i % 5) == 0) printf ("\n "); - printf (" %08lX%s", - info->start[i], - info->protect[i] ? " (RO)" : " " - ); - } - printf ("\n"); - return; -} - -/* - * The following code cannot be run from FLASH! - */ - -static ulong flash_get_size (vu_long *addr, flash_info_t *info) -{ - short i; - vu_long vendor[2], devid[2]; - ulong base = (ulong)addr; - - /* Reset and Write auto select command: read Manufacturer ID */ - addr[0] = 0xf0f0f0f0; - addr[2 * 0x0555] = 0xAAAAAAAA; - addr[2 * 0x02AA] = 0x55555555; - addr[2 * 0x0555] = 0x90909090; - addr[1] = 0xf0f0f0f0; - addr[2 * 0x0555 + 1] = 0xAAAAAAAA; - addr[2 * 0x02AA + 1] = 0x55555555; - addr[2 * 0x0555 + 1] = 0x90909090; - udelay (1000); - - vendor[0] = RD_SWP32(&addr[0]); - vendor[1] = RD_SWP32(&addr[1]); - if (vendor[0] != vendor[1] || vendor[0] != AMD_MANUFACT) { - info->size = 0; - goto out; - } - - devid[0] = RD_SWP32(&addr[2]); - devid[1] = RD_SWP32(&addr[3]); - - if (devid[0] == AMD_ID_DL323B) { - /* - * we have 2 Banks - * Bank 1 (23 Sectors): 0-7=8kbyte, 8-22=64kbyte - * Bank 2 (48 Sectors): 23-70=64kbyte - */ - info->flash_id = (AMD_MANUFACT & FLASH_VENDMASK) | - (AMD_ID_DL323B & FLASH_TYPEMASK); - info->sector_count = 71; - info->size = 4 * (8 * 8 + 63 * 64) * 1024; - } - else { - info->size = 0; - goto out; - } - - /* set up sector start address table */ - for (i = 0; i < 8; i++) { - info->start[i] = base + (i * 0x8000); - } - for (i = 8; i < info->sector_count; i++) { - info->start[i] = base + (i * 0x40000) + 8 * 0x8000 - 8 * 0x40000; - } - - /* check for protected sectors */ - for (i = 0; i < info->sector_count; i++) { - /* read sector protection at sector address */ - addr = (volatile unsigned long *)(info->start[i]); - addr[2 * 0x0555] = 0xAAAAAAAA; - addr[2 * 0x02AA] = 0x55555555; - addr[2 * 0x0555] = 0x90909090; - addr[2 * 0x0555 + 1] = 0xAAAAAAAA; - addr[2 * 0x02AA + 1] = 0x55555555; - addr[2 * 0x0555 + 1] = 0x90909090; - udelay (1000); - base = RD_SWP32(&addr[4]); - base |= RD_SWP32(&addr[5]); - info->protect[i] = base & 0x00010001 ? 1 : 0; - } - addr = (vu_long*)info->start[0]; - -out: - /* reset command */ - addr[0] = 0xf0f0f0f0; - addr[1] = 0xf0f0f0f0; - - return info->size; -} - - -/*----------------------------------------------------------------------- - */ - -int flash_erase (flash_info_t *info, int s_first, int s_last) -{ - vu_long *addr = (vu_long*)(info->start[0]); - int flag, prot, sect, l_sect; - ulong start, now, last; - - if ((s_first < 0) || (s_first > s_last)) { - if (info->flash_id == FLASH_UNKNOWN) { - printf ("- missing\n"); - } else { - printf ("- no sectors to erase\n"); - } - return 1; - } - - prot = 0; - for (sect = s_first; sect <= s_last; sect++) { - if (info->protect[sect]) { - prot++; - } - } - - if (prot) { - printf ("- Warning: %d protected sectors will not be erased!\n", - prot); - } else { - printf ("\n"); - } - - l_sect = -1; - - /* Disable interrupts which might cause a timeout here */ - flag = disable_interrupts(); - - addr[2 * 0x0555] = 0xAAAAAAAA; - addr[2 * 0x02AA] = 0x55555555; - addr[2 * 0x0555] = 0x80808080; - addr[2 * 0x0555] = 0xAAAAAAAA; - addr[2 * 0x02AA] = 0x55555555; - addr[2 * 0x0555 + 1] = 0xAAAAAAAA; - addr[2 * 0x02AA + 1] = 0x55555555; - addr[2 * 0x0555 + 1] = 0x80808080; - addr[2 * 0x0555 + 1] = 0xAAAAAAAA; - addr[2 * 0x02AA + 1] = 0x55555555; - udelay (100); - - /* Start erase on unprotected sectors */ - for (sect = s_first; sect<=s_last; sect++) { - if (info->protect[sect] == 0) { /* not protected */ - addr = (vu_long*)(info->start[sect]); - addr[0] = 0x30303030; - addr[1] = 0x30303030; - l_sect = sect; - } - } - - /* re-enable interrupts if necessary */ - if (flag) - enable_interrupts(); - - /* wait at least 80us - let's wait 1 ms */ - udelay (1000); - - /* - * We wait for the last triggered sector - */ - if (l_sect < 0) - goto DONE; - - start = get_timer (0); - last = start; - addr = (vu_long*)(info->start[l_sect]); - while ( (addr[0] & 0x80808080) != 0x80808080 || - (addr[1] & 0x80808080) != 0x80808080) { - if ((now = get_timer(start)) > CONFIG_SYS_FLASH_ERASE_TOUT) { - printf ("Timeout\n"); - return 1; - } - /* show that we're waiting */ - if ((now - last) > 1000) { /* every second */ - serial_putc ('.'); - last = now; - } - } - - DONE: - /* reset to read mode */ - addr = (volatile unsigned long *)info->start[0]; - addr[0] = 0xF0F0F0F0; /* reset bank */ - addr[1] = 0xF0F0F0F0; /* reset bank */ - - printf (" done\n"); - return 0; -} - -/*----------------------------------------------------------------------- - * Copy memory to flash, returns: - * 0 - OK - * 1 - write timeout - * 2 - Flash not erased - */ - -int write_buff (flash_info_t *info, uchar *src, ulong addr, ulong cnt) -{ - ulong cp, wp, data; - int i, l, rc; - - wp = (addr & ~3); /* get lower word aligned address */ - - /* - * handle unaligned start bytes - */ - if ((l = addr - wp) != 0) { - data = 0; - for (i=0, cp=wp; i0; ++i) { - data = (data << 8) | *src++; - --cnt; - ++cp; - } - for (; cnt==0 && i<4; ++i, ++cp) { - data = (data << 8) | (*(uchar *)cp); - } - - if ((rc = write_word(info, wp, data)) != 0) { - return (rc); - } - wp += 4; - } - - /* - * handle word aligned part - */ - while (cnt >= 4) { - data = 0; - for (i=0; i<4; ++i) { - data = (data << 8) | *src++; - } - if ((rc = write_word(info, wp, data)) != 0) { - return (rc); - } - wp += 4; - cnt -= 4; - } - - if (cnt == 0) { - return (0); - } - - /* - * handle unaligned tail bytes - */ - data = 0; - for (i=0, cp=wp; i<4 && cnt>0; ++i, ++cp) { - data = (data << 8) | *src++; - --cnt; - } - for (; i<4; ++i, ++cp) { - data = (data << 8) | (*(uchar *)cp); - } - - return (write_word(info, wp, data)); -} - -/*----------------------------------------------------------------------- - * Write a word to Flash, returns: - * 0 - OK - * 1 - write timeout - * 2 - Flash not erased - */ -static int write_word (flash_info_t *info, ulong dest, ulong data) -{ - vu_long *addr = (vu_long*)(info->start[0]); - ulong start; - int flag; - - /* Check if Flash is (sufficiently) erased */ - if ((*((vu_long *)dest) & data) != data) { - return (2); - } - /* Disable interrupts which might cause a timeout here */ - flag = disable_interrupts(); - - if ((dest & 0x00000004) == 0) { - addr[2 * 0x0555] = 0xAAAAAAAA; - addr[2 * 0x02AA] = 0x55555555; - addr[2 * 0x0555] = 0xA0A0A0A0; - } - else { - addr[2 * 0x0555 + 1] = 0xAAAAAAAA; - addr[2 * 0x02AA + 1] = 0x55555555; - addr[2 * 0x0555 + 1] = 0xA0A0A0A0; - } - - *((vu_long *)dest) = data; - - /* re-enable interrupts if necessary */ - if (flag) - enable_interrupts(); - - /* data polling for D7 */ - start = get_timer (0); - while ((*((vu_long *)dest) & 0x80808080) != (data & 0x80808080)) { - if (get_timer(start) > CONFIG_SYS_FLASH_WRITE_TOUT) { - return (1); - } - } - return (0); -} - -/*----------------------------------------------------------------------- - */ diff --git a/board/rpxsuper/mii_phy.c b/board/rpxsuper/mii_phy.c deleted file mode 100644 index 12e23f487f4..00000000000 --- a/board/rpxsuper/mii_phy.c +++ /dev/null @@ -1,107 +0,0 @@ -#include -#include -#include "rpxsuper.h" - -#define MII_MDIO 0x01 -#define MII_MDCK 0x02 -#define MII_MDIR 0x04 - -void -mii_discover_phy(void) -{ - int known; - unsigned short phy_reg; - unsigned long phy_id; - - known = 0; - printf("Discovering phy @ 0: "); - phy_id = mii_phy_read(2) << 16; - phy_id |= mii_phy_read(3); - if ((phy_id & 0xFFFFFC00) == 0x00137800) { - printf("Level One "); - if ((phy_id & 0x000003F0) == 0xE0) { - printf("LXT971A Revision %d\n", (int)(phy_id & 0xF)); - known = 1; - } - else printf("unknown type\n"); - } - else printf("unknown OUI = 0x%08lX\n", phy_id); - - phy_reg = mii_phy_read(1); - if (!(phy_reg & 0x0004)) printf("Link is down\n"); - if (!(phy_reg & 0x0020)) printf("Auto-negotiation not complete\n"); - if (phy_reg & 0x0002) printf("Jabber condition detected\n"); - if (phy_reg & 0x0010) printf("Remote fault condition detected \n"); - - if (known) { - phy_reg = mii_phy_read(17); - if (phy_reg & 0x0400) - printf("Phy operating at %d MBit/s in %s-duplex mode\n", - phy_reg & 0x4000 ? 100 : 10, - phy_reg & 0x0200 ? "full" : "half"); - else - printf("bad link!!\n"); -/* -left off: no link, green 100MBit, yellow 10MBit -right off: no activity, green full-duplex, yellow half-duplex -*/ - mii_phy_write(20, 0x0452); - } -} - -unsigned short -mii_phy_read(unsigned short reg) -{ - int i; - unsigned short tmp, val = 0, adr = 0; - t_rpx_regs *regs = (t_rpx_regs*)CONFIG_SYS_REGS_BASE; - - tmp = 0x6002 | (adr << 7) | (reg << 2); - regs->bcsr4 = 0xC3; - for (i = 0; i < 64; i++) { - regs->bcsr4 ^= MII_MDCK; - } - for (i = 0; i < 16; i++) { - regs->bcsr4 &= ~MII_MDCK; - if (tmp & 0x8000) regs->bcsr4 |= MII_MDIO; - else regs->bcsr4 &= ~MII_MDIO; - regs->bcsr4 |= MII_MDCK; - tmp <<= 1; - } - regs->bcsr4 |= MII_MDIR; - for (i = 0; i < 16; i++) { - val <<= 1; - regs->bcsr4 = MII_MDIO | (regs->bcsr4 | MII_MDCK); - if (regs->bcsr4 & MII_MDIO) val |= 1; - regs->bcsr4 = MII_MDIO | (regs->bcsr4 &= ~MII_MDCK); - } - return val; -} - -void -mii_phy_write(unsigned short reg, unsigned short val) -{ - int i; - unsigned short tmp, adr = 0; - t_rpx_regs *regs = (t_rpx_regs*)CONFIG_SYS_REGS_BASE; - - tmp = 0x5002 | (adr << 7) | (reg << 2); - regs->bcsr4 = 0xC3; - for (i = 0; i < 64; i++) { - regs->bcsr4 ^= MII_MDCK; - } - for (i = 0; i < 16; i++) { - regs->bcsr4 &= ~MII_MDCK; - if (tmp & 0x8000) regs->bcsr4 |= MII_MDIO; - else regs->bcsr4 &= ~MII_MDIO; - regs->bcsr4 |= MII_MDCK; - tmp <<= 1; - } - for (i = 0; i < 16; i++) { - regs->bcsr4 &= ~MII_MDCK; - if (val & 0x8000) regs->bcsr4 |= MII_MDIO; - else regs->bcsr4 &= ~MII_MDIO; - regs->bcsr4 |= MII_MDCK; - val <<= 1; - } -} diff --git a/board/rpxsuper/readme b/board/rpxsuper/readme deleted file mode 100644 index 21267bdd8ca..00000000000 --- a/board/rpxsuper/readme +++ /dev/null @@ -1,30 +0,0 @@ -Hi, - -so this is the port to the Embedded Planet RPX Super Board. - -ATTENTION -This code is only tested on the AY-Version, which is an early release with some -hardware bugs. The main problem is that this board uses the default Hard Reset -Configuration Word and not the 4 bytes located at start of FLASH because at -0xFE000000 is no FLASH. The FLASH consists out of 4 chips each 16bits wide. Be -carefull, the bytes are swapped. So DQ0-7 is the high byte, DQ8-15 ist the low -byte. - -The icache can only manually be enabled after reset. -The FLASH and main SDRAM is working with icache enabled. -The local SDRAM can only be used as data memory when icache is enabled. -If U-Boot runs in local SDRAM, TFTP does not work. -The functions in mii_phy.c are all working. Call mii_phy_discover() out of -eth_init() and solve the linker error. -I2C, RTC/NVRAM and PCMCIA are not working yet. - -TODO -The 32MB local SDRAM is working but not shown in the startup messages of -U-Boot. If you locate U-Boot or any other program to this area it won't run. -Turning the ichache off does not solve this problem. - -As I won't buy another RPX Super there might be some little work to do for you -getting this U-Boot port running on the final board. - - -frank.morauf@salzbrenner.com diff --git a/board/rpxsuper/rpxsuper.c b/board/rpxsuper/rpxsuper.c deleted file mode 100644 index dc558707faa..00000000000 --- a/board/rpxsuper/rpxsuper.c +++ /dev/null @@ -1,289 +0,0 @@ -/* - * (C) Copyright 2000 - * Sysgo Real-Time Solutions, GmbH - * Marius Groeger - * - * (C) Copyright 2001 - * Advent Networks, Inc. - * Jay Monkman - * - * SPDX-License-Identifier: GPL-2.0+ - */ - -#include -#include -#include -#include "rpxsuper.h" - -/* - * I/O Port configuration table - * - * if conf is 1, then that port pin will be configured at boot time - * according to the five values podr/pdir/ppar/psor/pdat for that entry - */ - -const iop_conf_t iop_conf_tab[4][32] = { - - /* Port A configuration */ - { /* conf ppar psor pdir podr pdat */ - /* PA31 */ { 1, 0, 0, 0, 0, 0 }, /* FCC1 *ATMTXEN */ - /* PA30 */ { 1, 0, 0, 0, 0, 0 }, /* FCC1 ATMTCA */ - /* PA29 */ { 1, 0, 0, 0, 0, 0 }, /* FCC1 ATMTSOC */ - /* PA28 */ { 1, 0, 0, 0, 0, 0 }, /* FCC1 *ATMRXEN */ - /* PA27 */ { 1, 0, 0, 0, 0, 0 }, /* FCC1 ATMRSOC */ - /* PA26 */ { 1, 0, 0, 0, 0, 0 }, /* FCC1 ATMRCA */ - /* PA25 */ { 1, 0, 0, 0, 0, 0 }, /* FCC1 ATMTXD[0] */ - /* PA24 */ { 1, 0, 0, 0, 0, 0 }, /* FCC1 ATMTXD[1] */ - /* PA23 */ { 1, 0, 0, 0, 0, 0 }, /* FCC1 ATMTXD[2] */ - /* PA22 */ { 1, 0, 0, 0, 0, 0 }, /* FCC1 ATMTXD[3] */ - /* PA21 */ { 1, 0, 0, 0, 0, 0 }, /* FCC1 ATMTXD[4] */ - /* PA20 */ { 1, 0, 0, 0, 0, 0 }, /* FCC1 ATMTXD[5] */ - /* PA19 */ { 1, 0, 0, 0, 0, 0 }, /* FCC1 ATMTXD[6] */ - /* PA18 */ { 1, 0, 0, 0, 0, 0 }, /* FCC1 ATMTXD[7] */ - /* PA17 */ { 1, 0, 0, 0, 0, 0 }, /* FCC1 ATMRXD[7] */ - /* PA16 */ { 1, 0, 0, 0, 0, 0 }, /* FCC1 ATMRXD[6] */ - /* PA15 */ { 1, 0, 0, 0, 0, 0 }, /* FCC1 ATMRXD[5] */ - /* PA14 */ { 1, 0, 0, 0, 0, 0 }, /* FCC1 ATMRXD[4] */ - /* PA13 */ { 1, 0, 0, 0, 0, 0 }, /* FCC1 ATMRXD[3] */ - /* PA12 */ { 1, 0, 0, 0, 0, 0 }, /* FCC1 ATMRXD[2] */ - /* PA11 */ { 1, 0, 0, 0, 0, 0 }, /* FCC1 ATMRXD[1] */ - /* PA10 */ { 1, 0, 0, 0, 0, 0 }, /* FCC1 ATMRXD[0] */ - /* PA9 */ { 1, 1, 0, 1, 0, 0 }, /* SMC2 TXD */ - /* PA8 */ { 1, 1, 0, 0, 0, 0 }, /* SMC2 RXD */ - /* PA7 */ { 1, 0, 0, 0, 0, 0 }, /* PA7 */ - /* PA6 */ { 1, 0, 0, 0, 0, 0 }, /* PA6 */ - /* PA5 */ { 1, 0, 0, 0, 0, 0 }, /* PA5 */ - /* PA4 */ { 1, 0, 0, 0, 0, 0 }, /* PA4 */ - /* PA3 */ { 1, 0, 0, 0, 0, 0 }, /* PA3 */ - /* PA2 */ { 1, 0, 0, 0, 0, 0 }, /* PA2 */ - /* PA1 */ { 1, 0, 0, 0, 0, 0 }, /* PA1 */ - /* PA0 */ { 1, 0, 0, 0, 0, 0 } /* PA0 */ - }, - - /* Port B configuration */ - { /* conf ppar psor pdir podr pdat */ - /* PB31 */ { 1, 1, 0, 1, 0, 0 }, /* FCC2 MII TX_ER */ - /* PB30 */ { 1, 1, 0, 0, 0, 0 }, /* FCC2 MII RX_DV */ - /* PB29 */ { 1, 1, 1, 1, 0, 0 }, /* FCC2 MII TX_EN */ - /* PB28 */ { 1, 1, 0, 0, 0, 0 }, /* FCC2 MII RX_ER */ - /* PB27 */ { 1, 1, 0, 0, 0, 0 }, /* FCC2 MII COL */ - /* PB26 */ { 1, 1, 0, 0, 0, 0 }, /* FCC2 MII CRS */ - /* PB25 */ { 1, 1, 0, 1, 0, 0 }, /* FCC2 MII TxD[3] */ - /* PB24 */ { 1, 1, 0, 1, 0, 0 }, /* FCC2 MII TxD[2] */ - /* PB23 */ { 1, 1, 0, 1, 0, 0 }, /* FCC2 MII TxD[1] */ - /* PB22 */ { 1, 1, 0, 1, 0, 0 }, /* FCC2 MII TxD[0] */ - /* PB21 */ { 1, 1, 0, 0, 0, 0 }, /* FCC2 MII RxD[0] */ - /* PB20 */ { 1, 1, 0, 0, 0, 0 }, /* FCC2 MII RxD[1] */ - /* PB19 */ { 1, 1, 0, 0, 0, 0 }, /* FCC2 MII RxD[2] */ - /* PB18 */ { 1, 1, 0, 0, 0, 0 }, /* FCC2 MII RxD[3] */ - /* PB17 */ { 1, 1, 0, 0, 0, 0 }, /* FCC3 MII RX_DV */ - /* PB16 */ { 1, 1, 0, 0, 0, 0 }, /* FCC3 MII RX_ER */ - /* PB15 */ { 1, 1, 0, 1, 0, 0 }, /* FCC3 MII TX_ER */ - /* PB14 */ { 1, 1, 0, 1, 0, 0 }, /* FCC3 MII TX_EN */ - /* PB13 */ { 1, 1, 0, 0, 0, 0 }, /* FCC3 MII COL */ - /* PB12 */ { 1, 1, 0, 0, 0, 0 }, /* FCC3 MII CRS */ - /* PB11 */ { 1, 1, 0, 0, 0, 0 }, /* FCC3 MII RxD[3] */ - /* PB10 */ { 1, 1, 0, 0, 0, 0 }, /* FCC3 MII RxD[2] */ - /* PB9 */ { 1, 1, 0, 0, 0, 0 }, /* FCC3 MII RxD[1] */ - /* PB8 */ { 1, 1, 0, 0, 0, 0 }, /* FCC3 MII RxD[0] */ - /* PB7 */ { 0, 0, 0, 0, 0, 0 }, /* PB7 */ - /* PB6 */ { 1, 1, 0, 1, 0, 0 }, /* FCC3 MII TxD[1] */ - /* PB5 */ { 1, 1, 0, 1, 0, 0 }, /* FCC3 MII TxD[2] */ - /* PB4 */ { 1, 1, 0, 1, 0, 0 }, /* FCC3 MII TxD[3] */ - /* PB3 */ { 0, 0, 0, 0, 0, 0 }, /* pin doesn't exist */ - /* PB2 */ { 0, 0, 0, 0, 0, 0 }, /* pin doesn't exist */ - /* PB1 */ { 0, 0, 0, 0, 0, 0 }, /* pin doesn't exist */ - /* PB0 */ { 0, 0, 0, 0, 0, 0 } /* pin doesn't exist */ - }, - - /* Port C */ - { /* conf ppar psor pdir podr pdat */ - /* PC31 */ { 1, 0, 0, 1, 0, 0 }, /* PC31 */ - /* PC30 */ { 1, 0, 0, 1, 0, 0 }, /* PC30 */ - /* PC29 */ { 1, 1, 1, 0, 0, 0 }, /* SCC1 EN *CLSN */ - /* PC28 */ { 1, 0, 0, 1, 0, 0 }, /* PC28 */ - /* PC27 */ { 1, 1, 0, 1, 0, 0 }, /* FCC3 MII TxD[0] */ - /* PC26 */ { 1, 0, 0, 1, 0, 0 }, /* PC26 */ - /* PC25 */ { 1, 0, 0, 1, 0, 0 }, /* PC25 */ - /* PC24 */ { 1, 0, 0, 1, 0, 0 }, /* PC24 */ - /* PC23 */ { 1, 1, 0, 1, 0, 0 }, /* ATMTFCLK */ - /* PC22 */ { 1, 1, 0, 0, 0, 0 }, /* ATMRFCLK */ - /* PC21 */ { 1, 1, 0, 0, 0, 0 }, /* SCC1 EN RXCLK */ - /* PC20 */ { 1, 1, 0, 0, 0, 0 }, /* SCC1 EN TXCLK */ - /* PC19 */ { 1, 1, 0, 0, 0, 0 }, /* FCC2 MII RX_CLK */ - /* PC18 */ { 1, 1, 0, 0, 0, 0 }, /* FCC2 MII TX_CLK */ - /* PC17 */ { 1, 1, 0, 0, 0, 0 }, /* FCC3 MII RX_CLK */ - /* PC16 */ { 1, 1, 0, 0, 0, 0 }, /* FCC3 MII TX_CLK */ - /* PC15 */ { 1, 0, 0, 0, 0, 0 }, /* PC15 */ - /* PC14 */ { 1, 1, 0, 0, 0, 0 }, /* SCC1 EN *CD */ - /* PC13 */ { 1, 0, 0, 1, 0, 0 }, /* PC13 */ - /* PC12 */ { 1, 0, 0, 1, 0, 0 }, /* PC12 */ - /* PC11 */ { 1, 0, 0, 1, 0, 0 }, /* PC11 */ - /* PC10 */ { 1, 0, 0, 1, 0, 0 }, /* FCC2 MDC */ - /* PC9 */ { 1, 0, 0, 1, 0, 0 }, /* FCC2 MDIO */ - /* PC8 */ { 1, 0, 0, 1, 0, 0 }, /* PC8 */ - /* PC7 */ { 1, 0, 0, 1, 0, 0 }, /* PC7 */ - /* PC6 */ { 1, 0, 0, 1, 0, 0 }, /* PC6 */ - /* PC5 */ { 1, 0, 0, 1, 0, 0 }, /* PC5 */ - /* PC4 */ { 1, 0, 0, 1, 0, 0 }, /* PC4 */ - /* PC3 */ { 1, 0, 0, 1, 0, 0 }, /* PC3 */ - /* PC2 */ { 1, 0, 0, 1, 0, 1 }, /* ENET FDE */ - /* PC1 */ { 1, 0, 0, 1, 0, 0 }, /* ENET DSQE */ - /* PC0 */ { 1, 0, 0, 1, 0, 0 }, /* ENET LBK */ - }, - - /* Port D */ - { /* conf ppar psor pdir podr pdat */ - /* PD31 */ { 1, 0, 0, 0, 0, 0 }, /* SCC1 EN RxD */ - /* PD30 */ { 1, 0, 0, 0, 0, 0 }, /* SCC1 EN TxD */ - /* PD29 */ { 1, 0, 0, 0, 0, 0 }, /* SCC1 EN TENA */ - /* PD28 */ { 1, 0, 0, 0, 0, 0 }, /* PD28 */ - /* PD27 */ { 1, 0, 0, 0, 0, 0 }, /* PD27 */ - /* PD26 */ { 1, 0, 0, 0, 0, 0 }, /* PD26 */ - /* PD25 */ { 1, 0, 0, 0, 0, 0 }, /* PD25 */ - /* PD24 */ { 1, 0, 0, 0, 0, 0 }, /* PD24 */ - /* PD23 */ { 1, 0, 0, 0, 0, 0 }, /* PD23 */ - /* PD22 */ { 1, 0, 0, 0, 0, 0 }, /* PD22 */ - /* PD21 */ { 1, 0, 0, 0, 0, 0 }, /* PD21 */ - /* PD20 */ { 1, 0, 0, 0, 0, 0 }, /* PD20 */ - /* PD19 */ { 1, 0, 0, 0, 0, 0 }, /* PD19 */ - /* PD18 */ { 1, 0, 0, 0, 0, 0 }, /* PD19 */ - /* PD17 */ { 1, 0, 0, 0, 0, 0 }, /* FCC1 ATMRXPRTY */ - /* PD16 */ { 1, 0, 0, 0, 0, 0 }, /* FCC1 ATMTXPRTY */ - /* PD15 */ { 1, 1, 1, 0, 1, 0 }, /* I2C SDA */ - /* PD14 */ { 1, 1, 1, 0, 1, 0 }, /* I2C SCL */ - /* PD13 */ { 1, 0, 0, 0, 0, 0 }, /* PD13 */ - /* PD12 */ { 1, 0, 0, 0, 0, 0 }, /* PD12 */ - /* PD11 */ { 1, 0, 0, 0, 0, 0 }, /* PD11 */ - /* PD10 */ { 1, 0, 0, 0, 0, 0 }, /* PD10 */ - /* PD9 */ { 1, 1, 0, 1, 0, 0 }, /* SMC1 TXD */ - /* PD8 */ { 1, 1, 0, 0, 0, 0 }, /* SMC1 RXD */ - /* PD7 */ { 1, 0, 0, 0, 0, 0 }, /* PD7 */ - /* PD6 */ { 1, 0, 0, 0, 0, 0 }, /* PD6 */ - /* PD5 */ { 1, 0, 0, 0, 0, 0 }, /* PD5 */ - /* PD4 */ { 1, 0, 0, 0, 0, 0 }, /* PD4 */ - /* PD3 */ { 0, 0, 0, 0, 0, 0 }, /* pin doesn't exist */ - /* PD2 */ { 0, 0, 0, 0, 0, 0 }, /* pin doesn't exist */ - /* PD1 */ { 0, 0, 0, 0, 0, 0 }, /* pin doesn't exist */ - /* PD0 */ { 0, 0, 0, 0, 0, 0 } /* pin doesn't exist */ - } -}; - -/* ------------------------------------------------------------------------- */ - -/* - * Setup CS4 to enable the Board Control/Status registers. - * Otherwise the smcs won't work. -*/ -int board_early_init_f (void) -{ - volatile t_rpx_regs *regs = (t_rpx_regs*)CONFIG_SYS_REGS_BASE; - volatile immap_t *immap = (immap_t *)CONFIG_SYS_IMMR; - volatile memctl8260_t *memctl = &immap->im_memctl; - memctl->memc_br4 = CONFIG_SYS_BR4_PRELIM; - memctl->memc_or4 = CONFIG_SYS_OR4_PRELIM; - regs->bcsr1 = 0x70; /* to enable terminal no SMC1 */ - regs->bcsr2 = 0x20; /* mut be written to enable writing FLASH */ - return 0; -} - -void -reset_phy(void) -{ - volatile t_rpx_regs *regs = (t_rpx_regs*)CONFIG_SYS_REGS_BASE; - regs->bcsr4 = 0xC3; -} - -/* - * Check Board Identity: - */ - -int checkboard(void) -{ - volatile t_rpx_regs *regs = (t_rpx_regs*)CONFIG_SYS_REGS_BASE; - printf ("Board: Embedded Planet RPX Super, Revision %d\n", - regs->bcsr0 >> 4); - - return 0; -} - -/* ------------------------------------------------------------------------- */ - -phys_size_t initdram(int board_type) -{ - volatile immap_t *immap = (immap_t *)CONFIG_SYS_IMMR; - volatile memctl8260_t *memctl = &immap->im_memctl; - volatile uchar c = 0, *ramaddr; - ulong psdmr, lsdmr, bcr; - long size = 0; - int i; - - psdmr = CONFIG_SYS_PSDMR; - lsdmr = CONFIG_SYS_LSDMR; - - /* - * Quote from 8260 UM (10.4.2 SDRAM Power-On Initialization, 10-35): - * - * "At system reset, initialization software must set up the - * programmable parameters in the memory controller banks registers - * (ORx, BRx, P/LSDMR). After all memory parameters are configured, - * system software should execute the following initialization sequence - * for each SDRAM device. - * - * 1. Issue a PRECHARGE-ALL-BANKS command - * 2. Issue eight CBR REFRESH commands - * 3. Issue a MODE-SET command to initialize the mode register - * - * The initial commands are executed by setting P/LSDMR[OP] and - * accessing the SDRAM with a single-byte transaction." - * - * The appropriate BRx/ORx registers have already been set when we - * get here. The SDRAM can be accessed at the address CONFIG_SYS_SDRAM_BASE. - */ - - size = CONFIG_SYS_SDRAM0_SIZE; - bcr = immap->im_siu_conf.sc_bcr; - immap->im_siu_conf.sc_bcr = (bcr & ~BCR_EBM); - - memctl->memc_mptpr = CONFIG_SYS_MPTPR; - - ramaddr = (uchar *)(CONFIG_SYS_SDRAM0_BASE); - memctl->memc_psrt = CONFIG_SYS_PSRT; - - memctl->memc_psdmr = psdmr | PSDMR_OP_PREA; - *ramaddr = c; - - memctl->memc_psdmr = psdmr | PSDMR_OP_CBRR; - for (i = 0; i < 8; i++) - *ramaddr = c; - - memctl->memc_psdmr = psdmr | PSDMR_OP_MRW; - *ramaddr = c; - - memctl->memc_psdmr = psdmr | PSDMR_OP_NORM | PSDMR_RFEN; - *ramaddr = c; - - immap->im_siu_conf.sc_bcr = bcr; - -#ifndef CONFIG_SYS_RAMBOOT -/* size += CONFIG_SYS_SDRAM1_SIZE; */ - ramaddr = (uchar *)(CONFIG_SYS_SDRAM1_BASE); - memctl->memc_lsrt = CONFIG_SYS_LSRT; - - memctl->memc_lsdmr = lsdmr | PSDMR_OP_PREA; - *ramaddr = c; - - memctl->memc_lsdmr = lsdmr | PSDMR_OP_CBRR; - for (i = 0; i < 8; i++) - *ramaddr = c; - - memctl->memc_lsdmr = lsdmr | PSDMR_OP_MRW; - *ramaddr = c; - - memctl->memc_lsdmr = lsdmr | PSDMR_OP_NORM | PSDMR_RFEN; - *ramaddr = c; -#endif - - /* return total ram size */ - return (size * 1024 * 1024); -} diff --git a/board/rpxsuper/rpxsuper.h b/board/rpxsuper/rpxsuper.h deleted file mode 100644 index af31060a7be..00000000000 --- a/board/rpxsuper/rpxsuper.h +++ /dev/null @@ -1,25 +0,0 @@ -#ifndef __RPX8260_H__ -#define __RPX8260_H__ - -typedef struct tt_rpx_regs -{ - volatile unsigned char bcsr0; - volatile unsigned char bcsr1; - volatile unsigned char bcsr2; - volatile unsigned char bcsr3; - volatile unsigned char bcsr4; - volatile unsigned char bcsr5; - volatile unsigned char bcsr6; - volatile unsigned char bcsr7; - volatile unsigned char bcsr8; - volatile unsigned char bcsr9; - volatile unsigned char bcsr10; - volatile unsigned char bcsr11; - volatile unsigned char bcsr12; - volatile unsigned char bcsr13; - volatile unsigned char bcsr14; - volatile unsigned char bcsr15; -} t_rpx_regs; -typedef t_rpx_regs* tp_rpx_regs; - -#endif diff --git a/boards.cfg b/boards.cfg index 1faa906c379..d90091708b2 100644 --- a/boards.cfg +++ b/boards.cfg @@ -1245,4 +1245,3 @@ Orphan arm pxa - - - Orphan powerpc 74xx_7xx - - evb64260 EVB64260 - - Orphan powerpc mpc824x - - mousse MOUSSE - - Orphan powerpc mpc8260 - - - rsdproto - - -Orphan powerpc mpc8260 - - rpxsuper RPXsuper - - diff --git a/doc/README.scrapyard b/doc/README.scrapyard index 99155007df7..125ba809c9a 100644 --- a/doc/README.scrapyard +++ b/doc/README.scrapyard @@ -11,6 +11,7 @@ easily if here is something they might want to dig for... Board Arch CPU Commit Removed Last known maintainer/contact ================================================================================================= +RPXsuper powerpc mpc8260 - 2014-04-04 RPXClassic powerpc mpc8xx - 2014-04-04 RPXlite powerpc mpc8xx - 2014-04-04 genietv powerpc mpc8xx - 2014-04-04 diff --git a/include/configs/RPXsuper.h b/include/configs/RPXsuper.h deleted file mode 100644 index f5e09680119..00000000000 --- a/include/configs/RPXsuper.h +++ /dev/null @@ -1,501 +0,0 @@ -#ifndef __CONFIG_H -#define __CONFIG_H - -#define CONFIG_SYS_TEXT_BASE 0x80F00000 - -/***************************************************************************** - * - * These settings must match the way _your_ board is set up - * - *****************************************************************************/ -/* for the AY-Revision which does not use the HRCW */ -#define CONFIG_SYS_DEFAULT_IMMR 0x00010000 - -/* What is the oscillator's (UX2) frequency in Hz? */ -#define CONFIG_8260_CLKIN (66 * 1000 * 1000) - -/* How is switch S2 set? We really only want the MODCK[1-3] bits, so - * only the 3 least significant bits are important. -*/ -#define CONFIG_SYS_SBC_S2 0x04 - -/* What should MODCK_H be? It is dependent on the oscillator - * frequency, MODCK[1-3], and desired CPM and core frequencies. - * Some example values (all frequencies are in MHz): - * - * MODCK_H MODCK[1-3] Osc CPM Core - * 0x2 0x2 33 133 133 - * 0x2 0x4 33 133 200 - * 0x5 0x5 66 133 133 - * 0x5 0x7 66 133 200 - */ -#define CONFIG_SYS_SBC_MODCK_H 0x06 - -#define CONFIG_SYS_SBC_BOOT_LOW 1 /* only for HRCW */ -#undef CONFIG_SYS_SBC_BOOT_LOW - -/* What should the base address of the main FLASH be and how big is - * it (in MBytes)? This must contain CONFIG_SYS_TEXT_BASE. - * The main FLASH is whichever is connected to *CS0. U-Boot expects - * this to be the SIMM. - */ -#define CONFIG_SYS_FLASH0_BASE 0x80000000 -#define CONFIG_SYS_FLASH0_SIZE 16 - -/* What should the base address of the secondary FLASH be and how big - * is it (in Mbytes)? The secondary FLASH is whichever is connected - * to *CS6. U-Boot expects this to be the on board FLASH. If you don't - * want it enabled, don't define these constants. - */ -#define CONFIG_SYS_FLASH1_BASE 0 -#define CONFIG_SYS_FLASH1_SIZE 0 -#undef CONFIG_SYS_FLASH1_BASE -#undef CONFIG_SYS_FLASH1_SIZE - -/* What should be the base address of SDRAM DIMM and how big is - * it (in Mbytes)? -*/ -#define CONFIG_SYS_SDRAM0_BASE 0x00000000 -#define CONFIG_SYS_SDRAM0_SIZE 64 - -/* What should be the base address of SDRAM DIMM and how big is - * it (in Mbytes)? -*/ -#define CONFIG_SYS_SDRAM1_BASE 0x04000000 -#define CONFIG_SYS_SDRAM1_SIZE 32 - -/* What should be the base address of the LEDs and switch S0? - * If you don't want them enabled, don't define this. - */ -#define CONFIG_SYS_LED_BASE 0x00000000 - -/* - * select serial console configuration - * - * if either CONFIG_CONS_ON_SMC or CONFIG_CONS_ON_SCC is selected, then - * CONFIG_CONS_INDEX must be set to the channel number (1-2 for SMC, 1-4 - * for SCC). - * - * if CONFIG_CONS_NONE is defined, then the serial console routines must - * defined elsewhere. - */ -#define CONFIG_CONS_ON_SMC /* define if console on SMC */ -#undef CONFIG_CONS_ON_SCC /* define if console on SCC */ -#undef CONFIG_CONS_NONE /* define if console on neither */ -#define CONFIG_CONS_INDEX 1 /* which SMC/SCC channel for console */ - -/* - * select ethernet configuration - * - * if either CONFIG_ETHER_ON_SCC or CONFIG_ETHER_ON_FCC is selected, then - * CONFIG_ETHER_INDEX must be set to the channel number (1-4 for SCC, 1-3 - * for FCC) - * - * if CONFIG_ETHER_NONE is defined, then either the ethernet routines must be - * defined elsewhere (as for the console), or CONFIG_CMD_NET must be unset. - */ -#undef CONFIG_ETHER_ON_SCC /* define if ethernet on SCC */ -#define CONFIG_ETHER_ON_FCC /* define if ethernet on FCC */ -#undef CONFIG_ETHER_NONE /* define if ethernet on neither */ -#define CONFIG_ETHER_INDEX 3 /* which SCC/FCC channel for ethernet */ - -#if ( CONFIG_ETHER_INDEX == 3 ) - -/* - * - Rx-CLK is CLK15 - * - Tx-CLK is CLK16 - * - RAM for BD/Buffers is on the 60x Bus (see 28-13) - * - Enable Half Duplex in FSMR - */ -# define CONFIG_SYS_CMXFCR_MASK3 (CMXFCR_FC3|CMXFCR_RF3CS_MSK|CMXFCR_TF3CS_MSK) -# define CONFIG_SYS_CMXFCR_VALUE3 (CMXFCR_RF3CS_CLK15|CMXFCR_TF3CS_CLK16) -# define CONFIG_SYS_CPMFCR_RAMTYPE 0 -/*#define CONFIG_SYS_FCC_PSMR (FCC_PSMR_FDE|FCC_PSMR_LPB) */ -# define CONFIG_SYS_FCC_PSMR 0 - -#else /* CONFIG_ETHER_INDEX */ -# error "on RPX Super ethernet must be FCC3" -#endif /* CONFIG_ETHER_INDEX */ - -#define CONFIG_HARD_I2C 1 /* I2C with hardware support */ -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ -#define CONFIG_SYS_I2C_SLAVE 0x7F - - -/* Define this to reserve an entire FLASH sector (256 KB) for - * environment variables. Otherwise, the environment will be - * put in the same sector as U-Boot, and changing variables - * will erase U-Boot temporarily - */ -#define CONFIG_ENV_IN_OWN_SECT - -/* Define to allow the user to overwrite serial and ethaddr */ -#define CONFIG_ENV_OVERWRITE - -/* What should the console's baud rate be? */ -#define CONFIG_BAUDRATE 115200 - -/* Ethernet MAC address */ -#define CONFIG_ETHADDR 08:00:22:50:70:63 - -#define CONFIG_IPADDR 192.168.1.99 -#define CONFIG_SERVERIP 192.168.1.3 - -/* Set to a positive value to delay for running BOOTCOMMAND */ -#define CONFIG_BOOTDELAY -1 - -/* undef this to save memory */ -#define CONFIG_SYS_LONGHELP - -/* Monitor Command Prompt */ - - -/* - * BOOTP options - */ -#define CONFIG_BOOTP_BOOTFILESIZE -#define CONFIG_BOOTP_BOOTPATH -#define CONFIG_BOOTP_GATEWAY -#define CONFIG_BOOTP_HOSTNAME - - -/* - * Command line configuration. - */ -#include - -#define CONFIG_CMD_IMMAP -#define CONFIG_CMD_ASKENV -#define CONFIG_CMD_I2C -#define CONFIG_CMD_REGINFO - -#undef CONFIG_CMD_KGDB - - -/* Where do the internal registers live? */ -#define CONFIG_SYS_IMMR 0xF0000000 - -/* Where do the on board registers (CS4) live? */ -#define CONFIG_SYS_REGS_BASE 0xFA000000 - -/***************************************************************************** - * - * You should not have to modify any of the following settings - * - *****************************************************************************/ - -#define CONFIG_RPXSUPER 1 /* on an Embedded Planet RPX Super Board */ -#define CONFIG_CPM2 1 /* Has a CPM2 */ - -#define CONFIG_BOARD_EARLY_INIT_F 1 /* Call board_early_init_f */ -#define CONFIG_RESET_PHY_R 1 /* Call reset_phy() */ - -/* - * Miscellaneous configurable options - */ -#if defined(CONFIG_CMD_KGDB) -# define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */ -#else -# define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */ -#endif - -/* Print Buffer Size */ -#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT)+16) - -#define CONFIG_SYS_MAXARGS 8 /* max number of command args */ - -#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */ - -#define CONFIG_SYS_MEMTEST_START 0x04000000 /* memtest works on */ -#define CONFIG_SYS_MEMTEST_END 0x06000000 /* 64-96 MB in SDRAM */ - -#define CONFIG_CLOCKS_IN_MHZ 1 /* clocks passsed to Linux in MHz */ - -#define CONFIG_SYS_LOAD_ADDR 0x100000 /* default load address */ - -/* - * Low Level Configuration Settings - * (address mappings, register initial values, etc.) - * You should know what you are doing if you make changes here. - */ - -#define CONFIG_SYS_FLASH_BASE CONFIG_SYS_FLASH0_BASE -#define CONFIG_SYS_SDRAM_BASE CONFIG_SYS_SDRAM0_BASE - -/*----------------------------------------------------------------------- - * Hard Reset Configuration Words - */ -#if defined(CONFIG_SYS_SBC_BOOT_LOW) -# define CONFIG_SYS_SBC_HRCW_BOOT_FLAGS (HRCW_CIP | HRCW_BMS) -#else -# define CONFIG_SYS_SBC_HRCW_BOOT_FLAGS (0) -#endif /* defined(CONFIG_SYS_SBC_BOOT_LOW) */ - -/* get the HRCW ISB field from CONFIG_SYS_IMMR */ -#define CONFIG_SYS_SBC_HRCW_IMMR ( ((CONFIG_SYS_IMMR & 0x10000000) >> 10) |\ - ((CONFIG_SYS_IMMR & 0x01000000) >> 7) |\ - ((CONFIG_SYS_IMMR & 0x00100000) >> 4) ) - -#define CONFIG_SYS_HRCW_MASTER (HRCW_BPS11 |\ - HRCW_DPPC11 |\ - CONFIG_SYS_SBC_HRCW_IMMR |\ - HRCW_MMR00 |\ - HRCW_LBPC11 |\ - HRCW_APPC10 |\ - HRCW_CS10PC00 |\ - (CONFIG_SYS_SBC_MODCK_H & HRCW_MODCK_H1111) |\ - CONFIG_SYS_SBC_HRCW_BOOT_FLAGS) - -/* no slaves */ -#define CONFIG_SYS_HRCW_SLAVE1 0 -#define CONFIG_SYS_HRCW_SLAVE2 0 -#define CONFIG_SYS_HRCW_SLAVE3 0 -#define CONFIG_SYS_HRCW_SLAVE4 0 -#define CONFIG_SYS_HRCW_SLAVE5 0 -#define CONFIG_SYS_HRCW_SLAVE6 0 -#define CONFIG_SYS_HRCW_SLAVE7 0 - -/*----------------------------------------------------------------------- - * Definitions for initial stack pointer and data area (in DPRAM) - */ -#define CONFIG_SYS_INIT_RAM_ADDR CONFIG_SYS_IMMR -#define CONFIG_SYS_INIT_RAM_SIZE 0x4000 /* Size of used area in DPRAM */ -#define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) -#define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET - -/*----------------------------------------------------------------------- - * Start addresses for the final memory configuration - * (Set up by the startup code) - * Please note that CONFIG_SYS_SDRAM_BASE _must_ start at 0 - * Note also that the logic that sets CONFIG_SYS_RAMBOOT is platform dependent. - */ -#define CONFIG_SYS_MONITOR_BASE (CONFIG_SYS_FLASH0_BASE + 0x00F00000) - -#if (CONFIG_SYS_MONITOR_BASE < CONFIG_SYS_FLASH_BASE) -# define CONFIG_SYS_RAMBOOT -#endif - -#define CONFIG_SYS_MONITOR_LEN (256 << 10) /* Reserve 256 kB for Monitor */ -#define CONFIG_SYS_MALLOC_LEN (128 << 10) /* Reserve 128 kB for malloc() */ - -/* - * For booting Linux, the board info and command line data - * have to be in the first 8 MB of memory, since this is - * the maximum mapped by the Linux kernel during initialization. - */ -#define CONFIG_SYS_BOOTMAPSZ (8 << 20) /* Initial Memory map for Linux */ - -/*----------------------------------------------------------------------- - * FLASH and environment organization - */ -#define CONFIG_SYS_MAX_FLASH_BANKS 1 /* max number of memory banks */ -#define CONFIG_SYS_MAX_FLASH_SECT 71 /* max number of sectors on one chip */ - -#define CONFIG_SYS_FLASH_ERASE_TOUT 8000 /* Timeout for Flash Erase (in ms) */ -#define CONFIG_SYS_FLASH_WRITE_TOUT 1 /* Timeout for Flash Write (in ms) */ - -#ifndef CONFIG_SYS_RAMBOOT -# define CONFIG_ENV_IS_IN_FLASH 1 - -# ifdef CONFIG_ENV_IN_OWN_SECT -# define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE + 0x40000) -# define CONFIG_ENV_SECT_SIZE 0x40000 -# else -# define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE + CONFIG_SYS_MONITOR_LEN - CONFIG_ENV_SECT_SIZE) -# define CONFIG_ENV_SIZE 0x1000 /* Total Size of Environment Sector */ -# define CONFIG_ENV_SECT_SIZE 0x10000 /* see README - env sect real size */ -# endif /* CONFIG_ENV_IN_OWN_SECT */ -#else -# define CONFIG_ENV_IS_IN_NVRAM 1 -# define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE - 0x1000) -# define CONFIG_ENV_SIZE 0x200 -#endif /* CONFIG_SYS_RAMBOOT */ - -/*----------------------------------------------------------------------- - * Cache Configuration - */ -#define CONFIG_SYS_CACHELINE_SIZE 32 /* For MPC8260 CPU */ - -#if defined(CONFIG_CMD_KGDB) -# define CONFIG_SYS_CACHELINE_SHIFT 5 /* log base 2 of the above value */ -#endif - -/*----------------------------------------------------------------------- - * HIDx - Hardware Implementation-dependent Registers 2-11 - *----------------------------------------------------------------------- - * HID0 also contains cache control - initially enable both caches and - * invalidate contents, then the final state leaves only the instruction - * cache enabled. Note that Power-On and Hard reset invalidate the caches, - * but Soft reset does not. - * - * HID1 has only read-only information - nothing to set. - */ -#define CONFIG_SYS_HID0_INIT (/*HID0_ICE |*/\ - /*HID0_DCE |*/\ - HID0_ICFI |\ - HID0_DCI |\ - HID0_IFEM |\ - HID0_ABE) - -#define CONFIG_SYS_HID0_FINAL (/*HID0_ICE |*/\ - HID0_IFEM |\ - HID0_ABE |\ - HID0_EMCP) -#define CONFIG_SYS_HID2 0 - -/*----------------------------------------------------------------------- - * RMR - Reset Mode Register - *----------------------------------------------------------------------- - */ -#define CONFIG_SYS_RMR 0 - -/*----------------------------------------------------------------------- - * BCR - Bus Configuration 4-25 - *----------------------------------------------------------------------- - */ -#define CONFIG_SYS_BCR (BCR_EBM |\ - BCR_PLDP |\ - BCR_EAV |\ - BCR_NPQM0) - -/*----------------------------------------------------------------------- - * SIUMCR - SIU Module Configuration 4-31 - *----------------------------------------------------------------------- - */ - -#define CONFIG_SYS_SIUMCR (SIUMCR_L2CPC01 |\ - SIUMCR_APPC10 |\ - SIUMCR_CS10PC01) - - -/*----------------------------------------------------------------------- - * SYPCR - System Protection Control 11-9 - * SYPCR can only be written once after reset! - *----------------------------------------------------------------------- - * Watchdog & Bus Monitor Timer max, 60x Bus Monitor enable - */ -#define CONFIG_SYS_SYPCR (SYPCR_SWTC |\ - SYPCR_BMT |\ - SYPCR_PBME |\ - SYPCR_LBME |\ - SYPCR_SWRI |\ - SYPCR_SWP) - -/*----------------------------------------------------------------------- - * TMCNTSC - Time Counter Status and Control 4-40 - *----------------------------------------------------------------------- - * Clear once per Second and Alarm Interrupt Status, Set 32KHz timersclk, - * and enable Time Counter - */ -#define CONFIG_SYS_TMCNTSC (TMCNTSC_SEC |\ - TMCNTSC_ALR |\ - TMCNTSC_TCF |\ - TMCNTSC_TCE) - -/*----------------------------------------------------------------------- - * PISCR - Periodic Interrupt Status and Control 4-42 - *----------------------------------------------------------------------- - * Clear Periodic Interrupt Status, Set 32KHz timersclk, and enable - * Periodic timer - */ -#define CONFIG_SYS_PISCR (PISCR_PS |\ - PISCR_PTF |\ - PISCR_PTE) - -/*----------------------------------------------------------------------- - * SCCR - System Clock Control 9-8 - *----------------------------------------------------------------------- - */ -#define CONFIG_SYS_SCCR (SCCR_DFBRG01) - -/*----------------------------------------------------------------------- - * RCCR - RISC Controller Configuration 13-7 - *----------------------------------------------------------------------- - */ -#define CONFIG_SYS_RCCR 0 - -/* - * Init Memory Controller: - * - * Bank Bus Machine PortSz Device - * ---- --- ------- ------ ------ - * 0 60x GPCM 64 bit FLASH (BGA - 16MB AMD AM29DL323DB90) - * 1 60x SDRAM 64 bit SDRAM (BGA - 64MB Hitachi HM5225325FBP-B60) - * 2 Local SDRAM 32 bit SDRAM (BGA - 32MB Hitachi HM5225325FBP-B60) - * 3 unused - * 4 60x GPCM 8 bit Board Regs, LEDs, switches - * 5 unused - * 6 unused - * 7 unused - * 8 PCMCIA - * 9 unused - * 10 unused - * 11 unused -*/ - -/* Bank 0 - FLASH - * - */ -#define CONFIG_SYS_BR0_PRELIM ((CONFIG_SYS_FLASH0_BASE & BRx_BA_MSK) |\ - BRx_PS_64 |\ - BRx_DECC_NONE |\ - BRx_MS_GPCM_P |\ - BRx_V) - -#define CONFIG_SYS_OR0_PRELIM (MEG_TO_AM(CONFIG_SYS_FLASH0_SIZE) |\ - ORxG_CSNT |\ - ORxG_ACS_DIV1 |\ - ORxG_SCY_6_CLK |\ - ORxG_EHTR) - -/* Bank 1 - SDRAM - * - */ -#define CONFIG_SYS_BR1_PRELIM ((CONFIG_SYS_SDRAM0_BASE & BRx_BA_MSK) |\ - BRx_PS_64 |\ - BRx_MS_SDRAM_P |\ - BRx_V) - -#define CONFIG_SYS_OR1_PRELIM (MEG_TO_AM(CONFIG_SYS_SDRAM0_SIZE) |\ - ORxS_BPD_4 |\ - ORxS_ROWST_PBI0_A8 |\ - ORxS_NUMR_12 |\ - ORxS_IBID) - -#define CONFIG_SYS_PSDMR 0x014DA412 -#define CONFIG_SYS_PSRT 0x79 - - -/* Bank 2 - SDRAM - * - */ -#define CONFIG_SYS_BR2_PRELIM ((CONFIG_SYS_SDRAM1_BASE & BRx_BA_MSK) |\ - BRx_PS_32 |\ - BRx_MS_SDRAM_L |\ - BRx_V) - -#define CONFIG_SYS_OR2_PRELIM (MEG_TO_AM(CONFIG_SYS_SDRAM1_SIZE) |\ - ORxS_BPD_4 |\ - ORxS_ROWST_PBI0_A9 |\ - ORxS_NUMR_12) - -#define CONFIG_SYS_LSDMR 0x0169A512 -#define CONFIG_SYS_LSRT 0x79 - -#define CONFIG_SYS_MPTPR (0x0800 & MPTPR_PTP_MSK) - -/* Bank 4 - On board registers - * - */ -#define CONFIG_SYS_BR4_PRELIM ((CONFIG_SYS_REGS_BASE & BRx_BA_MSK) |\ - BRx_PS_8 |\ - BRx_MS_GPCM_P |\ - BRx_V) - -#define CONFIG_SYS_OR4_PRELIM (ORxG_AM_MSK |\ - ORxG_CSNT |\ - ORxG_ACS_DIV1 |\ - ORxG_SCY_5_CLK |\ - ORxG_TRLX) - -#endif /* __CONFIG_H */ -- cgit v1.2.3 From 8b043e6dc2e53743b0271debb6f506b95e788fd7 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Fri, 4 Apr 2014 15:25:08 +0900 Subject: powerpc: remove rsdproto board support Enough time has passed since this board was moved to Orphan. Remove. - Remove board/rsdproto/* - Remove include/configs/rsdproto.h - Move the entry from boards.cfg to doc/README.scrapyard Signed-off-by: Masahiro Yamada --- board/rsdproto/Makefile | 9 - board/rsdproto/flash.c | 386 ------------------------------------------- board/rsdproto/flash_asm.S | 39 ----- board/rsdproto/rsdproto.c | 361 ---------------------------------------- board/rsdproto/u-boot.lds | 114 ------------- boards.cfg | 1 - doc/README.scrapyard | 1 + include/configs/rsdproto.h | 400 --------------------------------------------- 8 files changed, 1 insertion(+), 1310 deletions(-) delete mode 100644 board/rsdproto/Makefile delete mode 100644 board/rsdproto/flash.c delete mode 100644 board/rsdproto/flash_asm.S delete mode 100644 board/rsdproto/rsdproto.c delete mode 100644 board/rsdproto/u-boot.lds delete mode 100644 include/configs/rsdproto.h (limited to 'board') diff --git a/board/rsdproto/Makefile b/board/rsdproto/Makefile deleted file mode 100644 index 9351e94e74f..00000000000 --- a/board/rsdproto/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -# -# (C) Copyright 2000-2006 -# Wolfgang Denk, DENX Software Engineering, wd@denx.de. -# -# SPDX-License-Identifier: GPL-2.0+ -# - -obj-y := rsdproto.o flash.o -obj-y += flash_asm.o diff --git a/board/rsdproto/flash.c b/board/rsdproto/flash.c deleted file mode 100644 index 37326d587a6..00000000000 --- a/board/rsdproto/flash.c +++ /dev/null @@ -1,386 +0,0 @@ -/* - * (C) Copyright 2000 - * Marius Groeger - * Sysgo Real-Time Solutions, GmbH - * - * (C) Copyright 2000 - * Wolfgang Denk, DENX Software Engineering, wd@denx.de. - * - * Flash Routines for AM290[48]0B devices - * - *-------------------------------------------------------------------- - * SPDX-License-Identifier: GPL-2.0+ - */ - -#include -#include - -/* flash hardware ids */ -#define VENDOR_AMD 0x0001 -#define AMD_29DL323C_B 0x2253 - -/* Define this to include autoselect sequence in flash_init(). Does NOT - * work when executing from flash itself, so this should be turned - * on only when debugging the RAM version. - */ -#undef WITH_AUTOSELECT - -flash_info_t flash_info[CONFIG_SYS_MAX_FLASH_BANKS]; /* info for FLASH chips */ - -#if 1 -#define D(x) -#else -#define D(x) printf x -#endif - -/*----------------------------------------------------------------------- - * Functions - */ - -static unsigned char write_ull(flash_info_t *info, - unsigned long address, - volatile unsigned long long data); - -/* from flash_asm.S */ -extern void ull_write(unsigned long long volatile *address, - unsigned long long volatile *data); -extern void ull_read(unsigned long long volatile *address, - unsigned long long volatile *data); - -/*----------------------------------------------------------------------- - */ - -unsigned long flash_init (void) -{ - int i; - ulong addr; - -#ifdef WITH_AUTOSELECT - { - unsigned long long *f_addr = (unsigned long long *)PHYS_FLASH; - unsigned long long f_command, vendor, device; - /* Perform Autoselect */ - f_command = 0x00AA00AA00AA00AAULL; - ull_write(&f_addr[0x555], &f_command); - f_command = 0x0055005500550055ULL; - ull_write(&f_addr[0x2AA], &f_command); - f_command = 0x0090009000900090ULL; - ull_write(&f_addr[0x555], &f_command); - ull_read(&f_addr[0], &vendor); - vendor &= 0xffff; - ull_read(&f_addr[1], &device); - device &= 0xffff; - f_command = 0x00F000F000F000F0ULL; - ull_write(&f_addr[0x555], &f_command); - if (vendor != VENDOR_AMD || device != AMD_29DL323C_B) - return 0; - } -#endif - - /* Init: no FLASHes known */ - for (i=0; i= PHYS_FLASH - flash_protect(FLAG_PROTECT_SET, - CONFIG_SYS_MONITOR_BASE, - CONFIG_SYS_MONITOR_BASE+monitor_flash_len-1, - &flash_info[0]); - flash_protect(FLAG_PROTECT_SET, - CONFIG_SYS_MONITOR_BASE, - CONFIG_SYS_MONITOR_BASE+monitor_flash_len-1, - &flash_info[1]); -#endif - -#if defined(CONFIG_ENV_IS_IN_FLASH) && defined(CONFIG_ENV_ADDR) -# ifndef CONFIG_ENV_SIZE -# define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE -# endif - flash_protect(FLAG_PROTECT_SET, - CONFIG_ENV_ADDR, - CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, - &flash_info[0]); - flash_protect(FLAG_PROTECT_SET, - CONFIG_ENV_ADDR, - CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, - &flash_info[1]); -#endif - - return flash_info[0].size + flash_info[1].size; -} - -/*----------------------------------------------------------------------- - */ -void flash_print_info (flash_info_t *info) -{ - int i; - - if (info->flash_id == FLASH_UNKNOWN) { - printf ("missing or unknown FLASH type\n"); - return; - } - - switch (info->flash_id >> 16) { - case VENDOR_AMD: - printf ("AMD "); - break; - default: - printf ("Unknown Vendor "); - break; - } - - switch (info->flash_id & FLASH_TYPEMASK) { - case AMD_29DL323C_B: - printf ("AM29DL323CB (32 Mbit)\n"); - break; - default: - printf ("Unknown Chip Type\n"); - break; - } - - printf (" Size: %ld MB in %d Sectors\n", - info->size >> 20, info->sector_count); - - printf (" Sector Start Addresses:"); - for (i=0; isector_count; ++i) { - if ((i % 5) == 0) - printf ("\n "); - printf (" %08lX%s", - info->start[i], - info->protect[i] ? " (RO)" : " " - ); - } - printf ("\n"); - return; -} - -/*----------------------------------------------------------------------- - */ - -int flash_erase (flash_info_t *info, int s_first, int s_last) -{ - int flag, prot, sect, l_sect; - ulong start; - unsigned long long volatile *f_addr; - unsigned long long volatile f_command; - - if ((s_first < 0) || (s_first > s_last)) { - if (info->flash_id == FLASH_UNKNOWN) { - printf ("- missing\n"); - } else { - printf ("- no sectors to erase\n"); - } - return 1; - } - - prot = 0; - for (sect = s_first; sect <= s_last; sect++) { - if (info->protect[sect]) { - prot++; - } - } - if (prot) { - printf ("- Warning: %d protected sectors will not be erased!\n", - prot); - } else { - printf ("\n"); - } - - f_addr = (unsigned long long *)info->start[0]; - f_command = 0x00AA00AA00AA00AAULL; - ull_write(&f_addr[0x555], &f_command); - f_command = 0x0055005500550055ULL; - ull_write(&f_addr[0x2AA], &f_command); - f_command = 0x0080008000800080ULL; - ull_write(&f_addr[0x555], &f_command); - f_command = 0x00AA00AA00AA00AAULL; - ull_write(&f_addr[0x555], &f_command); - f_command = 0x0055005500550055ULL; - ull_write(&f_addr[0x2AA], &f_command); - - /* Disable interrupts which might cause a timeout here */ - flag = disable_interrupts(); - - /* Start erase on unprotected sectors */ - for (l_sect = -1, sect = s_first; sect<=s_last; sect++) { - if (info->protect[sect] == 0) { /* not protected */ - - f_addr = - (unsigned long long *)(info->start[sect]); - f_command = 0x0030003000300030ULL; - ull_write(f_addr, &f_command); - l_sect = sect; - } - } - - /* re-enable interrupts if necessary */ - if (flag) - enable_interrupts(); - - start = get_timer (0); - do - { - if (get_timer(start) > CONFIG_SYS_FLASH_ERASE_TOUT) - { /* write reset command, command address is unimportant */ - /* this command turns the flash back to read mode */ - f_addr = - (unsigned long long *)(info->start[l_sect]); - f_command = 0x00F000F000F000F0ULL; - ull_write(f_addr, &f_command); - printf (" timeout\n"); - return 1; - } - } while(*f_addr != 0xFFFFFFFFFFFFFFFFULL); - - printf (" done\n"); - return 0; -} - -/*----------------------------------------------------------------------- - * Copy memory to flash, returns: - * 0 - OK - * 1 - write timeout - * 2 - Flash not erased - */ - -int write_buff (flash_info_t *info, uchar *src, ulong addr, ulong cnt) -{ - unsigned long cp, wp; - unsigned long long data; - int i, l, rc; - - wp = (addr & ~7); /* get lower long long aligned address */ - - /* - * handle unaligned start bytes - */ - if ((l = addr - wp) != 0) { - data = 0; - for (i=0, cp=wp; i0; ++i) { - data = (data << 8) | *src++; - --cnt; - ++cp; - } - for (; cnt==0 && i<8; ++i, ++cp) { - data = (data << 8) | (*(uchar *)cp); - } - - if ((rc = write_ull(info, wp, data)) != 0) { - return rc; - } - wp += 4; - } - - /* - * handle long long aligned part - */ - while (cnt >= 8) { - data = 0; - for (i=0; i<8; ++i) { - data = (data << 8) | *src++; - } - if ((rc = write_ull(info, wp, data)) != 0) { - return rc; - } - wp += 8; - cnt -= 8; - } - - if (cnt == 0) { - return ERR_OK; - } - - /* - * handle unaligned tail bytes - */ - data = 0; - for (i=0, cp=wp; i<8 && cnt>0; ++i, ++cp) { - data = (data << 8) | *src++; - --cnt; - } - for (; i<8; ++i, ++cp) { - data = (data << 8) | (*(uchar *)cp); - } - - return write_ull(info, wp, data); -} - -/*--------------------------------------------------------------------------- -* -* FUNCTION NAME: write_ull -* -* DESCRIPTION: writes 8 bytes to flash -* -* EXTERNAL EFFECT: nothing -* -* PARAMETERS: 32 bit long pointer to address, 64 bit long pointer to data -* -* RETURNS: 0 if OK, 1 if timeout, 4 if parameter error -*--------------------------------------------------------------------------*/ - -static unsigned char write_ull(flash_info_t *info, - unsigned long address, - volatile unsigned long long data) -{ - static unsigned long long f_command; - static unsigned long long *f_addr; - ulong start; - - /* address muss be 8-aligned! */ - if (address & 0x7) - return ERR_ALIGN; - - f_addr = (unsigned long long *)info->start[0]; - f_command = 0x00AA00AA00AA00AAULL; - ull_write(&f_addr[0x555], &f_command); - f_command = 0x0055005500550055ULL; - ull_write(&f_addr[0x2AA], &f_command); - f_command = 0x00A000A000A000A0ULL; - ull_write(&f_addr[0x555], &f_command); - - f_addr = (unsigned long long *)address; - f_command = data; - ull_write(f_addr, &f_command); - - start = get_timer (0); - do - { - if (get_timer(start) > CONFIG_SYS_FLASH_WRITE_TOUT) - { - /* write reset command, command address is unimportant */ - /* this command turns the flash back to read mode */ - f_addr = (unsigned long long *)info->start[0]; - f_command = 0x00F000F000F000F0ULL; - ull_write(f_addr, &f_command); - return ERR_TIMOUT; - } - } while(*((unsigned long long *)address) != data); - - return 0; -} diff --git a/board/rsdproto/flash_asm.S b/board/rsdproto/flash_asm.S deleted file mode 100644 index 557cac0279b..00000000000 --- a/board/rsdproto/flash_asm.S +++ /dev/null @@ -1,39 +0,0 @@ -/* - * -*- mode:c -*- - * - * (C) Copyright 2000 - * Marius Groeger - * Sysgo Real-Time Solutions, GmbH - * - * void ull_write(unsigned long long volatile *address, - * unsigned long long volatile *data) - * r3 = address - * r4 = data - * - * void ull_read(unsigned long long volatile *address, - * unsigned long long volatile *data) - * r3 = address - * r4 = data - * - * Uses the floating point unit to read and write 64 bit wide - * data (unsigned long long) on the 60x bus. This is necessary - * because all 4 flash chips use the /WE line from byte lane 0 - * - * IMPORTANT: data should always be 8-aligned, otherwise an exception will - * occur. - */ - -#include -#include - - .globl ull_write -ull_write: - lfd 0,0(r4) - stfd 0,0(r3) - blr - - .globl ull_read -ull_read: - lfd 0, 0(r3) - stfd 0, 0(r4) - blr diff --git a/board/rsdproto/rsdproto.c b/board/rsdproto/rsdproto.c deleted file mode 100644 index 1e85c2710db..00000000000 --- a/board/rsdproto/rsdproto.c +++ /dev/null @@ -1,361 +0,0 @@ -/* - * (C) Copyright 2000 - * Sysgo Real-Time Solutions, GmbH - * Marius Groeger - * - * SPDX-License-Identifier: GPL-2.0+ - */ - -#include -#include -#include -#include -#include - -/* define to initialise the SDRAM on the local bus */ -#undef INIT_LOCAL_BUS_SDRAM - -/* I2C Bus adresses for PPC & Protocol board */ -#define PPC8260_I2C_ADR 0x30 /*(0)011.0000 */ -#define LM84_PPC_I2C_ADR 0x2A /*(0)010.1010 */ -#define LM84_SHARC_I2C_ADR 0x29 /*(0)010.1001 */ -#define VIRTEX_I2C_ADR 0x25 /*(0)010.0101 */ -#define X24645_PPC_I2C_ADR 0x00 /*(0)00X.XXXX -> be careful ! No other i2c-chip should have an adress beginning with (0)00 !!! */ -#define RS5C372_PPC_I2C_ADR 0x32 /*(0)011.0010 -> this adress is programmed by the manufacturer and cannot be changed !!! */ - -/* - * I/O Port configuration table - * - * if conf is 1, then that port pin will be configured at boot time - * according to the five values podr/pdir/ppar/psor/pdat for that entry - */ - -const iop_conf_t iop_conf_tab[4][32] = { - - /* Port A configuration */ - { /* conf ppar psor pdir podr pdat */ - /* PA31 */ { 0, 0, 0, 0, 0, 0 }, - /* PA30 */ { 0, 0, 0, 0, 0, 0 }, - /* PA29 */ { 0, 0, 0, 0, 0, 0 }, - /* PA28 */ { 0, 0, 0, 0, 0, 0 }, - /* PA27 */ { 0, 0, 0, 0, 0, 0 }, - /* PA26 */ { 0, 0, 0, 0, 0, 0 }, - /* PA25 */ { 0, 0, 0, 0, 0, 0 }, - /* PA24 */ { 0, 0, 0, 0, 0, 0 }, - /* PA23 */ { 0, 0, 0, 0, 0, 0 }, - /* PA22 */ { 0, 0, 0, 0, 0, 0 }, - /* PA21 */ { 0, 0, 0, 0, 0, 0 }, - /* PA20 */ { 0, 0, 0, 0, 0, 0 }, - /* PA19 */ { 0, 0, 0, 0, 0, 0 }, - /* PA18 */ { 0, 0, 0, 0, 0, 0 }, - /* PA17 */ { 0, 0, 0, 0, 0, 0 }, - /* PA16 */ { 0, 0, 0, 0, 0, 0 }, - /* PA15 */ { 0, 0, 0, 0, 0, 0 }, - /* PA14 */ { 0, 0, 0, 0, 0, 0 }, - /* PA13 */ { 0, 0, 0, 0, 0, 0 }, - /* PA12 */ { 0, 0, 0, 0, 0, 0 }, - /* PA11 */ { 0, 0, 0, 0, 0, 0 }, - /* PA10 */ { 0, 0, 0, 0, 0, 0 }, - /* PA9 */ { 0, 0, 0, 0, 0, 0 }, - /* PA8 */ { 0, 0, 0, 0, 0, 0 }, - /* PA7 */ { 0, 0, 0, 0, 0, 0 }, - /* PA6 */ { 0, 0, 0, 0, 0, 0 }, - /* PA5 */ { 0, 0, 0, 0, 0, 0 }, - /* PA4 */ { 0, 0, 0, 0, 0, 0 }, - /* PA3 */ { 0, 0, 0, 0, 0, 0 }, - /* PA2 */ { 0, 0, 0, 0, 0, 0 }, - /* PA1 */ { 0, 0, 0, 0, 0, 0 }, - /* PA0 */ { 0, 0, 0, 0, 0, 0 } - }, - - - { /* conf ppar psor pdir podr pdat */ - /* PB31 */ { 1, 1, 0, 1, 0, 0 }, /* FCC2 MII TX_ER */ - /* PB30 */ { 1, 1, 0, 0, 0, 0 }, /* FCC2 MII RX_DV */ - /* PB29 */ { 1, 1, 1, 1, 0, 0 }, /* FCC2 MII TX_EN */ - /* PB28 */ { 1, 1, 0, 0, 0, 0 }, /* FCC2 MII RX_ER */ - /* PB27 */ { 1, 1, 0, 0, 0, 0 }, /* FCC2 MII COL */ - /* PB26 */ { 1, 1, 0, 0, 0, 0 }, /* FCC2 MII CRS */ - /* PB25 */ { 1, 1, 0, 1, 0, 0 }, /* FCC2 MII TxD[3] */ - /* PB24 */ { 1, 1, 0, 1, 0, 0 }, /* FCC2 MII TxD[2] */ - /* PB23 */ { 1, 1, 0, 1, 0, 0 }, /* FCC2 MII TxD[1] */ - /* PB22 */ { 1, 1, 0, 1, 0, 0 }, /* FCC2 MII TxD[0] */ - /* PB21 */ { 1, 1, 0, 0, 0, 0 }, /* FCC2 MII RxD[0] */ - /* PB20 */ { 1, 1, 0, 0, 0, 0 }, /* FCC2 MII RxD[1] */ - /* PB19 */ { 1, 1, 0, 0, 0, 0 }, /* FCC2 MII RxD[2] */ - /* PB18 */ { 1, 1, 0, 0, 0, 0 }, /* FCC2 MII RxD[3] */ - /* PB17 */ { 0, 0, 0, 0, 0, 0 }, - /* PB16 */ { 0, 0, 0, 0, 0, 0 }, - /* PB15 */ { 0, 0, 0, 0, 0, 0 }, - /* PB14 */ { 0, 0, 0, 0, 0, 0 }, - /* PB13 */ { 0, 0, 0, 0, 0, 0 }, - /* PB12 */ { 0, 0, 0, 0, 0, 0 }, - /* PB11 */ { 0, 0, 0, 0, 0, 0 }, - /* PB10 */ { 0, 0, 0, 0, 0, 0 }, - /* PB9 */ { 0, 0, 0, 0, 0, 0 }, - /* PB8 */ { 0, 0, 0, 0, 0, 0 }, - /* PB7 */ { 0, 0, 0, 0, 0, 0 }, - /* PB6 */ { 0, 0, 0, 0, 0, 0 }, - /* PB5 */ { 0, 0, 0, 0, 0, 0 }, - /* PB4 */ { 0, 0, 0, 0, 0, 0 }, - /* PB3 */ { 0, 0, 0, 0, 0, 0 }, /* pin doesn't exist */ - /* PB2 */ { 0, 0, 0, 0, 0, 0 }, /* pin doesn't exist */ - /* PB1 */ { 0, 0, 0, 0, 0, 0 }, /* pin doesn't exist */ - /* PB0 */ { 0, 0, 0, 0, 0, 0 } /* pin doesn't exist */ - }, - - - { /* conf ppar psor pdir podr pdat */ - /* PC31 */ { 0, 0, 0, 0, 0, 0 }, - /* PC30 */ { 0, 0, 0, 0, 0, 0 }, - /* PC29 */ { 0, 0, 0, 0, 0, 0 }, - /* PC28 */ { 0, 0, 0, 0, 0, 0 }, - /* PC27 */ { 0, 0, 0, 0, 0, 0 }, - /* PC26 */ { 0, 0, 0, 0, 0, 0 }, - /* PC25 */ { 0, 0, 0, 0, 0, 0 }, - /* PC24 */ { 0, 0, 0, 0, 0, 0 }, - /* PC23 */ { 0, 0, 0, 0, 0, 0 }, - /* PC22 */ { 0, 0, 0, 0, 0, 0 }, - /* PC21 */ { 0, 0, 0, 0, 0, 0 }, - /* PC20 */ { 0, 0, 0, 0, 0, 0 }, - /* PC19 */ { 1, 1, 0, 0, 0, 0 }, - /* PC18 */ { 1, 1, 0, 0, 0, 0 }, /* ETHRXCLK: CLK14 */ - /* PC17 */ { 0, 0, 0, 0, 0, 0 }, /* ETHTXCLK: CLK15 */ - /* PC16 */ { 0, 0, 0, 0, 0, 0 }, - /* PC15 */ { 0, 0, 0, 0, 0, 0 }, - /* PC14 */ { 1, 1, 0, 0, 0, 0 }, /* SCC1 UART CD/ */ - /* PC13 */ { 0, 0, 0, 0, 0, 0 }, - /* PC12 */ { 0, 0, 0, 0, 0, 0 }, - /* PC11 */ { 0, 0, 0, 0, 0, 0 }, - /* PC10 */ { 1, 0, 0, 1, 0, 0 }, /* ETHMDC: GP */ - /* PC9 */ { 1, 0, 0, 1, 0, 0 }, /* ETHMDIO: GP */ - /* PC8 */ { 0, 0, 0, 0, 0, 0 }, - /* PC7 */ { 0, 0, 0, 0, 0, 0 }, - /* PC6 */ { 0, 0, 0, 0, 0, 0 }, - /* PC5 */ { 0, 0, 0, 0, 0, 0 }, - /* PC4 */ { 0, 0, 0, 0, 0, 0 }, - /* PC3 */ { 0, 0, 0, 0, 0, 0 }, - /* PC2 */ { 0, 0, 0, 0, 0, 0 }, - /* PC1 */ { 0, 0, 0, 0, 0, 0 }, - /* PC0 */ { 0, 0, 0, 0, 0, 0 } - }, - - - { /* conf ppar psor pdir podr pdat */ - /* PD31 */ { 1, 1, 0, 0, 0, 0 }, /* SCC1 UART RxD */ - /* PD30 */ { 1, 1, 1, 1, 0, 0 }, /* SCC1 UART TxD */ - /* PD29 */ { 0, 0, 0, 0, 0, 0 }, - /* PD28 */ { 0, 0, 0, 0, 0, 0 }, - /* PD27 */ { 0, 0, 0, 0, 0, 0 }, - /* PD26 */ { 0, 0, 0, 0, 0, 0 }, - /* PD25 */ { 0, 0, 0, 0, 0, 0 }, - /* PD24 */ { 0, 0, 0, 0, 0, 0 }, - /* PD23 */ { 0, 0, 0, 0, 0, 0 }, - /* PD22 */ { 0, 0, 0, 0, 0, 0 }, - /* PD21 */ { 0, 0, 0, 0, 0, 0 }, - /* PD20 */ { 0, 0, 0, 0, 0, 0 }, - /* PD19 */ { 0, 0, 0, 0, 0, 0 }, - /* PD18 */ { 0, 0, 0, 0, 0, 0 }, - /* PD17 */ { 0, 0, 0, 0, 0, 0 }, - /* PD16 */ { 0, 0, 0, 0, 0, 0 }, - /* PD15 */ { 1, 1, 1, 0, 1, 0 }, /* I2C SDA */ - /* PD14 */ { 1, 1, 1, 0, 1, 0 }, /* I2C SCL */ - /* PD13 */ { 0, 0, 0, 0, 0, 0 }, - /* PD12 */ { 0, 0, 0, 0, 0, 0 }, - /* PD11 */ { 0, 0, 0, 0, 0, 0 }, - /* PD10 */ { 0, 0, 0, 0, 0, 0 }, - /* PD9 */ { 0, 0, 0, 0, 0, 0 }, - /* PD8 */ { 0, 0, 0, 0, 0, 0 }, - /* PD7 */ { 0, 0, 0, 0, 0, 0 }, - /* PD6 */ { 0, 0, 0, 0, 0, 0 }, - /* PD5 */ { 0, 0, 0, 0, 0, 0 }, - /* PD4 */ { 0, 0, 0, 0, 0, 0 }, - /* PD3 */ { 0, 0, 0, 0, 0, 0 }, /* pin doesn't exist */ - /* PD2 */ { 0, 0, 0, 0, 0, 0 }, /* pin doesn't exist */ - /* PD1 */ { 0, 0, 0, 0, 0, 0 }, /* pin doesn't exist */ - /* PD0 */ { 0, 0, 0, 0, 0, 0 } /* pin doesn't exist */ - } -}; - -/* ------------------------------------------------------------------------- */ - -struct tm { - unsigned int tm_sec; - unsigned int tm_min; - unsigned int tm_hour; - unsigned int tm_wday; - unsigned int tm_mday; - unsigned int tm_mon; - unsigned int tm_year; -}; - -void read_RS5C372_time (struct tm *timedate) -{ - unsigned char buffer[8]; - - if (! i2c_read (RS5C372_PPC_I2C_ADR, 0, 1, buffer, sizeof (buffer))) { - timedate->tm_sec = bcd2bin (buffer[0]); - timedate->tm_min = bcd2bin (buffer[1]); - timedate->tm_hour = bcd2bin (buffer[2]); - timedate->tm_wday = bcd2bin (buffer[3]); - timedate->tm_mday = bcd2bin (buffer[4]); - timedate->tm_mon = bcd2bin (buffer[5]); - timedate->tm_year = bcd2bin (buffer[6]) + 2000; - } else { - /*printf("i2c error %02x\n", rc); */ - memset (timedate, 0, sizeof (struct tm)); - } -} - -/* ------------------------------------------------------------------------- */ - -int read_LM84_temp (int address) -{ - unsigned char buffer[8]; - /*int rc;*/ - - if (! i2c_read (address, 0, 1, buffer, 1)) { - return (int) buffer[0]; - } else { - /*printf("i2c error %02x\n", rc); */ - return -42; - } -} - -/* ------------------------------------------------------------------------- */ - -/* - * Check Board Identity: - */ - -int checkboard (void) -{ - struct tm timedate; - unsigned int ppctemp, prottemp; - - puts ("Board: Rohde & Schwarz 8260 Protocol Board\n"); - - /* initialise i2c */ - i2c_init (CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE); - - read_RS5C372_time (&timedate); - printf (" Time: %02d:%02d:%02d\n", - timedate.tm_hour, timedate.tm_min, timedate.tm_sec); - printf (" Date: %02d-%02d-%04d\n", - timedate.tm_mday, timedate.tm_mon, timedate.tm_year); - ppctemp = read_LM84_temp (LM84_PPC_I2C_ADR); - prottemp = read_LM84_temp (LM84_SHARC_I2C_ADR); - printf (" Temp: PPC %d C, Protocol Board %d C\n", - ppctemp, prottemp); - - return 0; -} - -/* ------------------------------------------------------------------------- */ - -/* - * Miscelaneous platform dependent initialisations while still - * running in flash - */ - -int misc_init_f (void) -{ - return 0; -} - -/* ------------------------------------------------------------------------- */ - -phys_size_t initdram (int board_type) -{ - volatile immap_t *immap = (immap_t *) CONFIG_SYS_IMMR; - volatile memctl8260_t *memctl = &immap->im_memctl; - -#ifdef INIT_LOCAL_BUS_SDRAM - volatile uchar *ramaddr8; -#endif - volatile ulong *ramaddr32; - ulong sdmr; - int i; - - /* - * Only initialize SDRAM when running from FLASH. - * When running from RAM, don't touch it. - */ - if ((ulong) initdram & 0xff000000) { - immap->im_siu_conf.sc_ppc_acr = 0x02; - immap->im_siu_conf.sc_ppc_alrh = 0x01267893; - immap->im_siu_conf.sc_ppc_alrl = 0x89ABCDEF; - immap->im_siu_conf.sc_lcl_acr = 0x02; - immap->im_siu_conf.sc_lcl_alrh = 0x01234567; - immap->im_siu_conf.sc_lcl_alrl = 0x89ABCDEF; - /* - * Program local/60x bus Transfer Error Status and Control Regs: - * Disable parity errors - */ - immap->im_siu_conf.sc_tescr1 = 0x00040000; - immap->im_siu_conf.sc_ltescr1 = 0x00040000; - - /* - * Perform Power-Up Initialisation of SDRAM (see 8260 UM, 10.4.2) - * - * The appropriate BRx/ORx registers have already - * been set when we get here (see cpu_init_f). The - * SDRAM can be accessed at the address CONFIG_SYS_SDRAM_BASE. - */ - memctl->memc_mptpr = 0x2000; - memctl->memc_mar = 0x0200; -#ifdef INIT_LOCAL_BUS_SDRAM - /* initialise local bus ram - * - * (using the PSRMR_ definitions is NOT an error here - * - the LSDMR has the same fields as the PSDMR!) - */ - memctl->memc_lsrt = 0x0b; - memctl->memc_lurt = 0x00; - ramaddr = (uchar *) PHYS_SDRAM_LOCAL; - sdmr = CONFIG_SYS_LSDMR & ~(PSDMR_OP_MSK | PSDMR_RFEN | PSDMR_PBI); - memctl->memc_lsdmr = sdmr | PSDMR_OP_PREA; - *ramaddr = 0xff; - for (i = 0; i < 8; i++) { - memctl->memc_lsdmr = sdmr | PSDMR_OP_CBRR; - *ramaddr = 0xff; - } - memctl->memc_lsdmr = sdmr | PSDMR_OP_MRW; - *ramaddr = 0xff; - memctl->memc_lsdmr = CONFIG_SYS_LSDMR | PSDMR_OP_NORM; -#endif - /* initialise 60x bus ram */ - memctl->memc_psrt = 0x0b; - memctl->memc_purt = 0x08; - ramaddr32 = (ulong *) PHYS_SDRAM_60X; - sdmr = CONFIG_SYS_PSDMR & ~(PSDMR_OP_MSK | PSDMR_RFEN | PSDMR_PBI); - memctl->memc_psdmr = sdmr | PSDMR_OP_PREA; - ramaddr32[0] = 0x00ff00ff; - ramaddr32[1] = 0x00ff00ff; - memctl->memc_psdmr = sdmr | PSDMR_OP_CBRR; - for (i = 0; i < 8; i++) { - ramaddr32[0] = 0x00ff00ff; - ramaddr32[1] = 0x00ff00ff; - } - memctl->memc_psdmr = sdmr | PSDMR_OP_MRW; - ramaddr32[0] = 0x00ff00ff; - ramaddr32[1] = 0x00ff00ff; - memctl->memc_psdmr = sdmr | PSDMR_OP_NORM | PSDMR_RFEN; - } - - /* return the size of the 60x bus ram */ - return PHYS_SDRAM_60X_SIZE; -} - -/* ------------------------------------------------------------------------- */ - -/* - * Miscelaneous platform dependent initialisations after monitor - * has been relocated into ram - */ - -int misc_init_r (void) -{ - printf ("misc_init_r\n"); - return (0); -} diff --git a/board/rsdproto/u-boot.lds b/board/rsdproto/u-boot.lds deleted file mode 100644 index 44bcd19fb1a..00000000000 --- a/board/rsdproto/u-boot.lds +++ /dev/null @@ -1,114 +0,0 @@ -/* - * (C) Copyright 2000 - * Wolfgang Denk, DENX Software Engineering, wd@denx.de. - * - * SPDX-License-Identifier: GPL-2.0+ - */ - -OUTPUT_ARCH(powerpc) -/* Do we need any of these for elf? - __DYNAMIC = 0; */ -SECTIONS -{ - /* 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 : - { - arch/powerpc/cpu/mpc8260/start.o (.text) - *(.text) - *(.got1) - /*. = env_offset; */ - } - _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: */ - . = (. + 0x0FFF) & 0xFFFFF000; - _erotext = .; - PROVIDE (erotext = .); - .reloc : - { - _GOT2_TABLE_ = .; - KEEP(*(.got2)) - KEEP(*(.got)) - PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4); - _FIXUP_TABLE_ = .; - KEEP(*(.fixup)) - } - __got2_entries = ((_GLOBAL_OFFSET_TABLE_ - _GOT2_TABLE_) >> 2) - 1; - __fixup_entries = (. - _FIXUP_TABLE_)>>2; - - .data : - { - *(.data) - *(.data1) - *(.sdata) - *(.sdata2) - *(.dynamic) - CONSTRUCTORS - } - _edata = .; - PROVIDE (edata = .); - - . = .; - - . = ALIGN(4); - .u_boot_list : { - KEEP(*(SORT(.u_boot_list*))); - } - - - . = .; - __start___ex_table = .; - __ex_table : { *(__ex_table) } - __stop___ex_table = .; - - . = ALIGN(4096); - __init_begin = .; - .text.init : { *(.text.init) } - .data.init : { *(.data.init) } - . = ALIGN(4096); - __init_end = .; - - __bss_start = .; - .bss (NOLOAD) : - { - *(.sbss) *(.scommon) - *(.dynbss) - *(.bss) - *(COMMON) - . = ALIGN(4); - } - __bss_end = . ; - PROVIDE (end = .); -} diff --git a/boards.cfg b/boards.cfg index d90091708b2..d0df823a147 100644 --- a/boards.cfg +++ b/boards.cfg @@ -1244,4 +1244,3 @@ Orphan arm arm1136 mx31 freescale - Orphan arm pxa - - - lubbock - (dead address) Kyle Harris Orphan powerpc 74xx_7xx - - evb64260 EVB64260 - - Orphan powerpc mpc824x - - mousse MOUSSE - - -Orphan powerpc mpc8260 - - - rsdproto - - diff --git a/doc/README.scrapyard b/doc/README.scrapyard index 125ba809c9a..adcf163a816 100644 --- a/doc/README.scrapyard +++ b/doc/README.scrapyard @@ -11,6 +11,7 @@ easily if here is something they might want to dig for... Board Arch CPU Commit Removed Last known maintainer/contact ================================================================================================= +rsdproto powerpc mpc8260 - 2014-04-04 RPXsuper powerpc mpc8260 - 2014-04-04 RPXClassic powerpc mpc8xx - 2014-04-04 RPXlite powerpc mpc8xx - 2014-04-04 diff --git a/include/configs/rsdproto.h b/include/configs/rsdproto.h deleted file mode 100644 index 06211380d41..00000000000 --- a/include/configs/rsdproto.h +++ /dev/null @@ -1,400 +0,0 @@ -/* - * (C) Copyright 2000 - * Murray Jensen - * - * (C) Copyright 2000 - * Sysgo Real-Time Solutions, GmbH - * Marius Groeger - * - * Configuation settings for the R&S Protocol Board board. - * - * SPDX-License-Identifier: GPL-2.0+ - */ - -#ifndef __CONFIG_H -#define __CONFIG_H - -/* - * High Level Configuration Options - * (easy to change) - */ - -#define CONFIG_RSD_PROTO 1 /* on a R&S Protocol Board */ -#define CONFIG_CPM2 1 /* Has a CPM2 */ - -#define CONFIG_SYS_TEXT_BASE 0xff000000 -#define CONFIG_SYS_LDSCRIPT "board/rsdproto/u-boot.lds" - -#define CONFIG_MISC_INIT_F 1 /* Use misc_init_f() */ - -/* - * select serial console configuration - * - * if either CONFIG_CONS_ON_SMC or CONFIG_CONS_ON_SCC is selected, then - * CONFIG_CONS_INDEX must be set to the channel number (1-2 for SMC, 1-4 - * for SCC). - * - * if CONFIG_CONS_NONE is defined, then the serial console routines must - * defined elsewhere. - */ -#undef CONFIG_CONS_ON_SMC /* define if console on SMC */ -#define CONFIG_CONS_ON_SCC /* define if console on SCC */ -#undef CONFIG_CONS_NONE /* define if console on neither */ -#define CONFIG_CONS_INDEX 1 /* which SMC/SCC channel for console */ - -/* - * select ethernet configuration - * - * if either CONFIG_ETHER_ON_SCC or CONFIG_ETHER_ON_FCC is selected, then - * CONFIG_ETHER_INDEX must be set to the channel number (1-4 for SCC, 1-3 - * for FCC) - * - * if CONFIG_ETHER_NONE is defined, then either the ethernet routines must be - * defined elsewhere (as for the console), or CONFIG_CMD_NET must be unset. - */ -#undef CONFIG_ETHER_ON_SCC /* define if ethernet on SCC */ -#define CONFIG_ETHER_ON_FCC /* define if ethernet on FCC */ -#undef CONFIG_ETHER_NONE /* define if ethernet on neither */ -#define CONFIG_ETHER_INDEX 2 /* which SCC/FCC channel for ethernet */ - -#if (CONFIG_ETHER_INDEX == 2) - -/* - * - Rx-CLK is CLK13 - * - Tx-CLK is CLK14 - * - Select bus for bd/buffers (see 28-13) - * - Enable Full Duplex in FSMR - */ -# define CONFIG_SYS_CMXFCR_MASK2 (CMXFCR_FC2 | CMXFCR_RF2CS_MSK | CMXFCR_TF2CS_MSK) -# define CONFIG_SYS_CMXFCR_VALUE2 (CMXFCR_RF2CS_CLK13 | CMXFCR_TF2CS_CLK14) -# define CONFIG_SYS_CPMFCR_RAMTYPE (0) -# define CONFIG_SYS_FCC_PSMR (FCC_PSMR_FDE | FCC_PSMR_LPB) - -#endif /* CONFIG_ETHER_INDEX */ - - -/* allow to overwrite serial and ethaddr */ -#define CONFIG_ENV_OVERWRITE - -/* enable I2C */ -#define CONFIG_HARD_I2C 1 /* I2C with hardware support */ -#define CONFIG_SYS_I2C_SPEED 50000 /* I2C speed and slave address */ -#define CONFIG_SYS_I2C_SLAVE 0x30 - - -/* system clock rate (CLKIN) - equal to the 60x and local bus speed */ -#define CONFIG_8260_CLKIN 50000000 /* in Hz */ - -#define CONFIG_BAUDRATE 115200 - - -/* - * BOOTP options - */ -#define CONFIG_BOOTP_BOOTFILESIZE -#define CONFIG_BOOTP_BOOTPATH -#define CONFIG_BOOTP_GATEWAY -#define CONFIG_BOOTP_HOSTNAME - - -/* - * Command line configuration. - */ -#include - -#undef CONFIG_CMD_KGDB - - -/* Define this if you want to boot from 0x00000100. If you don't define - * this, you will need to program the bootloader to 0xfff00000, and - * get the hardware reset config words at 0xfe000000. The simplest - * way to do that is to program the bootloader at both addresses. - * It is suggested that you just let U-Boot live at 0x00000000. - */ -#define CONFIG_SYS_RSD_BOOT_LOW 1 - -#define CONFIG_BOOTDELAY 5 -#define CONFIG_BOOTARGS "devfs=mount root=ramfs" -#define CONFIG_ETHADDR 08:00:3e:26:0a:5a -#define CONFIG_NETMASK 255.255.0.0 - -#if defined(CONFIG_CMD_KGDB) -#define CONFIG_KGDB_BAUDRATE 230400 /* speed to run kgdb serial port */ -#endif - -/* - * Miscellaneous configurable options - */ -#define CONFIG_SYS_LONGHELP /* undef to save memory */ -#if defined(CONFIG_CMD_KGDB) -#define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */ -#else -#define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */ -#endif -#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */ -#define CONFIG_SYS_MAXARGS 16 /* max number of command args */ -#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */ - -#define CONFIG_SYS_MEMTEST_START 0x00400000 /* memtest works on */ -#define CONFIG_SYS_MEMTEST_END 0x01c00000 /* 4 ... 28 MB in DRAM */ - -#define CONFIG_SYS_LOAD_ADDR 0x100000 /* default load address */ - -/* - * Low Level Configuration Settings - * (address mappings, register initial values, etc.) - * You should know what you are doing if you make changes here. - */ - -/*----------------------------------------------------------------------- - * Physical Memory Map - */ -#define PHYS_SDRAM_60X 0x00000000 /* SDRAM (60x Bus) */ -#define PHYS_SDRAM_60X_SIZE 0x08000000 /* 128 MB */ - -#define PHYS_SDRAM_LOCAL 0x40000000 /* SDRAM (Local Bus) */ -#define PHYS_SDRAM_LOCAL_SIZE 0x04000000 /* 64 MB */ - -#define PHYS_DPRAM_PCI 0xE8000000 /* DPRAM PPC/PCI */ -#define PHYS_DPRAM_PCI_SIZE 0x00020000 /* 128 KB */ - -/*#define PHYS_DPRAM_PCI_SEM 0x04020000 / * DPRAM PPC/PCI Semaphore */ -/*#define PHYS_DPRAM_PCI_SEM_SIZE 0x00000001 / * 1 Byte */ - -#define PHYS_DPRAM_SHARC 0xE8100000 /* DPRAM PPC/Sharc */ -#define PHYS_DPRAM_SHARC_SIZE 0x00040000 /* 256 KB */ - -/*#define PHYS_DPRAM_SHARC_SEM 0x04140000 / * DPRAM PPC/Sharc Semaphore */ -/*#define PHYS_DPRAM_SHARC_SEM_SIZE 0x00000001 / * 1 Byte */ - -#define PHYS_VIRTEX_REGISTER 0xE8300000 /* FPGA implemented register */ -#define PHYS_VIRTEX_REGISTER_SIZE 0x00000100 - -#define PHYS_USB 0x04200000 /* USB Controller (60x Bus) */ -#define PHYS_USB_SIZE 0x00000002 /* 2 Bytes */ - -#define PHYS_IMMR 0xF0000000 /* Internal Memory Mapped Reg. */ - -#define PHYS_FLASH 0xFF000000 /* Flash (60x Bus) */ -#define PHYS_FLASH_SIZE 0x01000000 /* 16 MB */ - -#define CONFIG_SYS_IMMR PHYS_IMMR - -/*----------------------------------------------------------------------- - * Reset Address - * - * In order to reset the CPU, U-Boot jumps to a special address which - * causes a machine check exception. The default address for this is - * CONFIG_SYS_MONITOR_BASE - sizeof (ulong), which might not always work, eg. when - * testing the monitor in RAM using a JTAG debugger. - * - * Just set CONFIG_SYS_RESET_ADDRESS to an address that you know is sure to - * cause a bus error on your hardware. - */ -#define CONFIG_SYS_RESET_ADDRESS 0x20000000 - -/*----------------------------------------------------------------------- - * Hard Reset Configuration Words - */ - -#if defined(CONFIG_SYS_RSD_BOOT_LOW) -# define CONFIG_SYS_RSD_HRCW_BOOT_FLAGS (HRCW_CIP | HRCW_BMS) -#else -# define CONFIG_SYS_RSD_HRCW_BOOT_FLAGS (0) -#endif /* defined(CONFIG_SYS_RSD_BOOT_LOW) */ - -/* get the HRCW ISB field from CONFIG_SYS_IMMR */ -#define CONFIG_SYS_RSD_HRCW_IMMR ( ((CONFIG_SYS_IMMR & 0x10000000) >> 10) |\ - ((CONFIG_SYS_IMMR & 0x01000000) >> 7) |\ - ((CONFIG_SYS_IMMR & 0x00100000) >> 4) ) - -#define CONFIG_SYS_HRCW_MASTER (HRCW_L2CPC10 | \ - HRCW_DPPC11 | \ - CONFIG_SYS_RSD_HRCW_IMMR |\ - HRCW_MMR00 | \ - HRCW_APPC10 | \ - HRCW_CS10PC00 | \ - HRCW_MODCK_H0000 |\ - CONFIG_SYS_RSD_HRCW_BOOT_FLAGS) - -/* no slaves */ -#define CONFIG_SYS_HRCW_SLAVE1 0 -#define CONFIG_SYS_HRCW_SLAVE2 0 -#define CONFIG_SYS_HRCW_SLAVE3 0 -#define CONFIG_SYS_HRCW_SLAVE4 0 -#define CONFIG_SYS_HRCW_SLAVE5 0 -#define CONFIG_SYS_HRCW_SLAVE6 0 -#define CONFIG_SYS_HRCW_SLAVE7 0 - -/*----------------------------------------------------------------------- - * Definitions for initial stack pointer and data area (in DPRAM) - */ -#define CONFIG_SYS_INIT_RAM_ADDR CONFIG_SYS_IMMR -#define CONFIG_SYS_INIT_RAM_SIZE 0x4000 /* Size of used area in DPRAM */ -#define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) -#define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET - -/*----------------------------------------------------------------------- - * Start addresses for the final memory configuration - * (Set up by the startup code) - * Please note that CONFIG_SYS_SDRAM_BASE _must_ start at 0 - * Note also that the logic that sets CONFIG_SYS_RAMBOOT is platform dependend. - */ -#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_60X -#define CONFIG_SYS_FLASH_BASE PHYS_FLASH -/*#define CONFIG_SYS_MONITOR_BASE 0x200000 */ -#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE -#if CONFIG_SYS_MONITOR_BASE < CONFIG_SYS_FLASH_BASE -#define CONFIG_SYS_RAMBOOT -#endif -#define CONFIG_SYS_MONITOR_LEN (160 << 10) /* Reserve 160 kB for Monitor */ -#define CONFIG_SYS_MALLOC_LEN (128 << 10) /* Reserve 128 kB for malloc() */ - -/* - * For booting Linux, the board info and command line data - * have to be in the first 8 MB of memory, since this is - * the maximum mapped by the Linux kernel during initialization. - */ -#define CONFIG_SYS_BOOTMAPSZ (8 << 20) /* Initial Memory map for Linux */ - -/*----------------------------------------------------------------------- - * FLASH and environment organization - */ -#define CONFIG_SYS_MAX_FLASH_BANKS 2 /* max number of memory banks */ -#define CONFIG_SYS_MAX_FLASH_SECT 63 /* max number of sectors on one chip */ - -#define CONFIG_SYS_FLASH_ERASE_TOUT 12000 /* Timeout for Flash Erase (in ms) */ -#define CONFIG_SYS_FLASH_WRITE_TOUT 3000 /* Timeout for Flash Write (in ms) */ - -/* turn off NVRAM env feature */ -#undef CONFIG_NVRAM_ENV - -#define CONFIG_ENV_IS_IN_FLASH 1 -#define CONFIG_ENV_ADDR (PHYS_FLASH + 0x28000) /* Addr of Environment Sector */ -#define CONFIG_ENV_SECT_SIZE 0x8000 /* Total Size of Environment Sector */ - -/*----------------------------------------------------------------------- - * Cache Configuration - */ -#define CONFIG_SYS_CACHELINE_SIZE 32 /* For MPC8260 CPU */ -#if defined(CONFIG_CMD_KGDB) -#define CONFIG_SYS_CACHELINE_SHIFT 5 /* log base 2 of the above value */ -#endif - -/*----------------------------------------------------------------------- - * HIDx - Hardware Implementation-dependent Registers 2-11 - *----------------------------------------------------------------------- - * HID0 also contains cache control - initially enable both caches and - * invalidate contents, then the final state leaves only the instruction - * cache enabled. Note that Power-On and Hard reset invalidate the caches, - * but Soft reset does not. - * - * HID1 has only read-only information - nothing to set. - */ -#define CONFIG_SYS_HID0_INIT (HID0_ICE|HID0_DCE|HID0_ICFI|HID0_DCI|HID0_IFEM|HID0_ABE) -#define CONFIG_SYS_HID0_FINAL (HID0_ICE|HID0_IFEM|HID0_ABE|HID0_EMCP) -#define CONFIG_SYS_HID2 0 - -/*----------------------------------------------------------------------- - * RMR - Reset Mode Register - *----------------------------------------------------------------------- - */ -#define CONFIG_SYS_RMR 0 - -/*----------------------------------------------------------------------- - * BCR - Bus Configuration 4-25 - *----------------------------------------------------------------------- - */ -#define CONFIG_SYS_BCR 0x100c0000 - -/*----------------------------------------------------------------------- - * SIUMCR - SIU Module Configuration 4-31 - *----------------------------------------------------------------------- - */ - -#define CONFIG_SYS_SIUMCR (SIUMCR_DPPC11 | SIUMCR_L2CPC10 | SIUMCR_APPC10 | \ - SIUMCR_CS10PC01 | SIUMCR_BCTLC01) - -/*----------------------------------------------------------------------- - * SYPCR - System Protection Control 11-9 - * SYPCR can only be written once after reset! - *----------------------------------------------------------------------- - * Watchdog & Bus Monitor Timer max, 60x Bus Monitor enable - */ -#define CONFIG_SYS_SYPCR (SYPCR_SWTC | SYPCR_BMT | SYPCR_PBME | SYPCR_LBME | \ - SYPCR_SWRI | SYPCR_SWP) - -/*----------------------------------------------------------------------- - * TMCNTSC - Time Counter Status and Control 4-40 - *----------------------------------------------------------------------- - * Clear once per Second and Alarm Interrupt Status, Set 32KHz timersclk, - * and enable Time Counter - */ -#define CONFIG_SYS_TMCNTSC (TMCNTSC_SEC | TMCNTSC_ALR | TMCNTSC_TCF | TMCNTSC_TCE) - -/*----------------------------------------------------------------------- - * PISCR - Periodic Interrupt Status and Control 4-42 - *----------------------------------------------------------------------- - * Clear Periodic Interrupt Status, Set 32KHz timersclk, and enable - * Periodic timer - */ -#define CONFIG_SYS_PISCR (PISCR_PS|PISCR_PTF|PISCR_PTE) - -/*----------------------------------------------------------------------- - * SCCR - System Clock Control 9-8 - *----------------------------------------------------------------------- - */ -#define CONFIG_SYS_SCCR 0x00000000 - -/*----------------------------------------------------------------------- - * RCCR - RISC Controller Configuration 13-7 - *----------------------------------------------------------------------- - */ -#define CONFIG_SYS_RCCR 0 - -/* - * Init Memory Controller: - */ - -#define CONFIG_SYS_PSDMR 0x494D2452 -#define CONFIG_SYS_LSDMR 0x49492552 - -/* Flash */ -#define CONFIG_SYS_BR0_PRELIM (PHYS_FLASH | BRx_V) -#define CONFIG_SYS_OR0_PRELIM (P2SZ_TO_AM(PHYS_FLASH_SIZE) | \ - ORxG_BCTLD | \ - ORxG_SCY_5_CLK) - -/* DPRAM to the PCI BUS on the protocol board */ -#define CONFIG_SYS_BR1_PRELIM (PHYS_DPRAM_PCI | BRx_V) -#define CONFIG_SYS_OR1_PRELIM (P2SZ_TO_AM(PHYS_DPRAM_PCI_SIZE) | \ - ORxG_ACS_DIV4) - -/* 60x Bus SDRAM */ -#define CONFIG_SYS_BR2_PRELIM (PHYS_SDRAM_60X | BRx_MS_SDRAM_P | BRx_V) -#define CONFIG_SYS_OR2_PRELIM (ORxS_SIZE_TO_AM(PHYS_SDRAM_60X_SIZE) | \ - ORxS_BPD_4 | \ - ORxS_ROWST_PBI1_A2 | \ - ORxS_NUMR_13 | \ - ORxS_IBID) - -/* Virtex-FPGA - Register */ -#define CONFIG_SYS_BR3_PRELIM (PHYS_VIRTEX_REGISTER | BRx_V) -#define CONFIG_SYS_OR3_PRELIM (ORxS_SIZE_TO_AM(PHYS_VIRTEX_REGISTER_SIZE) | \ - ORxG_SCY_1_CLK | \ - ORxG_ACS_DIV2 | \ - ORxG_CSNT ) - -/* local bus SDRAM */ -#define CONFIG_SYS_BR4_PRELIM (PHYS_SDRAM_LOCAL | BRx_PS_32 | BRx_MS_SDRAM_L | BRx_V) -#define CONFIG_SYS_OR4_PRELIM (ORxS_SIZE_TO_AM(PHYS_SDRAM_LOCAL_SIZE) | \ - ORxS_BPD_4 | \ - ORxS_ROWST_PBI1_A4 | \ - ORxS_NUMR_13) - -/* DPRAM to the Sharc-Bus on the protocol board */ -#define CONFIG_SYS_BR5_PRELIM (PHYS_DPRAM_SHARC | BRx_V) -#define CONFIG_SYS_OR5_PRELIM (P2SZ_TO_AM(PHYS_DPRAM_SHARC_SIZE) | \ - ORxG_ACS_DIV4) - -#endif /* __CONFIG_H */ -- cgit v1.2.3 From 03f2ecc2cb28efeb35912710754d9857cdc05190 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Fri, 4 Apr 2014 15:25:09 +0900 Subject: powerpc: remove MOUSSE board support Enough time has passed since this board was moved to Orphan. Remove. - Remove board/mousse/* - Remove include/configs/MOUSSE.h - Clean-up defined(CONFIG_MOUSSE) - Move the entry from boards.cfg to doc/README.scrapyard Signed-off-by: Masahiro Yamada --- CREDITS | 4 - arch/powerpc/cpu/mpc824x/cpu_init.c | 88 ---- board/mousse/Makefile | 8 - board/mousse/README | 346 -------------- board/mousse/flash.c | 917 ------------------------------------ board/mousse/flash.h | 78 --- board/mousse/m48t59y.c | 308 ------------ board/mousse/m48t59y.h | 41 -- board/mousse/mousse.c | 77 --- board/mousse/mousse.h | 243 ---------- board/mousse/pci.c | 267 ----------- board/mousse/u-boot.lds | 77 --- board/mousse/u-boot.lds.ram | 85 ---- board/mousse/u-boot.lds.rom | 112 ----- boards.cfg | 1 - doc/README.scrapyard | 1 + include/configs/MOUSSE.h | 320 ------------- 17 files changed, 1 insertion(+), 2972 deletions(-) delete mode 100644 board/mousse/Makefile delete mode 100644 board/mousse/README delete mode 100644 board/mousse/flash.c delete mode 100644 board/mousse/flash.h delete mode 100644 board/mousse/m48t59y.c delete mode 100644 board/mousse/m48t59y.h delete mode 100644 board/mousse/mousse.c delete mode 100644 board/mousse/mousse.h delete mode 100644 board/mousse/pci.c delete mode 100644 board/mousse/u-boot.lds delete mode 100644 board/mousse/u-boot.lds.ram delete mode 100644 board/mousse/u-boot.lds.rom delete mode 100644 include/configs/MOUSSE.h (limited to 'board') diff --git a/CREDITS b/CREDITS index 52f289e06ab..3e5fb7baabb 100644 --- a/CREDITS +++ b/CREDITS @@ -120,10 +120,6 @@ N: Dan A. Dickey E: ddickey@charter.net D: FADS Support -N: James F. Dougherty -E: jfd@GigabitNetworks.COM -D: Port to the MOUSSE board - N: Mike Dunn E: mikedunn@newsguy.com D: Palmtreo680 board, docg4 nand flash driver diff --git a/arch/powerpc/cpu/mpc824x/cpu_init.c b/arch/powerpc/cpu/mpc824x/cpu_init.c index 47ac18e757c..68d88e910cb 100644 --- a/arch/powerpc/cpu/mpc824x/cpu_init.c +++ b/arch/powerpc/cpu/mpc824x/cpu_init.c @@ -46,8 +46,6 @@ void cpu_init_f (void) { -/* MOUSSE board is initialized in asm */ -#if !defined(CONFIG_MOUSSE) register unsigned long val; CONFIG_WRITE_HALFWORD(PCICR, 0x06); /* Bus Master, respond to PCI memory space acesses*/ /* CONFIG_WRITE_HALFWORD(PCISR, 0xffff); */ /*reset PCISR*/ @@ -302,98 +300,12 @@ cpu_init_f (void) CONFIG_READ_WORD(MCCR1, val); CONFIG_WRITE_WORD(MCCR1, val | MCCR1_MEMGO); /* set memory access going */ __asm__ __volatile__("eieio"); - -#endif /* !CONFIG_MOUSSE */ } - -#ifdef CONFIG_MOUSSE -#ifdef INCLUDE_MPC107_REPORT -struct MPC107_s { - unsigned int iobase; - char desc[120]; -} MPC107Regs[] = { - { BMC_BASE + 0x00, "MPC107 Vendor/Device ID" }, - { BMC_BASE + 0x04, "MPC107 PCI Command/Status Register" }, - { BMC_BASE + 0x08, "MPC107 Revision" }, - { BMC_BASE + 0x0C, "MPC107 Cache Line Size" }, - { BMC_BASE + 0x10, "MPC107 LMBAR" }, - { BMC_BASE + 0x14, "MPC824x PCSR" }, - { BMC_BASE + 0xA8, "MPC824x PICR1" }, - { BMC_BASE + 0xAC, "MPC824x PICR2" }, - { BMC_BASE + 0x46, "MPC824x PACR" }, - { BMC_BASE + 0x310, "MPC824x ITWR" }, - { BMC_BASE + 0x300, "MPC824x OMBAR" }, - { BMC_BASE + 0x308, "MPC824x OTWR" }, - { BMC_BASE + 0x14, "MPC107 Peripheral Control and Status Register" }, - { BMC_BASE + 0x78, "MPC107 EUMBAR" }, - { BMC_BASE + 0xC0, "MPC107 Processor Bus Error Status" }, - { BMC_BASE + 0xC4, "MPC107 PCI Bus Error Status" }, - { BMC_BASE + 0xC8, "MPC107 Processor/PCI Error Address" }, - { BMC_BASE + 0xE0, "MPC107 AMBOR Register" }, - { BMC_BASE + 0xF0, "MPC107 MCCR1 Register" }, - { BMC_BASE + 0xF4, "MPC107 MCCR2 Register" }, - { BMC_BASE + 0xF8, "MPC107 MCCR3 Register" }, - { BMC_BASE + 0xFC, "MPC107 MCCR4 Register" }, -}; -#define N_MPC107_Regs (sizeof(MPC107Regs)/sizeof(MPC107Regs[0])) -#endif /* INCLUDE_MPC107_REPORT */ -#endif /* CONFIG_MOUSSE */ - /* * initialize higher level parts of CPU like time base and timers */ int cpu_init_r (void) { -#ifdef CONFIG_MOUSSE -#ifdef INCLUDE_MPC107_REPORT - unsigned int tmp = 0, i; -#endif - /* - * Initialize the EUMBBAR (Embedded Util Mem Block Base Addr Reg). - * This is necessary before the EPIC, DMA ctlr, I2C ctlr, etc. can - * be accessed. - */ - -#ifdef CONFIG_MPC8240 /* only on MPC8240 */ - mpc824x_mpc107_setreg (EUMBBAR, EUMBBAR_VAL); - /* MOT/SPS: Issue #10002, PCI (FD Alias enable) */ - mpc824x_mpc107_setreg (AMBOR, 0x000000C0); -#endif - - -#ifdef INCLUDE_MPC107_REPORT - /* Check MPC824x PCI Device and Vendor ID */ - while ((tmp = mpc824x_mpc107_getreg (BMC_BASE)) != 0x31057) { - printf (" MPC107: offset=0x%x, val = 0x%x\n", - BMC_BASE, - tmp); - } - - for (i = 0; i < N_MPC107_Regs; i++) { - printf (" 0x%x/%s = 0x%x\n", - MPC107Regs[i].iobase, - MPC107Regs[i].desc, - mpc824x_mpc107_getreg (MPC107Regs[i].iobase)); - } - - printf ("IBAT0L = 0x%08X\n", mfspr (IBAT0L)); - printf ("IBAT0U = 0x%08X\n", mfspr (IBAT0U)); - printf ("IBAT1L = 0x%08X\n", mfspr (IBAT1L)); - printf ("IBAT1U = 0x%08X\n", mfspr (IBAT1U)); - printf ("IBAT2L = 0x%08X\n", mfspr (IBAT2L)); - printf ("IBAT2U = 0x%08X\n", mfspr (IBAT2U)); - printf ("IBAT3L = 0x%08X\n", mfspr (IBAT3L)); - printf ("IBAT3U = 0x%08X\n", mfspr (IBAT3U)); - printf ("DBAT0L = 0x%08X\n", mfspr (DBAT0L)); - printf ("DBAT0U = 0x%08X\n", mfspr (DBAT0U)); - printf ("DBAT1L = 0x%08X\n", mfspr (DBAT1L)); - printf ("DBAT1U = 0x%08X\n", mfspr (DBAT1U)); - printf ("DBAT2L = 0x%08X\n", mfspr (DBAT2L)); - printf ("DBAT2U = 0x%08X\n", mfspr (DBAT2U)); - printf ("DBAT3L = 0x%08X\n", mfspr (DBAT3L)); - printf ("DBAT3U = 0x%08X\n", mfspr (DBAT3U)); -#endif /* INCLUDE_MPC107_REPORT */ -#endif /* CONFIG_MOUSSE */ return (0); } diff --git a/board/mousse/Makefile b/board/mousse/Makefile deleted file mode 100644 index e2951d54ad9..00000000000 --- a/board/mousse/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -# -# (C) Copyright 2001-2006 -# Wolfgang Denk, DENX Software Engineering, wd@denx.de. -# -# SPDX-License-Identifier: GPL-2.0+ -# - -obj-y = mousse.o m48t59y.o pci.o flash.o diff --git a/board/mousse/README b/board/mousse/README deleted file mode 100644 index d5dda7a8e73..00000000000 --- a/board/mousse/README +++ /dev/null @@ -1,346 +0,0 @@ - -U-Boot for MOUSSE/MPC8240 (KAHLUA) ----------------------------------- -James Dougherty (jfd@broadcom.com), 09/10/01 - -The Broadcom/Vooha Mousse board is a 3U Compact PCI system board -which uses the MPC8240, a 64MB SDRAM SIMM, and has onboard -DEC 21143, NS16550 UART, an SGS M48T59Y TOD, and 4MB FLASH. -See also: http://www.vooha.com/ - -* NVRAM setenv/printenv/savenv supported. -* Date Command -* Serial Console support -* Network support -* FLASH of kernel images is supported. -* FLASH of U-Boot to onboard and PLCC boot region. -* Kernel command line options from NVRAM is supported. -* IP PNP options supported. - -U-Boot Loading... - - -U-Boot 1.0.5 (Sep 10 2001 - 00:22:25) - -CPU: MPC8240 Revision 1.1 at 198 MHz: 16 kB I-Cache 16 kB D-Cache -Board: MOUSSE MPC8240/KAHLUA - CHRP (MAP B) -Built: Sep 10 2001 at 01:01:50 -MPLD: Revision 127 -Local Bus: 33 MHz -RTC: M48T589 TOD/NVRAM (8176) bytes - Current date/time: 9/10/2001 0:18:52 -DRAM: 64 MB -FLASH: 1.960 MB -PCI: scanning bus0 ... - bus dev fn venID devID class rev MBAR0 MBAR1 IPIN ILINE - 00 00 00 1057 0003 060000 11 00000008 00000000 01 00 - 00 0d 00 1011 0019 020000 41 80000001 80000000 01 01 - 00 0e 00 105a 4d38 018000 01 a0000001 a0001001 01 03 -In: serial -Out: serial -Err: serial - -Hit any key to stop autoboot: 0 -=> - -I. Root FileSystem/IP Configuration - -bootcmd=tftp 100000 vmlinux.img;bootm -bootdelay=3 -baudrate=9600 -ipaddr= -netmask= -hostname= -serverip= -ethaddr=00:00:10:20:30:44 -nfsroot=:/boot/root-fs -gateway= -root=/dev/nfs -stdin=serial -stdout=serial -stderr=serial - -NVRAM environment variables. - -use the command: - -setenv - -type "saveenv" to write to NVRAM. - - -II. To boot from a hard drive: - -setenv root /dev/hda1 - - -III. IP options which configure the network: - -ipaddr= -netmask= -hostname=mousse -ethaddr=00:00:10:20:30:44 -gateway= - - -IV. IP Options which configure NFS Root/Boot Support - -root=/dev/nfs -serverip= -nfsroot=:/boot/root-fs - -V. U-Boot Image Support - -The U-Boot boot loader assumes that after you build -your kernel (vmlinux), you will create a U-Boot image -using the following commands or script: - -#!/bin/csh -/bin/touch vmlinux.img -/bin/rm vmlinux.img -set path=($TOOLBASE/bin $path) -set path=($U_BOOT/tools $path) -powerpc-linux-objcopy -S -O binary vmlinux vmlinux.bin -gzip -vf vmlinux.bin -mkimage -A ppc -O linux -T kernel -C gzip -a 0 -e 0 -n vmlinux.bin.gz -d vmlinux.bin.gz vmlinux.img -ls -l vmlinux.img - - -VI. ONBOARD FLASH Support - -FLASH support is provided for the onboard FLASH chip Bootrom area. -U-Boot is loaded into either the ROM boot region of the FLASH chip, -after first being boot-strapped from a pre-progammed AMD29F040 PLCC -bootrom. The PLCC needs to be programmed with a ROM burner using -AMD 29F040 ROM parts and the u-boot.bin or u-boot.hex (S-Record) -images. - -The PLCC overlays this same region of flash as the onboard FLASH, -the jumper J100 is a chip-select for which flash chip you want to -progam. When jumper J100 is connected to pins 2-3, you boot from -PLCC FLASH. - -To bringup a system, simply flash a flash an AMD29F040 PLCC -bootrom, and put this in the PLCC socket. Move jumper J100 to -pins 2-3 and boot from the PLCC. - - -Now, while the system is running, move Jumper J100 to -pins 1-2 and follow the procedure below to FLASH a bootrom -(u-boot.bin) image into the onboard bootrom region (AMD29LV160DB): - -tftp 100000 u-boot.bin -protect off FFF00000 FFF7FFFF -erase FFF00000 FFF7FFFF -cp.b 100000 FFF00000 \${filesize}\ - - -Here is an example: - -=>tftp 100000 u-boot.bin -eth_halt -eth0: DC21143 Ethernet adapter(bus=0, device=13, func=0) -DEC Ethernet iobase=0x80000000 -ARP broadcast 1 -Filename 'u-boot.bin'. -Load address: 0x100000 -Loading: ######################### -done -Bytes transferred = 123220 (1e154 hex) -eth_halt -=>protect off FFF00000 FFF7FFFF -Un-Protected 8 sectors -=>erase FFF00000 FFF7FFFF -Erase Flash from 0xfff00000 to 0xfff7ffff -Erase FLASH[PLCC_BOOT] -8 sectors:........ done -Erased 8 sectors -=>cp.b 100000 FFF00000 1e154 -Copy to Flash... FLASH[PLCC_BOOT]:..done -=> - - -B. FLASH RAMDISK REGION - -FLASH support is provided for an Onboard 512K RAMDISK region. - -TThe following commands will FLASH a bootrom (u-boot.bin) image -into the onboard FLASH region (AMD29LV160DB 2MB FLASH): - -tftp 100000 u-boot.bin -protect off FFF80000 FFFFFFFF -erase FFF80000 FFFFFFFF -cp.b 100000 FFF80000 \${filesize}\ - - -C. FLASH KERNEL REGION (960KB) - -FLASH support is provided for the 960KB onboard FLASH1 segment. -This allows flashing of kernel images which U-Boot can load -and run (standalone) from the onboard FLASH chip. It also assumes - -The following commands will FLASH a kernel image to 0xffe10000 - -tftp 100000 vmlinux.img -protect off FFE10000 FFEFFFFF -erase FFE10000 FFEFFFFF -cp.b 100000 FFE10000 \${filesize}\ -reset - -Here is an example: - - -=>tftp 100000 vmlinux.img -eth_halt -eth0: DC21143 Ethernet adapter(bus=0, device=13, func=0) -DEC Ethernet iobase=0x80000000 -ARP broadcast 1 -TFTP from server 209.128.93.133; our IP address is 209.128.93.138 -Filename 'vmlinux.img'. -Load address: 0x100000 -Loading: ##################################################################################################################################################### -done -Bytes transferred = 760231 (b99a7 hex) -eth_halt -=>protect off FFE10000 FFEFFFFF -Un-Protected 15 sectors -=>erase FFE10000 FFEFFFFF -Erase Flash from 0xffe10000 to 0xffefffff -Erase FLASH[F0_SA3(KERNEL)] -15 sectors:............... done -Erased 15 sectors -=>cp.b 100000 FFE10000 b99a7 -Copy to Flash... FLASH[F0_SA3(KERNEL)]:............done -=> - - -When finished, use the command: - -bootm ffe10000 - -to start the kernel. - -Finally, to make this the default boot command, use -the following commands: - -setenv bootcmd bootm ffe10000 -savenv - -to make it automatically boot the kernel from FLASH. - - -To go back to development mode (NFS boot) - -setenv bootcmd tftp 100000 vmlinux.img\;bootm -savenv - - -=>tftp 100000 vmlinux.img -eth0: DC21143 Ethernet adapter(bus=0, device=13, func=0) -DEC Ethernet iobase=0x80000000 -ARP broadcast 1 -Filename 'vmlinux.img'. -Load address: 0x100000 -Loading: #################################################################################################################################################### -done -Bytes transferred = 752717 (b7c4d hex) -eth_halt -=>protect off FFE10000 FFEFFFFF -Un-Protected 15 sectors -=>erase FFE10000 FFEFFFFF -Erase Flash from 0xffe10000 to 0xffefffff -Erase FLASH[F0_SA3(KERNEL)] -15 sectors:............... done -Erased 15 sectors -=>cp.b 100000 FFE10000 b7c4d -Copy to Flash... FLASH[F0_SA3(KERNEL)]:............done -=>bootm ffe10000 -## Booting image at ffe10000 ... - Image Name: vmlinux.bin.gz - Image Type: PowerPC Linux Kernel Image (gzip compressed) - Data Size: 752653 Bytes = 735 kB = 0 MB - Load Address: 00000000 - Entry Point: 00000000 - Verifying Checksum ... OK - Uncompressing Kernel Image ... OK -Total memory = 64MB; using 0kB for hash table (at 00000000) -Linux version 2.4.2_hhl20 (jfd@atlantis) (gcc version 2.95.2 19991024 (release)) #597 Wed Sep 5 23:23:23 PDT 2001 -cpu0: MPC8240/KAHLUA : MOUSSE Platform : 64MB RAM: MPLD Rev. 7f -Sandpoint port (C) 2000, 2001 MontaVista Software, Inc. (source@mvista.com) -IP PNP: 802.3 Ethernet Address=<0:0:10:20:30:44> -NOTICE: mounting root file system via NFS -On node 0 totalpages: 16384 -zone(0): 16384 pages. -zone(1): 0 pages. -zone(2): 0 pages. -time_init: decrementer frequency = 16.665914 MHz -time_init: MPC8240 PCI Bus frequency = 33.331828 MHz -Calibrating delay loop... 133.12 BogoMIPS -Memory: 62436k available (1336k kernel code, 500k data, 88k init, 0k highmem) -Dentry-cache hash table entries: 8192 (order: 4, 65536 bytes) -Buffer-cache hash table entries: 4096 (order: 2, 16384 bytes) -Page-cache hash table entries: 16384 (order: 4, 65536 bytes) -Inode-cache hash table entries: 4096 (order: 3, 32768 bytes) -POSIX conformance testing by UNIFIX -PCI: Probing PCI hardware -Linux NET4.0 for Linux 2.4 -Based upon Swansea University Computer Society NET3.039 -Initializing RT netlink socket -Starting kswapd v1.8 -pty: 256 Unix98 ptys configured -block: queued sectors max/low 41394kB/13798kB, 128 slots per queue -Uniform Multi-Platform E-IDE driver Revision: 6.31 -ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx -PDC20262: IDE controller on PCI bus 00 dev 70 -PDC20262: chipset revision 1 -PDC20262: not 100% native mode: will probe irqs later -PDC20262: ROM enabled at 0x000d0000 -PDC20262: (U)DMA Burst Bit DISABLED Primary PCI Mode Secondary PCI Mode. -PDC20262: FORCING BURST BIT 0x00 -> 0x01 ACTIVE -PDC20262: irq=3 dev->irq=3 - ide0: BM-DMA at 0xbfff00-0xbfff07, BIOS settings: hda:DMA, hdb:DMA - ide1: BM-DMA at 0xbfff08-0xbfff0f, BIOS settings: hdc:pio, hdd:pio -hda: WDC WD300AB-00BVA0, ATA DISK drive -hdc: SONY CD-RW CRX160E, ATAPI CD/DVD-ROM drive -ide0 at 0xbfff78-0xbfff7f,0xbfff76 on irq 3 -ide1 at 0xbfff68-0xbfff6f,0xbfff66 on irq 3 -hda: 58633344 sectors (30020 MB) w/2048KiB Cache, CHS=58168/16/63, UDMA(66) -hdc: ATAPI 32X CD-ROM CD-R/RW drive, 4096kB Cache -Uniform CD-ROM driver Revision: 3.12 -Partition check: - /dev/ide/host0/bus0/target0/lun0: p1 p2 -hd: unable to get major 3 for hard disk -udf: registering filesystem -loop: loaded (max 8 devices) -Serial driver version 5.02 (2000-08-09) with MANY_PORTS SHARE_IRQ SERIAL_PCI enabled -ttyS00 at 0xffe08080 (irq = 4) is a ST16650 -Linux Tulip driver version 0.9.13a (January 20, 2001) -eth0: Digital DS21143 Tulip rev 65 at 0xbfff80, EEPROM not present, 00:00:10:20:30:44, IRQ 1. -eth0: MII transceiver #0 config 3000 status 7829 advertising 01e1. -NET4: Linux TCP/IP 1.0 for NET4.0 -IP Protocols: ICMP, UDP, TCP -IP: routing cache hash table of 512 buckets, 4Kbytes -TCP: Hash tables configured (established 4096 bind 4096) -NET4: Unix domain sockets 1.0/SMP for Linux NET4.0. -devfs: v0.102 (20000622) Richard Gooch (rgooch@atnf.csiro.au) -devfs: boot_options: 0x0 -VFS: Mounted root (nfs filesystem). -Mounted devfs on /dev -Freeing unused kernel memory: 88k init 4k openfirmware -eth0: Setting full-duplex based on MII#0 link partner capability of 45e1. -INIT: version 2.78 booting -INIT: Entering runlevel: 2 - - -Welcome to Linux/PPC -MPC8240/MOUSSE - - -mousse login: root -Password: -PAM_unix[13]: (login) session opened for user root by LOGIN(uid=0) -Last login: Thu Sep 6 00:16:51 2001 on console - - -Welcome to Linux/PPC -MPC8240/MOUSSE - - -mousse# diff --git a/board/mousse/flash.c b/board/mousse/flash.c deleted file mode 100644 index acedcb1aa13..00000000000 --- a/board/mousse/flash.c +++ /dev/null @@ -1,917 +0,0 @@ -/* - * MOUSSE/MPC8240 Board definitions. - * Flash Routines for MOUSSE onboard AMD29LV106DB devices - * - * (C) Copyright 2000 - * Marius Groeger - * Sysgo Real-Time Solutions, GmbH - * - * (C) Copyright 2000 - * Wolfgang Denk, DENX Software Engineering, wd@denx.de. - * - * (C) Copyright 1999, by Curt McDowell, 08-06-99, Broadcom Corp. - * (C) Copyright 2001, James Dougherty, 07/18/01, Broadcom Corp. - * - * SPDX-License-Identifier: GPL-2.0+ - */ - -#include -#include -#include -#include "mousse.h" -#include "flash.h" - -int flashLibDebug = 0; -int flashLibInited = 0; - -#define OK 0 -#define ERROR -1 -#define STATUS int -#define PRINTF if (flashLibDebug) printf -#if 0 -#define PRIVATE static -#else -#define PRIVATE -#endif - -flash_info_t flash_info[CONFIG_SYS_MAX_FLASH_BANKS]; - -#define SLEEP_DELAY 166 -#define FLASH_SECTOR_SIZE (64*1024) -/*********************************************************************** - * - * Virtual Flash Devices on Mousse board - * - * These must be kept in sync with the definitions in flashLib.h. - * - ***********************************************************************/ - -PRIVATE flash_dev_t flashDev[] = { - /* Bank 0 sector SA0 (16 kB) */ - { "SA0",FLASH0_BANK, FLASH0_SEG0_START, 1, 14, - FLASH0_VENDOR_ID, FLASH0_DEVICE_ID - }, - /* Bank 0 sector SA1 (8 kB) */ - { "SA1", FLASH0_BANK, FLASH0_SEG0_START + 0x4000, 1, 13, - FLASH0_VENDOR_ID, FLASH0_DEVICE_ID - }, - /* Bank 0 sector SA2 (8 kB) */ - { "SA2", FLASH0_BANK, FLASH0_SEG0_START + 0x6000, 1, 13, - FLASH0_VENDOR_ID, FLASH0_DEVICE_ID - }, - /* Bank 0 sector SA3 is occluded by Mousse I/O devices */ - /* Bank 0 sectors SA4-SA18, after Mousse devices up to PLCC (960 kB) */ - { "KERNEL", FLASH0_BANK, FLASH0_SEG1_START, 15, 16, - FLASH0_VENDOR_ID, FLASH0_DEVICE_ID - }, - /* Bank 0 sectors SA19-SA26, jumper can occlude this by PLCC (512 kB) */ - /* This is where the Kahlua boot vector and boot ROM code resides. */ - { "BOOT",FLASH0_BANK, FLASH0_SEG2_START, 8, 16, - FLASH0_VENDOR_ID, FLASH0_DEVICE_ID - }, - /* Bank 0 sectors SA27-SA34 (512 kB) */ - { "RAMDISK",FLASH0_BANK, FLASH0_SEG3_START, 8, 16, - FLASH0_VENDOR_ID, FLASH0_DEVICE_ID - }, -}; - -int flashDevCount = (sizeof (flashDev) / sizeof (flashDev[0])); - -#define DEV(no) (&flashDev[no]) -#define DEV_NO(dev) ((dev) - flashDev) - -/*********************************************************************** - * - * Private Flash Routines - * - ***********************************************************************/ - -/* - * The convention is: - * - * "addr" is always the PROM raw address, which is the address of an - * 8-bit quantity for flash 0 and 16-bit quantity for flash 1. - * - * "pos" is always a logical byte position from the PROM beginning. - */ - -#define FLASH0_ADDR(dev, addr) \ - ((unsigned char *) ((dev)->base + (addr))) - -#define FLASH0_WRITE(dev, addr, value) \ - (*FLASH0_ADDR(dev, addr) = (value)) - -#define FLASH0_READ(dev, addr) \ - (*FLASH0_ADDR(dev, addr)) - -PRIVATE int flashCheck (flash_dev_t * dev) -{ - if (!flashLibInited) { - printf ("flashCheck: flashLib not initialized\n"); - return ERROR; - } - - if (dev < &flashDev[0] || dev >= &flashDev[flashDevCount]) { - printf ("flashCheck: Bad dev parameter\n"); - return ERROR; - } - - if (!dev->found) { - printf ("flashCheck: Device %d not available\n", DEV_NO (dev)); - return ERROR; - } - - return OK; -} - -PRIVATE void flashReset (flash_dev_t * dev) -{ - PRINTF ("flashReset: dev=%d\n", DEV_NO (dev)); - - if (dev->bank == FLASH0_BANK) { - FLASH0_WRITE (dev, 0x555, 0xaa); - FLASH0_WRITE (dev, 0xaaa, 0x55); - FLASH0_WRITE (dev, 0x555, 0xf0); - } - - udelay (SLEEP_DELAY); - - PRINTF ("flashReset: done\n"); -} - -PRIVATE int flashProbe (flash_dev_t * dev) -{ - int rv, deviceID, vendorID; - - PRINTF ("flashProbe: dev=%d\n", DEV_NO (dev)); - - if (dev->bank != FLASH0_BANK) { - rv = ERROR; - goto DONE; - } - - FLASH0_WRITE (dev, 0xaaa, 0xaa); - FLASH0_WRITE (dev, 0x555, 0x55); - FLASH0_WRITE (dev, 0xaaa, 0x90); - - udelay (SLEEP_DELAY); - - vendorID = FLASH0_READ (dev, 0); - deviceID = FLASH0_READ (dev, 2); - - FLASH0_WRITE (dev, 0, 0xf0); - - PRINTF ("flashProbe: vendor=0x%x device=0x%x\n", vendorID, deviceID); - - if (vendorID == dev->vendorID && deviceID == dev->deviceID) - rv = OK; - else - rv = ERROR; - - DONE: - PRINTF ("flashProbe: rv=%d\n", rv); - - return rv; -} - -PRIVATE int flashWait (flash_dev_t * dev, int addr, int expect, int erase) -{ - int rv = ERROR; - int i, data; - int polls; - -#if 0 - PRINTF ("flashWait: dev=%d addr=0x%x expect=0x%x erase=%d\n", - DEV_NO (dev), addr, expect, erase); -#endif - - if (dev->bank != FLASH0_BANK) { - rv = ERROR; - goto done; - } - - if (erase) - polls = FLASH_ERASE_SECTOR_TIMEOUT; /* Ticks */ - else - polls = FLASH_PROGRAM_POLLS; /* Loops */ - - for (i = 0; i < polls; i++) { - if (erase) - udelay (SLEEP_DELAY); - - data = FLASH0_READ (dev, addr); - - if (((data ^ expect) & 0x80) == 0) { - rv = OK; - goto done; - } - - if (data & 0x20) { - /* - * If the 0x20 bit has come on, it could actually be because - * the operation succeeded, so check the done bit again. - */ - - data = FLASH0_READ (dev, addr); - - if (((data ^ expect) & 0x80) == 0) { - rv = OK; - goto done; - } - - printf ("flashWait: Program error (dev: %d, addr: 0x%x)\n", - DEV_NO (dev), addr); - - flashReset (dev); - rv = ERROR; - goto done; - } - } - - printf ("flashWait: Timeout %s (dev: %d, addr: 0x%x)\n", - erase ? "erasing sector" : "programming byte", - DEV_NO (dev), addr); - - done: - -#if 0 - PRINTF ("flashWait: rv=%d\n", rv); -#endif - - return rv; -} - -/*********************************************************************** - * - * Public Flash Routines - * - ***********************************************************************/ - -STATUS flashLibInit (void) -{ - int i; - - PRINTF ("flashLibInit: devices=%d\n", flashDevCount); - - for (i = 0; i < flashDevCount; i++) { - flash_dev_t *dev = &flashDev[i]; - - /* - * For bank 1, probe both without and with byte swappage, - * so that this module works on both old and new Mousse boards. - */ - - flashReset (dev); - - if (flashProbe (dev) != ERROR) - dev->found = 1; - - flashReset (dev); - - if (flashProbe (dev) != ERROR) - dev->found = 1; - - dev->swap = 0; - - if (dev->found) { - PRINTF ("\n FLASH %s[%d]: iobase=0x%x - %d sectors %d KB", - flashDev[i].name, i, flashDev[i].base, - flashDev[i].sectors, - (flashDev[i].sectors * FLASH_SECTOR_SIZE) / 1024); - - } - } - - flashLibInited = 1; - - PRINTF ("flashLibInit: done\n"); - - return OK; -} - -STATUS flashEraseSector (flash_dev_t * dev, int sector) -{ - int pos, addr; - - PRINTF ("flashErasesector: dev=%d sector=%d\n", DEV_NO (dev), sector); - - if (flashCheck (dev) == ERROR) - return ERROR; - - if (sector < 0 || sector >= dev->sectors) { - printf ("flashEraseSector: Sector out of range (dev: %d, sector: %d)\n", DEV_NO (dev), sector); - return ERROR; - } - - pos = FLASH_SECTOR_POS (dev, sector); - - if (dev->bank != FLASH0_BANK) { - return ERROR; - } - - addr = pos; - - FLASH0_WRITE (dev, 0xaaa, 0xaa); - FLASH0_WRITE (dev, 0x555, 0x55); - FLASH0_WRITE (dev, 0xaaa, 0x80); - FLASH0_WRITE (dev, 0xaaa, 0xaa); - FLASH0_WRITE (dev, 0x555, 0x55); - FLASH0_WRITE (dev, addr, 0x30); - - return flashWait (dev, addr, 0xff, 1); -} - -/* - * Note: it takes about as long to flash all sectors together with Chip - * Erase as it does to flash them one at a time (about 30 seconds for 2 - * MB). Also since we want to be able to treat subsets of sectors as if - * they were complete devices, we don't use Chip Erase. - */ - -STATUS flashErase (flash_dev_t * dev) -{ - int sector; - - PRINTF ("flashErase: dev=%d sectors=%d\n", DEV_NO (dev), dev->sectors); - - if (flashCheck (dev) == ERROR) - return ERROR; - - for (sector = 0; sector < dev->sectors; sector++) { - if (flashEraseSector (dev, sector) == ERROR) - return ERROR; - } - return OK; -} - -/* - * Read and write bytes - */ - -STATUS flashRead (flash_dev_t * dev, int pos, char *buf, int len) -{ - int addr, words; - - PRINTF ("flashRead: dev=%d pos=0x%x buf=0x%x len=0x%x\n", - DEV_NO (dev), pos, (int) buf, len); - - if (flashCheck (dev) == ERROR) - return ERROR; - - if (pos < 0 || len < 0 || pos + len > FLASH_MAX_POS (dev)) { - printf ("flashRead: Position out of range " - "(dev: %d, pos: 0x%x, len: 0x%x)\n", - DEV_NO (dev), pos, len); - return ERROR; - } - - if (len == 0) - return OK; - - if (dev->bank == FLASH0_BANK) { - addr = pos; - words = len; - - PRINTF ("flashRead: memcpy(0x%x, 0x%x, 0x%x)\n", - (int) buf, (int) FLASH0_ADDR (dev, pos), len); - - memcpy (buf, FLASH0_ADDR (dev, addr), words); - - } - PRINTF ("flashRead: rv=OK\n"); - - return OK; -} - -STATUS flashWrite (flash_dev_t * dev, int pos, char *buf, int len) -{ - int addr, words; - - PRINTF ("flashWrite: dev=%d pos=0x%x buf=0x%x len=0x%x\n", - DEV_NO (dev), pos, (int) buf, len); - - if (flashCheck (dev) == ERROR) - return ERROR; - - if (pos < 0 || len < 0 || pos + len > FLASH_MAX_POS (dev)) { - printf ("flashWrite: Position out of range " - "(dev: %d, pos: 0x%x, len: 0x%x)\n", - DEV_NO (dev), pos, len); - return ERROR; - } - - if (len == 0) - return OK; - - if (dev->bank == FLASH0_BANK) { - unsigned char tmp; - - addr = pos; - words = len; - - while (words--) { - tmp = *buf; - if (~FLASH0_READ (dev, addr) & tmp) { - printf ("flashWrite: Attempt to program 0 to 1 " - "(dev: %d, addr: 0x%x, data: 0x%x)\n", - DEV_NO (dev), addr, tmp); - return ERROR; - } - FLASH0_WRITE (dev, 0xaaa, 0xaa); - FLASH0_WRITE (dev, 0x555, 0x55); - FLASH0_WRITE (dev, 0xaaa, 0xa0); - FLASH0_WRITE (dev, addr, tmp); - if (flashWait (dev, addr, tmp, 0) < 0) - return ERROR; - buf++; - addr++; - } - } - - PRINTF ("flashWrite: rv=OK\n"); - - return OK; -} - -/* - * flashWritable returns true if a range contains all F's. - */ - -STATUS flashWritable (flash_dev_t * dev, int pos, int len) -{ - int addr, words; - int rv = ERROR; - - PRINTF ("flashWritable: dev=%d pos=0x%x len=0x%x\n", - DEV_NO (dev), pos, len); - - if (flashCheck (dev) == ERROR) - goto done; - - if (pos < 0 || len < 0 || pos + len > FLASH_MAX_POS (dev)) { - printf ("flashWritable: Position out of range " - "(dev: %d, pos: 0x%x, len: 0x%x)\n", - DEV_NO (dev), pos, len); - goto done; - } - - if (len == 0) { - rv = 1; - goto done; - } - - if (dev->bank == FLASH0_BANK) { - addr = pos; - words = len; - - while (words--) { - if (FLASH0_READ (dev, addr) != 0xff) { - rv = 0; - goto done; - } - addr++; - } - } - - rv = 1; - - done: - PRINTF ("flashWrite: rv=%d\n", rv); - return rv; -} - - -/* - * NOTE: the below code cannot run from FLASH!!! - */ -/*********************************************************************** - * - * Flash Diagnostics - * - ***********************************************************************/ - -STATUS flashDiag (flash_dev_t * dev) -{ - unsigned int *buf = 0; - int i, len, sector; - int rv = ERROR; - - if (flashCheck (dev) == ERROR) - return ERROR; - - printf ("flashDiag: Testing device %d, " - "base: 0x%x, %d sectors @ %d kB = %d kB\n", - DEV_NO (dev), dev->base, - dev->sectors, - 1 << (dev->lgSectorSize - 10), - dev->sectors << (dev->lgSectorSize - 10)); - - len = 1 << dev->lgSectorSize; - - printf ("flashDiag: Erasing\n"); - - if (flashErase (dev) == ERROR) { - printf ("flashDiag: Erase failed\n"); - goto done; - } - printf ("%d bytes requested ...\n", len); - buf = malloc (len); - printf ("allocated %d bytes ...\n", len); - if (buf == 0) { - printf ("flashDiag: Out of memory\n"); - goto done; - } - - /* - * Write unique counting pattern to each sector - */ - - for (sector = 0; sector < dev->sectors; sector++) { - printf ("flashDiag: Write sector %d\n", sector); - - for (i = 0; i < len / 4; i++) - buf[i] = sector << 24 | i; - - if (flashWrite (dev, - sector << dev->lgSectorSize, - (char *) buf, len) == ERROR) { - printf ("flashDiag: Write failed (dev: %d, sector: %d)\n", - DEV_NO (dev), sector); - goto done; - } - } - - /* - * Verify - */ - - for (sector = 0; sector < dev->sectors; sector++) { - printf ("flashDiag: Verify sector %d\n", sector); - - if (flashRead (dev, - sector << dev->lgSectorSize, - (char *) buf, len) == ERROR) { - printf ("flashDiag: Read failed (dev: %d, sector: %d)\n", - DEV_NO (dev), sector); - goto done; - } - - for (i = 0; i < len / 4; i++) { - if (buf[i] != (sector << 24 | i)) { - printf ("flashDiag: Verify error " - "(dev: %d, sector: %d, offset: 0x%x)\n", - DEV_NO (dev), sector, i); - printf ("flashDiag: Expected 0x%08x, got 0x%08x\n", - sector << 24 | i, buf[i]); - - goto done; - } - } - } - - printf ("flashDiag: Erasing\n"); - - if (flashErase (dev) == ERROR) { - printf ("flashDiag: Final erase failed\n"); - goto done; - } - - rv = OK; - - done: - if (buf) - free (buf); - - if (rv == OK) - printf ("flashDiag: Device %d passed\n", DEV_NO (dev)); - else - printf ("flashDiag: Device %d failed\n", DEV_NO (dev)); - - return rv; -} - -STATUS flashDiagAll (void) -{ - int i; - int rv = OK; - - PRINTF ("flashDiagAll: devices=%d\n", flashDevCount); - - for (i = 0; i < flashDevCount; i++) { - flash_dev_t *dev = &flashDev[i]; - - if (dev->found && flashDiag (dev) == ERROR) - rv = ERROR; - } - - if (rv == OK) - printf ("flashDiagAll: Passed\n"); - else - printf ("flashDiagAll: Failed because of earlier errors\n"); - - return OK; -} - - -/*----------------------------------------------------------------------- - */ -unsigned long flash_init (void) -{ - unsigned long size = 0; - flash_dev_t *dev = NULL; - - flashLibInit (); - - /* - * Provide info for FLASH (up to 960K) of Kernel Image data. - */ - dev = FLASH_DEV_BANK0_LOW; - flash_info[FLASH_BANK_KERNEL].flash_id = - (dev->vendorID << 16) | dev->deviceID; - flash_info[FLASH_BANK_KERNEL].sector_count = dev->sectors; - flash_info[FLASH_BANK_KERNEL].size = - flash_info[FLASH_BANK_KERNEL].sector_count * FLASH_SECTOR_SIZE; - flash_info[FLASH_BANK_KERNEL].start[FIRST_SECTOR] = dev->base; - size += flash_info[FLASH_BANK_KERNEL].size; - - /* - * Provide info for 512K PLCC FLASH ROM (U-Boot) - */ - dev = FLASH_DEV_BANK0_BOOT; - flash_info[FLASH_BANK_BOOT].flash_id = - (dev->vendorID << 16) | dev->deviceID; - flash_info[FLASH_BANK_BOOT].sector_count = dev->sectors; - flash_info[FLASH_BANK_BOOT].size = - flash_info[FLASH_BANK_BOOT].sector_count * FLASH_SECTOR_SIZE; - flash_info[FLASH_BANK_BOOT].start[FIRST_SECTOR] = dev->base; - size += flash_info[FLASH_BANK_BOOT].size; - - - /* - * Provide info for 512K FLASH0 segment (U-Boot) - */ - dev = FLASH_DEV_BANK0_HIGH; - flash_info[FLASH_BANK_AUX].flash_id = - (dev->vendorID << 16) | dev->deviceID; - flash_info[FLASH_BANK_AUX].sector_count = dev->sectors; - flash_info[FLASH_BANK_AUX].size = - flash_info[FLASH_BANK_AUX].sector_count * FLASH_SECTOR_SIZE; - flash_info[FLASH_BANK_AUX].start[FIRST_SECTOR] = dev->base; - size += flash_info[FLASH_BANK_AUX].size; - - - return size; -} - -/* - * Get flash device from U-Boot flash info. - */ -flash_dev_t *getFlashDevFromInfo (flash_info_t * info) -{ - int i; - - if (!info) - return NULL; - - for (i = 0; i < flashDevCount; i++) { - flash_dev_t *dev = &flashDev[i]; - - if (dev->found && (dev->base == info->start[0])) - return dev; - } - printf ("ERROR: notice, no FLASH mapped at address 0x%x\n", - (unsigned int) info->start[0]); - return NULL; -} - -ulong flash_get_size (vu_long * addr, flash_info_t * info) -{ - int i; - - for (i = 0; i < flashDevCount; i++) { - flash_dev_t *dev = &flashDev[i]; - - if (dev->found) { - if (dev->base == (unsigned int) addr) { - info->flash_id = (dev->vendorID << 16) | dev->deviceID; - info->sector_count = dev->sectors; - info->size = info->sector_count * FLASH_SECTOR_SIZE; - return dev->sectors * FLASH_SECTOR_SIZE; - } - } - } - return 0; -} - -void flash_print_info (flash_info_t * info) -{ - int i; - unsigned int chip; - - if (info->flash_id == FLASH_UNKNOWN) { - printf ("missing or unknown FLASH type\n"); - return; - } - - switch ((info->flash_id >> 16) & 0xff) { - case 0x1: - printf ("AMD "); - break; - default: - printf ("Unknown Vendor "); - break; - } - chip = (unsigned int) info->flash_id & 0x000000ff; - - switch (chip) { - - case AMD_ID_F040B: - printf ("AM29F040B (4 Mbit)\n"); - break; - - case AMD_ID_LV160B: - case FLASH_AM160LV: - case 0x49: - printf ("AM29LV160B (16 Mbit / 2M x 8bit)\n"); - break; - - default: - printf ("Unknown Chip Type:0x%x\n", chip); - break; - } - - printf (" Size: %ld bytes in %d Sectors\n", - info->size, info->sector_count); - - printf (" Sector Start Addresses:"); - for (i = 0; i < info->sector_count; ++i) { - if ((i % 5) == 0) - printf ("\n "); - printf (" %08lX%s", - info->start[FIRST_SECTOR] + i * FLASH_SECTOR_SIZE, - info->protect[i] ? " (RO)" : " "); - } - printf ("\n"); -} - - -/* - * Erase a range of flash sectors. - */ -int flash_erase (flash_info_t * info, int s_first, int s_last) -{ - int prot, sect; - flash_dev_t *dev = NULL; - - if ((s_first < 0) || (s_first > s_last)) { - if (info->flash_id == FLASH_UNKNOWN) { - printf ("- missing\n"); - } else { - printf ("- no sectors to erase\n"); - } - return 1; - } - - prot = 0; - for (sect = s_first; sect <= s_last; sect++) { - if (info->protect[sect]) { - prot++; - } - } - - if (prot) { - printf ("- Warning: %d protected sectors will not be erased!\n", - prot); - } else { - printf ("\n"); - } - - /* Start erase on unprotected sectors */ - dev = getFlashDevFromInfo (info); - if (dev) { - printf ("Erase FLASH[%s] -%d sectors:", dev->name, dev->sectors); - for (sect = s_first; sect <= s_last; sect++) { - if (info->protect[sect] == 0) { /* not protected */ - printf ("."); - if (ERROR == flashEraseSector (dev, sect)) { - printf ("ERROR: could not erase sector %d on FLASH[%s]\n", sect, dev->name); - return 1; - } - } - } - } - printf (" done\n"); - return 0; -} - -/*----------------------------------------------------------------------- - * Write a word to Flash, returns: - * 0 - OK - * 1 - write timeout - * 2 - Flash not erased - */ -static int write_word (flash_info_t * info, ulong dest, ulong data) -{ - - flash_dev_t *dev = getFlashDevFromInfo (info); - int addr = dest - info->start[0]; - - if (!dev) - return 1; - - if (OK != flashWrite (dev, addr, (char *) &data, sizeof (ulong))) { - printf ("ERROR: could not write to addr=0x%x, data=0x%x\n", - (unsigned int) addr, (unsigned) data); - return 1; - } - - if ((addr % FLASH_SECTOR_SIZE) == 0) - printf ("."); - - - PRINTF ("write_word:0x%x, base=0x%x, addr=0x%x, data=0x%x\n", - (unsigned) info->start[0], - (unsigned) dest, - (unsigned) (dest - info->start[0]), (unsigned) data); - - return (0); -} - - -/*----------------------------------------------------------------------- - * Copy memory to flash, returns: - * 0 - OK - * 1 - write timeout - * 2 - Flash not erased - */ - -int write_buff (flash_info_t * info, uchar * src, ulong addr, ulong cnt) -{ - ulong cp, wp, data; - int i, l, rc; - flash_dev_t *dev = getFlashDevFromInfo (info); - - if (dev) { - printf ("FLASH[%s]:", dev->name); - wp = (addr & ~3); /* get lower word aligned address */ - - /* - * handle unaligned start bytes - */ - if ((l = addr - wp) != 0) { - data = 0; - for (i = 0, cp = wp; i < l; ++i, ++cp) { - data = (data << 8) | (*(uchar *) cp); - } - for (; i < 4 && cnt > 0; ++i) { - data = (data << 8) | *src++; - --cnt; - ++cp; - } - for (; cnt == 0 && i < 4; ++i, ++cp) { - data = (data << 8) | (*(uchar *) cp); - } - if ((rc = write_word (info, wp, data)) != 0) { - return (rc); - } - wp += 4; - } - - /* - * handle word aligned part - */ - while (cnt >= 4) { - data = 0; - for (i = 0; i < 4; ++i) { - data = (data << 8) | *src++; - } - if ((rc = write_word (info, wp, data)) != 0) { - return (rc); - } - wp += 4; - cnt -= 4; - } - - if (cnt == 0) { - return (0); - } - - /* - * handle unaligned tail bytes - */ - data = 0; - for (i = 0, cp = wp; i < 4 && cnt > 0; ++i, ++cp) { - data = (data << 8) | *src++; - --cnt; - } - for (; i < 4; ++i, ++cp) { - data = (data << 8) | (*(uchar *) cp); - } - - return (write_word (info, wp, data)); - } - return 1; -} - -/*----------------------------------------------------------------------- - */ diff --git a/board/mousse/flash.h b/board/mousse/flash.h deleted file mode 100644 index b7e4619c01c..00000000000 --- a/board/mousse/flash.h +++ /dev/null @@ -1,78 +0,0 @@ -#ifndef FLASH_LIB_H -#define FLASH_LIB_H - -#include - -/* PIO operations max */ -#define FLASH_PROGRAM_POLLS 100000 - -/* 10 Seconds default */ -#define FLASH_ERASE_SECTOR_TIMEOUT (10*1000 /*SEC*/ ) - -/* Flash device info structure */ -typedef struct flash_dev_s { - char name[24]; /* Bank Name */ - int bank; /* Bank 0 or 1 */ - unsigned int base; /* Base address */ - int sectors; /* Sector count */ - int lgSectorSize; /* Log2(usable bytes/sector) */ - int vendorID; /* Expected vendor ID */ - int deviceID; /* Expected device ID */ - int found; /* Set if found by flashLibInit */ - int swap; /* Set for bank 1 if byte swap req'd */ -} flash_dev_t; - -#define FLASH_MAX_POS(dev) \ - ((dev)->sectors << (dev)->lgSectorSize) - -#define FLASH_SECTOR_POS(dev, sector) \ - ((sector) << (dev)->lgSectorSize) - -/* AMD 29F040 */ -#define FLASH0_BANK 0 -#define FLASH0_VENDOR_ID 0x01 -#define FLASH0_DEVICE_ID 0x49 - -/* AMD29LV160DB */ -#define FLASH1_BANK 1 -#define FLASH1_VENDOR_ID 0x0001 -#define FLASH1_DEVICE_ID 0x2249 - -extern flash_dev_t flashDev[]; -extern int flashDevCount; - -/* - * Device pointers - * - * These must be kept in sync with the table in flashLib.c. - */ -#define FLASH_DEV_BANK0_SA0 (&flashDev[0]) -#define FLASH_DEV_BANK0_SA1 (&flashDev[1]) -#define FLASH_DEV_BANK0_SA2 (&flashDev[2]) -#define FLASH_DEV_BANK0_LOW (&flashDev[3]) /* 960K */ -#define FLASH_DEV_BANK0_BOOT (&flashDev[4]) /* PLCC */ -#define FLASH_DEV_BANK0_HIGH (&flashDev[5]) /* 512K PLCC shadow */ - -unsigned long flash_init(void); -int flashEraseSector(flash_dev_t *dev, int sector); -int flashErase(flash_dev_t *dev); -int flashRead(flash_dev_t *dev, int pos, char *buf, int len); -int flashWrite(flash_dev_t *dev, int pos, char *buf, int len); -int flashWritable(flash_dev_t *dev, int pos, int len); -int flashDiag(flash_dev_t *dev); -int flashDiagAll(void); - -ulong flash_get_size (vu_long *addr, flash_info_t *info); -void flash_print_info (flash_info_t *info); -int flash_erase (flash_info_t *info, int s_first, int s_last); -int write_buff (flash_info_t *info, uchar *src, ulong addr, ulong cnt); - -/* - * Flash info indices. - */ -#define FLASH_BANK_KERNEL 0 -#define FLASH_BANK_BOOT 1 -#define FLASH_BANK_AUX 2 -#define FIRST_SECTOR 0 - -#endif /* !FLASH_LIB_H */ diff --git a/board/mousse/m48t59y.c b/board/mousse/m48t59y.c deleted file mode 100644 index 9a70dbeab16..00000000000 --- a/board/mousse/m48t59y.c +++ /dev/null @@ -1,308 +0,0 @@ -/* - * SGS M48-T59Y TOD/NVRAM Driver - * - * (C) Copyright 2000 - * Wolfgang Denk, DENX Software Engineering, wd@denx.de. - * - * (C) Copyright 1999, by Curt McDowell, 08-06-99, Broadcom Corp. - * - * (C) Copyright 2001, James Dougherty, 07/18/01, Broadcom Corp. - * - * SPDX-License-Identifier: GPL-2.0+ - */ - -/* - * SGS M48-T59Y TOD/NVRAM Driver - * - * The SGS M48 an 8K NVRAM starting at offset M48_BASE_ADDR and - * continuing for 8176 bytes. After that starts the Time-Of-Day (TOD) - * registers which are used to set/get the internal date/time functions. - * - * This module implements Y2K compliance by taking full year numbers - * and translating back and forth from the TOD 2-digit year. - * - * NOTE: for proper interaction with an operating system, the TOD should - * be used to store Universal Coordinated Time (GMT) and timezone - * conversions should be used. - * - * Here is a diagram of the memory layout: - * - * +---------------------------------------------+ 0xffe0a000 - * | Non-volatile memory | . - * | | . - * | (8176 bytes of Non-volatile memory) | . - * | | . - * +---------------------------------------------+ 0xffe0bff0 - * | Flags | - * +---------------------------------------------+ 0xffe0bff1 - * | Unused | - * +---------------------------------------------+ 0xffe0bff2 - * | Alarm Seconds | - * +---------------------------------------------+ 0xffe0bff3 - * | Alarm Minutes | - * +---------------------------------------------+ 0xffe0bff4 - * | Alarm Date | - * +---------------------------------------------+ 0xffe0bff5 - * | Interrupts | - * +---------------------------------------------+ 0xffe0bff6 - * | WatchDog | - * +---------------------------------------------+ 0xffe0bff7 - * | Calibration | - * +---------------------------------------------+ 0xffe0bff8 - * | Seconds | - * +---------------------------------------------+ 0xffe0bff9 - * | Minutes | - * +---------------------------------------------+ 0xffe0bffa - * | Hours | - * +---------------------------------------------+ 0xffe0bffb - * | Day | - * +---------------------------------------------+ 0xffe0bffc - * | Date | - * +---------------------------------------------+ 0xffe0bffd - * | Month | - * +---------------------------------------------+ 0xffe0bffe - * | Year (2 digits only) | - * +---------------------------------------------+ 0xffe0bfff - */ -#include -#include -#include "mousse.h" - -/* - * Imported from mousse.h: - * - * TOD_REG_BASE Base of m48t59y TOD registers - * SYS_TOD_UNPROTECT() Disable NVRAM write protect - * SYS_TOD_PROTECT() Re-enable NVRAM write protect - */ - -#define YEAR 0xf -#define MONTH 0xe -#define DAY 0xd -#define DAY_OF_WEEK 0xc -#define HOUR 0xb -#define MINUTE 0xa -#define SECOND 0x9 -#define CONTROL 0x8 -#define WATCH 0x7 -#define INTCTL 0x6 -#define WD_DATE 0x5 -#define WD_HOUR 0x4 -#define WD_MIN 0x3 -#define WD_SEC 0x2 -#define _UNUSED 0x1 -#define FLAGS 0x0 - -#define M48_ADDR ((volatile unsigned char *) TOD_REG_BASE) - -int m48_tod_init(void) -{ - SYS_TOD_UNPROTECT(); - - M48_ADDR[CONTROL] = 0; - M48_ADDR[WATCH] = 0; - M48_ADDR[INTCTL] = 0; - - /* - * If the oscillator is currently stopped (as on a new part shipped - * from the factory), start it running. - * - * Here is an example of the TOD bytes on a brand new M48T59Y part: - * 00 00 00 00 00 00 00 00 00 88 8c c3 bf c8 f5 01 - */ - - if (M48_ADDR[SECOND] & 0x80) - M48_ADDR[SECOND] = 0; - - /* Is battery low */ - if ( M48_ADDR[FLAGS] & 0x10) { - printf("NOTICE: Battery low on Real-Time Clock (replace SNAPHAT).\n"); - } - - SYS_TOD_PROTECT(); - - return 0; -} - -/* - * m48_tod_set - */ - -static int to_bcd(int value) -{ - return value / 10 * 16 + value % 10; -} - -static int from_bcd(int value) -{ - return value / 16 * 10 + value % 16; -} - -static int day_of_week(int y, int m, int d) /* 0-6 ==> Sun-Sat */ -{ - static int t[] = {0, 3, 2, 5, 0, 3, 5, 1, 4, 6, 2, 4}; - y -= m < 3; - return (y + y/4 - y/100 + y/400 + t[m-1] + d) % 7; -} - -/* - * Note: the TOD should store the current GMT - */ - -int m48_tod_set(int year, /* 1980-2079 */ - int month, /* 01-12 */ - int day, /* 01-31 */ - int hour, /* 00-23 */ - int minute, /* 00-59 */ - int second) /* 00-59 */ - -{ - SYS_TOD_UNPROTECT(); - - M48_ADDR[CONTROL] |= 0x80; /* Set WRITE bit */ - - M48_ADDR[YEAR] = to_bcd(year % 100); - M48_ADDR[MONTH] = to_bcd(month); - M48_ADDR[DAY] = to_bcd(day); - M48_ADDR[DAY_OF_WEEK] = day_of_week(year, month, day) + 1; - M48_ADDR[HOUR] = to_bcd(hour); - M48_ADDR[MINUTE] = to_bcd(minute); - M48_ADDR[SECOND] = to_bcd(second); - - M48_ADDR[CONTROL] &= ~0x80; /* Clear WRITE bit */ - - SYS_TOD_PROTECT(); - - return 0; -} - -/* - * Note: the TOD should store the current GMT - */ - -int m48_tod_get(int *year, /* 1980-2079 */ - int *month, /* 01-12 */ - int *day, /* 01-31 */ - int *hour, /* 00-23 */ - int *minute, /* 00-59 */ - int *second) /* 00-59 */ -{ - int y; - - SYS_TOD_UNPROTECT(); - - M48_ADDR[CONTROL] |= 0x40; /* Set READ bit */ - - y = from_bcd(M48_ADDR[YEAR]); - *year = y < 80 ? 2000 + y : 1900 + y; - *month = from_bcd(M48_ADDR[MONTH]); - *day = from_bcd(M48_ADDR[DAY]); - /* day_of_week = M48_ADDR[DAY_OF_WEEK] & 0xf; */ - *hour = from_bcd(M48_ADDR[HOUR]); - *minute = from_bcd(M48_ADDR[MINUTE]); - *second = from_bcd(M48_ADDR[SECOND] & 0x7f); - - M48_ADDR[CONTROL] &= ~0x40; /* Clear READ bit */ - - SYS_TOD_PROTECT(); - - return 0; -} - -int m48_tod_get_second(void) -{ - return from_bcd(M48_ADDR[SECOND] & 0x7f); -} - -/* - * Watchdog function - * - * If usec is 0, the watchdog timer is disarmed. - * - * If usec is non-zero, the watchdog timer is armed (or re-armed) for - * approximately usec microseconds (if the exact requested usec is - * not supported by the chip, the next higher available value is used). - * - * Minimum watchdog timeout = 62500 usec - * Maximum watchdog timeout = 124 sec (124000000 usec) - */ - -void m48_watchdog_arm(int usec) -{ - int mpy, res; - - SYS_TOD_UNPROTECT(); - - if (usec == 0) { - res = 0; - mpy = 0; - } else if (usec < 2000000) { /* Resolution: 1/16s if below 2s */ - res = 0; - mpy = (usec + 62499) / 62500; - } else if (usec < 8000000) { /* Resolution: 1/4s if below 8s */ - res = 1; - mpy = (usec + 249999) / 250000; - } else if (usec < 32000000) { /* Resolution: 1s if below 32s */ - res = 2; - mpy = (usec + 999999) / 1000000; - } else { /* Resolution: 4s up to 124s */ - res = 3; - mpy = (usec + 3999999) / 4000000; - if (mpy > 31) - mpy = 31; - } - - M48_ADDR[WATCH] = (0x80 | /* Steer to RST signal (IRQ = N/C) */ - mpy << 2 | - res); - - SYS_TOD_PROTECT(); -} - -/* - * U-Boot RTC support. - */ -int -rtc_get( struct rtc_time *tmp ) -{ - m48_tod_get(&tmp->tm_year, - &tmp->tm_mon, - &tmp->tm_mday, - &tmp->tm_hour, - &tmp->tm_min, - &tmp->tm_sec); - tmp->tm_yday = 0; - tmp->tm_isdst= 0; - -#ifdef RTC_DEBUG - printf( "Get DATE: %4d-%02d-%02d (wday=%d) TIME: %2d:%02d:%02d\n", - tmp->tm_year, tmp->tm_mon, tmp->tm_mday, tmp->tm_wday, - tmp->tm_hour, tmp->tm_min, tmp->tm_sec ); -#endif - - return 0; -} - -int rtc_set( struct rtc_time *tmp ) -{ - m48_tod_set(tmp->tm_year, /* 1980-2079 */ - tmp->tm_mon, /* 01-12 */ - tmp->tm_mday, /* 01-31 */ - tmp->tm_hour, /* 00-23 */ - tmp->tm_min, /* 00-59 */ - tmp->tm_sec); /* 00-59 */ - -#ifdef RTC_DEBUG - printf( "Set DATE: %4d-%02d-%02d (wday=%d) TIME: %2d:%02d:%02d\n", - tmp->tm_year, tmp->tm_mon, tmp->tm_mday, tmp->tm_wday, - tmp->tm_hour, tmp->tm_min, tmp->tm_sec); -#endif - - return 0; -} - -void -rtc_reset (void) -{ - m48_tod_init(); -} diff --git a/board/mousse/m48t59y.h b/board/mousse/m48t59y.h deleted file mode 100644 index 2c7c092d141..00000000000 --- a/board/mousse/m48t59y.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * SGS M48-T59Y TOD/NVRAM Driver - * - * (C) Copyright 2000 - * Wolfgang Denk, DENX Software Engineering, wd@denx.de. - * - * (C) Copyright 1999, by Curt McDowell, 08-06-99, Broadcom Corp. - * - * (C) Copyright 2001, James Dougherty, 07/18/01, Broadcom Corp. - * - * SPDX-License-Identifier: GPL-2.0+ - */ - -#ifndef __M48_T59_Y_H -#define __M48_T59_Y_H - -/* - * M48 T59Y -Timekeeping Battery backed SRAM. - */ - -int m48_tod_init(void); - -int m48_tod_set(int year, - int month, - int day, - int hour, - int minute, - int second); - -int m48_tod_get(int *year, - int *month, - int *day, - int *hour, - int *minute, - int *second); - -int m48_tod_get_second(void); - -void m48_watchdog_arm(int usec); - -#endif /*!__M48_T59_Y_H */ diff --git a/board/mousse/mousse.c b/board/mousse/mousse.c deleted file mode 100644 index e1724e657df..00000000000 --- a/board/mousse/mousse.c +++ /dev/null @@ -1,77 +0,0 @@ -/* - * MOUSSE Board Support - * - * (C) Copyright 2000 - * Wolfgang Denk, DENX Software Engineering, wd@denx.de. - * - * (C) Copyright 2001 - * James Dougherty, jfd@cs.stanford.edu - * - * SPDX-License-Identifier: GPL-2.0+ - */ - -#include -#include -#include -#include -#include - -#include "mousse.h" -#include "m48t59y.h" -#include - - -int checkboard (void) -{ - ulong busfreq = get_bus_freq (0); - char buf[32]; - - puts ("Board: MOUSSE MPC8240/KAHLUA - CHRP (MAP B)\n"); - printf ("Built: %s at %s\n", U_BOOT_DATE, U_BOOT_TIME); - printf ("MPLD: Revision %d\n", SYS_REVID_GET ()); - printf ("Local Bus: %s MHz\n", strmhz (buf, busfreq)); - - return 0; -} - -int checkflash (void) -{ - printf ("checkflash\n"); - flash_init (); - return 0; -} - -phys_size_t initdram (int board_type) -{ - return CONFIG_SYS_RAM_SIZE; -} - - -void get_tod (void) -{ - int year, month, day, hour, minute, second; - - m48_tod_get (&year, &month, &day, &hour, &minute, &second); - - printf (" Current date/time: %d/%d/%d %d:%d:%d \n", - month, day, year, hour, minute, second); - -} - -/* - * EPIC, PCI, and I/O devices. - * Initialize Mousse Platform, probe for PCI devices, - * Query configuration parameters if not set. - */ -int misc_init_f (void) -{ - m48_tod_init (); /* Init SGS M48T59Y TOD/NVRAM */ - printf ("RTC: M48T589 TOD/NVRAM (%d) bytes\n", TOD_NVRAM_SIZE); - get_tod (); - return 0; -} - -int board_eth_init(bd_t *bis) -{ - return pci_eth_init(bis); -} diff --git a/board/mousse/mousse.h b/board/mousse/mousse.h deleted file mode 100644 index ce8a0541756..00000000000 --- a/board/mousse/mousse.h +++ /dev/null @@ -1,243 +0,0 @@ -/* - * MOUSSE/MPC8240 Board definitions. - * For more info, see http://www.vooha.com/ - * - * (C) Copyright 2000 - * Wolfgang Denk, DENX Software Engineering, wd@denx.de. - * - * (C) Copyright 2001 - * James Dougherty (jfd@cs.stanford.edu) - * - * SPDX-License-Identifier: GPL-2.0+ - */ - -#ifndef __MOUSSE_H -#define __MOUSSE_H - -/* System addresses */ - -#define PCI_SPECIAL_BASE 0xfe000000 -#define PCI_SPECIAL_SIZE 0x01000000 - -/* PORTX Device Addresses for Mousse */ - -#define PORTX_DEV_BASE 0xff000000 -#define PORTX_DEV_SIZE 0x01000000 - -#define ENET_DEV_BASE 0x80000000 - -#define PLD_REG_BASE (PORTX_DEV_BASE | 0xe09000) -#define PLD_REG(off) (*(volatile unsigned char *) \ - (PLD_REG_BASE + (off))) - -#define PLD_REVID_B1 0x7f -#define PLD_REVID_B2 0x01 - -/* MPLD */ -#define SYS_HARD_RESET() { for (;;) PLD_REG(0) = 0; } /* clr 0x80 bit */ -#define SYS_REVID_GET() ((int) PLD_REG(0) & 0x7f) -#define SYS_LED_OFF() (PLD_REG(1) |= 0x80) -#define SYS_LED_ON() (PLD_REG(1) &= ~0x80) -#define SYS_WATCHDOG_IRQ3() (PLD_REG(2) |= 0x80) -#define SYS_WATCHDOG_RESET() (PLD_REG(2) &= ~0x80) -#define SYS_TOD_PROTECT() (PLD_REG(3) |= 0x80) -#define SYS_TOD_UNPROTECT() (PLD_REG(3) &= ~0x80) - -/* SGS M48T59Y */ -#define TOD_BASE (PORTX_DEV_BASE | 0xe0a000) -#define TOD_REG_BASE (TOD_BASE | 0x1ff0) -#define TOD_NVRAM_BASE TOD_BASE -#define TOD_NVRAM_SIZE 0x1ff0 -#define TOD_NVRAM_LIMIT (TOD_NVRAM_BASE + TOD_NVRAM_SIZE) - -/* NS16552 SIO */ -#define SERIAL_BASE(_x) (PORTX_DEV_BASE | 0xe08000 | ((_x) ? 0 : 0x80)) -#define N_SIO_CHANNELS 2 -#define N_COM_PORTS N_SIO_CHANNELS - -/* - * On-board Dec21143 PCI Ethernet - * Note: The PCI MBAR chosen here was used from MPC8240UM which states - * that PCI memory is at: 0x80000 - 0xFDFFFFFF, if AMBOR[CPU_FD_ALIAS] - * is set, then PCI memory maps 1-1 with this address range in the - * correct byte order. - */ -#define PCI_ENET_IOADDR 0x80000000 -#define PCI_ENET_MEMADDR 0x80000000 - -/* - * Flash Memory Layout - * - * 2 MB Flash Bank 0 runs in 8-bit mode. In Flash Bank 0, the 32 kB - * sector SA3 is obscured by the 32 kB serial/TOD access space, and - * the 64 kB sectors SA19-SA26 are obscured by the 512 kB PLCC - * containing the fixed boot ROM. (If the 512 kB PLCC is - * deconfigured by jumper, this window to Flash Bank 0 becomes - * visible, but it still contains the fixed boot code and should be - * considered read-only). Flash Bank 0 sectors SA0 (16 kB), SA1 (8 - * kB), and SA2 (8 kB) are currently unused. - * - * 2 MB Flash Bank 1 runs in 16-bit mode. Flash Bank 1 is fully - * usable, but it's a 16-bit wide device on a 64-bit bus. Therefore - * 16-bit words only exist at addresses that are multiples of 8. All - * PROM data and control addresses must be multiplied by 8. - * - * See flashMap.c for description of flash filesystem layout. - */ - -/* - * FLASH memory address space: 8-bit wide FLASH memory spaces. - */ -#define FLASH0_SEG0_START 0xffe00000 /* Baby 32Kb segment */ -#define FLASH0_SEG0_END 0xffe07fff /* 16 kB + 8 kB + 8 kB */ -#define FLASH0_SEG0_SIZE 0x00008000 /* (sectors SA0-SA2) */ - -#define FLASH0_SEG1_START 0xffe10000 /* 1MB - 64Kb FLASH0 seg */ -#define FLASH0_SEG1_END 0xffefffff /* 960 kB */ -#define FLASH0_SEG1_SIZE 0x000f0000 - -#define FLASH0_SEG2_START 0xfff00000 /* Boot Loader stored here */ -#define FLASH0_SEG2_END 0xfff7ffff /* 512 kB FLASH0/PLCC seg */ -#define FLASH0_SEG2_SIZE 0x00080000 - -#define FLASH0_SEG3_START 0xfff80000 /* 512 kB FLASH0 seg */ -#define FLASH0_SEG3_END 0xffffffff -#define FLASH0_SEG3_SIZE 0x00080000 - -/* Where Kahlua starts */ -#define FLASH_RESET_VECT 0xfff00100 - -/* - * CHRP / PREP (MAP A/B) definitions. - */ - -#define PREP_REG_ADDR 0x80000cf8 /* MPC107 Config, Map A */ -#define PREP_REG_DATA 0x80000cfc /* MPC107 Config, Map A */ -/* MPC107 (MPC8240 internal EUMBBAR mapped) */ -#define CHRP_REG_ADDR 0xfec00000 /* MPC106 Config, Map B */ -#define CHRP_REG_DATA 0xfee00000 /* MPC106 Config, Map B */ - -/* - * Mousse PCI IDSEL Assignments (Device Number) - */ -#define MOUSSE_IDSEL_ENET 13 /* On-board 21143 Ethernet */ -#define MOUSSE_IDSEL_LPCI 14 /* On-board PCI slot */ -#define MOUSSE_IDSEL_82371 15 /* That other thing */ -#define MOUSSE_IDSEL_CPCI2 31 /* CPCI slot 2 */ -#define MOUSSE_IDSEL_CPCI3 30 /* CPCI slot 3 */ -#define MOUSSE_IDSEL_CPCI4 29 /* CPCI slot 4 */ -#define MOUSSE_IDSEL_CPCI5 28 /* CPCI slot 5 */ -#define MOUSSE_IDSEL_CPCI6 27 /* CPCI slot 6 */ - -/* - * Mousse Interrupt Mapping: - * - * IRQ1 Enet (intA|intB|intC|intD) - * IRQ2 CPCI intA (See below) - * IRQ3 Local PCI slot intA|intB|intC|intD - * IRQ4 COM1 Serial port (Actually higher addressed port on duart) - * - * PCI Interrupt Mapping in CPCI chassis: - * - * | CPCI Slot - * | 1 (CPU) 2 3 4 5 6 - * -----------+--------+-------+-------+-------+-------+-------+ - * intA | X X X - * intB | X X X - * intC | X X X - * intD | X X X - */ - - -#define EPIC_VECTOR_EXT0 0 -#define EPIC_VECTOR_EXT1 1 -#define EPIC_VECTOR_EXT2 2 -#define EPIC_VECTOR_EXT3 3 -#define EPIC_VECTOR_EXT4 4 -#define EPIC_VECTOR_TM0 16 -#define EPIC_VECTOR_TM1 17 -#define EPIC_VECTOR_TM2 18 -#define EPIC_VECTOR_TM3 19 -#define EPIC_VECTOR_I2C 20 -#define EPIC_VECTOR_DMA0 21 -#define EPIC_VECTOR_DMA1 22 -#define EPIC_VECTOR_I2O 23 - - -#define INT_VEC_IRQ0 0 -#define INT_NUM_IRQ0 INT_VEC_IRQ0 -#define MOUSSE_IRQ_ENET EPIC_VECTOR_EXT1 /* Hardwired */ -#define MOUSSE_IRQ_CPCI EPIC_VECTOR_EXT2 /* Hardwired */ -#define MOUSSE_IRQ_LPCI EPIC_VECTOR_EXT3 /* Hardwired */ -#define MOUSSE_IRQ_DUART EPIC_VECTOR_EXT4 /* Hardwired */ - -/* Onboard DEC 21143 Ethernet */ -#define PCI_ENET_MEMADDR 0x80000000 -#define PCI_ENET_IOADDR 0x80000000 - -/* Some other PCI device */ -#define PCI_SLOT_MEMADDR 0x81000000 -#define PCI_SLOT_IOADDR 0x81000000 - -/* Promise ATA66 PCI Device (ATA controller) */ -#define PROMISE_MBAR0 0xa0000000 -#define PROMISE_MBAR1 (PROMISE_MBAR0 + 0x1000) -#define PROMISE_MBAR2 (PROMISE_MBAR0 + 0x2000) -#define PROMISE_MBAR3 (PROMISE_MBAR0 + 0x3000) -#define PROMISE_MBAR4 (PROMISE_MBAR0 + 0x4000) -#define PROMISE_MBAR5 (PROMISE_MBAR0 + 0x5000) - -/* ATA/66 Controller offsets */ -#define CONFIG_SYS_ATA_BASE_ADDR PROMISE_MBAR0 -#define CONFIG_SYS_IDE_MAXBUS 2 /* ide0/ide1 */ -#define CONFIG_SYS_IDE_MAXDEVICE 2 /* 2 drives per controller */ -#define CONFIG_SYS_ATA_IDE0_OFFSET 0 -#define CONFIG_SYS_ATA_IDE1_OFFSET 0x3000 -/* - * Definitions for accessing IDE controller registers - */ -#define CONFIG_SYS_ATA_DATA_OFFSET 0 -#define CONFIG_SYS_ATA_REG_OFFSET 0 -#define CONFIG_SYS_ATA_ALT_OFFSET (0x1000) - -/* - * The constants ROM_TEXT_ADRS, ROM_SIZE, RAM_HIGH_ADRS, and RAM_LOW_ADRS - * are defined in config.h and Makefile. - * All definitions for these constants must be identical. - */ -#define ROM_BASE_ADRS 0xfff00000 /* base address of ROM */ -#define ROM_TEXT_ADRS (ROM_BASE_ADRS+0x0100) /* with PC & SP */ -#define ROM_WARM_ADRS (ROM_TEXT_ADRS+0x0004) /* warm reboot entry */ -#define ROM_SIZE 0x00080000 /* 512KB ROM space */ -#define RAM_LOW_ADRS 0x00010000 /* RAM address for vxWorks */ -#define RAM_HIGH_ADRS 0x00c00000 /* RAM address for bootrom */ - -/* - * NVRAM configuration - * NVRAM is implemented via the SGS Thomson M48T59Y - * 64Kbit (8Kbx8) Timekeeper SRAM. - * This 8KB NVRAM also has a TOD. See m48t59y.{h,c} for more information. - */ - -#define NV_RAM_ADRS TOD_NVRAM_BASE -#define NV_RAM_INTRVL 1 -#define NV_RAM_WR_ENBL SYS_TOD_UNPROTECT() -#define NV_RAM_WR_DSBL SYS_TOD_PROTECT() - -#define NV_OFF_BOOT0 0x0000 /* Boot string 0 (256b) */ -#define NV_OFF_BOOT1 0x0100 /* Boot string 1 (256b) */ -#define NV_OFF_BOOT2 0x0200 /* Boot string 2 (256b)*/ -#define NV_OFF_MACADDR 0x0400 /* 21143 MAC address (6b) */ -#define NV_OFF_ACTIVEBOOT 0x0406 /* Active boot string, 0 to 2 (1b) */ -#define NV_OFF_UNUSED1 0x0407 /* Unused (1b) */ -#define NV_OFF_BINDFIX 0x0408 /* See sysLib.c:sysBindFix() (1b) */ -#define NV_OFF_UNUSED2 0x0409 /* Unused (7b) */ -#define NV_OFF_TIMEZONE 0x0410 /* TIMEZONE env var (64b) */ -#define NV_OFF_VXWORKS_END 0x07FF /* 2047 VxWorks Total */ -#define NV_OFF_U_BOOT 0x0800 /* 2048 U-Boot boot-loader */ -#define NV_OFF_U_BOOT_ADDR (TOD_BASE + NV_OFF_U_BOOT) /* sysaddr*/ -#define NV_U_BOOT_ENV_SIZE 2048 /* 2K - U-Boot Total */ -#define NV_OFF__next_free (NV_U_BOOT_ENVSIZE +1) -#define NV_RAM_SIZE 8176 /* NVRAM End */ - -#endif /* __MOUSSE_H */ diff --git a/board/mousse/pci.c b/board/mousse/pci.c deleted file mode 100644 index a64144b1302..00000000000 --- a/board/mousse/pci.c +++ /dev/null @@ -1,267 +0,0 @@ -/* - * - * (C) Copyright 2000 - * Wolfgang Denk, DENX Software Engineering, wd@denx.de. - * - * (C) Copyright 2001 - * James Dougherty (jfd@cs.stanford.edu) - * - * SPDX-License-Identifier: GPL-2.0+ - */ - -/* - * PCI Configuration space access support for MPC824x/MPC107 PCI Bridge - */ -#include -#include -#include - -#include "mousse.h" - -/* - * Promise ATA/66 support. - */ -#define XFER_PIO_4 0x0C /* 0000|1100 */ -#define XFER_PIO_3 0x0B /* 0000|1011 */ -#define XFER_PIO_2 0x0A /* 0000|1010 */ -#define XFER_PIO_1 0x09 /* 0000|1001 */ -#define XFER_PIO_0 0x08 /* 0000|1000 */ -#define XFER_PIO_SLOW 0x00 /* 0000|0000 */ - -/* Promise Regs */ -#define REG_A 0x01 -#define REG_B 0x02 -#define REG_C 0x04 -#define REG_D 0x08 - -void -pdc202xx_decode_registers (unsigned char registers, unsigned char value) -{ - unsigned char bit = 0, bit1 = 0, bit2 = 0; - switch(registers) { - case REG_A: - bit2 = 0; - printf(" A Register "); - if (value & 0x80) printf("SYNC_IN "); - if (value & 0x40) printf("ERRDY_EN "); - if (value & 0x20) printf("IORDY_EN "); - if (value & 0x10) printf("PREFETCH_EN "); - if (value & 0x08) { printf("PA3 ");bit2 |= 0x08; } - if (value & 0x04) { printf("PA2 ");bit2 |= 0x04; } - if (value & 0x02) { printf("PA1 ");bit2 |= 0x02; } - if (value & 0x01) { printf("PA0 ");bit2 |= 0x01; } - printf("PIO(A) = %d ", bit2); - break; - case REG_B: - bit1 = 0;bit2 = 0; - printf(" B Register "); - if (value & 0x80) { printf("MB2 ");bit1 |= 0x80; } - if (value & 0x40) { printf("MB1 ");bit1 |= 0x40; } - if (value & 0x20) { printf("MB0 ");bit1 |= 0x20; } - printf("DMA(B) = %d ", bit1 >> 5); - if (value & 0x10) printf("PIO_FORCED/PB4 "); - if (value & 0x08) { printf("PB3 ");bit2 |= 0x08; } - if (value & 0x04) { printf("PB2 ");bit2 |= 0x04; } - if (value & 0x02) { printf("PB1 ");bit2 |= 0x02; } - if (value & 0x01) { printf("PB0 ");bit2 |= 0x01; } - printf("PIO(B) = %d ", bit2); - break; - case REG_C: - bit2 = 0; - printf(" C Register "); - if (value & 0x80) printf("DMARQp "); - if (value & 0x40) printf("IORDYp "); - if (value & 0x20) printf("DMAR_EN "); - if (value & 0x10) printf("DMAW_EN "); - - if (value & 0x08) { printf("MC3 ");bit2 |= 0x08; } - if (value & 0x04) { printf("MC2 ");bit2 |= 0x04; } - if (value & 0x02) { printf("MC1 ");bit2 |= 0x02; } - if (value & 0x01) { printf("MC0 ");bit2 |= 0x01; } - printf("DMA(C) = %d ", bit2); - break; - case REG_D: - printf(" D Register "); - break; - default: - return; - } - printf("\n %s ", (registers & REG_D) ? "DP" : - (registers & REG_C) ? "CP" : - (registers & REG_B) ? "BP" : - (registers & REG_A) ? "AP" : "ERROR"); - for (bit=128;bit>0;bit/=2) - printf("%s", (value & bit) ? "1" : "0"); - printf("\n"); -} - -/* - * Promise ATA/66 Support: configure Promise ATA66 card in specified mode. - */ -int -pdc202xx_tune_chipset (pci_dev_t dev, int drive, unsigned char speed) -{ - unsigned short drive_conf; - int err = 0; - unsigned char drive_pci, AP, BP, CP, DP; - unsigned char TA = 0, TB = 0; - - switch (drive) { - case 0: drive_pci = 0x60; break; - case 1: drive_pci = 0x64; break; - case 2: drive_pci = 0x68; break; - case 3: drive_pci = 0x6c; break; - default: return -1; - } - - pci_read_config_word(dev, drive_pci, &drive_conf); - pci_read_config_byte(dev, (drive_pci), &AP); - pci_read_config_byte(dev, (drive_pci)|0x01, &BP); - pci_read_config_byte(dev, (drive_pci)|0x02, &CP); - pci_read_config_byte(dev, (drive_pci)|0x03, &DP); - - if ((AP & 0x0F) || (BP & 0x07)) { - /* clear PIO modes of lower 8421 bits of A Register */ - pci_write_config_byte(dev, (drive_pci), AP & ~0x0F); - pci_read_config_byte(dev, (drive_pci), &AP); - - /* clear PIO modes of lower 421 bits of B Register */ - pci_write_config_byte(dev, (drive_pci)|0x01, BP & ~0x07); - pci_read_config_byte(dev, (drive_pci)|0x01, &BP); - - pci_read_config_byte(dev, (drive_pci), &AP); - pci_read_config_byte(dev, (drive_pci)|0x01, &BP); - } - - pci_read_config_byte(dev, (drive_pci), &AP); - pci_read_config_byte(dev, (drive_pci)|0x01, &BP); - pci_read_config_byte(dev, (drive_pci)|0x02, &CP); - - switch(speed) { - case XFER_PIO_4: TA = 0x01; TB = 0x04; break; - case XFER_PIO_3: TA = 0x02; TB = 0x06; break; - case XFER_PIO_2: TA = 0x03; TB = 0x08; break; - case XFER_PIO_1: TA = 0x05; TB = 0x0C; break; - case XFER_PIO_0: - default: TA = 0x09; TB = 0x13; break; - } - - pci_write_config_byte(dev, (drive_pci), AP|TA); - pci_write_config_byte(dev, (drive_pci)|0x01, BP|TB); - - pci_read_config_byte(dev, (drive_pci), &AP); - pci_read_config_byte(dev, (drive_pci)|0x01, &BP); - pci_read_config_byte(dev, (drive_pci)|0x02, &CP); - pci_read_config_byte(dev, (drive_pci)|0x03, &DP); - - -#ifdef PDC202XX_DEBUG - pdc202xx_decode_registers(REG_A, AP); - pdc202xx_decode_registers(REG_B, BP); - pdc202xx_decode_registers(REG_C, CP); - pdc202xx_decode_registers(REG_D, DP); -#endif - return err; -} -/* - * Show/Init PCI devices on the specified bus number. - */ - -void pci_mousse_fixup_irq(struct pci_controller *hose, pci_dev_t dev) -{ - unsigned int line; - - switch(PCI_DEV(dev)) { - case 0x0d: - line = 0x00000101; - break; - - case 0x0e: - default: - line = 0x00000303; - break; - } - - pci_write_config_dword(dev, PCI_INTERRUPT_LINE, line); -} - -void pci_mousse_setup_pdc202xx(struct pci_controller *hose, pci_dev_t dev, - struct pci_config_table *_) -{ - unsigned short vendorId; - unsigned int mbar0, cmd; - int bar, a; - - pci_read_config_word(dev, PCI_VENDOR_ID, &vendorId); - - if(vendorId == PCI_VENDOR_ID_PROMISE || vendorId == PCI_VENDOR_ID_CMD){ - /* PDC 202xx card is handled differently, it is a bootable - * device and needs all 5 MBAR's configured - */ - for(bar = 0; bar < 5; bar++){ - pci_read_config_dword(dev, PCI_BASE_ADDRESS_0+bar*4, &mbar0); - pci_write_config_dword(dev, PCI_BASE_ADDRESS_0+bar*4, ~0); - pci_read_config_dword(dev, PCI_BASE_ADDRESS_0+bar*4, &mbar0); -#ifdef DEBUG - printf(" ATA_bar[%d] = %dbytes\n", bar, - ~(mbar0 & PCI_BASE_ADDRESS_MEM_MASK) + 1); -#endif - } - - /* Program all BAR's */ - pci_write_config_dword(dev, PCI_BASE_ADDRESS_0, PROMISE_MBAR0); - pci_write_config_dword(dev, PCI_BASE_ADDRESS_1, PROMISE_MBAR1); - pci_write_config_dword(dev, PCI_BASE_ADDRESS_2, PROMISE_MBAR2); - pci_write_config_dword(dev, PCI_BASE_ADDRESS_3, PROMISE_MBAR3); - pci_write_config_dword(dev, PCI_BASE_ADDRESS_4, PROMISE_MBAR4); - pci_write_config_dword(dev, PCI_BASE_ADDRESS_5, PROMISE_MBAR5); - - for(bar = 0; bar < 5; bar++){ - pci_read_config_dword(dev, PCI_BASE_ADDRESS_0+bar*4, &mbar0); -#ifdef DEBUG - printf(" ATA_bar[%d]@0x%x\n", bar, mbar0); -#endif - } - - /* Enable ROM Expansion base */ - pci_write_config_dword(dev, PCI_ROM_ADDRESS, PROMISE_MBAR5|1); - - /* Io enable, Memory enable, master enable */ - pci_read_config_dword(dev, PCI_COMMAND, &cmd); - cmd &= ~0xffff0000; - cmd |= PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY | PCI_COMMAND_IO; - pci_write_config_dword(dev, PCI_COMMAND, cmd); - - /* Breath some life into the controller */ - for( a = 0; a < 4; a++) - pdc202xx_tune_chipset(dev, a, XFER_PIO_0); - } -} - -static struct pci_config_table pci_sandpoint_config_table[] = { - { PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, 0x00, 0x0e, 0x00, - pci_mousse_setup_pdc202xx }, -#ifndef CONFIG_PCI_PNP - { PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, 0x00, 0x0d, 0x00, - pci_cfgfunc_config_device, {PCI_ENET_IOADDR, - PCI_ENET_MEMADDR, - PCI_COMMAND_MEMORY | - PCI_COMMAND_MASTER}}, - { PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, - pci_cfgfunc_config_device, {PCI_SLOT_IOADDR, - PCI_SLOT_MEMADDR, - PCI_COMMAND_MEMORY | - PCI_COMMAND_MASTER}}, -#endif - { } -}; - -struct pci_controller hose = { - config_table: pci_sandpoint_config_table, - fixup_irq: pci_mousse_fixup_irq, -}; - -void pci_init_board(void) -{ - pci_mpc824x_init(&hose); -} diff --git a/board/mousse/u-boot.lds b/board/mousse/u-boot.lds deleted file mode 100644 index f49161c67f8..00000000000 --- a/board/mousse/u-boot.lds +++ /dev/null @@ -1,77 +0,0 @@ -/* - * (C) Copyright 2001 - * Wolfgang Denk, DENX Software Engineering, wd@denx.de. - * - * SPDX-License-Identifier: GPL-2.0+ - */ - -OUTPUT_ARCH(powerpc) -/* Do we need any of these for elf? - __DYNAMIC = 0; */ -SECTIONS -{ - /* Read-only sections, merged into text segment: */ - .text : - { - arch/powerpc/cpu/mpc824x/start.o (.text*) - *(.text*) - . = ALIGN(16); - *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) - } - - /* Read-write section, merged into data segment: */ - . = (. + 0x0FF) & 0xFFFFFF00; - _erotext = .; - PROVIDE (erotext = .); - .reloc : - { - _GOT2_TABLE_ = .; - KEEP(*(.got2)) - KEEP(*(.got)) - PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4); - _FIXUP_TABLE_ = .; - KEEP(*(.fixup)) - } - __got2_entries = ((_GLOBAL_OFFSET_TABLE_ - _GOT2_TABLE_) >> 2) - 1; - __fixup_entries = (. - _FIXUP_TABLE_) >> 2; - - .data : - { - *(.data*) - *(.sdata*) - } - _edata = .; - PROVIDE (edata = .); - - . = .; - - . = ALIGN(4); - .u_boot_list : { - KEEP(*(SORT(.u_boot_list*))); - } - - - . = .; - __start___ex_table = .; - __ex_table : { *(__ex_table) } - __stop___ex_table = .; - - . = ALIGN(4096); - __init_begin = .; - .text.init : { *(.text.init) } - .data.init : { *(.data.init) } - . = ALIGN(4096); - __init_end = .; - - __bss_start = .; - .bss (NOLOAD) : - { - *(.bss*) - *(.sbss*) - *(COMMON) - . = ALIGN(4); - } - - __bss_end = . ; - PROVIDE (end = .); -} diff --git a/board/mousse/u-boot.lds.ram b/board/mousse/u-boot.lds.ram deleted file mode 100644 index c0281311c59..00000000000 --- a/board/mousse/u-boot.lds.ram +++ /dev/null @@ -1,85 +0,0 @@ -/* - * (C) Copyright 2000 - * Rob Taylor, Flying Pig Systems Ltd. robt@flyingpig.com - * - * SPDX-License-Identifier: GPL-2.0+ - */ - -OUTPUT_ARCH(powerpc) - -MEMORY { - ram (!rx) : org = 0x00000000 , LENGTH = 8M - code (!rx) : org = 0x00002000 , LENGTH = (4M - 0x2000) - rom (rx) : org = 0xfff00000 , LENGTH = 512K -} - -SECTIONS -{ - _f_init = .; - PROVIDE(_f_init = .); - _f_init_rom = .; - PROVIDE(_f_init_rom = .); - - .init : { - arch/powerpc/cpu/mpc824x/start.o (.text) - *(.init) - } > ram - _init_size = SIZEOF(.init); - PROVIDE(_init_size = SIZEOF(.init)); - - ENTRY(_start) - -/* _ftext = .; - _ftext_rom = .; - _text_size = SIZEOF(.text); - */ - .text : { - *(.text) - *(.got1) - } > ram - .rodata : { *(.rodata) } > ram - .dtors : { *(.dtors) } > ram - .data : { *(.data) } > ram - .sdata : { *(.sdata) } > ram - .sdata2 : { *(.sdata2) - *(.got) - _GOT2_TABLE_ = .; - *(.got2) - _FIXUP_TABLE_ = .; - *(.fixup) - } > ram - __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >>2; - __fixup_entries = (. - _FIXUP_TABLE_)>>2; - - .sbss : { *(.sbss) } > ram - .sbss2 : { *(.sbss2) } > ram - .bss : { *(.bss) } > ram - .debug : { *(.debug) } > ram - .line : { *(.line) } > ram - .symtab : { *(.symtab) } > ram - .shrstrtab : { *(.shstrtab) } > ram - .strtab : { *(.strtab) } > ram - /* .reloc : - { - *(.got) - _GOT2_TABLE_ = .; - *(.got2) - _FIXUP_TABLE_ = .; - *(.fixup) - } > ram - */ - - - __start___ex_table = .; - __ex_table : { *(__ex_table) } > ram - __stop___ex_table = .; - - - .ppcenv : - { - common/env_embedded.o (.ppcenv) - } > ram - - __bss_end = . ; - PROVIDE (end = .); -} diff --git a/board/mousse/u-boot.lds.rom b/board/mousse/u-boot.lds.rom deleted file mode 100644 index f162ae365ba..00000000000 --- a/board/mousse/u-boot.lds.rom +++ /dev/null @@ -1,112 +0,0 @@ -/* - * (C) Copyright 2001 - * Wolfgang Denk, DENX Software Engineering, wd@denx.de. - * - * SPDX-License-Identifier: GPL-2.0+ - */ - -OUTPUT_ARCH(powerpc) -/* Do we need any of these for elf? - __DYNAMIC = 0; */ -SECTIONS -{ - /* 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 : - { - arch/powerpc/cpu/mpc824x/start.o (.text) - common/board.o (.text) - arch/powerpc/lib/ppcstring.o (.text) - lib/vsprintf.o (.text) - lib/crc32.o (.text) - lib/zlib.o (.text) - - . = env_offset; - common/env_embedded.o (.text) - - *(.text) - - *(.got1) - . = ALIGN(16); - *(.rodata) - *(.rodata1) - *(.rodata.str1.4) - *(.eh_frame) - } - .fini : { *(.fini) } =0 - .ctors : { *(.ctors) } - .dtors : { *(.dtors) } - - /* Read-write section, merged into data segment: */ - . = (. + 0x0FF) & 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 = .); - - - __start___ex_table = .; - __ex_table : { *(__ex_table) } - __stop___ex_table = .; - - . = ALIGN(4096); - __init_begin = .; - .text.init : { *(.text.init) } - .data.init : { *(.data.init) } - . = ALIGN(4096); - __init_end = .; - - __bss_start = .; - .bss : - { - *(.sbss) *(.scommon) - *(.dynbss) - *(.bss) - *(COMMON) - } - - __bss_end = . ; - PROVIDE (end = .); -} diff --git a/boards.cfg b/boards.cfg index d0df823a147..5b5015d1466 100644 --- a/boards.cfg +++ b/boards.cfg @@ -1243,4 +1243,3 @@ Orphan arm arm1136 mx31 - imx31_phycore Orphan arm arm1136 mx31 freescale - mx31ads - (resigned) Guennadi Liakhovetski Orphan arm pxa - - - lubbock - (dead address) Kyle Harris Orphan powerpc 74xx_7xx - - evb64260 EVB64260 - - -Orphan powerpc mpc824x - - mousse MOUSSE - - diff --git a/doc/README.scrapyard b/doc/README.scrapyard index adcf163a816..0e4d329ed18 100644 --- a/doc/README.scrapyard +++ b/doc/README.scrapyard @@ -11,6 +11,7 @@ easily if here is something they might want to dig for... Board Arch CPU Commit Removed Last known maintainer/contact ================================================================================================= +MOUSSE powerpc mpc824x - 2014-04-04 rsdproto powerpc mpc8260 - 2014-04-04 RPXsuper powerpc mpc8260 - 2014-04-04 RPXClassic powerpc mpc8xx - 2014-04-04 diff --git a/include/configs/MOUSSE.h b/include/configs/MOUSSE.h deleted file mode 100644 index e84d12f3f8a..00000000000 --- a/include/configs/MOUSSE.h +++ /dev/null @@ -1,320 +0,0 @@ -/* - * (C) Copyright 2000, 2001 - * Wolfgang Denk, DENX Software Engineering, wd@denx.de. - * - * (C) Copyright 2001 - * James F. Dougherty (jfd@cs.stanford.edu) - * - * SPDX-License-Identifier: GPL-2.0+ - */ - -/* - * - * Configuration settings for the MOUSSE board. - * See also: http://www.vooha.com/ - * - */ - -/* ------------------------------------------------------------------------- */ - -/* - * board/config.h - configuration options, board specific - */ - -#ifndef __CONFIG_H -#define __CONFIG_H - -/* - * High Level Configuration Options - * (easy to change) - */ - -#define CONFIG_MPC8240 1 -#define CONFIG_MOUSSE 1 - -#define CONFIG_SYS_TEXT_BASE 0xFFF00000 -#define CONFIG_SYS_LDSCRIPT "board/mousse/u-boot.lds" - -#define CONFIG_SYS_ADDR_MAP_B 1 - -#define CONFIG_CONS_INDEX 1 -#define CONFIG_BAUDRATE 9600 -#if 1 -#define CONFIG_BOOTCOMMAND "tftp 100000 vmlinux.img;bootm" /* autoboot command */ -#else -#define CONFIG_BOOTCOMMAND "bootm ffe10000" -#endif -#define CONFIG_BOOTARGS "console=ttyS0 root=/dev/nfs rw nfsroot=209.128.93.133:/boot nfsaddrs=209.128.93.133:209.128.93.138" -#define CONFIG_BOOTDELAY 3 - - -/* - * BOOTP options - */ -#define CONFIG_BOOTP_BOOTFILESIZE -#define CONFIG_BOOTP_BOOTPATH -#define CONFIG_BOOTP_GATEWAY -#define CONFIG_BOOTP_HOSTNAME - - -/* - * Command line configuration. - */ -#include - -#define CONFIG_CMD_ASKENV -#define CONFIG_CMD_DATE - - -#define CONFIG_ENV_OVERWRITE 1 -#define CONFIG_ETH_ADDR "00:10:18:10:00:06" - -#define CONFIG_DOS_PARTITION 1 /* MSDOS bootable partitiion support */ - -#include "../board/mousse/mousse.h" - -/* - * Miscellaneous configurable options - */ -#undef CONFIG_SYS_LONGHELP /* undef to save memory */ -#define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */ -#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16) -#define CONFIG_SYS_MAXARGS 8 /* Max number of command args */ - -#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */ -#define CONFIG_SYS_LOAD_ADDR 0x00100000 /* Default load address */ - -/*----------------------------------------------------------------------- - * Start addresses for the final memory configuration - * (Set up by the startup code) - * Please note that CONFIG_SYS_SDRAM_BASE _must_ start at 0 - */ -#define CONFIG_SYS_SDRAM_BASE 0x00000000 - -#ifdef DEBUG -#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_SDRAM_BASE -#else -#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE -#endif - -#ifdef DEBUG -#define CONFIG_SYS_MONITOR_LEN (4 << 20) /* lots of mem ... */ -#else -#define CONFIG_SYS_MONITOR_LEN (512 << 10) /* 512K PLCC bootrom */ -#endif -#define CONFIG_SYS_MALLOC_LEN (2*(4096 << 10)) /* 2*4096kB for malloc() */ - -#define CONFIG_SYS_MEMTEST_START 0x00004000 /* memtest works on */ -#define CONFIG_SYS_MEMTEST_END 0x02000000 /* 0 ... 32 MB in DRAM */ - - -#define CONFIG_SYS_EUMB_ADDR 0xFC000000 - -#define CONFIG_SYS_ISA_MEM 0xFD000000 -#define CONFIG_SYS_ISA_IO 0xFE000000 - -#define CONFIG_SYS_FLASH_BASE 0xFFF00000 -#define CONFIG_SYS_FLASH_SIZE ((uint)(512 * 1024)) -#define CONFIG_SYS_RESET_ADDRESS 0xFFF00100 -#define FLASH_BASE0_PRELIM 0xFFF00000 /* 512K PLCC FLASH/AM29F040*/ -#define FLASH_BASE0_SIZE 0x80000 /* 512K */ -#define FLASH_BASE1_PRELIM 0xFFE10000 /* AMD 29LV160DB - 1MB - 64K FLASH0 SEG =960K - (size=0xf0000)*/ - -/* - * NS16550 Configuration - */ -#define CONFIG_SYS_NS16550 -#define CONFIG_SYS_NS16550_SERIAL - -#define CONFIG_SYS_NS16550_REG_SIZE 1 - -#define CONFIG_SYS_NS16550_CLK 18432000 - -#define CONFIG_SYS_NS16550_COM1 0xFFE08080 - -/*----------------------------------------------------------------------- - * Definitions for initial stack pointer and data area (in DPRAM) - */ -#define CONFIG_SYS_INIT_RAM_ADDR CONFIG_SYS_SDRAM_BASE + CONFIG_SYS_MONITOR_LEN -#define CONFIG_SYS_INIT_RAM_SIZE 0x2F00 /* Size of used area in DPRAM */ -#define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) -#define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET - -/* - * Low Level Configuration Settings - * (address mappings, register initial values, etc.) - * You should know what you are doing if you make changes here. - * For the detail description refer to the MPC8240 user's manual. - */ - -#define CONFIG_SYS_CLK_FREQ 33000000 /* external frequency to pll */ -#define CONFIG_PLL_PCI_TO_MEM_MULTIPLIER 2 - -#define CONFIG_SYS_ETH_DEV_FN 0x00 -#define CONFIG_SYS_ETH_IOBASE 0x00104000 - - - /* Bit-field values for MCCR1. - */ -#define CONFIG_SYS_ROMNAL 8 -#define CONFIG_SYS_ROMFAL 8 - - /* Bit-field values for MCCR2. - */ -#define CONFIG_SYS_REFINT 0xf5 /* Refresh interval */ - - /* Burst To Precharge. Bits of this value go to MCCR3 and MCCR4. - */ -#define CONFIG_SYS_BSTOPRE 0x79 - -#ifdef INCLUDE_ECC -#define USE_ECC 1 -#else /* INCLUDE_ECC */ -#define USE_ECC 0 -#endif /* INCLUDE_ECC */ - - - /* Bit-field values for MCCR3. - */ -#define CONFIG_SYS_REFREC 8 /* Refresh to activate interval */ -#define CONFIG_SYS_RDLAT (4+USE_ECC) /* Data latancy from read command */ - - /* Bit-field values for MCCR4. - */ -#define CONFIG_SYS_PRETOACT 3 /* Precharge to activate interval */ -#define CONFIG_SYS_ACTTOPRE 5 /* Activate to Precharge interval */ -#define CONFIG_SYS_SDMODE_CAS_LAT 3 /* SDMODE CAS latancy */ -#define CONFIG_SYS_SDMODE_WRAP 0 /* SDMODE wrap type */ -#define CONFIG_SYS_SDMODE_BURSTLEN 2 /* SDMODE Burst length */ -#define CONFIG_SYS_ACTORW 2 -#define CONFIG_SYS_REGISTERD_TYPE_BUFFER (1-USE_ECC) - -/* Memory bank settings. - * Only bits 20-29 are actually used from these vales to set the - * start/end addresses. The upper two bits will always be 0, and the lower - * 20 bits will be 0x00000 for a start address, or 0xfffff for an end - * address. Refer to the MPC8240 book. - */ -#define CONFIG_SYS_RAM_SIZE 0x04000000 /* 64MB */ - - -#define CONFIG_SYS_BANK0_START 0x00000000 -#define CONFIG_SYS_BANK0_END (CONFIG_SYS_RAM_SIZE - 1) -#define CONFIG_SYS_BANK0_ENABLE 1 -#define CONFIG_SYS_BANK1_START 0x3ff00000 -#define CONFIG_SYS_BANK1_END 0x3fffffff -#define CONFIG_SYS_BANK1_ENABLE 0 -#define CONFIG_SYS_BANK2_START 0x3ff00000 -#define CONFIG_SYS_BANK2_END 0x3fffffff -#define CONFIG_SYS_BANK2_ENABLE 0 -#define CONFIG_SYS_BANK3_START 0x3ff00000 -#define CONFIG_SYS_BANK3_END 0x3fffffff -#define CONFIG_SYS_BANK3_ENABLE 0 -#define CONFIG_SYS_BANK4_START 0x3ff00000 -#define CONFIG_SYS_BANK4_END 0x3fffffff -#define CONFIG_SYS_BANK4_ENABLE 0 -#define CONFIG_SYS_BANK5_START 0x3ff00000 -#define CONFIG_SYS_BANK5_END 0x3fffffff -#define CONFIG_SYS_BANK5_ENABLE 0 -#define CONFIG_SYS_BANK6_START 0x3ff00000 -#define CONFIG_SYS_BANK6_END 0x3fffffff -#define CONFIG_SYS_BANK6_ENABLE 0 -#define CONFIG_SYS_BANK7_START 0x3ff00000 -#define CONFIG_SYS_BANK7_END 0x3fffffff -#define CONFIG_SYS_BANK7_ENABLE 0 - -#define CONFIG_SYS_ODCR 0x7f - - -#define CONFIG_SYS_PGMAX 0x32 /* how long the 8240 reatins the currently accessed page in memory - see 8240 book for details*/ -#define PCI_MEM_SPACE1_START 0x80000000 -#define PCI_MEM_SPACE2_START 0xfd000000 - -/* IBAT/DBAT Configuration */ -/* Ram: 64MB, starts at address-0, r/w instruction/data */ -#define CONFIG_SYS_IBAT0U (CONFIG_SYS_SDRAM_BASE | BATU_BL_64M | BATU_VS | BATU_VP) -#define CONFIG_SYS_IBAT0L (CONFIG_SYS_SDRAM_BASE | BATL_PP_10 | BATL_MEMCOHERENCE) -#define CONFIG_SYS_DBAT0U CONFIG_SYS_IBAT0U -#define CONFIG_SYS_DBAT0L CONFIG_SYS_IBAT0L - -/* MPLD/Port-X I/O Space : data and instruction read/write, cache-inhibit */ -#define CONFIG_SYS_IBAT1U (PORTX_DEV_BASE | BATU_BL_128M | BATU_VS | BATU_VP) -#if 0 -#define CONFIG_SYS_IBAT1L (PORTX_DEV_BASE | BATL_PP_10 | BATL_MEMCOHERENCE |\ - BATL_WRITETHROUGH | BATL_CACHEINHIBIT) -#else -#define CONFIG_SYS_IBAT1L (PORTX_DEV_BASE | BATL_PP_10 |BATL_CACHEINHIBIT) -#endif -#define CONFIG_SYS_DBAT1U CONFIG_SYS_IBAT1U -#define CONFIG_SYS_DBAT1L CONFIG_SYS_IBAT1L - -/* PCI Memory region 1: 0x8XXX_XXXX PCI Mem space: EUMBAR, etc - 16MB */ -#define CONFIG_SYS_IBAT2U (PCI_MEM_SPACE1_START|BATU_BL_16M | BATU_VS | BATU_VP) -#define CONFIG_SYS_IBAT2L (PCI_MEM_SPACE1_START|BATL_PP_10 | BATL_GUARDEDSTORAGE|BATL_CACHEINHIBIT) -#define CONFIG_SYS_DBAT2U CONFIG_SYS_IBAT2U -#define CONFIG_SYS_DBAT2L CONFIG_SYS_IBAT2L - -/* PCI Memory region 2: PCI Devices in 0xFD space */ -#define CONFIG_SYS_IBAT3U (PCI_MEM_SPACE2_START|BATU_BL_16M | BATU_VS | BATU_VP) -#define CONFIG_SYS_IBAT3L (PCI_MEM_SPACE2_START|BATL_PP_10 | BATL_GUARDEDSTORAGE | BATL_CACHEINHIBIT) -#define CONFIG_SYS_DBAT3U CONFIG_SYS_IBAT3U -#define CONFIG_SYS_DBAT3L CONFIG_SYS_IBAT3L - - -/* - * For booting Linux, the board info and command line data - * have to be in the first 8 MB of memory, since this is - * the maximum mapped by the Linux kernel during initialization. - */ -#define CONFIG_SYS_BOOTMAPSZ (8 << 20) /* Initial Memory map for Linux */ - -/*----------------------------------------------------------------------- - * FLASH organization - */ -#define CONFIG_SYS_MAX_FLASH_BANKS 3 /* Max number of flash banks */ -#define CONFIG_SYS_MAX_FLASH_SECT 64 /* Max number of sectors in one bank */ - -#define CONFIG_SYS_FLASH_ERASE_TOUT 120000 /* Timeout for Flash Erase (in ms) */ -#define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Timeout for Flash Write (in ms) */ - -#if 0 -#define CONFIG_ENV_IS_IN_FLASH 1 -#define CONFIG_ENV_OFFSET 0x8000 /* Offset of the Environment Sector */ -#define CONFIG_ENV_SIZE 0x4000 /* Size of the Environment Sector */ -#else -#define CONFIG_ENV_IS_IN_NVRAM 1 -#define CONFIG_ENV_ADDR NV_OFF_U_BOOT_ADDR /* PortX NVM Free addr*/ -#define CONFIG_ENV_OFFSET CONFIG_ENV_ADDR -#define CONFIG_ENV_SIZE NV_U_BOOT_ENV_SIZE /* 2K */ -#endif -/*----------------------------------------------------------------------- - * Cache Configuration - */ -#define CONFIG_SYS_CACHELINE_SIZE 16 - -/* Localizations */ -#if 0 -#define CONFIG_ETHADDR 0:0:0:0:1:d -#define CONFIG_IPADDR 172.16.40.113 -#define CONFIG_SERVERIP 172.16.40.111 -#else -#define CONFIG_ETHADDR 0:0:0:0:1:d -#define CONFIG_IPADDR 209.128.93.138 -#define CONFIG_SERVERIP 209.128.93.133 -#endif - -/*----------------------------------------------------------------------- - * PCI stuff - *----------------------------------------------------------------------- - */ -#define CONFIG_PCI /* include pci support */ -#define CONFIG_PCI_INDIRECT_BRIDGE /* indirect PCI bridge support */ -#undef CONFIG_PCI_PNP - - -#define CONFIG_TULIP - -#endif /* __CONFIG_H */ -- cgit v1.2.3 From 36bf57b6fb37089510b6dcfa6487dc5e2445c9f2 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Fri, 4 Apr 2014 15:25:11 +0900 Subject: arm: remove lubbock board support Enough time has passed since this board was moved to Orphan. Remove. - Remove board/lubbock/* - Remove include/configs/lubbock.h - Cleanup defined(CONFIG_LUBBOCK) - Move the entry from boards.cfg to doc/README.scrapyard Signed-off-by: Masahiro Yamada --- board/lubbock/Makefile | 8 - board/lubbock/flash.c | 412 ---------------------------------------------- board/lubbock/lubbock.c | 81 --------- boards.cfg | 1 - doc/README.scrapyard | 1 + drivers/net/lan91c96.h | 6 - include/configs/lubbock.h | 236 -------------------------- 7 files changed, 1 insertion(+), 744 deletions(-) delete mode 100644 board/lubbock/Makefile delete mode 100644 board/lubbock/flash.c delete mode 100644 board/lubbock/lubbock.c delete mode 100644 include/configs/lubbock.h (limited to 'board') diff --git a/board/lubbock/Makefile b/board/lubbock/Makefile deleted file mode 100644 index 8aa513ac44f..00000000000 --- a/board/lubbock/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -# -# (C) Copyright 2000-2006 -# Wolfgang Denk, DENX Software Engineering, wd@denx.de. -# -# SPDX-License-Identifier: GPL-2.0+ -# - -obj-y := lubbock.o flash.o diff --git a/board/lubbock/flash.c b/board/lubbock/flash.c deleted file mode 100644 index f6bb22c2e47..00000000000 --- a/board/lubbock/flash.c +++ /dev/null @@ -1,412 +0,0 @@ -/* - * (C) Copyright 2001 - * Kyle Harris, Nexus Technologies, Inc. kharris@nexus-tech.net - * - * (C) Copyright 2001 - * Wolfgang Denk, DENX Software Engineering, wd@denx.de. - * - * SPDX-License-Identifier: GPL-2.0+ - */ - -#include -#include - - -flash_info_t flash_info[CONFIG_SYS_MAX_FLASH_BANKS]; /* info for FLASH chips */ - -/* Board support for 1 or 2 flash devices */ -#define FLASH_PORT_WIDTH32 -#undef FLASH_PORT_WIDTH16 - -#ifdef FLASH_PORT_WIDTH16 -#define FLASH_PORT_WIDTH ushort -#define FLASH_PORT_WIDTHV vu_short -#define SWAP(x) __swab16(x) -#else -#define FLASH_PORT_WIDTH ulong -#define FLASH_PORT_WIDTHV vu_long -#define SWAP(x) __swab32(x) -#endif - -#define FPW FLASH_PORT_WIDTH -#define FPWV FLASH_PORT_WIDTHV - -#define mb() __asm__ __volatile__ ("" : : : "memory") - -/*----------------------------------------------------------------------- - * Functions - */ -static ulong flash_get_size (FPW *addr, flash_info_t *info); -static int write_data (flash_info_t *info, ulong dest, FPW data); -static void flash_get_offsets (ulong base, flash_info_t *info); -void inline spin_wheel (void); - -/*----------------------------------------------------------------------- - */ - -unsigned long flash_init (void) -{ - int i; - ulong size = 0; - - for (i = 0; i < CONFIG_SYS_MAX_FLASH_BANKS; i++) { - switch (i) { - case 0: - flash_get_size ((FPW *) PHYS_FLASH_1, &flash_info[i]); - flash_get_offsets (PHYS_FLASH_1, &flash_info[i]); - break; - case 1: - flash_get_size ((FPW *) PHYS_FLASH_2, &flash_info[i]); - flash_get_offsets (PHYS_FLASH_2, &flash_info[i]); - break; - default: - panic ("configured too many flash banks!\n"); - break; - } - size += flash_info[i].size; - } - - /* Protect monitor and environment sectors - */ - flash_protect ( FLAG_PROTECT_SET, - CONFIG_SYS_FLASH_BASE, - CONFIG_SYS_FLASH_BASE + monitor_flash_len - 1, - &flash_info[0] ); - - flash_protect ( FLAG_PROTECT_SET, - CONFIG_ENV_ADDR, - CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, &flash_info[0] ); - - return size; -} - -/*----------------------------------------------------------------------- - */ -static void flash_get_offsets (ulong base, flash_info_t *info) -{ - int i; - - if (info->flash_id == FLASH_UNKNOWN) { - return; - } - - if ((info->flash_id & FLASH_VENDMASK) == FLASH_MAN_INTEL) { - for (i = 0; i < info->sector_count; i++) { - info->start[i] = base + (i * PHYS_FLASH_SECT_SIZE); - info->protect[i] = 0; - } - } -} - -/*----------------------------------------------------------------------- - */ -void flash_print_info (flash_info_t *info) -{ - int i; - - if (info->flash_id == FLASH_UNKNOWN) { - printf ("missing or unknown FLASH type\n"); - return; - } - - switch (info->flash_id & FLASH_VENDMASK) { - case FLASH_MAN_INTEL: - printf ("INTEL "); - break; - default: - printf ("Unknown Vendor "); - break; - } - - switch (info->flash_id & FLASH_TYPEMASK) { - case FLASH_28F128J3A: - printf ("28F128J3A\n"); - break; - default: - printf ("Unknown Chip Type\n"); - break; - } - - printf (" Size: %ld MB in %d Sectors\n", - info->size >> 20, info->sector_count); - - printf (" Sector Start Addresses:"); - for (i = 0; i < info->sector_count; ++i) { - if ((i % 5) == 0) - printf ("\n "); - printf (" %08lX%s", - info->start[i], - info->protect[i] ? " (RO)" : " "); - } - printf ("\n"); - return; -} - -/* - * The following code cannot be run from FLASH! - */ -static ulong flash_get_size (FPW *addr, flash_info_t *info) -{ - volatile FPW value; - - /* Write auto select command: read Manufacturer ID */ - addr[0x5555] = (FPW) 0x00AA00AA; - addr[0x2AAA] = (FPW) 0x00550055; - addr[0x5555] = (FPW) 0x00900090; - - mb (); - value = addr[0]; - - switch (value) { - - case (FPW) INTEL_MANUFACT: - info->flash_id = FLASH_MAN_INTEL; - break; - - default: - info->flash_id = FLASH_UNKNOWN; - info->sector_count = 0; - info->size = 0; - addr[0] = (FPW) 0x00FF00FF; /* restore read mode */ - return (0); /* no or unknown flash */ - } - - mb (); - value = addr[1]; /* device ID */ - - switch (value) { - - case (FPW) INTEL_ID_28F128J3A: - info->flash_id += FLASH_28F128J3A; - info->sector_count = 128; - info->size = 0x02000000; - break; /* => 16 MB */ - - default: - info->flash_id = FLASH_UNKNOWN; - break; - } - - if (info->sector_count > CONFIG_SYS_MAX_FLASH_SECT) { - printf ("** ERROR: sector count %d > max (%d) **\n", - info->sector_count, CONFIG_SYS_MAX_FLASH_SECT); - info->sector_count = CONFIG_SYS_MAX_FLASH_SECT; - } - - addr[0] = (FPW) 0x00FF00FF; /* restore read mode */ - - return (info->size); -} - - -/*----------------------------------------------------------------------- - */ - -int flash_erase (flash_info_t *info, int s_first, int s_last) -{ - int prot, sect; - ulong type, start; - int rcode = 0; - - if ((s_first < 0) || (s_first > s_last)) { - if (info->flash_id == FLASH_UNKNOWN) { - printf ("- missing\n"); - } else { - printf ("- no sectors to erase\n"); - } - return 1; - } - - type = (info->flash_id & FLASH_VENDMASK); - if ((type != FLASH_MAN_INTEL)) { - printf ("Can't erase unknown flash type %08lx - aborted\n", - info->flash_id); - return 1; - } - - prot = 0; - for (sect = s_first; sect <= s_last; ++sect) { - if (info->protect[sect]) { - prot++; - } - } - - if (prot) { - printf ("- Warning: %d protected sectors will not be erased!\n", - prot); - } else { - printf ("\n"); - } - - /* Disable interrupts which might cause a timeout here */ - disable_interrupts(); - - /* Start erase on unprotected sectors */ - for (sect = s_first; sect <= s_last; sect++) { - if (info->protect[sect] == 0) { /* not protected */ - FPWV *addr = (FPWV *) (info->start[sect]); - FPW status; - - printf ("Erasing sector %2d ... ", sect); - - /* arm simple, non interrupt dependent timer */ - start = get_timer(0); - - *addr = (FPW) 0x00500050; /* clear status register */ - *addr = (FPW) 0x00200020; /* erase setup */ - *addr = (FPW) 0x00D000D0; /* erase confirm */ - - while (((status = *addr) & (FPW) 0x00800080) != (FPW) 0x00800080) { - if (get_timer(start) > CONFIG_SYS_FLASH_ERASE_TOUT) { - printf ("Timeout\n"); - *addr = (FPW) 0x00B000B0; /* suspend erase */ - *addr = (FPW) 0x00FF00FF; /* reset to read mode */ - rcode = 1; - break; - } - } - - *addr = 0x00500050; /* clear status register cmd. */ - *addr = 0x00FF00FF; /* resest to read mode */ - - printf (" done\n"); - } - } - return rcode; -} - -/*----------------------------------------------------------------------- - * Copy memory to flash, returns: - * 0 - OK - * 1 - write timeout - * 2 - Flash not erased - * 4 - Flash not identified - */ - -int write_buff (flash_info_t *info, uchar *src, ulong addr, ulong cnt) -{ - ulong cp, wp; - FPW data; - int count, i, l, rc, port_width; - - if (info->flash_id == FLASH_UNKNOWN) { - return 4; - } -/* get lower word aligned address */ -#ifdef FLASH_PORT_WIDTH16 - wp = (addr & ~1); - port_width = 2; -#else - wp = (addr & ~3); - port_width = 4; -#endif - - /* - * handle unaligned start bytes - */ - if ((l = addr - wp) != 0) { - data = 0; - for (i = 0, cp = wp; i < l; ++i, ++cp) { - data = (data << 8) | (*(uchar *) cp); - } - for (; i < port_width && cnt > 0; ++i) { - data = (data << 8) | *src++; - --cnt; - ++cp; - } - for (; cnt == 0 && i < port_width; ++i, ++cp) { - data = (data << 8) | (*(uchar *) cp); - } - - if ((rc = write_data (info, wp, SWAP (data))) != 0) { - return (rc); - } - wp += port_width; - } - - /* - * handle word aligned part - */ - count = 0; - while (cnt >= port_width) { - data = 0; - for (i = 0; i < port_width; ++i) { - data = (data << 8) | *src++; - } - if ((rc = write_data (info, wp, SWAP (data))) != 0) { - return (rc); - } - wp += port_width; - cnt -= port_width; - if (count++ > 0x800) { - spin_wheel (); - count = 0; - } - } - - if (cnt == 0) { - return (0); - } - - /* - * handle unaligned tail bytes - */ - data = 0; - for (i = 0, cp = wp; i < port_width && cnt > 0; ++i, ++cp) { - data = (data << 8) | *src++; - --cnt; - } - for (; i < port_width; ++i, ++cp) { - data = (data << 8) | (*(uchar *) cp); - } - - return (write_data (info, wp, SWAP (data))); -} - -/*----------------------------------------------------------------------- - * Write a word or halfword to Flash, returns: - * 0 - OK - * 1 - write timeout - * 2 - Flash not erased - */ -static int write_data (flash_info_t *info, ulong dest, FPW data) -{ - FPWV *addr = (FPWV *) dest; - ulong status; - ulong start; - - /* Check if Flash is (sufficiently) erased */ - if ((*addr & data) != data) { - printf ("not erased at %08lx (%lx)\n", (ulong) addr, *addr); - return (2); - } - /* Disable interrupts which might cause a timeout here */ - disable_interrupts(); - - *addr = (FPW) 0x00400040; /* write setup */ - *addr = data; - - /* arm simple, non interrupt dependent timer */ - start = get_timer(0); - - /* wait while polling the status register */ - while (((status = *addr) & (FPW) 0x00800080) != (FPW) 0x00800080) { - if (get_timer(start) > CONFIG_SYS_FLASH_WRITE_TOUT) { - *addr = (FPW) 0x00FF00FF; /* restore read mode */ - return (1); - } - } - - *addr = (FPW) 0x00FF00FF; /* restore read mode */ - - return (0); -} - -void inline spin_wheel (void) -{ - static int p = 0; - static char w[] = "\\/-"; - - printf ("\010%c", w[p]); - (++p == 3) ? (p = 0) : 0; -} diff --git a/board/lubbock/lubbock.c b/board/lubbock/lubbock.c deleted file mode 100644 index 0daff9abf14..00000000000 --- a/board/lubbock/lubbock.c +++ /dev/null @@ -1,81 +0,0 @@ -/* - * (C) Copyright 2002 - * Kyle Harris, Nexus Technologies, Inc. kharris@nexus-tech.net - * - * (C) Copyright 2002 - * Sysgo Real-Time Solutions, GmbH - * Marius Groeger - * - * SPDX-License-Identifier: GPL-2.0+ - */ - -#include -#include -#include -#include -#include -#include - -DECLARE_GLOBAL_DATA_PTR; - -/* - * Miscelaneous platform dependent initialisations - */ - -int board_init (void) -{ - /* We have RAM, disable cache */ - dcache_disable(); - icache_disable(); - - /* arch number of Lubbock-Board */ - gd->bd->bi_arch_number = MACH_TYPE_LUBBOCK; - - /* adress of boot parameters */ - gd->bd->bi_boot_params = 0xa0000100; - - /* Configure GPIO6 and GPIO8 as OUT, AF1. */ - setbits_le32(GPDR0, (1 << 6) | (1 << 8)); - clrsetbits_le32(GAFR0_L, (3 << 12) | (3 << 16), (1 << 12) | (1 << 16)); - - return 0; -} - -#ifdef CONFIG_CMD_MMC -int board_mmc_init(bd_t *bis) -{ - pxa_mmc_register(0); - return 0; -} -#endif - -int board_late_init(void) -{ - setenv("stdout", "serial"); - setenv("stderr", "serial"); - return 0; -} - -int dram_init(void) -{ - pxa2xx_dram_init(); - gd->ram_size = PHYS_SDRAM_1_SIZE; - return 0; -} - -void dram_init_banksize(void) -{ - gd->bd->bi_dram[0].start = PHYS_SDRAM_1; - gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE; -} - -#ifdef CONFIG_CMD_NET -int board_eth_init(bd_t *bis) -{ - int rc = 0; -#ifdef CONFIG_LAN91C96 - rc = lan91c96_initialize(0, CONFIG_LAN91C96_BASE); -#endif - return rc; -} -#endif diff --git a/boards.cfg b/boards.cfg index 6dd9e7513a0..c83aff3b141 100644 --- a/boards.cfg +++ b/boards.cfg @@ -1241,4 +1241,3 @@ Orphan powerpc ppc4xx - sandburst metrobox # The following were move to "Orphan" in September, 2013 Orphan arm arm1136 mx31 - imx31_phycore imx31_phycore_eet imx31_phycore:IMX31_PHYCORE_EET (resigned) Guennadi Liakhovetski Orphan arm arm1136 mx31 freescale - mx31ads - (resigned) Guennadi Liakhovetski -Orphan arm pxa - - - lubbock - (dead address) Kyle Harris diff --git a/doc/README.scrapyard b/doc/README.scrapyard index 0e4d329ed18..15c39e76758 100644 --- a/doc/README.scrapyard +++ b/doc/README.scrapyard @@ -11,6 +11,7 @@ easily if here is something they might want to dig for... Board Arch CPU Commit Removed Last known maintainer/contact ================================================================================================= +lubbock arm pxa - 2014-04-04 Kyle Harris MOUSSE powerpc mpc824x - 2014-04-04 rsdproto powerpc mpc8260 - 2014-04-04 RPXsuper powerpc mpc8260 - 2014-04-04 diff --git a/drivers/net/lan91c96.h b/drivers/net/lan91c96.h index 2f0d640adec..3e914ce5ad5 100644 --- a/drivers/net/lan91c96.h +++ b/drivers/net/lan91c96.h @@ -58,13 +58,7 @@ typedef unsigned long int dword; #ifdef CONFIG_CPU_PXA25X -#ifdef CONFIG_LUBBOCK -#define SMC_IO_SHIFT 2 -#undef USE_32_BIT - -#else #define SMC_IO_SHIFT 0 -#endif #define SMCREG(edev, r) ((edev)->iobase+((r)< - * Marius Groeger - * - * Configuation settings for the LUBBOCK board. - * - * SPDX-License-Identifier: GPL-2.0+ - */ - -#ifndef __CONFIG_H -#define __CONFIG_H - -/* - * High Level Configuration Options - * (easy to change) - */ -#define CONFIG_CPU_PXA25X 1 /* This is an PXA250 CPU */ -#define CONFIG_LUBBOCK 1 /* on an LUBBOCK Board */ -#define CONFIG_LCD 1 -#ifdef CONFIG_LCD -#define CONFIG_PXA_LCD -#define CONFIG_SHARP_LM8V31 -#endif -#define CONFIG_MMC -#define CONFIG_BOARD_LATE_INIT -#define CONFIG_DOS_PARTITION -#define CONFIG_SYS_TEXT_BASE 0x0 - -/* we will never enable dcache, because we have to setup MMU first */ -#define CONFIG_SYS_DCACHE_OFF - -/* - * Size of malloc() pool - */ -#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 128*1024) - -/* - * Hardware drivers - */ -#define CONFIG_LAN91C96 -#define CONFIG_LAN91C96_BASE 0x0C000000 - -/* - * select serial console configuration - */ -#define CONFIG_PXA_SERIAL -#define CONFIG_FFUART 1 /* we use FFUART on LUBBOCK */ -#define CONFIG_CONS_INDEX 3 - -/* allow to overwrite serial and ethaddr */ -#define CONFIG_ENV_OVERWRITE - -#define CONFIG_BAUDRATE 115200 - - -/* - * BOOTP options - */ -#define CONFIG_BOOTP_BOOTFILESIZE -#define CONFIG_BOOTP_BOOTPATH -#define CONFIG_BOOTP_GATEWAY -#define CONFIG_BOOTP_HOSTNAME - - -/* - * Command line configuration. - */ -#include - -#define CONFIG_CMD_FAT - - -#define CONFIG_BOOTDELAY 3 -#define CONFIG_ETHADDR 08:00:3e:26:0a:5b -#define CONFIG_NETMASK 255.255.0.0 -#define CONFIG_IPADDR 192.168.0.21 -#define CONFIG_SERVERIP 192.168.0.250 -#define CONFIG_BOOTCOMMAND "bootm 80000" -#define CONFIG_BOOTARGS "root=/dev/mtdblock2 rootfstype=cramfs console=ttyS0,115200" -#define CONFIG_CMDLINE_TAG -#define CONFIG_TIMESTAMP - -#if defined(CONFIG_CMD_KGDB) -#define CONFIG_KGDB_BAUDRATE 230400 /* speed to run kgdb serial port */ -#endif - -/* - * Miscellaneous configurable options - */ -#define CONFIG_SYS_HUSH_PARSER 1 - -#define CONFIG_SYS_LONGHELP /* undef to save memory */ -#ifdef CONFIG_SYS_HUSH_PARSER -#define CONFIG_SYS_PROMPT "$ " /* Monitor Command Prompt */ -#else -#endif -#define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */ -#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */ -#define CONFIG_SYS_MAXARGS 16 /* max number of command args */ -#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */ -#define CONFIG_SYS_DEVICE_NULLDEV 1 - -#define CONFIG_SYS_MEMTEST_START 0xa0400000 /* memtest works on */ -#define CONFIG_SYS_MEMTEST_END 0xa0800000 /* 4 ... 8 MB in DRAM */ - -#define CONFIG_SYS_LOAD_ADDR (CONFIG_SYS_DRAM_BASE + 0x8000) /* default load address */ - -#define CONFIG_SYS_CPUSPEED 0x161 /* set core clock to 400/200/100 MHz */ - -#ifdef CONFIG_MMC -#define CONFIG_GENERIC_MMC -#define CONFIG_PXA_MMC_GENERIC -#define CONFIG_CMD_MMC -#define CONFIG_SYS_MMC_BASE 0xF0000000 -#endif - -/* - * Physical Memory Map - */ -#define CONFIG_NR_DRAM_BANKS 4 /* we have 2 banks of DRAM */ -#define PHYS_SDRAM_1 0xa0000000 /* SDRAM Bank #1 */ -#define PHYS_SDRAM_1_SIZE 0x04000000 /* 64 MB */ -#define PHYS_SDRAM_2 0xa4000000 /* SDRAM Bank #2 */ -#define PHYS_SDRAM_2_SIZE 0x00000000 /* 0 MB */ -#define PHYS_SDRAM_3 0xa8000000 /* SDRAM Bank #3 */ -#define PHYS_SDRAM_3_SIZE 0x00000000 /* 0 MB */ -#define PHYS_SDRAM_4 0xac000000 /* SDRAM Bank #4 */ -#define PHYS_SDRAM_4_SIZE 0x00000000 /* 0 MB */ - -#define PHYS_FLASH_1 0x00000000 /* Flash Bank #1 */ -#define PHYS_FLASH_2 0x04000000 /* Flash Bank #2 */ -#define PHYS_FLASH_SIZE 0x02000000 /* 32 MB */ -#define PHYS_FLASH_BANK_SIZE 0x02000000 /* 32 MB Banks */ -#define PHYS_FLASH_SECT_SIZE 0x00040000 /* 256 KB sectors (x2) */ - -#define CONFIG_SYS_DRAM_BASE 0xa0000000 -#define CONFIG_SYS_DRAM_SIZE 0x04000000 - -#define CONFIG_SYS_FLASH_BASE PHYS_FLASH_1 - -#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1 -#define CONFIG_SYS_INIT_SP_ADDR 0xfffff800 - -#define FPGA_REGS_BASE_PHYSICAL 0x08000000 - -/* - * GPIO settings - */ -#define CONFIG_SYS_GPSR0_VAL 0x00008000 -#define CONFIG_SYS_GPSR1_VAL 0x00FC0382 -#define CONFIG_SYS_GPSR2_VAL 0x0001FFFF -#define CONFIG_SYS_GPCR0_VAL 0x00000000 -#define CONFIG_SYS_GPCR1_VAL 0x00000000 -#define CONFIG_SYS_GPCR2_VAL 0x00000000 -#define CONFIG_SYS_GPDR0_VAL 0x0060A800 -#define CONFIG_SYS_GPDR1_VAL 0x00FF0382 -#define CONFIG_SYS_GPDR2_VAL 0x0001C000 -#define CONFIG_SYS_GAFR0_L_VAL 0x98400000 -#define CONFIG_SYS_GAFR0_U_VAL 0x00002950 -#define CONFIG_SYS_GAFR1_L_VAL 0x000A9558 -#define CONFIG_SYS_GAFR1_U_VAL 0x0005AAAA -#define CONFIG_SYS_GAFR2_L_VAL 0xA0000000 -#define CONFIG_SYS_GAFR2_U_VAL 0x00000002 - -#define CONFIG_SYS_PSSR_VAL 0x20 - -#define CONFIG_SYS_CCCR CCCR_L27|CCCR_M2|CCCR_N10 -#define CONFIG_SYS_CKEN 0x0 - -/* - * Memory settings - */ -#define CONFIG_SYS_MSC0_VAL 0x23F223F2 -#define CONFIG_SYS_MSC1_VAL 0x3FF1A441 -#define CONFIG_SYS_MSC2_VAL 0x7FF97FF1 -#define CONFIG_SYS_MDCNFG_VAL 0x00001AC9 -#define CONFIG_SYS_MDREFR_VAL 0x00018018 -#define CONFIG_SYS_MDMRS_VAL 0x00000000 - -#define CONFIG_SYS_FLYCNFG_VAL 0x00000000 -#define CONFIG_SYS_SXCNFG_VAL 0x00000000 - -/* - * PCMCIA and CF Interfaces - */ -#define CONFIG_SYS_MECR_VAL 0x00000000 -#define CONFIG_SYS_MCMEM0_VAL 0x00010504 -#define CONFIG_SYS_MCMEM1_VAL 0x00010504 -#define CONFIG_SYS_MCATT0_VAL 0x00010504 -#define CONFIG_SYS_MCATT1_VAL 0x00010504 -#define CONFIG_SYS_MCIO0_VAL 0x00004715 -#define CONFIG_SYS_MCIO1_VAL 0x00004715 - -#define _LED 0x08000010 -#define LED_BLANK 0x08000040 - -/* - * FLASH and environment organization - */ -#define CONFIG_SYS_MAX_FLASH_BANKS 2 /* max number of memory banks */ -#define CONFIG_SYS_MAX_FLASH_SECT 128 /* max number of sectors on one chip */ - -/* timeout values are in ticks */ -#define CONFIG_SYS_FLASH_ERASE_TOUT (25*CONFIG_SYS_HZ) /* Timeout for Flash Erase */ -#define CONFIG_SYS_FLASH_WRITE_TOUT (25*CONFIG_SYS_HZ) /* Timeout for Flash Write */ - -/* NOTE: many default partitioning schemes assume the kernel starts at the - * second sector, not an environment. You have been warned! - */ -#define CONFIG_SYS_MONITOR_LEN PHYS_FLASH_SECT_SIZE -#define CONFIG_ENV_IS_IN_FLASH 1 -#define CONFIG_ENV_ADDR (PHYS_FLASH_1 + PHYS_FLASH_SECT_SIZE) -#define CONFIG_ENV_SECT_SIZE PHYS_FLASH_SECT_SIZE -#define CONFIG_ENV_SIZE (PHYS_FLASH_SECT_SIZE / 16) - - -/* - * FPGA Offsets - */ -#define WHOAMI_OFFSET 0x00 -#define HEXLED_OFFSET 0x10 -#define BLANKLED_OFFSET 0x40 -#define DISCRETELED_OFFSET 0x40 -#define CNFG_SWITCHES_OFFSET 0x50 -#define USER_SWITCHES_OFFSET 0x60 -#define MISC_WR_OFFSET 0x80 -#define MISC_RD_OFFSET 0x90 -#define INT_MASK_OFFSET 0xC0 -#define INT_CLEAR_OFFSET 0xD0 -#define GP_OFFSET 0x100 - -#endif /* __CONFIG_H */ -- cgit v1.2.3 From 538cf92c8c2e8ea7f78c87b5bfb2f705b4b02fa8 Mon Sep 17 00:00:00 2001 From: Daniel Schwierzeck Date: Thu, 10 Apr 2014 00:39:28 +0200 Subject: MIPS: drop incaip board This is dead hardware and no one is interested in making the necessary changes for upcoming features like generic board or driver model. Signed-off-by: Daniel Schwierzeck Cc: Wolfgang Denk --- MAKEALL | 4 - arch/mips/cpu/mips32/incaip/Makefile | 9 - arch/mips/cpu/mips32/incaip/asc_serial.c | 300 ---- arch/mips/cpu/mips32/incaip/asc_serial.h | 177 -- arch/mips/cpu/mips32/incaip/config.mk | 8 - arch/mips/cpu/mips32/incaip/incaip_clock.c | 100 -- arch/mips/cpu/mips32/incaip/incaip_wdt.S | 55 - arch/mips/include/asm/inca-ip.h | 2430 ---------------------------- arch/mips/include/asm/u-boot-mips.h | 2 - arch/mips/lib/board.c | 3 - board/incaip/Makefile | 9 - board/incaip/README | 57 - board/incaip/config.mk | 16 - board/incaip/flash.c | 655 -------- board/incaip/incaip.c | 110 -- board/incaip/lowlevel_init.S | 287 ---- boards.cfg | 4 - doc/README.scrapyard | 1 + drivers/net/Makefile | 1 - drivers/net/inca-ip_sw.c | 793 --------- include/common.h | 3 - include/configs/incaip.h | 177 -- include/netdev.h | 1 - 23 files changed, 1 insertion(+), 5201 deletions(-) delete mode 100644 arch/mips/cpu/mips32/incaip/Makefile delete mode 100644 arch/mips/cpu/mips32/incaip/asc_serial.c delete mode 100644 arch/mips/cpu/mips32/incaip/asc_serial.h delete mode 100644 arch/mips/cpu/mips32/incaip/config.mk delete mode 100644 arch/mips/cpu/mips32/incaip/incaip_clock.c delete mode 100644 arch/mips/cpu/mips32/incaip/incaip_wdt.S delete mode 100644 arch/mips/include/asm/inca-ip.h delete mode 100644 board/incaip/Makefile delete mode 100644 board/incaip/README delete mode 100644 board/incaip/config.mk delete mode 100644 board/incaip/flash.c delete mode 100644 board/incaip/incaip.c delete mode 100644 board/incaip/lowlevel_init.S delete mode 100644 drivers/net/inca-ip_sw.c delete mode 100644 include/configs/incaip.h (limited to 'board') diff --git a/MAKEALL b/MAKEALL index 705a0bb5e1a..c54240ced69 100755 --- a/MAKEALL +++ b/MAKEALL @@ -419,10 +419,6 @@ LIST_arm="$(targets_by_arch arm | \ ######################################################################### LIST_mips4kc=" \ - incaip \ - incaip_100MHz \ - incaip_133MHz \ - incaip_150MHz \ qemu_mips \ vct_platinum \ vct_platinum_small \ diff --git a/arch/mips/cpu/mips32/incaip/Makefile b/arch/mips/cpu/mips32/incaip/Makefile deleted file mode 100644 index 7341a4a3e88..00000000000 --- a/arch/mips/cpu/mips32/incaip/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -# -# (C) Copyright 2011 -# Wolfgang Denk, DENX Software Engineering, wd@denx.de. -# -# SPDX-License-Identifier: GPL-2.0+ -# - -obj-y = incaip_wdt.o -obj-y += incaip_clock.o asc_serial.o diff --git a/arch/mips/cpu/mips32/incaip/asc_serial.c b/arch/mips/cpu/mips32/incaip/asc_serial.c deleted file mode 100644 index 6f0e4f25201..00000000000 --- a/arch/mips/cpu/mips32/incaip/asc_serial.c +++ /dev/null @@ -1,300 +0,0 @@ -/* - * (INCA) ASC UART support - */ - -#include -#include -#include -#include -#include -#include "asc_serial.h" - - -#define SET_BIT(reg, mask) reg |= (mask) -#define CLEAR_BIT(reg, mask) reg &= (~mask) -#define CLEAR_BITS(reg, mask) CLEAR_BIT(reg, mask) -#define SET_BITS(reg, mask) SET_BIT(reg, mask) -#define SET_BITFIELD(reg, mask, off, val) {reg &= (~mask); reg |= (val << off);} - -extern uint incaip_get_fpiclk(void); - -static int serial_setopt (void); - -/* pointer to ASC register base address */ -static volatile incaAsc_t *pAsc = (incaAsc_t *)INCA_IP_ASC; - -/****************************************************************************** -* -* serial_init - initialize a INCAASC channel -* -* This routine initializes the number of data bits, parity -* and set the selected baud rate. Interrupts are disabled. -* Set the modem control signals if the option is selected. -* -* RETURNS: N/A -*/ - -static int asc_serial_init(void) -{ - /* we have to set PMU.EN13 bit to enable an ASC device*/ - INCAASC_PMU_ENABLE(13); - - /* and we have to set CLC register*/ - CLEAR_BIT(pAsc->asc_clc, ASCCLC_DISS); - SET_BITFIELD(pAsc->asc_clc, ASCCLC_RMCMASK, ASCCLC_RMCOFFSET, 0x0001); - - /* initialy we are in async mode */ - pAsc->asc_con = ASCCON_M_8ASYNC; - - /* select input port */ - pAsc->asc_pisel = (CONSOLE_TTY & 0x1); - - /* TXFIFO's filling level */ - SET_BITFIELD(pAsc->asc_txfcon, ASCTXFCON_TXFITLMASK, - ASCTXFCON_TXFITLOFF, INCAASC_TXFIFO_FL); - /* enable TXFIFO */ - SET_BIT(pAsc->asc_txfcon, ASCTXFCON_TXFEN); - - /* RXFIFO's filling level */ - SET_BITFIELD(pAsc->asc_txfcon, ASCRXFCON_RXFITLMASK, - ASCRXFCON_RXFITLOFF, INCAASC_RXFIFO_FL); - /* enable RXFIFO */ - SET_BIT(pAsc->asc_rxfcon, ASCRXFCON_RXFEN); - - /* enable error signals */ - SET_BIT(pAsc->asc_con, ASCCON_FEN); - SET_BIT(pAsc->asc_con, ASCCON_OEN); - - /* acknowledge ASC interrupts */ - ASC_INTERRUPTS_CLEAR(INCAASC_IRQ_LINE_ALL); - - /* disable ASC interrupts */ - ASC_INTERRUPTS_DISABLE(INCAASC_IRQ_LINE_ALL); - - /* set FIFOs into the transparent mode */ - SET_BIT(pAsc->asc_txfcon, ASCTXFCON_TXTMEN); - SET_BIT(pAsc->asc_rxfcon, ASCRXFCON_RXTMEN); - - /* set baud rate */ - serial_setbrg(); - - /* set the options */ - serial_setopt(); - - return 0; -} - -static void asc_serial_setbrg(void) -{ - ulong uiReloadValue, fdv; - ulong f_ASC; - - f_ASC = incaip_get_fpiclk(); - -#ifndef INCAASC_USE_FDV - fdv = 2; - uiReloadValue = (f_ASC / (fdv * 16 * CONFIG_BAUDRATE)) - 1; -#else - fdv = INCAASC_FDV_HIGH_BAUDRATE; - uiReloadValue = (f_ASC / (8192 * CONFIG_BAUDRATE / fdv)) - 1; -#endif /* INCAASC_USE_FDV */ - - if ( (uiReloadValue < 0) || (uiReloadValue > 8191) ) - { -#ifndef INCAASC_USE_FDV - fdv = 3; - uiReloadValue = (f_ASC / (fdv * 16 * CONFIG_BAUDRATE)) - 1; -#else - fdv = INCAASC_FDV_LOW_BAUDRATE; - uiReloadValue = (f_ASC / (8192 * CONFIG_BAUDRATE / fdv)) - 1; -#endif /* INCAASC_USE_FDV */ - - if ( (uiReloadValue < 0) || (uiReloadValue > 8191) ) - { - return; /* can't impossibly generate that baud rate */ - } - } - - /* Disable Baud Rate Generator; BG should only be written when R=0 */ - CLEAR_BIT(pAsc->asc_con, ASCCON_R); - -#ifndef INCAASC_USE_FDV - /* - * Disable Fractional Divider (FDE) - * Divide clock by reload-value + constant (BRS) - */ - /* FDE = 0 */ - CLEAR_BIT(pAsc->asc_con, ASCCON_FDE); - - if ( fdv == 2 ) - CLEAR_BIT(pAsc->asc_con, ASCCON_BRS); /* BRS = 0 */ - else - SET_BIT(pAsc->asc_con, ASCCON_BRS); /* BRS = 1 */ - -#else /* INCAASC_USE_FDV */ - - /* Enable Fractional Divider */ - SET_BIT(pAsc->asc_con, ASCCON_FDE); /* FDE = 1 */ - - /* Set fractional divider value */ - pAsc->asc_fdv = fdv & ASCFDV_VALUE_MASK; - -#endif /* INCAASC_USE_FDV */ - - /* Set reload value in BG */ - pAsc->asc_bg = uiReloadValue; - - /* Enable Baud Rate Generator */ - SET_BIT(pAsc->asc_con, ASCCON_R); /* R = 1 */ -} - -/******************************************************************************* -* -* serial_setopt - set the serial options -* -* Set the channel operating mode to that specified. Following options -* are supported: CREAD, CSIZE, PARENB, and PARODD. -* -* Note, this routine disables the transmitter. The calling routine -* may have to re-enable it. -* -* RETURNS: -* Returns 0 to indicate success, otherwise -1 is returned -*/ - -static int serial_setopt (void) -{ - ulong con; - - switch ( ASC_OPTIONS & ASCOPT_CSIZE ) - { - /* 7-bit-data */ - case ASCOPT_CS7: - con = ASCCON_M_7ASYNCPAR; /* 7-bit-data and parity bit */ - break; - - /* 8-bit-data */ - case ASCOPT_CS8: - if ( ASC_OPTIONS & ASCOPT_PARENB ) - con = ASCCON_M_8ASYNCPAR; /* 8-bit-data and parity bit */ - else - con = ASCCON_M_8ASYNC; /* 8-bit-data no parity */ - break; - - /* - * only 7 and 8-bit frames are supported - * if we don't use IOCTL extensions - */ - default: - return -1; - } - - if ( ASC_OPTIONS & ASCOPT_STOPB ) - SET_BIT(con, ASCCON_STP); /* 2 stop bits */ - else - CLEAR_BIT(con, ASCCON_STP); /* 1 stop bit */ - - if ( ASC_OPTIONS & ASCOPT_PARENB ) - SET_BIT(con, ASCCON_PEN); /* enable parity checking */ - else - CLEAR_BIT(con, ASCCON_PEN); /* disable parity checking */ - - if ( ASC_OPTIONS & ASCOPT_PARODD ) - SET_BIT(con, ASCCON_ODD); /* odd parity */ - else - CLEAR_BIT(con, ASCCON_ODD); /* even parity */ - - if ( ASC_OPTIONS & ASCOPT_CREAD ) - SET_BIT(pAsc->asc_whbcon, ASCWHBCON_SETREN); /* Receiver enable */ - - pAsc->asc_con |= con; - - return 0; -} - -static void asc_serial_putc(const char c) -{ - uint txFl = 0; - - if (c == '\n') serial_putc ('\r'); - - /* check do we have a free space in the TX FIFO */ - /* get current filling level */ - do - { - txFl = ( pAsc->asc_fstat & ASCFSTAT_TXFFLMASK ) >> ASCFSTAT_TXFFLOFF; - } - while ( txFl == INCAASC_TXFIFO_FULL ); - - pAsc->asc_tbuf = c; /* write char to Transmit Buffer Register */ - - /* check for errors */ - if ( pAsc->asc_con & ASCCON_OE ) - { - SET_BIT(pAsc->asc_whbcon, ASCWHBCON_CLROE); - return; - } -} - -static int asc_serial_getc(void) -{ - ulong symbol_mask; - char c; - - while (!serial_tstc()); - - symbol_mask = - ((ASC_OPTIONS & ASCOPT_CSIZE) == ASCOPT_CS7) ? (0x7f) : (0xff); - - c = (char)(pAsc->asc_rbuf & symbol_mask); - - return c; -} - -static int asc_serial_tstc(void) -{ - int res = 1; - - if ( (pAsc->asc_fstat & ASCFSTAT_RXFFLMASK) == 0 ) - { - res = 0; - } - else if ( pAsc->asc_con & ASCCON_FE ) - { - SET_BIT(pAsc->asc_whbcon, ASCWHBCON_CLRFE); - res = 0; - } - else if ( pAsc->asc_con & ASCCON_PE ) - { - SET_BIT(pAsc->asc_whbcon, ASCWHBCON_CLRPE); - res = 0; - } - else if ( pAsc->asc_con & ASCCON_OE ) - { - SET_BIT(pAsc->asc_whbcon, ASCWHBCON_CLROE); - res = 0; - } - - return res; -} - -static struct serial_device asc_serial_drv = { - .name = "asc_serial", - .start = asc_serial_init, - .stop = NULL, - .setbrg = asc_serial_setbrg, - .putc = asc_serial_putc, - .puts = default_serial_puts, - .getc = asc_serial_getc, - .tstc = asc_serial_tstc, -}; - -void asc_serial_initialize(void) -{ - serial_register(&asc_serial_drv); -} - -__weak struct serial_device *default_serial_console(void) -{ - return &asc_serial_drv; -} diff --git a/arch/mips/cpu/mips32/incaip/asc_serial.h b/arch/mips/cpu/mips32/incaip/asc_serial.h deleted file mode 100644 index 7ffdcfaf8b7..00000000000 --- a/arch/mips/cpu/mips32/incaip/asc_serial.h +++ /dev/null @@ -1,177 +0,0 @@ -/* incaAscSio.h - (INCA) ASC UART tty driver header */ - -#ifndef __INCincaAscSioh -#define __INCincaAscSioh - -#include - -/* channel operating modes */ -#define ASCOPT_CSIZE 0x00000003 -#define ASCOPT_CS7 0x00000001 -#define ASCOPT_CS8 0x00000002 -#define ASCOPT_PARENB 0x00000004 -#define ASCOPT_STOPB 0x00000008 -#define ASCOPT_PARODD 0x00000010 -#define ASCOPT_CREAD 0x00000020 - -#define ASC_OPTIONS (ASCOPT_CREAD | ASCOPT_CS8) - -/* ASC input select (0 or 1) */ -#define CONSOLE_TTY 0 - -/* use fractional divider for baudrate settings */ -#define INCAASC_USE_FDV - -#ifdef INCAASC_USE_FDV - #define INCAASC_FDV_LOW_BAUDRATE 71 - #define INCAASC_FDV_HIGH_BAUDRATE 453 -#endif /*INCAASC_USE_FDV*/ - - -#define INCAASC_TXFIFO_FL 1 -#define INCAASC_RXFIFO_FL 1 -#define INCAASC_TXFIFO_FULL 16 - -/* interrupt lines masks for the ASC device interrupts*/ -/* change these macroses if it's necessary */ -#define INCAASC_IRQ_LINE_ALL 0x000F0000 /* all IRQs */ - -#define INCAASC_IRQ_LINE_TIR 0x00010000 /* TIR - Tx */ -#define INCAASC_IRQ_LINE_RIR 0x00020000 /* RIR - Rx */ -#define INCAASC_IRQ_LINE_EIR 0x00040000 /* EIR - Err */ -#define INCAASC_IRQ_LINE_TBIR 0x00080000 /* TBIR - Tx Buf*/ - -/* interrupt controller access macros */ -#define ASC_INTERRUPTS_ENABLE(X) \ - *((volatile unsigned int*) INCA_IP_ICU_IM2_IER) |= X; -#define ASC_INTERRUPTS_DISABLE(X) \ - *((volatile unsigned int*) INCA_IP_ICU_IM2_IER) &= ~X; -#define ASC_INTERRUPTS_CLEAR(X) \ - *((volatile unsigned int*) INCA_IP_ICU_IM2_ISR) = X; - -/* CLC register's bits and bitfields */ -#define ASCCLC_DISR 0x00000001 -#define ASCCLC_DISS 0x00000002 -#define ASCCLC_RMCMASK 0x0000FF00 -#define ASCCLC_RMCOFFSET 8 - -/* CON register's bits and bitfields */ -#define ASCCON_MODEMASK 0x0007 - #define ASCCON_M_8SYNC 0x0 - #define ASCCON_M_8ASYNC 0x1 - #define ASCCON_M_8IRDAASYNC 0x2 - #define ASCCON_M_7ASYNCPAR 0x3 - #define ASCCON_M_9ASYNC 0x4 - #define ASCCON_M_8WAKEUPASYNC 0x5 - #define ASCCON_M_8ASYNCPAR 0x7 -#define ASCCON_STP 0x0008 -#define ASCCON_REN 0x0010 -#define ASCCON_PEN 0x0020 -#define ASCCON_FEN 0x0040 -#define ASCCON_OEN 0x0080 -#define ASCCON_PE 0x0100 -#define ASCCON_FE 0x0200 -#define ASCCON_OE 0x0400 -#define ASCCON_FDE 0x0800 -#define ASCCON_ODD 0x1000 -#define ASCCON_BRS 0x2000 -#define ASCCON_LB 0x4000 -#define ASCCON_R 0x8000 - -/* WHBCON register's bits and bitfields */ -#define ASCWHBCON_CLRREN 0x0010 -#define ASCWHBCON_SETREN 0x0020 -#define ASCWHBCON_CLRPE 0x0100 -#define ASCWHBCON_CLRFE 0x0200 -#define ASCWHBCON_CLROE 0x0400 -#define ASCWHBCON_SETPE 0x0800 -#define ASCWHBCON_SETFE 0x1000 -#define ASCWHBCON_SETOE 0x2000 - -/* ABCON register's bits and bitfields */ -#define ASCABCON_ABEN 0x0001 -#define ASCABCON_AUREN 0x0002 -#define ASCABCON_ABSTEN 0x0004 -#define ASCABCON_ABDETEN 0x0008 -#define ASCABCON_FCDETEN 0x0010 -#define ASCABCON_EMMASK 0x0300 - #define ASCABCON_EMOFF 8 - #define ASCABCON_EM_DISAB 0x0 - #define ASCABCON_EM_DURAB 0x1 - #define ASCABCON_EM_ALWAYS 0x2 -#define ASCABCON_TXINV 0x0400 -#define ASCABCON_RXINV 0x0800 - -/* FDV register mask, offset and bitfields*/ -#define ASCFDV_VALUE_MASK 0x000001FF - -/* WHBABCON register's bits and bitfields */ -#define ASCWHBABCON_SETABEN 0x0001 -#define ASCWHBABCON_CLRABEN 0x0002 - -/* ABSTAT register's bits and bitfields */ -#define ASCABSTAT_FCSDET 0x0001 -#define ASCABSTAT_FCCDET 0x0002 -#define ASCABSTAT_SCSDET 0x0004 -#define ASCABSTAT_SCCDET 0x0008 -#define ASCABSTAT_DETWAIT 0x0010 - -/* WHBABSTAT register's bits and bitfields */ -#define ASCWHBABSTAT_CLRFCSDET 0x0001 -#define ASCWHBABSTAT_SETFCSDET 0x0002 -#define ASCWHBABSTAT_CLRFCCDET 0x0004 -#define ASCWHBABSTAT_SETFCCDET 0x0008 -#define ASCWHBABSTAT_CLRSCSDET 0x0010 -#define ASCWHBABSTAT_SETSCSDET 0x0020 -#define ASCWHBABSTAT_SETSCCDET 0x0040 -#define ASCWHBABSTAT_CLRSCCDET 0x0080 -#define ASCWHBABSTAT_CLRDETWAIT 0x0100 -#define ASCWHBABSTAT_SETDETWAIT 0x0200 - -/* TXFCON register's bits and bitfields */ -#define ASCTXFCON_TXFEN 0x0001 -#define ASCTXFCON_TXFFLU 0x0002 -#define ASCTXFCON_TXTMEN 0x0004 -#define ASCTXFCON_TXFITLMASK 0x3F00 -#define ASCTXFCON_TXFITLOFF 8 - -/* RXFCON register's bits and bitfields */ -#define ASCRXFCON_RXFEN 0x0001 -#define ASCRXFCON_RXFFLU 0x0002 -#define ASCRXFCON_RXTMEN 0x0004 -#define ASCRXFCON_RXFITLMASK 0x3F00 -#define ASCRXFCON_RXFITLOFF 8 - -/* FSTAT register's bits and bitfields */ -#define ASCFSTAT_RXFFLMASK 0x003F -#define ASCFSTAT_TXFFLMASK 0x3F00 -#define ASCFSTAT_TXFFLOFF 8 - -#define INCAASC_PMU_ENABLE(BIT) *((volatile ulong*)0xBF102000) |= (0x1 << BIT); - -typedef struct /* incaAsc_t */ -{ - volatile unsigned long asc_clc; /*0x0000*/ - volatile unsigned long asc_pisel; /*0x0004*/ - volatile unsigned long asc_rsvd1[2]; /* for mapping */ /*0x0008*/ - volatile unsigned long asc_con; /*0x0010*/ - volatile unsigned long asc_bg; /*0x0014*/ - volatile unsigned long asc_fdv; /*0x0018*/ - volatile unsigned long asc_pmw; /* not used */ /*0x001C*/ - volatile unsigned long asc_tbuf; /*0x0020*/ - volatile unsigned long asc_rbuf; /*0x0024*/ - volatile unsigned long asc_rsvd2[2]; /* for mapping */ /*0x0028*/ - volatile unsigned long asc_abcon; /*0x0030*/ - volatile unsigned long asc_abstat; /* not used */ /*0x0034*/ - volatile unsigned long asc_rsvd3[2]; /* for mapping */ /*0x0038*/ - volatile unsigned long asc_rxfcon; /*0x0040*/ - volatile unsigned long asc_txfcon; /*0x0044*/ - volatile unsigned long asc_fstat; /*0x0048*/ - volatile unsigned long asc_rsvd4; /* for mapping */ /*0x004C*/ - volatile unsigned long asc_whbcon; /*0x0050*/ - volatile unsigned long asc_whbabcon; /*0x0054*/ - volatile unsigned long asc_whbabstat; /* not used */ /*0x0058*/ - -} incaAsc_t; - -#endif /* __INCincaAscSioh */ diff --git a/arch/mips/cpu/mips32/incaip/config.mk b/arch/mips/cpu/mips32/incaip/config.mk deleted file mode 100644 index 5c89129d8cf..00000000000 --- a/arch/mips/cpu/mips32/incaip/config.mk +++ /dev/null @@ -1,8 +0,0 @@ -# -# (C) Copyright 2011 -# Wolfgang Denk, DENX Software Engineering, wd@denx.de. -# -# SPDX-License-Identifier: GPL-2.0+ -# - -PLATFORM_CPPFLAGS += -mtune=4kc diff --git a/arch/mips/cpu/mips32/incaip/incaip_clock.c b/arch/mips/cpu/mips32/incaip/incaip_clock.c deleted file mode 100644 index efada9f6f8d..00000000000 --- a/arch/mips/cpu/mips32/incaip/incaip_clock.c +++ /dev/null @@ -1,100 +0,0 @@ -/* - * (C) Copyright 2003 - * Wolfgang Denk, DENX Software Engineering, wd@denx.de. - * - * SPDX-License-Identifier: GPL-2.0+ - */ - -#include -#include - - -/******************************************************************************* -* -* get_cpuclk - returns the frequency of the CPU. -* -* Gets the value directly from the INCA-IP hardware. -* -* RETURNS: -* 150.000.000 for 150 MHz -* 133.333.333 for 133 MHz (= 400MHz/3) -* 100.000.000 for 100 MHz (= 400MHz/4) -* NOTE: -* This functions should be used by the hardware driver to get the correct -* frequency of the CPU. Don't use the macros, which are set to init the CPU -* frequency in the ROM code. -*/ -uint incaip_get_cpuclk (void) -{ - /*-------------------------------------------------------------------------*/ - /* CPU Clock Input Multiplexer (MUX I) */ - /* Multiplexer MUX I selects the maximum input clock to the CPU. */ - /*-------------------------------------------------------------------------*/ - if (*((volatile ulong *) INCA_IP_CGU_CGU_MUXCR) & - INCA_IP_CGU_CGU_MUXCR_MUXI) { - /* MUX I set to 150 MHz clock */ - return 150000000; - } else { - /* MUX I set to 100/133 MHz clock */ - if (*((volatile ulong *) INCA_IP_CGU_CGU_DIVCR) & 0x40) { - /* Division value is 1/3, maximum CPU operating */ - /* frequency is 133.3 MHz */ - return 133333333; - } else { - /* Division value is 1/4, maximum CPU operating */ - /* frequency is 100 MHz */ - return 100000000; - } - } -} - -/******************************************************************************* -* -* get_fpiclk - returns the frequency of the FPI bus. -* -* Gets the value directly from the INCA-IP hardware. -* -* RETURNS: Frquency in Hz -* -* NOTE: -* This functions should be used by the hardware driver to get the correct -* frequency of the CPU. Don't use the macros, which are set to init the CPU -* frequency in the ROM code. -* The calculation for the -*/ -uint incaip_get_fpiclk (void) -{ - uint clkCPU; - - clkCPU = incaip_get_cpuclk (); - - switch (*((volatile ulong *) INCA_IP_CGU_CGU_DIVCR) & 0xC) { - case 0x4: - return clkCPU >> 1; /* devided by 2 */ - break; - case 0x8: - return clkCPU >> 2; /* devided by 4 */ - break; - default: - return clkCPU; - break; - } -} - -int incaip_set_cpuclk (void) -{ - extern void ebu_init(long); - extern void cgu_init(long); - extern void sdram_init(long); - char tmp[64]; - ulong cpuclk; - - if (getenv_f("cpuclk", tmp, sizeof (tmp)) > 0) { - cpuclk = simple_strtoul (tmp, NULL, 10) * 1000000; - cgu_init (cpuclk); - ebu_init (cpuclk); - sdram_init (cpuclk); - } - - return 0; -} diff --git a/arch/mips/cpu/mips32/incaip/incaip_wdt.S b/arch/mips/cpu/mips32/incaip/incaip_wdt.S deleted file mode 100644 index b15320a57cf..00000000000 --- a/arch/mips/cpu/mips32/incaip/incaip_wdt.S +++ /dev/null @@ -1,55 +0,0 @@ -/* - * INCA-IP Watchdog timer management code. - * - * Copyright (c) 2003 Wolfgang Denk - * - * SPDX-License-Identifier: GPL-2.0+ - */ - - -#include -#include - - -#define WD_BASE 0xb8000000 -#define WD_CON0(value) 0x0020(value) -#define WD_CON1(value) 0x0024(value) -#define WD_DISABLE 0x00000008 -#define WD_ENABLE 0x00000000 -#define WD_WRITE_PW 0xFFFC00F8 -#define WD_WRITE_ENDINIT 0xFFFC00F3 -#define WD_WRITE_INIT 0xFFFC00F2 - - - .globl disable_incaip_wdt -disable_incaip_wdt: - li t0, WD_BASE - - /* Calculate password. - */ - lw t2, WD_CON1(t0) - and t2, 0xC - - lw t3, WD_CON0(t0) - and t3, 0xFFFFFF01 - - or t3, t2 - or t3, 0xF0 - - sw t3, WD_CON0(t0) /* write password */ - - /* Clear ENDINIT. - */ - li t1, WD_WRITE_INIT - sw t1, WD_CON0(t0) - - - li t1, WD_DISABLE - sw t1, WD_CON1(t0) /* disable watchdog */ - li t1, WD_WRITE_PW - sw t1, WD_CON0(t0) /* write password */ - li t1, WD_WRITE_ENDINIT - sw t1, WD_CON0(t0) /* end command */ - - jr ra - nop diff --git a/arch/mips/include/asm/inca-ip.h b/arch/mips/include/asm/inca-ip.h deleted file mode 100644 index 5f03e2aa201..00000000000 --- a/arch/mips/include/asm/inca-ip.h +++ /dev/null @@ -1,2430 +0,0 @@ -/****************************************************************************** - Copyright (c) 2002, Infineon Technologies. All rights reserved. - - No Warranty - Because the program is licensed free of charge, there is no warranty for - the program, to the extent permitted by applicable law. Except when - otherwise stated in writing the copyright holders and/or other parties - provide the program "as is" without warranty of any kind, either - expressed or implied, including, but not limited to, the implied - warranties of merchantability and fitness for a particular purpose. The - entire risk as to the quality and performance of the program is with - you. should the program prove defective, you assume the cost of all - necessary servicing, repair or correction. - - In no event unless required by applicable law or agreed to in writing - will any copyright holder, or any other party who may modify and/or - redistribute the program as permitted above, be liable to you for - damages, including any general, special, incidental or consequential - damages arising out of the use or inability to use the program - (including but not limited to loss of data or data being rendered - inaccurate or losses sustained by you or third parties or a failure of - the program to operate with any other programs), even if such holder or - other party has been advised of the possibility of such damages. -******************************************************************************/ - - -/***********************************************************************/ -/* Module : WDT register address and bits */ -/***********************************************************************/ - -#define INCA_IP_WDT (0xB8000000) -/***********************************************************************/ - - -/***Reset Status Register Power On***/ -#define INCA_IP_WDT_RST_SR ((volatile u32*)(INCA_IP_WDT+ 0x0014)) - -/***Reset Request Register***/ -#define INCA_IP_WDT_RST_REQ ((volatile u32*)(INCA_IP_WDT+ 0x0010)) -#define INCA_IP_WDT_RST_REQ_SWBOOT (1 << 24) -#define INCA_IP_WDT_RST_REQ_SWCFG (1 << 16) -#define INCA_IP_WDT_RST_REQ_RRPHY (1 << 5) -#define INCA_IP_WDT_RST_REQ_RRHSP (1 << 4) -#define INCA_IP_WDT_RST_REQ_RRFPI (1 << 3) -#define INCA_IP_WDT_RST_REQ_RREXT (1 << 2) -#define INCA_IP_WDT_RST_REQ_RRDSP (1 << 1) -#define INCA_IP_WDT_RST_REQ_RRCPU (1 << 0) - -/***NMI Status Register***/ -#define INCA_IP_WDT_NMISR ((volatile u32*)(INCA_IP_WDT+ 0x002C)) -#define INCA_IP_WDT_NMISR_NMIWDT (1 << 2) -#define INCA_IP_WDT_NMISR_NMIPLL (1 << 1) -#define INCA_IP_WDT_NMISR_NMIEXT (1 << 0) - -/***Manufacturer Identification Register***/ -#define INCA_IP_WDT_MANID ((volatile u32*)(INCA_IP_WDT+ 0x0070)) -#define INCA_IP_WDT_MANID_MANUF (value) (((( 1 << 11) - 1) & (value)) << 5) - -/***Chip Identification Register***/ -#define INCA_IP_WDT_CHIPID ((volatile u32*)(INCA_IP_WDT+ 0x0074)) -#define INCA_IP_WDT_CHIPID_VERSION (value) (((( 1 << 4) - 1) & (value)) << 28) -#define INCA_IP_WDT_CHIPID_PART_NUMBER (value) (((( 1 << 16) - 1) & (value)) << 12) -#define INCA_IP_WDT_CHIPID_MANID (value) (((( 1 << 11) - 1) & (value)) << 1) - -/***Redesign Tracing Identification Register***/ -#define INCA_IP_WDT_RTID ((volatile u32*)(INCA_IP_WDT+ 0x0078)) -#define INCA_IP_WDT_RTID_LC (1 << 15) -#define INCA_IP_WDT_RTID_RIX (value) (((( 1 << 3) - 1) & (value)) << 0) - -/***Watchdog Timer Control Register 0***/ -#define INCA_IP_WDT_WDT_CON0 ((volatile u32*)(INCA_IP_WDT+ 0x0020)) - -/***Watchdog Timer Control Register 1***/ -#define INCA_IP_WDT_WDT_CON1 ((volatile u32*)(INCA_IP_WDT+ 0x0024)) -#define INCA_IP_WDT_WDT_CON1_WDTDR (1 << 3) -#define INCA_IP_WDT_WDT_CON1_WDTIR (1 << 2) - -/***Watchdog Timer Status Register***/ -#define INCA_IP_WDT_WDT_SR ((volatile u32*)(INCA_IP_WDT+ 0x0028)) -#define INCA_IP_WDT_WDT_SR_WDTTIM (value) (((( 1 << 16) - 1) & (value)) << 16) -#define INCA_IP_WDT_WDT_SR_WDTPR (1 << 5) -#define INCA_IP_WDT_WDT_SR_WDTTO (1 << 4) -#define INCA_IP_WDT_WDT_SR_WDTDS (1 << 3) -#define INCA_IP_WDT_WDT_SR_WDTIS (1 << 2) -#define INCA_IP_WDT_WDT_SR_WDTOE (1 << 1) -#define INCA_IP_WDT_WDT_SR_WDTAE (1 << 0) - -/***********************************************************************/ -/* Module : CGU register address and bits */ -/***********************************************************************/ - -#define INCA_IP_CGU (0xBF107000) -/***********************************************************************/ - - -/***CGU PLL1 Control Register***/ -#define INCA_IP_CGU_CGU_PLL1CR ((volatile u32*)(INCA_IP_CGU+ 0x0008)) -#define INCA_IP_CGU_CGU_PLL1CR_SWRST (1 << 31) -#define INCA_IP_CGU_CGU_PLL1CR_EN (1 << 30) -#define INCA_IP_CGU_CGU_PLL1CR_NDIV (value) (((( 1 << 6) - 1) & (value)) << 16) -#define INCA_IP_CGU_CGU_PLL1CR_MDIV (value) (((( 1 << 4) - 1) & (value)) << 0) - -/***CGU PLL0 Control Register***/ -#define INCA_IP_CGU_CGU_PLL0CR ((volatile u32*)(INCA_IP_CGU+ 0x0000)) -#define INCA_IP_CGU_CGU_PLL0CR_SWRST (1 << 31) -#define INCA_IP_CGU_CGU_PLL0CR_EN (1 << 30) -#define INCA_IP_CGU_CGU_PLL0CR_NDIV (value) (((( 1 << 6) - 1) & (value)) << 16) -#define INCA_IP_CGU_CGU_PLL0CR_MDIV (value) (((( 1 << 4) - 1) & (value)) << 0) - -/***CGU PLL0 Status Register***/ -#define INCA_IP_CGU_CGU_PLL0SR ((volatile u32*)(INCA_IP_CGU+ 0x0004)) -#define INCA_IP_CGU_CGU_PLL0SR_LOCK (1 << 31) -#define INCA_IP_CGU_CGU_PLL0SR_RCF (1 << 29) -#define INCA_IP_CGU_CGU_PLL0SR_PLLBYP (1 << 15) - -/***CGU PLL1 Status Register***/ -#define INCA_IP_CGU_CGU_PLL1SR ((volatile u32*)(INCA_IP_CGU+ 0x000C)) -#define INCA_IP_CGU_CGU_PLL1SR_LOCK (1 << 31) -#define INCA_IP_CGU_CGU_PLL1SR_RCF (1 << 29) -#define INCA_IP_CGU_CGU_PLL1SR_PLLBYP (1 << 15) - -/***CGU Divider Control Register***/ -#define INCA_IP_CGU_CGU_DIVCR ((volatile u32*)(INCA_IP_CGU+ 0x0010)) - -/***CGU Multiplexer Control Register***/ -#define INCA_IP_CGU_CGU_MUXCR ((volatile u32*)(INCA_IP_CGU+ 0x0014)) -#define INCA_IP_CGU_CGU_MUXCR_SWRST (1 << 31) -#define INCA_IP_CGU_CGU_MUXCR_MUXII (1 << 1) -#define INCA_IP_CGU_CGU_MUXCR_MUXI (1 << 0) - -/***CGU Fractional Divider Control Register***/ -#define INCA_IP_CGU_CGU_FDCR ((volatile u32*)(INCA_IP_CGU+ 0x0018)) -#define INCA_IP_CGU_CGU_FDCR_FDEN (1 << 31) -#define INCA_IP_CGU_CGU_FDCR_INTEGER (value) (((( 1 << 12) - 1) & (value)) << 16) -#define INCA_IP_CGU_CGU_FDCR_FRACTION (value) (((( 1 << 16) - 1) & (value)) << 0) - -/***********************************************************************/ -/* Module : PMU register address and bits */ -/***********************************************************************/ - -#define INCA_IP_PMU (0xBF102000) -/***********************************************************************/ - - -/***PM Global Enable Register***/ -#define INCA_IP_PMU_PM_GEN ((volatile u32*)(INCA_IP_PMU+ 0x0000)) -#define INCA_IP_PMU_PM_GEN_EN16 (1 << 16) -#define INCA_IP_PMU_PM_GEN_EN15 (1 << 15) -#define INCA_IP_PMU_PM_GEN_EN14 (1 << 14) -#define INCA_IP_PMU_PM_GEN_EN13 (1 << 13) -#define INCA_IP_PMU_PM_GEN_EN12 (1 << 12) -#define INCA_IP_PMU_PM_GEN_EN11 (1 << 11) -#define INCA_IP_PMU_PM_GEN_EN10 (1 << 10) -#define INCA_IP_PMU_PM_GEN_EN9 (1 << 9) -#define INCA_IP_PMU_PM_GEN_EN8 (1 << 8) -#define INCA_IP_PMU_PM_GEN_EN7 (1 << 7) -#define INCA_IP_PMU_PM_GEN_EN6 (1 << 6) -#define INCA_IP_PMU_PM_GEN_EN5 (1 << 5) -#define INCA_IP_PMU_PM_GEN_EN4 (1 << 4) -#define INCA_IP_PMU_PM_GEN_EN3 (1 << 3) -#define INCA_IP_PMU_PM_GEN_EN2 (1 << 2) -#define INCA_IP_PMU_PM_GEN_EN0 (1 << 0) - -/***PM Power Down Enable Register***/ -#define INCA_IP_PMU_PM_PDEN ((volatile u32*)(INCA_IP_PMU+ 0x0008)) -#define INCA_IP_PMU_PM_PDEN_EN16 (1 << 16) -#define INCA_IP_PMU_PM_PDEN_EN15 (1 << 15) -#define INCA_IP_PMU_PM_PDEN_EN14 (1 << 14) -#define INCA_IP_PMU_PM_PDEN_EN13 (1 << 13) -#define INCA_IP_PMU_PM_PDEN_EN12 (1 << 12) -#define INCA_IP_PMU_PM_PDEN_EN11 (1 << 11) -#define INCA_IP_PMU_PM_PDEN_EN10 (1 << 10) -#define INCA_IP_PMU_PM_PDEN_EN9 (1 << 9) -#define INCA_IP_PMU_PM_PDEN_EN8 (1 << 8) -#define INCA_IP_PMU_PM_PDEN_EN7 (1 << 7) -#define INCA_IP_PMU_PM_PDEN_EN5 (1 << 5) -#define INCA_IP_PMU_PM_PDEN_EN4 (1 << 4) -#define INCA_IP_PMU_PM_PDEN_EN3 (1 << 3) -#define INCA_IP_PMU_PM_PDEN_EN2 (1 << 2) -#define INCA_IP_PMU_PM_PDEN_EN0 (1 << 0) - -/***PM Wake-Up from Power Down Register***/ -#define INCA_IP_PMU_PM_WUP ((volatile u32*)(INCA_IP_PMU+ 0x0010)) -#define INCA_IP_PMU_PM_WUP_WUP16 (1 << 16) -#define INCA_IP_PMU_PM_WUP_WUP15 (1 << 15) -#define INCA_IP_PMU_PM_WUP_WUP14 (1 << 14) -#define INCA_IP_PMU_PM_WUP_WUP13 (1 << 13) -#define INCA_IP_PMU_PM_WUP_WUP12 (1 << 12) -#define INCA_IP_PMU_PM_WUP_WUP11 (1 << 11) -#define INCA_IP_PMU_PM_WUP_WUP10 (1 << 10) -#define INCA_IP_PMU_PM_WUP_WUP9 (1 << 9) -#define INCA_IP_PMU_PM_WUP_WUP8 (1 << 8) -#define INCA_IP_PMU_PM_WUP_WUP7 (1 << 7) -#define INCA_IP_PMU_PM_WUP_WUP5 (1 << 5) -#define INCA_IP_PMU_PM_WUP_WUP4 (1 << 4) -#define INCA_IP_PMU_PM_WUP_WUP3 (1 << 3) -#define INCA_IP_PMU_PM_WUP_WUP2 (1 << 2) -#define INCA_IP_PMU_PM_WUP_WUP0 (1 << 0) - -/***PM Control Register***/ -#define INCA_IP_PMU_PM_CR ((volatile u32*)(INCA_IP_PMU+ 0x0014)) -#define INCA_IP_PMU_PM_CR_AWEN (1 << 31) -#define INCA_IP_PMU_PM_CR_SWRST (1 << 30) -#define INCA_IP_PMU_PM_CR_SWCR (1 << 2) -#define INCA_IP_PMU_PM_CR_CRD (value) (((( 1 << 2) - 1) & (value)) << 0) - -/***********************************************************************/ -/* Module : BCU register address and bits */ -/***********************************************************************/ - -#define INCA_IP_BCU (0xB8000100) -/***********************************************************************/ - - -/***BCU Control Register (0010H)***/ -#define INCA_IP_BCU_BCU_CON ((volatile u32*)(INCA_IP_BCU+ 0x0010)) -#define INCA_IP_BCU_BCU_CON_SPC (value) (((( 1 << 8) - 1) & (value)) << 24) -#define INCA_IP_BCU_BCU_CON_SPE (1 << 19) -#define INCA_IP_BCU_BCU_CON_PSE (1 << 18) -#define INCA_IP_BCU_BCU_CON_DBG (1 << 16) -#define INCA_IP_BCU_BCU_CON_TOUT (value) (((( 1 << 16) - 1) & (value)) << 0) - -/***BCU Error Control Capture Register (0020H)***/ -#define INCA_IP_BCU_BCU_ECON ((volatile u32*)(INCA_IP_BCU+ 0x0020)) -#define INCA_IP_BCU_BCU_ECON_TAG (value) (((( 1 << 4) - 1) & (value)) << 24) -#define INCA_IP_BCU_BCU_ECON_RDN (1 << 23) -#define INCA_IP_BCU_BCU_ECON_WRN (1 << 22) -#define INCA_IP_BCU_BCU_ECON_SVM (1 << 21) -#define INCA_IP_BCU_BCU_ECON_ACK (value) (((( 1 << 2) - 1) & (value)) << 19) -#define INCA_IP_BCU_BCU_ECON_ABT (1 << 18) -#define INCA_IP_BCU_BCU_ECON_RDY (1 << 17) -#define INCA_IP_BCU_BCU_ECON_TOUT (1 << 16) -#define INCA_IP_BCU_BCU_ECON_ERRCNT (value) (((( 1 << 16) - 1) & (value)) << 0) -#define INCA_IP_BCU_BCU_ECON_OPC (value) (((( 1 << 4) - 1) & (value)) << 28) - -/***BCU Error Address Capture Register (0024 H)***/ -#define INCA_IP_BCU_BCU_EADD ((volatile u32*)(INCA_IP_BCU+ 0x0024)) -#define INCA_IP_BCU_BCU_EADD_FPIADR - -/***BCU Error Data Capture Register (0028H)***/ -#define INCA_IP_BCU_BCU_EDAT ((volatile u32*)(INCA_IP_BCU+ 0x0028)) -#define INCA_IP_BCU_BCU_EDAT_FPIDAT - -/***********************************************************************/ -/* Module : MBC register address and bits */ -/***********************************************************************/ - -#define INCA_IP_MBC (0xBF103000) -/***********************************************************************/ - - -/***Mailbox CPU Configuration Register***/ -#define INCA_IP_MBC_MBC_CFG ((volatile u32*)(INCA_IP_MBC+ 0x0080)) -#define INCA_IP_MBC_MBC_CFG_SWAP (value) (((( 1 << 2) - 1) & (value)) << 6) -#define INCA_IP_MBC_MBC_CFG_RES (1 << 5) -#define INCA_IP_MBC_MBC_CFG_FWID (value) (((( 1 << 4) - 1) & (value)) << 1) -#define INCA_IP_MBC_MBC_CFG_SIZE (1 << 0) - -/***Mailbox CPU Interrupt Status Register***/ -#define INCA_IP_MBC_MBC_ISR ((volatile u32*)(INCA_IP_MBC+ 0x0084)) -#define INCA_IP_MBC_MBC_ISR_B3DA (1 << 31) -#define INCA_IP_MBC_MBC_ISR_B2DA (1 << 30) -#define INCA_IP_MBC_MBC_ISR_B1E (1 << 29) -#define INCA_IP_MBC_MBC_ISR_B0E (1 << 28) -#define INCA_IP_MBC_MBC_ISR_WDT (1 << 27) -#define INCA_IP_MBC_MBC_ISR_DS260 (value) (((( 1 << 27) - 1) & (value)) << 0) - -/***Mailbox CPU Mask Register***/ -#define INCA_IP_MBC_MBC_MSK ((volatile u32*)(INCA_IP_MBC+ 0x0088)) -#define INCA_IP_MBC_MBC_MSK_B3DA (1 << 31) -#define INCA_IP_MBC_MBC_MSK_B2DA (1 << 30) -#define INCA_IP_MBC_MBC_MSK_B1E (1 << 29) -#define INCA_IP_MBC_MBC_MSK_B0E (1 << 28) -#define INCA_IP_MBC_MBC_MSK_WDT (1 << 27) -#define INCA_IP_MBC_MBC_MSK_DS260 (value) (((( 1 << 27) - 1) & (value)) << 0) - -/***Mailbox CPU Mask 01 Register***/ -#define INCA_IP_MBC_MBC_MSK01 ((volatile u32*)(INCA_IP_MBC+ 0x008C)) -#define INCA_IP_MBC_MBC_MSK01_B3DA (1 << 31) -#define INCA_IP_MBC_MBC_MSK01_B2DA (1 << 30) -#define INCA_IP_MBC_MBC_MSK01_B1E (1 << 29) -#define INCA_IP_MBC_MBC_MSK01_B0E (1 << 28) -#define INCA_IP_MBC_MBC_MSK01_WDT (1 << 27) -#define INCA_IP_MBC_MBC_MSK01_DS260 (value) (((( 1 << 27) - 1) & (value)) << 0) - -/***Mailbox CPU Mask 10 Register***/ -#define INCA_IP_MBC_MBC_MSK10 ((volatile u32*)(INCA_IP_MBC+ 0x0090)) -#define INCA_IP_MBC_MBC_MSK10_B3DA (1 << 31) -#define INCA_IP_MBC_MBC_MSK10_B2DA (1 << 30) -#define INCA_IP_MBC_MBC_MSK10_B1E (1 << 29) -#define INCA_IP_MBC_MBC_MSK10_B0E (1 << 28) -#define INCA_IP_MBC_MBC_MSK10_WDT (1 << 27) -#define INCA_IP_MBC_MBC_MSK10_DS260 (value) (((( 1 << 27) - 1) & (value)) << 0) - -/***Mailbox CPU Short Command Register***/ -#define INCA_IP_MBC_MBC_CMD ((volatile u32*)(INCA_IP_MBC+ 0x0094)) -#define INCA_IP_MBC_MBC_CMD_CS270 (value) (((( 1 << 28) - 1) & (value)) << 0) - -/***Mailbox CPU Input Data of Buffer 0***/ -#define INCA_IP_MBC_MBC_ID0 ((volatile u32*)(INCA_IP_MBC+ 0x0000)) -#define INCA_IP_MBC_MBC_ID0_INDATA - -/***Mailbox CPU Input Data of Buffer 1***/ -#define INCA_IP_MBC_MBC_ID1 ((volatile u32*)(INCA_IP_MBC+ 0x0020)) -#define INCA_IP_MBC_MBC_ID1_INDATA - -/***Mailbox CPU Output Data of Buffer 2***/ -#define INCA_IP_MBC_MBC_OD2 ((volatile u32*)(INCA_IP_MBC+ 0x0040)) -#define INCA_IP_MBC_MBC_OD2_OUTDATA - -/***Mailbox CPU Output Data of Buffer 3***/ -#define INCA_IP_MBC_MBC_OD3 ((volatile u32*)(INCA_IP_MBC+ 0x0060)) -#define INCA_IP_MBC_MBC_OD3_OUTDATA - -/***Mailbox CPU Control Register of Buffer 0***/ -#define INCA_IP_MBC_MBC_CR0 ((volatile u32*)(INCA_IP_MBC+ 0x0004)) -#define INCA_IP_MBC_MBC_CR0_RDYABTFLS (value) (((( 1 << 3) - 1) & (value)) << 0) - -/***Mailbox CPU Control Register of Buffer 1***/ -#define INCA_IP_MBC_MBC_CR1 ((volatile u32*)(INCA_IP_MBC+ 0x0024)) -#define INCA_IP_MBC_MBC_CR1_RDYABTFLS (value) (((( 1 << 3) - 1) & (value)) << 0) - -/***Mailbox CPU Control Register of Buffer 2***/ -#define INCA_IP_MBC_MBC_CR2 ((volatile u32*)(INCA_IP_MBC+ 0x0044)) -#define INCA_IP_MBC_MBC_CR2_RDYABTFLS (value) (((( 1 << 3) - 1) & (value)) << 0) - -/***Mailbox CPU Control Register of Buffer 3***/ -#define INCA_IP_MBC_MBC_CR3 ((volatile u32*)(INCA_IP_MBC+ 0x0064)) -#define INCA_IP_MBC_MBC_CR3_RDYABTFLS (value) (((( 1 << 3) - 1) & (value)) << 0) - -/***Mailbox CPU Free Space of Buffer 0***/ -#define INCA_IP_MBC_MBC_FS0 ((volatile u32*)(INCA_IP_MBC+ 0x0008)) -#define INCA_IP_MBC_MBC_FS0_FS - -/***Mailbox CPU Free Space of Buffer 1***/ -#define INCA_IP_MBC_MBC_FS1 ((volatile u32*)(INCA_IP_MBC+ 0x0028)) -#define INCA_IP_MBC_MBC_FS1_FS - -/***Mailbox CPU Free Space of Buffer 2***/ -#define INCA_IP_MBC_MBC_FS2 ((volatile u32*)(INCA_IP_MBC+ 0x0048)) -#define INCA_IP_MBC_MBC_FS2_FS - -/***Mailbox CPU Free Space of Buffer 3***/ -#define INCA_IP_MBC_MBC_FS3 ((volatile u32*)(INCA_IP_MBC+ 0x0068)) -#define INCA_IP_MBC_MBC_FS3_FS - -/***Mailbox CPU Data Available in Buffer 0***/ -#define INCA_IP_MBC_MBC_DA0 ((volatile u32*)(INCA_IP_MBC+ 0x000C)) -#define INCA_IP_MBC_MBC_DA0_DA - -/***Mailbox CPU Data Available in Buffer 1***/ -#define INCA_IP_MBC_MBC_DA1 ((volatile u32*)(INCA_IP_MBC+ 0x002C)) -#define INCA_IP_MBC_MBC_DA1_DA - -/***Mailbox CPU Data Available in Buffer 2***/ -#define INCA_IP_MBC_MBC_DA2 ((volatile u32*)(INCA_IP_MBC+ 0x004C)) -#define INCA_IP_MBC_MBC_DA2_DA - -/***Mailbox CPU Data Available in Buffer 3***/ -#define INCA_IP_MBC_MBC_DA3 ((volatile u32*)(INCA_IP_MBC+ 0x006C)) -#define INCA_IP_MBC_MBC_DA3_DA - -/***Mailbox CPU Input Absolute Pointer of Buffer 0***/ -#define INCA_IP_MBC_MBC_IABS0 ((volatile u32*)(INCA_IP_MBC+ 0x0010)) -#define INCA_IP_MBC_MBC_IABS0_IABS - -/***Mailbox CPU Input Absolute Pointer of Buffer 1***/ -#define INCA_IP_MBC_MBC_IABS1 ((volatile u32*)(INCA_IP_MBC+ 0x0030)) -#define INCA_IP_MBC_MBC_IABS1_IABS - -/***Mailbox CPU Input Absolute Pointer of Buffer 2***/ -#define INCA_IP_MBC_MBC_IABS2 ((volatile u32*)(INCA_IP_MBC+ 0x0050)) -#define INCA_IP_MBC_MBC_IABS2_IABS - -/***Mailbox CPU Input Absolute Pointer of Buffer 3***/ -#define INCA_IP_MBC_MBC_IABS3 ((volatile u32*)(INCA_IP_MBC+ 0x0070)) -#define INCA_IP_MBC_MBC_IABS3_IABS - -/***Mailbox CPU Input Temporary Pointer of Buffer 0***/ -#define INCA_IP_MBC_MBC_ITMP0 ((volatile u32*)(INCA_IP_MBC+ 0x0014)) -#define INCA_IP_MBC_MBC_ITMP0_ITMP - -/***Mailbox CPU Input Temporary Pointer of Buffer 1***/ -#define INCA_IP_MBC_MBC_ITMP1 ((volatile u32*)(INCA_IP_MBC+ 0x0034)) -#define INCA_IP_MBC_MBC_ITMP1_ITMP - -/***Mailbox CPU Input Temporary Pointer of Buffer 2***/ -#define INCA_IP_MBC_MBC_ITMP2 ((volatile u32*)(INCA_IP_MBC+ 0x0054)) -#define INCA_IP_MBC_MBC_ITMP2_ITMP - -/***Mailbox CPU Input Temporary Pointer of Buffer 3***/ -#define INCA_IP_MBC_MBC_ITMP3 ((volatile u32*)(INCA_IP_MBC+ 0x0074)) -#define INCA_IP_MBC_MBC_ITMP3_ITMP - -/***Mailbox CPU Output Absolute Pointer of Buffer 0***/ -#define INCA_IP_MBC_MBC_OABS0 ((volatile u32*)(INCA_IP_MBC+ 0x0018)) -#define INCA_IP_MBC_MBC_OABS0_OABS - -/***Mailbox CPU Output Absolute Pointer of Buffer 1***/ -#define INCA_IP_MBC_MBC_OABS1 ((volatile u32*)(INCA_IP_MBC+ 0x0038)) -#define INCA_IP_MBC_MBC_OABS1_OABS - -/***Mailbox CPU Output Absolute Pointer of Buffer 2***/ -#define INCA_IP_MBC_MBC_OABS2 ((volatile u32*)(INCA_IP_MBC+ 0x0058)) -#define INCA_IP_MBC_MBC_OABS2_OABS - -/***Mailbox CPU Output Absolute Pointer of Buffer 3***/ -#define INCA_IP_MBC_MBC_OABS3 ((volatile u32*)(INCA_IP_MBC+ 0x0078)) -#define INCA_IP_MBC_MBC_OABS3_OABS - -/***Mailbox CPU Output Temporary Pointer of Buffer 0***/ -#define INCA_IP_MBC_MBC_OTMP0 ((volatile u32*)(INCA_IP_MBC+ 0x001C)) -#define INCA_IP_MBC_MBC_OTMP0_OTMP - -/***Mailbox CPU Output Temporary Pointer of Buffer 1***/ -#define INCA_IP_MBC_MBC_OTMP1 ((volatile u32*)(INCA_IP_MBC+ 0x003C)) -#define INCA_IP_MBC_MBC_OTMP1_OTMP - -/***Mailbox CPU Output Temporary Pointer of Buffer 2***/ -#define INCA_IP_MBC_MBC_OTMP2 ((volatile u32*)(INCA_IP_MBC+ 0x005C)) -#define INCA_IP_MBC_MBC_OTMP2_OTMP - -/***Mailbox CPU Output Temporary Pointer of Buffer 3***/ -#define INCA_IP_MBC_MBC_OTMP3 ((volatile u32*)(INCA_IP_MBC+ 0x007C)) -#define INCA_IP_MBC_MBC_OTMP3_OTMP - -/***DSP Control Register***/ -#define INCA_IP_MBC_DCTRL ((volatile u32*)(INCA_IP_MBC+ 0x00A0)) -#define INCA_IP_MBC_DCTRL_BA (1 << 0) -#define INCA_IP_MBC_DCTRL_BMOD (value) (((( 1 << 3) - 1) & (value)) << 1) -#define INCA_IP_MBC_DCTRL_IDL (1 << 4) -#define INCA_IP_MBC_DCTRL_RES (1 << 15) - -/***DSP Status Register***/ -#define INCA_IP_MBC_DSTA ((volatile u32*)(INCA_IP_MBC+ 0x00A4)) -#define INCA_IP_MBC_DSTA_IDLE (1 << 0) -#define INCA_IP_MBC_DSTA_PD (1 << 1) - -/***DSP Test 1 Register***/ -#define INCA_IP_MBC_DTST1 ((volatile u32*)(INCA_IP_MBC+ 0x00A8)) -#define INCA_IP_MBC_DTST1_ABORT (1 << 0) -#define INCA_IP_MBC_DTST1_HWF32 (1 << 1) -#define INCA_IP_MBC_DTST1_HWF4M (1 << 2) -#define INCA_IP_MBC_DTST1_HWFOP (1 << 3) - -/***********************************************************************/ -/* Module : Switch register address and bits */ -/***********************************************************************/ - -#define INCA_IP_Switch (0xBF104000) -/***********************************************************************/ - - -/***Unknown Destination Register***/ -#define INCA_IP_Switch_UN_DEST ((volatile u32*)(INCA_IP_Switch+ 0x0000)) -#define INCA_IP_Switch_UN_DEST_CB (1 << 8) -#define INCA_IP_Switch_UN_DEST_LB (1 << 7) -#define INCA_IP_Switch_UN_DEST_PB (1 << 6) -#define INCA_IP_Switch_UN_DEST_CM (1 << 5) -#define INCA_IP_Switch_UN_DEST_LM (1 << 4) -#define INCA_IP_Switch_UN_DEST_PM (1 << 3) -#define INCA_IP_Switch_UN_DEST_CU (1 << 2) -#define INCA_IP_Switch_UN_DEST_LU (1 << 1) -#define INCA_IP_Switch_UN_DEST_PU (1 << 0) - -/***VLAN Control Register***/ -#define INCA_IP_Switch_VLAN_CTRL ((volatile u32*)(INCA_IP_Switch+ 0x0004)) -#define INCA_IP_Switch_VLAN_CTRL_SC (1 << 6) -#define INCA_IP_Switch_VLAN_CTRL_SL (1 << 5) -#define INCA_IP_Switch_VLAN_CTRL_SP (1 << 4) -#define INCA_IP_Switch_VLAN_CTRL_TC (1 << 3) -#define INCA_IP_Switch_VLAN_CTRL_TL (1 << 2) -#define INCA_IP_Switch_VLAN_CTRL_TP (1 << 1) -#define INCA_IP_Switch_VLAN_CTRL_VA (1 << 0) - -/***PC VLAN Configuration Register***/ -#define INCA_IP_Switch_PC_VLAN ((volatile u32*)(INCA_IP_Switch+ 0x0008)) -#define INCA_IP_Switch_PC_VLAN_PRI (value) (((( 1 << 3) - 1) & (value)) << 12) -#define INCA_IP_Switch_PC_VLAN_VLAN_ID (value) (((( 1 << 12) - 1) & (value)) << 0) - -/***LAN VLAN Configuration Register***/ -#define INCA_IP_Switch_LAN_VLAN ((volatile u32*)(INCA_IP_Switch+ 0x000C)) -#define INCA_IP_Switch_LAN_VLAN_PRI (value) (((( 1 << 3) - 1) & (value)) << 12) -#define INCA_IP_Switch_LAN_VLAN_VLAN_ID (value) (((( 1 << 12) - 1) & (value)) << 0) - -/***CPU VLAN Configuration Register***/ -#define INCA_IP_Switch_CPU_VLAN ((volatile u32*)(INCA_IP_Switch+ 0x0010)) -#define INCA_IP_Switch_CPU_VLAN_PRI (value) (((( 1 << 3) - 1) & (value)) << 12) -#define INCA_IP_Switch_CPU_VLAN_VLAN_ID (value) (((( 1 << 12) - 1) & (value)) << 0) - -/***Priority CoS Mapping Register***/ -#define INCA_IP_Switch_PRI_CoS ((volatile u32*)(INCA_IP_Switch+ 0x0014)) -#define INCA_IP_Switch_PRI_CoS_P7 (1 << 7) -#define INCA_IP_Switch_PRI_CoS_P6 (1 << 6) -#define INCA_IP_Switch_PRI_CoS_P5 (1 << 5) -#define INCA_IP_Switch_PRI_CoS_P4 (1 << 4) -#define INCA_IP_Switch_PRI_CoS_P3 (1 << 3) -#define INCA_IP_Switch_PRI_CoS_P2 (1 << 2) -#define INCA_IP_Switch_PRI_CoS_P1 (1 << 1) -#define INCA_IP_Switch_PRI_CoS_P0 (1 << 0) - -/***Spanning Tree Port Status Register***/ -#define INCA_IP_Switch_ST_PT ((volatile u32*)(INCA_IP_Switch+ 0x0018)) -#define INCA_IP_Switch_ST_PT_CPS (value) (((( 1 << 2) - 1) & (value)) << 4) -#define INCA_IP_Switch_ST_PT_LPS (value) (((( 1 << 2) - 1) & (value)) << 2) -#define INCA_IP_Switch_ST_PT_PPS (value) (((( 1 << 2) - 1) & (value)) << 0) - -/***ARL Control Register***/ -#define INCA_IP_Switch_ARL_CTL ((volatile u32*)(INCA_IP_Switch+ 0x001C)) -#define INCA_IP_Switch_ARL_CTL_CHCC (1 << 15) -#define INCA_IP_Switch_ARL_CTL_CHCL (1 << 14) -#define INCA_IP_Switch_ARL_CTL_CHCP (1 << 13) -#define INCA_IP_Switch_ARL_CTL_CC (1 << 12) -#define INCA_IP_Switch_ARL_CTL_CL (1 << 11) -#define INCA_IP_Switch_ARL_CTL_CP (1 << 10) -#define INCA_IP_Switch_ARL_CTL_CG (1 << 9) -#define INCA_IP_Switch_ARL_CTL_PS (1 << 8) -#define INCA_IP_Switch_ARL_CTL_MRO (1 << 7) -#define INCA_IP_Switch_ARL_CTL_SRC (1 << 6) -#define INCA_IP_Switch_ARL_CTL_ATS (1 << 5) -#define INCA_IP_Switch_ARL_CTL_AGE_TICK_SEL (value) (((( 1 << 3) - 1) & (value)) << 2) -#define INCA_IP_Switch_ARL_CTL_MAF (1 << 1) -#define INCA_IP_Switch_ARL_CTL_ENL (1 << 0) -#define INCA_IP_Switch_ARL_CTL_Res (value) (((( 1 << 19) - 1) & (value)) << 13) - -/***CPU Access Control Register***/ -#define INCA_IP_Switch_CPU_ACTL ((volatile u32*)(INCA_IP_Switch+ 0x0020)) -#define INCA_IP_Switch_CPU_ACTL_RA (1 << 31) -#define INCA_IP_Switch_CPU_ACTL_RW (1 << 30) -#define INCA_IP_Switch_CPU_ACTL_Res (value) (((( 1 << 21) - 1) & (value)) << 9) -#define INCA_IP_Switch_CPU_ACTL_AVA (1 << 8) -#define INCA_IP_Switch_CPU_ACTL_IDX (value) (((( 1 << 8) - 1) & (value)) << 0) - -/***CPU Access Data Register 1***/ -#define INCA_IP_Switch_DATA1 ((volatile u32*)(INCA_IP_Switch+ 0x0024)) -#define INCA_IP_Switch_DATA1_Data (value) (((( 1 << 24) - 1) & (value)) << 0) - -/***CPU Access Data Register 2***/ -#define INCA_IP_Switch_DATA2 ((volatile u32*)(INCA_IP_Switch+ 0x0028)) -#define INCA_IP_Switch_DATA2_Data - -/***CPU Port Control Register***/ -#define INCA_IP_Switch_CPU_PCTL ((volatile u32*)(INCA_IP_Switch+ 0x002C)) -#define INCA_IP_Switch_CPU_PCTL_DA_PORTS (value) (((( 1 << 3) - 1) & (value)) << 11) -#define INCA_IP_Switch_CPU_PCTL_DAC (1 << 10) -#define INCA_IP_Switch_CPU_PCTL_MA_STATE (value) (((( 1 << 3) - 1) & (value)) << 7) -#define INCA_IP_Switch_CPU_PCTL_MAM (1 << 6) -#define INCA_IP_Switch_CPU_PCTL_MA_Ports (value) (((( 1 << 3) - 1) & (value)) << 3) -#define INCA_IP_Switch_CPU_PCTL_MAC (1 << 2) -#define INCA_IP_Switch_CPU_PCTL_EML (1 << 1) -#define INCA_IP_Switch_CPU_PCTL_EDL (1 << 0) -#define INCA_IP_Switch_CPU_PCTL_Res (value) (((( 1 << 18) - 1) & (value)) << 14) - -/***DSCP CoS Mapping Register 1***/ -#define INCA_IP_Switch_DSCP_COS1 ((volatile u32*)(INCA_IP_Switch+ 0x0030)) -#define INCA_IP_Switch_DSCP_COS1_DSCP - -/***DSCP CoS Mapping Register 1***/ -#define INCA_IP_Switch_DSCP_COS2 ((volatile u32*)(INCA_IP_Switch+ 0x0034)) -#define INCA_IP_Switch_DSCP_COS2_DSCP - -/***PC WFQ Control Register***/ -#define INCA_IP_Switch_PC_WFQ_CTL ((volatile u32*)(INCA_IP_Switch+ 0x0080)) -#define INCA_IP_Switch_PC_WFQ_CTL_P1 (1 << 9) -#define INCA_IP_Switch_PC_WFQ_CTL_P0 (1 << 8) -#define INCA_IP_Switch_PC_WFQ_CTL_WT1 (value) (((( 1 << 3) - 1) & (value)) << 5) -#define INCA_IP_Switch_PC_WFQ_CTL_WT0 (value) (((( 1 << 3) - 1) & (value)) << 2) -#define INCA_IP_Switch_PC_WFQ_CTL_SCH_SEL (value) (((( 1 << 2) - 1) & (value)) << 0) - -/***PC TX Control Register***/ -#define INCA_IP_Switch_PC_TX_CTL ((volatile u32*)(INCA_IP_Switch+ 0x0084)) -#define INCA_IP_Switch_PC_TX_CTL_ELR (1 << 1) -#define INCA_IP_Switch_PC_TX_CTL_EER (1 << 0) - -/***LAN WFQ Control Register***/ -#define INCA_IP_Switch_LAN_WFQ_CTL ((volatile u32*)(INCA_IP_Switch+ 0x0100)) -#define INCA_IP_Switch_LAN_WFQ_CTL_P1 (1 << 9) -#define INCA_IP_Switch_LAN_WFQ_CTL_P0 (1 << 8) -#define INCA_IP_Switch_LAN_WFQ_CTL_WT1 (value) (((( 1 << 3) - 1) & (value)) << 5) -#define INCA_IP_Switch_LAN_WFQ_CTL_WT0 (value) (((( 1 << 3) - 1) & (value)) << 2) -#define INCA_IP_Switch_LAN_WFQ_CTL_SCH_SEL (value) (((( 1 << 2) - 1) & (value)) << 0) - -/***LAN TX Control Register***/ -#define INCA_IP_Switch_LAN_TX_CTL ((volatile u32*)(INCA_IP_Switch+ 0x0104)) -#define INCA_IP_Switch_LAN_TX_CTL_ELR (1 << 1) -#define INCA_IP_Switch_LAN_TX_CTL_EER (1 << 0) - -/***CPU WFQ Control Register***/ -#define INCA_IP_Switch_CPU_WFQ_CTL ((volatile u32*)(INCA_IP_Switch+ 0x0180)) -#define INCA_IP_Switch_CPU_WFQ_CTL_P1 (1 << 9) -#define INCA_IP_Switch_CPU_WFQ_CTL_P0 (1 << 8) -#define INCA_IP_Switch_CPU_WFQ_CTL_WT1 (value) (((( 1 << 3) - 1) & (value)) << 5) -#define INCA_IP_Switch_CPU_WFQ_CTL_WT0 (value) (((( 1 << 3) - 1) & (value)) << 2) -#define INCA_IP_Switch_CPU_WFQ_CTL_SCH_SEL (value) (((( 1 << 2) - 1) & (value)) << 0) - -/***PM PC RX Watermark Register***/ -#define INCA_IP_Switch_PC_WM ((volatile u32*)(INCA_IP_Switch+ 0x0200)) -#define INCA_IP_Switch_PC_WM_RX_WM1 (value) (((( 1 << 8) - 1) & (value)) << 24) -#define INCA_IP_Switch_PC_WM_RX_WM2 (value) (((( 1 << 8) - 1) & (value)) << 16) -#define INCA_IP_Switch_PC_WM_RX_WM3 (value) (((( 1 << 8) - 1) & (value)) << 8) -#define INCA_IP_Switch_PC_WM_RX_WM4 (value) (((( 1 << 8) - 1) & (value)) << 0) - -/***PM LAN RX Watermark Register***/ -#define INCA_IP_Switch_LAN_WM ((volatile u32*)(INCA_IP_Switch+ 0x0204)) -#define INCA_IP_Switch_LAN_WM_RX_WM1 (value) (((( 1 << 8) - 1) & (value)) << 24) -#define INCA_IP_Switch_LAN_WM_RX_WM2 (value) (((( 1 << 8) - 1) & (value)) << 16) -#define INCA_IP_Switch_LAN_WM_RX_WM3 (value) (((( 1 << 8) - 1) & (value)) << 8) -#define INCA_IP_Switch_LAN_WM_RX_WM4 (value) (((( 1 << 8) - 1) & (value)) << 0) - -/***PM CPU RX Watermark Register***/ -#define INCA_IP_Switch_CPU_WM ((volatile u32*)(INCA_IP_Switch+ 0x0208)) -#define INCA_IP_Switch_CPU_WM_RX_WM1 (value) (((( 1 << 8) - 1) & (value)) << 24) -#define INCA_IP_Switch_CPU_WM_RX_WM2 (value) (((( 1 << 8) - 1) & (value)) << 16) -#define INCA_IP_Switch_CPU_WM_RX_WM3 (value) (((( 1 << 8) - 1) & (value)) << 8) -#define INCA_IP_Switch_CPU_WM_RX_WM4 (value) (((( 1 << 8) - 1) & (value)) << 0) - -/***PM CPU RX Watermark Register***/ -#define INCA_IP_Switch_GBL_WM ((volatile u32*)(INCA_IP_Switch+ 0x020C)) -#define INCA_IP_Switch_GBL_WM_GBL_RX_WM1 (value) (((( 1 << 8) - 1) & (value)) << 24) -#define INCA_IP_Switch_GBL_WM_GBL_RX_WM2 (value) (((( 1 << 8) - 1) & (value)) << 16) -#define INCA_IP_Switch_GBL_WM_GBL_RX_WM3 (value) (((( 1 << 8) - 1) & (value)) << 8) -#define INCA_IP_Switch_GBL_WM_GBL_RX_WM4 (value) (((( 1 << 8) - 1) & (value)) << 0) - -/***PM Control Register***/ -#define INCA_IP_Switch_PM_CTL ((volatile u32*)(INCA_IP_Switch+ 0x0210)) -#define INCA_IP_Switch_PM_CTL_GDN (1 << 3) -#define INCA_IP_Switch_PM_CTL_CDN (1 << 2) -#define INCA_IP_Switch_PM_CTL_LDN (1 << 1) -#define INCA_IP_Switch_PM_CTL_PDN (1 << 0) - -/***PM Header Control Register***/ -#define INCA_IP_Switch_PMAC_HD_CTL ((volatile u32*)(INCA_IP_Switch+ 0x0280)) -#define INCA_IP_Switch_PMAC_HD_CTL_RL2 (1 << 21) -#define INCA_IP_Switch_PMAC_HD_CTL_RC (1 << 20) -#define INCA_IP_Switch_PMAC_HD_CTL_CM (1 << 19) -#define INCA_IP_Switch_PMAC_HD_CTL_CV (1 << 18) -#define INCA_IP_Switch_PMAC_HD_CTL_TYPE_LEN (value) (((( 1 << 16) - 1) & (value)) << 2) -#define INCA_IP_Switch_PMAC_HD_CTL_TAG (1 << 1) -#define INCA_IP_Switch_PMAC_HD_CTL_ADD (1 << 0) - -/***PM Source Address Register 1***/ -#define INCA_IP_Switch_PMAC_SA1 ((volatile u32*)(INCA_IP_Switch+ 0x0284)) -#define INCA_IP_Switch_PMAC_SA1_SA_47_32 (value) (((( 1 << 16) - 1) & (value)) << 0) - -/***PM Source Address Register 2***/ -#define INCA_IP_Switch_PMAC_SA2 ((volatile u32*)(INCA_IP_Switch+ 0x0288)) -#define INCA_IP_Switch_PMAC_SA2_SA_31_0 - -/***PM Dest Address Register 1***/ -#define INCA_IP_Switch_PMAC_DA1 ((volatile u32*)(INCA_IP_Switch+ 0x028C)) -#define INCA_IP_Switch_PMAC_DA1_DA_47_32 (value) (((( 1 << 16) - 1) & (value)) << 0) - -/***PM Dest Address Register 2***/ -#define INCA_IP_Switch_PMAC_DA2 ((volatile u32*)(INCA_IP_Switch+ 0x0290)) -#define INCA_IP_Switch_PMAC_DA2_DA_31_0 - -/***PM VLAN Register***/ -#define INCA_IP_Switch_PMAC_VLAN ((volatile u32*)(INCA_IP_Switch+ 0x0294)) -#define INCA_IP_Switch_PMAC_VLAN_PRI (value) (((( 1 << 3) - 1) & (value)) << 13) -#define INCA_IP_Switch_PMAC_VLAN_CFI (1 << 12) -#define INCA_IP_Switch_PMAC_VLAN_VLANID (value) (((( 1 << 12) - 1) & (value)) << 0) - -/***PM TX IPG Counter Register***/ -#define INCA_IP_Switch_PMAC_TX_IPG ((volatile u32*)(INCA_IP_Switch+ 0x0298)) -#define INCA_IP_Switch_PMAC_TX_IPG_IPGCNT (value) (((( 1 << 8) - 1) & (value)) << 0) - -/***PM RX IPG Counter Register***/ -#define INCA_IP_Switch_PMAC_RX_IPG ((volatile u32*)(INCA_IP_Switch+ 0x029C)) -#define INCA_IP_Switch_PMAC_RX_IPG_IPGCNT (value) (((( 1 << 8) - 1) & (value)) << 0) - -/***Mirror Register***/ -#define INCA_IP_Switch_MRR ((volatile u32*)(INCA_IP_Switch+ 0x0300)) -#define INCA_IP_Switch_MRR_MRR (value) (((( 1 << 2) - 1) & (value)) << 6) -#define INCA_IP_Switch_MRR_EC (1 << 5) -#define INCA_IP_Switch_MRR_EL (1 << 4) -#define INCA_IP_Switch_MRR_EP (1 << 3) -#define INCA_IP_Switch_MRR_IC (1 << 2) -#define INCA_IP_Switch_MRR_IL (1 << 1) -#define INCA_IP_Switch_MRR_IP (1 << 0) - -/***Packet Length Register***/ -#define INCA_IP_Switch_PKT_LEN ((volatile u32*)(INCA_IP_Switch+ 0x0304)) -#define INCA_IP_Switch_PKT_LEN_ADD (1 << 11) -#define INCA_IP_Switch_PKT_LEN_MAX_PKT_LEN (value) (((( 1 << 11) - 1) & (value)) << 0) - -/***MDIO Access Register***/ -#define INCA_IP_Switch_MDIO_ACC ((volatile u32*)(INCA_IP_Switch+ 0x0480)) -#define INCA_IP_Switch_MDIO_ACC_RA (1 << 31) -#define INCA_IP_Switch_MDIO_ACC_RW (1 << 30) -#define INCA_IP_Switch_MDIO_ACC_PHY_ADDR (value) (((( 1 << 5) - 1) & (value)) << 21) -#define INCA_IP_Switch_MDIO_ACC_REG_ADDR (value) (((( 1 << 5) - 1) & (value)) << 16) -#define INCA_IP_Switch_MDIO_ACC_PHY_DATA (value) (((( 1 << 16) - 1) & (value)) << 0) - -/***Ethernet PHY Register***/ -#define INCA_IP_Switch_EPHY ((volatile u32*)(INCA_IP_Switch+ 0x0484)) -#define INCA_IP_Switch_EPHY_SL (1 << 7) -#define INCA_IP_Switch_EPHY_SP (1 << 6) -#define INCA_IP_Switch_EPHY_LL (1 << 5) -#define INCA_IP_Switch_EPHY_LP (1 << 4) -#define INCA_IP_Switch_EPHY_DL (1 << 3) -#define INCA_IP_Switch_EPHY_DP (1 << 2) -#define INCA_IP_Switch_EPHY_PL (1 << 1) -#define INCA_IP_Switch_EPHY_PP (1 << 0) - -/***Pause Write Enable Register***/ -#define INCA_IP_Switch_PWR_EN ((volatile u32*)(INCA_IP_Switch+ 0x0488)) -#define INCA_IP_Switch_PWR_EN_PL (1 << 1) -#define INCA_IP_Switch_PWR_EN_PP (1 << 0) - -/***MDIO Configuration Register***/ -#define INCA_IP_Switch_MDIO_CFG ((volatile u32*)(INCA_IP_Switch+ 0x048C)) -#define INCA_IP_Switch_MDIO_CFG_MDS (value) (((( 1 << 2) - 1) & (value)) << 14) -#define INCA_IP_Switch_MDIO_CFG_PHY_LAN_ADDR (value) (((( 1 << 5) - 1) & (value)) << 9) -#define INCA_IP_Switch_MDIO_CFG_PHY_PC_ADDR (value) (((( 1 << 5) - 1) & (value)) << 4) -#define INCA_IP_Switch_MDIO_CFG_UEP (1 << 3) -#define INCA_IP_Switch_MDIO_CFG_PS (1 << 2) -#define INCA_IP_Switch_MDIO_CFG_PT (1 << 1) -#define INCA_IP_Switch_MDIO_CFG_UMM (1 << 0) - -/***Clock Configuration Register***/ -#define INCA_IP_Switch_CLK_CFG ((volatile u32*)(INCA_IP_Switch+ 0x0500)) -#define INCA_IP_Switch_CLK_CFG_ARL_ID (1 << 9) -#define INCA_IP_Switch_CLK_CFG_CPU_ID (1 << 8) -#define INCA_IP_Switch_CLK_CFG_LAN_ID (1 << 7) -#define INCA_IP_Switch_CLK_CFG_PC_ID (1 << 6) -#define INCA_IP_Switch_CLK_CFG_SE_ID (1 << 5) - -/***********************************************************************/ -/* Module : SSC1 register address and bits */ -/***********************************************************************/ - -#define INCA_IP_SSC1 (0xB8000500) -/***********************************************************************/ - - -/***Control Register (Programming Mode)***/ -#define INCA_IP_SSC1_SCC_CON_PRG ((volatile u32*)(INCA_IP_SSC1+ 0x0010)) -#define INCA_IP_SSC1_SCC_CON_PRG_EN (1 << 15) -#define INCA_IP_SSC1_SCC_CON_PRG_MS (1 << 14) -#define INCA_IP_SSC1_SCC_CON_PRG_AREN (1 << 12) -#define INCA_IP_SSC1_SCC_CON_PRG_BEN (1 << 11) -#define INCA_IP_SSC1_SCC_CON_PRG_PEN (1 << 10) -#define INCA_IP_SSC1_SCC_CON_PRG_REN (1 << 9) -#define INCA_IP_SSC1_SCC_CON_PRG_TEN (1 << 8) -#define INCA_IP_SSC1_SCC_CON_PRG_LB (1 << 7) -#define INCA_IP_SSC1_SCC_CON_PRG_PO (1 << 6) -#define INCA_IP_SSC1_SCC_CON_PRG_PH (1 << 5) -#define INCA_IP_SSC1_SCC_CON_PRG_HB (1 << 4) -#define INCA_IP_SSC1_SCC_CON_PRG_BM (value) (((( 1 << 4) - 1) & (value)) << 0) - -/***SCC Control Register (Operating Mode)***/ -#define INCA_IP_SSC1_SCC_CON_OPR ((volatile u32*)(INCA_IP_SSC1+ 0x0010)) -#define INCA_IP_SSC1_SCC_CON_OPR_EN (1 << 15) -#define INCA_IP_SSC1_SCC_CON_OPR_MS (1 << 14) -#define INCA_IP_SSC1_SCC_CON_OPR_BSY (1 << 12) -#define INCA_IP_SSC1_SCC_CON_OPR_BE (1 << 11) -#define INCA_IP_SSC1_SCC_CON_OPR_PE (1 << 10) -#define INCA_IP_SSC1_SCC_CON_OPR_RE (1 << 9) -#define INCA_IP_SSC1_SCC_CON_OPR_TE (1 << 8) -#define INCA_IP_SSC1_SCC_CON_OPR_BC (value) (((( 1 << 4) - 1) & (value)) << 0) - -/***SSC Write Hardware Modified Control Register***/ -#define INCA_IP_SSC1_SSC_WHBCON ((volatile u32*)(INCA_IP_SSC1+ 0x0040)) -#define INCA_IP_SSC1_SSC_WHBCON_SETBE (1 << 15) -#define INCA_IP_SSC1_SSC_WHBCON_SETPE (1 << 14) -#define INCA_IP_SSC1_SSC_WHBCON_SETRE (1 << 13) -#define INCA_IP_SSC1_SSC_WHBCON_SETTE (1 << 12) -#define INCA_IP_SSC1_SSC_WHBCON_CLRBE (1 << 11) -#define INCA_IP_SSC1_SSC_WHBCON_CLRPE (1 << 10) -#define INCA_IP_SSC1_SSC_WHBCON_CLRRE (1 << 9) -#define INCA_IP_SSC1_SSC_WHBCON_CLRTE (1 << 8) - -/***SSC Baudrate Timer Reload Register***/ -#define INCA_IP_SSC1_SSC_BR ((volatile u32*)(INCA_IP_SSC1+ 0x0014)) -#define INCA_IP_SSC1_SSC_BR_BR_VALUE (value) (((( 1 << 16) - 1) & (value)) << 0) - -/***SSC Transmitter Buffer Register***/ -#define INCA_IP_SSC1_SSC_TB ((volatile u32*)(INCA_IP_SSC1+ 0x0020)) -#define INCA_IP_SSC1_SSC_TB_TB_VALUE (value) (((( 1 << 16) - 1) & (value)) << 0) - -/***SSC Receiver Buffer Register***/ -#define INCA_IP_SSC1_SSC_RB ((volatile u32*)(INCA_IP_SSC1+ 0x0024)) -#define INCA_IP_SSC1_SSC_RB_RB_VALUE (value) (((( 1 << 16) - 1) & (value)) << 0) - -/***SSC Receive FIFO Control Register***/ -#define INCA_IP_SSC1_SSC_RXFCON ((volatile u32*)(INCA_IP_SSC1+ 0x0030)) -#define INCA_IP_SSC1_SSC_RXFCON_RXFITL (value) (((( 1 << 6) - 1) & (value)) << 8) -#define INCA_IP_SSC1_SSC_RXFCON_RXTMEN (1 << 2) -#define INCA_IP_SSC1_SSC_RXFCON_RXFLU (1 << 1) -#define INCA_IP_SSC1_SSC_RXFCON_RXFEN (1 << 0) - -/***SSC Transmit FIFO Control Register***/ -#define INCA_IP_SSC1_SSC_TXFCON ((volatile u32*)(INCA_IP_SSC1+ 0x0034)) -#define INCA_IP_SSC1_SSC_TXFCON_RXFITL (value) (((( 1 << 6) - 1) & (value)) << 8) -#define INCA_IP_SSC1_SSC_TXFCON_TXTMEN (1 << 2) -#define INCA_IP_SSC1_SSC_TXFCON_TXFLU (1 << 1) -#define INCA_IP_SSC1_SSC_TXFCON_TXFEN (1 << 0) - -/***SSC FIFO Status Register***/ -#define INCA_IP_SSC1_SSC_FSTAT ((volatile u32*)(INCA_IP_SSC1+ 0x0038)) -#define INCA_IP_SSC1_SSC_FSTAT_TXFFL (value) (((( 1 << 6) - 1) & (value)) << 8) -#define INCA_IP_SSC1_SSC_FSTAT_RXFFL (value) (((( 1 << 6) - 1) & (value)) << 0) - -/***SSC Clock Control Register***/ -#define INCA_IP_SSC1_SSC_CLC ((volatile u32*)(INCA_IP_SSC1+ 0x0000)) -#define INCA_IP_SSC1_SSC_CLC_RMC (value) (((( 1 << 8) - 1) & (value)) << 8) -#define INCA_IP_SSC1_SSC_CLC_DISS (1 << 1) -#define INCA_IP_SSC1_SSC_CLC_DISR (1 << 0) - -/***********************************************************************/ -/* Module : SSC2 register address and bits */ -/***********************************************************************/ - -#define INCA_IP_SSC2 (0xB8000600) -/***********************************************************************/ - - -/***Control Register (Programming Mode)***/ -#define INCA_IP_SSC2_SCC_CON_PRG ((volatile u32*)(INCA_IP_SSC2+ 0x0010)) -#define INCA_IP_SSC2_SCC_CON_PRG_EN (1 << 15) -#define INCA_IP_SSC2_SCC_CON_PRG_MS (1 << 14) -#define INCA_IP_SSC2_SCC_CON_PRG_AREN (1 << 12) -#define INCA_IP_SSC2_SCC_CON_PRG_BEN (1 << 11) -#define INCA_IP_SSC2_SCC_CON_PRG_PEN (1 << 10) -#define INCA_IP_SSC2_SCC_CON_PRG_REN (1 << 9) -#define INCA_IP_SSC2_SCC_CON_PRG_TEN (1 << 8) -#define INCA_IP_SSC2_SCC_CON_PRG_LB (1 << 7) -#define INCA_IP_SSC2_SCC_CON_PRG_PO (1 << 6) -#define INCA_IP_SSC2_SCC_CON_PRG_PH (1 << 5) -#define INCA_IP_SSC2_SCC_CON_PRG_HB (1 << 4) -#define INCA_IP_SSC2_SCC_CON_PRG_BM (value) (((( 1 << 4) - 1) & (value)) << 0) - -/***SCC Control Register (Operating Mode)***/ -#define INCA_IP_SSC2_SCC_CON_OPR ((volatile u32*)(INCA_IP_SSC2+ 0x0010)) -#define INCA_IP_SSC2_SCC_CON_OPR_EN (1 << 15) -#define INCA_IP_SSC2_SCC_CON_OPR_MS (1 << 14) -#define INCA_IP_SSC2_SCC_CON_OPR_BSY (1 << 12) -#define INCA_IP_SSC2_SCC_CON_OPR_BE (1 << 11) -#define INCA_IP_SSC2_SCC_CON_OPR_PE (1 << 10) -#define INCA_IP_SSC2_SCC_CON_OPR_RE (1 << 9) -#define INCA_IP_SSC2_SCC_CON_OPR_TE (1 << 8) -#define INCA_IP_SSC2_SCC_CON_OPR_BC (value) (((( 1 << 4) - 1) & (value)) << 0) - -/***SSC Write Hardware Modified Control Register***/ -#define INCA_IP_SSC2_SSC_WHBCON ((volatile u32*)(INCA_IP_SSC2+ 0x0040)) -#define INCA_IP_SSC2_SSC_WHBCON_SETBE (1 << 15) -#define INCA_IP_SSC2_SSC_WHBCON_SETPE (1 << 14) -#define INCA_IP_SSC2_SSC_WHBCON_SETRE (1 << 13) -#define INCA_IP_SSC2_SSC_WHBCON_SETTE (1 << 12) -#define INCA_IP_SSC2_SSC_WHBCON_CLRBE (1 << 11) -#define INCA_IP_SSC2_SSC_WHBCON_CLRPE (1 << 10) -#define INCA_IP_SSC2_SSC_WHBCON_CLRRE (1 << 9) -#define INCA_IP_SSC2_SSC_WHBCON_CLRTE (1 << 8) - -/***SSC Baudrate Timer Reload Register***/ -#define INCA_IP_SSC2_SSC_BR ((volatile u32*)(INCA_IP_SSC2+ 0x0014)) -#define INCA_IP_SSC2_SSC_BR_BR_VALUE (value) (((( 1 << 16) - 1) & (value)) << 0) - -/***SSC Transmitter Buffer Register***/ -#define INCA_IP_SSC2_SSC_TB ((volatile u32*)(INCA_IP_SSC2+ 0x0020)) -#define INCA_IP_SSC2_SSC_TB_TB_VALUE (value) (((( 1 << 16) - 1) & (value)) << 0) - -/***SSC Receiver Buffer Register***/ -#define INCA_IP_SSC2_SSC_RB ((volatile u32*)(INCA_IP_SSC2+ 0x0024)) -#define INCA_IP_SSC2_SSC_RB_RB_VALUE (value) (((( 1 << 16) - 1) & (value)) << 0) - -/***SSC Receive FIFO Control Register***/ -#define INCA_IP_SSC2_SSC_RXFCON ((volatile u32*)(INCA_IP_SSC2+ 0x0030)) -#define INCA_IP_SSC2_SSC_RXFCON_RXFITL (value) (((( 1 << 6) - 1) & (value)) << 8) -#define INCA_IP_SSC2_SSC_RXFCON_RXTMEN (1 << 2) -#define INCA_IP_SSC2_SSC_RXFCON_RXFLU (1 << 1) -#define INCA_IP_SSC2_SSC_RXFCON_RXFEN (1 << 0) - -/***SSC Transmit FIFO Control Register***/ -#define INCA_IP_SSC2_SSC_TXFCON ((volatile u32*)(INCA_IP_SSC2+ 0x0034)) -#define INCA_IP_SSC2_SSC_TXFCON_RXFITL (value) (((( 1 << 6) - 1) & (value)) << 8) -#define INCA_IP_SSC2_SSC_TXFCON_TXTMEN (1 << 2) -#define INCA_IP_SSC2_SSC_TXFCON_TXFLU (1 << 1) -#define INCA_IP_SSC2_SSC_TXFCON_TXFEN (1 << 0) - -/***SSC FIFO Status Register***/ -#define INCA_IP_SSC2_SSC_FSTAT ((volatile u32*)(INCA_IP_SSC2+ 0x0038)) -#define INCA_IP_SSC2_SSC_FSTAT_TXFFL (value) (((( 1 << 6) - 1) & (value)) << 8) -#define INCA_IP_SSC2_SSC_FSTAT_RXFFL (value) (((( 1 << 6) - 1) & (value)) << 0) - -/***SSC Clock Control Register***/ -#define INCA_IP_SSC2_SSC_CLC ((volatile u32*)(INCA_IP_SSC2+ 0x0000)) -#define INCA_IP_SSC2_SSC_CLC_RMC (value) (((( 1 << 8) - 1) & (value)) << 8) -#define INCA_IP_SSC2_SSC_CLC_DISS (1 << 1) -#define INCA_IP_SSC2_SSC_CLC_DISR (1 << 0) - -/***********************************************************************/ -/* Module : EBU register address and bits */ -/***********************************************************************/ - -#define INCA_IP_EBU (0xB8000200) -/***********************************************************************/ - - -/***EBU Clock Control Register***/ -#define INCA_IP_EBU_EBU_CLC ((volatile u32*)(INCA_IP_EBU+ 0x0000)) -#define INCA_IP_EBU_EBU_CLC_DISS (1 << 1) -#define INCA_IP_EBU_EBU_CLC_DISR (1 << 0) - -/***EBU Global Control Register***/ -#define INCA_IP_EBU_EBU_CON ((volatile u32*)(INCA_IP_EBU+ 0x0010)) -#define INCA_IP_EBU_EBU_CON_DTACS (value) (((( 1 << 3) - 1) & (value)) << 20) -#define INCA_IP_EBU_EBU_CON_DTARW (value) (((( 1 << 3) - 1) & (value)) << 16) -#define INCA_IP_EBU_EBU_CON_TOUTC (value) (((( 1 << 8) - 1) & (value)) << 8) -#define INCA_IP_EBU_EBU_CON_ARBMODE (value) (((( 1 << 2) - 1) & (value)) << 6) -#define INCA_IP_EBU_EBU_CON_ARBSYNC (1 << 5) -#define INCA_IP_EBU_EBU_CON_1 (1 << 3) - -/***EBU Address Select Register 0***/ -#define INCA_IP_EBU_EBU_ADDSEL0 ((volatile u32*)(INCA_IP_EBU+ 0x0020)) -#define INCA_IP_EBU_EBU_ADDSEL0_BASE (value) (((( 1 << 20) - 1) & (value)) << 12) -#define INCA_IP_EBU_EBU_ADDSEL0_MASK (value) (((( 1 << 4) - 1) & (value)) << 4) -#define INCA_IP_EBU_EBU_ADDSEL0_MIRRORE (1 << 1) -#define INCA_IP_EBU_EBU_ADDSEL0_REGEN (1 << 0) - -/***EBU Address Select Register 1***/ -#define INCA_IP_EBU_EBU_ADDSEL1 ((volatile u32*)(INCA_IP_EBU+ 0x0024)) -#define INCA_IP_EBU_EBU_ADDSEL1_BASE (value) (((( 1 << 20) - 1) & (value)) << 12) -#define INCA_IP_EBU_EBU_ADDSEL1_MASK (value) (((( 1 << 4) - 1) & (value)) << 4) -#define INCA_IP_EBU_EBU_ADDSEL1_MIRRORE (1 << 1) -#define INCA_IP_EBU_EBU_ADDSEL1_REGEN (1 << 0) - -/***EBU Address Select Register 2***/ -#define INCA_IP_EBU_EBU_ADDSEL2 ((volatile u32*)(INCA_IP_EBU+ 0x0028)) -#define INCA_IP_EBU_EBU_ADDSEL2_BASE (value) (((( 1 << 20) - 1) & (value)) << 12) -#define INCA_IP_EBU_EBU_ADDSEL2_MASK (value) (((( 1 << 4) - 1) & (value)) << 4) -#define INCA_IP_EBU_EBU_ADDSEL2_MIRRORE (1 << 1) -#define INCA_IP_EBU_EBU_ADDSEL2_REGEN (1 << 0) - -/***EBU Bus Configuration Register 0***/ -#define INCA_IP_EBU_EBU_BUSCON0 ((volatile u32*)(INCA_IP_EBU+ 0x0060)) -#define INCA_IP_EBU_EBU_BUSCON0_WRDIS (1 << 31) -#define INCA_IP_EBU_EBU_BUSCON0_ALEC (value) (((( 1 << 2) - 1) & (value)) << 29) -#define INCA_IP_EBU_EBU_BUSCON0_BCGEN (value) (((( 1 << 2) - 1) & (value)) << 27) -#define INCA_IP_EBU_EBU_BUSCON0_AGEN (value) (((( 1 << 2) - 1) & (value)) << 24) -#define INCA_IP_EBU_EBU_BUSCON0_CMULTR (value) (((( 1 << 2) - 1) & (value)) << 22) -#define INCA_IP_EBU_EBU_BUSCON0_WAIT (value) (((( 1 << 2) - 1) & (value)) << 20) -#define INCA_IP_EBU_EBU_BUSCON0_WAITINV (1 << 19) -#define INCA_IP_EBU_EBU_BUSCON0_SETUP (1 << 18) -#define INCA_IP_EBU_EBU_BUSCON0_PORTW (value) (((( 1 << 2) - 1) & (value)) << 16) -#define INCA_IP_EBU_EBU_BUSCON0_WAITRDC (value) (((( 1 << 7) - 1) & (value)) << 9) -#define INCA_IP_EBU_EBU_BUSCON0_WAITWRC (value) (((( 1 << 3) - 1) & (value)) << 6) -#define INCA_IP_EBU_EBU_BUSCON0_HOLDC (value) (((( 1 << 2) - 1) & (value)) << 4) -#define INCA_IP_EBU_EBU_BUSCON0_RECOVC (value) (((( 1 << 2) - 1) & (value)) << 2) -#define INCA_IP_EBU_EBU_BUSCON0_CMULT (value) (((( 1 << 2) - 1) & (value)) << 0) - -/***EBU Bus Configuration Register 1***/ -#define INCA_IP_EBU_EBU_BUSCON1 ((volatile u32*)(INCA_IP_EBU+ 0x0064)) -#define INCA_IP_EBU_EBU_BUSCON1_WRDIS (1 << 31) -#define INCA_IP_EBU_EBU_BUSCON1_ALEC (value) (((( 1 << 2) - 1) & (value)) << 29) -#define INCA_IP_EBU_EBU_BUSCON1_BCGEN (value) (((( 1 << 2) - 1) & (value)) << 27) -#define INCA_IP_EBU_EBU_BUSCON1_AGEN (value) (((( 1 << 2) - 1) & (value)) << 24) -#define INCA_IP_EBU_EBU_BUSCON1_CMULTR (value) (((( 1 << 2) - 1) & (value)) << 22) -#define INCA_IP_EBU_EBU_BUSCON1_WAIT (value) (((( 1 << 2) - 1) & (value)) << 20) -#define INCA_IP_EBU_EBU_BUSCON1_WAITINV (1 << 19) -#define INCA_IP_EBU_EBU_BUSCON1_SETUP (1 << 18) -#define INCA_IP_EBU_EBU_BUSCON1_PORTW (value) (((( 1 << 2) - 1) & (value)) << 16) -#define INCA_IP_EBU_EBU_BUSCON1_WAITRDC (value) (((( 1 << 7) - 1) & (value)) << 9) -#define INCA_IP_EBU_EBU_BUSCON1_WAITWRC (value) (((( 1 << 3) - 1) & (value)) << 6) -#define INCA_IP_EBU_EBU_BUSCON1_HOLDC (value) (((( 1 << 2) - 1) & (value)) << 4) -#define INCA_IP_EBU_EBU_BUSCON1_RECOVC (value) (((( 1 << 2) - 1) & (value)) << 2) -#define INCA_IP_EBU_EBU_BUSCON1_CMULT (value) (((( 1 << 2) - 1) & (value)) << 0) - -/***EBU Bus Configuration Register 2***/ -#define INCA_IP_EBU_EBU_BUSCON2 ((volatile u32*)(INCA_IP_EBU+ 0x0068)) -#define INCA_IP_EBU_EBU_BUSCON2_WRDIS (1 << 31) -#define INCA_IP_EBU_EBU_BUSCON2_ALEC (value) (((( 1 << 2) - 1) & (value)) << 29) -#define INCA_IP_EBU_EBU_BUSCON2_BCGEN (value) (((( 1 << 2) - 1) & (value)) << 27) -#define INCA_IP_EBU_EBU_BUSCON2_AGEN (value) (((( 1 << 2) - 1) & (value)) << 24) -#define INCA_IP_EBU_EBU_BUSCON2_CMULTR (value) (((( 1 << 2) - 1) & (value)) << 22) -#define INCA_IP_EBU_EBU_BUSCON2_WAIT (value) (((( 1 << 2) - 1) & (value)) << 20) -#define INCA_IP_EBU_EBU_BUSCON2_WAITINV (1 << 19) -#define INCA_IP_EBU_EBU_BUSCON2_SETUP (1 << 18) -#define INCA_IP_EBU_EBU_BUSCON2_PORTW (value) (((( 1 << 2) - 1) & (value)) << 16) -#define INCA_IP_EBU_EBU_BUSCON2_WAITRDC (value) (((( 1 << 7) - 1) & (value)) << 9) -#define INCA_IP_EBU_EBU_BUSCON2_WAITWRC (value) (((( 1 << 3) - 1) & (value)) << 6) -#define INCA_IP_EBU_EBU_BUSCON2_HOLDC (value) (((( 1 << 2) - 1) & (value)) << 4) -#define INCA_IP_EBU_EBU_BUSCON2_RECOVC (value) (((( 1 << 2) - 1) & (value)) << 2) -#define INCA_IP_EBU_EBU_BUSCON2_CMULT (value) (((( 1 << 2) - 1) & (value)) << 0) - -/***********************************************************************/ -/* Module : SDRAM register address and bits */ -/***********************************************************************/ - -#define INCA_IP_SDRAM (0xBF800000) -/***********************************************************************/ - - -/***MC Access Error Cause Register***/ -#define INCA_IP_SDRAM_MC_ERRCAUSE ((volatile u32*)(INCA_IP_SDRAM+ 0x0100)) -#define INCA_IP_SDRAM_MC_ERRCAUSE_ERR (1 << 31) -#define INCA_IP_SDRAM_MC_ERRCAUSE_PORT (value) (((( 1 << 4) - 1) & (value)) << 16) -#define INCA_IP_SDRAM_MC_ERRCAUSE_CAUSE (value) (((( 1 << 2) - 1) & (value)) << 0) -#define INCA_IP_SDRAM_MC_ERRCAUSE_Res (value) (((( 1 << NaN) - 1) & (value)) << NaN) - -/***MC Access Error Address Register***/ -#define INCA_IP_SDRAM_MC_ERRADDR ((volatile u32*)(INCA_IP_SDRAM+ 0x0108)) -#define INCA_IP_SDRAM_MC_ERRADDR_ADDR - -/***MC I/O General Purpose Register***/ -#define INCA_IP_SDRAM_MC_IOGP ((volatile u32*)(INCA_IP_SDRAM+ 0x0800)) -#define INCA_IP_SDRAM_MC_IOGP_GPR6 (value) (((( 1 << 4) - 1) & (value)) << 28) -#define INCA_IP_SDRAM_MC_IOGP_GPR5 (value) (((( 1 << 4) - 1) & (value)) << 24) -#define INCA_IP_SDRAM_MC_IOGP_GPR4 (value) (((( 1 << 4) - 1) & (value)) << 20) -#define INCA_IP_SDRAM_MC_IOGP_GPR3 (value) (((( 1 << 4) - 1) & (value)) << 16) -#define INCA_IP_SDRAM_MC_IOGP_GPR2 (value) (((( 1 << 4) - 1) & (value)) << 12) -#define INCA_IP_SDRAM_MC_IOGP_CPS (1 << 11) -#define INCA_IP_SDRAM_MC_IOGP_CLKDELAY (value) (((( 1 << 3) - 1) & (value)) << 8) -#define INCA_IP_SDRAM_MC_IOGP_CLKRAT (value) (((( 1 << 4) - 1) & (value)) << 4) -#define INCA_IP_SDRAM_MC_IOGP_RDDEL (value) (((( 1 << 4) - 1) & (value)) << 0) - -/***MC Self Refresh Register***/ -#define INCA_IP_SDRAM_MC_SELFRFSH ((volatile u32*)(INCA_IP_SDRAM+ 0x0A00)) -#define INCA_IP_SDRAM_MC_SELFRFSH_PWDS (1 << 1) -#define INCA_IP_SDRAM_MC_SELFRFSH_PWD (1 << 0) -#define INCA_IP_SDRAM_MC_SELFRFSH_Res (value) (((( 1 << 30) - 1) & (value)) << 2) - -/***MC Enable Register***/ -#define INCA_IP_SDRAM_MC_CTRLENA ((volatile u32*)(INCA_IP_SDRAM+ 0x1000)) -#define INCA_IP_SDRAM_MC_CTRLENA_ENA (1 << 0) -#define INCA_IP_SDRAM_MC_CTRLENA_Res (value) (((( 1 << 31) - 1) & (value)) << 1) - -/***MC Mode Register Setup Code***/ -#define INCA_IP_SDRAM_MC_MRSCODE ((volatile u32*)(INCA_IP_SDRAM+ 0x1008)) -#define INCA_IP_SDRAM_MC_MRSCODE_UMC (value) (((( 1 << 5) - 1) & (value)) << 7) -#define INCA_IP_SDRAM_MC_MRSCODE_CL (value) (((( 1 << 3) - 1) & (value)) << 4) -#define INCA_IP_SDRAM_MC_MRSCODE_WT (1 << 3) -#define INCA_IP_SDRAM_MC_MRSCODE_BL (value) (((( 1 << 3) - 1) & (value)) << 0) - -/***MC Configuration Data-word Width Register***/ -#define INCA_IP_SDRAM_MC_CFGDW ((volatile u32*)(INCA_IP_SDRAM+ 0x1010)) -#define INCA_IP_SDRAM_MC_CFGDW_DW (value) (((( 1 << 4) - 1) & (value)) << 0) -#define INCA_IP_SDRAM_MC_CFGDW_Res (value) (((( 1 << 28) - 1) & (value)) << 4) - -/***MC Configuration Physical Bank 0 Register***/ -#define INCA_IP_SDRAM_MC_CFGPB0 ((volatile u32*)(INCA_IP_SDRAM+ 0x1018)) -#define INCA_IP_SDRAM_MC_CFGPB0_MCSEN0 (value) (((( 1 << 4) - 1) & (value)) << 12) -#define INCA_IP_SDRAM_MC_CFGPB0_BANKN0 (value) (((( 1 << 4) - 1) & (value)) << 8) -#define INCA_IP_SDRAM_MC_CFGPB0_ROWW0 (value) (((( 1 << 4) - 1) & (value)) << 4) -#define INCA_IP_SDRAM_MC_CFGPB0_COLW0 (value) (((( 1 << 4) - 1) & (value)) << 0) -#define INCA_IP_SDRAM_MC_CFGPB0_Res (value) (((( 1 << 16) - 1) & (value)) << 16) - -/***MC Latency Register***/ -#define INCA_IP_SDRAM_MC_LATENCY ((volatile u32*)(INCA_IP_SDRAM+ 0x1038)) -#define INCA_IP_SDRAM_MC_LATENCY_TRP (value) (((( 1 << 4) - 1) & (value)) << 16) -#define INCA_IP_SDRAM_MC_LATENCY_TRAS (value) (((( 1 << 4) - 1) & (value)) << 12) -#define INCA_IP_SDRAM_MC_LATENCY_TRCD (value) (((( 1 << 4) - 1) & (value)) << 8) -#define INCA_IP_SDRAM_MC_LATENCY_TDPL (value) (((( 1 << 4) - 1) & (value)) << 4) -#define INCA_IP_SDRAM_MC_LATENCY_TDAL (value) (((( 1 << 4) - 1) & (value)) << 0) -#define INCA_IP_SDRAM_MC_LATENCY_Res (value) (((( 1 << 12) - 1) & (value)) << 20) - -/***MC Refresh Cycle Time Register***/ -#define INCA_IP_SDRAM_MC_TREFRESH ((volatile u32*)(INCA_IP_SDRAM+ 0x1040)) -#define INCA_IP_SDRAM_MC_TREFRESH_TREF (value) (((( 1 << 13) - 1) & (value)) << 0) -#define INCA_IP_SDRAM_MC_TREFRESH_Res (value) (((( 1 << 19) - 1) & (value)) << 13) - -/***********************************************************************/ -/* Module : GPTU register address and bits */ -/***********************************************************************/ - -#define INCA_IP_GPTU (0xB8000300) -/***********************************************************************/ - - -/***GPT Clock Control Register***/ -#define INCA_IP_GPTU_GPT_CLC ((volatile u32*)(INCA_IP_GPTU+ 0x0000)) -#define INCA_IP_GPTU_GPT_CLC_RMC (value) (((( 1 << 8) - 1) & (value)) << 8) -#define INCA_IP_GPTU_GPT_CLC_DISS (1 << 1) -#define INCA_IP_GPTU_GPT_CLC_DISR (1 << 0) - -/***GPT Timer 3 Control Register***/ -#define INCA_IP_GPTU_GPT_T3CON ((volatile u32*)(INCA_IP_GPTU+ 0x0014)) -#define INCA_IP_GPTU_GPT_T3CON_T3RDIR (1 << 15) -#define INCA_IP_GPTU_GPT_T3CON_T3CHDIR (1 << 14) -#define INCA_IP_GPTU_GPT_T3CON_T3EDGE (1 << 13) -#define INCA_IP_GPTU_GPT_T3CON_BPS1 (value) (((( 1 << 2) - 1) & (value)) << 11) -#define INCA_IP_GPTU_GPT_T3CON_T3OTL (1 << 10) -#define INCA_IP_GPTU_GPT_T3CON_T3UD (1 << 7) -#define INCA_IP_GPTU_GPT_T3CON_T3R (1 << 6) -#define INCA_IP_GPTU_GPT_T3CON_T3M (value) (((( 1 << 3) - 1) & (value)) << 3) -#define INCA_IP_GPTU_GPT_T3CON_T3I (value) (((( 1 << 3) - 1) & (value)) << 0) - -/***GPT Write Hardware Modified Timer 3 Control Register -If set and clear bit are written concurrently with 1, the associated bit is not changed.***/ -#define INCA_IP_GPTU_GPT_WHBT3CON ((volatile u32*)(INCA_IP_GPTU+ 0x004C)) -#define INCA_IP_GPTU_GPT_WHBT3CON_SETT3CHDIR (1 << 15) -#define INCA_IP_GPTU_GPT_WHBT3CON_CLRT3CHDIR (1 << 14) -#define INCA_IP_GPTU_GPT_WHBT3CON_SETT3EDGE (1 << 13) -#define INCA_IP_GPTU_GPT_WHBT3CON_CLRT3EDGE (1 << 12) -#define INCA_IP_GPTU_GPT_WHBT3CON_SETT3OTL (1 << 11) -#define INCA_IP_GPTU_GPT_WHBT3CON_CLRT3OTL (1 << 10) - -/***GPT Timer 2 Control Register***/ -#define INCA_IP_GPTU_GPT_T2CON ((volatile u32*)(INCA_IP_GPTU+ 0x0010)) -#define INCA_IP_GPTU_GPT_T2CON_TxRDIR (1 << 15) -#define INCA_IP_GPTU_GPT_T2CON_TxCHDIR (1 << 14) -#define INCA_IP_GPTU_GPT_T2CON_TxEDGE (1 << 13) -#define INCA_IP_GPTU_GPT_T2CON_TxIRDIS (1 << 12) -#define INCA_IP_GPTU_GPT_T2CON_TxRC (1 << 9) -#define INCA_IP_GPTU_GPT_T2CON_TxUD (1 << 7) -#define INCA_IP_GPTU_GPT_T2CON_TxR (1 << 6) -#define INCA_IP_GPTU_GPT_T2CON_TxM (value) (((( 1 << 3) - 1) & (value)) << 3) -#define INCA_IP_GPTU_GPT_T2CON_TxI (value) (((( 1 << 3) - 1) & (value)) << 0) - -/***GPT Timer 4 Control Register***/ -#define INCA_IP_GPTU_GPT_T4CON ((volatile u32*)(INCA_IP_GPTU+ 0x0018)) -#define INCA_IP_GPTU_GPT_T4CON_TxRDIR (1 << 15) -#define INCA_IP_GPTU_GPT_T4CON_TxCHDIR (1 << 14) -#define INCA_IP_GPTU_GPT_T4CON_TxEDGE (1 << 13) -#define INCA_IP_GPTU_GPT_T4CON_TxIRDIS (1 << 12) -#define INCA_IP_GPTU_GPT_T4CON_TxRC (1 << 9) -#define INCA_IP_GPTU_GPT_T4CON_TxUD (1 << 7) -#define INCA_IP_GPTU_GPT_T4CON_TxR (1 << 6) -#define INCA_IP_GPTU_GPT_T4CON_TxM (value) (((( 1 << 3) - 1) & (value)) << 3) -#define INCA_IP_GPTU_GPT_T4CON_TxI (value) (((( 1 << 3) - 1) & (value)) << 0) - -/***GPT Write HW Modified Timer 2 Control Register If set - and clear bit are written concurrently with 1, the associated bit is not changed.***/ -#define INCA_IP_GPTU_GPT_WHBT2CON ((volatile u32*)(INCA_IP_GPTU+ 0x0048)) -#define INCA_IP_GPTU_GPT_WHBT2CON_SETTxCHDIR (1 << 15) -#define INCA_IP_GPTU_GPT_WHBT2CON_CLRTxCHDIR (1 << 14) -#define INCA_IP_GPTU_GPT_WHBT2CON_SETTxEDGE (1 << 13) -#define INCA_IP_GPTU_GPT_WHBT2CON_CLRTxEDGE (1 << 12) - -/***GPT Write HW Modified Timer 4 Control Register If set - and clear bit are written concurrently with 1, the associated bit is not changed.***/ -#define INCA_IP_GPTU_GPT_WHBT4CON ((volatile u32*)(INCA_IP_GPTU+ 0x0050)) -#define INCA_IP_GPTU_GPT_WHBT4CON_SETTxCHDIR (1 << 15) -#define INCA_IP_GPTU_GPT_WHBT4CON_CLRTxCHDIR (1 << 14) -#define INCA_IP_GPTU_GPT_WHBT4CON_SETTxEDGE (1 << 13) -#define INCA_IP_GPTU_GPT_WHBT4CON_CLRTxEDGE (1 << 12) - -/***GPT Capture Reload Register***/ -#define INCA_IP_GPTU_GPT_CAPREL ((volatile u32*)(INCA_IP_GPTU+ 0x0030)) -#define INCA_IP_GPTU_GPT_CAPREL_CAPREL (value) (((( 1 << 16) - 1) & (value)) << 0) - -/***GPT Timer 2 Register***/ -#define INCA_IP_GPTU_GPT_T2 ((volatile u32*)(INCA_IP_GPTU+ 0x0034)) -#define INCA_IP_GPTU_GPT_T2_TVAL (value) (((( 1 << 16) - 1) & (value)) << 0) - -/***GPT Timer 3 Register***/ -#define INCA_IP_GPTU_GPT_T3 ((volatile u32*)(INCA_IP_GPTU+ 0x0038)) -#define INCA_IP_GPTU_GPT_T3_TVAL (value) (((( 1 << 16) - 1) & (value)) << 0) - -/***GPT Timer 4 Register***/ -#define INCA_IP_GPTU_GPT_T4 ((volatile u32*)(INCA_IP_GPTU+ 0x003C)) -#define INCA_IP_GPTU_GPT_T4_TVAL (value) (((( 1 << 16) - 1) & (value)) << 0) - -/***GPT Timer 5 Register***/ -#define INCA_IP_GPTU_GPT_T5 ((volatile u32*)(INCA_IP_GPTU+ 0x0040)) -#define INCA_IP_GPTU_GPT_T5_TVAL (value) (((( 1 << 16) - 1) & (value)) << 0) - -/***GPT Timer 6 Register***/ -#define INCA_IP_GPTU_GPT_T6 ((volatile u32*)(INCA_IP_GPTU+ 0x0044)) -#define INCA_IP_GPTU_GPT_T6_TVAL (value) (((( 1 << 16) - 1) & (value)) << 0) - -/***GPT Timer 6 Control Register***/ -#define INCA_IP_GPTU_GPT_T6CON ((volatile u32*)(INCA_IP_GPTU+ 0x0020)) -#define INCA_IP_GPTU_GPT_T6CON_T6SR (1 << 15) -#define INCA_IP_GPTU_GPT_T6CON_T6CLR (1 << 14) -#define INCA_IP_GPTU_GPT_T6CON_BPS2 (value) (((( 1 << 2) - 1) & (value)) << 11) -#define INCA_IP_GPTU_GPT_T6CON_T6OTL (1 << 10) -#define INCA_IP_GPTU_GPT_T6CON_T6UD (1 << 7) -#define INCA_IP_GPTU_GPT_T6CON_T6R (1 << 6) -#define INCA_IP_GPTU_GPT_T6CON_T6M (value) (((( 1 << 3) - 1) & (value)) << 3) -#define INCA_IP_GPTU_GPT_T6CON_T6I (value) (((( 1 << 3) - 1) & (value)) << 0) - -/***GPT Write HW Modified Timer 6 Control Register If set - and clear bit are written concurrently with 1, the associated bit is not changed.***/ -#define INCA_IP_GPTU_GPT_WHBT6CON ((volatile u32*)(INCA_IP_GPTU+ 0x0054)) -#define INCA_IP_GPTU_GPT_WHBT6CON_SETT6OTL (1 << 11) -#define INCA_IP_GPTU_GPT_WHBT6CON_CLRT6OTL (1 << 10) - -/***GPT Timer 5 Control Register***/ -#define INCA_IP_GPTU_GPT_T5CON ((volatile u32*)(INCA_IP_GPTU+ 0x001C)) -#define INCA_IP_GPTU_GPT_T5CON_T5SC (1 << 15) -#define INCA_IP_GPTU_GPT_T5CON_T5CLR (1 << 14) -#define INCA_IP_GPTU_GPT_T5CON_CI (value) (((( 1 << 2) - 1) & (value)) << 12) -#define INCA_IP_GPTU_GPT_T5CON_T5CC (1 << 11) -#define INCA_IP_GPTU_GPT_T5CON_CT3 (1 << 10) -#define INCA_IP_GPTU_GPT_T5CON_T5RC (1 << 9) -#define INCA_IP_GPTU_GPT_T5CON_T5UDE (1 << 8) -#define INCA_IP_GPTU_GPT_T5CON_T5UD (1 << 7) -#define INCA_IP_GPTU_GPT_T5CON_T5R (1 << 6) -#define INCA_IP_GPTU_GPT_T5CON_T5M (value) (((( 1 << 3) - 1) & (value)) << 3) -#define INCA_IP_GPTU_GPT_T5CON_T5I (value) (((( 1 << 3) - 1) & (value)) << 0) - -/***********************************************************************/ -/* Module : IOM register address and bits */ -/***********************************************************************/ - -#define INCA_IP_IOM (0xBF105000) -/***********************************************************************/ - - -/***Receive FIFO***/ -#define INCA_IP_IOM_RFIFO ((volatile u32*)(INCA_IP_IOM+ 0x0000)) -#define INCA_IP_IOM_RFIFO_RXD (value) (((( 1 << 8) - 1) & (value)) << 0) - -/***Transmit FIFO***/ -#define INCA_IP_IOM_XFIFO ((volatile u32*)(INCA_IP_IOM+ 0x0000)) -#define INCA_IP_IOM_XFIFO_TXD (value) (((( 1 << 8) - 1) & (value)) << 0) - -/***Interrupt Status Register HDLC***/ -#define INCA_IP_IOM_ISTAH ((volatile u32*)(INCA_IP_IOM+ 0x0080)) -#define INCA_IP_IOM_ISTAH_RME (1 << 7) -#define INCA_IP_IOM_ISTAH_RPF (1 << 6) -#define INCA_IP_IOM_ISTAH_RFO (1 << 5) -#define INCA_IP_IOM_ISTAH_XPR (1 << 4) -#define INCA_IP_IOM_ISTAH_XMR (1 << 3) -#define INCA_IP_IOM_ISTAH_XDU (1 << 2) - -/***Interrupt Mask Register HDLC***/ -#define INCA_IP_IOM_MASKH ((volatile u32*)(INCA_IP_IOM+ 0x0080)) -#define INCA_IP_IOM_MASKH_RME (1 << 7) -#define INCA_IP_IOM_MASKH_RPF (1 << 6) -#define INCA_IP_IOM_MASKH_RFO (1 << 5) -#define INCA_IP_IOM_MASKH_XPR (1 << 4) -#define INCA_IP_IOM_MASKH_XMR (1 << 3) -#define INCA_IP_IOM_MASKH_XDU (1 << 2) - -/***Status Register***/ -#define INCA_IP_IOM_STAR ((volatile u32*)(INCA_IP_IOM+ 0x0084)) -#define INCA_IP_IOM_STAR_XDOV (1 << 7) -#define INCA_IP_IOM_STAR_XFW (1 << 6) -#define INCA_IP_IOM_STAR_RACI (1 << 3) -#define INCA_IP_IOM_STAR_XACI (1 << 1) - -/***Command Register***/ -#define INCA_IP_IOM_CMDR ((volatile u32*)(INCA_IP_IOM+ 0x0084)) -#define INCA_IP_IOM_CMDR_RMC (1 << 7) -#define INCA_IP_IOM_CMDR_RRES (1 << 6) -#define INCA_IP_IOM_CMDR_XTF (1 << 3) -#define INCA_IP_IOM_CMDR_XME (1 << 1) -#define INCA_IP_IOM_CMDR_XRES (1 << 0) - -/***Mode Register***/ -#define INCA_IP_IOM_MODEH ((volatile u32*)(INCA_IP_IOM+ 0x0088)) -#define INCA_IP_IOM_MODEH_MDS2 (1 << 7) -#define INCA_IP_IOM_MODEH_MDS1 (1 << 6) -#define INCA_IP_IOM_MODEH_MDS0 (1 << 5) -#define INCA_IP_IOM_MODEH_RAC (1 << 3) -#define INCA_IP_IOM_MODEH_DIM2 (1 << 2) -#define INCA_IP_IOM_MODEH_DIM1 (1 << 1) -#define INCA_IP_IOM_MODEH_DIM0 (1 << 0) - -/***Extended Mode Register***/ -#define INCA_IP_IOM_EXMR ((volatile u32*)(INCA_IP_IOM+ 0x008C)) -#define INCA_IP_IOM_EXMR_XFBS (1 << 7) -#define INCA_IP_IOM_EXMR_RFBS (value) (((( 1 << 2) - 1) & (value)) << 5) -#define INCA_IP_IOM_EXMR_SRA (1 << 4) -#define INCA_IP_IOM_EXMR_XCRC (1 << 3) -#define INCA_IP_IOM_EXMR_RCRC (1 << 2) -#define INCA_IP_IOM_EXMR_ITF (1 << 0) - -/***SAPI1 Register***/ -#define INCA_IP_IOM_SAP1 ((volatile u32*)(INCA_IP_IOM+ 0x0094)) -#define INCA_IP_IOM_SAP1_SAPI1 (value) (((( 1 << 6) - 1) & (value)) << 2) -#define INCA_IP_IOM_SAP1_MHA (1 << 0) - -/***Receive Frame Byte Count Low***/ -#define INCA_IP_IOM_RBCL ((volatile u32*)(INCA_IP_IOM+ 0x0098)) -#define INCA_IP_IOM_RBCL_RBC(value) (1 << value) - - -/***SAPI2 Register***/ -#define INCA_IP_IOM_SAP2 ((volatile u32*)(INCA_IP_IOM+ 0x0098)) -#define INCA_IP_IOM_SAP2_SAPI2 (value) (((( 1 << 6) - 1) & (value)) << 2) -#define INCA_IP_IOM_SAP2_MLA (1 << 0) - -/***Receive Frame Byte Count High***/ -#define INCA_IP_IOM_RBCH ((volatile u32*)(INCA_IP_IOM+ 0x009C)) -#define INCA_IP_IOM_RBCH_OV (1 << 4) -#define INCA_IP_IOM_RBCH_RBC11 (1 << 3) -#define INCA_IP_IOM_RBCH_RBC10 (1 << 2) -#define INCA_IP_IOM_RBCH_RBC9 (1 << 1) -#define INCA_IP_IOM_RBCH_RBC8 (1 << 0) - -/***TEI1 Register 1***/ -#define INCA_IP_IOM_TEI1 ((volatile u32*)(INCA_IP_IOM+ 0x009C)) -#define INCA_IP_IOM_TEI1_TEI1 (value) (((( 1 << 7) - 1) & (value)) << 1) -#define INCA_IP_IOM_TEI1_EA (1 << 0) - -/***Receive Status Register***/ -#define INCA_IP_IOM_RSTA ((volatile u32*)(INCA_IP_IOM+ 0x00A0)) -#define INCA_IP_IOM_RSTA_VFR (1 << 7) -#define INCA_IP_IOM_RSTA_RDO (1 << 6) -#define INCA_IP_IOM_RSTA_CRC (1 << 5) -#define INCA_IP_IOM_RSTA_RAB (1 << 4) -#define INCA_IP_IOM_RSTA_SA1 (1 << 3) -#define INCA_IP_IOM_RSTA_SA0 (1 << 2) -#define INCA_IP_IOM_RSTA_TA (1 << 0) -#define INCA_IP_IOM_RSTA_CR (1 << 1) - -/***TEI2 Register***/ -#define INCA_IP_IOM_TEI2 ((volatile u32*)(INCA_IP_IOM+ 0x00A0)) -#define INCA_IP_IOM_TEI2_TEI2 (value) (((( 1 << 7) - 1) & (value)) << 1) -#define INCA_IP_IOM_TEI2_EA (1 << 0) - -/***Test Mode Register HDLC***/ -#define INCA_IP_IOM_TMH ((volatile u32*)(INCA_IP_IOM+ 0x00A4)) -#define INCA_IP_IOM_TMH_TLP (1 << 0) - -/***Command/Indication Receive 0***/ -#define INCA_IP_IOM_CIR0 ((volatile u32*)(INCA_IP_IOM+ 0x00B8)) -#define INCA_IP_IOM_CIR0_CODR0 (value) (((( 1 << 4) - 1) & (value)) << 4) -#define INCA_IP_IOM_CIR0_CIC0 (1 << 3) -#define INCA_IP_IOM_CIR0_CIC1 (1 << 2) -#define INCA_IP_IOM_CIR0_SG (1 << 1) -#define INCA_IP_IOM_CIR0_BAS (1 << 0) - -/***Command/Indication Transmit 0***/ -#define INCA_IP_IOM_CIX0 ((volatile u32*)(INCA_IP_IOM+ 0x00B8)) -#define INCA_IP_IOM_CIX0_CODX0 (value) (((( 1 << 4) - 1) & (value)) << 4) -#define INCA_IP_IOM_CIX0_TBA2 (1 << 3) -#define INCA_IP_IOM_CIX0_TBA1 (1 << 2) -#define INCA_IP_IOM_CIX0_TBA0 (1 << 1) -#define INCA_IP_IOM_CIX0_BAC (1 << 0) - -/***Command/Indication Receive 1***/ -#define INCA_IP_IOM_CIR1 ((volatile u32*)(INCA_IP_IOM+ 0x00BC)) -#define INCA_IP_IOM_CIR1_CODR1 (value) (((( 1 << 6) - 1) & (value)) << 2) - -/***Command/Indication Transmit 1***/ -#define INCA_IP_IOM_CIX1 ((volatile u32*)(INCA_IP_IOM+ 0x00BC)) -#define INCA_IP_IOM_CIX1_CODX1 (value) (((( 1 << 6) - 1) & (value)) << 2) -#define INCA_IP_IOM_CIX1_CICW (1 << 1) -#define INCA_IP_IOM_CIX1_CI1E (1 << 0) - -/***Controller Data Access Reg. (CH10)***/ -#define INCA_IP_IOM_CDA10 ((volatile u32*)(INCA_IP_IOM+ 0x0100)) -#define INCA_IP_IOM_CDA10_CDA (value) (((( 1 << 8) - 1) & (value)) << 0) - -/***Controller Data Access Reg. (CH11)***/ -#define INCA_IP_IOM_CDA11 ((volatile u32*)(INCA_IP_IOM+ 0x0104)) -#define INCA_IP_IOM_CDA11_CDA (value) (((( 1 << 8) - 1) & (value)) << 0) - -/***Controller Data Access Reg. (CH20)***/ -#define INCA_IP_IOM_CDA20 ((volatile u32*)(INCA_IP_IOM+ 0x0108)) -#define INCA_IP_IOM_CDA20_CDA (value) (((( 1 << 8) - 1) & (value)) << 0) - -/***Controller Data Access Reg. (CH21)***/ -#define INCA_IP_IOM_CDA21 ((volatile u32*)(INCA_IP_IOM+ 0x010C)) -#define INCA_IP_IOM_CDA21_CDA (value) (((( 1 << 8) - 1) & (value)) << 0) - -/***Time Slot and Data Port Sel. (CH10)***/ -#define INCA_IP_IOM_CDA_TSDP10 ((volatile u32*)(INCA_IP_IOM+ 0x0110)) -#define INCA_IP_IOM_CDA_TSDP10_DPS (1 << 7) -#define INCA_IP_IOM_CDA_TSDP10_TSS (value) (((( 1 << 4) - 1) & (value)) << 0) - -/***Time Slot and Data Port Sel. (CH11)***/ -#define INCA_IP_IOM_CDA_TSDP11 ((volatile u32*)(INCA_IP_IOM+ 0x0114)) -#define INCA_IP_IOM_CDA_TSDP11_DPS (1 << 7) -#define INCA_IP_IOM_CDA_TSDP11_TSS (value) (((( 1 << 4) - 1) & (value)) << 0) - -/***Time Slot and Data Port Sel. (CH20)***/ -#define INCA_IP_IOM_CDA_TSDP20 ((volatile u32*)(INCA_IP_IOM+ 0x0118)) -#define INCA_IP_IOM_CDA_TSDP20_DPS (1 << 7) -#define INCA_IP_IOM_CDA_TSDP20_TSS (value) (((( 1 << 4) - 1) & (value)) << 0) - -/***Time Slot and Data Port Sel. (CH21)***/ -#define INCA_IP_IOM_CDA_TSDP21 ((volatile u32*)(INCA_IP_IOM+ 0x011C)) -#define INCA_IP_IOM_CDA_TSDP21_DPS (1 << 7) -#define INCA_IP_IOM_CDA_TSDP21_TSS (value) (((( 1 << 4) - 1) & (value)) << 0) - -/***Time Slot and Data Port Sel. (CH10)***/ -#define INCA_IP_IOM_CO_TSDP10 ((volatile u32*)(INCA_IP_IOM+ 0x0120)) -#define INCA_IP_IOM_CO_TSDP10_DPS (1 << 7) -#define INCA_IP_IOM_CO_TSDP10_TSS (value) (((( 1 << 4) - 1) & (value)) << 0) - -/***Time Slot and Data Port Sel. (CH11)***/ -#define INCA_IP_IOM_CO_TSDP11 ((volatile u32*)(INCA_IP_IOM+ 0x0124)) -#define INCA_IP_IOM_CO_TSDP11_DPS (1 << 7) -#define INCA_IP_IOM_CO_TSDP11_TSS (value) (((( 1 << 4) - 1) & (value)) << 0) - -/***Time Slot and Data Port Sel. (CH20)***/ -#define INCA_IP_IOM_CO_TSDP20 ((volatile u32*)(INCA_IP_IOM+ 0x0128)) -#define INCA_IP_IOM_CO_TSDP20_DPS (1 << 7) -#define INCA_IP_IOM_CO_TSDP20_TSS (value) (((( 1 << 4) - 1) & (value)) << 0) - -/***Time Slot and Data Port Sel. (CH21)***/ -#define INCA_IP_IOM_CO_TSDP21 ((volatile u32*)(INCA_IP_IOM+ 0x012C)) -#define INCA_IP_IOM_CO_TSDP21_DPS (1 << 7) -#define INCA_IP_IOM_CO_TSDP21_TSS (value) (((( 1 << 4) - 1) & (value)) << 0) - -/***Ctrl. Reg. Contr. Data Access CH1x***/ -#define INCA_IP_IOM_CDA1_CR ((volatile u32*)(INCA_IP_IOM+ 0x0138)) -#define INCA_IP_IOM_CDA1_CR_EN_TBM (1 << 5) -#define INCA_IP_IOM_CDA1_CR_EN_I1 (1 << 4) -#define INCA_IP_IOM_CDA1_CR_EN_I0 (1 << 3) -#define INCA_IP_IOM_CDA1_CR_EN_O1 (1 << 2) -#define INCA_IP_IOM_CDA1_CR_EN_O0 (1 << 1) -#define INCA_IP_IOM_CDA1_CR_SWAP (1 << 0) - -/***Ctrl. Reg. Contr. Data Access CH1x***/ -#define INCA_IP_IOM_CDA2_CR ((volatile u32*)(INCA_IP_IOM+ 0x013C)) -#define INCA_IP_IOM_CDA2_CR_EN_TBM (1 << 5) -#define INCA_IP_IOM_CDA2_CR_EN_I1 (1 << 4) -#define INCA_IP_IOM_CDA2_CR_EN_I0 (1 << 3) -#define INCA_IP_IOM_CDA2_CR_EN_O1 (1 << 2) -#define INCA_IP_IOM_CDA2_CR_EN_O0 (1 << 1) -#define INCA_IP_IOM_CDA2_CR_SWAP (1 << 0) - -/***Control Register B-Channel Data***/ -#define INCA_IP_IOM_BCHA_CR ((volatile u32*)(INCA_IP_IOM+ 0x0144)) -#define INCA_IP_IOM_BCHA_CR_EN_BC2 (1 << 4) -#define INCA_IP_IOM_BCHA_CR_EN_BC1 (1 << 3) - -/***Control Register B-Channel Data***/ -#define INCA_IP_IOM_BCHB_CR ((volatile u32*)(INCA_IP_IOM+ 0x0148)) -#define INCA_IP_IOM_BCHB_CR_EN_BC2 (1 << 4) -#define INCA_IP_IOM_BCHB_CR_EN_BC1 (1 << 3) - -/***Control Reg. for HDLC and CI1 Data***/ -#define INCA_IP_IOM_DCI_CR ((volatile u32*)(INCA_IP_IOM+ 0x014C)) -#define INCA_IP_IOM_DCI_CR_DPS_CI1 (1 << 7) -#define INCA_IP_IOM_DCI_CR_EN_CI1 (1 << 6) -#define INCA_IP_IOM_DCI_CR_EN_D (1 << 5) - -/***Control Reg. for HDLC and CI1 Data***/ -#define INCA_IP_IOM_DCIC_CR ((volatile u32*)(INCA_IP_IOM+ 0x014C)) -#define INCA_IP_IOM_DCIC_CR_DPS_CI0 (1 << 7) -#define INCA_IP_IOM_DCIC_CR_EN_CI0 (1 << 6) -#define INCA_IP_IOM_DCIC_CR_DPS_D (1 << 5) - -/***Control Reg. Serial Data Strobe x***/ -#define INCA_IP_IOM_SDS_CR ((volatile u32*)(INCA_IP_IOM+ 0x0154)) -#define INCA_IP_IOM_SDS_CR_ENS_TSS (1 << 7) -#define INCA_IP_IOM_SDS_CR_ENS_TSS_1 (1 << 6) -#define INCA_IP_IOM_SDS_CR_ENS_TSS_3 (1 << 5) -#define INCA_IP_IOM_SDS_CR_TSS (value) (((( 1 << 4) - 1) & (value)) << 0) - -/***Control Register IOM Data***/ -#define INCA_IP_IOM_IOM_CR ((volatile u32*)(INCA_IP_IOM+ 0x015C)) -#define INCA_IP_IOM_IOM_CR_SPU (1 << 7) -#define INCA_IP_IOM_IOM_CR_CI_CS (1 << 5) -#define INCA_IP_IOM_IOM_CR_TIC_DIS (1 << 4) -#define INCA_IP_IOM_IOM_CR_EN_BCL (1 << 3) -#define INCA_IP_IOM_IOM_CR_CLKM (1 << 2) -#define INCA_IP_IOM_IOM_CR_Res (1 << 1) -#define INCA_IP_IOM_IOM_CR_DIS_IOM (1 << 0) - -/***Synchronous Transfer Interrupt***/ -#define INCA_IP_IOM_STI ((volatile u32*)(INCA_IP_IOM+ 0x0160)) -#define INCA_IP_IOM_STI_STOV21 (1 << 7) -#define INCA_IP_IOM_STI_STOV20 (1 << 6) -#define INCA_IP_IOM_STI_STOV11 (1 << 5) -#define INCA_IP_IOM_STI_STOV10 (1 << 4) -#define INCA_IP_IOM_STI_STI21 (1 << 3) -#define INCA_IP_IOM_STI_STI20 (1 << 2) -#define INCA_IP_IOM_STI_STI11 (1 << 1) -#define INCA_IP_IOM_STI_STI10 (1 << 0) - -/***Acknowledge Synchronous Transfer Interrupt***/ -#define INCA_IP_IOM_ASTI ((volatile u32*)(INCA_IP_IOM+ 0x0160)) -#define INCA_IP_IOM_ASTI_ACK21 (1 << 3) -#define INCA_IP_IOM_ASTI_ACK20 (1 << 2) -#define INCA_IP_IOM_ASTI_ACK11 (1 << 1) -#define INCA_IP_IOM_ASTI_ACK10 (1 << 0) - -/***Mask Synchronous Transfer Interrupt***/ -#define INCA_IP_IOM_MSTI ((volatile u32*)(INCA_IP_IOM+ 0x0164)) -#define INCA_IP_IOM_MSTI_STOV21 (1 << 7) -#define INCA_IP_IOM_MSTI_STOV20 (1 << 6) -#define INCA_IP_IOM_MSTI_STOV11 (1 << 5) -#define INCA_IP_IOM_MSTI_STOV10 (1 << 4) -#define INCA_IP_IOM_MSTI_STI21 (1 << 3) -#define INCA_IP_IOM_MSTI_STI20 (1 << 2) -#define INCA_IP_IOM_MSTI_STI11 (1 << 1) -#define INCA_IP_IOM_MSTI_STI10 (1 << 0) - -/***Configuration Register for Serial Data Strobes***/ -#define INCA_IP_IOM_SDS_CONF ((volatile u32*)(INCA_IP_IOM+ 0x0168)) -#define INCA_IP_IOM_SDS_CONF_SDS_BCL (1 << 0) - -/***Monitoring CDA Bits***/ -#define INCA_IP_IOM_MCDA ((volatile u32*)(INCA_IP_IOM+ 0x016C)) -#define INCA_IP_IOM_MCDA_MCDA21 (value) (((( 1 << 2) - 1) & (value)) << 6) -#define INCA_IP_IOM_MCDA_MCDA20 (value) (((( 1 << 2) - 1) & (value)) << 4) -#define INCA_IP_IOM_MCDA_MCDA11 (value) (((( 1 << 2) - 1) & (value)) << 2) -#define INCA_IP_IOM_MCDA_MCDA10 (value) (((( 1 << 2) - 1) & (value)) << 0) - -/***********************************************************************/ -/* Module : ASC register address and bits */ -/***********************************************************************/ - -#define INCA_IP_ASC (0xB8000400) -/***********************************************************************/ - - -/***ASC Port Input Select Register***/ -#define INCA_IP_ASC_ASC_PISEL ((volatile u32*)(INCA_IP_ASC+ 0x0004)) -#define INCA_IP_ASC_ASC_PISEL_RIS (1 << 0) - -/***ASC Control Register***/ -#define INCA_IP_ASC_ASC_CON ((volatile u32*)(INCA_IP_ASC+ 0x0010)) -#define INCA_IP_ASC_ASC_CON_R (1 << 15) -#define INCA_IP_ASC_ASC_CON_LB (1 << 14) -#define INCA_IP_ASC_ASC_CON_BRS (1 << 13) -#define INCA_IP_ASC_ASC_CON_ODD (1 << 12) -#define INCA_IP_ASC_ASC_CON_FDE (1 << 11) -#define INCA_IP_ASC_ASC_CON_OE (1 << 10) -#define INCA_IP_ASC_ASC_CON_FE (1 << 9) -#define INCA_IP_ASC_ASC_CON_PE (1 << 8) -#define INCA_IP_ASC_ASC_CON_OEN (1 << 7) -#define INCA_IP_ASC_ASC_CON_FEN (1 << 6) -#define INCA_IP_ASC_ASC_CON_PENRXDI (1 << 5) -#define INCA_IP_ASC_ASC_CON_REN (1 << 4) -#define INCA_IP_ASC_ASC_CON_STP (1 << 3) -#define INCA_IP_ASC_ASC_CON_M (value) (((( 1 << 3) - 1) & (value)) << 0) - -/***ASC Write Hardware Modified Control Register***/ -#define INCA_IP_ASC_ASC_WHBCON ((volatile u32*)(INCA_IP_ASC+ 0x0050)) -#define INCA_IP_ASC_ASC_WHBCON_SETOE (1 << 13) -#define INCA_IP_ASC_ASC_WHBCON_SETFE (1 << 12) -#define INCA_IP_ASC_ASC_WHBCON_SETPE (1 << 11) -#define INCA_IP_ASC_ASC_WHBCON_CLROE (1 << 10) -#define INCA_IP_ASC_ASC_WHBCON_CLRFE (1 << 9) -#define INCA_IP_ASC_ASC_WHBCON_CLRPE (1 << 8) -#define INCA_IP_ASC_ASC_WHBCON_SETREN (1 << 5) -#define INCA_IP_ASC_ASC_WHBCON_CLRREN (1 << 4) - -/***ASC Baudrate Timer/Reload Register***/ -#define INCA_IP_ASC_ASC_BTR ((volatile u32*)(INCA_IP_ASC+ 0x0014)) -#define INCA_IP_ASC_ASC_BTR_BR_VALUE (value) (((( 1 << 13) - 1) & (value)) << 0) - -/***ASC Fractional Divider Register***/ -#define INCA_IP_ASC_ASC_FDV ((volatile u32*)(INCA_IP_ASC+ 0x0018)) -#define INCA_IP_ASC_ASC_FDV_FD_VALUE (value) (((( 1 << 9) - 1) & (value)) << 0) - -/***ASC IrDA Pulse Mode/Width Register***/ -#define INCA_IP_ASC_ASC_PMW ((volatile u32*)(INCA_IP_ASC+ 0x001C)) -#define INCA_IP_ASC_ASC_PMW_IRPW (1 << 8) -#define INCA_IP_ASC_ASC_PMW_PW_VALUE (value) (((( 1 << 8) - 1) & (value)) << 0) - -/***ASC Transmit Buffer Register***/ -#define INCA_IP_ASC_ASC_TBUF ((volatile u32*)(INCA_IP_ASC+ 0x0020)) -#define INCA_IP_ASC_ASC_TBUF_TD_VALUE (value) (((( 1 << 9) - 1) & (value)) << 0) - -/***ASC Receive Buffer Register***/ -#define INCA_IP_ASC_ASC_RBUF ((volatile u32*)(INCA_IP_ASC+ 0x0024)) -#define INCA_IP_ASC_ASC_RBUF_RD_VALUE (value) (((( 1 << 9) - 1) & (value)) << 0) - -/***ASC Autobaud Control Register***/ -#define INCA_IP_ASC_ASC_ABCON ((volatile u32*)(INCA_IP_ASC+ 0x0030)) -#define INCA_IP_ASC_ASC_ABCON_RXINV (1 << 11) -#define INCA_IP_ASC_ASC_ABCON_TXINV (1 << 10) -#define INCA_IP_ASC_ASC_ABCON_ABEM (value) (((( 1 << 2) - 1) & (value)) << 8) -#define INCA_IP_ASC_ASC_ABCON_FCDETEN (1 << 4) -#define INCA_IP_ASC_ASC_ABCON_ABDETEN (1 << 3) -#define INCA_IP_ASC_ASC_ABCON_ABSTEN (1 << 2) -#define INCA_IP_ASC_ASC_ABCON_AUREN (1 << 1) -#define INCA_IP_ASC_ASC_ABCON_ABEN (1 << 0) - -/***Receive FIFO Control Register***/ -#define INCA_IP_ASC_RXFCON ((volatile u32*)(INCA_IP_ASC+ 0x0040)) -#define INCA_IP_ASC_RXFCON_RXFITL (value) (((( 1 << 6) - 1) & (value)) << 8) -#define INCA_IP_ASC_RXFCON_RXTMEN (1 << 2) -#define INCA_IP_ASC_RXFCON_RXFFLU (1 << 1) -#define INCA_IP_ASC_RXFCON_RXFEN (1 << 0) - -/***Transmit FIFO Control Register***/ -#define INCA_IP_ASC_TXFCON ((volatile u32*)(INCA_IP_ASC+ 0x0044)) -#define INCA_IP_ASC_TXFCON_TXFITL (value) (((( 1 << 6) - 1) & (value)) << 8) -#define INCA_IP_ASC_TXFCON_TXTMEN (1 << 2) -#define INCA_IP_ASC_TXFCON_TXFFLU (1 << 1) -#define INCA_IP_ASC_TXFCON_TXFEN (1 << 0) - -/***FIFO Status Register***/ -#define INCA_IP_ASC_FSTAT ((volatile u32*)(INCA_IP_ASC+ 0x0048)) -#define INCA_IP_ASC_FSTAT_TXFFL (value) (((( 1 << 6) - 1) & (value)) << 8) -#define INCA_IP_ASC_FSTAT_RXFFL (value) (((( 1 << 6) - 1) & (value)) << 0) - -/***ASC Write HW Modified Autobaud Control Register***/ -#define INCA_IP_ASC_ASC_WHBABCON ((volatile u32*)(INCA_IP_ASC+ 0x0054)) -#define INCA_IP_ASC_ASC_WHBABCON_SETABEN (1 << 1) -#define INCA_IP_ASC_ASC_WHBABCON_CLRABEN (1 << 0) - -/***ASC Autobaud Status Register***/ -#define INCA_IP_ASC_ASC_ABSTAT ((volatile u32*)(INCA_IP_ASC+ 0x0034)) -#define INCA_IP_ASC_ASC_ABSTAT_DETWAIT (1 << 4) -#define INCA_IP_ASC_ASC_ABSTAT_SCCDET (1 << 3) -#define INCA_IP_ASC_ASC_ABSTAT_SCSDET (1 << 2) -#define INCA_IP_ASC_ASC_ABSTAT_FCCDET (1 << 1) -#define INCA_IP_ASC_ASC_ABSTAT_FCSDET (1 << 0) - -/***ASC Write HW Modified Autobaud Status Register***/ -#define INCA_IP_ASC_ASC_WHBABSTAT ((volatile u32*)(INCA_IP_ASC+ 0x0058)) -#define INCA_IP_ASC_ASC_WHBABSTAT_SETDETWAIT (1 << 9) -#define INCA_IP_ASC_ASC_WHBABSTAT_CLRDETWAIT (1 << 8) -#define INCA_IP_ASC_ASC_WHBABSTAT_SETSCCDET (1 << 7) -#define INCA_IP_ASC_ASC_WHBABSTAT_CLRSCCDET (1 << 6) -#define INCA_IP_ASC_ASC_WHBABSTAT_SETSCSDET (1 << 5) -#define INCA_IP_ASC_ASC_WHBABSTAT_CLRSCSDET (1 << 4) -#define INCA_IP_ASC_ASC_WHBABSTAT_SETFCCDET (1 << 3) -#define INCA_IP_ASC_ASC_WHBABSTAT_CLRFCCDET (1 << 2) -#define INCA_IP_ASC_ASC_WHBABSTAT_SETFCSDET (1 << 1) -#define INCA_IP_ASC_ASC_WHBABSTAT_CLRFCSDET (1 << 0) - -/***ASC Clock Control Register***/ -#define INCA_IP_ASC_ASC_CLC ((volatile u32*)(INCA_IP_ASC+ 0x0000)) -#define INCA_IP_ASC_ASC_CLC_RMC (value) (((( 1 << 8) - 1) & (value)) << 8) -#define INCA_IP_ASC_ASC_CLC_DISS (1 << 1) -#define INCA_IP_ASC_ASC_CLC_DISR (1 << 0) - -/***********************************************************************/ -/* Module : DMA register address and bits */ -/***********************************************************************/ - -#define INCA_IP_DMA (0xBF108000) -/***********************************************************************/ - - -/***DMA RX Channel 0 Command Register***/ -#define INCA_IP_DMA_DMA_RXCCR0 ((volatile u32*)(INCA_IP_DMA+ 0x0800)) -#define INCA_IP_DMA_DMA_RXCCR0_LBE (1 << 31) -#define INCA_IP_DMA_DMA_RXCCR0_HPEN (1 << 30) -#define INCA_IP_DMA_DMA_RXCCR0_INIT (1 << 2) -#define INCA_IP_DMA_DMA_RXCCR0_OFF (1 << 1) -#define INCA_IP_DMA_DMA_RXCCR0_HR (1 << 0) - -/***DMA RX Channel 1 Command Register***/ -#define INCA_IP_DMA_DMA_RXCCR1 ((volatile u32*)(INCA_IP_DMA+ 0x0804)) -#define INCA_IP_DMA_DMA_RXCCR1_LBE (1 << 31) -#define INCA_IP_DMA_DMA_RXCCR1_HPEN (1 << 30) -#define INCA_IP_DMA_DMA_RXCCR1_INIT (1 << 2) -#define INCA_IP_DMA_DMA_RXCCR1_OFF (1 << 1) -#define INCA_IP_DMA_DMA_RXCCR1_HR (1 << 0) - -/***DMA Receive Interrupt Status Register***/ -#define INCA_IP_DMA_DMA_RXISR ((volatile u32*)(INCA_IP_DMA+ 0x0808)) -#define INCA_IP_DMA_DMA_RXISR_RDERRx (value) (((( 1 << 2) - 1) & (value)) << 8) -#define INCA_IP_DMA_DMA_RXISR_CMDCPTx (value) (((( 1 << 2) - 1) & (value)) << 6) -#define INCA_IP_DMA_DMA_RXISR_EOPx (value) (((( 1 << 2) - 1) & (value)) << 4) -#define INCA_IP_DMA_DMA_RXISR_CPTx (value) (((( 1 << 2) - 1) & (value)) << 2) -#define INCA_IP_DMA_DMA_RXISR_HLDx (value) (((( 1 << 2) - 1) & (value)) << 0) - -/***DMA Receive Interrupt Mask Register***/ -#define INCA_IP_DMA_DMA_RXIMR ((volatile u32*)(INCA_IP_DMA+ 0x080C)) -#define INCA_IP_DMA_DMA_RXIMR_RDERRx (value) (((( 1 << 2) - 1) & (value)) << 8) -#define INCA_IP_DMA_DMA_RXIMR_CMDCPTx (value) (((( 1 << 2) - 1) & (value)) << 6) -#define INCA_IP_DMA_DMA_RXIMR_EOPx (value) (((( 1 << 2) - 1) & (value)) << 4) -#define INCA_IP_DMA_DMA_RXIMR_CPTx (value) (((( 1 << 2) - 1) & (value)) << 2) -#define INCA_IP_DMA_DMA_RXIMR_HLDx (value) (((( 1 << 2) - 1) & (value)) << 0) - -/***DMA First Receive Descriptor Addr. for Rx Channel 0 -***/ -#define INCA_IP_DMA_DMA_RXFRDA0 ((volatile u32*)(INCA_IP_DMA+ 0x0810)) -#define INCA_IP_DMA_DMA_RXFRDA0_RXFRDA (value) (((( 1 << 28) - 1) & (value)) << 0) - -/***DMA First Receive Descriptor Addr. for Rx Channel 1 -***/ -#define INCA_IP_DMA_DMA_RXFRDA1 ((volatile u32*)(INCA_IP_DMA+ 0x0814)) -#define INCA_IP_DMA_DMA_RXFRDA1_RXFRDA (value) (((( 1 << 28) - 1) & (value)) << 0) - -/***DMA Receive Channel Polling Time***/ -#define INCA_IP_DMA_DMA_RXPOLL ((volatile u32*)(INCA_IP_DMA+ 0x0818)) -#define INCA_IP_DMA_DMA_RXPOLL_BSZ1 (value) (((( 1 << 2) - 1) & (value)) << 30) -#define INCA_IP_DMA_DMA_RXPOLL_BSZ0 (value) (((( 1 << 2) - 1) & (value)) << 28) -#define INCA_IP_DMA_DMA_RXPOLL_RXPOLLTIME (value) (((( 1 << 8) - 1) & (value)) << 0) - -/***DMA TX Channel 0 Command Register (Voice Port)***/ -#define INCA_IP_DMA_DMA_TXCCR0 ((volatile u32*)(INCA_IP_DMA+ 0x0880)) -#define INCA_IP_DMA_DMA_TXCCR0_LBE (1 << 31) -#define INCA_IP_DMA_DMA_TXCCR0_HPEN (1 << 30) -#define INCA_IP_DMA_DMA_TXCCR0_HR (1 << 2) -#define INCA_IP_DMA_DMA_TXCCR0_OFF (1 << 1) -#define INCA_IP_DMA_DMA_TXCCR0_INIT (1 << 0) - -/***DMA TX Channel 1 Command Register (Mangmt Port)***/ -#define INCA_IP_DMA_DMA_TXCCR1 ((volatile u32*)(INCA_IP_DMA+ 0x0884)) -#define INCA_IP_DMA_DMA_TXCCR1_LBE (1 << 31) -#define INCA_IP_DMA_DMA_TXCCR1_HPEN (1 << 30) -#define INCA_IP_DMA_DMA_TXCCR1_HR (1 << 2) -#define INCA_IP_DMA_DMA_TXCCR1_OFF (1 << 1) -#define INCA_IP_DMA_DMA_TXCCR1_INIT (1 << 0) - -/***DMA TX Channel 2 Command Register (SSC Port)***/ -#define INCA_IP_DMA_DMA_TXCCR2 ((volatile u32*)(INCA_IP_DMA+ 0x0888)) -#define INCA_IP_DMA_DMA_TXCCR2_LBE (1 << 31) -#define INCA_IP_DMA_DMA_TXCCR2_HPEN (1 << 30) -#define INCA_IP_DMA_DMA_TXCCR2_HBF (1 << 29) -#define INCA_IP_DMA_DMA_TXCCR2_HR (1 << 2) -#define INCA_IP_DMA_DMA_TXCCR2_OFF (1 << 1) -#define INCA_IP_DMA_DMA_TXCCR2_INIT (1 << 0) - -/***DMA First Receive Descriptor Addr. for Tx Channel 0 -***/ -#define INCA_IP_DMA_DMA_TXFRDA0 ((volatile u32*)(INCA_IP_DMA+ 0x08A0)) -#define INCA_IP_DMA_DMA_TXFRDA0_TXFRDA (value) (((( 1 << 28) - 1) & (value)) << 0) - -/***DMA First Receive Descriptor Addr. for Tx Channel 1 -***/ -#define INCA_IP_DMA_DMA_TXFRDA1 ((volatile u32*)(INCA_IP_DMA+ 0x08A4)) -#define INCA_IP_DMA_DMA_TXFRDA1_TXFRDA (value) (((( 1 << 28) - 1) & (value)) << 0) - -/***DMA First Receive Descriptor Addr. for Tx Channel 2 -***/ -#define INCA_IP_DMA_DMA_TXFRDA2 ((volatile u32*)(INCA_IP_DMA+ 0x08A8)) -#define INCA_IP_DMA_DMA_TXFRDA2_TXFRDA (value) (((( 1 << 28) - 1) & (value)) << 0) - -/***DMA Transmit Channel Arbitration Register***/ -#define INCA_IP_DMA_DMA_TXWGT ((volatile u32*)(INCA_IP_DMA+ 0x08C0)) -#define INCA_IP_DMA_DMA_TXWGT_TX2PR (value) (((( 1 << 2) - 1) & (value)) << 4) -#define INCA_IP_DMA_DMA_TXWGT_TX1PRI (value) (((( 1 << 2) - 1) & (value)) << 2) -#define INCA_IP_DMA_DMA_TXWGT_TX0PRI (value) (((( 1 << 2) - 1) & (value)) << 0) - -/***DMA Transmit Channel Polling Time***/ -#define INCA_IP_DMA_DMA_TXPOLL ((volatile u32*)(INCA_IP_DMA+ 0x08C4)) -#define INCA_IP_DMA_DMA_TXPOLL_BSZ2 (value) (((( 1 << 2) - 1) & (value)) << 30) -#define INCA_IP_DMA_DMA_TXPOLL_BSZ1 (value) (((( 1 << 2) - 1) & (value)) << 28) -#define INCA_IP_DMA_DMA_TXPOLL_BSZ0 (value) (((( 1 << 2) - 1) & (value)) << 26) -#define INCA_IP_DMA_DMA_TXPOLL_TXPOLLTIME (value) (((( 1 << 8) - 1) & (value)) << 0) - -/***DMA Transmit Interrupt Status Register***/ -#define INCA_IP_DMA_DMA_TXISR ((volatile u32*)(INCA_IP_DMA+ 0x08C8)) -#define INCA_IP_DMA_DMA_TXISR_RDERRx (value) (((( 1 << 3) - 1) & (value)) << 12) -#define INCA_IP_DMA_DMA_TXISR_HLDx (value) (((( 1 << 3) - 1) & (value)) << 9) -#define INCA_IP_DMA_DMA_TXISR_CPTx (value) (((( 1 << 3) - 1) & (value)) << 6) -#define INCA_IP_DMA_DMA_TXISR_EOPx (value) (((( 1 << 3) - 1) & (value)) << 3) -#define INCA_IP_DMA_DMA_TXISR_CMDCPTx (value) (((( 1 << 3) - 1) & (value)) << 0) - -/***DMA Transmit Interrupt Mask Register***/ -#define INCA_IP_DMA_DMA_TXIMR ((volatile u32*)(INCA_IP_DMA+ 0x08CC)) -#define INCA_IP_DMA_DMA_TXIMR_RDERRx (value) (((( 1 << 3) - 1) & (value)) << 12) -#define INCA_IP_DMA_DMA_TXIMR_HLDx (value) (((( 1 << 3) - 1) & (value)) << 9) -#define INCA_IP_DMA_DMA_TXIMR_CPTx (value) (((( 1 << 3) - 1) & (value)) << 6) -#define INCA_IP_DMA_DMA_TXIMR_EOPx (value) (((( 1 << 3) - 1) & (value)) << 3) -#define INCA_IP_DMA_DMA_TXIMR_CMDCPTx (value) (((( 1 << 3) - 1) & (value)) << 0) - -/***********************************************************************/ -/* Module : Debug register address and bits */ -/***********************************************************************/ - -#define INCA_IP_Debug (0xBF106000) -/***********************************************************************/ - - -/***MCD Break Bus Switch Register***/ -#define INCA_IP_Debug_MCD_BBS ((volatile u32*)(INCA_IP_Debug+ 0x0000)) -#define INCA_IP_Debug_MCD_BBS_BTP1 (1 << 19) -#define INCA_IP_Debug_MCD_BBS_BTP0 (1 << 18) -#define INCA_IP_Debug_MCD_BBS_BSP1 (1 << 17) -#define INCA_IP_Debug_MCD_BBS_BSP0 (1 << 16) -#define INCA_IP_Debug_MCD_BBS_BT5EN (1 << 15) -#define INCA_IP_Debug_MCD_BBS_BT4EN (1 << 14) -#define INCA_IP_Debug_MCD_BBS_BT5 (1 << 13) -#define INCA_IP_Debug_MCD_BBS_BT4 (1 << 12) -#define INCA_IP_Debug_MCD_BBS_BS5EN (1 << 7) -#define INCA_IP_Debug_MCD_BBS_BS4EN (1 << 6) -#define INCA_IP_Debug_MCD_BBS_BS5 (1 << 5) -#define INCA_IP_Debug_MCD_BBS_BS4 (1 << 4) - -/***MCD Multiplexer Control Register***/ -#define INCA_IP_Debug_MCD_MCR ((volatile u32*)(INCA_IP_Debug+ 0x0008)) -#define INCA_IP_Debug_MCD_MCR_MUX5 (1 << 4) -#define INCA_IP_Debug_MCD_MCR_MUX4 (1 << 3) -#define INCA_IP_Debug_MCD_MCR_MUX1 (1 << 0) - -/***********************************************************************/ -/* Module : TSF register address and bits */ -/***********************************************************************/ - -#define INCA_IP_TSF (0xB8000900) -/***********************************************************************/ - - -/***TSF Configuration Register (0000H)***/ -#define INCA_IP_TSF_TSF_CONF ((volatile u32*)(INCA_IP_TSF+ 0x0000)) -#define INCA_IP_TSF_TSF_CONF_PWMEN (1 << 2) -#define INCA_IP_TSF_TSF_CONF_LEDEN (1 << 1) -#define INCA_IP_TSF_TSF_CONF_KEYEN (1 << 0) - -/***Key scan Configuration Register (0004H)***/ -#define INCA_IP_TSF_KEY_CONF ((volatile u32*)(INCA_IP_TSF+ 0x0004)) -#define INCA_IP_TSF_KEY_CONF_SL (value) (((( 1 << 4) - 1) & (value)) << 0) - -/***Scan Register Line 0 and 1 (0008H)***/ -#define INCA_IP_TSF_SREG01 ((volatile u32*)(INCA_IP_TSF+ 0x0008)) -#define INCA_IP_TSF_SREG01_RES1x (value) (((( 1 << 12) - 1) & (value)) << 16) -#define INCA_IP_TSF_SREG01_RES0x (value) (((( 1 << 13) - 1) & (value)) << 0) - -/***Scan Register Line 2 and 3 (000CH)***/ -#define INCA_IP_TSF_SREG23 ((volatile u32*)(INCA_IP_TSF+ 0x000C)) -#define INCA_IP_TSF_SREG23_RES3x (value) (((( 1 << 10) - 1) & (value)) << 16) -#define INCA_IP_TSF_SREG23_RES2x (value) (((( 1 << 11) - 1) & (value)) << 0) - -/***Scan Register Line 4, 5 and 6 (0010H)***/ -#define INCA_IP_TSF_SREG456 ((volatile u32*)(INCA_IP_TSF+ 0x0010)) -#define INCA_IP_TSF_SREG456_RES6x (value) (((( 1 << 7) - 1) & (value)) << 24) -#define INCA_IP_TSF_SREG456_RES5x (value) (((( 1 << 8) - 1) & (value)) << 16) -#define INCA_IP_TSF_SREG456_RES4x (value) (((( 1 << 9) - 1) & (value)) << 0) - -/***Scan Register Line 7 to 12 (0014H)***/ -#define INCA_IP_TSF_SREG7to12 ((volatile u32*)(INCA_IP_TSF+ 0x0014)) -#define INCA_IP_TSF_SREG7to12_RES12x (1 << 28) -#define INCA_IP_TSF_SREG7to12_RES11x (value) (((( 1 << 2) - 1) & (value)) << 24) -#define INCA_IP_TSF_SREG7to12_RES10x (value) (((( 1 << 3) - 1) & (value)) << 20) -#define INCA_IP_TSF_SREG7to12_RES9x (value) (((( 1 << 4) - 1) & (value)) << 16) -#define INCA_IP_TSF_SREG7to12_RES8x (value) (((( 1 << 5) - 1) & (value)) << 8) -#define INCA_IP_TSF_SREG7to12_RES7x (value) (((( 1 << 6) - 1) & (value)) << 0) - -/***LEDMUX Configuration Register (0018H)***/ -#define INCA_IP_TSF_LEDMUX_CONF ((volatile u32*)(INCA_IP_TSF+ 0x0018)) -#define INCA_IP_TSF_LEDMUX_CONF_ETL1 (1 << 25) -#define INCA_IP_TSF_LEDMUX_CONF_ESTA1 (1 << 24) -#define INCA_IP_TSF_LEDMUX_CONF_EDPX1 (1 << 23) -#define INCA_IP_TSF_LEDMUX_CONF_EACT1 (1 << 22) -#define INCA_IP_TSF_LEDMUX_CONF_ESPD1 (1 << 21) -#define INCA_IP_TSF_LEDMUX_CONF_ETL0 (1 << 20) -#define INCA_IP_TSF_LEDMUX_CONF_ESTA0 (1 << 19) -#define INCA_IP_TSF_LEDMUX_CONF_EDPX0 (1 << 18) -#define INCA_IP_TSF_LEDMUX_CONF_EACT0 (1 << 17) -#define INCA_IP_TSF_LEDMUX_CONF_ESPD0 (1 << 16) -#define INCA_IP_TSF_LEDMUX_CONF_INV (1 << 1) -#define INCA_IP_TSF_LEDMUX_CONF_NCOL (1 << 0) - -/***LED Register (001CH)***/ -#define INCA_IP_TSF_LED_REG ((volatile u32*)(INCA_IP_TSF+ 0x001C)) -#define INCA_IP_TSF_LED_REG_Lxy (value) (((( 1 << 24) - 1) & (value)) << 0) - -/***Pulse Width Modulator 1 and 2 Register (0020H)***/ -#define INCA_IP_TSF_PWM12 ((volatile u32*)(INCA_IP_TSF+ 0x0020)) -#define INCA_IP_TSF_PWM12_PW2PW1 (value) (((( 1 << NaN) - 1) & (value)) << NaN) - -/***********************************************************************/ -/* Module : Ports register address and bits */ -/***********************************************************************/ - -#define INCA_IP_Ports (0xB8000A00) -/***********************************************************************/ - - -/***Port 1 Data Output Register (0020H)***/ -#define INCA_IP_Ports_P1_OUT ((volatile u32*)(INCA_IP_Ports+ 0x0020)) -#define INCA_IP_Ports_P1_OUT_P(value) (1 << value) - - -/***Port 2 Data Output Register (0040H)***/ -#define INCA_IP_Ports_P2_OUT ((volatile u32*)(INCA_IP_Ports+ 0x0040)) -#define INCA_IP_Ports_P2_OUT_P(value) (1 << value) - - -/***Port 1 Data Input Register (0024H)***/ -#define INCA_IP_Ports_P1_IN ((volatile u32*)(INCA_IP_Ports+ 0x0024)) -#define INCA_IP_Ports_P1_IN_P(value) (1 << value) - - -/***Port 2 Data Input Register (0044H)***/ -#define INCA_IP_Ports_P2_IN ((volatile u32*)(INCA_IP_Ports+ 0x0044)) -#define INCA_IP_Ports_P2_IN_P(value) (1 << value) - - -/***Port 1 Direction Register (0028H)***/ -#define INCA_IP_Ports_P1_DIR ((volatile u32*)(INCA_IP_Ports+ 0x0028)) -#define INCA_IP_Ports_P1_DIR_Port1P(value) (1 << value) - -#define INCA_IP_Ports_P1_DIR_Port2Pn (value) (((( 1 << 16) - 1) & (value)) << 0) - -/***Port 2 Direction Register (0048H)***/ -#define INCA_IP_Ports_P2_DIR ((volatile u32*)(INCA_IP_Ports+ 0x0048)) -#define INCA_IP_Ports_P2_DIR_Port1P(value) (1 << value) - -#define INCA_IP_Ports_P2_DIR_Port2Pn (value) (((( 1 << 16) - 1) & (value)) << 0) - -/***Port 0 Alternate Function Select Register 0 (000C H) -***/ -#define INCA_IP_Ports_P0_ALTSEL ((volatile u32*)(INCA_IP_Ports+ 0x000C)) -#define INCA_IP_Ports_P0_ALTSEL_Port0P(value) (1 << value) - - -/***Port 1 Alternate Function Select Register 0 (002C H) -***/ -#define INCA_IP_Ports_P1_ALTSEL ((volatile u32*)(INCA_IP_Ports+ 0x002C)) -#define INCA_IP_Ports_P1_ALTSEL_Port1P(value) (1 << value) - -#define INCA_IP_Ports_P1_ALTSEL_Port2P(value) (1 << value) - - -/***Port 2 Alternate Function Select Register 0 (004C H) -***/ -#define INCA_IP_Ports_P2_ALTSEL ((volatile u32*)(INCA_IP_Ports+ 0x004C)) -#define INCA_IP_Ports_P2_ALTSEL_Port1P(value) (1 << value) - -#define INCA_IP_Ports_P2_ALTSEL_Port2P(value) (1 << value) - - -/***Port 0 Input Schmitt-Trigger Off Register (0010 H) -***/ -#define INCA_IP_Ports_P0_STOFF ((volatile u32*)(INCA_IP_Ports+ 0x0010)) -#define INCA_IP_Ports_P0_STOFF_Port0P(value) (1 << value) - - -/***Port 1 Input Schmitt-Trigger Off Register (0030 H) -***/ -#define INCA_IP_Ports_P1_STOFF ((volatile u32*)(INCA_IP_Ports+ 0x0030)) -#define INCA_IP_Ports_P1_STOFF_Port1P(value) (1 << value) - -#define INCA_IP_Ports_P1_STOFF_Port2P(value) (1 << value) - - -/***Port 2 Input Schmitt-Trigger Off Register (0050 H) -***/ -#define INCA_IP_Ports_P2_STOFF ((volatile u32*)(INCA_IP_Ports+ 0x0050)) -#define INCA_IP_Ports_P2_STOFF_Port1P(value) (1 << value) - -#define INCA_IP_Ports_P2_STOFF_Port2P(value) (1 << value) - - -/***Port 2 Open Drain Control Register (0054H)***/ -#define INCA_IP_Ports_P2_OD ((volatile u32*)(INCA_IP_Ports+ 0x0054)) -#define INCA_IP_Ports_P2_OD_Port2P(value) (1 << value) - - -/***Port 0 Pull Up Device Enable Register (0018 H)***/ -#define INCA_IP_Ports_P0_PUDEN ((volatile u32*)(INCA_IP_Ports+ 0x0018)) -#define INCA_IP_Ports_P0_PUDEN_Port0P(value) (1 << value) - - -/***Port 2 Pull Up Device Enable Register (0058 H)***/ -#define INCA_IP_Ports_P2_PUDEN ((volatile u32*)(INCA_IP_Ports+ 0x0058)) -#define INCA_IP_Ports_P2_PUDEN_Port2P(value) (1 << value) - -#define INCA_IP_Ports_P2_PUDEN_Port2P(value) (1 << value) - - -/***Port 0 Pull Up/Pull Down Select Register (001C H)***/ -#define INCA_IP_Ports_P0_PUDSEL ((volatile u32*)(INCA_IP_Ports+ 0x001C)) -#define INCA_IP_Ports_P0_PUDSEL_Port0P(value) (1 << value) - - -/***Port 2 Pull Up/Pull Down Select Register (005C H)***/ -#define INCA_IP_Ports_P2_PUDSEL ((volatile u32*)(INCA_IP_Ports+ 0x005C)) -#define INCA_IP_Ports_P2_PUDSEL_Port2P(value) (1 << value) - -#define INCA_IP_Ports_P2_PUDSEL_Port2P(value) (1 << value) - - -/***********************************************************************/ -/* Module : DES/3DES register address and bits */ -/***********************************************************************/ - -#define INCA_IP_DES_3DES (0xB8000800) -/***********************************************************************/ - - -/***DES Input Data High Register***/ -#define INCA_IP_DES_3DES_DES_IHR ((volatile u32*)(INCA_IP_DES_3DES+ 0x0000)) -#define INCA_IP_DES_3DES_DES_IHR_IH(value) (1 << value) - - -/***DES Input Data Low Register***/ -#define INCA_IP_DES_3DES_DES_ILR ((volatile u32*)(INCA_IP_DES_3DES+ 0x0004)) -#define INCA_IP_DES_3DES_DES_ILR_IL(value) (1 << value) - - -/***DES Key #1 High Register***/ -#define INCA_IP_DES_3DES_DES_K1HR ((volatile u32*)(INCA_IP_DES_3DES+ 0x0008)) -#define INCA_IP_DES_3DES_DES_K1HR_K1H(value) (1 << value) - - -/***DES Key #1 Low Register***/ -#define INCA_IP_DES_3DES_DES_K1LR ((volatile u32*)(INCA_IP_DES_3DES+ 0x000C)) -#define INCA_IP_DES_3DES_DES_K1LR_K1L(value) (1 << value) - - -/***DES Key #2 High Register***/ -#define INCA_IP_DES_3DES_DES_K2HR ((volatile u32*)(INCA_IP_DES_3DES+ 0x0010)) -#define INCA_IP_DES_3DES_DES_K2HR_K2H(value) (1 << value) - - -/***DES Key #2 Low Register***/ -#define INCA_IP_DES_3DES_DES_K2LR ((volatile u32*)(INCA_IP_DES_3DES+ 0x0014)) -#define INCA_IP_DES_3DES_DES_K2LR_K2L(value) (1 << value) - - -/***DES Key #3 High Register***/ -#define INCA_IP_DES_3DES_DES_K3HR ((volatile u32*)(INCA_IP_DES_3DES+ 0x0018)) -#define INCA_IP_DES_3DES_DES_K3HR_K3H(value) (1 << value) - - -/***DES Key #3 Low Register***/ -#define INCA_IP_DES_3DES_DES_K3LR ((volatile u32*)(INCA_IP_DES_3DES+ 0x001C)) -#define INCA_IP_DES_3DES_DES_K3LR_K3L(value) (1 << value) - - -/***DES Initialization Vector High Register***/ -#define INCA_IP_DES_3DES_DES_IVHR ((volatile u32*)(INCA_IP_DES_3DES+ 0x0020)) -#define INCA_IP_DES_3DES_DES_IVHR_IVH(value) (1 << value) - - -/***DES Initialization Vector Low Register***/ -#define INCA_IP_DES_3DES_DES_IVLR ((volatile u32*)(INCA_IP_DES_3DES+ 0x0024)) -#define INCA_IP_DES_3DES_DES_IVLR_IVL(value) (1 << value) - - -/***DES Control Register***/ -#define INCA_IP_DES_3DES_DES_CONTROLR ((volatile u32*)(INCA_IP_DES_3DES+ 0x0028)) -#define INCA_IP_DES_3DES_DES_CONTROLR_KRE (1 << 31) -#define INCA_IP_DES_3DES_DES_CONTROLR_DAU (1 << 16) -#define INCA_IP_DES_3DES_DES_CONTROLR_F(value) (1 << value) - -#define INCA_IP_DES_3DES_DES_CONTROLR_O(value) (1 << value) - -#define INCA_IP_DES_3DES_DES_CONTROLR_GO (1 << 8) -#define INCA_IP_DES_3DES_DES_CONTROLR_STP (1 << 7) -#define INCA_IP_DES_3DES_DES_CONTROLR_IEN (1 << 6) -#define INCA_IP_DES_3DES_DES_CONTROLR_BUS (1 << 5) -#define INCA_IP_DES_3DES_DES_CONTROLR_SM (1 << 4) -#define INCA_IP_DES_3DES_DES_CONTROLR_E_D (1 << 3) -#define INCA_IP_DES_3DES_DES_CONTROLR_M(value) (1 << value) - - -/***DES Output Data High Register***/ -#define INCA_IP_DES_3DES_DES_OHR ((volatile u32*)(INCA_IP_DES_3DES+ 0x002C)) -#define INCA_IP_DES_3DES_DES_OHR_OH(value) (1 << value) - - -/***DES Output Data Low Register***/ -#define INCA_IP_DES_3DES_DES_OLR ((volatile u32*)(INCA_IP_DES_3DES+ 0x0030)) -#define INCA_IP_DES_3DES_DES_OLR_OL(value) (1 << value) - - -/***********************************************************************/ -/* Module : AES register address and bits */ -/***********************************************************************/ - -#define INCA_IP_AES (0xB8000880) -/***********************************************************************/ - - -/***AES Input Data 3 Register***/ -#define INCA_IP_AES_AES_ID3R ((volatile u32*)(INCA_IP_AES+ 0x0000)) -#define INCA_IP_AES_AES_ID3R_I(value) (1 << value) - - -/***AES Input Data 2 Register***/ -#define INCA_IP_AES_AES_ID2R ((volatile u32*)(INCA_IP_AES+ 0x0000)) -#define INCA_IP_AES_AES_ID2R_I(value) (1 << value) - - -/***AES Input Data 1 Register***/ -#define INCA_IP_AES_AES_ID1R ((volatile u32*)(INCA_IP_AES+ 0x0000)) -#define INCA_IP_AES_AES_ID1R_I(value) (1 << value) - - -/***AES Input Data 0 Register***/ -#define INCA_IP_AES_AES_ID0R ((volatile u32*)(INCA_IP_AES+ 0x0000)) -#define INCA_IP_AES_AES_ID0R_I(value) (1 << value) - - -/***AES Output Data 3 Register***/ -#define INCA_IP_AES_AES_OD3R ((volatile u32*)(INCA_IP_AES+ 0x0000)) -#define INCA_IP_AES_AES_OD3R_O(value) (1 << value) - - -/***AES Output Data 2 Register***/ -#define INCA_IP_AES_AES_OD2R ((volatile u32*)(INCA_IP_AES+ 0x0000)) -#define INCA_IP_AES_AES_OD2R_O(value) (1 << value) - - -/***AES Output Data 1 Register***/ -#define INCA_IP_AES_AES_OD1R ((volatile u32*)(INCA_IP_AES+ 0x0000)) -#define INCA_IP_AES_AES_OD1R_O(value) (1 << value) - - -/***AES Output Data 0 Register***/ -#define INCA_IP_AES_AES_OD0R ((volatile u32*)(INCA_IP_AES+ 0x0000)) -#define INCA_IP_AES_AES_OD0R_O(value) (1 << value) - - -/***AES Key 7 Register***/ -#define INCA_IP_AES_AES_K7R ((volatile u32*)(INCA_IP_AES+ 0x0000)) -#define INCA_IP_AES_AES_K7R_K(value) (1 << value) - - -/***AES Key 6 Register***/ -#define INCA_IP_AES_AES_K6R ((volatile u32*)(INCA_IP_AES+ 0x0000)) -#define INCA_IP_AES_AES_K6R_K(value) (1 << value) - - -/***AES Key 5 Register***/ -#define INCA_IP_AES_AES_K5R ((volatile u32*)(INCA_IP_AES+ 0x0000)) -#define INCA_IP_AES_AES_K5R_K(value) (1 << value) - - -/***AES Key 4 Register***/ -#define INCA_IP_AES_AES_K4R ((volatile u32*)(INCA_IP_AES+ 0x0000)) -#define INCA_IP_AES_AES_K4R_K(value) (1 << value) - - -/***AES Key 3 Register***/ -#define INCA_IP_AES_AES_K3R ((volatile u32*)(INCA_IP_AES+ 0x0000)) -#define INCA_IP_AES_AES_K3R_K(value) (1 << value) - - -/***AES Key 2 Register***/ -#define INCA_IP_AES_AES_K2R ((volatile u32*)(INCA_IP_AES+ 0x0000)) -#define INCA_IP_AES_AES_K2R_K(value) (1 << value) - - -/***AES Key 1 Register***/ -#define INCA_IP_AES_AES_K1R ((volatile u32*)(INCA_IP_AES+ 0x0000)) -#define INCA_IP_AES_AES_K1R_K(value) (1 << value) - - -/***AES Key 0 Register***/ -#define INCA_IP_AES_AES_K0R ((volatile u32*)(INCA_IP_AES+ 0x0000)) -#define INCA_IP_AES_AES_K0R_K(value) (1 << value) - - -/***AES Initialization Vector 3 Register***/ -#define INCA_IP_AES_AES_IV3R ((volatile u32*)(INCA_IP_AES+ 0x0000)) -#define INCA_IP_AES_AES_IV3R_IV(value) (1 << value) - - -/***AES Initialization Vector 2 Register***/ -#define INCA_IP_AES_AES_IV2R ((volatile u32*)(INCA_IP_AES+ 0x0000)) -#define INCA_IP_AES_AES_IV2R_IV(value) (1 << value) - - -/***AES Initialization Vector 1 Register***/ -#define INCA_IP_AES_AES_IV1R ((volatile u32*)(INCA_IP_AES+ 0x0000)) -#define INCA_IP_AES_AES_IV1R_IV(value) (1 << value) - - -/***AES Initialization Vector 0 Register***/ -#define INCA_IP_AES_AES_IV0R ((volatile u32*)(INCA_IP_AES+ 0x0000)) -#define INCA_IP_AES_AES_IV0R_IV (value) (((( 1 << 32) - 1) &(value)) << 0) - -/***AES Control Register***/ -#define INCA_IP_AES_AES_CONTROLR ((volatile u32*)(INCA_IP_AES+ 0x0000)) -#define INCA_IP_AES_AES_CONTROLR_KRE (1 << 31) -#define INCA_IP_AES_AES_CONTROLR_DAU (1 << 16) -#define INCA_IP_AES_AES_CONTROLR_PNK (1 << 15) -#define INCA_IP_AES_AES_CONTROLR_F(value) (1 << value) - -#define INCA_IP_AES_AES_CONTROLR_O(value) (1 << value) - -#define INCA_IP_AES_AES_CONTROLR_GO (1 << 8) -#define INCA_IP_AES_AES_CONTROLR_STP (1 << 7) -#define INCA_IP_AES_AES_CONTROLR_IEN (1 << 6) -#define INCA_IP_AES_AES_CONTROLR_BUS (1 << 5) -#define INCA_IP_AES_AES_CONTROLR_SM (1 << 4) -#define INCA_IP_AES_AES_CONTROLR_E_D (1 << 3) -#define INCA_IP_AES_AES_CONTROLR_KV (1 << 2) -#define INCA_IP_AES_AES_CONTROLR_K(value) (1 << value) - - -/***********************************************************************/ -/* Module : I²C register address and bits */ -/***********************************************************************/ - -#define INCA_IP_IIC (0xB8000700) -/***********************************************************************/ - - -/***I²C Port Input Select Register***/ -#define INCA_IP_IIC_IIC_PISEL ((volatile u32*)(INCA_IP_IIC+ 0x0004)) -#define INCA_IP_IIC_IIC_PISEL_SDAIS(value) (1 << value) - -#define INCA_IP_IIC_IIC_PISEL_SCLIS(value) (1 << value) - - -/***I²C Clock Control Register***/ -#define INCA_IP_IIC_IIC_CLC ((volatile u32*)(INCA_IP_IIC+ 0x0000)) -#define INCA_IP_IIC_IIC_CLC_RMC (value) (((( 1 << 8) - 1) & (value)) << 8) -#define INCA_IP_IIC_IIC_CLC_DISS (1 << 1) -#define INCA_IP_IIC_IIC_CLC_DISR (1 << 0) - -/***I²C System Control Register***/ -#define INCA_IP_IIC_IIC_SYSCON_0 ((volatile u32*)(INCA_IP_IIC+ 0x0010)) -#define INCA_IP_IIC_IIC_SYSCON_0_WMEN (1 << 31) -#define INCA_IP_IIC_IIC_SYSCON_0_CI (value) (((( 1 << 2) - 1) & (value)) << 26) -#define INCA_IP_IIC_IIC_SYSCON_0_STP (1 << 25) -#define INCA_IP_IIC_IIC_SYSCON_0_IGE (1 << 24) -#define INCA_IP_IIC_IIC_SYSCON_0_TRX (1 << 23) -#define INCA_IP_IIC_IIC_SYSCON_0_INT (1 << 22) -#define INCA_IP_IIC_IIC_SYSCON_0_ACKDIS (1 << 21) -#define INCA_IP_IIC_IIC_SYSCON_0_BUM (1 << 20) -#define INCA_IP_IIC_IIC_SYSCON_0_MOD (value) (((( 1 << 2) - 1) & (value)) << 18) -#define INCA_IP_IIC_IIC_SYSCON_0_RSC (1 << 17) -#define INCA_IP_IIC_IIC_SYSCON_0_M10 (1 << 16) -#define INCA_IP_IIC_IIC_SYSCON_0_RMEN (1 << 15) -#define INCA_IP_IIC_IIC_SYSCON_0_CO (value) (((( 1 << 3) - 1) & (value)) << 8) -#define INCA_IP_IIC_IIC_SYSCON_0_IRQE (1 << 7) -#define INCA_IP_IIC_IIC_SYSCON_0_IRQP (1 << 6) -#define INCA_IP_IIC_IIC_SYSCON_0_IRQD (1 << 5) -#define INCA_IP_IIC_IIC_SYSCON_0_BB (1 << 4) -#define INCA_IP_IIC_IIC_SYSCON_0_LRB (1 << 3) -#define INCA_IP_IIC_IIC_SYSCON_0_SLA (1 << 2) -#define INCA_IP_IIC_IIC_SYSCON_0_AL (1 << 1) -#define INCA_IP_IIC_IIC_SYSCON_0_ADR (1 << 0) - -/***I²C System Control Register***/ -#define INCA_IP_IIC_IIC_SYSCON_1 ((volatile u32*)(INCA_IP_IIC+ 0x0010)) -#define INCA_IP_IIC_IIC_SYSCON_1_RM (value) (((( 1 << 8) - 1) & (value)) << 24) -#define INCA_IP_IIC_IIC_SYSCON_1_TRX (1 << 23) -#define INCA_IP_IIC_IIC_SYSCON_1_INT (1 << 22) -#define INCA_IP_IIC_IIC_SYSCON_1_ACKDIS (1 << 21) -#define INCA_IP_IIC_IIC_SYSCON_1_BUM (1 << 20) -#define INCA_IP_IIC_IIC_SYSCON_1_MOD (value) (((( 1 << 2) - 1) & (value)) << 18) -#define INCA_IP_IIC_IIC_SYSCON_1_RSC (1 << 17) -#define INCA_IP_IIC_IIC_SYSCON_1_M10 (1 << 16) -#define INCA_IP_IIC_IIC_SYSCON_1_RMEN (1 << 15) -#define INCA_IP_IIC_IIC_SYSCON_1_CO (value) (((( 1 << 3) - 1) & (value)) << 8) -#define INCA_IP_IIC_IIC_SYSCON_1_IRQE (1 << 7) -#define INCA_IP_IIC_IIC_SYSCON_1_IRQP (1 << 6) -#define INCA_IP_IIC_IIC_SYSCON_1_IRQD (1 << 5) -#define INCA_IP_IIC_IIC_SYSCON_1_BB (1 << 4) -#define INCA_IP_IIC_IIC_SYSCON_1_LRB (1 << 3) -#define INCA_IP_IIC_IIC_SYSCON_1_SLA (1 << 2) -#define INCA_IP_IIC_IIC_SYSCON_1_AL (1 << 1) -#define INCA_IP_IIC_IIC_SYSCON_1_ADR (1 << 0) - -/***I²C System Control Register***/ -#define INCA_IP_IIC_IIC_SYSCON_2 ((volatile u32*)(INCA_IP_IIC+ 0x0010)) -#define INCA_IP_IIC_IIC_SYSCON_2_WMEN (1 << 31) -#define INCA_IP_IIC_IIC_SYSCON_2_CI (value) (((( 1 << 2) - 1) & (value)) << 26) -#define INCA_IP_IIC_IIC_SYSCON_2_STP (1 << 25) -#define INCA_IP_IIC_IIC_SYSCON_2_IGE (1 << 24) -#define INCA_IP_IIC_IIC_SYSCON_2_TRX (1 << 23) -#define INCA_IP_IIC_IIC_SYSCON_2_INT (1 << 22) -#define INCA_IP_IIC_IIC_SYSCON_2_ACKDIS (1 << 21) -#define INCA_IP_IIC_IIC_SYSCON_2_BUM (1 << 20) -#define INCA_IP_IIC_IIC_SYSCON_2_MOD (value) (((( 1 << 2) - 1) & (value)) << 18) -#define INCA_IP_IIC_IIC_SYSCON_2_RSC (1 << 17) -#define INCA_IP_IIC_IIC_SYSCON_2_M10 (1 << 16) -#define INCA_IP_IIC_IIC_SYSCON_2_WM (value) (((( 1 << 8) - 1) & (value)) << 8) -#define INCA_IP_IIC_IIC_SYSCON_2_IRQE (1 << 7) -#define INCA_IP_IIC_IIC_SYSCON_2_IRQP (1 << 6) -#define INCA_IP_IIC_IIC_SYSCON_2_IRQD (1 << 5) -#define INCA_IP_IIC_IIC_SYSCON_2_BB (1 << 4) -#define INCA_IP_IIC_IIC_SYSCON_2_LRB (1 << 3) -#define INCA_IP_IIC_IIC_SYSCON_2_SLA (1 << 2) -#define INCA_IP_IIC_IIC_SYSCON_2_AL (1 << 1) -#define INCA_IP_IIC_IIC_SYSCON_2_ADR (1 << 0) - -/***I²C Write Hardware Modified System Control Register -***/ -#define INCA_IP_IIC_IIC_WHBSYSCON ((volatile u32*)(INCA_IP_IIC+ 0x0020)) -#define INCA_IP_IIC_IIC_WHBSYSCON_CLRWMEN (1 << 31) -#define INCA_IP_IIC_IIC_WHBSYSCON_SETWMEN (1 << 30) -#define INCA_IP_IIC_IIC_WHBSYSCON_SETSTP (1 << 26) -#define INCA_IP_IIC_IIC_WHBSYSCON_CLRSTP (1 << 25) -#define INCA_IP_IIC_IIC_WHBSYSCON_SETTRX (1 << 24) -#define INCA_IP_IIC_IIC_WHBSYSCON_CLRTRX (1 << 23) -#define INCA_IP_IIC_IIC_WHBSYSCON_SETACKDIS (1 << 22) -#define INCA_IP_IIC_IIC_WHBSYSCON_CLRACKDIS (1 << 21) -#define INCA_IP_IIC_IIC_WHBSYSCON_SETBUM (1 << 20) -#define INCA_IP_IIC_IIC_WHBSYSCON_CLRBUM (1 << 19) -#define INCA_IP_IIC_IIC_WHBSYSCON_SETRSC (1 << 17) -#define INCA_IP_IIC_IIC_WHBSYSCON_CLRRSC (1 << 16) -#define INCA_IP_IIC_IIC_WHBSYSCON_SETRMEN (1 << 15) -#define INCA_IP_IIC_IIC_WHBSYSCON_CLRRMEN (1 << 14) -#define INCA_IP_IIC_IIC_WHBSYSCON_SETIRQE (1 << 10) -#define INCA_IP_IIC_IIC_WHBSYSCON_SETIRQP (1 << 9) -#define INCA_IP_IIC_IIC_WHBSYSCON_SETIRQD (1 << 8) -#define INCA_IP_IIC_IIC_WHBSYSCON_CLRIRQE (1 << 7) -#define INCA_IP_IIC_IIC_WHBSYSCON_CLRIRQP (1 << 6) -#define INCA_IP_IIC_IIC_WHBSYSCON_CLRIRQD (1 << 5) -#define INCA_IP_IIC_IIC_WHBSYSCON_SETAL (1 << 2) -#define INCA_IP_IIC_IIC_WHBSYSCON_CLRAL (1 << 1) - -/***I²C Bus Control Register***/ -#define INCA_IP_IIC_IIC_BUSCON_0 ((volatile u32*)(INCA_IP_IIC+ 0x0014)) -#define INCA_IP_IIC_IIC_BUSCON_0_BRPMOD (1 << 31) -#define INCA_IP_IIC_IIC_BUSCON_0_PREDIV (value) (((( 1 << 2) - 1) & (value)) << 29) -#define INCA_IP_IIC_IIC_BUSCON_0_ICA9_0 (value) (((( 1 << 10) - 1) & (value)) << 16) -#define INCA_IP_IIC_IIC_BUSCON_0_BRP (value) (((( 1 << 8) - 1) & (value)) << 8) -#define INCA_IP_IIC_IIC_BUSCON_0_SCLEN(value) (1 << value) - -#define INCA_IP_IIC_IIC_BUSCON_0_SDAEN(value) (1 << value) - - -/***I²C Bus Control Register***/ -#define INCA_IP_IIC_IIC_BUSCON_1 ((volatile u32*)(INCA_IP_IIC+ 0x0014)) -#define INCA_IP_IIC_IIC_BUSCON_1_BRPMOD (1 << 31) -#define INCA_IP_IIC_IIC_BUSCON_1_PREDIV (value) (((( 1 << 2) - 1) & (value)) << 29) -#define INCA_IP_IIC_IIC_BUSCON_1_ICA7_1 (value) (((( 1 << 7) - 1) & (value)) << 17) -#define INCA_IP_IIC_IIC_BUSCON_1_BRP (value) (((( 1 << 8) - 1) & (value)) << 8) -#define INCA_IP_IIC_IIC_BUSCON_1_SCLEN(value) (1 << value) - -#define INCA_IP_IIC_IIC_BUSCON_1_SDAEN(value) (1 << value) - - -/***I²C Receive Transmit Buffer***/ -#define INCA_IP_IIC_IIC_RTB ((volatile u32*)(INCA_IP_IIC+ 0x0018)) -#define INCA_IP_IIC_IIC_RTB_RTB(value) (1 << value) - - -/***********************************************************************/ -/* Module : FB register address and bits */ -/***********************************************************************/ - -#define INCA_IP_FB (0xBF880000) -/***********************************************************************/ - - -/***FB Access Error Cause Register***/ -#define INCA_IP_FB_FB_ERRCAUSE ((volatile u32*)(INCA_IP_FB+ 0x0100)) -#define INCA_IP_FB_FB_ERRCAUSE_ERR (1 << 31) -#define INCA_IP_FB_FB_ERRCAUSE_PORT (value) (((( 1 << 4) - 1) & (value)) << 16) -#define INCA_IP_FB_FB_ERRCAUSE_CAUSE (value) (((( 1 << 2) - 1) & (value)) << 0) - -/***FB Access Error Address Register***/ -#define INCA_IP_FB_FB_ERRADDR ((volatile u32*)(INCA_IP_FB+ 0x0108)) -#define INCA_IP_FB_FB_ERRADDR_ADDR - -/***FB Configuration Register***/ -#define INCA_IP_FB_FB_CFG ((volatile u32*)(INCA_IP_FB+ 0x0800)) -#define INCA_IP_FB_FB_CFG_SVM (1 << 0) - -/***********************************************************************/ -/* Module : SRAM register address and bits */ -/***********************************************************************/ - -#define INCA_IP_SRAM (0xBF980000) -/***********************************************************************/ - - -/***SRAM Size Register***/ -#define INCA_IP_SRAM_SRAM_SIZE ((volatile u32*)(INCA_IP_SRAM+ 0x0800)) -#define INCA_IP_SRAM_SRAM_SIZE_SIZE (value) (((( 1 << 23) - 1) & (value)) << 0) - -/***********************************************************************/ -/* Module : BIU register address and bits */ -/***********************************************************************/ - -#define INCA_IP_BIU (0xBFA80000) -/***********************************************************************/ - - -/***BIU Identification Register***/ -#define INCA_IP_BIU_BIU_ID ((volatile u32*)(INCA_IP_BIU+ 0x0000)) -#define INCA_IP_BIU_BIU_ID_ARCH (1 << 16) -#define INCA_IP_BIU_BIU_ID_ID (value) (((( 1 << 8) - 1) & (value)) << 8) -#define INCA_IP_BIU_BIU_ID_REV (value) (((( 1 << 8) - 1) & (value)) << 0) - -/***BIU Access Error Cause Register***/ -#define INCA_IP_BIU_BIU_ERRCAUSE ((volatile u32*)(INCA_IP_BIU+ 0x0100)) -#define INCA_IP_BIU_BIU_ERRCAUSE_ERR (1 << 31) -#define INCA_IP_BIU_BIU_ERRCAUSE_PORT (value) (((( 1 << 4) - 1) & (value)) << 16) -#define INCA_IP_BIU_BIU_ERRCAUSE_CAUSE (value) (((( 1 << 2) - 1) & (value)) << 0) - -/***BIU Access Error Address Register***/ -#define INCA_IP_BIU_BIU_ERRADDR ((volatile u32*)(INCA_IP_BIU+ 0x0108)) -#define INCA_IP_BIU_BIU_ERRADDR_ADDR - -/***********************************************************************/ -/* Module : ICU register address and bits */ -/***********************************************************************/ - -#define INCA_IP_ICU (0xBF101000) -/***********************************************************************/ - - -/***IM0 Interrupt Status Register***/ -#define INCA_IP_ICU_IM0_ISR ((volatile u32*)(INCA_IP_ICU+ 0x0000)) -#define INCA_IP_ICU_IM0_ISR_IR(value) (1 << value) - - -/***IM1 Interrupt Status Register***/ -#define INCA_IP_ICU_IM1_ISR ((volatile u32*)(INCA_IP_ICU+ 0x0200)) -#define INCA_IP_ICU_IM1_ISR_IR(value) (1 << value) - - -/***IM2 Interrupt Status Register***/ -#define INCA_IP_ICU_IM2_ISR ((volatile u32*)(INCA_IP_ICU+ 0x0400)) -#define INCA_IP_ICU_IM2_ISR_IR(value) (1 << value) - - -/***IM0 Interrupt Enable Register***/ -#define INCA_IP_ICU_IM0_IER ((volatile u32*)(INCA_IP_ICU+ 0x0008)) -#define INCA_IP_ICU_IM0_IER_IR(value) (1 << value) - - -/***IM1 Interrupt Enable Register***/ -#define INCA_IP_ICU_IM1_IER ((volatile u32*)(INCA_IP_ICU+ 0x0208)) -#define INCA_IP_ICU_IM1_IER_IR(value) (1 << value) - - -/***IM2 Interrupt Enable Register***/ -#define INCA_IP_ICU_IM2_IER ((volatile u32*)(INCA_IP_ICU+ 0x0408)) -#define INCA_IP_ICU_IM2_IER_IR(value) (1 << value) - - -/***IM0 Interrupt Output Status Register***/ -#define INCA_IP_ICU_IM0_IOSR ((volatile u32*)(INCA_IP_ICU+ 0x0010)) -#define INCA_IP_ICU_IM0_IOSR_IR(value) (1 << value) - - -/***IM1 Interrupt Output Status Register***/ -#define INCA_IP_ICU_IM1_IOSR ((volatile u32*)(INCA_IP_ICU+ 0x0210)) -#define INCA_IP_ICU_IM1_IOSR_IR(value) (1 << value) - - -/***IM2 Interrupt Output Status Register***/ -#define INCA_IP_ICU_IM2_IOSR ((volatile u32*)(INCA_IP_ICU+ 0x0410)) -#define INCA_IP_ICU_IM2_IOSR_IR(value) (1 << value) - - -/***IM0 Interrupt Request Set Register***/ -#define INCA_IP_ICU_IM0_IRSR ((volatile u32*)(INCA_IP_ICU+ 0x0018)) -#define INCA_IP_ICU_IM0_IRSR_IR(value) (1 << value) - - -/***IM1 Interrupt Request Set Register***/ -#define INCA_IP_ICU_IM1_IRSR ((volatile u32*)(INCA_IP_ICU+ 0x0218)) -#define INCA_IP_ICU_IM1_IRSR_IR(value) (1 << value) - - -/***IM2 Interrupt Request Set Register***/ -#define INCA_IP_ICU_IM2_IRSR ((volatile u32*)(INCA_IP_ICU+ 0x0418)) -#define INCA_IP_ICU_IM2_IRSR_IR(value) (1 << value) - - -/***External Interrupt Control Register***/ -#define INCA_IP_ICU_ICU_EICR ((volatile u32*)(INCA_IP_ICU+ 0x0B00)) -#define INCA_IP_ICU_ICU_EICR_EII5 (value) (((( 1 << 3) - 1) & (value)) << 20) -#define INCA_IP_ICU_ICU_EICR_EII4 (value) (((( 1 << 3) - 1) & (value)) << 16) -#define INCA_IP_ICU_ICU_EICR_EII3 (value) (((( 1 << 3) - 1) & (value)) << 12) -#define INCA_IP_ICU_ICU_EICR_EII2 (value) (((( 1 << 3) - 1) & (value)) << 8) -#define INCA_IP_ICU_ICU_EICR_EII1 (value) (((( 1 << 3) - 1) & (value)) << 4) -#define INCA_IP_ICU_ICU_EICR_EII0 (value) (((( 1 << 3) - 1) & (value)) << 0) diff --git a/arch/mips/include/asm/u-boot-mips.h b/arch/mips/include/asm/u-boot-mips.h index 9f3cce9a628..a5b2fc08f87 100644 --- a/arch/mips/include/asm/u-boot-mips.h +++ b/arch/mips/include/asm/u-boot-mips.h @@ -21,5 +21,3 @@ static inline unsigned long image_copy_end(void) extern char __image_copy_end[]; return (unsigned long) &__image_copy_end; } - -extern int incaip_set_cpuclk(void); diff --git a/arch/mips/lib/board.c b/arch/mips/lib/board.c index 317c8258de9..3200d87e30a 100644 --- a/arch/mips/lib/board.c +++ b/arch/mips/lib/board.c @@ -103,9 +103,6 @@ init_fnc_t *init_sequence[] = { board_early_init_f, timer_init, env_init, /* initialize environment */ -#ifdef CONFIG_INCA_IP - incaip_set_cpuclk, /* set cpu clock according to env. variable */ -#endif init_baudrate, /* initialize baudrate settings */ serial_init, /* serial communications setup */ console_init_f, diff --git a/board/incaip/Makefile b/board/incaip/Makefile deleted file mode 100644 index 602d30ecee6..00000000000 --- a/board/incaip/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -# -# (C) Copyright 2003-2006 -# Wolfgang Denk, DENX Software Engineering, wd@denx.de. -# -# SPDX-License-Identifier: GPL-2.0+ -# - -obj-y = incaip.o flash.o -obj-y += lowlevel_init.o diff --git a/board/incaip/README b/board/incaip/README deleted file mode 100644 index 132915292ea..00000000000 --- a/board/incaip/README +++ /dev/null @@ -1,57 +0,0 @@ - -Flash programming on the INCA-IP board is complicated because of the -EBU swapping unit. A BDI2000 can be used for flash programming only -if the EBU swapping unit is enabled; otherwise it will not detect the -flash memory. But the EBU swapping unit is disadbled after reset, so -if you program some code to flash with the swapping unit on, it will -not be runnable with the swapping unit off. - -The consequence is that you have to write a pre-swapped image to -flash using the BDI2000. A simple host-side tool "inca-swap-bytes" is -provided in the "tools/" directory. Use it as follows: - - bash$ ./inca-swap-bytes u-boot.bin.swp - -Note that the current BDI config file _disables_ the EBU swapping -unit for the flash bank 0. To enable it, (this is required for the -BDI flash commands to work) uncomment the following line in the -config file: - - ;WM32 0xb8000260 0x404161ff ; Swapping unit enabled - -and comment out - - WM32 0xb8000260 0x004161ff ; Swapping unit disabled - -Alternatively, you can use "mm 0xb8000260 " commands to -enable/disable the swapping unit manually. - -Just for reference, here is the complete sequence of actions we took -to install a U-Boot image into flash. - - 1. ./inca-swap-bytes u-boot.bin.swp - - 2. From BDI: - - mm 0xb8000260 0x404161ff - erase 0xb0000000 - erase 0xb0010000 - prog 0xb0000000 /tftpboot/INCA/u-boot.bin.swp bin - mm 0xb8000260 0x004161ff - go 0xb0000000 - - -Ethernet autonegotiation needs some time to complete. Instead of -delaying the boot process in all cases, we just start the -autonegotiation process when U-Boot comes up and that is all. Most -likely, it will complete by the time the network transfer is -attempted for the first time. In the worst case, if a transfer is -attempted before the autonegotiation is complete, just a single -packet would be lost resulting in a single timeout error, and then -the transfer would proceed normally. So the time that we would have -lost unconditionally waiting for the autonegotiation to complete, we -have to wait only if the file transfer is started immediately after -reset. We've verified that this works for all the clock -configurations. - -(C) 2003 Wolfgang Denk diff --git a/board/incaip/config.mk b/board/incaip/config.mk deleted file mode 100644 index e854f8e655b..00000000000 --- a/board/incaip/config.mk +++ /dev/null @@ -1,16 +0,0 @@ -# -# (C) Copyright 2003 -# Wolfgang Denk, DENX Software Engineering, wd@denx.de. -# -# SPDX-License-Identifier: GPL-2.0+ -# - -# -# INCA-IP board with MIPS 4Kc CPU core -# - -# ROM version -CONFIG_SYS_TEXT_BASE = 0xB0000000 - -# RAM version -#CONFIG_SYS_TEXT_BASE = 0x80100000 diff --git a/board/incaip/flash.c b/board/incaip/flash.c deleted file mode 100644 index a786ac9327d..00000000000 --- a/board/incaip/flash.c +++ /dev/null @@ -1,655 +0,0 @@ -/* - * (C) Copyright 2003 - * Wolfgang Denk, DENX Software Engineering, wd@denx.de. - * - * SPDX-License-Identifier: GPL-2.0+ - */ - -#include -#include - -flash_info_t flash_info[CONFIG_SYS_MAX_FLASH_BANKS]; /* info for FLASH chips */ - -/* NOTE - CONFIG_FLASH_16BIT means the CPU interface is 16-bit, it - * has nothing to do with the flash chip being 8-bit or 16-bit. - */ -#ifdef CONFIG_FLASH_16BIT -typedef unsigned short FLASH_PORT_WIDTH; -typedef volatile unsigned short FLASH_PORT_WIDTHV; -#define FLASH_ID_MASK 0xFFFF -#else -typedef unsigned long FLASH_PORT_WIDTH; -typedef volatile unsigned long FLASH_PORT_WIDTHV; -#define FLASH_ID_MASK 0xFFFFFFFF -#endif - -#define FPW FLASH_PORT_WIDTH -#define FPWV FLASH_PORT_WIDTHV - -#define ORMASK(size) ((-size) & OR_AM_MSK) - -#if 0 -#define FLASH_CYCLE1 0x0555 -#define FLASH_CYCLE2 0x02aa -#else -#define FLASH_CYCLE1 0x0554 -#define FLASH_CYCLE2 0x02ab -#endif - -/*----------------------------------------------------------------------- - * Functions - */ -static ulong flash_get_size(FPWV *addr, flash_info_t *info); -static void flash_reset(flash_info_t *info); -static int write_word_intel(flash_info_t *info, FPWV *dest, FPW data); -static int write_word_amd(flash_info_t *info, FPWV *dest, FPW data); -static void flash_get_offsets(ulong base, flash_info_t *info); -static flash_info_t *flash_get_info(ulong base); - -/*----------------------------------------------------------------------- - * flash_init() - * - * sets up flash_info and returns size of FLASH (bytes) - */ -unsigned long flash_init (void) -{ - unsigned long size = 0; - int i; - - /* Init: no FLASHes known */ - for (i=0; i < CONFIG_SYS_MAX_FLASH_BANKS; ++i) { - ulong flashbase = (i == 0) ? PHYS_FLASH_1 : PHYS_FLASH_2; - ulong * buscon = (ulong *) - ((i == 0) ? INCA_IP_EBU_EBU_BUSCON0 : INCA_IP_EBU_EBU_BUSCON2); - - /* Disable write protection */ - *buscon &= ~INCA_IP_EBU_EBU_BUSCON1_WRDIS; - -#if 1 - memset(&flash_info[i], 0, sizeof(flash_info_t)); -#endif - - flash_info[i].size = - flash_get_size((FPW *)flashbase, &flash_info[i]); - - if (flash_info[i].flash_id == FLASH_UNKNOWN) { - printf ("## Unknown FLASH on Bank %d - Size = 0x%08lx\n", - i, flash_info[i].size); - } - - size += flash_info[i].size; - } - -#if CONFIG_SYS_MONITOR_BASE >= CONFIG_SYS_FLASH_BASE - /* monitor protection ON by default */ - flash_protect(FLAG_PROTECT_SET, - CONFIG_SYS_MONITOR_BASE, - CONFIG_SYS_MONITOR_BASE+monitor_flash_len-1, - flash_get_info(CONFIG_SYS_MONITOR_BASE)); -#endif - -#ifdef CONFIG_ENV_IS_IN_FLASH - /* ENV protection ON by default */ - flash_protect(FLAG_PROTECT_SET, - CONFIG_ENV_ADDR, - CONFIG_ENV_ADDR+CONFIG_ENV_SIZE-1, - flash_get_info(CONFIG_ENV_ADDR)); -#endif - - - return size; -} - -/*----------------------------------------------------------------------- - */ -static void flash_reset(flash_info_t *info) -{ - FPWV *base = (FPWV *)(info->start[0]); - - /* Put FLASH back in read mode */ - if ((info->flash_id & FLASH_VENDMASK) == FLASH_MAN_INTEL) - *base = (FPW)0x00FF00FF; /* Intel Read Mode */ - else if ((info->flash_id & FLASH_VENDMASK) == FLASH_MAN_AMD) - *base = (FPW)0x00F000F0; /* AMD Read Mode */ -} - -/*----------------------------------------------------------------------- - */ -static void flash_get_offsets (ulong base, flash_info_t *info) -{ - int i; - - /* set up sector start address table */ - if ((info->flash_id & FLASH_VENDMASK) == FLASH_MAN_INTEL - && (info->flash_id & FLASH_BTYPE)) { - int bootsect_size; /* number of bytes/boot sector */ - int sect_size; /* number of bytes/regular sector */ - - bootsect_size = 0x00002000 * (sizeof(FPW)/2); - sect_size = 0x00010000 * (sizeof(FPW)/2); - - /* set sector offsets for bottom boot block type */ - for (i = 0; i < 8; ++i) { - info->start[i] = base + (i * bootsect_size); - } - for (i = 8; i < info->sector_count; i++) { - info->start[i] = base + ((i - 7) * sect_size); - } - } - else if ((info->flash_id & FLASH_VENDMASK) == FLASH_MAN_AMD - && (info->flash_id & FLASH_TYPEMASK) == FLASH_AM640U) { - - int sect_size; /* number of bytes/sector */ - - sect_size = 0x00010000 * (sizeof(FPW)/2); - - /* set up sector start address table (uniform sector type) */ - for( i = 0; i < info->sector_count; i++ ) - info->start[i] = base + (i * sect_size); - } -} - -/*----------------------------------------------------------------------- - */ - -static flash_info_t *flash_get_info(ulong base) -{ - int i; - flash_info_t * info; - - for (i = 0; i < CONFIG_SYS_MAX_FLASH_BANKS; i ++) { - info = & flash_info[i]; - if (info->start[0] <= base && base < info->start[0] + info->size) - break; - } - - return i == CONFIG_SYS_MAX_FLASH_BANKS ? 0 : info; -} - -/*----------------------------------------------------------------------- - */ - -void flash_print_info (flash_info_t *info) -{ - int i; - uchar *boottype; - uchar *bootletter; - char *fmt; - uchar botbootletter[] = "B"; - uchar topbootletter[] = "T"; - uchar botboottype[] = "bottom boot sector"; - uchar topboottype[] = "top boot sector"; - - if (info->flash_id == FLASH_UNKNOWN) { - printf ("missing or unknown FLASH type\n"); - return; - } - - switch (info->flash_id & FLASH_VENDMASK) { - case FLASH_MAN_AMD: printf ("AMD "); break; - case FLASH_MAN_BM: printf ("BRIGHT MICRO "); break; - case FLASH_MAN_FUJ: printf ("FUJITSU "); break; - case FLASH_MAN_SST: printf ("SST "); break; - case FLASH_MAN_STM: printf ("STM "); break; - case FLASH_MAN_INTEL: printf ("INTEL "); break; - default: printf ("Unknown Vendor "); break; - } - - /* check for top or bottom boot, if it applies */ - if (info->flash_id & FLASH_BTYPE) { - boottype = botboottype; - bootletter = botbootletter; - } - else { - boottype = topboottype; - bootletter = topbootletter; - } - - switch (info->flash_id & FLASH_TYPEMASK) { - case FLASH_AM640U: - fmt = "29LV641D (64 Mbit, uniform sectors)\n"; - break; - case FLASH_28F800C3B: - case FLASH_28F800C3T: - fmt = "28F800C3%s (8 Mbit, %s)\n"; - break; - case FLASH_INTEL800B: - case FLASH_INTEL800T: - fmt = "28F800B3%s (8 Mbit, %s)\n"; - break; - case FLASH_28F160C3B: - case FLASH_28F160C3T: - fmt = "28F160C3%s (16 Mbit, %s)\n"; - break; - case FLASH_INTEL160B: - case FLASH_INTEL160T: - fmt = "28F160B3%s (16 Mbit, %s)\n"; - break; - case FLASH_28F320C3B: - case FLASH_28F320C3T: - fmt = "28F320C3%s (32 Mbit, %s)\n"; - break; - case FLASH_INTEL320B: - case FLASH_INTEL320T: - fmt = "28F320B3%s (32 Mbit, %s)\n"; - break; - case FLASH_28F640C3B: - case FLASH_28F640C3T: - fmt = "28F640C3%s (64 Mbit, %s)\n"; - break; - case FLASH_INTEL640B: - case FLASH_INTEL640T: - fmt = "28F640B3%s (64 Mbit, %s)\n"; - break; - default: - fmt = "Unknown Chip Type\n"; - break; - } - - printf (fmt, bootletter, boottype); - - printf (" Size: %ld MB in %d Sectors\n", - info->size >> 20, - info->sector_count); - - printf (" Sector Start Addresses:"); - - for (i=0; isector_count; ++i) { - if ((i % 5) == 0) { - printf ("\n "); - } - - printf (" %08lX%s", info->start[i], - info->protect[i] ? " (RO)" : " "); - } - - printf ("\n"); -} - -/*----------------------------------------------------------------------- - */ - -/* - * The following code cannot be run from FLASH! - */ - -ulong flash_get_size (FPWV *addr, flash_info_t *info) -{ - /* Write auto select command: read Manufacturer ID */ - - /* Write auto select command sequence and test FLASH answer */ - addr[FLASH_CYCLE1] = (FPW)0x00AA00AA; /* for AMD, Intel ignores this */ - addr[FLASH_CYCLE2] = (FPW)0x00550055; /* for AMD, Intel ignores this */ - addr[FLASH_CYCLE1] = (FPW)0x00900090; /* selects Intel or AMD */ - - /* The manufacturer codes are only 1 byte, so just use 1 byte. - * This works for any bus width and any FLASH device width. - */ - switch (addr[1] & 0xff) { - - case (uchar)AMD_MANUFACT: - info->flash_id = FLASH_MAN_AMD; - break; - - case (uchar)INTEL_MANUFACT: - info->flash_id = FLASH_MAN_INTEL; - break; - - default: - info->flash_id = FLASH_UNKNOWN; - info->sector_count = 0; - info->size = 0; - break; - } - - /* Check 16 bits or 32 bits of ID so work on 32 or 16 bit bus. */ - if (info->flash_id != FLASH_UNKNOWN) switch (addr[0]) { - - case (FPW)AMD_ID_LV640U: /* 29LV640 and 29LV641 have same ID */ - info->flash_id += FLASH_AM640U; - info->sector_count = 128; - info->size = 0x00800000 * (sizeof(FPW)/2); - break; /* => 8 or 16 MB */ - - case (FPW)INTEL_ID_28F800C3B: - info->flash_id += FLASH_28F800C3B; - info->sector_count = 23; - info->size = 0x00100000 * (sizeof(FPW)/2); - break; /* => 1 or 2 MB */ - - case (FPW)INTEL_ID_28F800B3B: - info->flash_id += FLASH_INTEL800B; - info->sector_count = 23; - info->size = 0x00100000 * (sizeof(FPW)/2); - break; /* => 1 or 2 MB */ - - case (FPW)INTEL_ID_28F160C3B: - info->flash_id += FLASH_28F160C3B; - info->sector_count = 39; - info->size = 0x00200000 * (sizeof(FPW)/2); - break; /* => 2 or 4 MB */ - - case (FPW)INTEL_ID_28F160B3B: - info->flash_id += FLASH_INTEL160B; - info->sector_count = 39; - info->size = 0x00200000 * (sizeof(FPW)/2); - break; /* => 2 or 4 MB */ - - case (FPW)INTEL_ID_28F320C3B: - info->flash_id += FLASH_28F320C3B; - info->sector_count = 71; - info->size = 0x00400000 * (sizeof(FPW)/2); - break; /* => 4 or 8 MB */ - - case (FPW)INTEL_ID_28F320B3B: - info->flash_id += FLASH_INTEL320B; - info->sector_count = 71; - info->size = 0x00400000 * (sizeof(FPW)/2); - break; /* => 4 or 8 MB */ - - case (FPW)INTEL_ID_28F640C3B: - info->flash_id += FLASH_28F640C3B; - info->sector_count = 135; - info->size = 0x00800000 * (sizeof(FPW)/2); - break; /* => 8 or 16 MB */ - - case (FPW)INTEL_ID_28F640B3B: - info->flash_id += FLASH_INTEL640B; - info->sector_count = 135; - info->size = 0x00800000 * (sizeof(FPW)/2); - break; /* => 8 or 16 MB */ - - default: - info->flash_id = FLASH_UNKNOWN; - info->sector_count = 0; - info->size = 0; - return (0); /* => no or unknown flash */ - } - - flash_get_offsets((ulong)addr, info); - - /* Put FLASH back in read mode */ - flash_reset(info); - - return (info->size); -} - -/*----------------------------------------------------------------------- - */ - -int flash_erase (flash_info_t *info, int s_first, int s_last) -{ - FPWV *addr; - int flag, prot, sect; - int intel = (info->flash_id & FLASH_VENDMASK) == FLASH_MAN_INTEL; - ulong start, now, last; - int rcode = 0; - - if ((s_first < 0) || (s_first > s_last)) { - if (info->flash_id == FLASH_UNKNOWN) { - printf ("- missing\n"); - } else { - printf ("- no sectors to erase\n"); - } - return 1; - } - - switch (info->flash_id & FLASH_TYPEMASK) { - case FLASH_INTEL800B: - case FLASH_INTEL160B: - case FLASH_INTEL320B: - case FLASH_INTEL640B: - case FLASH_28F800C3B: - case FLASH_28F160C3B: - case FLASH_28F320C3B: - case FLASH_28F640C3B: - case FLASH_AM640U: - break; - case FLASH_UNKNOWN: - default: - printf ("Can't erase unknown flash type %08lx - aborted\n", - info->flash_id); - return 1; - } - - prot = 0; - for (sect=s_first; sect<=s_last; ++sect) { - if (info->protect[sect]) { - prot++; - } - } - - if (prot) { - printf ("- Warning: %d protected sectors will not be erased!\n", - prot); - } else { - printf ("\n"); - } - - last = get_timer(0); - - /* Start erase on unprotected sectors */ - for (sect = s_first; sect<=s_last && rcode == 0; sect++) { - - if (info->protect[sect] != 0) /* protected, skip it */ - continue; - - /* Disable interrupts which might cause a timeout here */ - flag = disable_interrupts(); - - addr = (FPWV *)(info->start[sect]); - if (intel) { - *addr = (FPW)0x00500050; /* clear status register */ - *addr = (FPW)0x00200020; /* erase setup */ - *addr = (FPW)0x00D000D0; /* erase confirm */ - } - else { - /* must be AMD style if not Intel */ - FPWV *base; /* first address in bank */ - - base = (FPWV *)(info->start[0]); - base[FLASH_CYCLE1] = (FPW)0x00AA00AA; /* unlock */ - base[FLASH_CYCLE2] = (FPW)0x00550055; /* unlock */ - base[FLASH_CYCLE1] = (FPW)0x00800080; /* erase mode */ - base[FLASH_CYCLE1] = (FPW)0x00AA00AA; /* unlock */ - base[FLASH_CYCLE2] = (FPW)0x00550055; /* unlock */ - *addr = (FPW)0x00300030; /* erase sector */ - } - - /* re-enable interrupts if necessary */ - if (flag) - enable_interrupts(); - - start = get_timer(0); - - /* wait at least 50us for AMD, 80us for Intel. - * Let's wait 1 ms. - */ - udelay (1000); - - while ((*addr & (FPW)0x00800080) != (FPW)0x00800080) { - if ((now = get_timer(start)) > CONFIG_SYS_FLASH_ERASE_TOUT) { - printf ("Timeout\n"); - - if (intel) { - /* suspend erase */ - *addr = (FPW)0x00B000B0; - } - - flash_reset(info); /* reset to read mode */ - rcode = 1; /* failed */ - break; - } - - /* show that we're waiting */ - if ((get_timer(last)) > CONFIG_SYS_HZ) {/* every second */ - putc ('.'); - last = get_timer(0); - } - } - - /* show that we're waiting */ - if ((get_timer(last)) > CONFIG_SYS_HZ) { /* every second */ - putc ('.'); - last = get_timer(0); - } - - flash_reset(info); /* reset to read mode */ - } - - printf (" done\n"); - return rcode; -} - -/*----------------------------------------------------------------------- - * Copy memory to flash, returns: - * 0 - OK - * 1 - write timeout - * 2 - Flash not erased - */ -int write_buff (flash_info_t *info, uchar *src, ulong addr, ulong cnt) -{ - FPW data = 0; /* 16 or 32 bit word, matches flash bus width on MPC8XX */ - int bytes; /* number of bytes to program in current word */ - int left; /* number of bytes left to program */ - int i, res; - - for (left = cnt, res = 0; - left > 0 && res == 0; - addr += sizeof(data), left -= sizeof(data) - bytes) { - - bytes = addr & (sizeof(data) - 1); - addr &= ~(sizeof(data) - 1); - - /* combine source and destination data so can program - * an entire word of 16 or 32 bits - */ - for (i = 0; i < sizeof(data); i++) { - data <<= 8; - if (i < bytes || i - bytes >= left ) - data += *((uchar *)addr + i); - else - data += *src++; - } - - /* write one word to the flash */ - switch (info->flash_id & FLASH_VENDMASK) { - case FLASH_MAN_AMD: - res = write_word_amd(info, (FPWV *)addr, data); - break; - case FLASH_MAN_INTEL: - res = write_word_intel(info, (FPWV *)addr, data); - break; - default: - /* unknown flash type, error! */ - printf ("missing or unknown FLASH type\n"); - res = 1; /* not really a timeout, but gives error */ - break; - } - } - - return (res); -} - -/*----------------------------------------------------------------------- - * Write a word to Flash for AMD FLASH - * A word is 16 or 32 bits, whichever the bus width of the flash bank - * (not an individual chip) is. - * - * returns: - * 0 - OK - * 1 - write timeout - * 2 - Flash not erased - */ -static int write_word_amd (flash_info_t *info, FPWV *dest, FPW data) -{ - ulong start; - int flag; - int res = 0; /* result, assume success */ - FPWV *base; /* first address in flash bank */ - - /* Check if Flash is (sufficiently) erased */ - if ((*dest & data) != data) { - return (2); - } - - - base = (FPWV *)(info->start[0]); - - /* Disable interrupts which might cause a timeout here */ - flag = disable_interrupts(); - - base[FLASH_CYCLE1] = (FPW)0x00AA00AA; /* unlock */ - base[FLASH_CYCLE2] = (FPW)0x00550055; /* unlock */ - base[FLASH_CYCLE1] = (FPW)0x00A000A0; /* selects program mode */ - - *dest = data; /* start programming the data */ - - /* re-enable interrupts if necessary */ - if (flag) - enable_interrupts(); - - start = get_timer (0); - - /* data polling for D7 */ - while (res == 0 && (*dest & (FPW)0x00800080) != (data & (FPW)0x00800080)) { - if (get_timer(start) > CONFIG_SYS_FLASH_WRITE_TOUT) { - *dest = (FPW)0x00F000F0; /* reset bank */ - res = 1; - } - } - - return (res); -} - -/*----------------------------------------------------------------------- - * Write a word to Flash for Intel FLASH - * A word is 16 or 32 bits, whichever the bus width of the flash bank - * (not an individual chip) is. - * - * returns: - * 0 - OK - * 1 - write timeout - * 2 - Flash not erased - */ -static int write_word_intel (flash_info_t *info, FPWV *dest, FPW data) -{ - ulong start; - int flag; - int res = 0; /* result, assume success */ - - /* Check if Flash is (sufficiently) erased */ - if ((*dest & data) != data) { - return (2); - } - - /* Disable interrupts which might cause a timeout here */ - flag = disable_interrupts(); - - *dest = (FPW)0x00500050; /* clear status register */ - *dest = (FPW)0x00FF00FF; /* make sure in read mode */ - *dest = (FPW)0x00400040; /* program setup */ - - *dest = data; /* start programming the data */ - - /* re-enable interrupts if necessary */ - if (flag) - enable_interrupts(); - - start = get_timer (0); - - while (res == 0 && (*dest & (FPW)0x00800080) != (FPW)0x00800080) { - if (get_timer(start) > CONFIG_SYS_FLASH_WRITE_TOUT) { - *dest = (FPW)0x00B000B0; /* Suspend program */ - res = 1; - } - } - - if (res == 0 && (*dest & (FPW)0x00100010)) - res = 1; /* write failed, time out error is close enough */ - - *dest = (FPW)0x00500050; /* clear status register */ - *dest = (FPW)0x00FF00FF; /* make sure in read mode */ - - return (res); -} diff --git a/board/incaip/incaip.c b/board/incaip/incaip.c deleted file mode 100644 index 217b8afa347..00000000000 --- a/board/incaip/incaip.c +++ /dev/null @@ -1,110 +0,0 @@ -/* - * (C) Copyright 2003 - * Wolfgang Denk, DENX Software Engineering, wd@denx.de. - * - * SPDX-License-Identifier: GPL-2.0+ - */ - -#include -#include -#include -#include -#include -#include -#include - -extern uint incaip_get_cpuclk(void); - -void _machine_restart(void) -{ - *INCA_IP_WDT_RST_REQ = 0x3f; -} - -static ulong max_sdram_size(void) -{ - /* The only supported SDRAM data width is 16bit. - */ -#define CONFIG_SYS_DW 2 - - /* The only supported number of SDRAM banks is 4. - */ -#define CONFIG_SYS_NB 4 - - ulong cfgpb0 = *INCA_IP_SDRAM_MC_CFGPB0; - int cols = cfgpb0 & 0xF; - int rows = (cfgpb0 & 0xF0) >> 4; - ulong size = (1 << (rows + cols)) * CONFIG_SYS_DW * CONFIG_SYS_NB; - - return size; -} - -phys_size_t initdram(int board_type) -{ - int rows, cols, best_val = *INCA_IP_SDRAM_MC_CFGPB0; - ulong size, max_size = 0; - ulong our_address; - - asm volatile ("move %0, $25" : "=r" (our_address) :); - - /* Can't probe for RAM size unless we are running from Flash. - */ - if (CPHYSADDR(our_address) < CPHYSADDR(PHYS_FLASH_1)) - { - return max_sdram_size(); - } - - for (cols = 0x8; cols <= 0xC; cols++) - { - for (rows = 0xB; rows <= 0xD; rows++) - { - *INCA_IP_SDRAM_MC_CFGPB0 = (0x14 << 8) | - (rows << 4) | cols; - size = get_ram_size((long *)CONFIG_SYS_SDRAM_BASE, - max_sdram_size()); - - if (size > max_size) - { - best_val = *INCA_IP_SDRAM_MC_CFGPB0; - max_size = size; - } - } - } - - *INCA_IP_SDRAM_MC_CFGPB0 = best_val; - return max_size; -} - -int checkboard (void) -{ - unsigned long chipid = *INCA_IP_WDT_CHIPID; - int part_num; - - puts ("Board: INCA-IP "); - part_num = (chipid >> 12) & 0xffff; - switch (part_num) { - case 0xc0: - printf ("Standard Version, "); - break; - case 0xc1: - printf ("Basic Version, "); - break; - default: - printf ("Unknown Part Number 0x%x ", part_num); - break; - } - - printf ("Chip V1.%ld, ", (chipid >> 28)); - - printf("CPU Speed %d MHz\n", incaip_get_cpuclk()/1000000); - - set_io_port_base(0); - - return 0; -} - -#if defined(CONFIG_INCA_IP_SWITCH) -int board_eth_init(bd_t *bis) -{ - return inca_switch_initialize(bis); -} -#endif diff --git a/board/incaip/lowlevel_init.S b/board/incaip/lowlevel_init.S deleted file mode 100644 index b6cf6a99600..00000000000 --- a/board/incaip/lowlevel_init.S +++ /dev/null @@ -1,287 +0,0 @@ -/* - * Memory sub-system initialization code for INCA-IP development board. - * - * Copyright (c) 2003 Wolfgang Denk - * - * SPDX-License-Identifier: GPL-2.0+ - */ - -#include -#include - - -#define EBU_MODUL_BASE 0xB8000200 -#define EBU_CLC(value) 0x0000(value) -#define EBU_CON(value) 0x0010(value) -#define EBU_ADDSEL0(value) 0x0020(value) -#define EBU_ADDSEL1(value) 0x0024(value) -#define EBU_ADDSEL2(value) 0x0028(value) -#define EBU_BUSCON0(value) 0x0060(value) -#define EBU_BUSCON1(value) 0x0064(value) -#define EBU_BUSCON2(value) 0x0068(value) - -#define MC_MODUL_BASE 0xBF800000 -#define MC_ERRCAUSE(value) 0x0100(value) -#define MC_ERRADDR(value) 0x0108(value) -#define MC_IOGP(value) 0x0800(value) -#define MC_SELFRFSH(value) 0x0A00(value) -#define MC_CTRLENA(value) 0x1000(value) -#define MC_MRSCODE(value) 0x1008(value) -#define MC_CFGDW(value) 0x1010(value) -#define MC_CFGPB0(value) 0x1018(value) -#define MC_LATENCY(value) 0x1038(value) -#define MC_TREFRESH(value) 0x1040(value) - -#define CGU_MODUL_BASE 0xBF107000 -#define CGU_PLL1CR(value) 0x0008(value) -#define CGU_DIVCR(value) 0x0010(value) -#define CGU_MUXCR(value) 0x0014(value) -#define CGU_PLL1SR(value) 0x000C(value) - - .set noreorder - - -/* - * void ebu_init(long) - * - * a0 has the clock value we are going to run at - */ - .globl ebu_init - .ent ebu_init -ebu_init: -__ebu_init: - - li t1, EBU_MODUL_BASE - li t2, 0xA0000041 - sw t2, EBU_ADDSEL0(t1) - li t2, 0xA0800041 - sw t2, EBU_ADDSEL2(t1) - li t2, 0xBE0000F1 - sw t2, EBU_ADDSEL1(t1) - - li t3, 100000000 - beq a0, t3, 1f - nop - li t3, 133000000 - beq a0, t3, 2f - nop - li t3, 150000000 - beq a0, t3, 2f - nop - b 3f - nop - - /* 100 MHz */ -1: - li t2, 0x8841417D - sw t2, EBU_BUSCON0(t1) - sw t2, EBU_BUSCON2(t1) - li t2, 0x684142BD - b 3f - sw t2, EBU_BUSCON1(t1) /* delay slot */ - - /* 133 or 150 MHz */ -2: - li t2, 0x8841417E - sw t2, EBU_BUSCON0(t1) - sw t2, EBU_BUSCON2(t1) - li t2, 0x684143FD - sw t2, EBU_BUSCON1(t1) -3: - jr ra - nop - - .end ebu_init - - -/* - * void cgu_init(long) - * - * a0 has the clock value - */ - .globl cgu_init - .ent cgu_init -cgu_init: -__cgu_init: - - li t1, CGU_MODUL_BASE - - li t3, 100000000 - beq a0, t3, 1f - nop - li t3, 133000000 - beq a0, t3, 2f - nop - li t3, 150000000 - beq a0, t3, 3f - nop - b 5f - nop - - /* 100 MHz clock */ -1: - li t2, 0x80000014 - sw t2, CGU_DIVCR(t1) - li t2, 0x80000000 - sw t2, CGU_MUXCR(t1) - li t2, 0x800B0001 - b 5f - sw t2, CGU_PLL1CR(t1) /* delay slot */ - - /* 133 MHz clock */ -2: - li t2, 0x80000054 - sw t2, CGU_DIVCR(t1) - li t2, 0x80000000 - sw t2, CGU_MUXCR(t1) - li t2, 0x800B0001 - b 5f - sw t2, CGU_PLL1CR(t1) /* delay slot */ - - /* 150 MHz clock */ -3: - li t2, 0x80000017 - sw t2, CGU_DIVCR(t1) - li t2, 0xC00B0001 - sw t2, CGU_PLL1CR(t1) - li t3, 0x80000000 -4: - lw t2, CGU_PLL1SR(t1) - and t2, t2, t3 - beq t2, zero, 4b - nop - li t2, 0x80000001 - sw t2, CGU_MUXCR(t1) -5: - jr ra - nop - - .end cgu_init - - -/* - * void sdram_init(long) - * - * a0 has the clock value - */ - .globl sdram_init - .ent sdram_init -sdram_init: -__sdram_init: - - li t1, MC_MODUL_BASE - -#if 0 - /* Disable memory controller before changing any of its registers */ - sw zero, MC_CTRLENA(t1) -#endif - - li t2, 100000000 - beq a0, t2, 1f - nop - li t2, 133000000 - beq a0, t2, 2f - nop - li t2, 150000000 - beq a0, t2, 3f - nop - b 5f - nop - - /* 100 MHz clock */ -1: - /* Set clock ratio (clkrat=1:1, rddel=3) */ - li t2, 0x00000003 - sw t2, MC_IOGP(t1) - - /* Set sdram refresh rate (4K/64ms @ 100MHz) */ - li t2, 0x0000061A - b 4f - sw t2, MC_TREFRESH(t1) - - /* 133 MHz clock */ -2: - /* Set clock ratio (clkrat=1:1, rddel=3) */ - li t2, 0x00000003 - sw t2, MC_IOGP(t1) - - /* Set sdram refresh rate (4K/64ms @ 133MHz) */ - li t2, 0x00000822 - b 4f - sw t2, MC_TREFRESH(t1) - - /* 150 MHz clock */ -3: - /* Set clock ratio (clkrat=3:2, rddel=4) */ - li t2, 0x00000014 - sw t2, MC_IOGP(t1) - - /* Set sdram refresh rate (4K/64ms @ 150MHz) */ - li t2, 0x00000927 - sw t2, MC_TREFRESH(t1) - -4: - /* Clear Error log registers */ - sw zero, MC_ERRCAUSE(t1) - sw zero, MC_ERRADDR(t1) - - /* Clear Power-down registers */ - sw zero, MC_SELFRFSH(t1) - - /* Set CAS Latency */ - li t2, 0x00000020 /* CL = 2 */ - sw t2, MC_MRSCODE(t1) - - /* Set word width to 16 bit */ - li t2, 0x2 - sw t2, MC_CFGDW(t1) - - /* Set CS0 to SDRAM parameters */ - li t2, 0x000014C9 - sw t2, MC_CFGPB0(t1) - - /* Set SDRAM latency parameters */ - li t2, 0x00026325 /* BC PC100 */ - sw t2, MC_LATENCY(t1) - -5: - /* Finally enable the controller */ - li t2, 0x00000001 - sw t2, MC_CTRLENA(t1) - - jr ra - nop - - .end sdram_init - - - .globl lowlevel_init - .ent lowlevel_init -lowlevel_init: - - /* Disable Watchdog. - */ - la t9, disable_incaip_wdt - jalr t9 - nop - - /* EBU, CGU and SDRAM Initialization. - */ - li a0, CONFIG_CPU_CLOCK_RATE - move t0, ra - - /* We rely on the fact that neither ebu_init() nor cgu_init() nor sdram_init() - * modify t0 and a0. - */ - bal __cgu_init - nop - bal __ebu_init - nop - bal __sdram_init - nop - move ra, t0 - - jr ra - nop - - .end lowlevel_init diff --git a/boards.cfg b/boards.cfg index c83aff3b141..f1f699458b7 100644 --- a/boards.cfg +++ b/boards.cfg @@ -519,10 +519,6 @@ Active mips mips32 au1x00 - dbau1x00 Active mips mips32 au1x00 - dbau1x00 dbau1550 dbau1x00:DBAU1550 Thomas Lange Active mips mips32 au1x00 - dbau1x00 dbau1550_el dbau1x00:DBAU1550,SYS_LITTLE_ENDIAN Thomas Lange Active mips mips32 au1x00 - pb1x00 pb1000 pb1x00:PB1000 - -Active mips mips32 incaip - incaip incaip - Wolfgang Denk -Active mips mips32 incaip - incaip incaip_100MHz incaip:CPU_CLOCK_RATE=100000000 Wolfgang Denk -Active mips mips32 incaip - incaip incaip_133MHz incaip:CPU_CLOCK_RATE=133000000 Wolfgang Denk -Active mips mips32 incaip - incaip incaip_150MHz incaip:CPU_CLOCK_RATE=150000000 Wolfgang Denk Active mips mips64 - - qemu-mips qemu_mips64 qemu-mips64:SYS_BIG_ENDIAN - Active mips mips64 - - qemu-mips qemu_mips64el qemu-mips64:SYS_LITTLE_ENDIAN - Active nds32 n1213 ag101 AndesTech adp-ag101 adp-ag101 - Andes diff --git a/doc/README.scrapyard b/doc/README.scrapyard index 15c39e76758..f9742e7d494 100644 --- a/doc/README.scrapyard +++ b/doc/README.scrapyard @@ -125,3 +125,4 @@ MVS1 powerpc MPC823 306620b 2008-08-26 Andre Schwar adsvix ARM PXA27x 7610db1 2008-07-30 Adrian Filipi R5200 ColdFire - 48ead7a 2008-03-31 Zachary P. Landau CPCI440 powerpc 440GP b568fd2 2007-12-27 Matthias Fuchs +incaip mips mips32 - 2014-04-17 Wolfgang Denk diff --git a/drivers/net/Makefile b/drivers/net/Makefile index 7f9ce90a6d5..c25b3c93ce5 100644 --- a/drivers/net/Makefile +++ b/drivers/net/Makefile @@ -29,7 +29,6 @@ obj-$(CONFIG_FTGMAC100) += ftgmac100.o obj-$(CONFIG_FTMAC110) += ftmac110.o obj-$(CONFIG_FTMAC100) += ftmac100.o obj-$(CONFIG_GRETH) += greth.o -obj-$(CONFIG_INCA_IP_SWITCH) += inca-ip_sw.o obj-$(CONFIG_DRIVER_KS8695ETH) += ks8695eth.o obj-$(CONFIG_KS8851_MLL) += ks8851_mll.o obj-$(CONFIG_LAN91C96) += lan91c96.o diff --git a/drivers/net/inca-ip_sw.c b/drivers/net/inca-ip_sw.c deleted file mode 100644 index cdfbfa67d89..00000000000 --- a/drivers/net/inca-ip_sw.c +++ /dev/null @@ -1,793 +0,0 @@ -/* - * INCA-IP internal switch ethernet driver. - * - * (C) Copyright 2003-2004 - * Wolfgang Denk, DENX Software Engineering, wd@denx.de. - * - * SPDX-License-Identifier: GPL-2.0+ - */ - - -#include - -#include -#include -#include -#include -#include - - -#define NUM_RX_DESC PKTBUFSRX -#define NUM_TX_DESC 3 -#define TOUT_LOOP 1000000 - - -#define DELAY udelay(10000) - /* Sometimes the store word instruction hangs while writing to one - * of the Switch registers. Moving the instruction into a separate - * function somehow makes the problem go away. - */ -static void SWORD(volatile u32 * reg, u32 value) -{ - *reg = value; -} - -#define DMA_WRITE_REG(reg, value) *((volatile u32 *)reg) = (u32)value; -#define DMA_READ_REG(reg, value) value = (u32)*((volatile u32*)reg) -#define SW_WRITE_REG(reg, value) \ - SWORD(reg, value);\ - DELAY;\ - SWORD(reg, value); - -#define SW_READ_REG(reg, value) \ - value = (u32)*((volatile u32*)reg);\ - DELAY;\ - value = (u32)*((volatile u32*)reg); - -#define INCA_DMA_TX_POLLING_TIME 0x07 -#define INCA_DMA_RX_POLLING_TIME 0x07 - -#define INCA_DMA_TX_HOLD 0x80000000 -#define INCA_DMA_TX_EOP 0x40000000 -#define INCA_DMA_TX_SOP 0x20000000 -#define INCA_DMA_TX_ICPT 0x10000000 -#define INCA_DMA_TX_IEOP 0x08000000 - -#define INCA_DMA_RX_C 0x80000000 -#define INCA_DMA_RX_SOP 0x40000000 -#define INCA_DMA_RX_EOP 0x20000000 - -#define INCA_SWITCH_PHY_SPEED_10H 0x1 -#define INCA_SWITCH_PHY_SPEED_10F 0x5 -#define INCA_SWITCH_PHY_SPEED_100H 0x2 -#define INCA_SWITCH_PHY_SPEED_100F 0x6 - -/************************ Auto MDIX settings ************************/ -#define INCA_IP_AUTO_MDIX_LAN_PORTS_DIR INCA_IP_Ports_P1_DIR -#define INCA_IP_AUTO_MDIX_LAN_PORTS_ALTSEL INCA_IP_Ports_P1_ALTSEL -#define INCA_IP_AUTO_MDIX_LAN_PORTS_OUT INCA_IP_Ports_P1_OUT -#define INCA_IP_AUTO_MDIX_LAN_GPIO_PIN_RXTX 16 - -#define WAIT_SIGNAL_RETRIES 100 -#define WAIT_LINK_RETRIES 100 -#define LINK_RETRY_DELAY 2000 /* ms */ -/********************************************************************/ - -typedef struct -{ - union { - struct { - volatile u32 HOLD :1; - volatile u32 ICpt :1; - volatile u32 IEop :1; - volatile u32 offset :3; - volatile u32 reserved0 :4; - volatile u32 NFB :22; - }field; - - volatile u32 word; - }params; - - volatile u32 nextRxDescPtr; - - volatile u32 RxDataPtr; - - union { - struct { - volatile u32 C :1; - volatile u32 Sop :1; - volatile u32 Eop :1; - volatile u32 reserved3 :12; - volatile u32 NBT :17; - }field; - - volatile u32 word; - }status; - -} inca_rx_descriptor_t; - - -typedef struct -{ - union { - struct { - volatile u32 HOLD :1; - volatile u32 Eop :1; - volatile u32 Sop :1; - volatile u32 ICpt :1; - volatile u32 IEop :1; - volatile u32 reserved0 :5; - volatile u32 NBA :22; - }field; - - volatile u32 word; - }params; - - volatile u32 nextTxDescPtr; - - volatile u32 TxDataPtr; - - volatile u32 C :1; - volatile u32 reserved3 :31; - -} inca_tx_descriptor_t; - - -static inca_rx_descriptor_t rx_ring[NUM_RX_DESC] __attribute__ ((aligned(16))); -static inca_tx_descriptor_t tx_ring[NUM_TX_DESC] __attribute__ ((aligned(16))); - -static int tx_new, rx_new, tx_hold, rx_hold; -static int tx_old_hold = -1; -static int initialized = 0; - - -static int inca_switch_init(struct eth_device *dev, bd_t * bis); -static int inca_switch_send(struct eth_device *dev, void *packet, int length); -static int inca_switch_recv(struct eth_device *dev); -static void inca_switch_halt(struct eth_device *dev); -static void inca_init_switch_chip(void); -static void inca_dma_init(void); -static int inca_amdix(void); - - -int inca_switch_initialize(bd_t * bis) -{ - struct eth_device *dev; - -#if 0 - printf("Entered inca_switch_initialize()\n"); -#endif - - if (!(dev = (struct eth_device *) malloc (sizeof *dev))) { - printf("Failed to allocate memory\n"); - return 0; - } - memset(dev, 0, sizeof(*dev)); - - inca_dma_init(); - - inca_init_switch_chip(); - -#if defined(CONFIG_INCA_IP_SWITCH_AMDIX) - inca_amdix(); -#endif - - sprintf(dev->name, "INCA-IP Switch"); - dev->init = inca_switch_init; - dev->halt = inca_switch_halt; - dev->send = inca_switch_send; - dev->recv = inca_switch_recv; - - eth_register(dev); - -#if 0 - printf("Leaving inca_switch_initialize()\n"); -#endif - - return 0; -} - - -static int inca_switch_init(struct eth_device *dev, bd_t * bis) -{ - int i; - u32 v, regValue; - u16 wTmp; - -#if 0 - printf("Entering inca_switch_init()\n"); -#endif - - /* Set MAC address. - */ - wTmp = (u16)dev->enetaddr[0]; - regValue = (wTmp << 8) | dev->enetaddr[1]; - - SW_WRITE_REG(INCA_IP_Switch_PMAC_SA1, regValue); - - wTmp = (u16)dev->enetaddr[2]; - regValue = (wTmp << 8) | dev->enetaddr[3]; - regValue = regValue << 16; - wTmp = (u16)dev->enetaddr[4]; - regValue |= (wTmp<<8) | dev->enetaddr[5]; - - SW_WRITE_REG(INCA_IP_Switch_PMAC_SA2, regValue); - - /* Initialize the descriptor rings. - */ - for (i = 0; i < NUM_RX_DESC; i++) { - inca_rx_descriptor_t * rx_desc = (inca_rx_descriptor_t *)CKSEG1ADDR(&rx_ring[i]); - memset(rx_desc, 0, sizeof(rx_ring[i])); - - /* Set maximum size of receive buffer. - */ - rx_desc->params.field.NFB = PKTSIZE_ALIGN; - - /* Set the offset of the receive buffer. Zero means - * that the offset mechanism is not used. - */ - rx_desc->params.field.offset = 0; - - /* Check if it is the last descriptor. - */ - if (i == (NUM_RX_DESC - 1)) { - /* Let the last descriptor point to the first - * one. - */ - rx_desc->nextRxDescPtr = (u32)CKSEG1ADDR(rx_ring); - } else { - /* Set the address of the next descriptor. - */ - rx_desc->nextRxDescPtr = (u32)CKSEG1ADDR(&rx_ring[i+1]); - } - - rx_desc->RxDataPtr = (u32)CKSEG1ADDR(NetRxPackets[i]); - } - -#if 0 - printf("rx_ring = 0x%08X 0x%08X\n", (u32)rx_ring, (u32)&rx_ring[0]); - printf("tx_ring = 0x%08X 0x%08X\n", (u32)tx_ring, (u32)&tx_ring[0]); -#endif - - for (i = 0; i < NUM_TX_DESC; i++) { - inca_tx_descriptor_t * tx_desc = (inca_tx_descriptor_t *)CKSEG1ADDR(&tx_ring[i]); - - memset(tx_desc, 0, sizeof(tx_ring[i])); - - tx_desc->params.word = 0; - tx_desc->params.field.HOLD = 1; - tx_desc->C = 1; - - /* Check if it is the last descriptor. - */ - if (i == (NUM_TX_DESC - 1)) { - /* Let the last descriptor point to the - * first one. - */ - tx_desc->nextTxDescPtr = (u32)CKSEG1ADDR(tx_ring); - } else { - /* Set the address of the next descriptor. - */ - tx_desc->nextTxDescPtr = (u32)CKSEG1ADDR(&tx_ring[i+1]); - } - } - - /* Initialize RxDMA. - */ - DMA_READ_REG(INCA_IP_DMA_DMA_RXISR, v); - debug("RX status = 0x%08X\n", v); - - /* Writing to the FRDA of CHANNEL. - */ - DMA_WRITE_REG(INCA_IP_DMA_DMA_RXFRDA0, (u32)rx_ring); - - /* Writing to the COMMAND REG. - */ - DMA_WRITE_REG(INCA_IP_DMA_DMA_RXCCR0, INCA_IP_DMA_DMA_RXCCR0_INIT); - - /* Initialize TxDMA. - */ - DMA_READ_REG(INCA_IP_DMA_DMA_TXISR, v); - debug("TX status = 0x%08X\n", v); - - /* Writing to the FRDA of CHANNEL. - */ - DMA_WRITE_REG(INCA_IP_DMA_DMA_TXFRDA0, (u32)tx_ring); - - tx_new = rx_new = 0; - - tx_hold = NUM_TX_DESC - 1; - rx_hold = NUM_RX_DESC - 1; - -#if 0 - rx_ring[rx_hold].params.field.HOLD = 1; -#endif - /* enable spanning tree forwarding, enable the CPU port */ - /* ST_PT: - * CPS (CPU port status) 0x3 (forwarding) - * LPS (LAN port status) 0x3 (forwarding) - * PPS (PC port status) 0x3 (forwarding) - */ - SW_WRITE_REG(INCA_IP_Switch_ST_PT,0x3f); - -#if 0 - printf("Leaving inca_switch_init()\n"); -#endif - - return 0; -} - - -static int inca_switch_send(struct eth_device *dev, void *packet, int length) -{ - int i; - int res = -1; - u32 command; - u32 regValue; - inca_tx_descriptor_t * tx_desc = (inca_tx_descriptor_t *)CKSEG1ADDR(&tx_ring[tx_new]); - -#if 0 - printf("Entered inca_switch_send()\n"); -#endif - - if (length <= 0) { - printf ("%s: bad packet size: %d\n", dev->name, length); - goto Done; - } - - for(i = 0; tx_desc->C == 0; i++) { - if (i >= TOUT_LOOP) { - printf("%s: tx error buffer not ready\n", dev->name); - goto Done; - } - } - - if (tx_old_hold >= 0) { - ((inca_tx_descriptor_t *)CKSEG1ADDR(&tx_ring[tx_old_hold]))->params.field.HOLD = 1; - } - tx_old_hold = tx_hold; - - tx_desc->params.word = - (INCA_DMA_TX_SOP | INCA_DMA_TX_EOP | INCA_DMA_TX_HOLD); - - tx_desc->C = 0; - tx_desc->TxDataPtr = (u32)packet; - tx_desc->params.field.NBA = length; - - ((inca_tx_descriptor_t *)CKSEG1ADDR(&tx_ring[tx_hold]))->params.field.HOLD = 0; - - tx_hold = tx_new; - tx_new = (tx_new + 1) % NUM_TX_DESC; - - - if (! initialized) { - command = INCA_IP_DMA_DMA_TXCCR0_INIT; - initialized = 1; - } else { - command = INCA_IP_DMA_DMA_TXCCR0_HR; - } - - DMA_READ_REG(INCA_IP_DMA_DMA_TXCCR0, regValue); - regValue |= command; -#if 0 - printf("regValue = 0x%x\n", regValue); -#endif - DMA_WRITE_REG(INCA_IP_DMA_DMA_TXCCR0, regValue); - -#if 1 - for(i = 0; ((inca_tx_descriptor_t *)CKSEG1ADDR(&tx_ring[tx_hold]))->C == 0; i++) { - if (i >= TOUT_LOOP) { - printf("%s: tx buffer not ready\n", dev->name); - goto Done; - } - } -#endif - res = length; -Done: -#if 0 - printf("Leaving inca_switch_send()\n"); -#endif - return res; -} - - -static int inca_switch_recv(struct eth_device *dev) -{ - int length = 0; - inca_rx_descriptor_t * rx_desc; - -#if 0 - printf("Entered inca_switch_recv()\n"); -#endif - - for (;;) { - rx_desc = (inca_rx_descriptor_t *)CKSEG1ADDR(&rx_ring[rx_new]); - - if (rx_desc->status.field.C == 0) { - break; - } - -#if 0 - rx_ring[rx_new].params.field.HOLD = 1; -#endif - - if (! rx_desc->status.field.Eop) { - printf("Partly received packet!!!\n"); - break; - } - - length = rx_desc->status.field.NBT; - rx_desc->status.word &= - ~(INCA_DMA_RX_EOP | INCA_DMA_RX_SOP | INCA_DMA_RX_C); -#if 0 -{ - int i; - for (i=0;iparams.field.HOLD = 0; - - rx_hold = rx_new; - - rx_new = (rx_new + 1) % NUM_RX_DESC; - } - -#if 0 - printf("Leaving inca_switch_recv()\n"); -#endif - - return length; -} - - -static void inca_switch_halt(struct eth_device *dev) -{ -#if 0 - printf("Entered inca_switch_halt()\n"); -#endif - -#if 1 - initialized = 0; -#endif -#if 1 - /* Disable forwarding to the CPU port. - */ - SW_WRITE_REG(INCA_IP_Switch_ST_PT,0xf); - - /* Close RxDMA channel. - */ - DMA_WRITE_REG(INCA_IP_DMA_DMA_RXCCR0, INCA_IP_DMA_DMA_RXCCR0_OFF); - - /* Close TxDMA channel. - */ - DMA_WRITE_REG(INCA_IP_DMA_DMA_TXCCR0, INCA_IP_DMA_DMA_TXCCR0_OFF); - - -#endif -#if 0 - printf("Leaving inca_switch_halt()\n"); -#endif -} - - -static void inca_init_switch_chip(void) -{ - u32 regValue; - - /* To workaround a problem with collision counter - * (see Errata sheet). - */ - SW_WRITE_REG(INCA_IP_Switch_PC_TX_CTL, 0x00000001); - SW_WRITE_REG(INCA_IP_Switch_LAN_TX_CTL, 0x00000001); - -#if 1 - /* init MDIO configuration: - * MDS (Poll speed): 0x01 (4ms) - * PHY_LAN_ADDR: 0x06 - * PHY_PC_ADDR: 0x05 - * UEP (Use External PHY): 0x00 (Internal PHY is used) - * PS (Port Select): 0x00 (PT/UMM for LAN) - * PT (PHY Test): 0x00 (no test mode) - * UMM (Use MDIO Mode): 0x00 (state machine is disabled) - */ - SW_WRITE_REG(INCA_IP_Switch_MDIO_CFG, 0x4c50); - - /* init PHY: - * SL (Auto Neg. Speed for LAN) - * SP (Auto Neg. Speed for PC) - * LL (Link Status for LAN) - * LP (Link Status for PC) - * DL (Duplex Status for LAN) - * DP (Duplex Status for PC) - * PL (Auto Neg. Pause Status for LAN) - * PP (Auto Neg. Pause Status for PC) - */ - SW_WRITE_REG (INCA_IP_Switch_EPHY, 0xff); - - /* MDIO_ACC: - * RA (Request/Ack) 0x01 (Request) - * RW (Read/Write) 0x01 (Write) - * PHY_ADDR 0x05 (PC) - * REG_ADDR 0x00 (PHY_BCR: basic control register) - * PHY_DATA 0x8000 - * Reset - software reset - * LB (loop back) - normal - * SS (speed select) - 10 Mbit/s - * ANE (auto neg. enable) - enable - * PD (power down) - normal - * ISO (isolate) - normal - * RAN (restart auto neg.) - normal - * DM (duplex mode) - half duplex - * CT (collision test) - enable - */ - SW_WRITE_REG(INCA_IP_Switch_MDIO_ACC, 0xc0a09000); - - /* MDIO_ACC: - * RA (Request/Ack) 0x01 (Request) - * RW (Read/Write) 0x01 (Write) - * PHY_ADDR 0x06 (LAN) - * REG_ADDR 0x00 (PHY_BCR: basic control register) - * PHY_DATA 0x8000 - * Reset - software reset - * LB (loop back) - normal - * SS (speed select) - 10 Mbit/s - * ANE (auto neg. enable) - enable - * PD (power down) - normal - * ISO (isolate) - normal - * RAN (restart auto neg.) - normal - * DM (duplex mode) - half duplex - * CT (collision test) - enable - */ - SW_WRITE_REG(INCA_IP_Switch_MDIO_ACC, 0xc0c09000); - -#endif - - /* Make sure the CPU port is disabled for now. We - * don't want packets to get stacked for us until - * we enable DMA and are prepared to receive them. - */ - SW_WRITE_REG(INCA_IP_Switch_ST_PT,0xf); - - SW_READ_REG(INCA_IP_Switch_ARL_CTL, regValue); - - /* CRC GEN is enabled. - */ - regValue |= 0x00000200; - SW_WRITE_REG(INCA_IP_Switch_ARL_CTL, regValue); - - /* ADD TAG is disabled. - */ - SW_READ_REG(INCA_IP_Switch_PMAC_HD_CTL, regValue); - regValue &= ~0x00000002; - SW_WRITE_REG(INCA_IP_Switch_PMAC_HD_CTL, regValue); -} - - -static void inca_dma_init(void) -{ - /* Switch off all DMA channels. - */ - DMA_WRITE_REG(INCA_IP_DMA_DMA_RXCCR0, INCA_IP_DMA_DMA_RXCCR0_OFF); - DMA_WRITE_REG(INCA_IP_DMA_DMA_RXCCR1, INCA_IP_DMA_DMA_RXCCR1_OFF); - - DMA_WRITE_REG(INCA_IP_DMA_DMA_TXCCR0, INCA_IP_DMA_DMA_RXCCR0_OFF); - DMA_WRITE_REG(INCA_IP_DMA_DMA_TXCCR1, INCA_IP_DMA_DMA_TXCCR1_OFF); - DMA_WRITE_REG(INCA_IP_DMA_DMA_TXCCR2, INCA_IP_DMA_DMA_TXCCR2_OFF); - - /* Setup TX channel polling time. - */ - DMA_WRITE_REG(INCA_IP_DMA_DMA_TXPOLL, INCA_DMA_TX_POLLING_TIME); - - /* Setup RX channel polling time. - */ - DMA_WRITE_REG(INCA_IP_DMA_DMA_RXPOLL, INCA_DMA_RX_POLLING_TIME); - - /* ERRATA: write reset value into the DMA RX IMR register. - */ - DMA_WRITE_REG(INCA_IP_DMA_DMA_RXIMR, 0xFFFFFFFF); - - /* Just in case: disable all transmit interrupts also. - */ - DMA_WRITE_REG(INCA_IP_DMA_DMA_TXIMR, 0xFFFFFFFF); - - DMA_WRITE_REG(INCA_IP_DMA_DMA_TXISR, 0xFFFFFFFF); - DMA_WRITE_REG(INCA_IP_DMA_DMA_RXISR, 0xFFFFFFFF); -} - -#if defined(CONFIG_INCA_IP_SWITCH_AMDIX) -static int inca_amdix(void) -{ - u32 phyReg1 = 0; - u32 phyReg4 = 0; - u32 phyReg5 = 0; - u32 phyReg6 = 0; - u32 phyReg31 = 0; - u32 regEphy = 0; - int mdi_flag; - int retries; - - /* Setup GPIO pins. - */ - *INCA_IP_AUTO_MDIX_LAN_PORTS_DIR |= (1 << INCA_IP_AUTO_MDIX_LAN_GPIO_PIN_RXTX); - *INCA_IP_AUTO_MDIX_LAN_PORTS_ALTSEL |= (1 << INCA_IP_AUTO_MDIX_LAN_GPIO_PIN_RXTX); - -#if 0 - /* Wait for signal. - */ - retries = WAIT_SIGNAL_RETRIES; - while (--retries) { - SW_WRITE_REG(INCA_IP_Switch_MDIO_ACC, - (0x1 << 31) | /* RA */ - (0x0 << 30) | /* Read */ - (0x6 << 21) | /* LAN */ - (17 << 16)); /* PHY_MCSR */ - do { - SW_READ_REG(INCA_IP_Switch_MDIO_ACC, phyReg1); - } while (phyReg1 & (1 << 31)); - - if (phyReg1 & (1 << 1)) { - /* Signal detected */ - break; - } - } - - if (!retries) - goto Fail; -#endif - - /* Set MDI mode. - */ - *INCA_IP_AUTO_MDIX_LAN_PORTS_OUT &= ~(1 << INCA_IP_AUTO_MDIX_LAN_GPIO_PIN_RXTX); - mdi_flag = 1; - - /* Wait for link. - */ - retries = WAIT_LINK_RETRIES; - while (--retries) { - udelay(LINK_RETRY_DELAY * 1000); - SW_WRITE_REG(INCA_IP_Switch_MDIO_ACC, - (0x1 << 31) | /* RA */ - (0x0 << 30) | /* Read */ - (0x6 << 21) | /* LAN */ - (1 << 16)); /* PHY_BSR */ - do { - SW_READ_REG(INCA_IP_Switch_MDIO_ACC, phyReg1); - } while (phyReg1 & (1 << 31)); - - if (phyReg1 & (1 << 2)) { - /* Link is up */ - break; - } else if (mdi_flag) { - /* Set MDIX mode */ - *INCA_IP_AUTO_MDIX_LAN_PORTS_OUT |= (1 << INCA_IP_AUTO_MDIX_LAN_GPIO_PIN_RXTX); - mdi_flag = 0; - } else { - /* Set MDI mode */ - *INCA_IP_AUTO_MDIX_LAN_PORTS_OUT &= ~(1 << INCA_IP_AUTO_MDIX_LAN_GPIO_PIN_RXTX); - mdi_flag = 1; - } - } - - if (!retries) { - goto Fail; - } else { - SW_WRITE_REG(INCA_IP_Switch_MDIO_ACC, - (0x1 << 31) | /* RA */ - (0x0 << 30) | /* Read */ - (0x6 << 21) | /* LAN */ - (1 << 16)); /* PHY_BSR */ - do { - SW_READ_REG(INCA_IP_Switch_MDIO_ACC, phyReg1); - } while (phyReg1 & (1 << 31)); - - /* Auto-negotiation / Parallel detection complete - */ - if (phyReg1 & (1 << 5)) { - SW_WRITE_REG(INCA_IP_Switch_MDIO_ACC, - (0x1 << 31) | /* RA */ - (0x0 << 30) | /* Read */ - (0x6 << 21) | /* LAN */ - (31 << 16)); /* PHY_SCSR */ - do { - SW_READ_REG(INCA_IP_Switch_MDIO_ACC, phyReg31); - } while (phyReg31 & (1 << 31)); - - switch ((phyReg31 >> 2) & 0x7) { - case INCA_SWITCH_PHY_SPEED_10H: - /* 10Base-T Half-duplex */ - regEphy = 0; - break; - case INCA_SWITCH_PHY_SPEED_10F: - /* 10Base-T Full-duplex */ - regEphy = INCA_IP_Switch_EPHY_DL; - break; - case INCA_SWITCH_PHY_SPEED_100H: - /* 100Base-TX Half-duplex */ - regEphy = INCA_IP_Switch_EPHY_SL; - break; - case INCA_SWITCH_PHY_SPEED_100F: - /* 100Base-TX Full-duplex */ - regEphy = INCA_IP_Switch_EPHY_SL | INCA_IP_Switch_EPHY_DL; - break; - } - - /* In case of Auto-negotiation, - * update the negotiated PAUSE support status - */ - if (phyReg1 & (1 << 3)) { - SW_WRITE_REG(INCA_IP_Switch_MDIO_ACC, - (0x1 << 31) | /* RA */ - (0x0 << 30) | /* Read */ - (0x6 << 21) | /* LAN */ - (6 << 16)); /* MII_EXPANSION */ - do { - SW_READ_REG(INCA_IP_Switch_MDIO_ACC, phyReg6); - } while (phyReg6 & (1 << 31)); - - /* We are Autoneg-able. - * Is Link partner also able to autoneg? - */ - if (phyReg6 & (1 << 0)) { - SW_WRITE_REG(INCA_IP_Switch_MDIO_ACC, - (0x1 << 31) | /* RA */ - (0x0 << 30) | /* Read */ - (0x6 << 21) | /* LAN */ - (4 << 16)); /* MII_ADVERTISE */ - do { - SW_READ_REG(INCA_IP_Switch_MDIO_ACC, phyReg4); - } while (phyReg4 & (1 << 31)); - - /* We advertise PAUSE capab. - * Does link partner also advertise it? - */ - if (phyReg4 & (1 << 10)) { - SW_WRITE_REG(INCA_IP_Switch_MDIO_ACC, - (0x1 << 31) | /* RA */ - (0x0 << 30) | /* Read */ - (0x6 << 21) | /* LAN */ - (5 << 16)); /* MII_LPA */ - do { - SW_READ_REG(INCA_IP_Switch_MDIO_ACC, phyReg5); - } while (phyReg5 & (1 << 31)); - - /* Link partner is PAUSE capab. - */ - if (phyReg5 & (1 << 10)) { - regEphy |= INCA_IP_Switch_EPHY_PL; - } - } - } - - } - - /* Link is up */ - regEphy |= INCA_IP_Switch_EPHY_LL; - - SW_WRITE_REG(INCA_IP_Switch_EPHY, regEphy); - } - } - - return 0; - -Fail: - printf("No Link on LAN port\n"); - return -1; -} -#endif /* CONFIG_INCA_IP_SWITCH_AMDIX */ diff --git a/include/common.h b/include/common.h index baf361b3e55..5fb0bb2d3d4 100644 --- a/include/common.h +++ b/include/common.h @@ -681,9 +681,6 @@ ulong get_UCLK (void); #if defined(CONFIG_LH7A40X) ulong get_PLLCLK (void); #endif -#if defined CONFIG_INCA_IP -uint incaip_get_cpuclk (void); -#endif #if defined(CONFIG_IMX) ulong get_systemPLLCLK(void); ulong get_FCLK(void); diff --git a/include/configs/incaip.h b/include/configs/incaip.h deleted file mode 100644 index e11d1843b9b..00000000000 --- a/include/configs/incaip.h +++ /dev/null @@ -1,177 +0,0 @@ -/* - * (C) Copyright 2003-2005 - * Wolfgang Denk, DENX Software Engineering, wd@denx.de. - * - * SPDX-License-Identifier: GPL-2.0+ - */ - -/* - * This file contains the configuration parameters for the INCA-IP board. - */ - -#ifndef __CONFIG_H -#define __CONFIG_H - -#define CONFIG_INCA_IP 1 /* on a INCA-IP Board */ - -#define CONFIG_XWAY_SWAP_BYTES - -/* - * Clock for the MIPS core (MHz) - * allowed values: 100000000, 133000000, and 150000000 (default) - */ -#ifndef CONFIG_CPU_CLOCK_RATE -#define CONFIG_CPU_CLOCK_RATE 150000000 -#endif - -#define CONFIG_SYS_XWAY_EBU_BOOTCFG 0x40C4 /* CMULT = 8 */ - -#define CONFIG_BOOTDELAY 5 /* autoboot after 5 seconds */ - -#define CONFIG_BAUDRATE 115200 - -#define CONFIG_TIMESTAMP /* Print image info with timestamp */ - -#define CONFIG_PREBOOT "echo;" \ - "echo Type \\\"run flash_nfs\\\" to mount root filesystem over NFS;" \ - "echo" - -#undef CONFIG_BOOTARGS - -#define CONFIG_EXTRA_ENV_SETTINGS \ - "nfsargs=setenv bootargs root=/dev/nfs rw " \ - "nfsroot=${serverip}:${rootpath}\0" \ - "ramargs=setenv bootargs root=/dev/ram rw\0" \ - "addip=setenv bootargs ${bootargs} " \ - "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}" \ - ":${hostname}:${netdev}:off\0" \ - "addmisc=setenv bootargs ${bootargs} " \ - "console=ttyS0,${baudrate} " \ - "ethaddr=${ethaddr} " \ - "panic=1\0" \ - "flash_nfs=run nfsargs addip addmisc;" \ - "bootm ${kernel_addr}\0" \ - "flash_self=run ramargs addip addmisc;" \ - "bootm ${kernel_addr} ${ramdisk_addr}\0" \ - "net_nfs=tftp 80500000 ${bootfile};" \ - "run nfsargs addip addmisc;bootm\0" \ - "rootpath=/opt/eldk/mips_4KC\0" \ - "bootfile=/tftpboot/INCA/uImage\0" \ - "kernel_addr=B0040000\0" \ - "ramdisk_addr=B0100000\0" \ - "u-boot=/tftpboot/INCA/u-boot.bin\0" \ - "load=tftp 80500000 ${u-boot}\0" \ - "update=protect off 1:0-2;era 1:0-2;" \ - "cp.b 80500000 B0000000 ${filesize}\0" \ - "" -#define CONFIG_BOOTCOMMAND "run flash_self" - - -/* - * BOOTP options - */ -#define CONFIG_BOOTP_BOOTFILESIZE -#define CONFIG_BOOTP_BOOTPATH -#define CONFIG_BOOTP_GATEWAY -#define CONFIG_BOOTP_HOSTNAME - - -/* - * Command line configuration. - */ -#include - -#define CONFIG_CMD_ASKENV -#define CONFIG_CMD_DHCP -#define CONFIG_CMD_ELF -#define CONFIG_CMD_JFFS2 -#define CONFIG_CMD_NFS -#define CONFIG_CMD_PING -#define CONFIG_CMD_SNTP - - -/* - * Miscellaneous configurable options - */ -#define CONFIG_SYS_LONGHELP /* undef to save memory */ -#define CONFIG_SYS_PROMPT "INCA-IP # " /* Monitor Command Prompt */ -#define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */ -#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */ -#define CONFIG_SYS_MAXARGS 16 /* max number of command args*/ - -#define CONFIG_SYS_MALLOC_LEN 128*1024 - -#define CONFIG_SYS_BOOTPARAMS_LEN 128*1024 - -#define CONFIG_SYS_MIPS_TIMER_FREQ (incaip_get_cpuclk() / 2) - -#define CONFIG_SYS_SDRAM_BASE 0x80000000 - -#define CONFIG_SYS_LOAD_ADDR 0x80100000 /* default load address */ - -#define CONFIG_SYS_MEMTEST_START 0x80100000 -#define CONFIG_SYS_MEMTEST_END 0x80800000 - -/*----------------------------------------------------------------------- - * FLASH and environment organization - */ -#define CONFIG_SYS_MAX_FLASH_BANKS 2 /* max number of memory banks */ -#define CONFIG_SYS_MAX_FLASH_SECT (128) /* max number of sectors on one chip */ - -#define PHYS_FLASH_1 0xb0000000 /* Flash Bank #1 */ -#define PHYS_FLASH_2 0xb0800000 /* Flash Bank #2 */ - -/* The following #defines are needed to get flash environment right */ -#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE -#define CONFIG_SYS_MONITOR_LEN (192 << 10) - -#define CONFIG_SYS_INIT_SP_OFFSET 0x400000 - -#define CONFIG_SYS_FLASH_BASE PHYS_FLASH_1 - -/* timeout values are in ticks */ -#define CONFIG_SYS_FLASH_ERASE_TOUT (2 * CONFIG_SYS_HZ) /* Timeout for Flash Erase */ -#define CONFIG_SYS_FLASH_WRITE_TOUT (2 * CONFIG_SYS_HZ) /* Timeout for Flash Write */ - -#define CONFIG_ENV_IS_IN_FLASH 1 - -/* Address and size of Primary Environment Sector */ -#define CONFIG_ENV_ADDR 0xB0030000 -#define CONFIG_ENV_SIZE 0x10000 - -#define CONFIG_FLASH_16BIT - -#define CONFIG_NR_DRAM_BANKS 1 - -#define CONFIG_INCA_IP_SWITCH -#define CONFIG_INCA_IP_SWITCH_AMDIX - -/* - * JFFS2 partitions - */ -/* No command line, one static partition, use all space on the device */ -#undef CONFIG_CMD_MTDPARTS -#define CONFIG_JFFS2_DEV "nor1" -#define CONFIG_JFFS2_PART_SIZE 0xFFFFFFFF -#define CONFIG_JFFS2_PART_OFFSET 0x00000000 - -/* mtdparts command line support */ -/* -#define CONFIG_CMD_MTDPARTS -#define MTDIDS_DEFAULT "nor0=INCA-IP Bank 0" -#define MTDPARTS_DEFAULT "mtdparts=INCA-IP Bank 0:192k(uboot)," \ - "64k(env)," \ - "768k(linux)," \ - "1m@3m(rootfs)," \ - "768k(linux2)," \ - "3m@5m(rootfs2)" -*/ - -/*----------------------------------------------------------------------- - * Cache Configuration - */ -#define CONFIG_SYS_DCACHE_SIZE 4096 -#define CONFIG_SYS_ICACHE_SIZE 4096 -#define CONFIG_SYS_CACHELINE_SIZE 16 - -#endif /* __CONFIG_H */ diff --git a/include/netdev.h b/include/netdev.h index 32b5073ef02..e211f1841f6 100644 --- a/include/netdev.h +++ b/include/netdev.h @@ -54,7 +54,6 @@ int ftmac100_initialize(bd_t *bits); int ftmac110_initialize(bd_t *bits); int greth_initialize(bd_t *bis); void gt6426x_eth_initialize(bd_t *bis); -int inca_switch_initialize(bd_t *bis); int ks8695_eth_initialize(void); int ks8851_mll_initialize(u8 dev_num, int base_addr); int lan91c96_initialize(u8 dev_num, int base_addr); -- cgit v1.2.3 From fa08d39517773882b07965ca4330777c6d6697ae Mon Sep 17 00:00:00 2001 From: Alexander Graf Date: Fri, 11 Apr 2014 17:09:45 +0200 Subject: PPC 85xx: Add qemu-ppce500 machine For KVM we have a special PV machine type called "ppce500". This machine is inspired by the MPC8544DS board, but implements a lot less features than that one. It also provides more PCI slots and is supposed to be enumerated by device tree only. This patch adds support for the generic ppce500 machine and tries to rely solely on device tree for device enumeration. Signed-off-by: Alexander Graf Acked-by: Scott Wood Reviewed-by: York Sun --- arch/powerpc/cpu/mpc85xx/Makefile | 2 + arch/powerpc/cpu/mpc85xx/cpu.c | 5 +- arch/powerpc/cpu/mpc85xx/cpu_init_early.c | 8 +- arch/powerpc/cpu/mpc85xx/start.S | 11 + arch/powerpc/cpu/mpc85xx/tlb.c | 2 +- arch/powerpc/include/asm/config_mpc85xx.h | 4 + board/freescale/qemu-ppce500/Makefile | 9 + board/freescale/qemu-ppce500/qemu-ppce500.c | 348 ++++++++++++++++++++++++++++ boards.cfg | 1 + include/configs/qemu-ppce500.h | 206 ++++++++++++++++ 10 files changed, 592 insertions(+), 4 deletions(-) create mode 100644 board/freescale/qemu-ppce500/Makefile create mode 100644 board/freescale/qemu-ppce500/qemu-ppce500.c create mode 100644 include/configs/qemu-ppce500.h (limited to 'board') diff --git a/arch/powerpc/cpu/mpc85xx/Makefile b/arch/powerpc/cpu/mpc85xx/Makefile index ef7637a49cd..409478539ec 100644 --- a/arch/powerpc/cpu/mpc85xx/Makefile +++ b/arch/powerpc/cpu/mpc85xx/Makefile @@ -102,7 +102,9 @@ obj-y += cpu.o obj-y += cpu_init.o obj-y += cpu_init_early.o obj-y += interrupts.o +ifneq ($(CONFIG_QEMU_E500),y) obj-y += speed.o +endif obj-y += tlb.o obj-y += traps.o diff --git a/arch/powerpc/cpu/mpc85xx/cpu.c b/arch/powerpc/cpu/mpc85xx/cpu.c index 3e99b079c74..2c8126c5f11 100644 --- a/arch/powerpc/cpu/mpc85xx/cpu.c +++ b/arch/powerpc/cpu/mpc85xx/cpu.c @@ -272,7 +272,7 @@ int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) #ifndef CONFIG_SYS_FSL_TBCLK_DIV #define CONFIG_SYS_FSL_TBCLK_DIV 8 #endif -unsigned long get_tbclk (void) +__weak unsigned long get_tbclk (void) { unsigned long tbclk_div = CONFIG_SYS_FSL_TBCLK_DIV; @@ -338,7 +338,8 @@ void mpc85xx_reginfo(void) !defined(CONFIG_SYS_INIT_L2_ADDR) phys_size_t initdram(int board_type) { -#if defined(CONFIG_SPD_EEPROM) || defined(CONFIG_DDR_SPD) +#if defined(CONFIG_SPD_EEPROM) || defined(CONFIG_DDR_SPD) || \ + defined(CONFIG_QEMU_E500) return fsl_ddr_sdram_size(); #else return (phys_size_t)CONFIG_SYS_SDRAM_SIZE * 1024 * 1024; diff --git a/arch/powerpc/cpu/mpc85xx/cpu_init_early.c b/arch/powerpc/cpu/mpc85xx/cpu_init_early.c index 993b8b828ba..998781b706b 100644 --- a/arch/powerpc/cpu/mpc85xx/cpu_init_early.c +++ b/arch/powerpc/cpu/mpc85xx/cpu_init_early.c @@ -79,7 +79,7 @@ void setup_ifc(void) #endif /* We run cpu_init_early_f in AS = 1 */ -void cpu_init_early_f(void) +void cpu_init_early_f(void *fdt) { u32 mas0, mas1, mas2, mas3, mas7; int i; @@ -102,6 +102,12 @@ void cpu_init_early_f(void) for (i = 0; i < sizeof(gd_t); i++) ((char *)gd)[i] = 0; + /* + * CONFIG_SYS_CCSRBAR_PHYS below may use gd->fdt_blob on ePAPR systems, + * so we need to populate it before it accesses it. + */ + gd->fdt_blob = fdt; + mas0 = MAS0_TLBSEL(1) | MAS0_ESEL(13); mas1 = MAS1_VALID | MAS1_TID(0) | MAS1_TS | MAS1_TSIZE(BOOKE_PAGESZ_1M); mas2 = FSL_BOOKE_MAS2(CONFIG_SYS_CCSRBAR, MAS2_I|MAS2_G); diff --git a/arch/powerpc/cpu/mpc85xx/start.S b/arch/powerpc/cpu/mpc85xx/start.S index 691bd3a4459..6b0380f9f51 100644 --- a/arch/powerpc/cpu/mpc85xx/start.S +++ b/arch/powerpc/cpu/mpc85xx/start.S @@ -78,6 +78,13 @@ _start_e500: li r1,MSR_DE mtmsr r1 + /* + * If we got an ePAPR device tree pointer passed in as r3, we need that + * later in cpu_init_early_f(). Save it to a safe register before we + * clobber it so that we can fetch it from there later. + */ + mr r24, r3 + #ifdef CONFIG_SYS_FSL_ERRATUM_A004510 mfspr r3,SPRN_SVR rlwinm r3,r3,0,0xff @@ -1142,6 +1149,10 @@ _start_cont: mr r1,r3 /* Transfer to SP(r1) */ GET_GOT + + /* Pass our potential ePAPR device tree pointer to cpu_init_early_f */ + mr r3, r24 + bl cpu_init_early_f /* switch back to AS = 0 */ diff --git a/arch/powerpc/cpu/mpc85xx/tlb.c b/arch/powerpc/cpu/mpc85xx/tlb.c index fed8df938e0..129ec662fe8 100644 --- a/arch/powerpc/cpu/mpc85xx/tlb.c +++ b/arch/powerpc/cpu/mpc85xx/tlb.c @@ -24,7 +24,7 @@ void invalidate_tlb(u8 tlb) mtspr(MMUCSR0, 0x2); } -void init_tlbs(void) +__weak void init_tlbs(void) { int i; diff --git a/arch/powerpc/include/asm/config_mpc85xx.h b/arch/powerpc/include/asm/config_mpc85xx.h index df444510911..e376783963c 100644 --- a/arch/powerpc/include/asm/config_mpc85xx.h +++ b/arch/powerpc/include/asm/config_mpc85xx.h @@ -797,6 +797,10 @@ defined(CONFIG_PPC_T1020) || defined(CONFIG_PPC_T1022) #define CONFIG_SYS_CCSRBAR_DEFAULT 0xff700000 #define CONFIG_SYS_FSL_ERRATUM_A005125 +#elif defined(CONFIG_QEMU_E500) +#define CONFIG_MAX_CPUS 1 +#define CONFIG_SYS_CCSRBAR_DEFAULT 0xe0000000 + #else #error Processor type not defined for this platform #endif diff --git a/board/freescale/qemu-ppce500/Makefile b/board/freescale/qemu-ppce500/Makefile new file mode 100644 index 00000000000..2d2749205f1 --- /dev/null +++ b/board/freescale/qemu-ppce500/Makefile @@ -0,0 +1,9 @@ +# +# Copyright 2007 Freescale Semiconductor, Inc. +# (C) Copyright 2001-2006 +# Wolfgang Denk, DENX Software Engineering, wd@denx.de. +# +# SPDX-License-Identifier: GPL-2.0+ +# + +obj-y += qemu-ppce500.o diff --git a/board/freescale/qemu-ppce500/qemu-ppce500.c b/board/freescale/qemu-ppce500/qemu-ppce500.c new file mode 100644 index 00000000000..3dbb0cf43b8 --- /dev/null +++ b/board/freescale/qemu-ppce500/qemu-ppce500.c @@ -0,0 +1,348 @@ +/* + * Copyright 2007,2009-2014 Freescale Semiconductor, Inc. + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +DECLARE_GLOBAL_DATA_PTR; + +static void *get_fdt_virt(void) +{ + return (void *)CONFIG_SYS_TMPVIRT; +} + +static uint64_t get_fdt_phys(void) +{ + return (uint64_t)(uintptr_t)gd->fdt_blob; +} + +static void map_fdt_as(int esel) +{ + u32 mas0, mas1, mas2, mas3, mas7; + uint64_t fdt_phys = get_fdt_phys(); + unsigned long fdt_phys_tlb = fdt_phys & ~0xffffful; + unsigned long fdt_virt_tlb = (ulong)get_fdt_virt() & ~0xffffful; + + mas0 = MAS0_TLBSEL(1) | MAS0_ESEL(esel); + mas1 = MAS1_VALID | MAS1_TID(0) | MAS1_TS | MAS1_TSIZE(BOOKE_PAGESZ_1M); + mas2 = FSL_BOOKE_MAS2(fdt_virt_tlb, 0); + mas3 = FSL_BOOKE_MAS3(fdt_phys_tlb, 0, MAS3_SW|MAS3_SR); + mas7 = FSL_BOOKE_MAS7(fdt_phys_tlb); + + write_tlb(mas0, mas1, mas2, mas3, mas7); +} + +uint64_t get_phys_ccsrbar_addr_early(void) +{ + void *fdt = get_fdt_virt(); + uint64_t r; + + /* + * To be able to read the FDT we need to create a temporary TLB + * map for it. + */ + map_fdt_as(10); + r = fdt_get_base_address(fdt, fdt_path_offset(fdt, "/soc")); + disable_tlb(10); + + return r; +} + +int board_early_init_f(void) +{ + return 0; +} + +int checkboard(void) +{ + return 0; +} + +static int pci_map_region(void *fdt, int pci_node, int range_id, + phys_size_t *ppaddr, pci_addr_t *pvaddr, + pci_size_t *psize, ulong *pmap_addr) +{ + uint64_t addr; + uint64_t size; + ulong map_addr; + int r; + + r = fdt_read_range(fdt, pci_node, 0, NULL, &addr, &size); + if (r) + return r; + + if (ppaddr) + *ppaddr = addr; + if (psize) + *psize = size; + + if (!pmap_addr) + return 0; + + map_addr = *pmap_addr; + + /* Align map_addr */ + map_addr += size - 1; + map_addr &= ~(size - 1); + + if (map_addr + size >= CONFIG_SYS_PCI_MAP_END) + return -1; + + /* Map virtual memory for range */ + assert(!tlb_map_range(map_addr, addr, size, TLB_MAP_IO)); + *pmap_addr = map_addr + size; + + if (pvaddr) + *pvaddr = map_addr; + + return 0; +} + +void pci_init_board(void) +{ + struct pci_controller *pci_hoses; + void *fdt = get_fdt_virt(); + int pci_node = -1; + int pci_num = 0; + int pci_count = 0; + ulong map_addr; + + puts("\n"); + + /* Start MMIO and PIO range maps above RAM */ + map_addr = CONFIG_SYS_PCI_MAP_START; + + /* Count and allocate PCI buses */ + pci_node = fdt_node_offset_by_prop_value(fdt, pci_node, + "device_type", "pci", 4); + while (pci_node != -FDT_ERR_NOTFOUND) { + pci_node = fdt_node_offset_by_prop_value(fdt, pci_node, + "device_type", "pci", 4); + pci_count++; + } + + if (pci_count) { + pci_hoses = malloc(sizeof(struct pci_controller) * pci_count); + } else { + printf("PCI: disabled\n\n"); + return; + } + + /* Spawn PCI buses based on device tree */ + pci_node = fdt_node_offset_by_prop_value(fdt, pci_node, + "device_type", "pci", 4); + while (pci_node != -FDT_ERR_NOTFOUND) { + struct fsl_pci_info pci_info = { }; + const fdt32_t *reg; + int r; + + reg = fdt_getprop(fdt, pci_node, "reg", NULL); + pci_info.regs = fdt_translate_address(fdt, pci_node, reg); + + /* Map MMIO range */ + r = pci_map_region(fdt, pci_node, 0, &pci_info.mem_phys, NULL, + &pci_info.mem_size, &map_addr); + if (r) + break; + + /* Map PIO range */ + r = pci_map_region(fdt, pci_node, 1, &pci_info.io_phys, NULL, + &pci_info.io_size, &map_addr); + if (r) + break; + + /* + * The PCI framework finds virtual addresses for the buses + * through our address map, so tell it the physical addresses. + */ + pci_info.mem_bus = pci_info.mem_phys; + pci_info.io_bus = pci_info.io_phys; + + /* Instantiate */ + pci_info.pci_num = pci_num + 1; + + fsl_setup_hose(&pci_hoses[pci_num], pci_info.regs); + printf("PCI: base address %lx\n", pci_info.regs); + + fsl_pci_init_port(&pci_info, &pci_hoses[pci_num], pci_num); + + /* Jump to next PCI node */ + pci_node = fdt_node_offset_by_prop_value(fdt, pci_node, + "device_type", "pci", 4); + pci_num++; + } + + puts("\n"); +} + +int last_stage_init(void) +{ + void *fdt = get_fdt_virt(); + int len = 0; + const uint64_t *prop; + int chosen; + + chosen = fdt_path_offset(fdt, "/chosen"); + if (chosen < 0) { + printf("Couldn't find /chosen node in fdt\n"); + return -EIO; + } + + /* -kernel boot */ + prop = fdt_getprop(fdt, chosen, "qemu,boot-kernel", &len); + if (prop && (len >= 8)) + setenv_hex("qemu_kernel_addr", *prop); + + /* Give the user a variable for the host fdt */ + setenv_hex("fdt_addr_r", (ulong)fdt); + + return 0; +} + +static uint64_t get_linear_ram_size(void) +{ + void *fdt = get_fdt_virt(); + const void *prop; + int memory; + int len; + + memory = fdt_path_offset(fdt, "/memory"); + prop = fdt_getprop(fdt, memory, "reg", &len); + + if (prop && len >= 16) + return *(uint64_t *)(prop+8); + + panic("Couldn't determine RAM size"); +} + +int board_eth_init(bd_t *bis) +{ + return pci_eth_init(bis); +} + +#if defined(CONFIG_OF_BOARD_SETUP) +void ft_board_setup(void *blob, bd_t *bd) +{ + FT_FSL_PCI_SETUP; +} +#endif + +void print_laws(void) +{ + /* We don't emulate LAWs yet */ +} + +phys_size_t fixed_sdram(void) +{ + return get_linear_ram_size(); +} + +phys_size_t fsl_ddr_sdram_size(void) +{ + return get_linear_ram_size(); +} + +void init_tlbs(void) +{ + phys_size_t ram_size; + + /* + * Create a temporary AS=1 map for the fdt + * + * We use ESEL=0 here to overwrite the previous AS=0 map for ourselves + * which was only 4k big. This way we don't have to clear any other maps. + */ + map_fdt_as(0); + + /* Fetch RAM size from the fdt */ + ram_size = get_linear_ram_size(); + + /* And remove our fdt map again */ + disable_tlb(0); + + /* Create an internal map of manually created TLB maps */ + init_used_tlb_cams(); + + /* Create a dynamic AS=0 CCSRBAR mapping */ + assert(!tlb_map_range(CONFIG_SYS_CCSRBAR, CONFIG_SYS_CCSRBAR_PHYS, + 1024 * 1024, TLB_MAP_IO)); + + /* Create a RAM map that spans all accessible RAM */ + setup_ddr_tlbs(ram_size >> 20); + + /* Create a map for the TLB */ + assert(!tlb_map_range((ulong)get_fdt_virt(), get_fdt_phys(), + 1024 * 1024, TLB_MAP_RAM)); +} + +void init_laws(void) +{ + /* We don't emulate LAWs yet */ +} + +static uint32_t get_cpu_freq(void) +{ + void *fdt = get_fdt_virt(); + int cpus_node = fdt_path_offset(fdt, "/cpus"); + int cpu_node = fdt_first_subnode(fdt, cpus_node); + const char *prop = "clock-frequency"; + return fdt_getprop_u32_default_node(fdt, cpu_node, 0, prop, 0); +} + +void get_sys_info(sys_info_t *sys_info) +{ + int freq = get_cpu_freq(); + + memset(sys_info, 0, sizeof(sys_info_t)); + sys_info->freq_systembus = freq; + sys_info->freq_ddrbus = freq; + sys_info->freq_processor[0] = freq; +} + +int get_clocks (void) +{ + sys_info_t sys_info; + + get_sys_info(&sys_info); + + gd->cpu_clk = sys_info.freq_processor[0]; + gd->bus_clk = sys_info.freq_systembus; + gd->mem_clk = sys_info.freq_ddrbus; + gd->arch.lbc_clk = sys_info.freq_ddrbus; + + return 0; +} + +unsigned long get_tbclk (void) +{ + void *fdt = get_fdt_virt(); + int cpus_node = fdt_path_offset(fdt, "/cpus"); + int cpu_node = fdt_first_subnode(fdt, cpus_node); + const char *prop = "timebase-frequency"; + return fdt_getprop_u32_default_node(fdt, cpu_node, 0, prop, 0); +} + +/******************************************** + * get_bus_freq + * return system bus freq in Hz + *********************************************/ +ulong get_bus_freq (ulong dummy) +{ + sys_info_t sys_info; + get_sys_info(&sys_info); + return sys_info.freq_systembus; +} diff --git a/boards.cfg b/boards.cfg index c83aff3b141..441361872f9 100644 --- a/boards.cfg +++ b/boards.cfg @@ -959,6 +959,7 @@ Active powerpc mpc85xx - freescale t4qds Active powerpc mpc85xx - freescale t4qds T4240QDS_SDCARD T4240QDS:PPC_T4240,RAMBOOT_PBL,SDCARD,SYS_TEXT_BASE=0xFFF40000 - Active powerpc mpc85xx - freescale t4qds T4240QDS_SPIFLASH T4240QDS:PPC_T4240,RAMBOOT_PBL,SPIFLASH,SYS_TEXT_BASE=0xFFF40000 - Active powerpc mpc85xx - freescale t4qds T4240QDS_SRIO_PCIE_BOOT T4240QDS:PPC_T4240,SRIO_PCIE_BOOT_SLAVE,SYS_TEXT_BASE=0xFFF40000 - +Active powerpc mpc85xx - freescale qemu-ppce500 qemu-ppce500 - Alexander Graf Active powerpc mpc85xx - gdsys p1022 controlcenterd_36BIT_SDCARD controlcenterd:36BIT,SDCARD Dirk Eibach Active powerpc mpc85xx - gdsys p1022 controlcenterd_36BIT_SDCARD_DEVELOP controlcenterd:36BIT,SDCARD,DEVELOP Dirk Eibach Active powerpc mpc85xx - gdsys p1022 controlcenterd_TRAILBLAZER controlcenterd:TRAILBLAZER,SPIFLASH Dirk Eibach diff --git a/include/configs/qemu-ppce500.h b/include/configs/qemu-ppce500.h new file mode 100644 index 00000000000..10e014d33c4 --- /dev/null +++ b/include/configs/qemu-ppce500.h @@ -0,0 +1,206 @@ +/* + * Copyright 2011-2014 Freescale Semiconductor, Inc. + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +/* + * Corenet DS style board configuration file + */ +#ifndef __QEMU_PPCE500_H +#define __QEMU_PPCE500_H + +#define CONFIG_CMD_REGINFO + +/* High Level Configuration Options */ +#define CONFIG_BOOKE +#define CONFIG_E500 /* BOOKE e500 family */ +#define CONFIG_QEMU_E500 + +#undef CONFIG_SYS_TEXT_BASE +#define CONFIG_SYS_TEXT_BASE 0xf01000 /* 15 MB */ + +#define CONFIG_SYS_MPC85XX_NO_RESETVEC + +#define CONFIG_SYS_RAMBOOT + +#define CONFIG_PCI /* Enable PCI/PCIE */ +#define CONFIG_PCI1 1 /* PCI controller 1 */ +#define CONFIG_FSL_PCI_INIT /* Use common FSL init code */ +#define CONFIG_SYS_PCI_64BIT /* enable 64-bit PCI resources */ + +#define CONFIG_ENV_OVERWRITE + +#define CONFIG_ENABLE_36BIT_PHYS + +#define CONFIG_ADDR_MAP +#define CONFIG_SYS_NUM_ADDR_MAP 16 /* number of TLB1 entries */ + +#define CONFIG_SYS_MEMTEST_START 0x00200000 /* memtest works on */ +#define CONFIG_SYS_MEMTEST_END 0x00400000 +#define CONFIG_SYS_ALT_MEMTEST +#define CONFIG_PANIC_HANG /* do not reset board on panic */ + +/* Needed to fill the ccsrbar pointer */ +#define CONFIG_BOARD_EARLY_INIT_F + +/* Virtual address to CCSRBAR */ +#define CONFIG_SYS_CCSRBAR 0xe0000000 +/* Physical address should be a function call */ +#ifndef __ASSEMBLY__ +extern unsigned long long get_phys_ccsrbar_addr_early(void); +#endif +#define CONFIG_SYS_CCSR_DO_NOT_RELOCATE + +/* Virtual address range for PCI region maps */ +#define CONFIG_SYS_PCI_MAP_START 0x80000000 +#define CONFIG_SYS_PCI_MAP_END 0xe8000000 + +/* Virtual address to a temporary map if we need it (max 128MB) */ +#define CONFIG_SYS_TMPVIRT 0xe8000000 + +/* + * DDR Setup + */ +#define CONFIG_VERY_BIG_RAM +#define CONFIG_SYS_DDR_SDRAM_BASE 0x00000000 +#define CONFIG_SYS_SDRAM_BASE CONFIG_SYS_DDR_SDRAM_BASE + +#define CONFIG_CHIP_SELECTS_PER_CTRL 0 + +#define CONFIG_SYS_CLK_FREQ 33000000 + +#define CONFIG_SYS_NO_FLASH + +#define CONFIG_SYS_BOOT_BLOCK 0x00000000 /* boot TLB */ + +#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE + +#define CONFIG_ENV_IS_NOWHERE + +#define CONFIG_HWCONFIG + +#define CONFIG_SYS_INIT_RAM_ADDR 0x00100000 +#define CONFIG_SYS_INIT_RAM_ADDR_PHYS_HIGH 0x0 +#define CONFIG_SYS_INIT_RAM_ADDR_PHYS_LOW 0x00100000 +/* The assembler doesn't like typecast */ +#define CONFIG_SYS_INIT_RAM_ADDR_PHYS \ + ((CONFIG_SYS_INIT_RAM_ADDR_PHYS_HIGH * 1ull << 32) | \ + CONFIG_SYS_INIT_RAM_ADDR_PHYS_LOW) +#define CONFIG_SYS_INIT_RAM_SIZE 0x00004000 + +#define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_SIZE - \ + GENERATED_GBL_DATA_SIZE) +#define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET + +#define CONFIG_SYS_MONITOR_LEN (512 * 1024) +#define CONFIG_SYS_MALLOC_LEN (4 * 1024 * 1024) + +#define CONFIG_CONS_INDEX 1 +#define CONFIG_SYS_NS16550 +#define CONFIG_SYS_NS16550_SERIAL +#define CONFIG_SYS_NS16550_REG_SIZE 1 +#define CONFIG_SYS_NS16550_CLK (get_bus_freq(0)) + +#define CONFIG_SYS_BAUDRATE_TABLE \ + {300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200} + +#define CONFIG_SYS_NS16550_COM1 (CONFIG_SYS_CCSRBAR+0x4500) +#define CONFIG_SYS_NS16550_COM2 (CONFIG_SYS_CCSRBAR+0x4600) + +/* Use the HUSH parser */ +#define CONFIG_SYS_HUSH_PARSER +#define CONFIG_SYS_PROMPT_HUSH_PS2 "> " + +/* pass open firmware flat tree */ +#define CONFIG_OF_LIBFDT +#define CONFIG_OF_BOARD_SETUP +#define CONFIG_OF_STDOUT_VIA_ALIAS + +/* new uImage format support */ +#define CONFIG_FIT +#define CONFIG_FIT_VERBOSE /* enable fit_format_{error,warning}() */ + +/* + * General PCI + * Memory space is mapped 1-1, but I/O space must start from 0. + */ + +#ifdef CONFIG_PCI +#define CONFIG_PCI_INDIRECT_BRIDGE +#define CONFIG_NET_MULTI +#define CONFIG_PCI_PNP /* do pci plug-and-play */ +#define CONFIG_E1000 + +#define CONFIG_PCI_SCAN_SHOW /* show pci devices on startup */ +#define CONFIG_DOS_PARTITION +#endif /* CONFIG_PCI */ + +#define CONFIG_LBA48 +#define CONFIG_DOS_PARTITION +#define CONFIG_CMD_EXT2 + +/* + * Environment + */ +#define CONFIG_ENV_SIZE 0x2000 + +#define CONFIG_LOADS_ECHO /* echo on for serial download */ + +#define CONFIG_LAST_STAGE_INIT + +/* + * Command line configuration. + */ +#include + +#define CONFIG_CMD_DHCP +#define CONFIG_CMD_ELF +#define CONFIG_CMD_BOOTZ +#define CONFIG_CMD_GREPENV +#define CONFIG_CMD_IRQ +#define CONFIG_CMD_PING +#define CONFIG_CMD_SETEXPR + +#ifdef CONFIG_PCI +#define CONFIG_CMD_PCI +#define CONFIG_CMD_NET +#endif + +/* + * Miscellaneous configurable options + */ +#define CONFIG_SYS_LONGHELP /* undef to save memory */ +#define CONFIG_CMDLINE_EDITING /* Command-line editing */ +#define CONFIG_AUTO_COMPLETE /* add autocompletion support */ +#define CONFIG_SYS_LOAD_ADDR 0x2000000 /* default load address */ +#define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */ +#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) +#define CONFIG_SYS_MAXARGS 16 /* max number of command args */ +#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE/* Boot Argument Buffer Size */ + +/* + * For booting Linux, the board info and command line data + * have to be in the first 64 MB of memory, since this is + * the maximum mapped by the Linux kernel during initialization. + */ +#define CONFIG_SYS_BOOTMAPSZ (64 << 20) /* Initial map for Linux*/ +#define CONFIG_SYS_BOOTM_LEN (64 << 20) /* Increase max gunzip size */ + +/* + * Environment Configuration + */ +#define CONFIG_ROOTPATH "/opt/nfsroot" +#define CONFIG_BOOTFILE "uImage" +#define CONFIG_UBOOTPATH "u-boot.bin" /* U-Boot image on TFTP server*/ + +/* default location for tftp and bootm */ +#define CONFIG_LOADADDR 1000000 + +#define CONFIG_BAUDRATE 115200 + +#define CONFIG_BOOTDELAY 1 +#define CONFIG_BOOTCOMMAND \ + "test -n \"$qemu_kernel_addr\" && bootm $qemu_kernel_addr - $fdt_addr_r\0" + +#endif /* __QEMU_PPCE500_H */ -- cgit v1.2.3 From 6b50f62cc4df7e2961fb45980cf91bb424ee263b Mon Sep 17 00:00:00 2001 From: Prabhakar Kushwaha Date: Sat, 8 Mar 2014 16:45:04 +0530 Subject: board/b4860qds:Slow MDC clock to comply IEEE specs in PBI config The MDC generate by default value of MDIO_CLK_DIV is too high i.e. higher than 2.5 MHZ. It violates the IEEE specs. So Slow MDC clock to comply IEEE specs Signed-off-by: Prabhakar Kushwaha Reviewed-by: York Sun --- board/freescale/b4860qds/b4_pbi.cfg | 3 +++ 1 file changed, 3 insertions(+) (limited to 'board') diff --git a/board/freescale/b4860qds/b4_pbi.cfg b/board/freescale/b4860qds/b4_pbi.cfg index 57b726eead8..05377bac5bb 100644 --- a/board/freescale/b4860qds/b4_pbi.cfg +++ b/board/freescale/b4860qds/b4_pbi.cfg @@ -22,6 +22,9 @@ 09110024 00100008 09110028 00100008 0911002c 00100008 +#slowing down the MDC clock to make it <= 2.5 MHZ +094fc030 00008148 +094fd030 00008148 #Flush PBL data 09138000 00000000 091380c0 00000000 -- cgit v1.2.3 From c60dee03c019be312e83fcab9c294c5a4cf7c1bd Mon Sep 17 00:00:00 2001 From: York Sun Date: Thu, 27 Mar 2014 17:54:48 -0700 Subject: mpc85xx/T1040QDS_D4: Add DDR4 support T1040QDS_D4 is a variant of T1040QDS, with additional circuit to support DDR4 memory. Tested with MTA9ASF51272AZ-2G1AYESZG. Signed-off-by: York Sun --- board/freescale/t1040qds/ddr.c | 17 ++++++++--------- board/freescale/t1040qds/ddr.h | 37 +++++++++++++++++++------------------ boards.cfg | 1 + include/configs/T1040QDS.h | 4 +++- 4 files changed, 31 insertions(+), 28 deletions(-) (limited to 'board') diff --git a/board/freescale/t1040qds/ddr.c b/board/freescale/t1040qds/ddr.c index da89a36b96a..43f952f9c03 100644 --- a/board/freescale/t1040qds/ddr.c +++ b/board/freescale/t1040qds/ddr.c @@ -1,5 +1,5 @@ /* - * Copyright 2013 Freescale Semiconductor, Inc. + * Copyright 2013-2014 Freescale Semiconductor, Inc. * * SPDX-License-Identifier: GPL-2.0+ */ @@ -39,14 +39,10 @@ void fsl_ddr_board_options(memctl_options_t *popts, if (pbsp->n_ranks == pdimm->n_ranks && (pdimm->rank_density >> 30) >= pbsp->rank_gb) { if (ddr_freq <= pbsp->datarate_mhz_high) { - popts->cpo_override = pbsp->cpo; - popts->write_data_delay = - pbsp->write_data_delay; popts->clk_adjust = pbsp->clk_adjust; popts->wrlvl_start = pbsp->wrlvl_start; popts->wrlvl_ctl_2 = pbsp->wrlvl_ctl_2; popts->wrlvl_ctl_3 = pbsp->wrlvl_ctl_3; - popts->twot_en = pbsp->force_2t; goto found; } pbsp_highest = pbsp; @@ -59,13 +55,10 @@ void fsl_ddr_board_options(memctl_options_t *popts, printf("for data rate %lu MT/s\n", ddr_freq); printf("Trying to use the highest speed (%u) parameters\n", pbsp_highest->datarate_mhz_high); - popts->cpo_override = pbsp_highest->cpo; - popts->write_data_delay = pbsp_highest->write_data_delay; popts->clk_adjust = pbsp_highest->clk_adjust; popts->wrlvl_start = pbsp_highest->wrlvl_start; popts->wrlvl_ctl_2 = pbsp->wrlvl_ctl_2; popts->wrlvl_ctl_3 = pbsp->wrlvl_ctl_3; - popts->twot_en = pbsp_highest->force_2t; } else { panic("DIMM is not supported by this board"); } @@ -81,7 +74,7 @@ found: * Factors to consider for half-strength driver enable: * - number of DIMMs installed */ - popts->half_strength_driver_enable = 0; + popts->half_strength_driver_enable = 1; /* * Write leveling override */ @@ -97,8 +90,14 @@ found: popts->zq_en = 1; /* DHC_EN =1, ODT = 75 Ohm */ +#ifdef CONFIG_SYS_FSL_DDR4 + popts->ddr_cdr1 = DDR_CDR1_DHC_EN | DDR_CDR1_ODT(DDR_CDR_ODT_80ohm); + popts->ddr_cdr2 = DDR_CDR2_ODT(DDR_CDR_ODT_80ohm) | + DDR_CDR2_VREF_OVRD(70); /* Vref = 70% */ +#else popts->ddr_cdr1 = DDR_CDR1_DHC_EN | DDR_CDR1_ODT(DDR_CDR_ODT_75ohm); popts->ddr_cdr2 = DDR_CDR2_ODT(DDR_CDR_ODT_75ohm); +#endif } phys_size_t initdram(int board_type) diff --git a/board/freescale/t1040qds/ddr.h b/board/freescale/t1040qds/ddr.h index afa72af26a6..a6e1673525f 100644 --- a/board/freescale/t1040qds/ddr.h +++ b/board/freescale/t1040qds/ddr.h @@ -1,5 +1,5 @@ /* - * Copyright 2013 Freescale Semiconductor, Inc. + * Copyright 2013-2014 Freescale Semiconductor, Inc. * * SPDX-License-Identifier: GPL-2.0+ */ @@ -14,9 +14,6 @@ struct board_specific_parameters { u32 wrlvl_start; u32 wrlvl_ctl_2; u32 wrlvl_ctl_3; - u32 cpo; - u32 write_data_delay; - u32 force_2t; }; /* @@ -28,21 +25,25 @@ struct board_specific_parameters { static const struct board_specific_parameters udimm0[] = { /* * memory controller 0 - * num| hi| rank| clk| wrlvl | wrlvl | wrlvl | cpo |wrdata|2T - * ranks| mhz| GB |adjst| start | ctl2 | ctl3 | |delay | + * num| hi| rank| clk| wrlvl | wrlvl | wrlvl | + * ranks| mhz| GB |adjst| start | ctl2 | ctl3 | */ - {2, 833, 4, 4, 6, 0x06060607, 0x08080807, 0xff, 2, 0}, - {2, 833, 0, 4, 6, 0x06060607, 0x08080807, 0xff, 2, 0}, - {2, 1350, 4, 4, 7, 0x0708080A, 0x0A0B0C09, 0xff, 2, 0}, - {2, 1350, 0, 4, 7, 0x0708080A, 0x0A0B0C09, 0xff, 2, 0}, - {2, 1666, 4, 4, 7, 0x0808090B, 0x0C0D0E0A, 0xff, 2, 0}, - {2, 1666, 0, 4, 7, 0x0808090B, 0x0C0D0E0A, 0xff, 2, 0}, - {1, 833, 4, 4, 6, 0x06060607, 0x08080807, 0xff, 2, 0}, - {1, 833, 0, 4, 6, 0x06060607, 0x08080807, 0xff, 2, 0}, - {1, 1350, 4, 4, 7, 0x0708080A, 0x0A0B0C09, 0xff, 2, 0}, - {1, 1350, 0, 4, 7, 0x0708080A, 0x0A0B0C09, 0xff, 2, 0}, - {1, 1666, 4, 4, 7, 0x0808090B, 0x0C0D0E0A, 0xff, 2, 0}, - {1, 1666, 0, 4, 7, 0x0808090B, 0x0C0D0E0A, 0xff, 2, 0}, +#ifdef CONFIG_SYS_FSL_DDR4 + {2, 1666, 0, 4, 7, 0x0808090B, 0x0C0D0E0A,}, + {2, 1900, 0, 4, 6, 0x08080A0C, 0x0D0E0F0A,}, + {1, 1666, 0, 4, 6, 0x0708090B, 0x0C0D0E09,}, + {1, 1900, 0, 4, 6, 0x08080A0C, 0x0D0E0F0A,}, + {1, 2200, 0, 4, 7, 0x08090A0D, 0x0F0F100C,}, +#elif defined(CONFIG_SYS_FSL_DDR3) + {2, 833, 0, 4, 6, 0x06060607, 0x08080807,}, + {2, 1350, 0, 4, 7, 0x0708080A, 0x0A0B0C09,}, + {2, 1666, 0, 4, 7, 0x0808090B, 0x0C0D0E0A,}, + {1, 833, 0, 4, 6, 0x06060607, 0x08080807,}, + {1, 1350, 0, 4, 7, 0x0708080A, 0x0A0B0C09,}, + {1, 1666, 0, 4, 7, 0x0808090B, 0x0C0D0E0A,}, +#else +#error DDR type not defined +#endif {} }; diff --git a/boards.cfg b/boards.cfg index 730066c9688..f6837b767cb 100644 --- a/boards.cfg +++ b/boards.cfg @@ -942,6 +942,7 @@ Active powerpc mpc85xx - freescale p2041rdb Active powerpc mpc85xx - freescale p2041rdb P2041RDB_SPIFLASH P2041RDB:RAMBOOT_PBL,SPIFLASH,SYS_TEXT_BASE=0xFFF40000 - Active powerpc mpc85xx - freescale p2041rdb P2041RDB_SRIO_PCIE_BOOT P2041RDB:SRIO_PCIE_BOOT_SLAVE,SYS_TEXT_BASE=0xFFF40000 - Active powerpc mpc85xx - freescale t1040qds T1040QDS T1040QDS:PPC_T1040 Poonam Aggrwal +Active powerpc mpc85xx - freescale t1040qds T1040QDS_D4 T1040QDS:PPC_T1040,SYS_FSL_DDR4 Poonam Aggrwal Active powerpc mpc85xx - freescale t1040qds T1040QDS_SECURE_BOOT T1040QDS:PPC_T1040,SECURE_BOOT Aneesh Bansal Active powerpc mpc85xx - freescale t104xrdb T1040RDB T1040RDB:PPC_T1040 Poonam Aggrwal Active powerpc mpc85xx - freescale t104xrdb T1040RDB_SECURE_BOOT T1040RDB:PPC_T1040,SECURE_BOOT Aneesh Bansal diff --git a/include/configs/T1040QDS.h b/include/configs/T1040QDS.h index 84213b8eaf1..63a7efccf23 100644 --- a/include/configs/T1040QDS.h +++ b/include/configs/T1040QDS.h @@ -1,5 +1,5 @@ /* - * Copyright 2013 Freescale Semiconductor, Inc. + * Copyright 2013-2014 Freescale Semiconductor, Inc. * * See file CREDITS for list of people who contributed to this * project. @@ -169,8 +169,10 @@ unsigned long get_board_ddr_clk(void); #define CONFIG_CHIP_SELECTS_PER_CTRL (2 * CONFIG_DIMM_SLOTS_PER_CTLR) #define CONFIG_DDR_SPD +#ifndef CONFIG_SYS_FSL_DDR4 #define CONFIG_SYS_FSL_DDR3 #define CONFIG_FSL_DDR_INTERACTIVE +#endif #define CONFIG_SYS_SPD_BUS_NUM 0 #define SPD_EEPROM_ADDRESS 0x51 -- cgit v1.2.3 From 55153d6c30d8ce11c8a7acf226375e61546b8401 Mon Sep 17 00:00:00 2001 From: Prabhakar Kushwaha Date: Thu, 3 Apr 2014 16:50:05 +0530 Subject: board/t104xrdb: Add support of CPLD T1040RDB and T1042RDB_PI has CPLD. Here CPLD controls board mux/features. This support of CPLD includes - files and register defintion - Commands to swtich alternate bank and default bank Signed-off-by: Prabhakar Kushwaha Reviewed-by: York Sun --- board/freescale/t104xrdb/Makefile | 1 + board/freescale/t104xrdb/cpld.c | 112 ++++++++++++++++++++++++++++++++++++ board/freescale/t104xrdb/cpld.h | 40 +++++++++++++ board/freescale/t104xrdb/t104xrdb.c | 13 +++++ include/configs/T104xRDB.h | 8 +++ 5 files changed, 174 insertions(+) create mode 100644 board/freescale/t104xrdb/cpld.c create mode 100644 board/freescale/t104xrdb/cpld.h (limited to 'board') diff --git a/board/freescale/t104xrdb/Makefile b/board/freescale/t104xrdb/Makefile index e51fb7a7f45..7e7bfb1c5bd 100644 --- a/board/freescale/t104xrdb/Makefile +++ b/board/freescale/t104xrdb/Makefile @@ -6,6 +6,7 @@ obj-y += t104xrdb.o +obj-y += cpld.o obj-y += ddr.o obj-y += eth.o obj-$(CONFIG_PCI) += pci.o diff --git a/board/freescale/t104xrdb/cpld.c b/board/freescale/t104xrdb/cpld.c new file mode 100644 index 00000000000..df0e348d4af --- /dev/null +++ b/board/freescale/t104xrdb/cpld.c @@ -0,0 +1,112 @@ +/** + * Copyright 2014 Freescale Semiconductor + * + * SPDX-License-Identifier: GPL-2.0+ + * + * This file provides support for the board-specific CPLD used on some Freescale + * reference boards. + * + * The following macros need to be defined: + * + * CONFIG_SYS_CPLD_BASE-The virtual address of the base of the CPLD register map + */ + +#include +#include +#include + +#include "cpld.h" + +u8 cpld_read(unsigned int reg) +{ + void *p = (void *)CONFIG_SYS_CPLD_BASE; + + return in_8(p + reg); +} + +void cpld_write(unsigned int reg, u8 value) +{ + void *p = (void *)CONFIG_SYS_CPLD_BASE; + + out_8(p + reg, value); +} + +/** + * Set the boot bank to the alternate bank + */ +void cpld_set_altbank(void) +{ + u8 reg = CPLD_READ(flash_ctl_status); + + reg = (reg & ~CPLD_BANK_SEL_MASK) | CPLD_LBMAP_ALTBANK; + + CPLD_WRITE(flash_ctl_status, reg); + CPLD_WRITE(reset_ctl1, CPLD_LBMAP_RESET); +} + +/** + * Set the boot bank to the default bank + */ +void cpld_set_defbank(void) +{ + u8 reg = CPLD_READ(flash_ctl_status); + + reg = (reg & ~CPLD_BANK_SEL_MASK) | CPLD_LBMAP_DFLTBANK; + + CPLD_WRITE(flash_ctl_status, reg); + CPLD_WRITE(reset_ctl1, CPLD_LBMAP_RESET); +} + +#ifdef DEBUG +static void cpld_dump_regs(void) +{ + printf("cpld_ver = 0x%02x\n", CPLD_READ(cpld_ver)); + printf("cpld_ver_sub = 0x%02x\n", CPLD_READ(cpld_ver_sub)); + printf("hw_ver = 0x%02x\n", CPLD_READ(hw_ver)); + printf("sw_ver = 0x%02x\n", CPLD_READ(sw_ver)); + printf("reset_ctl1 = 0x%02x\n", CPLD_READ(reset_ctl1)); + printf("reset_ctl2 = 0x%02x\n", CPLD_READ(reset_ctl2)); + printf("int_status = 0x%02x\n", CPLD_READ(int_status)); + printf("flash_ctl_status = 0x%02x\n", CPLD_READ(flash_ctl_status)); + printf("fan_ctl_status = 0x%02x\n", CPLD_READ(fan_ctl_status)); + printf("led_ctl_status = 0x%02x\n", CPLD_READ(led_ctl_status)); + printf("sfp_ctl_status = 0x%02x\n", CPLD_READ(sfp_ctl_status)); + printf("misc_ctl_status = 0x%02x\n", CPLD_READ(misc_ctl_status)); + printf("boot_override = 0x%02x\n", CPLD_READ(boot_override)); + printf("boot_config1 = 0x%02x\n", CPLD_READ(boot_config1)); + printf("boot_config2 = 0x%02x\n", CPLD_READ(boot_config2)); + putc('\n'); +} +#endif + +int do_cpld(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +{ + int rc = 0; + + if (argc <= 1) + return cmd_usage(cmdtp); + + if (strcmp(argv[1], "reset") == 0) { + if (strcmp(argv[2], "altbank") == 0) + cpld_set_altbank(); + else + cpld_set_defbank(); +#ifdef DEBUG + } else if (strcmp(argv[1], "dump") == 0) { + cpld_dump_regs(); +#endif + } else + rc = cmd_usage(cmdtp); + + return rc; +} + +U_BOOT_CMD( + cpld, CONFIG_SYS_MAXARGS, 1, do_cpld, + "Reset the board or alternate bank", + "reset - hard reset to default bank\n" + "cpld reset altbank - reset to alternate bank\n" +#ifdef DEBUG + "cpld dump - display the CPLD registers\n" +#endif + ); diff --git a/board/freescale/t104xrdb/cpld.h b/board/freescale/t104xrdb/cpld.h new file mode 100644 index 00000000000..0da9a0159ba --- /dev/null +++ b/board/freescale/t104xrdb/cpld.h @@ -0,0 +1,40 @@ +/** + * Copyright 2013 Freescale Semiconductor + * + * SPDX-License-Identifier: GPL-2.0+ + * + * This file provides support for the ngPIXIS, a board-specific FPGA used on + * some Freescale reference boards. + */ + +/* + * CPLD register set. Feel free to add board-specific #ifdefs where necessary. + */ +struct cpld_data { + u8 cpld_ver; /* 0x00 - CPLD Major Revision Register */ + u8 cpld_ver_sub; /* 0x01 - CPLD Minor Revision Register */ + u8 hw_ver; /* 0x02 - Hardware Revision Register */ + u8 sw_ver; /* 0x03 - Software Revision register */ + u8 res0[12]; /* 0x04 - 0x0F - not used */ + u8 reset_ctl1; /* 0x10 - Reset control Register1 */ + u8 reset_ctl2; /* 0x11 - Reset control Register2 */ + u8 int_status; /* 0x12 - Interrupt status Register */ + u8 flash_ctl_status; /* 0x13 - Flash control and status register */ + u8 fan_ctl_status; /* 0x14 - Fan control and status register */ + u8 led_ctl_status; /* 0x15 - LED control and status register */ + u8 sfp_ctl_status; /* 0x16 - SFP control and status register */ + u8 misc_ctl_status; /* 0x17 - Miscellanies ctrl & status register*/ + u8 boot_override; /* 0x18 - Boot override register */ + u8 boot_config1; /* 0x19 - Boot config override register*/ + u8 boot_config2; /* 0x1A - Boot config override register*/ +} cpld_data_t; + + +/* Pointer to the CPLD register set */ + +u8 cpld_read(unsigned int reg); +void cpld_write(unsigned int reg, u8 value); + +#define CPLD_READ(reg) cpld_read(offsetof(struct cpld_data, reg)) +#define CPLD_WRITE(reg, value)\ + cpld_write(offsetof(struct cpld_data, reg), value) diff --git a/board/freescale/t104xrdb/t104xrdb.c b/board/freescale/t104xrdb/t104xrdb.c index 6e29d641077..b48133a1811 100644 --- a/board/freescale/t104xrdb/t104xrdb.c +++ b/board/freescale/t104xrdb/t104xrdb.c @@ -19,14 +19,27 @@ #include #include "t104xrdb.h" +#include "cpld.h" DECLARE_GLOBAL_DATA_PTR; int checkboard(void) { struct cpu_type *cpu = gd->arch.cpu; + u8 sw; printf("Board: %sRDB\n", cpu->name); + printf("Board rev: 0x%02x CPLD ver: 0x%02x, ", + CPLD_READ(hw_ver), CPLD_READ(sw_ver)); + + sw = CPLD_READ(flash_ctl_status); + sw = ((sw & CPLD_LBMAP_MASK) >> CPLD_LBMAP_SHIFT); + + if (sw <= 7) + printf("vBank: %d\n", sw); + else + printf("Unsupported Bank=%x\n", sw); + return 0; } diff --git a/include/configs/T104xRDB.h b/include/configs/T104xRDB.h index ffc96f1b6ff..eaaf37dbe29 100644 --- a/include/configs/T104xRDB.h +++ b/include/configs/T104xRDB.h @@ -179,6 +179,14 @@ #define CONFIG_SYS_FLASH_BANKS_LIST {CONFIG_SYS_FLASH_BASE_PHYS} /* CPLD on IFC */ +#define CPLD_LBMAP_MASK 0x3F +#define CPLD_BANK_SEL_MASK 0x07 +#define CPLD_BANK_OVERRIDE 0x40 +#define CPLD_LBMAP_ALTBANK 0x44 /* BANK OR | BANK 4 */ +#define CPLD_LBMAP_DFLTBANK 0x40 /* BANK OR | BANK0 */ +#define CPLD_LBMAP_RESET 0xFF +#define CPLD_LBMAP_SHIFT 0x03 + #define CONFIG_SYS_CPLD_BASE 0xffdf0000 #define CONFIG_SYS_CPLD_BASE_PHYS (0xf00000000ull | CONFIG_SYS_CPLD_BASE) #define CONFIG_SYS_CSPR2_EXT (0xf) -- cgit v1.2.3 From 48f6a9a2bfffb77d00444865b40681aa5b41c6c7 Mon Sep 17 00:00:00 2001 From: Tang Yuantian Date: Thu, 17 Apr 2014 15:33:44 +0800 Subject: mpc85xx: Add deep sleep support on T1040QDS Add deep sleep support on T1040QDS platform. Signed-off-by: Tang Yuantian Reviewed-by: York Sun --- board/freescale/t1040qds/t1040qds.c | 12 ++++++++++++ include/configs/T1040QDS.h | 4 ++++ 2 files changed, 16 insertions(+) (limited to 'board') diff --git a/board/freescale/t1040qds/t1040qds.c b/board/freescale/t1040qds/t1040qds.c index 3dec4473e52..f1d7cdef6f9 100644 --- a/board/freescale/t1040qds/t1040qds.c +++ b/board/freescale/t1040qds/t1040qds.c @@ -18,6 +18,7 @@ #include #include #include +#include #include "../common/qixis.h" #include "t1040qds.h" @@ -245,3 +246,14 @@ int board_need_mem_reset(void) { return 1; } + +#ifdef CONFIG_DEEP_SLEEP +void board_mem_sleep_setup(void) +{ + /* does not provide HW signals for power management */ + QIXIS_WRITE(pwr_ctl[1], (QIXIS_READ(pwr_ctl[1]) & ~0x2)); + /* Disable MCKE isolation */ + gpio_set_value(2, 0); + udelay(1); +} +#endif diff --git a/include/configs/T1040QDS.h b/include/configs/T1040QDS.h index 030ea7e6605..745a2f22f9e 100644 --- a/include/configs/T1040QDS.h +++ b/include/configs/T1040QDS.h @@ -43,6 +43,10 @@ #define CONFIG_SYS_BOOK3E_HV /* Category E.HV supported */ #define CONFIG_MP /* support multiple processors */ +/* support deep sleep */ +#define CONFIG_DEEP_SLEEP +#define CONFIG_SILENT_CONSOLE + #ifndef CONFIG_SYS_TEXT_BASE #define CONFIG_SYS_TEXT_BASE 0xeff40000 #endif -- cgit v1.2.3 From 5303a3dea95227f940440a7a4101dfbb76959682 Mon Sep 17 00:00:00 2001 From: Tang Yuantian Date: Thu, 17 Apr 2014 15:33:45 +0800 Subject: mpc85xx: Add deep sleep support on T104xRDB Add deep sleep support on T104xRDB platforms. Signed-off-by: Tang Yuantian Reviewed-by: York Sun --- board/freescale/t104xrdb/t104xrdb.c | 10 ++++++++++ include/configs/T104xRDB.h | 4 ++++ 2 files changed, 14 insertions(+) (limited to 'board') diff --git a/board/freescale/t104xrdb/t104xrdb.c b/board/freescale/t104xrdb/t104xrdb.c index b48133a1811..fb5b84940ea 100644 --- a/board/freescale/t104xrdb/t104xrdb.c +++ b/board/freescale/t104xrdb/t104xrdb.c @@ -17,6 +17,7 @@ #include #include #include +#include #include "t104xrdb.h" #include "cpld.h" @@ -104,3 +105,12 @@ void ft_board_setup(void *blob, bd_t *bd) fdt_fixup_fman_ethernet(blob); #endif } + +#ifdef CONFIG_DEEP_SLEEP +void board_mem_sleep_setup(void) +{ + /* Disable MCKE isolation */ + gpio_set_value(2, 0); + udelay(1); +} +#endif diff --git a/include/configs/T104xRDB.h b/include/configs/T104xRDB.h index eaaf37dbe29..0159b97f7e6 100644 --- a/include/configs/T104xRDB.h +++ b/include/configs/T104xRDB.h @@ -25,6 +25,10 @@ #define CONFIG_SYS_BOOK3E_HV /* Category E.HV supported */ #define CONFIG_MP /* support multiple processors */ +/* support deep sleep */ +#define CONFIG_DEEP_SLEEP +#define CONFIG_SILENT_CONSOLE + #ifndef CONFIG_SYS_TEXT_BASE #define CONFIG_SYS_TEXT_BASE 0xeff40000 #endif -- cgit v1.2.3 From 6259e291341d4c3753c7ce0e61d2bf8bdc5eacf0 Mon Sep 17 00:00:00 2001 From: Zhao Qiang Date: Fri, 21 Mar 2014 16:21:46 +0800 Subject: T1040QDS/U-QE: Add u-qe support to t1040qds Add u-qe support for t1040qds Signed-off-by: Zhao Qiang Reviewed-by: York Sun --- board/freescale/t1040qds/t1040qds.c | 27 +++++++++++++++++++++++++++ include/configs/T1040QDS.h | 3 +++ 2 files changed, 30 insertions(+) (limited to 'board') diff --git a/board/freescale/t1040qds/t1040qds.c b/board/freescale/t1040qds/t1040qds.c index f1d7cdef6f9..0e83d172dac 100644 --- a/board/freescale/t1040qds/t1040qds.c +++ b/board/freescale/t1040qds/t1040qds.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include "../common/qixis.h" @@ -90,6 +91,30 @@ int select_i2c_ch_pca9547(u8 ch) return 0; } +static void qe_board_setup(void) +{ + u8 brdcfg15, brdcfg9; + + if (hwconfig("qe") && hwconfig("tdm")) { + brdcfg15 = QIXIS_READ(brdcfg[15]); + /* + * TDMRiser uses QE-TDM + * Route QE_TDM signals to TDM Riser slot + */ + QIXIS_WRITE(brdcfg[15], brdcfg15 | 7); + } else if (hwconfig("qe") && hwconfig("uart")) { + brdcfg15 = QIXIS_READ(brdcfg[15]); + brdcfg9 = QIXIS_READ(brdcfg[9]); + /* + * Route QE_TDM signals to UCC + * ProfiBus controlled by UCC3 + */ + brdcfg15 &= 0xfc; + QIXIS_WRITE(brdcfg[15], brdcfg15 | 2); + QIXIS_WRITE(brdcfg[9], brdcfg9 | 4); + } +} + int board_early_init_r(void) { #ifdef CONFIG_SYS_FLASH_BASE @@ -197,6 +222,8 @@ int misc_init_r(void) } } + qe_board_setup(); + return 0; } diff --git a/include/configs/T1040QDS.h b/include/configs/T1040QDS.h index 745a2f22f9e..6cc4e92ff28 100644 --- a/include/configs/T1040QDS.h +++ b/include/configs/T1040QDS.h @@ -601,6 +601,8 @@ unsigned long get_board_ddr_clk(void); #define CONFIG_SYS_DPAA_FMAN #define CONFIG_SYS_DPAA_PME +#define CONFIG_QE +#define CONFIG_U_QE /* Default address of microcode for the Linux Fman driver */ #if defined(CONFIG_SPIFLASH) /* @@ -623,6 +625,7 @@ unsigned long get_board_ddr_clk(void); #else #define CONFIG_SYS_QE_FMAN_FW_IN_NOR #define CONFIG_SYS_FMAN_FW_ADDR 0xEFF00000 +#define CONFIG_SYS_QE_FW_ADDR 0xEFF10000 #endif #define CONFIG_SYS_QE_FMAN_FW_LENGTH 0x10000 #define CONFIG_SYS_FDT_PAD (0x3000 + CONFIG_SYS_QE_FMAN_FW_LENGTH) -- cgit v1.2.3 From c5dfe6ec58e0b504cba5b429200f6a5d217d5bd9 Mon Sep 17 00:00:00 2001 From: Prabhakar Kushwaha Date: Tue, 8 Apr 2014 19:13:44 +0530 Subject: board/b4qds:Add support of 2 stage NAND boot-loader Add support of 2 stage NAND boot loader using SPL framework. here, PBL initialise the internal SRAM and copy SPL(160KB). This further initialise DDR using SPD and environment and copy u-boot(768 KB) from NAND to DDR. Finally SPL transer control to u-boot. Initialise/create followings required for SPL framework - Add spl.c which defines board_init_f, board_init_r - update tlb and ddr accordingly Signed-off-by: Prabhakar Kushwaha Reviewed-by: York Sun --- board/freescale/b4860qds/Makefile | 9 ++- board/freescale/b4860qds/ddr.c | 5 +- board/freescale/b4860qds/spl.c | 114 ++++++++++++++++++++++++++++++++++++++ board/freescale/b4860qds/tlb.c | 10 ++++ boards.cfg | 4 +- doc/README.b4860qds | 36 ++++++++++++ include/configs/B4860QDS.h | 64 ++++++++++++++++++--- 7 files changed, 230 insertions(+), 12 deletions(-) create mode 100644 board/freescale/b4860qds/spl.c (limited to 'board') diff --git a/board/freescale/b4860qds/Makefile b/board/freescale/b4860qds/Makefile index e5cc054a015..0acd2a9aa4a 100644 --- a/board/freescale/b4860qds/Makefile +++ b/board/freescale/b4860qds/Makefile @@ -4,9 +4,14 @@ # SPDX-License-Identifier: GPL-2.0+ # +ifdef CONFIG_SPL_BUILD +obj-y += spl.o +else obj-y += b4860qds.o -obj-y += ddr.o obj-$(CONFIG_B4860QDS)+= eth_b4860qds.o -obj-$(CONFIG_PCI) += pci.o +obj-$(CONFIG_PCI) += pci.o +endif + +obj-y += ddr.o obj-y += law.o obj-y += tlb.o diff --git a/board/freescale/b4860qds/ddr.c b/board/freescale/b4860qds/ddr.c index 187c3b3ebca..2c17156586d 100644 --- a/board/freescale/b4860qds/ddr.c +++ b/board/freescale/b4860qds/ddr.c @@ -179,6 +179,7 @@ phys_size_t initdram(int board_type) { phys_size_t dram_size; +#if defined(CONFIG_SPL_BUILD) || !defined(CONFIG_RAMBOOT_PBL) puts("Initializing....using SPD\n"); dram_size = fsl_ddr_sdram(); @@ -186,7 +187,9 @@ phys_size_t initdram(int board_type) dram_size = setup_ddr_tlbs(dram_size / 0x100000); dram_size *= 0x100000; - puts(" DDR: "); +#else + dram_size = fsl_ddr_sdram_size(); +#endif return dram_size; } diff --git a/board/freescale/b4860qds/spl.c b/board/freescale/b4860qds/spl.c new file mode 100644 index 00000000000..3aa5a780f4b --- /dev/null +++ b/board/freescale/b4860qds/spl.c @@ -0,0 +1,114 @@ +/* Copyright 2013 Freescale Semiconductor, Inc. + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#include +#include +#include +#include +#include +#include +#include "../common/qixis.h" +#include "b4860qds_qixis.h" + +DECLARE_GLOBAL_DATA_PTR; + +phys_size_t get_effective_memsize(void) +{ + return CONFIG_SYS_L3_SIZE; +} + +unsigned long get_board_sys_clk(void) +{ + u8 sysclk_conf = QIXIS_READ(brdcfg[1]); + + switch ((sysclk_conf & 0x0C) >> 2) { + case QIXIS_CLK_100: + return 100000000; + case QIXIS_CLK_125: + return 125000000; + case QIXIS_CLK_133: + return 133333333; + } + return 66666666; +} + +unsigned long get_board_ddr_clk(void) +{ + u8 ddrclk_conf = QIXIS_READ(brdcfg[1]); + + switch (ddrclk_conf & 0x03) { + case QIXIS_CLK_100: + return 100000000; + case QIXIS_CLK_125: + return 125000000; + case QIXIS_CLK_133: + return 133333333; + } + return 66666666; +} + +void board_init_f(ulong bootflag) +{ + u32 plat_ratio, sys_clk, uart_clk; + ccsr_gur_t *gur = (void *)CONFIG_SYS_MPC85xx_GUTS_ADDR; + + /* Memcpy existing GD at CONFIG_SPL_GD_ADDR */ + memcpy((void *)CONFIG_SPL_GD_ADDR, (void *)gd, sizeof(gd_t)); + + /* Update GD pointer */ + gd = (gd_t *)(CONFIG_SPL_GD_ADDR); + + /* compiler optimization barrier needed for GCC >= 3.4 */ + __asm__ __volatile__("" : : : "memory"); + + console_init_f(); + + /* initialize selected port with appropriate baud rate */ + sys_clk = get_board_sys_clk(); + plat_ratio = (in_be32(&gur->rcwsr[0]) >> 25) & 0x1f; + uart_clk = sys_clk * plat_ratio / 2; + + NS16550_init((NS16550_t)CONFIG_SYS_NS16550_COM1, + uart_clk / 16 / CONFIG_BAUDRATE); + + relocate_code(CONFIG_SPL_RELOC_STACK, (gd_t *)CONFIG_SPL_GD_ADDR, 0x0); +} + +void board_init_r(gd_t *gd, ulong dest_addr) +{ + bd_t *bd; + + bd = (bd_t *)(gd + sizeof(gd_t)); + memset(bd, 0, sizeof(bd_t)); + gd->bd = bd; + bd->bi_memstart = CONFIG_SYS_INIT_L3_ADDR; + bd->bi_memsize = CONFIG_SYS_L3_SIZE; + + probecpu(); + get_clocks(); + mem_malloc_init(CONFIG_SPL_RELOC_MALLOC_ADDR, + CONFIG_SPL_RELOC_MALLOC_SIZE); + +#ifndef CONFIG_SPL_NAND_BOOT + env_init(); + env_relocate(); +#else + /* relocate environment function pointers etc. */ + nand_spl_load_image(CONFIG_ENV_OFFSET, CONFIG_ENV_SIZE, + (uchar *)CONFIG_ENV_ADDR); + gd->env_addr = (ulong)(CONFIG_ENV_ADDR); + gd->env_valid = 1; +#endif + + i2c_init_all(); + + puts("\n\n"); + + gd->ram_size = initdram(0); + +#ifdef CONFIG_SPL_NAND_BOOT + nand_boot(); +#endif +} diff --git a/board/freescale/b4860qds/tlb.c b/board/freescale/b4860qds/tlb.c index 00798a1c190..7b55b860d08 100644 --- a/board/freescale/b4860qds/tlb.c +++ b/board/freescale/b4860qds/tlb.c @@ -62,6 +62,7 @@ struct fsl_e_tlb_entry tlb_table[] = { MAS3_SX|MAS3_SR, MAS2_W|MAS2_G, 0, 2, BOOKE_PAGESZ_256M, 1), +#ifndef CONFIG_SPL_BUILD /* *I*G* - PCI */ SET_TLB_ENTRY(1, CONFIG_SYS_PCIE1_MEM_VIRT, CONFIG_SYS_PCIE1_MEM_PHYS, MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G, @@ -96,6 +97,7 @@ struct fsl_e_tlb_entry tlb_table[] = { MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G, 0, 9, BOOKE_PAGESZ_16M, 1), #endif +#endif #ifdef CONFIG_SYS_DCSRBAR_PHYS SET_TLB_ENTRY(1, CONFIG_SYS_DCSRBAR, CONFIG_SYS_DCSRBAR_PHYS, MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G, @@ -118,6 +120,7 @@ struct fsl_e_tlb_entry tlb_table[] = { * entry 14 and 15 has been used hard coded, they will be disabled * in cpu_init_f, so we use entry 16 for SRIO2. */ +#ifndef CONFIG_SPL_BUILD #ifdef CONFIG_SYS_SRIO1_MEM_PHYS /* *I*G* - SRIO1 */ SET_TLB_ENTRY(1, CONFIG_SYS_SRIO1_MEM_VIRT, CONFIG_SYS_SRIO1_MEM_PHYS, @@ -140,6 +143,13 @@ struct fsl_e_tlb_entry tlb_table[] = { MAS3_SX|MAS3_SW|MAS3_SR, MAS2_G, 0, 17, BOOKE_PAGESZ_1M, 1), #endif +#endif + +#if defined(CONFIG_RAMBOOT_PBL) && !defined(CONFIG_SPL_BUILD) + SET_TLB_ENTRY(1, CONFIG_SYS_DDR_SDRAM_BASE, CONFIG_SYS_DDR_SDRAM_BASE, + MAS3_SX|MAS3_SW|MAS3_SR, 0, + 0, 17, BOOKE_PAGESZ_2G, 1) +#endif }; int num_tlb_entries = ARRAY_SIZE(tlb_table); diff --git a/boards.cfg b/boards.cfg index 03be0a6ba3e..c01f1917fdf 100644 --- a/boards.cfg +++ b/boards.cfg @@ -741,11 +741,11 @@ Active powerpc mpc85xx - - sbc8548 Active powerpc mpc85xx - - socrates socrates - - Active powerpc mpc85xx - exmeritus hww1u1a HWW1U1A - Kyle Moffett Active powerpc mpc85xx - freescale b4860qds B4420QDS B4860QDS:PPC_B4420 - -Active powerpc mpc85xx - freescale b4860qds B4420QDS_NAND B4860QDS:PPC_B4420,RAMBOOT_PBL,NAND,SYS_TEXT_BASE=0xFFF40000 - +Active powerpc mpc85xx - freescale b4860qds B4420QDS_NAND B4860QDS:PPC_B4420,RAMBOOT_PBL,SPL_FSL_PBL,NAND - Active powerpc mpc85xx - freescale b4860qds B4420QDS_SPIFLASH B4860QDS:PPC_B4420,RAMBOOT_PBL,SPIFLASH,SYS_TEXT_BASE=0xFFF40000 - Active powerpc mpc85xx - freescale b4860qds B4860QDS B4860QDS:PPC_B4860 - Active powerpc mpc85xx - freescale b4860qds B4860QDS_SECURE_BOOT B4860QDS:PPC_B4860,SECURE_BOOT Aneesh Bansal -Active powerpc mpc85xx - freescale b4860qds B4860QDS_NAND B4860QDS:PPC_B4860,RAMBOOT_PBL,NAND,SYS_TEXT_BASE=0xFFF40000 - +Active powerpc mpc85xx - freescale b4860qds B4860QDS_NAND B4860QDS:PPC_B4860,RAMBOOT_PBL,SPL_FSL_PBL,NAND Active powerpc mpc85xx - freescale b4860qds B4860QDS_SPIFLASH B4860QDS:PPC_B4860,RAMBOOT_PBL,SPIFLASH,SYS_TEXT_BASE=0xFFF40000 - Active powerpc mpc85xx - freescale b4860qds B4860QDS_SRIO_PCIE_BOOT B4860QDS:PPC_B4860,SRIO_PCIE_BOOT_SLAVE,SYS_TEXT_BASE=0xFFF40000 - Active powerpc mpc85xx - freescale bsc9131rdb BSC9131RDB_NAND BSC9131RDB:BSC9131RDB,NAND Poonam Aggrwal diff --git a/doc/README.b4860qds b/doc/README.b4860qds index 3da77d9f0f8..eada0c7dd89 100644 --- a/doc/README.b4860qds +++ b/doc/README.b4860qds @@ -328,3 +328,39 @@ The below commands apply to both B4860QDS and B4420QDS. On Linux the interfaces are renamed as: . eth2 -> fm1-gb2 . eth3 -> fm1-gb3 + +NAND boot with 2 Stage boot loader +---------------------------------- +PBL initialise the internal SRAM and copy SPL(160KB) in SRAM. +SPL further initialise DDR using SPD and environment variables and copy +u-boot(768 KB) from flash to DDR. +Finally SPL transer control to u-boot for futher booting. + +SPL has following features: + - Executes within 256K + - No relocation required + + Run time view of SPL framework during boot :- + ----------------------------------------------- + Area | Address | +----------------------------------------------- + Secure boot | 0xFFFC0000 (32KB) | + headers | | + ----------------------------------------------- + GD, BD | 0xFFFC8000 (4KB) | + ----------------------------------------------- + ENV | 0xFFFC9000 (8KB) | + ----------------------------------------------- + HEAP | 0xFFFCB000 (30KB) | + ----------------------------------------------- + STACK | 0xFFFD8000 (22KB) | + ----------------------------------------------- + U-boot SPL | 0xFFFD8000 (160KB) | + ----------------------------------------------- + +NAND Flash memory Map on B4860 and B4420QDS +------------------------------------------ + Start End Definition Size +0x000000 0x0FFFFF u-boot 1MB +0x140000 0x15FFFF u-boot env 128KB +0x1A0000 0x1BFFFF FMAN Ucode 128KB diff --git a/include/configs/B4860QDS.h b/include/configs/B4860QDS.h index b9ec9573db0..0831a98a74f 100644 --- a/include/configs/B4860QDS.h +++ b/include/configs/B4860QDS.h @@ -14,10 +14,43 @@ #define CONFIG_PHYS_64BIT #ifdef CONFIG_RAMBOOT_PBL +#define CONFIG_SYS_FSL_PBL_PBI $(SRCTREE)/board/freescale/b4860qds/b4_pbi.cfg +#define CONFIG_SYS_FSL_PBL_RCW $(SRCTREE)/board/freescale/b4860qds/b4_rcw.cfg +#ifndef CONFIG_NAND #define CONFIG_RAMBOOT_TEXT_BASE CONFIG_SYS_TEXT_BASE #define CONFIG_RESET_VECTOR_ADDRESS 0xfffffffc -#define CONFIG_SYS_FSL_PBL_PBI board/freescale/b4860qds/b4_pbi.cfg -#define CONFIG_SYS_FSL_PBL_RCW board/freescale/b4860qds/b4_rcw.cfg +#else +#define CONFIG_SPL +#define CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT +#define CONFIG_SPL_ENV_SUPPORT +#define CONFIG_SPL_SERIAL_SUPPORT +#define CONFIG_SPL_FLUSH_IMAGE +#define CONFIG_SPL_TARGET "u-boot-with-spl.bin" +#define CONFIG_SPL_LIBGENERIC_SUPPORT +#define CONFIG_SPL_LIBCOMMON_SUPPORT +#define CONFIG_SPL_I2C_SUPPORT +#define CONFIG_SPL_DRIVERS_MISC_SUPPORT +#define CONFIG_FSL_LAW /* Use common FSL init code */ +#define CONFIG_SYS_TEXT_BASE 0x00201000 +#define CONFIG_SPL_TEXT_BASE 0xFFFD8000 +#define CONFIG_SPL_PAD_TO 0x40000 +#define CONFIG_SPL_MAX_SIZE 0x28000 +#define RESET_VECTOR_OFFSET 0x27FFC +#define BOOT_PAGE_OFFSET 0x27000 +#define CONFIG_SPL_NAND_SUPPORT +#define CONFIG_SYS_NAND_U_BOOT_SIZE (768 << 10) +#define CONFIG_SYS_NAND_U_BOOT_DST 0x00200000 +#define CONFIG_SYS_NAND_U_BOOT_START 0x00200000 +#define CONFIG_SYS_NAND_U_BOOT_OFFS (256 << 10) +#define CONFIG_SYS_LDSCRIPT "arch/powerpc/cpu/mpc85xx/u-boot-nand.lds" +#define CONFIG_SPL_NAND_BOOT +#ifdef CONFIG_SPL_BUILD +#define CONFIG_SPL_SKIP_RELOCATE +#define CONFIG_SPL_COMMON_INIT_DDR +#define CONFIG_SYS_CCSR_DO_NOT_RELOCATE +#define CONFIG_SYS_NO_FLASH +#endif +#endif #endif #ifdef CONFIG_SRIO_PCIE_BOOT_SLAVE @@ -113,8 +146,8 @@ #elif defined(CONFIG_NAND) #define CONFIG_SYS_EXTRA_ENV_RELOC #define CONFIG_ENV_IS_IN_NAND -#define CONFIG_ENV_SIZE CONFIG_SYS_NAND_BLOCK_SIZE -#define CONFIG_ENV_OFFSET (7 * CONFIG_SYS_NAND_BLOCK_SIZE) +#define CONFIG_ENV_SIZE 0x2000 +#define CONFIG_ENV_OFFSET (10 * CONFIG_SYS_NAND_BLOCK_SIZE) #elif defined(CONFIG_SRIO_PCIE_BOOT_SLAVE) #define CONFIG_ENV_IS_IN_REMOTE #define CONFIG_ENV_ADDR 0xffe20000 @@ -164,7 +197,16 @@ unsigned long get_board_ddr_clk(void); /* * Config the L3 Cache as L3 SRAM */ -#define CONFIG_SYS_INIT_L3_ADDR CONFIG_RAMBOOT_TEXT_BASE +#define CONFIG_SYS_INIT_L3_ADDR 0xFFFC0000 +#define CONFIG_SYS_L3_SIZE 256 << 10 +#define CONFIG_SPL_GD_ADDR (CONFIG_SYS_INIT_L3_ADDR + 32 * 1024) +#ifdef CONFIG_NAND +#define CONFIG_ENV_ADDR (CONFIG_SPL_GD_ADDR + 4 * 1024) +#endif +#define CONFIG_SPL_RELOC_MALLOC_ADDR (CONFIG_SPL_GD_ADDR + 12 * 1024) +#define CONFIG_SPL_RELOC_MALLOC_SIZE (30 << 10) +#define CONFIG_SPL_RELOC_STACK (CONFIG_SPL_GD_ADDR + 64 * 1024) +#define CONFIG_SPL_RELOC_STACK_SIZE (22 << 10) #ifdef CONFIG_PHYS_64BIT #define CONFIG_SYS_DCSRBAR 0xf0000000 @@ -193,7 +235,9 @@ unsigned long get_board_ddr_clk(void); #define CONFIG_DDR_SPD #define CONFIG_SYS_DDR_RAW_TIMING #define CONFIG_SYS_FSL_DDR3 +#ifndef CONFIG_SPL_BUILD #define CONFIG_FSL_DDR_INTERACTIVE +#endif #define CONFIG_SYS_SPD_BUS_NUM 0 #define SPD_EEPROM_ADDRESS1 0x51 @@ -381,7 +425,11 @@ unsigned long get_board_ddr_clk(void); #define CONFIG_SYS_CS1_FTIM2 CONFIG_SYS_NOR_FTIM2 #define CONFIG_SYS_CS1_FTIM3 CONFIG_SYS_NOR_FTIM3 -#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE +#ifdef CONFIG_SPL_BUILD +#define CONFIG_SYS_MONITOR_BASE CONFIG_SPL_TEXT_BASE +#else +#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE /* start of monitor */ +#endif #if defined(CONFIG_RAMBOOT_PBL) #define CONFIG_SYS_RAMBOOT @@ -435,7 +483,9 @@ unsigned long get_board_ddr_clk(void); #define CONFIG_SYS_NS16550_COM3 (CONFIG_SYS_CCSRBAR+0x11D500) #define CONFIG_SYS_NS16550_COM4 (CONFIG_SYS_CCSRBAR+0x11D600) #define CONFIG_SERIAL_MULTI /* Enable both serial ports */ +#ifndef CONFIG_SPL_BUILD #define CONFIG_SYS_CONSOLE_IS_IN_ENV /* determine from environment */ +#endif /* Use the HUSH parser */ @@ -607,7 +657,7 @@ unsigned long get_board_ddr_clk(void); #define CONFIG_SYS_FMAN_FW_ADDR (512 * 1130) #elif defined(CONFIG_NAND) #define CONFIG_SYS_QE_FMAN_FW_IN_NAND -#define CONFIG_SYS_FMAN_FW_ADDR (8 * CONFIG_SYS_NAND_BLOCK_SIZE) +#define CONFIG_SYS_FMAN_FW_ADDR (13 * CONFIG_SYS_NAND_BLOCK_SIZE) #elif defined(CONFIG_SRIO_PCIE_BOOT_SLAVE) /* * Slave has no ucode locally, it can fetch this from remote. When implementing -- cgit v1.2.3 From 18c0144542a73a735ab55f0f51e4a5a255e92c1a Mon Sep 17 00:00:00 2001 From: Prabhakar Kushwaha Date: Tue, 8 Apr 2014 19:13:56 +0530 Subject: board/t104xrdb: Add support of NAND, SD, SPI boot for T104xRDB Add support of 2 stage NAND, SD, SPI boot loader using SPL framework. here, PBL initialise the internal SRAM and copy SPL(160KB). This further initialise DDR using SPD and environment and copy u-boot(768 KB) from NAND to DDR. Finally SPL transer control to u-boot. Initialise/create followings required for SPL framework - Add spl.c which defines board_init_f, board_init_r - update tlb and ddr accordingly Signed-off-by: Prabhakar Kushwaha Reviewed-by: York Sun --- board/freescale/t104xrdb/Makefile | 7 +- board/freescale/t104xrdb/README | 73 +++++++++++++++++++ board/freescale/t104xrdb/ddr.c | 5 +- board/freescale/t104xrdb/spl.c | 122 +++++++++++++++++++++++++++++++ board/freescale/t104xrdb/t1040_rcw.cfg | 7 ++ board/freescale/t104xrdb/t1042_rcw.cfg | 7 ++ board/freescale/t104xrdb/t104x_pbi.cfg | 26 +++++++ board/freescale/t104xrdb/tlb.c | 12 ++++ boards.cfg | 6 ++ include/configs/T104xRDB.h | 126 ++++++++++++++++++++++++++++----- 10 files changed, 371 insertions(+), 20 deletions(-) create mode 100644 board/freescale/t104xrdb/spl.c create mode 100644 board/freescale/t104xrdb/t1040_rcw.cfg create mode 100644 board/freescale/t104xrdb/t1042_rcw.cfg create mode 100644 board/freescale/t104xrdb/t104x_pbi.cfg (limited to 'board') diff --git a/board/freescale/t104xrdb/Makefile b/board/freescale/t104xrdb/Makefile index 7e7bfb1c5bd..6cd304cce91 100644 --- a/board/freescale/t104xrdb/Makefile +++ b/board/freescale/t104xrdb/Makefile @@ -4,11 +4,14 @@ # SPDX-License-Identifier: GPL-2.0+ # - +ifdef CONFIG_SPL_BUILD +obj-y += spl.o +else obj-y += t104xrdb.o obj-y += cpld.o -obj-y += ddr.o obj-y += eth.o obj-$(CONFIG_PCI) += pci.o +endif +obj-y += ddr.o obj-y += law.o obj-y += tlb.o diff --git a/board/freescale/t104xrdb/README b/board/freescale/t104xrdb/README index 1da52bb0b00..cdbe1fafd9a 100644 --- a/board/freescale/t104xrdb/README +++ b/board/freescale/t104xrdb/README @@ -198,3 +198,76 @@ The below commands apply to the board 2.To change from vbank4 to vbank0 => qixis reset (it will boot using vbank0) + +NAND boot with 2 Stage boot loader +---------------------------------- +PBL initialise the internal SRAM and copy SPL(160KB) in SRAM. +SPL further initialise DDR using SPD and environment variables and copy +u-boot(768 KB) from flash to DDR. +Finally SPL transer control to u-boot for futher booting. + +SPL has following features: + - Executes within 256K + - No relocation required + + Run time view of SPL framework during boot :- + ----------------------------------------------- + Area | Address | +----------------------------------------------- + Secure boot | 0xFFFC0000 (32KB) | + headers | | + ----------------------------------------------- + GD, BD | 0xFFFC8000 (4KB) | + ----------------------------------------------- + ENV | 0xFFFC9000 (8KB) | + ----------------------------------------------- + HEAP | 0xFFFCB000 (30KB) | + ----------------------------------------------- + STACK | 0xFFFD8000 (22KB) | + ----------------------------------------------- + U-boot SPL | 0xFFFD8000 (160KB) | + ----------------------------------------------- + +NAND Flash memory Map on T104xRDB +------------------------------------------ + Start End Definition Size +0x000000 0x0FFFFF u-boot 1MB +0x180000 0x19FFFF u-boot env 128KB +0x280000 0x29FFFF FMAN Ucode 128KB +0x380000 0x39FFFF QE Firmware 128KB + +SD Card memory Map on T104xRDB +------------------------------------------ + Block #blocks Definition Size +0x008 2048 u-boot 1MB +0x800 0024 u-boot env 8KB +0x820 0256 FMAN Ucode 128KB +0x920 0256 QE Firmware 128KB + +SPI Flash memory Map on T104xRDB +------------------------------------------ + Start End Definition Size +0x000000 0x0FFFFF u-boot 1MB +0x100000 0x101FFF u-boot env 8KB +0x110000 0x12FFFF FMAN Ucode 128KB +0x130000 0x14FFFF QE Firmware 128KB + +Please note QE Firmware is only valid for T1040RDB + + +Switch Settings: (ON is 0, OFF is 1) +=============== +NAND boot SW setting: +SW1: 10001000 +SW2: 00111001 +SW3: 11110001 + +SPI boot SW setting: +SW1: 00100010 +SW2: 10111001 +SW3: 11100001 + +SD boot SW setting: +SW1: 00100000 +SW2: 00111001 +SW3: 11100001 diff --git a/board/freescale/t104xrdb/ddr.c b/board/freescale/t104xrdb/ddr.c index 57d0f9cfd86..34c9224adb6 100644 --- a/board/freescale/t104xrdb/ddr.c +++ b/board/freescale/t104xrdb/ddr.c @@ -113,6 +113,7 @@ phys_size_t initdram(int board_type) { phys_size_t dram_size; +#if defined(CONFIG_SPL_BUILD) || !defined(CONFIG_RAMBOOT_PBL) puts("Initializing....using SPD\n"); dram_size = fsl_ddr_sdram(); @@ -120,6 +121,8 @@ phys_size_t initdram(int board_type) dram_size = setup_ddr_tlbs(dram_size / 0x100000); dram_size *= 0x100000; - puts(" DDR: "); +#else + dram_size = fsl_ddr_sdram_size(); +#endif return dram_size; } diff --git a/board/freescale/t104xrdb/spl.c b/board/freescale/t104xrdb/spl.c new file mode 100644 index 00000000000..c628c95f2d2 --- /dev/null +++ b/board/freescale/t104xrdb/spl.c @@ -0,0 +1,122 @@ +/* Copyright 2013 Freescale Semiconductor, Inc. + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +DECLARE_GLOBAL_DATA_PTR; + +phys_size_t get_effective_memsize(void) +{ + return CONFIG_SYS_L3_SIZE; +} + +unsigned long get_board_sys_clk(void) +{ + return CONFIG_SYS_CLK_FREQ; +} + +unsigned long get_board_ddr_clk(void) +{ + return CONFIG_DDR_CLK_FREQ; +} + +#define FSL_CORENET_CCSR_PORSR1_RCW_MASK 0xFF800000 +void board_init_f(ulong bootflag) +{ + u32 plat_ratio, sys_clk, uart_clk; +#ifdef CONFIG_SPL_NAND_BOOT + u32 porsr1, pinctl; +#endif + ccsr_gur_t *gur = (void *)CONFIG_SYS_MPC85xx_GUTS_ADDR; + +#ifdef CONFIG_SPL_NAND_BOOT + /* + * There is T1040 SoC issue where NOR, FPGA are inaccessible during + * NAND boot because IFC signals > IFC_AD7 are not enabled. + * This workaround changes RCW source to make all signals enabled. + */ + porsr1 = in_be32(&gur->porsr1); + pinctl = ((porsr1 & ~(FSL_CORENET_CCSR_PORSR1_RCW_MASK)) | 0x24800000); + out_be32((unsigned int *)(CONFIG_SYS_DCSRBAR + 0x20000), pinctl); +#endif + + /* Memcpy existing GD at CONFIG_SPL_GD_ADDR */ + memcpy((void *)CONFIG_SPL_GD_ADDR, (void *)gd, sizeof(gd_t)); + + /* Update GD pointer */ + gd = (gd_t *)(CONFIG_SPL_GD_ADDR); + + /* compiler optimization barrier needed for GCC >= 3.4 */ + __asm__ __volatile__("" : : : "memory"); + + console_init_f(); + + /* initialize selected port with appropriate baud rate */ + sys_clk = get_board_sys_clk(); + plat_ratio = (in_be32(&gur->rcwsr[0]) >> 25) & 0x1f; + uart_clk = sys_clk * plat_ratio / 2; + + NS16550_init((NS16550_t)CONFIG_SYS_NS16550_COM1, + uart_clk / 16 / CONFIG_BAUDRATE); + + relocate_code(CONFIG_SPL_RELOC_STACK, (gd_t *)CONFIG_SPL_GD_ADDR, 0x0); +} + +void board_init_r(gd_t *gd, ulong dest_addr) +{ + bd_t *bd; + + bd = (bd_t *)(gd + sizeof(gd_t)); + memset(bd, 0, sizeof(bd_t)); + gd->bd = bd; + bd->bi_memstart = CONFIG_SYS_INIT_L3_ADDR; + bd->bi_memsize = CONFIG_SYS_L3_SIZE; + + probecpu(); + get_clocks(); + mem_malloc_init(CONFIG_SPL_RELOC_MALLOC_ADDR, + CONFIG_SPL_RELOC_MALLOC_SIZE); + +#ifdef CONFIG_SPL_MMC_BOOT + mmc_initialize(bd); +#endif + + /* relocate environment function pointers etc. */ +#ifdef CONFIG_SPL_NAND_BOOT + nand_spl_load_image(CONFIG_ENV_OFFSET, CONFIG_ENV_SIZE, + (uchar *)CONFIG_ENV_ADDR); +#endif +#ifdef CONFIG_SPL_MMC_BOOT + mmc_spl_load_image(CONFIG_ENV_OFFSET, CONFIG_ENV_SIZE, + (uchar *)CONFIG_ENV_ADDR); +#endif +#ifdef CONFIG_SPL_SPI_BOOT + spi_spl_load_image(CONFIG_ENV_OFFSET, CONFIG_ENV_SIZE, + (uchar *)CONFIG_ENV_ADDR); +#endif + gd->env_addr = (ulong)(CONFIG_ENV_ADDR); + gd->env_valid = 1; + + i2c_init_all(); + + puts("\n\n"); + + gd->ram_size = initdram(0); + +#ifdef CONFIG_SPL_MMC_BOOT + mmc_boot(); +#elif defined(CONFIG_SPL_SPI_BOOT) + spi_boot(); +#elif defined(CONFIG_SPL_NAND_BOOT) + nand_boot(); +#endif +} diff --git a/board/freescale/t104xrdb/t1040_rcw.cfg b/board/freescale/t104xrdb/t1040_rcw.cfg new file mode 100644 index 00000000000..3300c184a1a --- /dev/null +++ b/board/freescale/t104xrdb/t1040_rcw.cfg @@ -0,0 +1,7 @@ +#PBL preamble and RCW header +aa55aa55 010e0100 +# serdes protocol 0x66 +0c18000e 0e000000 00000000 00000000 +66000002 80000002 e8106000 01000000 +00000000 00000000 00000000 00032810 +00000000 0342500f 00000000 00000000 diff --git a/board/freescale/t104xrdb/t1042_rcw.cfg b/board/freescale/t104xrdb/t1042_rcw.cfg new file mode 100644 index 00000000000..a3ea8ada56c --- /dev/null +++ b/board/freescale/t104xrdb/t1042_rcw.cfg @@ -0,0 +1,7 @@ +#PBL preamble and RCW header +aa55aa55 010e0100 +# serdes protocol 0x66 +0c18000e 0e000000 00000000 00000000 +06000002 00400002 e8106000 01000000 +00000000 00000000 00000000 00030810 +00000000 01fe0a06 00000000 00000000 diff --git a/board/freescale/t104xrdb/t104x_pbi.cfg b/board/freescale/t104xrdb/t104x_pbi.cfg new file mode 100644 index 00000000000..7b9e9b05f70 --- /dev/null +++ b/board/freescale/t104xrdb/t104x_pbi.cfg @@ -0,0 +1,26 @@ +#PBI commands +#Initialize CPC1 +09010000 00200400 +09138000 00000000 +091380c0 00000100 +#Configure CPC1 as 256KB SRAM +09010100 00000000 +09010104 fffc0007 +09010f00 08000000 +09010000 80000000 +#Configure LAW for CPC1 +09000cd0 00000000 +09000cd4 fffc0000 +09000cd8 81000011 +#Configure alternate space +09000010 00000000 +09000014 ff000000 +09000018 81000000 +#Configure SPI controller +09110000 80000403 +09110020 2d170008 +09110024 00100008 +09110028 00100008 +0911002c 00100008 +#Flush PBL data +091380c0 000FFFFF diff --git a/board/freescale/t104xrdb/tlb.c b/board/freescale/t104xrdb/tlb.c index 84f97a41e36..95c15aa5965 100644 --- a/board/freescale/t104xrdb/tlb.c +++ b/board/freescale/t104xrdb/tlb.c @@ -53,6 +53,7 @@ struct fsl_e_tlb_entry tlb_table[] = { MAS3_SX|MAS3_SR, MAS2_W|MAS2_G, 0, 2, BOOKE_PAGESZ_256M, 1), +#ifndef CONFIG_SPL_BUILD /* *I*G* - PCI */ SET_TLB_ENTRY(1, CONFIG_SYS_PCIE1_MEM_VIRT, CONFIG_SYS_PCIE1_MEM_PHYS, MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G, @@ -82,6 +83,7 @@ struct fsl_e_tlb_entry tlb_table[] = { MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G, 0, 8, BOOKE_PAGESZ_16M, 1), #endif +#endif #ifdef CONFIG_SYS_DCSRBAR_PHYS SET_TLB_ENTRY(1, CONFIG_SYS_DCSRBAR, CONFIG_SYS_DCSRBAR_PHYS, MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G, @@ -102,6 +104,16 @@ struct fsl_e_tlb_entry tlb_table[] = { MAS3_SW|MAS3_SR, MAS2_I|MAS2_G, 0, 11, BOOKE_PAGESZ_256K, 1), #endif + +#if defined(CONFIG_RAMBOOT_PBL) && !defined(CONFIG_SPL_BUILD) + SET_TLB_ENTRY(1, CONFIG_SYS_DDR_SDRAM_BASE, CONFIG_SYS_DDR_SDRAM_BASE, + MAS3_SX|MAS3_SW|MAS3_SR, 0, + 0, 12, BOOKE_PAGESZ_1G, 1), + SET_TLB_ENTRY(1, CONFIG_SYS_DDR_SDRAM_BASE + 0x40000000, + CONFIG_SYS_DDR_SDRAM_BASE + 0x40000000, + MAS3_SX|MAS3_SW|MAS3_SR, 0, + 0, 13, BOOKE_PAGESZ_1G, 1) +#endif }; int num_tlb_entries = ARRAY_SIZE(tlb_table); diff --git a/boards.cfg b/boards.cfg index c01f1917fdf..95d2ccea870 100644 --- a/boards.cfg +++ b/boards.cfg @@ -945,8 +945,14 @@ Active powerpc mpc85xx - freescale t1040qds Active powerpc mpc85xx - freescale t1040qds T1040QDS_D4 T1040QDS:PPC_T1040,SYS_FSL_DDR4 Poonam Aggrwal Active powerpc mpc85xx - freescale t1040qds T1040QDS_SECURE_BOOT T1040QDS:PPC_T1040,SECURE_BOOT Aneesh Bansal Active powerpc mpc85xx - freescale t104xrdb T1040RDB T104xRDB:PPC_T1040,T1040RDB Priyanka Jain +Active powerpc mpc85xx - freescale t104xrdb T1040RDB_NAND T104xRDB:PPC_T1040,T1040RDB,RAMBOOT_PBL,SPL_FSL_PBL,NAND Priyanka Jain +Active powerpc mpc85xx - freescale t104xrdb T1040RDB_SDCARD T104xRDB:PPC_T1040,T1040RDB,RAMBOOT_PBL,SPL_FSL_PBL,SDCARD Active powerpc mpc85xx - freescale t104xrdb T1040RDB_SECURE_BOOT T104xRDB:PPC_T1040,SECURE_BOOT,T1040RDB Aneesh Bansal +Active powerpc mpc85xx - freescale t104xrdb T1040RDB_SPIFLASH T104xRDB:PPC_T1040,T1040RDB,RAMBOOT_PBL,SPL_FSL_PBL,SPIFLASH Priyanka Jain Active powerpc mpc85xx - freescale t104xrdb T1042RDB_PI T104xRDB:PPC_T1042,T1042RDB_PI Priyanka Jain +Active powerpc mpc85xx - freescale t104xrdb T1042RDB_PI_NAND T104xRDB:PPC_T1042,T1042RDB_PI,RAMBOOT_PBL,SPL_FSL_PBL,NAND Priyanka Jain +Active powerpc mpc85xx - freescale t104xrdb T1042RDB_PI_SDCARD T104xRDB:PPC_T1042,T1042RDB_PI,RAMBOOT_PBL,SPL_FSL_PBL,SDCARD +Active powerpc mpc85xx - freescale t104xrdb T1042RDB_PI_SPIFLASH T104xRDB:PPC_T1042,T1042RDB_PI,RAMBOOT_PBL,SPL_FSL_PBL,SPIFLASH Priyanka Jain Active powerpc mpc85xx - freescale t208xqds T2080QDS T208xQDS:PPC_T2080 - Active powerpc mpc85xx - freescale t208xqds T2080QDS_SECURE_BOOT T208xQDS:PPC_T2080,SECURE_BOOT Aneesh Bansal Active powerpc mpc85xx - freescale t208xqds T2080QDS_NAND T208xQDS:PPC_T2080,RAMBOOT_PBL,NAND,SYS_TEXT_BASE=0xFFF40000 - diff --git a/include/configs/T104xRDB.h b/include/configs/T104xRDB.h index 8bbed7e7bf4..b3281d67d89 100644 --- a/include/configs/T104xRDB.h +++ b/include/configs/T104xRDB.h @@ -14,8 +14,79 @@ #define CONFIG_PHYS_64BIT #ifdef CONFIG_RAMBOOT_PBL -#define CONFIG_RAMBOOT_TEXT_BASE CONFIG_SYS_TEXT_BASE -#define CONFIG_RESET_VECTOR_ADDRESS 0xfffffffc +#define CONFIG_SYS_FSL_PBL_PBI $(SRCTREE)/board/freescale/t104xrdb/t104x_pbi.cfg +#ifdef CONFIG_T1040RDB +#define CONFIG_SYS_FSL_PBL_RCW $(SRCTREE)/board/freescale/t104xrdb/t1040_rcw.cfg +#endif +#ifdef CONFIG_T1042RDB_PI +#define CONFIG_SYS_FSL_PBL_RCW $(SRCTREE)/board/freescale/t104xrdb/t1042_rcw.cfg +#endif + +#define CONFIG_SPL +#define CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT +#define CONFIG_SPL_ENV_SUPPORT +#define CONFIG_SPL_SERIAL_SUPPORT +#define CONFIG_SPL_FLUSH_IMAGE +#define CONFIG_SPL_TARGET "u-boot-with-spl.bin" +#define CONFIG_SPL_LIBGENERIC_SUPPORT +#define CONFIG_SPL_LIBCOMMON_SUPPORT +#define CONFIG_SPL_I2C_SUPPORT +#define CONFIG_SPL_DRIVERS_MISC_SUPPORT +#define CONFIG_FSL_LAW /* Use common FSL init code */ +#define CONFIG_SYS_TEXT_BASE 0x00201000 +#define CONFIG_SPL_TEXT_BASE 0xFFFD8000 +#define CONFIG_SPL_PAD_TO 0x40000 +#define CONFIG_SPL_MAX_SIZE 0x28000 +#ifdef CONFIG_SPL_BUILD +#define CONFIG_SPL_SKIP_RELOCATE +#define CONFIG_SPL_COMMON_INIT_DDR +#define CONFIG_SYS_CCSR_DO_NOT_RELOCATE +#define CONFIG_SYS_NO_FLASH +#endif +#define RESET_VECTOR_OFFSET 0x27FFC +#define BOOT_PAGE_OFFSET 0x27000 + +#ifdef CONFIG_NAND +#define CONFIG_SPL_NAND_SUPPORT +#define CONFIG_SYS_NAND_U_BOOT_SIZE (768 << 10) +#define CONFIG_SYS_NAND_U_BOOT_DST 0x00200000 +#define CONFIG_SYS_NAND_U_BOOT_START 0x00200000 +#define CONFIG_SYS_NAND_U_BOOT_OFFS (256 << 10) +#define CONFIG_SYS_LDSCRIPT "arch/powerpc/cpu/mpc85xx/u-boot-nand.lds" +#define CONFIG_SPL_NAND_BOOT +#endif + +#ifdef CONFIG_SPIFLASH +#define CONFIG_RESET_VECTOR_ADDRESS 0x200FFC +#define CONFIG_SPL_SPI_SUPPORT +#define CONFIG_SPL_SPI_FLASH_SUPPORT +#define CONFIG_SPL_SPI_FLASH_MINIMAL +#define CONFIG_SYS_SPI_FLASH_U_BOOT_SIZE (768 << 10) +#define CONFIG_SYS_SPI_FLASH_U_BOOT_DST (0x00200000) +#define CONFIG_SYS_SPI_FLASH_U_BOOT_START (0x00200000) +#define CONFIG_SYS_SPI_FLASH_U_BOOT_OFFS (256 << 10) +#define CONFIG_SYS_LDSCRIPT "arch/powerpc/cpu/mpc85xx/u-boot.lds" +#ifndef CONFIG_SPL_BUILD +#define CONFIG_SYS_MPC85XX_NO_RESETVEC +#endif +#define CONFIG_SPL_SPI_BOOT +#endif + +#ifdef CONFIG_SDCARD +#define CONFIG_RESET_VECTOR_ADDRESS 0x200FFC +#define CONFIG_SPL_MMC_SUPPORT +#define CONFIG_SPL_MMC_MINIMAL +#define CONFIG_SYS_MMC_U_BOOT_SIZE (768 << 10) +#define CONFIG_SYS_MMC_U_BOOT_DST (0x00200000) +#define CONFIG_SYS_MMC_U_BOOT_START (0x00200000) +#define CONFIG_SYS_MMC_U_BOOT_OFFS (260 << 10) +#define CONFIG_SYS_LDSCRIPT "arch/powerpc/cpu/mpc85xx/u-boot.lds" +#ifndef CONFIG_SPL_BUILD +#define CONFIG_SYS_MPC85XX_NO_RESETVEC +#endif +#define CONFIG_SPL_MMC_BOOT +#endif + #endif /* High Level Configuration Options */ @@ -54,15 +125,12 @@ #define CONFIG_ENV_OVERWRITE -#ifdef CONFIG_SYS_NO_FLASH -#define CONFIG_ENV_IS_NOWHERE -#else +#ifndef CONFIG_SYS_NO_FLASH #define CONFIG_FLASH_CFI_DRIVER #define CONFIG_SYS_FLASH_CFI #define CONFIG_SYS_FLASH_USE_BUFFER_WRITE #endif -#ifndef CONFIG_SYS_NO_FLASH #if defined(CONFIG_SPIFLASH) #define CONFIG_SYS_EXTRA_ENV_RELOC #define CONFIG_ENV_IS_IN_SPI_FLASH @@ -74,11 +142,11 @@ #define CONFIG_ENV_IS_IN_MMC #define CONFIG_SYS_MMC_ENV_DEV 0 #define CONFIG_ENV_SIZE 0x2000 -#define CONFIG_ENV_OFFSET (512 * 1658) +#define CONFIG_ENV_OFFSET (512 * 0x800) #elif defined(CONFIG_NAND) #define CONFIG_SYS_EXTRA_ENV_RELOC #define CONFIG_ENV_IS_IN_NAND -#define CONFIG_ENV_SIZE CONFIG_SYS_NAND_BLOCK_SIZE +#define CONFIG_ENV_SIZE 0x2000 #define CONFIG_ENV_OFFSET (3 * CONFIG_SYS_NAND_BLOCK_SIZE) #else #define CONFIG_ENV_IS_IN_FLASH @@ -86,10 +154,6 @@ #define CONFIG_ENV_SIZE 0x2000 #define CONFIG_ENV_SECT_SIZE 0x20000 /* 128K (one sector) */ #endif -#else /* CONFIG_SYS_NO_FLASH */ -#define CONFIG_ENV_SIZE 0x2000 -#define CONFIG_ENV_SECT_SIZE 0x20000 /* 128K (one sector) */ -#endif #define CONFIG_SYS_CLK_FREQ 100000000 #define CONFIG_DDR_CLK_FREQ 66666666 @@ -121,6 +185,15 @@ * Config the L3 Cache as L3 SRAM */ #define CONFIG_SYS_INIT_L3_ADDR 0xFFFC0000 +#define CONFIG_SYS_L3_SIZE 256 << 10 +#define CONFIG_SPL_GD_ADDR (CONFIG_SYS_INIT_L3_ADDR + 32 * 1024) +#ifdef CONFIG_RAMBOOT_PBL +#define CONFIG_ENV_ADDR (CONFIG_SPL_GD_ADDR + 4 * 1024) +#endif +#define CONFIG_SPL_RELOC_MALLOC_ADDR (CONFIG_SPL_GD_ADDR + 12 * 1024) +#define CONFIG_SPL_RELOC_MALLOC_SIZE (30 << 10) +#define CONFIG_SPL_RELOC_STACK (CONFIG_SPL_GD_ADDR + 64 * 1024) +#define CONFIG_SPL_RELOC_STACK_SIZE (22 << 10) #define CONFIG_SYS_DCSRBAR 0xf0000000 #define CONFIG_SYS_DCSRBAR_PHYS 0xf00000000ull @@ -291,7 +364,11 @@ #define CONFIG_SYS_CS1_FTIM3 CONFIG_SYS_NAND_FTIM3 #endif -#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE +#ifdef CONFIG_SPL_BUILD +#define CONFIG_SYS_MONITOR_BASE CONFIG_SPL_TEXT_BASE +#else +#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE /* start of monitor */ +#endif #if defined(CONFIG_RAMBOOT_PBL) #define CONFIG_SYS_RAMBOOT @@ -339,7 +416,9 @@ #define CONFIG_SYS_NS16550_COM3 (CONFIG_SYS_CCSRBAR+0x11D500) #define CONFIG_SYS_NS16550_COM4 (CONFIG_SYS_CCSRBAR+0x11D600) #define CONFIG_SERIAL_MULTI /* Enable both serial ports */ +#ifndef CONFIG_SPL_BUILD #define CONFIG_SYS_CONSOLE_IS_IN_ENV /* determine from environment */ +#endif /* Use the HUSH parser */ #define CONFIG_SYS_HUSH_PARSER @@ -534,19 +613,32 @@ #elif defined(CONFIG_SDCARD) /* * PBL SD boot image should stored at 0x1000(8 blocks), the size of the image is - * about 825KB (1650 blocks), Env is stored after the image, and the env size is - * 0x2000 (16 blocks), 8 + 1650 + 16 = 1674, enlarge it to 1680. + * about 1MB (2048 blocks), Env is stored after the image, and the env size is + * 0x2000 (16 blocks), 8 + 2048 + 16 = 2072, enlarge it to 2080. */ #define CONFIG_SYS_QE_FMAN_FW_IN_MMC -#define CONFIG_SYS_FMAN_FW_ADDR (512 * 1680) +#define CONFIG_SYS_FMAN_FW_ADDR (512 * 0x820) #elif defined(CONFIG_NAND) #define CONFIG_SYS_QE_FMAN_FW_IN_NAND -#define CONFIG_SYS_FMAN_FW_ADDR (4 * CONFIG_SYS_NAND_BLOCK_SIZE) +#define CONFIG_SYS_FMAN_FW_ADDR (5 * CONFIG_SYS_NAND_BLOCK_SIZE) #else #define CONFIG_SYS_QE_FMAN_FW_IN_NOR #define CONFIG_SYS_FMAN_FW_ADDR 0xEFF00000 +#endif + +#ifdef CONFIG_T1040RDB +#if defined(CONFIG_SPIFLASH) +#define CONFIG_SYS_QE_FW_ADDR 0x130000 +#elif defined(CONFIG_SDCARD) +#define CONFIG_SYS_QE_FW_ADDR (512 * 0x920) +#elif defined(CONFIG_NAND) +#define CONFIG_SYS_QE_FW_ADDR (7 * CONFIG_SYS_NAND_BLOCK_SIZE) +#else #define CONFIG_SYS_QE_FW_ADDR 0xEFF10000 #endif +#endif + + #define CONFIG_SYS_QE_FMAN_FW_LENGTH 0x10000 #define CONFIG_SYS_FDT_PAD (0x3000 + CONFIG_SYS_QE_FMAN_FW_LENGTH) #endif /* CONFIG_NOBQFMAN */ -- cgit v1.2.3 From b0615f0bd22abc575824a0e20d1192913b77e282 Mon Sep 17 00:00:00 2001 From: Shaohui Xie Date: Fri, 11 Apr 2014 12:12:30 +0800 Subject: powerpc/t1040rdb: added a break in switch case There should be a break for case PHY_INTERFACE_MODE_SGMII, otherwise it will fall into case PHY_INTERFACE_MODE_RGMII. Signed-off-by: Shaohui Xie Reviewed-by: York Sun --- board/freescale/t104xrdb/eth.c | 1 + 1 file changed, 1 insertion(+) (limited to 'board') diff --git a/board/freescale/t104xrdb/eth.c b/board/freescale/t104xrdb/eth.c index 0188fd4090b..63e5f900da7 100644 --- a/board/freescale/t104xrdb/eth.c +++ b/board/freescale/t104xrdb/eth.c @@ -41,6 +41,7 @@ int board_eth_init(bd_t *bis) /* T1040RDB only supports SGMII on DTSEC3 */ fm_info_set_phy_address(FM1_DTSEC3, CONFIG_SYS_SGMII1_PHY_ADDR); + break; #endif case PHY_INTERFACE_MODE_RGMII: if (FM1_DTSEC4 == i) -- cgit v1.2.3 From b19e288f47ea7db98eefbebdda0fe0fad66d845c Mon Sep 17 00:00:00 2001 From: Shengzhou Liu Date: Fri, 18 Apr 2014 16:43:39 +0800 Subject: board/t208xqds: Add support of 2-stage NAND/SPI/SD boot Add support of 2-stage NAND/SPI/SD boot loader using SPL framework. PBL initializes the internal CPC-SRAM and copy SPL(160K) to it, SPL further initializes DDR using SPD and environment and copy u-boot(768 KB) from SPI/SD/NAND to DDR, finally SPL transfers control to u-boot. Signed-off-by: Shengzhou Liu [York Sun: fix boards.cfg for T2081QDS_SDCARD and _SPIFLASH] Reviewed-by: York Sun --- board/freescale/t208xqds/Makefile | 5 ++ board/freescale/t208xqds/ddr.c | 7 +- board/freescale/t208xqds/spl.c | 137 ++++++++++++++++++++++++++++++++++++++ board/freescale/t208xqds/tlb.c | 7 ++ boards.cfg | 12 ++-- include/configs/T208xQDS.h | 113 +++++++++++++++++++++++++------ 6 files changed, 253 insertions(+), 28 deletions(-) create mode 100644 board/freescale/t208xqds/spl.c (limited to 'board') diff --git a/board/freescale/t208xqds/Makefile b/board/freescale/t208xqds/Makefile index 947b7f73241..6cb72c9fd5d 100644 --- a/board/freescale/t208xqds/Makefile +++ b/board/freescale/t208xqds/Makefile @@ -4,11 +4,16 @@ # SPDX-License-Identifier: GPL-2.0+ # +ifdef CONFIG_SPL_BUILD +obj-y += spl.o +else obj-$(CONFIG_T2080QDS) += t208xqds.o obj-$(CONFIG_T2080QDS) += eth_t208xqds.o obj-$(CONFIG_T2081QDS) += t208xqds.o obj-$(CONFIG_T2081QDS) += eth_t208xqds.o obj-$(CONFIG_PCI) += pci.o +endif + obj-y += ddr.o obj-y += law.o obj-y += tlb.o diff --git a/board/freescale/t208xqds/ddr.c b/board/freescale/t208xqds/ddr.c index ed1334d9859..3348971b01e 100644 --- a/board/freescale/t208xqds/ddr.c +++ b/board/freescale/t208xqds/ddr.c @@ -107,13 +107,16 @@ phys_size_t initdram(int board_type) { phys_size_t dram_size; +#if defined(CONFIG_SPL_BUILD) || !defined(CONFIG_RAMBOOT_PBL) puts("Initializing....using SPD\n"); - dram_size = fsl_ddr_sdram(); dram_size = setup_ddr_tlbs(dram_size / 0x100000); dram_size *= 0x100000; +#else + /* DDR has been initialised by first stage boot loader */ + dram_size = fsl_ddr_sdram_size(); +#endif - puts(" DDR: "); return dram_size; } diff --git a/board/freescale/t208xqds/spl.c b/board/freescale/t208xqds/spl.c new file mode 100644 index 00000000000..a71c6171218 --- /dev/null +++ b/board/freescale/t208xqds/spl.c @@ -0,0 +1,137 @@ +/* Copyright 2013 Freescale Semiconductor, Inc. + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include "../common/qixis.h" +#include "t208xqds_qixis.h" + +DECLARE_GLOBAL_DATA_PTR; + +phys_size_t get_effective_memsize(void) +{ + return CONFIG_SYS_L3_SIZE; +} + +unsigned long get_board_sys_clk(void) +{ + u8 sysclk_conf = QIXIS_READ(brdcfg[1]); + + switch (sysclk_conf & 0x0F) { + case QIXIS_SYSCLK_83: + return 83333333; + case QIXIS_SYSCLK_100: + return 100000000; + case QIXIS_SYSCLK_125: + return 125000000; + case QIXIS_SYSCLK_133: + return 133333333; + case QIXIS_SYSCLK_150: + return 150000000; + case QIXIS_SYSCLK_160: + return 160000000; + case QIXIS_SYSCLK_166: + return 166666666; + } + return 66666666; +} + +unsigned long get_board_ddr_clk(void) +{ + u8 ddrclk_conf = QIXIS_READ(brdcfg[1]); + + switch ((ddrclk_conf & 0x30) >> 4) { + case QIXIS_DDRCLK_100: + return 100000000; + case QIXIS_DDRCLK_125: + return 125000000; + case QIXIS_DDRCLK_133: + return 133333333; + } + return 66666666; +} + +void board_init_f(ulong bootflag) +{ + u32 plat_ratio, sys_clk, ccb_clk; + ccsr_gur_t *gur = (void *)CONFIG_SYS_MPC85xx_GUTS_ADDR; + + /* Memcpy existing GD at CONFIG_SPL_GD_ADDR */ + memcpy((void *)CONFIG_SPL_GD_ADDR, (void *)gd, sizeof(gd_t)); + + /* Update GD pointer */ + gd = (gd_t *)(CONFIG_SPL_GD_ADDR); + + console_init_f(); + + /* initialize selected port with appropriate baud rate */ + sys_clk = get_board_sys_clk(); + plat_ratio = (in_be32(&gur->rcwsr[0]) >> 25) & 0x1f; + ccb_clk = sys_clk * plat_ratio / 2; + + NS16550_init((NS16550_t)CONFIG_SYS_NS16550_COM1, + ccb_clk / 16 / CONFIG_BAUDRATE); + +#if defined(CONFIG_SPL_MMC_BOOT) + puts("\nSD boot...\n"); +#elif defined(CONFIG_SPL_SPI_BOOT) + puts("\nSPI boot...\n"); +#elif defined(CONFIG_SPL_NAND_BOOT) + puts("\nNAND boot...\n"); +#endif + + relocate_code(CONFIG_SPL_RELOC_STACK, (gd_t *)CONFIG_SPL_GD_ADDR, 0x0); +} + +void board_init_r(gd_t *gd, ulong dest_addr) +{ + bd_t *bd; + + bd = (bd_t *)(gd + sizeof(gd_t)); + memset(bd, 0, sizeof(bd_t)); + gd->bd = bd; + bd->bi_memstart = CONFIG_SYS_INIT_L3_ADDR; + bd->bi_memsize = CONFIG_SYS_L3_SIZE; + + probecpu(); + get_clocks(); + mem_malloc_init(CONFIG_SPL_RELOC_MALLOC_ADDR, + CONFIG_SPL_RELOC_MALLOC_SIZE); + +#ifdef CONFIG_SPL_NAND_BOOT + nand_spl_load_image(CONFIG_ENV_OFFSET, CONFIG_ENV_SIZE, + (uchar *)CONFIG_ENV_ADDR); +#endif +#ifdef CONFIG_SPL_MMC_BOOT + mmc_initialize(bd); + mmc_spl_load_image(CONFIG_ENV_OFFSET, CONFIG_ENV_SIZE, + (uchar *)CONFIG_ENV_ADDR); +#endif +#ifdef CONFIG_SPL_SPI_BOOT + spi_spl_load_image(CONFIG_ENV_OFFSET, CONFIG_ENV_SIZE, + (uchar *)CONFIG_ENV_ADDR); +#endif + + gd->env_addr = (ulong)(CONFIG_ENV_ADDR); + gd->env_valid = 1; + + i2c_init_all(); + + gd->ram_size = initdram(0); + +#ifdef CONFIG_SPL_MMC_BOOT + mmc_boot(); +#elif defined(CONFIG_SPL_SPI_BOOT) + spi_boot(); +#elif defined(CONFIG_SPL_NAND_BOOT) + nand_boot(); +#endif +} diff --git a/board/freescale/t208xqds/tlb.c b/board/freescale/t208xqds/tlb.c index 62cd11033ad..8d602989b2d 100644 --- a/board/freescale/t208xqds/tlb.c +++ b/board/freescale/t208xqds/tlb.c @@ -65,6 +65,7 @@ struct fsl_e_tlb_entry tlb_table[] = { MAS3_SX|MAS3_SR, MAS2_W|MAS2_G, 0, 2, BOOKE_PAGESZ_256M, 1), +#ifndef CONFIG_SPL_BUILD /* *I*G* - PCIe 1, 0x80000000 */ SET_TLB_ENTRY(1, CONFIG_SYS_PCIE1_MEM_VIRT, CONFIG_SYS_PCIE1_MEM_PHYS, MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G, @@ -110,6 +111,7 @@ struct fsl_e_tlb_entry tlb_table[] = { MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G, 0, 12, BOOKE_PAGESZ_16M, 1), #endif +#endif #ifdef CONFIG_SYS_DCSRBAR_PHYS SET_TLB_ENTRY(1, CONFIG_SYS_DCSRBAR, CONFIG_SYS_DCSRBAR_PHYS, MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G, @@ -141,6 +143,11 @@ struct fsl_e_tlb_entry tlb_table[] = { 0, 18, BOOKE_PAGESZ_1M, 1), #endif +#if defined(CONFIG_RAMBOOT_PBL) && !defined(CONFIG_SPL_BUILD) + SET_TLB_ENTRY(1, CONFIG_SYS_DDR_SDRAM_BASE, CONFIG_SYS_DDR_SDRAM_BASE, + MAS3_SX|MAS3_SW|MAS3_SR, 0, + 0, 19, BOOKE_PAGESZ_2G, 1) +#endif }; int num_tlb_entries = ARRAY_SIZE(tlb_table); diff --git a/boards.cfg b/boards.cfg index 95d2ccea870..92ad1e50cfd 100644 --- a/boards.cfg +++ b/boards.cfg @@ -955,14 +955,14 @@ Active powerpc mpc85xx - freescale t104xrdb Active powerpc mpc85xx - freescale t104xrdb T1042RDB_PI_SPIFLASH T104xRDB:PPC_T1042,T1042RDB_PI,RAMBOOT_PBL,SPL_FSL_PBL,SPIFLASH Priyanka Jain Active powerpc mpc85xx - freescale t208xqds T2080QDS T208xQDS:PPC_T2080 - Active powerpc mpc85xx - freescale t208xqds T2080QDS_SECURE_BOOT T208xQDS:PPC_T2080,SECURE_BOOT Aneesh Bansal -Active powerpc mpc85xx - freescale t208xqds T2080QDS_NAND T208xQDS:PPC_T2080,RAMBOOT_PBL,NAND,SYS_TEXT_BASE=0xFFF40000 - -Active powerpc mpc85xx - freescale t208xqds T2080QDS_SDCARD T208xQDS:PPC_T2080,RAMBOOT_PBL,SDCARD,SYS_TEXT_BASE=0xFFF40000 - -Active powerpc mpc85xx - freescale t208xqds T2080QDS_SPIFLASH T208xQDS:PPC_T2080,RAMBOOT_PBL,SPIFLASH,SYS_TEXT_BASE=0xFFF40000 - +Active powerpc mpc85xx - freescale t208xqds T2080QDS_NAND T208xQDS:PPC_T2080,RAMBOOT_PBL,SPL_FSL_PBL,NAND +Active powerpc mpc85xx - freescale t208xqds T2080QDS_SDCARD T208xQDS:PPC_T2080,RAMBOOT_PBL,SPL_FSL_PBL,SDCARD +Active powerpc mpc85xx - freescale t208xqds T2080QDS_SPIFLASH T208xQDS:PPC_T2080,RAMBOOT_PBL,SPL_FSL_PBL,SPIFLASH Active powerpc mpc85xx - freescale t208xqds T2080QDS_SRIO_PCIE_BOOT T208xQDS:PPC_T2080,SRIO_PCIE_BOOT_SLAVE,SYS_TEXT_BASE=0xFFF40000 - Active powerpc mpc85xx - freescale t208xqds T2081QDS T208xQDS:PPC_T2081 - -Active powerpc mpc85xx - freescale t208xqds T2081QDS_NAND T208xQDS:PPC_T2081,RAMBOOT_PBL,NAND,SYS_TEXT_BASE=0xFFF40000 - -Active powerpc mpc85xx - freescale t208xqds T2081QDS_SDCARD T208xQDS:PPC_T2081,RAMBOOT_PBL,SDCARD,SYS_TEXT_BASE=0xFFF40000 - -Active powerpc mpc85xx - freescale t208xqds T2081QDS_SPIFLASH T208xQDS:PPC_T2081,RAMBOOT_PBL,SPIFLASH,SYS_TEXT_BASE=0xFFF40000 - +Active powerpc mpc85xx - freescale t208xqds T2081QDS_NAND T208xQDS:PPC_T2081,RAMBOOT_PBL,SPL_FSL_PBL,NAND +Active powerpc mpc85xx - freescale t208xqds T2081QDS_SDCARD T208xQDS:PPC_T2081,RAMBOOT_PBL,SPL_FSL_PBL,SDCARD - +Active powerpc mpc85xx - freescale t208xqds T2081QDS_SPIFLASH T208xQDS:PPC_T2081,RAMBOOT_PBL,SPL_FSL_PBL,SPIFLASH - Active powerpc mpc85xx - freescale t208xqds T2081QDS_SRIO_PCIE_BOOT T208xQDS:PPC_T2081,SRIO_PCIE_BOOT_SLAVE,SYS_TEXT_BASE=0xFFF40000 - Active powerpc mpc85xx - freescale t208xrdb T2080RDB T208xRDB:PPC_T2080 - Active powerpc mpc85xx - freescale t208xrdb T2080RDB_NAND T208xRDB:PPC_T2080,RAMBOOT_PBL,NAND,SYS_TEXT_BASE=0xFFF40000 - diff --git a/include/configs/T208xQDS.h b/include/configs/T208xQDS.h index fb3e04f9eee..8bf08430be6 100644 --- a/include/configs/T208xQDS.h +++ b/include/configs/T208xQDS.h @@ -46,15 +46,79 @@ #define CONFIG_ENV_OVERWRITE #ifdef CONFIG_RAMBOOT_PBL -#define CONFIG_RAMBOOT_TEXT_BASE CONFIG_SYS_TEXT_BASE -#define CONFIG_RESET_VECTOR_ADDRESS 0xfffffffc #define CONFIG_SYS_FSL_PBL_PBI board/freescale/t208xqds/t208x_pbi.cfg #if defined(CONFIG_PPC_T2080) #define CONFIG_SYS_FSL_PBL_RCW board/freescale/t208xqds/t2080_rcw.cfg #elif defined(CONFIG_PPC_T2081) #define CONFIG_SYS_FSL_PBL_RCW board/freescale/t208xqds/t2081_rcw.cfg #endif + +#define CONFIG_SPL +#define CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT +#define CONFIG_SPL_ENV_SUPPORT +#define CONFIG_SPL_SERIAL_SUPPORT +#define CONFIG_SPL_FLUSH_IMAGE +#define CONFIG_SPL_TARGET "u-boot-with-spl.bin" +#define CONFIG_SPL_LIBGENERIC_SUPPORT +#define CONFIG_SPL_LIBCOMMON_SUPPORT +#define CONFIG_SPL_I2C_SUPPORT +#define CONFIG_SPL_DRIVERS_MISC_SUPPORT +#define CONFIG_FSL_LAW /* Use common FSL init code */ +#define CONFIG_SYS_TEXT_BASE 0x00201000 +#define CONFIG_SPL_TEXT_BASE 0xFFFD8000 +#define CONFIG_SPL_PAD_TO 0x40000 +#define CONFIG_SPL_MAX_SIZE 0x28000 +#define RESET_VECTOR_OFFSET 0x27FFC +#define BOOT_PAGE_OFFSET 0x27000 +#ifdef CONFIG_SPL_BUILD +#define CONFIG_SPL_SKIP_RELOCATE +#define CONFIG_SPL_COMMON_INIT_DDR +#define CONFIG_SYS_CCSR_DO_NOT_RELOCATE +#define CONFIG_SYS_NO_FLASH +#endif + +#ifdef CONFIG_NAND +#define CONFIG_SPL_NAND_SUPPORT +#define CONFIG_SYS_NAND_U_BOOT_SIZE (768 << 10) +#define CONFIG_SYS_NAND_U_BOOT_DST 0x00200000 +#define CONFIG_SYS_NAND_U_BOOT_START 0x00200000 +#define CONFIG_SYS_NAND_U_BOOT_OFFS (256 << 10) +#define CONFIG_SYS_LDSCRIPT "arch/powerpc/cpu/mpc85xx/u-boot-nand.lds" +#define CONFIG_SPL_NAND_BOOT +#endif + +#ifdef CONFIG_SPIFLASH +#define CONFIG_RESET_VECTOR_ADDRESS 0x200FFC +#define CONFIG_SPL_SPI_SUPPORT +#define CONFIG_SPL_SPI_FLASH_SUPPORT +#define CONFIG_SPL_SPI_FLASH_MINIMAL +#define CONFIG_SYS_SPI_FLASH_U_BOOT_SIZE (768 << 10) +#define CONFIG_SYS_SPI_FLASH_U_BOOT_DST (0x00200000) +#define CONFIG_SYS_SPI_FLASH_U_BOOT_START (0x00200000) +#define CONFIG_SYS_SPI_FLASH_U_BOOT_OFFS (256 << 10) +#define CONFIG_SYS_LDSCRIPT "arch/powerpc/cpu/mpc85xx/u-boot.lds" +#ifndef CONFIG_SPL_BUILD +#define CONFIG_SYS_MPC85XX_NO_RESETVEC #endif +#define CONFIG_SPL_SPI_BOOT +#endif + +#ifdef CONFIG_SDCARD +#define CONFIG_RESET_VECTOR_ADDRESS 0x200FFC +#define CONFIG_SPL_MMC_SUPPORT +#define CONFIG_SPL_MMC_MINIMAL +#define CONFIG_SYS_MMC_U_BOOT_SIZE (768 << 10) +#define CONFIG_SYS_MMC_U_BOOT_DST (0x00200000) +#define CONFIG_SYS_MMC_U_BOOT_START (0x00200000) +#define CONFIG_SYS_MMC_U_BOOT_OFFS (260 << 10) +#define CONFIG_SYS_LDSCRIPT "arch/powerpc/cpu/mpc85xx/u-boot.lds" +#ifndef CONFIG_SPL_BUILD +#define CONFIG_SYS_MPC85XX_NO_RESETVEC +#endif +#define CONFIG_SPL_MMC_BOOT +#endif + +#endif /* CONFIG_RAMBOOT_PBL */ #define CONFIG_SRIO_PCIE_BOOT_MASTER #ifdef CONFIG_SRIO_PCIE_BOOT_SLAVE @@ -85,11 +149,7 @@ #define CONFIG_MEM_INIT_VALUE 0xdeadbeef #endif -#ifdef CONFIG_SYS_NO_FLASH -#if !defined(CONFIG_SRIO_PCIE_BOOT_SLAVE) && !defined(CONFIG_RAMBOOT_PBL) -#define CONFIG_ENV_IS_NOWHERE -#endif -#else +#ifndef CONFIG_SYS_NO_FLASH #define CONFIG_FLASH_CFI_DRIVER #define CONFIG_SYS_FLASH_CFI #define CONFIG_SYS_FLASH_USE_BUFFER_WRITE @@ -110,12 +170,12 @@ #define CONFIG_ENV_IS_IN_MMC #define CONFIG_SYS_MMC_ENV_DEV 0 #define CONFIG_ENV_SIZE 0x2000 -#define CONFIG_ENV_OFFSET (512 * 1658) +#define CONFIG_ENV_OFFSET (512 * 0x800) #elif defined(CONFIG_NAND) #define CONFIG_SYS_EXTRA_ENV_RELOC #define CONFIG_ENV_IS_IN_NAND -#define CONFIG_ENV_SIZE CONFIG_SYS_NAND_BLOCK_SIZE -#define CONFIG_ENV_OFFSET (7 * CONFIG_SYS_NAND_BLOCK_SIZE) +#define CONFIG_ENV_SIZE 0x2000 +#define CONFIG_ENV_OFFSET (10 * CONFIG_SYS_NAND_BLOCK_SIZE) #elif defined(CONFIG_SRIO_PCIE_BOOT_SLAVE) #define CONFIG_ENV_IS_IN_REMOTE #define CONFIG_ENV_ADDR 0xffe20000 @@ -140,7 +200,16 @@ unsigned long get_board_ddr_clk(void); /* * Config the L3 Cache as L3 SRAM */ -#define CONFIG_SYS_INIT_L3_ADDR CONFIG_RAMBOOT_TEXT_BASE +#define CONFIG_SYS_INIT_L3_ADDR 0xFFFC0000 +#define CONFIG_SYS_L3_SIZE (512 << 10) +#define CONFIG_SPL_GD_ADDR (CONFIG_SYS_INIT_L3_ADDR + 32 * 1024) +#ifdef CONFIG_RAMBOOT_PBL +#define CONFIG_ENV_ADDR (CONFIG_SPL_GD_ADDR + 4 * 1024) +#endif +#define CONFIG_SPL_RELOC_MALLOC_ADDR (CONFIG_SPL_GD_ADDR + 12 * 1024) +#define CONFIG_SPL_RELOC_MALLOC_SIZE (50 << 10) +#define CONFIG_SPL_RELOC_STACK (CONFIG_SPL_GD_ADDR + 64 * 1024) +#define CONFIG_SPL_RELOC_STACK_SIZE (22 << 10) #define CONFIG_SYS_DCSRBAR 0xf0000000 #define CONFIG_SYS_DCSRBAR_PHYS 0xf00000000ull @@ -345,7 +414,12 @@ unsigned long get_board_ddr_clk(void); #define CONFIG_SYS_RAMBOOT #endif -#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE +#ifdef CONFIG_SPL_BUILD +#define CONFIG_SYS_MONITOR_BASE CONFIG_SPL_TEXT_BASE +#else +#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE /* start of monitor */ +#endif + #define CONFIG_BOARD_EARLY_INIT_R /* call board_early_init_r function */ #define CONFIG_MISC_INIT_R #define CONFIG_HWCONFIG @@ -461,15 +535,14 @@ unsigned long get_board_ddr_clk(void); */ #ifdef CONFIG_SPI_FLASH #define CONFIG_FSL_ESPI -#define CONFIG_SPI_FLASH_SST #define CONFIG_SPI_FLASH_STMICRO -#if defined(CONFIG_T2080QDS) -#define CONFIG_SPI_FLASH_SPANSION -#elif defined(CONFIG_T2081QDS) +#if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_RAMBOOT_PBL) +#define CONFIG_SPI_FLASH_SST #define CONFIG_SPI_FLASH_EON #endif #define CONFIG_CMD_SF +#define CONFIG_SPI_FLASH_BAR #define CONFIG_SF_DEFAULT_SPEED 10000000 #define CONFIG_SF_DEFAULT_MODE 0 #endif @@ -564,14 +637,14 @@ unsigned long get_board_ddr_clk(void); #elif defined(CONFIG_SDCARD) /* * PBL SD boot image should stored at 0x1000(8 blocks), the size of the image is - * about 825KB (1650 blocks), Env is stored after the image, and the env size is - * 0x2000 (16 blocks), 8 + 1650 + 16 = 1674, enlarge it to 1680. + * about 1MB (2048 blocks), Env is stored after the image, and the env size is + * 0x2000 (16 blocks), 8 + 2048 + 16 = 2072, enlarge it to 2080. */ #define CONFIG_SYS_QE_FMAN_FW_IN_MMC -#define CONFIG_SYS_FMAN_FW_ADDR (512 * 1680) +#define CONFIG_SYS_FMAN_FW_ADDR (512 * 0x820) #elif defined(CONFIG_NAND) #define CONFIG_SYS_QE_FMAN_FW_IN_NAND -#define CONFIG_SYS_FMAN_FW_ADDR (8 * CONFIG_SYS_NAND_BLOCK_SIZE) +#define CONFIG_SYS_FMAN_FW_ADDR (11 * CONFIG_SYS_NAND_BLOCK_SIZE) #elif defined(CONFIG_SRIO_PCIE_BOOT_SLAVE) /* * Slave has no ucode locally, it can fetch this from remote. When implementing -- cgit v1.2.3 From 4d66668300439972abc4990f23fdea771f0830fd Mon Sep 17 00:00:00 2001 From: Shengzhou Liu Date: Fri, 18 Apr 2014 16:43:40 +0800 Subject: board/t208xrdb: Add support of 2-stage NAND/SPI/SD boot Add support of 2-stage NAND/SPI/SD boot loader using SPL framework. PBL initializes the internal CPC-SRAM and copy SPL(160K) to it, SPL further initializes DDR using SPD and environment and copy u-boot(768K) from SPI/SD/NAND to DDR, finally SPL transfers control to u-boot. Signed-off-by: Shengzhou Liu Reviewed-by: York Sun --- board/freescale/t208xrdb/Makefile | 5 ++ board/freescale/t208xrdb/README | 80 +++++++++++++++++++++++----- board/freescale/t208xrdb/ddr.c | 8 +-- board/freescale/t208xrdb/spl.c | 107 +++++++++++++++++++++++++++++++++++++ board/freescale/t208xrdb/tlb.c | 4 +- boards.cfg | 6 +-- include/configs/T208xRDB.h | 108 ++++++++++++++++++++++++++++++++------ 7 files changed, 282 insertions(+), 36 deletions(-) create mode 100644 board/freescale/t208xrdb/spl.c (limited to 'board') diff --git a/board/freescale/t208xrdb/Makefile b/board/freescale/t208xrdb/Makefile index 092c9ff0dce..9605f8b606c 100644 --- a/board/freescale/t208xrdb/Makefile +++ b/board/freescale/t208xrdb/Makefile @@ -4,10 +4,15 @@ # SPDX-License-Identifier: GPL-2.0+ # +ifdef CONFIG_SPL_BUILD +obj-y += spl.o +else obj-$(CONFIG_T2080RDB) += t208xrdb.o obj-$(CONFIG_T2080RDB) += eth_t208xrdb.o obj-$(CONFIG_T2080RDB) += cpld.o obj-$(CONFIG_PCI) += pci.o +endif + obj-y += ddr.o obj-y += law.o obj-y += tlb.o diff --git a/board/freescale/t208xrdb/README b/board/freescale/t208xrdb/README index 0012c6cb408..fe26de55c09 100644 --- a/board/freescale/t208xrdb/README +++ b/board/freescale/t208xrdb/README @@ -120,7 +120,7 @@ Start Address End Address Definition Max size 0xEBF00000 0xEBF1FFFF FMAN ucode (alt bank) 128KB 0xEBE00000 0xEBE3FFFF PHY CS4315 firmware (alt bank) 256KB 0xE9300000 0xEBEFFFFF rootfs (current bank) 44MB -0xE8800000 0xE88FFFFF Hardware device tree (cur bank) 11MB + 512KB +0xE8800000 0xE88FFFFF Hardware device tree (cur bank) 1MB 0xE8020000 0xE86FFFFF Linux.uImage (current bank) 7MB + 875KB 0xE8000000 0xE801FFFF RCW (current bank) 128KB @@ -146,7 +146,8 @@ Software configurations and board settings ------------------------------------------ 1. NOR boot: a. build NOR boot image - $ make T2080RDB + $ make T2080RDB_config + $ make b. program u-boot.bin image to NOR flash => tftp 1000000 u-boot.bin => pro off all;era eff40000 efffffff;cp.b 1000000 eff40000 $filesize @@ -164,9 +165,9 @@ Software configurations and board settings 2. NAND Boot: a. build PBL image for NAND boot $ make T2080RDB_NAND_config - $ make u-boot.pbl - b. program u-boot.pbl to NAND flash - => tftp 1000000 u-boot.pbl + $ make + b. program u-boot-with-spl-pbl.bin to NAND flash + => tftp 1000000 u-boot-with-spl-pbl.bin => nand erase 0 d0000 => nand write 1000000 0 $filesize set SW1[1:8] = '10000010', SW2[1] = '1', SW3[4] = '1' for NAND boot @@ -174,9 +175,9 @@ Software configurations and board settings 3. SPI Boot: a. build PBL image for SPI boot $ make T2080RDB_SPIFLASH_config - $ make u-boot.pbl - b. program u-boot.pbl to SPI flash - => tftp 1000000 u-boot.pbl + $ make + b. program u-boot-with-spl-pbl.bin to SPI flash + => tftp 1000000 u-boot-with-spl-pbl.bin => sf probe 0 => sf erase 0 d0000 => sf write 1000000 0 $filesize @@ -185,13 +186,68 @@ Software configurations and board settings 4. SD Boot: a. build PBL image for SD boot $ make T2080RDB_SDCARD_config - $ make u-boot.pbl - b. program u-boot.pbl to TF card - => tftp 1000000 u-boot.pbl - => mmc write 1000000 8 1650 + $ make + b. program u-boot-with-spl-pbl.bin to micro-SD/TF card + => tftp 1000000 u-boot-with-spl-pbl.bin + => mmc write 1000000 8 0x800 set SW1[1:8] = '00100000', SW2[1] = '0' for SD boot +2-stage NAND/SPI/SD boot loader +------------------------------- +PBL initializes the internal CPC-SRAM and copy SPL(160K) to SRAM. +SPL further initializes DDR using SPD and environment variables +and copy u-boot(768 KB) from NAND/SPI/SD device to DDR. +Finally SPL transers control to u-boot for futher booting. + +SPL has following features: + - Executes within 256K + - No relocation required + +Run time view of SPL framework +------------------------------------------------- +|Area | Address | +------------------------------------------------- +|SecureBoot header | 0xFFFC0000 (32KB) | +------------------------------------------------- +|GD, BD | 0xFFFC8000 (4KB) | +------------------------------------------------- +|ENV | 0xFFFC9000 (8KB) | +------------------------------------------------- +|HEAP | 0xFFFCB000 (50KB) | +------------------------------------------------- +|STACK | 0xFFFD8000 (22KB) | +------------------------------------------------- +|U-boot SPL | 0xFFFD8000 (160KB) | +------------------------------------------------- + +NAND Flash memory Map on T2080RDB +-------------------------------------------------------------- +Start End Definition Size +0x000000 0x0FFFFF u-boot img 1MB (2 blocks) +0x100000 0x17FFFF u-boot env 512KB (1 block) +0x180000 0x1FFFFF FMAN ucode 512KB (1 block) +0x200000 0x27FFFF CS4315 ucode 512KB (1 block) + + +Micro SD Card memory Map on T2080RDB +---------------------------------------------------- +Block #blocks Definition Size +0x008 2048 u-boot img 1MB +0x800 0016 u-boot env 8KB +0x820 0128 FMAN ucode 64KB +0x8a0 0512 CS4315 ucode 256KB + + +SPI Flash memory Map on T2080RDB +---------------------------------------------------- +Start End Definition Size +0x000000 0x0FFFFF u-boot img 1MB +0x100000 0x101FFF u-boot env 8KB +0x110000 0x11FFFF FMAN ucode 64KB +0x120000 0x15FFFF CS4315 ucode 256KB + + How to update the ucode of Cortina CS4315/CS4340 10G PHY -------------------------------------------------------- => tftp 1000000 CS4315-CS4340-PHY-ucode.txt diff --git a/board/freescale/t208xrdb/ddr.c b/board/freescale/t208xrdb/ddr.c index 01e917398f9..8a262762735 100644 --- a/board/freescale/t208xrdb/ddr.c +++ b/board/freescale/t208xrdb/ddr.c @@ -100,13 +100,15 @@ phys_size_t initdram(int board_type) { phys_size_t dram_size; +#if defined(CONFIG_SPL_BUILD) || !defined(CONFIG_RAMBOOT_PBL) puts("Initializing....using SPD\n"); - dram_size = fsl_ddr_sdram(); dram_size = setup_ddr_tlbs(dram_size / 0x100000); dram_size *= 0x100000; - - puts(" DDR: "); +#else + /* DDR has been initialised by first stage boot loader */ + dram_size = fsl_ddr_sdram_size(); +#endif return dram_size; } diff --git a/board/freescale/t208xrdb/spl.c b/board/freescale/t208xrdb/spl.c new file mode 100644 index 00000000000..9ae2b1e863f --- /dev/null +++ b/board/freescale/t208xrdb/spl.c @@ -0,0 +1,107 @@ +/* Copyright 2013 Freescale Semiconductor, Inc. + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +DECLARE_GLOBAL_DATA_PTR; + +phys_size_t get_effective_memsize(void) +{ + return CONFIG_SYS_L3_SIZE; +} + +unsigned long get_board_sys_clk(void) +{ + return CONFIG_SYS_CLK_FREQ; +} + +unsigned long get_board_ddr_clk(void) +{ + return CONFIG_DDR_CLK_FREQ; +} + +void board_init_f(ulong bootflag) +{ + u32 plat_ratio, sys_clk, ccb_clk; + ccsr_gur_t *gur = (void *)CONFIG_SYS_MPC85xx_GUTS_ADDR; + + /* Memcpy existing GD at CONFIG_SPL_GD_ADDR */ + memcpy((void *)CONFIG_SPL_GD_ADDR, (void *)gd, sizeof(gd_t)); + + /* Update GD pointer */ + gd = (gd_t *)(CONFIG_SPL_GD_ADDR); + + console_init_f(); + + /* initialize selected port with appropriate baud rate */ + sys_clk = get_board_sys_clk(); + plat_ratio = (in_be32(&gur->rcwsr[0]) >> 25) & 0x1f; + ccb_clk = sys_clk * plat_ratio / 2; + + NS16550_init((NS16550_t)CONFIG_SYS_NS16550_COM1, + ccb_clk / 16 / CONFIG_BAUDRATE); + +#if defined(CONFIG_SPL_MMC_BOOT) + puts("\nSD boot...\n"); +#elif defined(CONFIG_SPL_SPI_BOOT) + puts("\nSPI boot...\n"); +#elif defined(CONFIG_SPL_NAND_BOOT) + puts("\nNAND boot...\n"); +#endif + + relocate_code(CONFIG_SPL_RELOC_STACK, (gd_t *)CONFIG_SPL_GD_ADDR, 0x0); +} + +void board_init_r(gd_t *gd, ulong dest_addr) +{ + bd_t *bd; + + bd = (bd_t *)(gd + sizeof(gd_t)); + memset(bd, 0, sizeof(bd_t)); + gd->bd = bd; + bd->bi_memstart = CONFIG_SYS_INIT_L3_ADDR; + bd->bi_memsize = CONFIG_SYS_L3_SIZE; + + probecpu(); + get_clocks(); + mem_malloc_init(CONFIG_SPL_RELOC_MALLOC_ADDR, + CONFIG_SPL_RELOC_MALLOC_SIZE); + +#ifdef CONFIG_SPL_NAND_BOOT + nand_spl_load_image(CONFIG_ENV_OFFSET, CONFIG_ENV_SIZE, + (uchar *)CONFIG_ENV_ADDR); +#endif +#ifdef CONFIG_SPL_MMC_BOOT + mmc_initialize(bd); + mmc_spl_load_image(CONFIG_ENV_OFFSET, CONFIG_ENV_SIZE, + (uchar *)CONFIG_ENV_ADDR); +#endif +#ifdef CONFIG_SPL_SPI_BOOT + spi_spl_load_image(CONFIG_ENV_OFFSET, CONFIG_ENV_SIZE, + (uchar *)CONFIG_ENV_ADDR); +#endif + + gd->env_addr = (ulong)(CONFIG_ENV_ADDR); + gd->env_valid = 1; + + i2c_init_all(); + + gd->ram_size = initdram(0); + +#ifdef CONFIG_SPL_MMC_BOOT + mmc_boot(); +#elif defined(CONFIG_SPL_SPI_BOOT) + spi_boot(); +#elif defined(CONFIG_SPL_NAND_BOOT) + nand_boot(); +#endif +} diff --git a/board/freescale/t208xrdb/tlb.c b/board/freescale/t208xrdb/tlb.c index 085d9f5c6a9..2ebea36a5c2 100644 --- a/board/freescale/t208xrdb/tlb.c +++ b/board/freescale/t208xrdb/tlb.c @@ -65,6 +65,7 @@ struct fsl_e_tlb_entry tlb_table[] = { MAS3_SX|MAS3_SR, MAS2_W|MAS2_G, 0, 2, BOOKE_PAGESZ_256M, 1), +#ifndef CONFIG_SPL_BUILD /* *I*G* - PCIe 1, 0x80000000 */ SET_TLB_ENTRY(1, CONFIG_SYS_PCIE1_MEM_VIRT, CONFIG_SYS_PCIE1_MEM_PHYS, MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G, @@ -110,6 +111,7 @@ struct fsl_e_tlb_entry tlb_table[] = { MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G, 0, 12, BOOKE_PAGESZ_16M, 1), #endif +#endif #ifdef CONFIG_SYS_DCSRBAR_PHYS SET_TLB_ENTRY(1, CONFIG_SYS_DCSRBAR, CONFIG_SYS_DCSRBAR_PHYS, MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G, @@ -140,7 +142,7 @@ struct fsl_e_tlb_entry tlb_table[] = { MAS3_SX|MAS3_SW|MAS3_SR, MAS2_G, 0, 18, BOOKE_PAGESZ_1M, 1), #endif -#if defined(CONFIG_SYS_RAMBOOT) +#if defined(CONFIG_RAMBOOT_PBL) && !defined(CONFIG_SPL_BUILD) SET_TLB_ENTRY(1, CONFIG_SYS_DDR_SDRAM_BASE, CONFIG_SYS_DDR_SDRAM_BASE, MAS3_SX|MAS3_SW|MAS3_SR, 0, 0, 19, BOOKE_PAGESZ_2G, 1) diff --git a/boards.cfg b/boards.cfg index 92ad1e50cfd..7f91210f6f1 100644 --- a/boards.cfg +++ b/boards.cfg @@ -965,9 +965,9 @@ Active powerpc mpc85xx - freescale t208xqds Active powerpc mpc85xx - freescale t208xqds T2081QDS_SPIFLASH T208xQDS:PPC_T2081,RAMBOOT_PBL,SPL_FSL_PBL,SPIFLASH - Active powerpc mpc85xx - freescale t208xqds T2081QDS_SRIO_PCIE_BOOT T208xQDS:PPC_T2081,SRIO_PCIE_BOOT_SLAVE,SYS_TEXT_BASE=0xFFF40000 - Active powerpc mpc85xx - freescale t208xrdb T2080RDB T208xRDB:PPC_T2080 - -Active powerpc mpc85xx - freescale t208xrdb T2080RDB_NAND T208xRDB:PPC_T2080,RAMBOOT_PBL,NAND,SYS_TEXT_BASE=0xFFF40000 - -Active powerpc mpc85xx - freescale t208xrdb T2080RDB_SDCARD T208xRDB:PPC_T2080,RAMBOOT_PBL,SDCARD,SYS_TEXT_BASE=0xFFF40000 - -Active powerpc mpc85xx - freescale t208xrdb T2080RDB_SPIFLASH T208xRDB:PPC_T2080,RAMBOOT_PBL,SPIFLASH,SYS_TEXT_BASE=0xFFF40000 - +Active powerpc mpc85xx - freescale t208xrdb T2080RDB_NAND T208xRDB:PPC_T2080,RAMBOOT_PBL,SPL_FSL_PBL,NAND +Active powerpc mpc85xx - freescale t208xrdb T2080RDB_SDCARD T208xRDB:PPC_T2080,RAMBOOT_PBL,SPL_FSL_PBL,SDCARD +Active powerpc mpc85xx - freescale t208xrdb T2080RDB_SPIFLASH T208xRDB:PPC_T2080,RAMBOOT_PBL,SPL_FSL_PBL,SPIFLASH Active powerpc mpc85xx - freescale t208xrdb T2080RDB_SRIO_PCIE_BOOT T208xRDB:PPC_T2080,SRIO_PCIE_BOOT_SLAVE,SYS_TEXT_BASE=0xFFF40000 - Active powerpc mpc85xx - freescale t4qds T4160QDS T4240QDS:PPC_T4160 - Active powerpc mpc85xx - freescale t4qds T4160QDS_SECURE_BOOT T4240QDS:PPC_T4160,SECURE_BOOT Aneesh Bansal diff --git a/include/configs/T208xRDB.h b/include/configs/T208xRDB.h index 5c89426bde6..4ef1167f9f5 100644 --- a/include/configs/T208xRDB.h +++ b/include/configs/T208xRDB.h @@ -39,12 +39,76 @@ #define CONFIG_ENV_OVERWRITE #ifdef CONFIG_RAMBOOT_PBL -#define CONFIG_RAMBOOT_TEXT_BASE CONFIG_SYS_TEXT_BASE -#define CONFIG_RESET_VECTOR_ADDRESS 0xfffffffc #define CONFIG_SYS_FSL_PBL_PBI board/freescale/t208xrdb/t2080_pbi.cfg #define CONFIG_SYS_FSL_PBL_RCW board/freescale/t208xrdb/t2080_rcw.cfg + +#define CONFIG_SPL +#define CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT +#define CONFIG_SPL_ENV_SUPPORT +#define CONFIG_SPL_SERIAL_SUPPORT +#define CONFIG_SPL_FLUSH_IMAGE +#define CONFIG_SPL_TARGET "u-boot-with-spl.bin" +#define CONFIG_SPL_LIBGENERIC_SUPPORT +#define CONFIG_SPL_LIBCOMMON_SUPPORT +#define CONFIG_SPL_I2C_SUPPORT +#define CONFIG_SPL_DRIVERS_MISC_SUPPORT +#define CONFIG_FSL_LAW /* Use common FSL init code */ +#define CONFIG_SYS_TEXT_BASE 0x00201000 +#define CONFIG_SPL_TEXT_BASE 0xFFFD8000 +#define CONFIG_SPL_PAD_TO 0x40000 +#define CONFIG_SPL_MAX_SIZE 0x28000 +#define RESET_VECTOR_OFFSET 0x27FFC +#define BOOT_PAGE_OFFSET 0x27000 +#ifdef CONFIG_SPL_BUILD +#define CONFIG_SPL_SKIP_RELOCATE +#define CONFIG_SPL_COMMON_INIT_DDR +#define CONFIG_SYS_CCSR_DO_NOT_RELOCATE +#define CONFIG_SYS_NO_FLASH +#endif + +#ifdef CONFIG_NAND +#define CONFIG_SPL_NAND_SUPPORT +#define CONFIG_SYS_NAND_U_BOOT_SIZE (768 << 10) +#define CONFIG_SYS_NAND_U_BOOT_DST 0x00200000 +#define CONFIG_SYS_NAND_U_BOOT_START 0x00200000 +#define CONFIG_SYS_NAND_U_BOOT_OFFS (256 << 10) +#define CONFIG_SYS_LDSCRIPT "arch/powerpc/cpu/mpc85xx/u-boot-nand.lds" +#define CONFIG_SPL_NAND_BOOT +#endif + +#ifdef CONFIG_SPIFLASH +#define CONFIG_RESET_VECTOR_ADDRESS 0x200FFC +#define CONFIG_SPL_SPI_SUPPORT +#define CONFIG_SPL_SPI_FLASH_SUPPORT +#define CONFIG_SPL_SPI_FLASH_MINIMAL +#define CONFIG_SYS_SPI_FLASH_U_BOOT_SIZE (768 << 10) +#define CONFIG_SYS_SPI_FLASH_U_BOOT_DST (0x00200000) +#define CONFIG_SYS_SPI_FLASH_U_BOOT_START (0x00200000) +#define CONFIG_SYS_SPI_FLASH_U_BOOT_OFFS (256 << 10) +#define CONFIG_SYS_LDSCRIPT "arch/powerpc/cpu/mpc85xx/u-boot.lds" +#ifndef CONFIG_SPL_BUILD +#define CONFIG_SYS_MPC85XX_NO_RESETVEC +#endif +#define CONFIG_SPL_SPI_BOOT +#endif + +#ifdef CONFIG_SDCARD +#define CONFIG_RESET_VECTOR_ADDRESS 0x200FFC +#define CONFIG_SPL_MMC_SUPPORT +#define CONFIG_SPL_MMC_MINIMAL +#define CONFIG_SYS_MMC_U_BOOT_SIZE (768 << 10) +#define CONFIG_SYS_MMC_U_BOOT_DST (0x00200000) +#define CONFIG_SYS_MMC_U_BOOT_START (0x00200000) +#define CONFIG_SYS_MMC_U_BOOT_OFFS (260 << 10) +#define CONFIG_SYS_LDSCRIPT "arch/powerpc/cpu/mpc85xx/u-boot.lds" +#ifndef CONFIG_SPL_BUILD +#define CONFIG_SYS_MPC85XX_NO_RESETVEC +#endif +#define CONFIG_SPL_MMC_BOOT #endif +#endif /* CONFIG_RAMBOOT_PBL */ + #define CONFIG_SRIO_PCIE_BOOT_MASTER #ifdef CONFIG_SRIO_PCIE_BOOT_SLAVE /* Set 1M boot space */ @@ -74,11 +138,7 @@ #define CONFIG_MEM_INIT_VALUE 0xdeadbeef #endif -#ifdef CONFIG_SYS_NO_FLASH -#if !defined(CONFIG_SRIO_PCIE_BOOT_SLAVE) && !defined(CONFIG_RAMBOOT_PBL) -#define CONFIG_ENV_IS_NOWHERE -#endif -#else +#ifndef CONFIG_SYS_NO_FLASH #define CONFIG_FLASH_CFI_DRIVER #define CONFIG_SYS_FLASH_CFI #define CONFIG_SYS_FLASH_USE_BUFFER_WRITE @@ -99,11 +159,11 @@ #define CONFIG_ENV_IS_IN_MMC #define CONFIG_SYS_MMC_ENV_DEV 0 #define CONFIG_ENV_SIZE 0x2000 -#define CONFIG_ENV_OFFSET (512 * 1658) +#define CONFIG_ENV_OFFSET (512 * 0x800) #elif defined(CONFIG_NAND) #define CONFIG_SYS_EXTRA_ENV_RELOC #define CONFIG_ENV_IS_IN_NAND -#define CONFIG_ENV_SIZE CONFIG_SYS_NAND_BLOCK_SIZE +#define CONFIG_ENV_SIZE 0x2000 #define CONFIG_ENV_OFFSET (2 * CONFIG_SYS_NAND_BLOCK_SIZE) #elif defined(CONFIG_SRIO_PCIE_BOOT_SLAVE) #define CONFIG_ENV_IS_IN_REMOTE @@ -129,7 +189,16 @@ unsigned long get_board_ddr_clk(void); /* * Config the L3 Cache as L3 SRAM */ -#define CONFIG_SYS_INIT_L3_ADDR CONFIG_RAMBOOT_TEXT_BASE +#define CONFIG_SYS_INIT_L3_ADDR 0xFFFC0000 +#define CONFIG_SYS_L3_SIZE (512 << 10) +#define CONFIG_SPL_GD_ADDR (CONFIG_SYS_INIT_L3_ADDR + 32 * 1024) +#ifdef CONFIG_RAMBOOT_PBL +#define CONFIG_ENV_ADDR (CONFIG_SPL_GD_ADDR + 4 * 1024) +#endif +#define CONFIG_SPL_RELOC_MALLOC_ADDR (CONFIG_SPL_GD_ADDR + 12 * 1024) +#define CONFIG_SPL_RELOC_MALLOC_SIZE (50 << 10) +#define CONFIG_SPL_RELOC_STACK (CONFIG_SPL_GD_ADDR + 64 * 1024) +#define CONFIG_SPL_RELOC_STACK_SIZE (22 << 10) #define CONFIG_SYS_DCSRBAR 0xf0000000 #define CONFIG_SYS_DCSRBAR_PHYS 0xf00000000ull @@ -301,7 +370,12 @@ unsigned long get_board_ddr_clk(void); #define CONFIG_SYS_RAMBOOT #endif -#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE +#ifdef CONFIG_SPL_BUILD +#define CONFIG_SYS_MONITOR_BASE CONFIG_SPL_TEXT_BASE +#else +#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE /* start of monitor */ +#endif + #define CONFIG_BOARD_EARLY_INIT_R /* call board_early_init_r function */ #define CONFIG_MISC_INIT_R #define CONFIG_HWCONFIG @@ -516,17 +590,17 @@ unsigned long get_board_ddr_clk(void); #elif defined(CONFIG_SDCARD) /* * PBL SD boot image should stored at 0x1000(8 blocks), the size of the image is - * about 825KB (1650 blocks), Env is stored after the image, and the env size is - * 0x2000 (16 blocks), 8 + 1650 + 16 = 1674, enlarge it to 1680. + * about 1MB (2048 blocks), Env is stored after the image, and the env size is + * 0x2000 (16 blocks), 8 + 2048 + 16 = 2072, enlarge it to 2080. */ #define CONFIG_SYS_QE_FMAN_FW_IN_MMC -#define CONFIG_SYS_FMAN_FW_ADDR (512 * 1680) -#define CONFIG_CORTINA_FW_ADDR (512 * 1808) +#define CONFIG_SYS_FMAN_FW_ADDR (512 * 0x820) +#define CONFIG_CORTINA_FW_ADDR (512 * 0x8a0) #elif defined(CONFIG_NAND) #define CONFIG_SYS_QE_FMAN_FW_IN_NAND -#define CONFIG_SYS_FMAN_FW_ADDR (6 * CONFIG_SYS_NAND_BLOCK_SIZE) -#define CONFIG_CORTINA_FW_ADDR (7 * CONFIG_SYS_NAND_BLOCK_SIZE) +#define CONFIG_SYS_FMAN_FW_ADDR (3 * CONFIG_SYS_NAND_BLOCK_SIZE) +#define CONFIG_CORTINA_FW_ADDR (4 * CONFIG_SYS_NAND_BLOCK_SIZE) #elif defined(CONFIG_SRIO_PCIE_BOOT_SLAVE) /* * Slave has no ucode locally, it can fetch this from remote. When implementing -- cgit v1.2.3 From ef531c73570794b7676b62de4224bd294919b83b Mon Sep 17 00:00:00 2001 From: Shengzhou Liu Date: Fri, 18 Apr 2014 16:43:41 +0800 Subject: board/t2080rdb: some update for t2080rdb - update readme. - add CONFIG_SYS_CORTINA_FW_IN_* for loading Cortina PHY CS4315 ucode from NOR/NAND/SPI/SD/REMOTE. - update cpld vbank with SW3[5:7]=000 as default vbank0 instead of previous SW3[5:7]=111 as default vbank. - fix CONFIG_SYS_I2C_EEPROM_ADDR_LEN to 2. Signed-off-by: Shengzhou Liu Reviewed-by: York Sun --- board/freescale/t208xrdb/README | 6 +++--- board/freescale/t208xrdb/cpld.h | 4 ++-- board/freescale/t208xrdb/t208xrdb.c | 2 +- include/configs/T208xRDB.h | 13 +++++++++---- 4 files changed, 15 insertions(+), 10 deletions(-) (limited to 'board') diff --git a/board/freescale/t208xrdb/README b/board/freescale/t208xrdb/README index fe26de55c09..24484cd0ffc 100644 --- a/board/freescale/t208xrdb/README +++ b/board/freescale/t208xrdb/README @@ -67,7 +67,7 @@ T2080PCIe-RDB board Overview - One PCIe x2 end-point device (C293 Crypto co-processor) - IFC/Local Bus - NOR: 128MB 16-bit NOR Flash - - NAND: 512MB 8-bit NAND flash + - NAND: 1GB 8-bit NAND flash - CPLD: for system controlling with programable header on-board - SATA - Two SATA 2.0 onnectors on-board @@ -156,11 +156,11 @@ Software configurations and board settings Switching between default bank and alternate bank on NOR flash To change boot source to vbank4: via software: run command 'cpld reset altbank' in u-boot. - via DIP-switch: set SW3[5:7] = '011' + via DIP-switch: set SW3[5:7] = '100' To change boot source to vbank0: via software: run command 'cpld reset' in u-boot. - via DIP-Switch: set SW3[5:7] = '111' + via DIP-Switch: set SW3[5:7] = '000' 2. NAND Boot: a. build PBL image for NAND boot diff --git a/board/freescale/t208xrdb/cpld.h b/board/freescale/t208xrdb/cpld.h index 4cee4e55cfc..3f1533888dd 100644 --- a/board/freescale/t208xrdb/cpld.h +++ b/board/freescale/t208xrdb/cpld.h @@ -35,8 +35,8 @@ void cpld_write(unsigned int reg, u8 value); #define CPLD_LBMAP_MASK 0x3F #define CPLD_BANK_SEL_MASK 0x07 #define CPLD_BANK_OVERRIDE 0x40 -#define CPLD_LBMAP_ALTBANK 0x43 /* BANK OR | BANK 4 */ -#define CPLD_LBMAP_DFLTBANK 0x47 /* BANK OR | BANK 0 */ +#define CPLD_LBMAP_ALTBANK 0x44 /* BANK OR | BANK 4 */ +#define CPLD_LBMAP_DFLTBANK 0x40 /* BANK OR | BANK 0 */ #define CPLD_LBMAP_RESET 0xFF #define CPLD_LBMAP_SHIFT 0x03 #define CPLD_BOOT_SEL 0x80 diff --git a/board/freescale/t208xrdb/t208xrdb.c b/board/freescale/t208xrdb/t208xrdb.c index f3fec2aa6eb..265c1f97ddb 100644 --- a/board/freescale/t208xrdb/t208xrdb.c +++ b/board/freescale/t208xrdb/t208xrdb.c @@ -44,7 +44,7 @@ int checkboard(void) puts("NAND\n"); } else { reg = ((reg & CPLD_LBMAP_MASK) >> CPLD_LBMAP_SHIFT); - printf("NOR vBank%d\n", ~reg & 0x7); + printf("NOR vBank%d\n", reg); } #endif diff --git a/include/configs/T208xRDB.h b/include/configs/T208xRDB.h index 4ef1167f9f5..73d82edb80f 100644 --- a/include/configs/T208xRDB.h +++ b/include/configs/T208xRDB.h @@ -208,7 +208,7 @@ unsigned long get_board_ddr_clk(void); #define CONFIG_SYS_I2C_EEPROM_NXID #define CONFIG_SYS_EEPROM_BUS_NUM 0 #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 -#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 +#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2 /* * DDR Setup @@ -584,7 +584,8 @@ unsigned long get_board_ddr_clk(void); * env, so we got 0x110000. */ #define CONFIG_SYS_QE_FW_IN_SPIFLASH -#define CONFIG_SYS_FMAN_FW_ADDR 0x110000 +#define CONFIG_SYS_CORTINA_FW_IN_SPIFLASH +#define CONFIG_SYS_FMAN_FW_ADDR 0x110000 #define CONFIG_CORTINA_FW_ADDR 0x120000 #elif defined(CONFIG_SDCARD) @@ -594,11 +595,13 @@ unsigned long get_board_ddr_clk(void); * 0x2000 (16 blocks), 8 + 2048 + 16 = 2072, enlarge it to 2080. */ #define CONFIG_SYS_QE_FMAN_FW_IN_MMC +#define CONFIG_SYS_CORTINA_FW_IN_MMC #define CONFIG_SYS_FMAN_FW_ADDR (512 * 0x820) #define CONFIG_CORTINA_FW_ADDR (512 * 0x8a0) #elif defined(CONFIG_NAND) #define CONFIG_SYS_QE_FMAN_FW_IN_NAND +#define CONFIG_SYS_CORTINA_FW_IN_NAND #define CONFIG_SYS_FMAN_FW_ADDR (3 * CONFIG_SYS_NAND_BLOCK_SIZE) #define CONFIG_CORTINA_FW_ADDR (4 * CONFIG_SYS_NAND_BLOCK_SIZE) #elif defined(CONFIG_SRIO_PCIE_BOOT_SLAVE) @@ -610,11 +613,13 @@ unsigned long get_board_ddr_clk(void); * master LAW->the ucode address in master's memory space. */ #define CONFIG_SYS_QE_FMAN_FW_IN_REMOTE -#define CONFIG_SYS_FMAN_FW_ADDR 0xFFE00000 +#define CONFIG_SYS_CORTINA_FW_IN_REMOTE +#define CONFIG_SYS_FMAN_FW_ADDR 0xFFE00000 #define CONFIG_CORTINA_FW_ADDR 0xFFE10000 #else #define CONFIG_SYS_QE_FMAN_FW_IN_NOR -#define CONFIG_SYS_FMAN_FW_ADDR 0xEFF00000 +#define CONFIG_SYS_CORTINA_FW_IN_NOR +#define CONFIG_SYS_FMAN_FW_ADDR 0xEFF00000 #define CONFIG_CORTINA_FW_ADDR 0xEFE00000 #endif #define CONFIG_SYS_QE_FMAN_FW_LENGTH 0x10000 -- cgit v1.2.3 From cb753850e8af5a224d7c08b4fd1d258082d3bbd5 Mon Sep 17 00:00:00 2001 From: Shaohui Xie Date: Mon, 21 Apr 2014 11:21:03 +0800 Subject: powerpc/t4240: updated RCW and PBI for rev2.0 Updated the RCW for rev2.0 which uses new frequency settings as below: Clock Configuration: CPU0:1666.667 MHz, CPU1:1666.667 MHz, CPU2:1666.667 MHz, CPU3:1666.667 MHz, CPU4:1666.667 MHz, CPU5:1666.667 MHz, CPU6:1666.667 MHz, CPU7:1666.667 MHz, CPU8:1666.667 MHz, CPU9:1666.667 MHz, CPU10:1666.667 MHz, CPU11:1666.667MHz, CCB:733.333 MHz, DDR:933.333 MHz (1866.667 MT/s data rate) (Asynchronous), IFC:183.333 MHz FMAN1: 733.333 MHz FMAN2: 733.333 MHz QMAN: 366.667 MHz PME: 533.333 MHz Remove workaround of IFC bus speed and SERDES A-006031 of rev1.0. Signed-off-by: Shaohui Xie Reviewed-by: York Sun --- board/freescale/t4qds/t4_pbi.cfg | 14 -------------- board/freescale/t4qds/t4_rcw.cfg | 6 +++--- 2 files changed, 3 insertions(+), 17 deletions(-) (limited to 'board') diff --git a/board/freescale/t4qds/t4_pbi.cfg b/board/freescale/t4qds/t4_pbi.cfg index c598fb5afd8..6126266a96f 100644 --- a/board/freescale/t4qds/t4_pbi.cfg +++ b/board/freescale/t4qds/t4_pbi.cfg @@ -13,20 +13,6 @@ 09000d00 00000000 09000d04 fff80000 09000d08 81000012 -#workaround for IFC bus speed -091241c0 f03f3f3f -091241c4 ff003f3f -09124010 00000101 -09124130 0000000c -#workaround for SERDES A-006031 -090ea000 064740e6 -090ea020 064740e6 -090eb000 064740e6 -090eb020 064740e6 -090ec000 064740e6 -090ec020 064740e6 -090ed000 064740e6 -090ed020 064740e6 #Configure alternate space 09000010 00000000 09000014 ff000000 diff --git a/board/freescale/t4qds/t4_rcw.cfg b/board/freescale/t4qds/t4_rcw.cfg index 74df01a70c2..3e568172046 100644 --- a/board/freescale/t4qds/t4_rcw.cfg +++ b/board/freescale/t4qds/t4_rcw.cfg @@ -1,7 +1,7 @@ #PBL preamble and RCW header aa55aa55 010e0100 #serdes protocol 1_28_6_12 -120c0019 0c101915 00000000 00000000 -04383063 30548c00 6c020000 1d000000 +16070019 18101916 00000000 00000000 +04383060 30548c00 ec020000 f5000000 00000000 ee0000ee 00000000 000307fc -00000000 00000000 00000000 00000020 +00000000 00000000 00000000 00000028 -- cgit v1.2.3 From b6036993ebf12d360692a7df227537277afe3a1f Mon Sep 17 00:00:00 2001 From: Shaohui Xie Date: Tue, 22 Apr 2014 15:10:44 +0800 Subject: powerpc/T4QDS: add two stage boot of nand/sd Add support of 2 stage NAND/SD boot loader using SPL framework. PBL initialise the internal SRAM and copy SPL, this further initialise DDR using SPD and environment and copy u-boot from NAND/SD to DDR, finally SPL transfer control to u-boot. NOR uses CS1 instead of CS2 when NAND boot, fix it. Signed-off-by: Shaohui Xie Reviewed-by: York Sun --- board/freescale/t4qds/Makefile | 6 +- board/freescale/t4qds/ddr.c | 6 +- board/freescale/t4qds/spl.c | 141 +++++++++++++++++++++++++++++++++++++++++ board/freescale/t4qds/tlb.c | 8 ++- boards.cfg | 7 +- doc/README.t4240qds | 53 ++++++++++++++++ include/configs/T4240QDS.h | 99 +++++++++++++++++++++++------ include/configs/t4qds.h | 17 ++++- 8 files changed, 310 insertions(+), 27 deletions(-) create mode 100644 board/freescale/t4qds/spl.c (limited to 'board') diff --git a/board/freescale/t4qds/Makefile b/board/freescale/t4qds/Makefile index 2b1f7aa3019..4e8e5cb8e9a 100644 --- a/board/freescale/t4qds/Makefile +++ b/board/freescale/t4qds/Makefile @@ -4,10 +4,14 @@ # SPDX-License-Identifier: GPL-2.0+ # +ifdef CONFIG_SPL_BUILD +obj-y += spl.o +else obj-$(CONFIG_T4240QDS) += t4240qds.o obj-$(CONFIG_T4240EMU) += t4240emu.o -obj-y += ddr.o obj-$(CONFIG_T4240QDS)+= eth.o obj-$(CONFIG_PCI) += pci.o +endif +obj-y += ddr.o obj-y += law.o obj-y += tlb.o diff --git a/board/freescale/t4qds/ddr.c b/board/freescale/t4qds/ddr.c index 7586cc3c4bd..7abd38def1a 100644 --- a/board/freescale/t4qds/ddr.c +++ b/board/freescale/t4qds/ddr.c @@ -117,11 +117,15 @@ phys_size_t initdram(int board_type) puts("Initializing....using SPD\n"); +#if defined(CONFIG_SPL_BUILD) || !defined(CONFIG_RAMBOOT_PBL) dram_size = fsl_ddr_sdram(); dram_size = setup_ddr_tlbs(dram_size / 0x100000); dram_size *= 0x100000; - puts(" DDR: "); +#else + /* DDR has been initialised by first stage boot loader */ + dram_size = fsl_ddr_sdram_size(); +#endif return dram_size; } diff --git a/board/freescale/t4qds/spl.c b/board/freescale/t4qds/spl.c new file mode 100644 index 00000000000..0c6156e7f09 --- /dev/null +++ b/board/freescale/t4qds/spl.c @@ -0,0 +1,141 @@ +/* Copyright 2014 Freescale Semiconductor, Inc. + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include "../common/qixis.h" +#include "t4240qds_qixis.h" + +#define FSL_CORENET_CCSR_PORSR1_RCW_MASK 0xFF800000 + +DECLARE_GLOBAL_DATA_PTR; + +phys_size_t get_effective_memsize(void) +{ + return CONFIG_SYS_L3_SIZE; +} + +unsigned long get_board_sys_clk(void) +{ + u8 sysclk_conf = QIXIS_READ(brdcfg[1]); + + switch (sysclk_conf & 0x0F) { + case QIXIS_SYSCLK_83: + return 83333333; + case QIXIS_SYSCLK_100: + return 100000000; + case QIXIS_SYSCLK_125: + return 125000000; + case QIXIS_SYSCLK_133: + return 133333333; + case QIXIS_SYSCLK_150: + return 150000000; + case QIXIS_SYSCLK_160: + return 160000000; + case QIXIS_SYSCLK_166: + return 166666666; + } + return 66666666; +} + +unsigned long get_board_ddr_clk(void) +{ + u8 ddrclk_conf = QIXIS_READ(brdcfg[1]); + + switch ((ddrclk_conf & 0x30) >> 4) { + case QIXIS_DDRCLK_100: + return 100000000; + case QIXIS_DDRCLK_125: + return 125000000; + case QIXIS_DDRCLK_133: + return 133333333; + } + return 66666666; +} + +void board_init_f(ulong bootflag) +{ + u32 plat_ratio, sys_clk, ccb_clk; + ccsr_gur_t *gur = (void *)CONFIG_SYS_MPC85xx_GUTS_ADDR; +#ifdef CONFIG_SPL_NAND_BOOT + u32 porsr1, pinctl; +#endif + +#ifdef CONFIG_SPL_NAND_BOOT + porsr1 = in_be32(&gur->porsr1); + pinctl = ((porsr1 & ~(FSL_CORENET_CCSR_PORSR1_RCW_MASK)) | 0x24800000); + out_be32((unsigned int *)(CONFIG_SYS_DCSRBAR + 0x20000), pinctl); +#endif + /* Memcpy existing GD at CONFIG_SPL_GD_ADDR */ + memcpy((void *)CONFIG_SPL_GD_ADDR, (void *)gd, sizeof(gd_t)); + + /* Update GD pointer */ + gd = (gd_t *)(CONFIG_SPL_GD_ADDR); + + /* compiler optimization barrier needed for GCC >= 3.4 */ + __asm__ __volatile__("" : : : "memory"); + + console_init_f(); + + /* initialize selected port with appropriate baud rate */ + sys_clk = get_board_sys_clk(); + plat_ratio = (in_be32(&gur->rcwsr[0]) >> 25) & 0x1f; + ccb_clk = sys_clk * plat_ratio / 2; + + NS16550_init((NS16550_t)CONFIG_SYS_NS16550_COM1, + ccb_clk / 16 / CONFIG_BAUDRATE); + +#ifdef CONFIG_SPL_MMC_BOOT + puts("\nSD boot...\n"); +#elif defined(CONFIG_SPL_NAND_BOOT) + puts("\nNAND boot...\n"); +#endif + relocate_code(CONFIG_SPL_RELOC_STACK, (gd_t *)CONFIG_SPL_GD_ADDR, 0x0); +} + +void board_init_r(gd_t *gd, ulong dest_addr) +{ + bd_t *bd; + + bd = (bd_t *)(gd + sizeof(gd_t)); + memset(bd, 0, sizeof(bd_t)); + gd->bd = bd; + bd->bi_memstart = CONFIG_SYS_INIT_L3_ADDR; + bd->bi_memsize = CONFIG_SYS_L3_SIZE; + + probecpu(); + get_clocks(); + mem_malloc_init(CONFIG_SPL_RELOC_MALLOC_ADDR, + CONFIG_SPL_RELOC_MALLOC_SIZE); + +#ifdef CONFIG_SPL_NAND_BOOT + nand_spl_load_image(CONFIG_ENV_OFFSET, CONFIG_ENV_SIZE, + (uchar *)CONFIG_ENV_ADDR); +#endif +#ifdef CONFIG_SPL_MMC_BOOT + mmc_initialize(bd); + mmc_spl_load_image(CONFIG_ENV_OFFSET, CONFIG_ENV_SIZE, + (uchar *)CONFIG_ENV_ADDR); +#endif + + gd->env_addr = (ulong)(CONFIG_ENV_ADDR); + gd->env_valid = 1; + + i2c_init_all(); + + gd->ram_size = initdram(0); + +#ifdef CONFIG_SPL_MMC_BOOT + mmc_boot(); +#elif defined(CONFIG_SPL_NAND_BOOT) + nand_boot(); +#endif +} diff --git a/board/freescale/t4qds/tlb.c b/board/freescale/t4qds/tlb.c index b701e752093..1e4d096f5f9 100644 --- a/board/freescale/t4qds/tlb.c +++ b/board/freescale/t4qds/tlb.c @@ -64,7 +64,7 @@ struct fsl_e_tlb_entry tlb_table[] = { SET_TLB_ENTRY(1, CONFIG_SYS_FLASH_BASE, CONFIG_SYS_FLASH_BASE_PHYS, MAS3_SX|MAS3_SR, MAS2_W|MAS2_G, 0, 2, BOOKE_PAGESZ_256M, 1), - +#ifndef CONFIG_SPL_BUILD /* *I*G* - PCI */ SET_TLB_ENTRY(1, CONFIG_SYS_PCIE1_MEM_VIRT, CONFIG_SYS_PCIE1_MEM_PHYS, MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G, @@ -105,6 +105,7 @@ struct fsl_e_tlb_entry tlb_table[] = { MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G, 0, 12, BOOKE_PAGESZ_16M, 1), #endif +#endif #ifdef CONFIG_SYS_DCSRBAR_PHYS SET_TLB_ENTRY(1, CONFIG_SYS_DCSRBAR, CONFIG_SYS_DCSRBAR_PHYS, MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G, @@ -136,6 +137,11 @@ struct fsl_e_tlb_entry tlb_table[] = { 0, 18, BOOKE_PAGESZ_1M, 1), #endif +#if defined(CONFIG_RAMBOOT_PBL) && !defined(CONFIG_SPL_BUILD) + SET_TLB_ENTRY(1, CONFIG_SYS_DDR_SDRAM_BASE, CONFIG_SYS_DDR_SDRAM_BASE, + MAS3_SX|MAS3_SW|MAS3_SR, 0, + 0, 19, BOOKE_PAGESZ_2G, 1) +#endif }; int num_tlb_entries = ARRAY_SIZE(tlb_table); diff --git a/boards.cfg b/boards.cfg index 7f91210f6f1..ad34aa72cb5 100644 --- a/boards.cfg +++ b/boards.cfg @@ -971,13 +971,14 @@ Active powerpc mpc85xx - freescale t208xrdb Active powerpc mpc85xx - freescale t208xrdb T2080RDB_SRIO_PCIE_BOOT T208xRDB:PPC_T2080,SRIO_PCIE_BOOT_SLAVE,SYS_TEXT_BASE=0xFFF40000 - Active powerpc mpc85xx - freescale t4qds T4160QDS T4240QDS:PPC_T4160 - Active powerpc mpc85xx - freescale t4qds T4160QDS_SECURE_BOOT T4240QDS:PPC_T4160,SECURE_BOOT Aneesh Bansal -Active powerpc mpc85xx - freescale t4qds T4160QDS_SDCARD T4240QDS:PPC_T4160,RAMBOOT_PBL,SDCARD,SYS_TEXT_BASE=0xFFF40000 - +Active powerpc mpc85xx - freescale t4qds T4160QDS_NAND T4240QDS:PPC_T4160,RAMBOOT_PBL,SPL_FSL_PBL,NAND - +Active powerpc mpc85xx - freescale t4qds T4160QDS_SDCARD T4240QDS:PPC_T4160,RAMBOOT_PBL,SPL_FSL_PBL,SDCARD - Active powerpc mpc85xx - freescale t4qds T4160QDS_SPIFLASH T4240QDS:PPC_T4160,RAMBOOT_PBL,SPIFLASH,SYS_TEXT_BASE=0xFFF40000 - Active powerpc mpc85xx - freescale t4qds T4240EMU T4240EMU:PPC_T4240 York Sun Active powerpc mpc85xx - freescale t4qds T4240QDS T4240QDS:PPC_T4240 - Active powerpc mpc85xx - freescale t4qds T4240QDS_SECURE_BOOT T4240QDS:PPC_T4240,SECURE_BOOT Aneesh Bansal -Active powerpc mpc85xx - freescale t4qds T4240QDS_NAND T4240QDS:PPC_T4240,RAMBOOT_PBL,NAND,SYS_TEXT_BASE=0xFFF40000 - -Active powerpc mpc85xx - freescale t4qds T4240QDS_SDCARD T4240QDS:PPC_T4240,RAMBOOT_PBL,SDCARD,SYS_TEXT_BASE=0xFFF40000 - +Active powerpc mpc85xx - freescale t4qds T4240QDS_NAND T4240QDS:PPC_T4240,RAMBOOT_PBL,SPL_FSL_PBL,NAND - +Active powerpc mpc85xx - freescale t4qds T4240QDS_SDCARD T4240QDS:PPC_T4240,RAMBOOT_PBL,SPL_FSL_PBL,SDCARD - Active powerpc mpc85xx - freescale t4qds T4240QDS_SPIFLASH T4240QDS:PPC_T4240,RAMBOOT_PBL,SPIFLASH,SYS_TEXT_BASE=0xFFF40000 - Active powerpc mpc85xx - freescale t4qds T4240QDS_SRIO_PCIE_BOOT T4240QDS:PPC_T4240,SRIO_PCIE_BOOT_SLAVE,SYS_TEXT_BASE=0xFFF40000 - Active powerpc mpc85xx - freescale qemu-ppce500 qemu-ppce500 - Alexander Graf diff --git a/doc/README.t4240qds b/doc/README.t4240qds index a9841fb5f74..ef8c75f3b2c 100644 --- a/doc/README.t4240qds +++ b/doc/README.t4240qds @@ -120,3 +120,56 @@ The override voltage takes effect when booting. Note: voltage adjustment needs to be done step by step. Changing voltage too rapidly may cause current surge. The voltage stepping is done by software. Users can set the final voltage directly. + +2-stage NAND/SD boot loader +------------------------------- +PBL initializes the internal SRAM and copy SPL(160K) in SRAM. +SPL further initialise DDR using SPD and environment variables +and copy u-boot(768 KB) from NAND/SD device to DDR. +Finally SPL transers control to u-boot for futher booting. + +SPL has following features: + - Executes within 256K + - No relocation required + +Run time view of SPL framework +------------------------------------------------- +|Area | Address | +------------------------------------------------- +|SecureBoot header | 0xFFFC0000 (32KB) | +------------------------------------------------- +|GD, BD | 0xFFFC8000 (4KB) | +------------------------------------------------- +|ENV | 0xFFFC9000 (8KB) | +------------------------------------------------- +|HEAP | 0xFFFCB000 (50KB) | +------------------------------------------------- +|STACK | 0xFFFD8000 (22KB) | +------------------------------------------------- +|U-boot SPL | 0xFFFD8000 (160KB) | +------------------------------------------------- + +NAND Flash memory Map on T4QDS +-------------------------------------------------------------- +Start End Definition Size +0x000000 0x0FFFFF u-boot img 1MB +0x140000 0x15FFFF u-boot env 128KB +0x160000 0x17FFFF FMAN Ucode 128KB + +Micro SD Card memory Map on T4QDS +---------------------------------------------------- +Block #blocks Definition Size +0x008 2048 u-boot img 1MB +0x800 0016 u-boot env 8KB +0x820 0128 FMAN ucode 64KB + +Switch Settings: (ON is 1, OFF is 0) +=============== +NAND boot SW setting: +SW1[1:8] = 10000010 +SW2[1.1] = 0 +SW6[1:4] = 1001 + +SD boot SW setting: +SW1[1:8] = 00100000 +SW2[1.1] = 0 diff --git a/include/configs/T4240QDS.h b/include/configs/T4240QDS.h index 1b98cfda3ec..e4eb30fbeb5 100644 --- a/include/configs/T4240QDS.h +++ b/include/configs/T4240QDS.h @@ -19,11 +19,64 @@ #define CONFIG_ICS307_REFCLK_HZ 25000000 /* ICS307 ref clk freq */ #ifdef CONFIG_RAMBOOT_PBL -#define CONFIG_RAMBOOT_TEXT_BASE CONFIG_SYS_TEXT_BASE -#define CONFIG_RESET_VECTOR_ADDRESS 0xfffffffc #define CONFIG_SYS_FSL_PBL_PBI board/freescale/t4qds/t4_pbi.cfg #define CONFIG_SYS_FSL_PBL_RCW board/freescale/t4qds/t4_rcw.cfg +#if !defined(CONFIG_NAND) && !defined(CONFIG_SDCARD) +#define CONFIG_RAMBOOT_TEXT_BASE CONFIG_SYS_TEXT_BASE +#define CONFIG_RESET_VECTOR_ADDRESS 0xfffffffc +#else +#define CONFIG_SPL +#define CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT +#define CONFIG_SPL_ENV_SUPPORT +#define CONFIG_SPL_SERIAL_SUPPORT +#define CONFIG_SPL_FLUSH_IMAGE +#define CONFIG_SPL_TARGET "u-boot-with-spl.bin" +#define CONFIG_SPL_LIBGENERIC_SUPPORT +#define CONFIG_SPL_LIBCOMMON_SUPPORT +#define CONFIG_SPL_I2C_SUPPORT +#define CONFIG_SPL_DRIVERS_MISC_SUPPORT +#define CONFIG_FSL_LAW /* Use common FSL init code */ +#define CONFIG_SYS_TEXT_BASE 0x00201000 +#define CONFIG_SPL_TEXT_BASE 0xFFFD8000 +#define CONFIG_SPL_PAD_TO 0x40000 +#define CONFIG_SPL_MAX_SIZE 0x28000 +#define RESET_VECTOR_OFFSET 0x27FFC +#define BOOT_PAGE_OFFSET 0x27000 + +#ifdef CONFIG_NAND +#define CONFIG_SPL_NAND_SUPPORT +#define CONFIG_SYS_NAND_U_BOOT_SIZE (768 << 10) +#define CONFIG_SYS_NAND_U_BOOT_DST 0x00200000 +#define CONFIG_SYS_NAND_U_BOOT_START 0x00200000 +#define CONFIG_SYS_NAND_U_BOOT_OFFS (256 << 10) +#define CONFIG_SYS_LDSCRIPT "arch/powerpc/cpu/mpc85xx/u-boot-nand.lds" +#define CONFIG_SPL_NAND_BOOT +#endif + +#ifdef CONFIG_SDCARD +#define CONFIG_RESET_VECTOR_ADDRESS 0x200FFC +#define CONFIG_SPL_MMC_SUPPORT +#define CONFIG_SPL_MMC_MINIMAL +#define CONFIG_SYS_MMC_U_BOOT_SIZE (768 << 10) +#define CONFIG_SYS_MMC_U_BOOT_DST 0x00200000 +#define CONFIG_SYS_MMC_U_BOOT_START 0x00200000 +#define CONFIG_SYS_MMC_U_BOOT_OFFS (260 << 10) +#ifndef CONFIG_SPL_BUILD +#define CONFIG_SYS_MPC85XX_NO_RESETVEC +#endif +#define CONFIG_SYS_LDSCRIPT "arch/powerpc/cpu/mpc85xx/u-boot.lds" +#define CONFIG_SPL_MMC_BOOT +#endif + +#ifdef CONFIG_SPL_BUILD +#define CONFIG_SPL_SKIP_RELOCATE +#define CONFIG_SPL_COMMON_INIT_DDR +#define CONFIG_SYS_CCSR_DO_NOT_RELOCATE +#define CONFIG_SYS_NO_FLASH +#endif + #endif +#endif /* CONFIG_RAMBOOT_PBL */ #ifdef CONFIG_SRIO_PCIE_BOOT_SLAVE /* Set 1M boot space */ @@ -64,12 +117,12 @@ #define CONFIG_ENV_IS_IN_MMC #define CONFIG_SYS_MMC_ENV_DEV 0 #define CONFIG_ENV_SIZE 0x2000 -#define CONFIG_ENV_OFFSET (512 * 1658) +#define CONFIG_ENV_OFFSET (512 * 0x800) #elif defined(CONFIG_NAND) #define CONFIG_SYS_EXTRA_ENV_RELOC #define CONFIG_ENV_IS_IN_NAND -#define CONFIG_ENV_SIZE CONFIG_SYS_NAND_BLOCK_SIZE -#define CONFIG_ENV_OFFSET (7 * CONFIG_SYS_NAND_BLOCK_SIZE) +#define CONFIG_ENV_SIZE 0x2000 +#define CONFIG_ENV_OFFSET (10 * CONFIG_SYS_NAND_BLOCK_SIZE) #elif defined(CONFIG_SRIO_PCIE_BOOT_SLAVE) #define CONFIG_ENV_IS_IN_REMOTE #define CONFIG_ENV_ADDR 0xffe20000 @@ -244,8 +297,16 @@ unsigned long get_board_ddr_clk(void); #define CONFIG_SYS_CS0_FTIM1 CONFIG_SYS_NAND_FTIM1 #define CONFIG_SYS_CS0_FTIM2 CONFIG_SYS_NAND_FTIM2 #define CONFIG_SYS_CS0_FTIM3 CONFIG_SYS_NAND_FTIM3 -#define CONFIG_SYS_CSPR2_EXT CONFIG_SYS_NOR0_CSPR_EXT -#define CONFIG_SYS_CSPR2 CONFIG_SYS_NOR0_CSPR +#define CONFIG_SYS_CSPR1_EXT CONFIG_SYS_NOR0_CSPR_EXT +#define CONFIG_SYS_CSPR1 CONFIG_SYS_NOR0_CSPR +#define CONFIG_SYS_AMASK1 CONFIG_SYS_NOR_AMASK +#define CONFIG_SYS_CSOR1 CONFIG_SYS_NOR_CSOR +#define CONFIG_SYS_CS1_FTIM0 CONFIG_SYS_NOR_FTIM0 +#define CONFIG_SYS_CS1_FTIM1 CONFIG_SYS_NOR_FTIM1 +#define CONFIG_SYS_CS1_FTIM2 CONFIG_SYS_NOR_FTIM2 +#define CONFIG_SYS_CS1_FTIM3 CONFIG_SYS_NOR_FTIM3 +#define CONFIG_SYS_CSPR2_EXT CONFIG_SYS_NOR1_CSPR_EXT +#define CONFIG_SYS_CSPR2 CONFIG_SYS_NOR1_CSPR #define CONFIG_SYS_AMASK2 CONFIG_SYS_NOR_AMASK #define CONFIG_SYS_CSOR2 CONFIG_SYS_NOR_CSOR #define CONFIG_SYS_CS2_FTIM0 CONFIG_SYS_NOR_FTIM0 @@ -261,6 +322,14 @@ unsigned long get_board_ddr_clk(void); #define CONFIG_SYS_CS0_FTIM1 CONFIG_SYS_NOR_FTIM1 #define CONFIG_SYS_CS0_FTIM2 CONFIG_SYS_NOR_FTIM2 #define CONFIG_SYS_CS0_FTIM3 CONFIG_SYS_NOR_FTIM3 +#define CONFIG_SYS_CSPR1_EXT CONFIG_SYS_NOR1_CSPR_EXT +#define CONFIG_SYS_CSPR1 CONFIG_SYS_NOR1_CSPR +#define CONFIG_SYS_AMASK1 CONFIG_SYS_NOR_AMASK +#define CONFIG_SYS_CSOR1 CONFIG_SYS_NOR_CSOR +#define CONFIG_SYS_CS1_FTIM0 CONFIG_SYS_NOR_FTIM0 +#define CONFIG_SYS_CS1_FTIM1 CONFIG_SYS_NOR_FTIM1 +#define CONFIG_SYS_CS1_FTIM2 CONFIG_SYS_NOR_FTIM2 +#define CONFIG_SYS_CS1_FTIM3 CONFIG_SYS_NOR_FTIM3 #define CONFIG_SYS_CSPR2_EXT CONFIG_SYS_NAND_CSPR_EXT #define CONFIG_SYS_CSPR2 CONFIG_SYS_NAND_CSPR #define CONFIG_SYS_AMASK2 CONFIG_SYS_NAND_AMASK @@ -270,14 +339,6 @@ unsigned long get_board_ddr_clk(void); #define CONFIG_SYS_CS2_FTIM2 CONFIG_SYS_NAND_FTIM2 #define CONFIG_SYS_CS2_FTIM3 CONFIG_SYS_NAND_FTIM3 #endif -#define CONFIG_SYS_CSPR1_EXT CONFIG_SYS_NOR1_CSPR_EXT -#define CONFIG_SYS_CSPR1 CONFIG_SYS_NOR1_CSPR -#define CONFIG_SYS_AMASK1 CONFIG_SYS_NOR_AMASK -#define CONFIG_SYS_CSOR1 CONFIG_SYS_NOR_CSOR -#define CONFIG_SYS_CS1_FTIM0 CONFIG_SYS_NOR_FTIM0 -#define CONFIG_SYS_CS1_FTIM1 CONFIG_SYS_NOR_FTIM1 -#define CONFIG_SYS_CS1_FTIM2 CONFIG_SYS_NOR_FTIM2 -#define CONFIG_SYS_CS1_FTIM3 CONFIG_SYS_NOR_FTIM3 #if defined(CONFIG_RAMBOOT_PBL) #define CONFIG_SYS_RAMBOOT @@ -379,14 +440,14 @@ unsigned long get_board_ddr_clk(void); #elif defined(CONFIG_SDCARD) /* * PBL SD boot image should stored at 0x1000(8 blocks), the size of the image is - * about 825KB (1650 blocks), Env is stored after the image, and the env size is - * 0x2000 (16 blocks), 8 + 1650 + 16 = 1674, enlarge it to 1680. + * about 1MB (2048 blocks), Env is stored after the image, and the env size is + * 0x2000 (16 blocks), 8 + 2048 + 16 = 2072, enlarge it to 2080. */ #define CONFIG_SYS_QE_FMAN_FW_IN_MMC -#define CONFIG_SYS_FMAN_FW_ADDR (512 * 1680) +#define CONFIG_SYS_FMAN_FW_ADDR (512 * 0x820) #elif defined(CONFIG_NAND) #define CONFIG_SYS_QE_FMAN_FW_IN_NAND -#define CONFIG_SYS_FMAN_FW_ADDR (8 * CONFIG_SYS_NAND_BLOCK_SIZE) +#define CONFIG_SYS_FMAN_FW_ADDR (11 * CONFIG_SYS_NAND_BLOCK_SIZE) #elif defined(CONFIG_SRIO_PCIE_BOOT_SLAVE) /* * Slave has no ucode locally, it can fetch this from remote. When implementing diff --git a/include/configs/t4qds.h b/include/configs/t4qds.h index f8de43943d7..36bc5294ef4 100644 --- a/include/configs/t4qds.h +++ b/include/configs/t4qds.h @@ -68,7 +68,16 @@ /* * Config the L3 Cache as L3 SRAM */ -#define CONFIG_SYS_INIT_L3_ADDR CONFIG_RAMBOOT_TEXT_BASE +#define CONFIG_SYS_INIT_L3_ADDR 0xFFFC0000 +#define CONFIG_SYS_L3_SIZE (512 << 10) +#define CONFIG_SPL_GD_ADDR (CONFIG_SYS_INIT_L3_ADDR + 32 * 1024) +#ifdef CONFIG_RAMBOOT_PBL +#define CONFIG_ENV_ADDR (CONFIG_SPL_GD_ADDR + 4 * 1024) +#endif +#define CONFIG_SPL_RELOC_MALLOC_ADDR (CONFIG_SPL_GD_ADDR + 12 * 1024) +#define CONFIG_SPL_RELOC_MALLOC_SIZE (50 << 10) +#define CONFIG_SPL_RELOC_STACK (CONFIG_SPL_GD_ADDR + 64 * 1024) +#define CONFIG_SPL_RELOC_STACK_SIZE (22 << 10) #define CONFIG_SYS_DCSRBAR 0xf0000000 #define CONFIG_SYS_DCSRBAR_PHYS 0xf00000000ull @@ -96,7 +105,11 @@ #define CONFIG_SYS_FLASH_BASE_PHYS (0xf00000000ull | CONFIG_SYS_FLASH_BASE) -#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE +#ifdef CONFIG_SPL_BUILD +#define CONFIG_SYS_MONITOR_BASE CONFIG_SPL_TEXT_BASE +#else +#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE /* start of monitor */ +#endif #define CONFIG_BOARD_EARLY_INIT_R /* call board_early_init_r function */ #define CONFIG_MISC_INIT_R -- cgit v1.2.3 From e7e9090108f1ccd0c3cae17d189eeac690946a6e Mon Sep 17 00:00:00 2001 From: Heiko Schocher Date: Sat, 25 Jan 2014 07:53:46 +0100 Subject: powerpc, ids8247: create vendor board dir ids create vendor board directory ids and move ids8247 board to it. Signed-off-by: Heiko Schocher Cc: Wolfgang Denk Signed-off-by: Kim Phillips --- board/ids/ids8247/Makefile | 11 ++ board/ids/ids8247/ids8247.c | 390 ++++++++++++++++++++++++++++++++++++++++++++ board/ids8247/Makefile | 11 -- board/ids8247/ids8247.c | 390 -------------------------------------------- boards.cfg | 3 +- 5 files changed, 403 insertions(+), 402 deletions(-) create mode 100644 board/ids/ids8247/Makefile create mode 100644 board/ids/ids8247/ids8247.c delete mode 100644 board/ids8247/Makefile delete mode 100644 board/ids8247/ids8247.c (limited to 'board') diff --git a/board/ids/ids8247/Makefile b/board/ids/ids8247/Makefile new file mode 100644 index 00000000000..99c47b6697c --- /dev/null +++ b/board/ids/ids8247/Makefile @@ -0,0 +1,11 @@ +# +# (C) Copyright 2006 +# Wolfgang Denk, DENX Software Engineering, wd@denx.de. +# +# (C) Copyright 2005 +# Heiko Schocher, DENX Software Engineering, +# +# SPDX-License-Identifier: GPL-2.0+ +# + +obj-y = ids8247.o diff --git a/board/ids/ids8247/ids8247.c b/board/ids/ids8247/ids8247.c new file mode 100644 index 00000000000..1b2d0e09a95 --- /dev/null +++ b/board/ids/ids8247/ids8247.c @@ -0,0 +1,390 @@ +/* + * (C) Copyright 2005 + * Heiko Schocher, DENX Software Engineering, + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#include +#include +#include + +#if defined(CONFIG_OF_LIBFDT) +#include +#include +#include +#endif + +DECLARE_GLOBAL_DATA_PTR; + +/* + * I/O Port configuration table + * + * if conf is 1, then that port pin will be configured at boot time + * according to the five values podr/pdir/ppar/psor/pdat for that entry + */ + +const iop_conf_t iop_conf_tab[4][32] = { + + /* Port A configuration */ + { /* conf ppar psor pdir podr pdat */ + /* PA31 */ { 1, 1, 1, 0, 0, 0 }, /* FCC1 COL */ + /* PA30 */ { 1, 1, 1, 0, 0, 0 }, /* FCC1 CRS */ + /* PA29 */ { 1, 1, 1, 1, 0, 0 }, /* FCC1 TXER */ + /* PA28 */ { 1, 1, 1, 1, 0, 0 }, /* FCC1 TXEN */ + /* PA27 */ { 1, 1, 1, 0, 0, 0 }, /* FCC1 RXDV */ + /* PA26 */ { 1, 1, 1, 0, 0, 0 }, /* FCC1 RXER */ + /* PA25 */ { 0, 0, 0, 0, 1, 0 }, /* 8247_P0 */ +#if defined(CONFIG_SYS_I2C_SOFT) + /* PA24 */ { 1, 0, 0, 0, 1, 1 }, /* I2C_SDA2 */ + /* PA23 */ { 1, 0, 0, 1, 1, 1 }, /* I2C_SCL2 */ +#else /* normal I/O port pins */ + /* PA24 */ { 0, 0, 0, 1, 0, 0 }, /* PA24 */ + /* PA23 */ { 0, 0, 0, 1, 0, 0 }, /* PA23 */ +#endif + /* PA22 */ { 0, 0, 0, 0, 1, 0 }, /* SMC2_DCD */ + /* PA21 */ { 1, 1, 0, 1, 0, 0 }, /* FCC1 TXD3 */ + /* PA20 */ { 1, 1, 0, 1, 0, 0 }, /* FCC1 TXD2 */ + /* PA19 */ { 1, 1, 0, 1, 0, 0 }, /* FCC1 TXD1 */ + /* PA18 */ { 1, 1, 0, 1, 0, 0 }, /* FCC1 TXD0 */ + /* PA17 */ { 1, 1, 0, 0, 0, 0 }, /* FCC1 RXD0 */ + /* PA16 */ { 1, 1, 0, 0, 0, 0 }, /* FCC1 RXD1 */ + /* PA15 */ { 1, 1, 0, 0, 0, 0 }, /* FCC1 RXD2 */ + /* PA14 */ { 1, 1, 0, 0, 0, 0 }, /* FCC1 RXD3 */ + /* PA13 */ { 0, 0, 0, 1, 1, 0 }, /* SMC2_RTS */ + /* PA12 */ { 0, 0, 0, 0, 1, 0 }, /* SMC2_CTS */ + /* PA11 */ { 0, 0, 0, 1, 1, 0 }, /* SMC2_DTR */ + /* PA10 */ { 0, 0, 0, 0, 1, 0 }, /* SMC2_DSR */ + /* PA9 */ { 0, 1, 0, 1, 0, 0 }, /* SMC2 TXD */ + /* PA8 */ { 0, 1, 0, 0, 0, 0 }, /* SMC2 RXD */ + /* PA7 */ { 0, 0, 0, 1, 0, 0 }, /* PA7 */ + /* PA6 */ { 0, 0, 0, 1, 0, 0 }, /* PA6 */ + /* PA5 */ { 0, 0, 0, 1, 0, 0 }, /* PA5 */ + /* PA4 */ { 0, 0, 0, 1, 0, 0 }, /* PA4 */ + /* PA3 */ { 0, 0, 0, 1, 0, 0 }, /* PA3 */ + /* PA2 */ { 0, 0, 0, 1, 0, 0 }, /* PA2 */ + /* PA1 */ { 0, 0, 0, 1, 0, 0 }, /* PA1 */ + /* PA0 */ { 0, 0, 0, 1, 0, 0 } /* PA0 */ + }, + + /* Port B configuration */ + { /* conf ppar psor pdir podr pdat */ + /* PB31 */ { 0, 1, 0, 1, 0, 0 }, /* FCC2 MII TX_ER */ + /* PB30 */ { 0, 1, 0, 0, 0, 0 }, /* FCC2 MII RX_DV */ + /* PB29 */ { 0, 1, 1, 1, 0, 0 }, /* FCC2 MII TX_EN */ + /* PB28 */ { 0, 1, 0, 0, 0, 0 }, /* FCC2 MII RX_ER */ + /* PB27 */ { 0, 1, 0, 0, 0, 0 }, /* FCC2 MII COL */ + /* PB26 */ { 0, 1, 0, 0, 0, 0 }, /* FCC2 MII CRS */ + /* PB25 */ { 0, 1, 0, 1, 0, 0 }, /* FCC2 MII TxD[3] */ + /* PB24 */ { 0, 1, 0, 1, 0, 0 }, /* FCC2 MII TxD[2] */ + /* PB23 */ { 0, 1, 0, 1, 0, 0 }, /* FCC2 MII TxD[1] */ + /* PB22 */ { 0, 1, 0, 1, 0, 0 }, /* FCC2 MII TxD[0] */ + /* PB21 */ { 0, 1, 0, 0, 0, 0 }, /* FCC2 MII RxD[0] */ + /* PB20 */ { 0, 1, 0, 0, 0, 0 }, /* FCC2 MII RxD[1] */ + /* PB19 */ { 0, 1, 0, 0, 0, 0 }, /* FCC2 MII RxD[2] */ + /* PB18 */ { 0, 1, 0, 0, 0, 0 }, /* FCC2 MII RxD[3] */ + /* PB17 */ { 0, 0, 0, 0, 0, 0 }, /* PB17 */ + /* PB16 */ { 0, 0, 0, 0, 0, 0 }, /* PB16 */ + /* PB15 */ { 0, 0, 0, 0, 0, 0 }, /* PB15 */ + /* PB14 */ { 0, 0, 0, 0, 0, 0 }, /* PB14 */ + /* PB13 */ { 0, 0, 0, 0, 0, 0 }, /* PB13 */ + /* PB12 */ { 0, 0, 0, 0, 0, 0 }, /* PB12 */ + /* PB11 */ { 0, 0, 0, 0, 0, 0 }, /* PB11 */ + /* PB10 */ { 0, 0, 0, 0, 0, 0 }, /* PB10 */ + /* PB9 */ { 0, 0, 0, 0, 0, 0 }, /* PB9 */ + /* PB8 */ { 0, 0, 0, 0, 0, 0 }, /* PB8 */ + /* PB7 */ { 0, 0, 0, 0, 0, 0 }, /* PB7 */ + /* PB6 */ { 0, 0, 0, 0, 0, 0 }, /* PB6 */ + /* PB5 */ { 0, 0, 0, 0, 0, 0 }, /* PB5 */ + /* PB4 */ { 0, 0, 0, 0, 0, 0 }, /* PB4 */ + /* PB3 */ { 0, 0, 0, 0, 0, 0 }, /* pin doesn't exist */ + /* PB2 */ { 0, 0, 0, 0, 0, 0 }, /* pin doesn't exist */ + /* PB1 */ { 0, 0, 0, 0, 0, 0 }, /* pin doesn't exist */ + /* PB0 */ { 0, 0, 0, 0, 0, 0 } /* pin doesn't exist */ + }, + + /* Port C */ + { /* conf ppar psor pdir podr pdat */ + /* PC31 */ { 0, 0, 0, 1, 0, 0 }, /* PC31 */ + /* PC30 */ { 0, 0, 0, 1, 0, 0 }, /* PC30 */ + /* PC29 */ { 0, 1, 0, 0, 0, 0 }, /* SCC1 EN *CLSN */ + /* PC28 */ { 0, 1, 1, 0, 0, 0 }, /* SYNC_OUT */ + /* PC27 */ { 0, 0, 0, 1, 0, 0 }, /* PC27 */ + /* PC26 */ { 0, 0, 0, 1, 0, 0 }, /* PC26 */ + /* PC25 */ { 0, 1, 1, 0, 0, 0 }, /* SYNC_IN */ + /* PC24 */ { 0, 0, 0, 1, 0, 0 }, /* PC24 */ + /* PC23 */ { 1, 1, 0, 0, 0, 0 }, /* FCC1 MII TX_CLK */ + /* PC22 */ { 1, 1, 0, 0, 0, 0 }, /* FCC1 MII RX_CLK */ + /* PC21 */ { 0, 1, 0, 0, 0, 0 }, /* SCC1 EN RXCLK */ + /* PC20 */ { 0, 1, 0, 0, 0, 0 }, /* SCC1 EN TXCLK */ + /* PC19 */ { 1, 1, 0, 0, 0, 0 }, /* FCC2 MII RX_CLK */ + /* PC18 */ { 1, 1, 0, 0, 0, 0 }, /* FCC2 MII TX_CLK */ + /* PC17 */ { 0, 0, 0, 1, 0, 0 }, /* PC17 */ + /* PC16 */ { 0, 0, 0, 1, 0, 0 }, /* PC16 */ + /* PC15 */ { 0, 0, 0, 1, 0, 0 }, /* PC15 */ + /* PC14 */ { 0, 1, 0, 0, 0, 0 }, /* SCC1 EN *CD */ + /* PC13 */ { 0, 0, 0, 1, 0, 0 }, /* PC13 */ + /* PC12 */ { 0, 0, 0, 1, 0, 0 }, /* PC12 */ + /* PC11 */ { 0, 0, 0, 1, 0, 0 }, /* PC11 */ + /* PC10 */ { 0, 0, 0, 1, 0, 0 }, /* FCC2 MDC */ + /* PC9 */ { 0, 0, 0, 1, 0, 0 }, /* FCC2 MDIO */ + /* PC8 */ { 0, 0, 0, 1, 0, 0 }, /* PC8 */ + /* PC7 */ { 0, 0, 0, 1, 0, 0 }, /* PC7 */ + /* PC6 */ { 0, 0, 0, 1, 0, 0 }, /* PC6 */ + /* PC5 */ { 0, 0, 0, 1, 0, 0 }, /* PC5 */ + /* PC4 */ { 0, 0, 0, 1, 0, 0 }, /* PC4 */ + /* PC3 */ { 0, 0, 0, 1, 0, 0 }, /* PC3 */ + /* PC2 */ { 0, 0, 0, 1, 0, 1 }, /* ENET FDE */ + /* PC1 */ { 0, 0, 0, 1, 0, 0 }, /* ENET DSQE */ + /* PC0 */ { 0, 0, 0, 1, 0, 0 }, /* ENET LBK */ + }, + + /* Port D */ + { /* conf ppar psor pdir podr pdat */ + /* PD31 */ { 0, 1, 0, 0, 0, 0 }, /* SCC1 EN RxD */ + /* PD30 */ { 0, 1, 1, 1, 0, 0 }, /* SCC1 EN TxD */ + /* PD29 */ { 0, 1, 0, 1, 0, 0 }, /* SCC1 EN TENA */ + /* PD28 */ { 0, 0, 0, 1, 0, 0 }, /* PD28 */ + /* PD27 */ { 0, 0, 0, 1, 0, 0 }, /* PD27 */ + /* PD26 */ { 0, 0, 0, 1, 0, 0 }, /* PD26 */ + /* PD25 */ { 0, 1, 0, 0, 0, 0 }, /* SCC3_RX */ + /* PD24 */ { 0, 1, 0, 1, 0, 0 }, /* SCC3_TX */ + /* PD23 */ { 0, 1, 0, 1, 0, 0 }, /* SCC3_RTS */ + /* PD22 */ { 0, 1, 0, 0, 0, 0 }, /* SCC4_RXD */ + /* PD21 */ { 0, 1, 0, 1, 0, 0 }, /* SCC4_TXD */ + /* PD20 */ { 0, 1, 0, 1, 0, 0 }, /* SCC4_RTS */ + /* PD19 */ { 0, 1, 1, 0, 0, 0 }, /* SPI_SEL */ + /* PD18 */ { 0, 1, 1, 0, 0, 0 }, /* SPI_CLK */ + /* PD17 */ { 0, 1, 1, 0, 0, 0 }, /* SPI_MOSI */ + /* PD16 */ { 0, 1, 1, 0, 0, 0 }, /* SPI_MISO */ +#if defined(CONFIG_HARD_I2C) + /* PD15 */ { 1, 1, 1, 0, 1, 0 }, /* I2C SDA1 */ + /* PD14 */ { 1, 1, 1, 0, 1, 0 }, /* I2C SCL1 */ +#else /* normal I/O port pins */ + /* PD15 */ { 0, 1, 1, 0, 1, 0 }, /* PD15 */ + /* PD14 */ { 0, 1, 1, 0, 1, 0 }, /* PD14 */ +#endif + /* PD13 */ { 0, 0, 0, 0, 0, 0 }, /* PD13 */ + /* PD12 */ { 0, 0, 0, 0, 0, 0 }, /* PD12 */ + /* PD11 */ { 0, 0, 0, 0, 0, 0 }, /* PD11 */ + /* PD10 */ { 0, 0, 0, 0, 0, 0 }, /* PD10 */ + /* PD9 */ { 0, 0, 0, 0, 0, 0 }, /* PD9 */ + /* PD8 */ { 0, 0, 0, 0, 0, 0 }, /* PD8 */ + /* PD7 */ { 1, 0, 0, 1, 0, 1 }, /* MII_MDIO */ + /* PD6 */ { 0, 0, 0, 1, 0, 1 }, /* PD6 */ + /* PD5 */ { 0, 0, 0, 1, 0, 1 }, /* PD5 */ + /* PD4 */ { 0, 0, 0, 1, 0, 1 }, /* PD4 */ + /* PD3 */ { 0, 0, 0, 0, 0, 0 }, /* pin doesn't exist */ + /* PD2 */ { 0, 0, 0, 0, 0, 0 }, /* pin doesn't exist */ + /* PD1 */ { 0, 0, 0, 0, 0, 0 }, /* pin doesn't exist */ + /* PD0 */ { 0, 0, 0, 0, 0, 0 } /* pin doesn't exist */ + } +}; + +/* ------------------------------------------------------------------------- */ + +/* Check Board Identity: + */ +int checkboard (void) +{ + puts ("Board: IDS 8247\n"); + return 0; +} + +/* ------------------------------------------------------------------------- */ + +/* Try SDRAM initialization with P/LSDMR=sdmr and ORx=orx + * + * This routine performs standard 8260 initialization sequence + * and calculates the available memory size. It may be called + * several times to try different SDRAM configurations on both + * 60x and local buses. + */ +static long int try_init (volatile memctl8260_t * memctl, ulong sdmr, + ulong orx, volatile uchar * base) +{ + volatile uchar c = 0xff; + volatile uint *sdmr_ptr; + volatile uint *orx_ptr; + ulong maxsize, size; + int i; + + /* We must be able to test a location outsize the maximum legal size + * to find out THAT we are outside; but this address still has to be + * mapped by the controller. That means, that the initial mapping has + * to be (at least) twice as large as the maximum expected size. + */ + maxsize = (1 + (~orx | 0x7fff))/* / 2*/; + + sdmr_ptr = &memctl->memc_psdmr; + orx_ptr = &memctl->memc_or2; + + *orx_ptr = orx; + + /* + * Quote from 8260 UM (10.4.2 SDRAM Power-On Initialization, 10-35): + * + * "At system reset, initialization software must set up the + * programmable parameters in the memory controller banks registers + * (ORx, BRx, P/LSDMR). After all memory parameters are configured, + * system software should execute the following initialization sequence + * for each SDRAM device. + * + * 1. Issue a PRECHARGE-ALL-BANKS command + * 2. Issue eight CBR REFRESH commands + * 3. Issue a MODE-SET command to initialize the mode register + * + * The initial commands are executed by setting P/LSDMR[OP] and + * accessing the SDRAM with a single-byte transaction." + * + * The appropriate BRx/ORx registers have already been set when we + * get here. The SDRAM can be accessed at the address CONFIG_SYS_SDRAM_BASE. + */ + + *sdmr_ptr = sdmr | PSDMR_OP_PREA; + *base = c; + + *sdmr_ptr = sdmr | PSDMR_OP_CBRR; + for (i = 0; i < 8; i++) + *base = c; + + *sdmr_ptr = sdmr | PSDMR_OP_MRW; + *(base + CONFIG_SYS_MRS_OFFS) = c; /* setting MR on address lines */ + + *sdmr_ptr = sdmr | PSDMR_OP_NORM | PSDMR_RFEN; + *base = c; + + size = get_ram_size((long *)base, maxsize); + *orx_ptr = orx | ~(size - 1); + + return (size); +} + +phys_size_t initdram (int board_type) +{ + volatile immap_t *immap = (immap_t *) CONFIG_SYS_IMMR; + volatile memctl8260_t *memctl = &immap->im_memctl; + + long psize; + + psize = 16 * 1024 * 1024; + + memctl->memc_psrt = CONFIG_SYS_PSRT; + memctl->memc_mptpr = CONFIG_SYS_MPTPR; + +#ifndef CONFIG_SYS_RAMBOOT + /* 60x SDRAM setup: + */ + psize = try_init (memctl, CONFIG_SYS_PSDMR, CONFIG_SYS_OR2, + (uchar *) CONFIG_SYS_SDRAM_BASE); +#endif /* CONFIG_SYS_RAMBOOT */ + + icache_enable (); + + return (psize); +} + +int misc_init_r (void) +{ + gd->bd->bi_flashstart = 0xff800000; + return 0; +} + +#if defined(CONFIG_CMD_NAND) +#include +#include +#include + +static u8 hwctl; + +static void ids_nand_hwctrl(struct mtd_info *mtd, int cmd, unsigned int ctrl) +{ + struct nand_chip *this = mtd->priv; + + if (ctrl & NAND_CTRL_CHANGE) { + if ( ctrl & NAND_CLE ) { + hwctl |= 0x1; + writeb(0x00, (this->IO_ADDR_W + 0x0a)); + } else { + hwctl &= ~0x1; + writeb(0x00, (this->IO_ADDR_W + 0x08)); + } + if ( ctrl & NAND_ALE ) { + hwctl |= 0x2; + writeb(0x00, (this->IO_ADDR_W + 0x09)); + } else { + hwctl &= ~0x2; + writeb(0x00, (this->IO_ADDR_W + 0x08)); + } + if ( (ctrl & NAND_NCE) != NAND_NCE) + writeb(0x00, (this->IO_ADDR_W + 0x0c)); + else + writeb(0x00, (this->IO_ADDR_W + 0x08)); + } + if (cmd != NAND_CMD_NONE) + writeb(cmd, this->IO_ADDR_W); + +} + +static u_char ids_nand_read_byte(struct mtd_info *mtd) +{ + struct nand_chip *this = mtd->priv; + + return readb(this->IO_ADDR_R); +} + +static void ids_nand_write_buf(struct mtd_info *mtd, const u_char *buf, int len) +{ + struct nand_chip *nand = mtd->priv; + int i; + + for (i = 0; i < len; i++) { + if (hwctl & 0x1) + writeb(buf[i], (nand->IO_ADDR_W + 0x02)); + else if (hwctl & 0x2) + writeb(buf[i], (nand->IO_ADDR_W + 0x01)); + else + writeb(buf[i], nand->IO_ADDR_W); + } +} + +static void ids_nand_read_buf(struct mtd_info *mtd, u_char *buf, int len) +{ + struct nand_chip *this = mtd->priv; + int i; + + for (i = 0; i < len; i++) { + buf[i] = readb(this->IO_ADDR_R); + } +} + +static int ids_nand_dev_ready(struct mtd_info *mtd) +{ + /* constant delay (see also tR in the datasheet) */ + udelay(12); + return 1; +} + +int board_nand_init(struct nand_chip *nand) +{ + nand->ecc.mode = NAND_ECC_SOFT; + + /* Reference hardware control function */ + nand->cmd_ctrl = ids_nand_hwctrl; + nand->read_byte = ids_nand_read_byte; + nand->write_buf = ids_nand_write_buf; + nand->read_buf = ids_nand_read_buf; + nand->dev_ready = ids_nand_dev_ready; + nand->chip_delay = 12; + + return 0; +} + +#endif /* CONFIG_CMD_NAND */ + +#if defined(CONFIG_OF_BOARD_SETUP) && defined(CONFIG_OF_LIBFDT) +void ft_board_setup(void *blob, bd_t *bd) +{ + ft_cpu_setup( blob, bd); +} +#endif /* defined(CONFIG_OF_BOARD_SETUP) && defined(CONFIG_OF_LIBFDT) */ diff --git a/board/ids8247/Makefile b/board/ids8247/Makefile deleted file mode 100644 index 99c47b6697c..00000000000 --- a/board/ids8247/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -# -# (C) Copyright 2006 -# Wolfgang Denk, DENX Software Engineering, wd@denx.de. -# -# (C) Copyright 2005 -# Heiko Schocher, DENX Software Engineering, -# -# SPDX-License-Identifier: GPL-2.0+ -# - -obj-y = ids8247.o diff --git a/board/ids8247/ids8247.c b/board/ids8247/ids8247.c deleted file mode 100644 index 1b2d0e09a95..00000000000 --- a/board/ids8247/ids8247.c +++ /dev/null @@ -1,390 +0,0 @@ -/* - * (C) Copyright 2005 - * Heiko Schocher, DENX Software Engineering, - * - * SPDX-License-Identifier: GPL-2.0+ - */ - -#include -#include -#include - -#if defined(CONFIG_OF_LIBFDT) -#include -#include -#include -#endif - -DECLARE_GLOBAL_DATA_PTR; - -/* - * I/O Port configuration table - * - * if conf is 1, then that port pin will be configured at boot time - * according to the five values podr/pdir/ppar/psor/pdat for that entry - */ - -const iop_conf_t iop_conf_tab[4][32] = { - - /* Port A configuration */ - { /* conf ppar psor pdir podr pdat */ - /* PA31 */ { 1, 1, 1, 0, 0, 0 }, /* FCC1 COL */ - /* PA30 */ { 1, 1, 1, 0, 0, 0 }, /* FCC1 CRS */ - /* PA29 */ { 1, 1, 1, 1, 0, 0 }, /* FCC1 TXER */ - /* PA28 */ { 1, 1, 1, 1, 0, 0 }, /* FCC1 TXEN */ - /* PA27 */ { 1, 1, 1, 0, 0, 0 }, /* FCC1 RXDV */ - /* PA26 */ { 1, 1, 1, 0, 0, 0 }, /* FCC1 RXER */ - /* PA25 */ { 0, 0, 0, 0, 1, 0 }, /* 8247_P0 */ -#if defined(CONFIG_SYS_I2C_SOFT) - /* PA24 */ { 1, 0, 0, 0, 1, 1 }, /* I2C_SDA2 */ - /* PA23 */ { 1, 0, 0, 1, 1, 1 }, /* I2C_SCL2 */ -#else /* normal I/O port pins */ - /* PA24 */ { 0, 0, 0, 1, 0, 0 }, /* PA24 */ - /* PA23 */ { 0, 0, 0, 1, 0, 0 }, /* PA23 */ -#endif - /* PA22 */ { 0, 0, 0, 0, 1, 0 }, /* SMC2_DCD */ - /* PA21 */ { 1, 1, 0, 1, 0, 0 }, /* FCC1 TXD3 */ - /* PA20 */ { 1, 1, 0, 1, 0, 0 }, /* FCC1 TXD2 */ - /* PA19 */ { 1, 1, 0, 1, 0, 0 }, /* FCC1 TXD1 */ - /* PA18 */ { 1, 1, 0, 1, 0, 0 }, /* FCC1 TXD0 */ - /* PA17 */ { 1, 1, 0, 0, 0, 0 }, /* FCC1 RXD0 */ - /* PA16 */ { 1, 1, 0, 0, 0, 0 }, /* FCC1 RXD1 */ - /* PA15 */ { 1, 1, 0, 0, 0, 0 }, /* FCC1 RXD2 */ - /* PA14 */ { 1, 1, 0, 0, 0, 0 }, /* FCC1 RXD3 */ - /* PA13 */ { 0, 0, 0, 1, 1, 0 }, /* SMC2_RTS */ - /* PA12 */ { 0, 0, 0, 0, 1, 0 }, /* SMC2_CTS */ - /* PA11 */ { 0, 0, 0, 1, 1, 0 }, /* SMC2_DTR */ - /* PA10 */ { 0, 0, 0, 0, 1, 0 }, /* SMC2_DSR */ - /* PA9 */ { 0, 1, 0, 1, 0, 0 }, /* SMC2 TXD */ - /* PA8 */ { 0, 1, 0, 0, 0, 0 }, /* SMC2 RXD */ - /* PA7 */ { 0, 0, 0, 1, 0, 0 }, /* PA7 */ - /* PA6 */ { 0, 0, 0, 1, 0, 0 }, /* PA6 */ - /* PA5 */ { 0, 0, 0, 1, 0, 0 }, /* PA5 */ - /* PA4 */ { 0, 0, 0, 1, 0, 0 }, /* PA4 */ - /* PA3 */ { 0, 0, 0, 1, 0, 0 }, /* PA3 */ - /* PA2 */ { 0, 0, 0, 1, 0, 0 }, /* PA2 */ - /* PA1 */ { 0, 0, 0, 1, 0, 0 }, /* PA1 */ - /* PA0 */ { 0, 0, 0, 1, 0, 0 } /* PA0 */ - }, - - /* Port B configuration */ - { /* conf ppar psor pdir podr pdat */ - /* PB31 */ { 0, 1, 0, 1, 0, 0 }, /* FCC2 MII TX_ER */ - /* PB30 */ { 0, 1, 0, 0, 0, 0 }, /* FCC2 MII RX_DV */ - /* PB29 */ { 0, 1, 1, 1, 0, 0 }, /* FCC2 MII TX_EN */ - /* PB28 */ { 0, 1, 0, 0, 0, 0 }, /* FCC2 MII RX_ER */ - /* PB27 */ { 0, 1, 0, 0, 0, 0 }, /* FCC2 MII COL */ - /* PB26 */ { 0, 1, 0, 0, 0, 0 }, /* FCC2 MII CRS */ - /* PB25 */ { 0, 1, 0, 1, 0, 0 }, /* FCC2 MII TxD[3] */ - /* PB24 */ { 0, 1, 0, 1, 0, 0 }, /* FCC2 MII TxD[2] */ - /* PB23 */ { 0, 1, 0, 1, 0, 0 }, /* FCC2 MII TxD[1] */ - /* PB22 */ { 0, 1, 0, 1, 0, 0 }, /* FCC2 MII TxD[0] */ - /* PB21 */ { 0, 1, 0, 0, 0, 0 }, /* FCC2 MII RxD[0] */ - /* PB20 */ { 0, 1, 0, 0, 0, 0 }, /* FCC2 MII RxD[1] */ - /* PB19 */ { 0, 1, 0, 0, 0, 0 }, /* FCC2 MII RxD[2] */ - /* PB18 */ { 0, 1, 0, 0, 0, 0 }, /* FCC2 MII RxD[3] */ - /* PB17 */ { 0, 0, 0, 0, 0, 0 }, /* PB17 */ - /* PB16 */ { 0, 0, 0, 0, 0, 0 }, /* PB16 */ - /* PB15 */ { 0, 0, 0, 0, 0, 0 }, /* PB15 */ - /* PB14 */ { 0, 0, 0, 0, 0, 0 }, /* PB14 */ - /* PB13 */ { 0, 0, 0, 0, 0, 0 }, /* PB13 */ - /* PB12 */ { 0, 0, 0, 0, 0, 0 }, /* PB12 */ - /* PB11 */ { 0, 0, 0, 0, 0, 0 }, /* PB11 */ - /* PB10 */ { 0, 0, 0, 0, 0, 0 }, /* PB10 */ - /* PB9 */ { 0, 0, 0, 0, 0, 0 }, /* PB9 */ - /* PB8 */ { 0, 0, 0, 0, 0, 0 }, /* PB8 */ - /* PB7 */ { 0, 0, 0, 0, 0, 0 }, /* PB7 */ - /* PB6 */ { 0, 0, 0, 0, 0, 0 }, /* PB6 */ - /* PB5 */ { 0, 0, 0, 0, 0, 0 }, /* PB5 */ - /* PB4 */ { 0, 0, 0, 0, 0, 0 }, /* PB4 */ - /* PB3 */ { 0, 0, 0, 0, 0, 0 }, /* pin doesn't exist */ - /* PB2 */ { 0, 0, 0, 0, 0, 0 }, /* pin doesn't exist */ - /* PB1 */ { 0, 0, 0, 0, 0, 0 }, /* pin doesn't exist */ - /* PB0 */ { 0, 0, 0, 0, 0, 0 } /* pin doesn't exist */ - }, - - /* Port C */ - { /* conf ppar psor pdir podr pdat */ - /* PC31 */ { 0, 0, 0, 1, 0, 0 }, /* PC31 */ - /* PC30 */ { 0, 0, 0, 1, 0, 0 }, /* PC30 */ - /* PC29 */ { 0, 1, 0, 0, 0, 0 }, /* SCC1 EN *CLSN */ - /* PC28 */ { 0, 1, 1, 0, 0, 0 }, /* SYNC_OUT */ - /* PC27 */ { 0, 0, 0, 1, 0, 0 }, /* PC27 */ - /* PC26 */ { 0, 0, 0, 1, 0, 0 }, /* PC26 */ - /* PC25 */ { 0, 1, 1, 0, 0, 0 }, /* SYNC_IN */ - /* PC24 */ { 0, 0, 0, 1, 0, 0 }, /* PC24 */ - /* PC23 */ { 1, 1, 0, 0, 0, 0 }, /* FCC1 MII TX_CLK */ - /* PC22 */ { 1, 1, 0, 0, 0, 0 }, /* FCC1 MII RX_CLK */ - /* PC21 */ { 0, 1, 0, 0, 0, 0 }, /* SCC1 EN RXCLK */ - /* PC20 */ { 0, 1, 0, 0, 0, 0 }, /* SCC1 EN TXCLK */ - /* PC19 */ { 1, 1, 0, 0, 0, 0 }, /* FCC2 MII RX_CLK */ - /* PC18 */ { 1, 1, 0, 0, 0, 0 }, /* FCC2 MII TX_CLK */ - /* PC17 */ { 0, 0, 0, 1, 0, 0 }, /* PC17 */ - /* PC16 */ { 0, 0, 0, 1, 0, 0 }, /* PC16 */ - /* PC15 */ { 0, 0, 0, 1, 0, 0 }, /* PC15 */ - /* PC14 */ { 0, 1, 0, 0, 0, 0 }, /* SCC1 EN *CD */ - /* PC13 */ { 0, 0, 0, 1, 0, 0 }, /* PC13 */ - /* PC12 */ { 0, 0, 0, 1, 0, 0 }, /* PC12 */ - /* PC11 */ { 0, 0, 0, 1, 0, 0 }, /* PC11 */ - /* PC10 */ { 0, 0, 0, 1, 0, 0 }, /* FCC2 MDC */ - /* PC9 */ { 0, 0, 0, 1, 0, 0 }, /* FCC2 MDIO */ - /* PC8 */ { 0, 0, 0, 1, 0, 0 }, /* PC8 */ - /* PC7 */ { 0, 0, 0, 1, 0, 0 }, /* PC7 */ - /* PC6 */ { 0, 0, 0, 1, 0, 0 }, /* PC6 */ - /* PC5 */ { 0, 0, 0, 1, 0, 0 }, /* PC5 */ - /* PC4 */ { 0, 0, 0, 1, 0, 0 }, /* PC4 */ - /* PC3 */ { 0, 0, 0, 1, 0, 0 }, /* PC3 */ - /* PC2 */ { 0, 0, 0, 1, 0, 1 }, /* ENET FDE */ - /* PC1 */ { 0, 0, 0, 1, 0, 0 }, /* ENET DSQE */ - /* PC0 */ { 0, 0, 0, 1, 0, 0 }, /* ENET LBK */ - }, - - /* Port D */ - { /* conf ppar psor pdir podr pdat */ - /* PD31 */ { 0, 1, 0, 0, 0, 0 }, /* SCC1 EN RxD */ - /* PD30 */ { 0, 1, 1, 1, 0, 0 }, /* SCC1 EN TxD */ - /* PD29 */ { 0, 1, 0, 1, 0, 0 }, /* SCC1 EN TENA */ - /* PD28 */ { 0, 0, 0, 1, 0, 0 }, /* PD28 */ - /* PD27 */ { 0, 0, 0, 1, 0, 0 }, /* PD27 */ - /* PD26 */ { 0, 0, 0, 1, 0, 0 }, /* PD26 */ - /* PD25 */ { 0, 1, 0, 0, 0, 0 }, /* SCC3_RX */ - /* PD24 */ { 0, 1, 0, 1, 0, 0 }, /* SCC3_TX */ - /* PD23 */ { 0, 1, 0, 1, 0, 0 }, /* SCC3_RTS */ - /* PD22 */ { 0, 1, 0, 0, 0, 0 }, /* SCC4_RXD */ - /* PD21 */ { 0, 1, 0, 1, 0, 0 }, /* SCC4_TXD */ - /* PD20 */ { 0, 1, 0, 1, 0, 0 }, /* SCC4_RTS */ - /* PD19 */ { 0, 1, 1, 0, 0, 0 }, /* SPI_SEL */ - /* PD18 */ { 0, 1, 1, 0, 0, 0 }, /* SPI_CLK */ - /* PD17 */ { 0, 1, 1, 0, 0, 0 }, /* SPI_MOSI */ - /* PD16 */ { 0, 1, 1, 0, 0, 0 }, /* SPI_MISO */ -#if defined(CONFIG_HARD_I2C) - /* PD15 */ { 1, 1, 1, 0, 1, 0 }, /* I2C SDA1 */ - /* PD14 */ { 1, 1, 1, 0, 1, 0 }, /* I2C SCL1 */ -#else /* normal I/O port pins */ - /* PD15 */ { 0, 1, 1, 0, 1, 0 }, /* PD15 */ - /* PD14 */ { 0, 1, 1, 0, 1, 0 }, /* PD14 */ -#endif - /* PD13 */ { 0, 0, 0, 0, 0, 0 }, /* PD13 */ - /* PD12 */ { 0, 0, 0, 0, 0, 0 }, /* PD12 */ - /* PD11 */ { 0, 0, 0, 0, 0, 0 }, /* PD11 */ - /* PD10 */ { 0, 0, 0, 0, 0, 0 }, /* PD10 */ - /* PD9 */ { 0, 0, 0, 0, 0, 0 }, /* PD9 */ - /* PD8 */ { 0, 0, 0, 0, 0, 0 }, /* PD8 */ - /* PD7 */ { 1, 0, 0, 1, 0, 1 }, /* MII_MDIO */ - /* PD6 */ { 0, 0, 0, 1, 0, 1 }, /* PD6 */ - /* PD5 */ { 0, 0, 0, 1, 0, 1 }, /* PD5 */ - /* PD4 */ { 0, 0, 0, 1, 0, 1 }, /* PD4 */ - /* PD3 */ { 0, 0, 0, 0, 0, 0 }, /* pin doesn't exist */ - /* PD2 */ { 0, 0, 0, 0, 0, 0 }, /* pin doesn't exist */ - /* PD1 */ { 0, 0, 0, 0, 0, 0 }, /* pin doesn't exist */ - /* PD0 */ { 0, 0, 0, 0, 0, 0 } /* pin doesn't exist */ - } -}; - -/* ------------------------------------------------------------------------- */ - -/* Check Board Identity: - */ -int checkboard (void) -{ - puts ("Board: IDS 8247\n"); - return 0; -} - -/* ------------------------------------------------------------------------- */ - -/* Try SDRAM initialization with P/LSDMR=sdmr and ORx=orx - * - * This routine performs standard 8260 initialization sequence - * and calculates the available memory size. It may be called - * several times to try different SDRAM configurations on both - * 60x and local buses. - */ -static long int try_init (volatile memctl8260_t * memctl, ulong sdmr, - ulong orx, volatile uchar * base) -{ - volatile uchar c = 0xff; - volatile uint *sdmr_ptr; - volatile uint *orx_ptr; - ulong maxsize, size; - int i; - - /* We must be able to test a location outsize the maximum legal size - * to find out THAT we are outside; but this address still has to be - * mapped by the controller. That means, that the initial mapping has - * to be (at least) twice as large as the maximum expected size. - */ - maxsize = (1 + (~orx | 0x7fff))/* / 2*/; - - sdmr_ptr = &memctl->memc_psdmr; - orx_ptr = &memctl->memc_or2; - - *orx_ptr = orx; - - /* - * Quote from 8260 UM (10.4.2 SDRAM Power-On Initialization, 10-35): - * - * "At system reset, initialization software must set up the - * programmable parameters in the memory controller banks registers - * (ORx, BRx, P/LSDMR). After all memory parameters are configured, - * system software should execute the following initialization sequence - * for each SDRAM device. - * - * 1. Issue a PRECHARGE-ALL-BANKS command - * 2. Issue eight CBR REFRESH commands - * 3. Issue a MODE-SET command to initialize the mode register - * - * The initial commands are executed by setting P/LSDMR[OP] and - * accessing the SDRAM with a single-byte transaction." - * - * The appropriate BRx/ORx registers have already been set when we - * get here. The SDRAM can be accessed at the address CONFIG_SYS_SDRAM_BASE. - */ - - *sdmr_ptr = sdmr | PSDMR_OP_PREA; - *base = c; - - *sdmr_ptr = sdmr | PSDMR_OP_CBRR; - for (i = 0; i < 8; i++) - *base = c; - - *sdmr_ptr = sdmr | PSDMR_OP_MRW; - *(base + CONFIG_SYS_MRS_OFFS) = c; /* setting MR on address lines */ - - *sdmr_ptr = sdmr | PSDMR_OP_NORM | PSDMR_RFEN; - *base = c; - - size = get_ram_size((long *)base, maxsize); - *orx_ptr = orx | ~(size - 1); - - return (size); -} - -phys_size_t initdram (int board_type) -{ - volatile immap_t *immap = (immap_t *) CONFIG_SYS_IMMR; - volatile memctl8260_t *memctl = &immap->im_memctl; - - long psize; - - psize = 16 * 1024 * 1024; - - memctl->memc_psrt = CONFIG_SYS_PSRT; - memctl->memc_mptpr = CONFIG_SYS_MPTPR; - -#ifndef CONFIG_SYS_RAMBOOT - /* 60x SDRAM setup: - */ - psize = try_init (memctl, CONFIG_SYS_PSDMR, CONFIG_SYS_OR2, - (uchar *) CONFIG_SYS_SDRAM_BASE); -#endif /* CONFIG_SYS_RAMBOOT */ - - icache_enable (); - - return (psize); -} - -int misc_init_r (void) -{ - gd->bd->bi_flashstart = 0xff800000; - return 0; -} - -#if defined(CONFIG_CMD_NAND) -#include -#include -#include - -static u8 hwctl; - -static void ids_nand_hwctrl(struct mtd_info *mtd, int cmd, unsigned int ctrl) -{ - struct nand_chip *this = mtd->priv; - - if (ctrl & NAND_CTRL_CHANGE) { - if ( ctrl & NAND_CLE ) { - hwctl |= 0x1; - writeb(0x00, (this->IO_ADDR_W + 0x0a)); - } else { - hwctl &= ~0x1; - writeb(0x00, (this->IO_ADDR_W + 0x08)); - } - if ( ctrl & NAND_ALE ) { - hwctl |= 0x2; - writeb(0x00, (this->IO_ADDR_W + 0x09)); - } else { - hwctl &= ~0x2; - writeb(0x00, (this->IO_ADDR_W + 0x08)); - } - if ( (ctrl & NAND_NCE) != NAND_NCE) - writeb(0x00, (this->IO_ADDR_W + 0x0c)); - else - writeb(0x00, (this->IO_ADDR_W + 0x08)); - } - if (cmd != NAND_CMD_NONE) - writeb(cmd, this->IO_ADDR_W); - -} - -static u_char ids_nand_read_byte(struct mtd_info *mtd) -{ - struct nand_chip *this = mtd->priv; - - return readb(this->IO_ADDR_R); -} - -static void ids_nand_write_buf(struct mtd_info *mtd, const u_char *buf, int len) -{ - struct nand_chip *nand = mtd->priv; - int i; - - for (i = 0; i < len; i++) { - if (hwctl & 0x1) - writeb(buf[i], (nand->IO_ADDR_W + 0x02)); - else if (hwctl & 0x2) - writeb(buf[i], (nand->IO_ADDR_W + 0x01)); - else - writeb(buf[i], nand->IO_ADDR_W); - } -} - -static void ids_nand_read_buf(struct mtd_info *mtd, u_char *buf, int len) -{ - struct nand_chip *this = mtd->priv; - int i; - - for (i = 0; i < len; i++) { - buf[i] = readb(this->IO_ADDR_R); - } -} - -static int ids_nand_dev_ready(struct mtd_info *mtd) -{ - /* constant delay (see also tR in the datasheet) */ - udelay(12); - return 1; -} - -int board_nand_init(struct nand_chip *nand) -{ - nand->ecc.mode = NAND_ECC_SOFT; - - /* Reference hardware control function */ - nand->cmd_ctrl = ids_nand_hwctrl; - nand->read_byte = ids_nand_read_byte; - nand->write_buf = ids_nand_write_buf; - nand->read_buf = ids_nand_read_buf; - nand->dev_ready = ids_nand_dev_ready; - nand->chip_delay = 12; - - return 0; -} - -#endif /* CONFIG_CMD_NAND */ - -#if defined(CONFIG_OF_BOARD_SETUP) && defined(CONFIG_OF_LIBFDT) -void ft_board_setup(void *blob, bd_t *bd) -{ - ft_cpu_setup( blob, bd); -} -#endif /* defined(CONFIG_OF_BOARD_SETUP) && defined(CONFIG_OF_LIBFDT) */ diff --git a/boards.cfg b/boards.cfg index f1f699458b7..c8270b2de06 100644 --- a/boards.cfg +++ b/boards.cfg @@ -649,7 +649,8 @@ Active powerpc mpc8260 - - cpu86 Active powerpc mpc8260 - - cpu86 CPU86_ROMBOOT CPU86:BOOT_ROM Wolfgang Denk Active powerpc mpc8260 - - cpu87 CPU87 - - Active powerpc mpc8260 - - cpu87 CPU87_ROMBOOT CPU87:BOOT_ROM - -Active powerpc mpc8260 - - ids8247 IDS8247 - Heiko Schocher +Active powerpc mpc8260 - - ep8248 ep8248 - Yuli Barcohen +Active powerpc mpc8260 - ids ids8247 IDS8247 - Heiko Schocher Active powerpc mpc8260 - - iphase4539 IPHASE4539 - Wolfgang Grandegger Active powerpc mpc8260 - - muas3001 muas3001 - Heiko Schocher Active powerpc mpc8260 - - muas3001 muas3001_dev muas3001:MUAS_DEV_BOARD Heiko Schocher -- cgit v1.2.3 From eaf8c986d36e9fadd244093b17a7fe090b0b572a Mon Sep 17 00:00:00 2001 From: Heiko Schocher Date: Sat, 25 Jan 2014 07:53:48 +0100 Subject: mpc83xx: add ids8313 support add support for the ids8313 board. CPU: e300c3, MPC8313, Rev: 2.1 at 396 MHz, CSB: 132 MHz I2C: ready SPI: ready DRAM: 128 MiB (DDR2, 32-bit, ECC off, 264 MHz) Flash: 8 MiB NAND: 128 MiB Net: TSEC0, TSEC1 [PRIME] public key on NOR flash start Signed-off-by: Heiko Schocher Signed-off-by: Kim Phillips --- board/ids/ids8313/Makefile | 11 + board/ids/ids8313/ids8313.c | 208 ++++++++++++++++ boards.cfg | 1 + include/configs/ids8313.h | 587 ++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 807 insertions(+) create mode 100644 board/ids/ids8313/Makefile create mode 100644 board/ids/ids8313/ids8313.c create mode 100644 include/configs/ids8313.h (limited to 'board') diff --git a/board/ids/ids8313/Makefile b/board/ids/ids8313/Makefile new file mode 100644 index 00000000000..56cfd403f49 --- /dev/null +++ b/board/ids/ids8313/Makefile @@ -0,0 +1,11 @@ +# +# (C) Copyright 2006 +# Wolfgang Denk, DENX Software Engineering, wd@denx.de. +# +# (C) Copyright 2013 +# Heiko Schocher, DENX Software Engineering, +# +# SPDX-License-Identifier: GPL-2.0+ +# + +obj-y = ids8313.o diff --git a/board/ids/ids8313/ids8313.c b/board/ids/ids8313/ids8313.c new file mode 100644 index 00000000000..f742143bb9d --- /dev/null +++ b/board/ids/ids8313/ids8313.c @@ -0,0 +1,208 @@ +/* + * (C) Copyright 2013 + * Heiko Schocher, DENX Software Engineering, hs@denx.de. + * + * Based on: + * Copyright (c) 2011 IDS GmbH, Germany + * ids8313.c - ids8313 board support. + * + * Sergej Stepanov + * Based on board/freescale/mpc8313erdb/mpc8313erdb.c + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#include +#include +#include +#include + +DECLARE_GLOBAL_DATA_PTR; +/** CPLD contains the info about: + * - board type: *pCpld & 0xF0 + * - hw-revision: *pCpld & 0x0F + * - cpld-revision: *pCpld+1 + */ +int checkboard(void) +{ + char *pcpld = (char *)CONFIG_SYS_CPLD_BASE; + u8 u8Vers = readb(pcpld); + u8 u8Revs = readb(pcpld + 1); + + printf("Board: "); + switch (u8Vers & 0xF0) { + case '\x40': + printf("CU73X"); + break; + case '\x50': + printf("CC73X"); + break; + default: + printf("unknown(0x%02X, 0x%02X)\n", u8Vers, u8Revs); + return 0; + } + printf("\nInfo: HW-Rev: %i, CPLD-Rev: %i\n", + u8Vers & 0x0F, u8Revs & 0xFF); + return 0; +} + +/* + * fixed sdram init + */ +int fixed_sdram(unsigned long config) +{ + immap_t *im = (immap_t *)CONFIG_SYS_IMMR; + u32 msize = CONFIG_SYS_DDR_SIZE << 20; + +#ifndef CONFIG_SYS_RAMBOOT + u32 msize_log2 = __ilog2(msize); + + out_be32(&im->sysconf.ddrlaw[0].bar, + (CONFIG_SYS_DDR_SDRAM_BASE & 0xfffff000)); + out_be32(&im->sysconf.ddrlaw[0].ar, LBLAWAR_EN | (msize_log2 - 1)); + out_be32(&im->sysconf.ddrcdr, CONFIG_SYS_DDRCDR_VALUE); + sync(); + + /* + * Erratum DDR3 requires a 50ms delay after clearing DDRCDR[DDR_cfg], + * or the DDR2 controller may fail to initialize correctly. + */ + udelay(50000); + + out_be32(&im->ddr.csbnds[0].csbnds, (msize - 1) >> 24); + out_be32(&im->ddr.cs_config[0], config); + + /* currently we use only one CS, so disable the other banks */ + out_be32(&im->ddr.cs_config[1], 0); + out_be32(&im->ddr.cs_config[2], 0); + out_be32(&im->ddr.cs_config[3], 0); + + out_be32(&im->ddr.timing_cfg_3, CONFIG_SYS_DDR_TIMING_3); + out_be32(&im->ddr.timing_cfg_1, CONFIG_SYS_DDR_TIMING_1); + out_be32(&im->ddr.timing_cfg_2, CONFIG_SYS_DDR_TIMING_2); + out_be32(&im->ddr.timing_cfg_0, CONFIG_SYS_DDR_TIMING_0); + + out_be32(&im->ddr.sdram_cfg, CONFIG_SYS_SDRAM_CFG); + out_be32(&im->ddr.sdram_cfg2, CONFIG_SYS_SDRAM_CFG2); + + out_be32(&im->ddr.sdram_mode, CONFIG_SYS_DDR_MODE); + out_be32(&im->ddr.sdram_mode2, CONFIG_SYS_DDR_MODE_2); + + out_be32(&im->ddr.sdram_interval, CONFIG_SYS_DDR_INTERVAL); + out_be32(&im->ddr.sdram_clk_cntl, CONFIG_SYS_DDR_CLK_CNTL); + sync(); + udelay(300); + + /* enable DDR controller */ + setbits_be32(&im->ddr.sdram_cfg, SDRAM_CFG_MEM_EN); + /* now check the real size */ + disable_addr_trans(); + msize = get_ram_size(CONFIG_SYS_DDR_BASE, msize); + enable_addr_trans(); +#endif + return msize; +} + +static int setup_sdram(void) +{ + u32 msize = CONFIG_SYS_DDR_SIZE << 20; + long int size_01, size_02; + + size_01 = fixed_sdram(CONFIG_SYS_DDR_CONFIG); + size_02 = fixed_sdram(CONFIG_SYS_DDR_CONFIG_256); + + if (size_01 > size_02) + msize = fixed_sdram(CONFIG_SYS_DDR_CONFIG); + else + msize = size_02; + + return msize; +} + +phys_size_t initdram(int board_type) +{ + immap_t *im = (immap_t *)CONFIG_SYS_IMMR; + fsl_lbc_t *lbc = &im->im_lbc; + u32 msize = 0; + + if ((in_be32(&im->sysconf.immrbar) & IMMRBAR_BASE_ADDR) != (u32)im) + return -1; + + msize = setup_sdram(); + + out_be32(&lbc->lbcr, CONFIG_SYS_LBC_LBCR); + out_be32(&lbc->mrtpr, CONFIG_SYS_LBC_MRTPR); + sync(); + + return msize; +} + +#if defined(CONFIG_OF_BOARD_SETUP) +void ft_board_setup(void *blob, bd_t *bd) +{ + ft_cpu_setup(blob, bd); +} +#endif + +/* gpio mask for spi_cs */ +#define IDSCPLD_SPI_CS_MASK 0x00000001 +/* spi_cs multiplexed through cpld */ +#define IDSCPLD_SPI_CS_BASE (CONFIG_SYS_CPLD_BASE + 0xf) + +#if defined(CONFIG_MISC_INIT_R) +/* srp umcr mask for rts */ +#define IDSUMCR_RTS_MASK 0x04 +int misc_init_r(void) +{ + /*srp*/ + duart83xx_t *uart1 = &((immap_t *)CONFIG_SYS_IMMR)->duart[0]; + duart83xx_t *uart2 = &((immap_t *)CONFIG_SYS_IMMR)->duart[1]; + + gpio83xx_t *iopd = &((immap_t *)CONFIG_SYS_IMMR)->gpio[0]; + u8 *spi_base = (u8 *)IDSCPLD_SPI_CS_BASE; + + /* deactivate spi_cs channels */ + out_8(spi_base, 0); + /* deactivate the spi_cs */ + setbits_be32(&iopd->dir, IDSCPLD_SPI_CS_MASK); + /*srp - deactivate rts*/ + out_8(&uart1->umcr, IDSUMCR_RTS_MASK); + out_8(&uart2->umcr, IDSUMCR_RTS_MASK); + + + gd->fdt_blob = (void *)CONFIG_SYS_FLASH_BASE; + return 0; +} +#endif + +#ifdef CONFIG_MPC8XXX_SPI +/* + * The following are used to control the SPI chip selects + */ +int spi_cs_is_valid(unsigned int bus, unsigned int cs) +{ + return bus == 0 && ((cs >= 0) && (cs <= 2)); +} + +void spi_cs_activate(struct spi_slave *slave) +{ + gpio83xx_t *iopd = &((immap_t *)CONFIG_SYS_IMMR)->gpio[0]; + u8 *spi_base = (u8 *)IDSCPLD_SPI_CS_BASE; + + /* select the spi_cs channel */ + out_8(spi_base, 1 << slave->cs); + /* activate the spi_cs */ + clrbits_be32(&iopd->dat, IDSCPLD_SPI_CS_MASK); +} + +void spi_cs_deactivate(struct spi_slave *slave) +{ + gpio83xx_t *iopd = &((immap_t *)CONFIG_SYS_IMMR)->gpio[0]; + u8 *spi_base = (u8 *)IDSCPLD_SPI_CS_BASE; + + /* select the spi_cs channel */ + out_8(spi_base, 1 << slave->cs); + /* deactivate the spi_cs */ + setbits_be32(&iopd->dat, IDSCPLD_SPI_CS_MASK); +} +#endif /* CONFIG_HARD_SPI */ diff --git a/boards.cfg b/boards.cfg index c8270b2de06..83fc3afdbf6 100644 --- a/boards.cfg +++ b/boards.cfg @@ -719,6 +719,7 @@ Active powerpc mpc83xx - freescale mpc8360emds Active powerpc mpc83xx - freescale mpc837xemds MPC837XEMDS - Dave Liu Active powerpc mpc83xx - freescale mpc837xemds MPC837XEMDS_HOST MPC837XEMDS:PCI Dave Liu Active powerpc mpc83xx - freescale mpc837xerdb MPC837XERDB - Joe D'Abbraccio +Active powerpc mpc83xx - ids ids8313 ids8313 ids8313:SYS_TEXT_BASE=0xFFF00000 Heiko Schocher Active powerpc mpc83xx - keymile km83xx kmcoge5ne km8360:KMCOGE5NE Holger Brunck Active powerpc mpc83xx - keymile km83xx kmeter1 km8360:KMETER1 Holger Brunck Active powerpc mpc83xx - keymile km83xx kmopti2 tuxx1:KMOPTI2 Holger Brunck diff --git a/include/configs/ids8313.h b/include/configs/ids8313.h new file mode 100644 index 00000000000..613f7e1a2ef --- /dev/null +++ b/include/configs/ids8313.h @@ -0,0 +1,587 @@ +/* + * (C) Copyright 2013 + * Heiko Schocher, DENX Software Engineering, hs@denx.de. + * + * Based on: + * Copyright (c) 2011 IDS GmbH, Germany + * Sergej Stepanov + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#ifndef __CONFIG_H +#define __CONFIG_H + +/* + * High Level Configuration Options + */ +#define CONFIG_MPC831x +#define CONFIG_MPC8313 +#define CONFIG_IDS8313 + +#define CONFIG_FSL_ELBC + +#define CONFIG_MISC_INIT_R + +#define CONFIG_AUTOBOOT_KEYED +#define CONFIG_AUTOBOOT_PROMPT \ + "\nEnter password - autoboot in %d seconds...\n", CONFIG_BOOTDELAY +#define CONFIG_AUTOBOOT_DELAY_STR "ids" +#define CONFIG_BOOT_RETRY_TIME 900 +#define CONFIG_BOOT_RETRY_MIN 30 +#define CONFIG_BOOTDELAY 1 +#define CONFIG_RESET_TO_RETRY + +#define CONFIG_83XX_CLKIN 66000000 /* in Hz */ +#define CONFIG_SYS_CLK_FREQ CONFIG_83XX_CLKIN + +#define CONFIG_SYS_IMMR 0xF0000000 + +#define CONFIG_SYS_ACR_PIPE_DEP 3 /* Arbiter pipeline depth (0-3) */ +#define CONFIG_SYS_ACR_RPTCNT 3 /* Arbiter repeat count (0-7) */ + +/* + * Hardware Reset Configuration Word + * if CLKIN is 66.000MHz, then + * CSB = 132MHz, CORE = 264MHz, DDRC = 264MHz, LBC = 132MHz + */ +#define CONFIG_SYS_HRCW_LOW (0x20000000 /* reserved, must be set */ |\ + HRCWL_DDR_TO_SCB_CLK_2X1 |\ + HRCWL_CSB_TO_CLKIN_2X1 |\ + HRCWL_CORE_TO_CSB_2X1) + +#define CONFIG_SYS_HRCW_HIGH (HRCWH_PCI_HOST |\ + HRCWH_CORE_ENABLE |\ + HRCWH_FROM_0XFFF00100 |\ + HRCWH_BOOTSEQ_DISABLE |\ + HRCWH_SW_WATCHDOG_DISABLE |\ + HRCWH_ROM_LOC_LOCAL_8BIT |\ + HRCWH_RL_EXT_LEGACY |\ + HRCWH_TSEC1M_IN_MII |\ + HRCWH_TSEC2M_IN_MII |\ + HRCWH_BIG_ENDIAN) + +#define CONFIG_SYS_SICRH 0x00000000 +#define CONFIG_SYS_SICRL (SICRL_LBC | SICRL_SPI_D) + +#define CONFIG_HWCONFIG + +#define CONFIG_SYS_HID0_INIT 0x000000000 +#define CONFIG_SYS_HID0_FINAL (HID0_ENABLE_MACHINE_CHECK |\ + HID0_ENABLE_INSTRUCTION_CACHE |\ + HID0_DISABLE_DYNAMIC_POWER_MANAGMENT) + +#define CONFIG_SYS_HID2 (HID2_HBE | 0x00020000) + +/* + * Definitions for initial stack pointer and data area (in DCACHE ) + */ +#define CONFIG_SYS_INIT_RAM_LOCK +#define CONFIG_SYS_INIT_RAM_ADDR 0xFD000000 +#define CONFIG_SYS_INIT_RAM_SIZE 0x1000 /* End of used area in DPRAM */ +#define CONFIG_SYS_GBL_DATA_SIZE 0x100 +#define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_SIZE \ + - CONFIG_SYS_GBL_DATA_SIZE) +#define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET + +/* + * Local Bus LCRR and LBCR regs + */ +#define CONFIG_SYS_LCRR_EADC LCRR_EADC_1 +#define CONFIG_SYS_LCRR_CLKDIV LCRR_CLKDIV_2 +#define CONFIG_SYS_LBC_LBCR (0x00040000 |\ + (0xFF << LBCR_BMT_SHIFT) |\ + 0xF) + +#define CONFIG_SYS_LBC_MRTPR 0x20000000 + +/* + * Internal Definitions + */ +/* + * DDR Setup + */ +#define CONFIG_SYS_DDR_BASE 0x00000000 +#define CONFIG_SYS_SDRAM_BASE CONFIG_SYS_DDR_BASE +#define CONFIG_SYS_DDR_SDRAM_BASE CONFIG_SYS_DDR_BASE + +/* + * Manually set up DDR parameters, + * as this board has not the SPD connected to I2C. + */ +#define CONFIG_SYS_DDR_SIZE 256 /* MB */ +#define CONFIG_SYS_DDR_CONFIG (CSCONFIG_EN |\ + 0x00010000 |\ + CSCONFIG_ROW_BIT_13 |\ + CSCONFIG_COL_BIT_10) + +#define CONFIG_SYS_DDR_CONFIG_256 (CONFIG_SYS_DDR_CONFIG | \ + CSCONFIG_BANK_BIT_3) + +#define CONFIG_SYS_DDR_TIMING_3 (1 << 16) /* ext refrec */ +#define CONFIG_SYS_DDR_TIMING_0 ((3 << TIMING_CFG0_RWT_SHIFT) |\ + (3 << TIMING_CFG0_WRT_SHIFT) |\ + (3 << TIMING_CFG0_RRT_SHIFT) |\ + (3 << TIMING_CFG0_WWT_SHIFT) |\ + (6 << TIMING_CFG0_ACT_PD_EXIT_SHIFT) |\ + (2 << TIMING_CFG0_PRE_PD_EXIT_SHIFT) |\ + (8 << TIMING_CFG0_ODT_PD_EXIT_SHIFT) | \ + (2 << TIMING_CFG0_MRS_CYC_SHIFT)) +#define CONFIG_SYS_DDR_TIMING_1 ((4 << TIMING_CFG1_PRETOACT_SHIFT) |\ + (12 << TIMING_CFG1_ACTTOPRE_SHIFT) |\ + (4 << TIMING_CFG1_ACTTORW_SHIFT) |\ + (7 << TIMING_CFG1_CASLAT_SHIFT) |\ + (4 << TIMING_CFG1_REFREC_SHIFT) |\ + (4 << TIMING_CFG1_WRREC_SHIFT) |\ + (2 << TIMING_CFG1_ACTTOACT_SHIFT) |\ + (2 << TIMING_CFG1_WRTORD_SHIFT)) +#define CONFIG_SYS_DDR_TIMING_2 ((1 << TIMING_CFG2_ADD_LAT_SHIFT) |\ + (5 << TIMING_CFG2_CPO_SHIFT) |\ + (4 << TIMING_CFG2_WR_LAT_DELAY_SHIFT) |\ + (2 << TIMING_CFG2_RD_TO_PRE_SHIFT) |\ + (0 << TIMING_CFG2_WR_DATA_DELAY_SHIFT) |\ + (1 << TIMING_CFG2_CKE_PLS_SHIFT) |\ + (6 << TIMING_CFG2_FOUR_ACT_SHIFT)) + +#define CONFIG_SYS_DDR_INTERVAL ((0x800 << SDRAM_INTERVAL_REFINT_SHIFT) |\ + (0x800 << SDRAM_INTERVAL_BSTOPRE_SHIFT)) + +#define CONFIG_SYS_SDRAM_CFG (SDRAM_CFG_SREN |\ + SDRAM_CFG_2T_EN | SDRAM_CFG_HSE |\ + SDRAM_CFG_DBW_32 |\ + SDRAM_CFG_SDRAM_TYPE_DDR2) + +#define CONFIG_SYS_SDRAM_CFG2 0x00401000 +#define CONFIG_SYS_DDR_MODE ((0x0448 << SDRAM_MODE_ESD_SHIFT) |\ + (0x0242 << SDRAM_MODE_SD_SHIFT)) +#define CONFIG_SYS_DDR_MODE_2 0x00000000 +#define CONFIG_SYS_DDR_CLK_CNTL DDR_SDRAM_CLK_CNTL_CLK_ADJUST_075 +#define CONFIG_SYS_DDRCDR_VALUE (DDRCDR_EN |\ + DDRCDR_PZ_NOMZ |\ + DDRCDR_NZ_NOMZ |\ + DDRCDR_ODT |\ + DDRCDR_M_ODR |\ + DDRCDR_Q_DRN) + +/* + * on-board devices + */ +#define CONFIG_TSEC1 +#define CONFIG_TSEC2 +#define CONFIG_TSEC_ENET +#define CONFIG_NET_MULTI +#define CONFIG_HARD_SPI +#define CONFIG_HARD_I2C + +/* + * NOR FLASH setup + */ +#define CONFIG_SYS_FLASH_CFI +#define CONFIG_FLASH_CFI_DRIVER +#define CONFIG_SYS_FLASH_CFI_WIDTH FLASH_CFI_8BIT +#define CONFIG_FLASH_SHOW_PROGRESS 50 +#define CONFIG_SYS_FLASH_USE_BUFFER_WRITE + +#define CONFIG_SYS_FLASH_BASE 0xFF800000 +#define CONFIG_SYS_FLASH_SIZE 8 +#define CONFIG_SYS_FLASH_PROTECTION + +#define CONFIG_SYS_LBLAWBAR0_PRELIM CONFIG_SYS_FLASH_BASE +#define CONFIG_SYS_LBLAWAR0_PRELIM 0x80000016 + +#define CONFIG_SYS_BR0_PRELIM (CONFIG_SYS_FLASH_BASE |\ + BR_PS_8 |\ + BR_MS_GPCM |\ + BR_V) + +#define CONFIG_SYS_OR0_PRELIM (MEG_TO_AM(CONFIG_SYS_FLASH_SIZE) |\ + OR_GPCM_SCY_10 |\ + OR_GPCM_EHTR |\ + OR_GPCM_TRLX |\ + OR_GPCM_CSNT |\ + OR_GPCM_EAD) +#define CONFIG_SYS_MAX_FLASH_BANKS 1 +#define CONFIG_SYS_MAX_FLASH_SECT 128 + +#define CONFIG_SYS_FLASH_ERASE_TOUT 60000 +#define CONFIG_SYS_FLASH_WRITE_TOUT 500 + +/* + * NAND FLASH setup + */ +#define CONFIG_SYS_NAND_BASE 0xE1000000 +#define CONFIG_SYS_MAX_NAND_DEVICE 1 +#define CONFIG_SYS_NAND_MAX_CHIPS 1 +#define CONFIG_MTD_NAND_VERIFY_WRITE +#define CONFIG_NAND_FSL_ELBC +#define CONFIG_SYS_NAND_PAGE_SIZE (2048) +#define CONFIG_SYS_NAND_BLOCK_SIZE (128 << 10) +#define NAND_CACHE_PAGES 64 + +#define CONFIG_SYS_LBLAWBAR1_PRELIM CONFIG_SYS_NAND_BASE +#define CONFIG_SYS_LBLAWAR1_PRELIM 0x8000000E +#define CONFIG_SYS_NAND_LBLAWBAR_PRELIM CONFIG_SYS_LBLAWBAR1_PRELIM +#define CONFIG_SYS_NAND_LBLAWAR_PRELIM CONFIG_SYS_LBLAWAR1_PRELIM + +#define CONFIG_SYS_BR1_PRELIM ((CONFIG_SYS_NAND_BASE) |\ + (2< + +#define CONFIG_CMD_DHCP +#define CONFIG_CMD_PING +#define CONFIG_CMD_NFS +#define CONFIG_CMD_NAND +#define CONFIG_CMD_FLASH +#define CONFIG_CMD_SNTP +#define CONFIG_CMD_MII +#define CONFIG_CMD_DATE +#define CONFIG_CMDLINE_EDITING +#define CONFIG_CMD_EDITENV +#define CONFIG_CMD_JFFS2 +#define CONFIG_BOOTP_SUBNETMASK +#define CONFIG_BOOTP_GATEWAY +#define CONFIG_BOOTP_HOSTNAME +#define CONFIG_BOOTP_BOOTPATH +#define CONFIG_BOOTP_BOOTFILESIZE +/* pass open firmware flat tree */ +#define CONFIG_OF_LIBFDT +#define CONFIG_OF_BOARD_SETUP +#define CONFIG_OF_STDOUT_VIA_ALIAS + +/* + * The reserved memory + */ +#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE +#define CONFIG_SYS_MONITOR_LEN (768 * 1024) +#define CONFIG_SYS_MALLOC_LEN (8 * 1024 * 1024) + +/* + * Environment Configuration + */ +#define CONFIG_ENV_IS_IN_FLASH +#define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE \ + + CONFIG_SYS_MONITOR_LEN) +#define CONFIG_ENV_SIZE 0x20000 +#define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR + CONFIG_ENV_SIZE) +#define CONFIG_ENV_SIZE_REDUND (CONFIG_ENV_SIZE) + + +#define CONFIG_NETDEV eth1 +#define CONFIG_HOSTNAME ids8313 +#define CONFIG_ROOTPATH "/opt/eldk-4.2/ppc_6xx" +#define CONFIG_BOOTFILE "ids8313/uImage" +#define CONFIG_UBOOTPATH "ids8313/u-boot.bin" +#define CONFIG_FDTFILE "ids8313/ids8313.dtb" +#define CONFIG_LOADADDR 0x400000 +#define CONFIG_CMD_ENV_FLAGS +#define CONFIG_ENV_FLAGS_LIST_STATIC "ethaddr:mo,eth1addr:mo" + +#define CONFIG_BAUDRATE 115200 +#define CONFIG_SYS_HZ 1000 + +/* Initial Memory map for Linux*/ +#define CONFIG_SYS_BOOTMAPSZ (256 << 20) + +/* + * Miscellaneous configurable options + */ +#define CONFIG_SYS_LONGHELP +#define CONFIG_SYS_PROMPT "=> " +#define CONFIG_SYS_CBSIZE 1024 +#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE \ + + sizeof(CONFIG_SYS_PROMPT)+16) +#define CONFIG_SYS_MAXARGS 16 +#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE +#define CONFIG_SYS_HUSH_PARSER /* use "hush" command parser */ +#define CONFIG_SYS_PROMPT_HUSH_PS2 "> " + +#define CONFIG_SYS_MEMTEST_START 0x00001000 +#define CONFIG_SYS_MEMTEST_END 0x00C00000 + +#define CONFIG_SYS_LOAD_ADDR 0x100000 +#define CONFIG_MII +#define CONFIG_LOADS_ECHO +#define CONFIG_TIMESTAMP +#define CONFIG_PREBOOT "echo;" \ + "echo Type \\\"run nfsboot\\\" " \ + "to mount root filesystem over NFS;echo" +#undef CONFIG_BOOTARGS +#define CONFIG_BOOTCOMMAND "run boot_cramfs" +#undef CONFIG_SYS_LOADS_BAUD_CHANGE + +#define CONFIG_JFFS2_NAND +#define CONFIG_JFFS2_DEV "0" + +/* mtdparts command line support */ +#define CONFIG_CMD_MTDPARTS +#define CONFIG_FLASH_CFI_MTD +#define CONFIG_MTD_DEVICE +#define MTDIDS_DEFAULT "nor0=ff800000.flash,nand0=e1000000.flash" +#define MTDPARTS_DEFAULT "mtdparts=ff800000.flash:7m(dum)," \ + "768k(BOOT-BIN)," \ + "128k(BOOT-ENV),128k(BOOT-REDENV);" \ + "e1000000.flash:-(ubi)" + +#define CONFIG_EXTRA_ENV_SETTINGS \ + "netdev=" __stringify(CONFIG_NETDEV) "\0" \ + "ethprime=TSEC1\0" \ + "uboot=" __stringify(CONFIG_UBOOTPATH) "\0" \ + "tftpflash=tftpboot ${loadaddr} ${uboot}; " \ + "protect off " __stringify(CONFIG_SYS_TEXT_BASE) \ + " +${filesize}; " \ + "erase " __stringify(CONFIG_SYS_TEXT_BASE) \ + " +${filesize}; " \ + "cp.b ${loadaddr} " __stringify(CONFIG_SYS_TEXT_BASE) \ + " ${filesize}; " \ + "protect on " __stringify(CONFIG_SYS_TEXT_BASE) \ + " +${filesize}; " \ + "cmp.b ${loadaddr} " __stringify(CONFIG_SYS_TEXT_BASE) \ + " ${filesize}\0" \ + "console=ttyS0\0" \ + "fdtaddr=0x780000\0" \ + "kernel_addr=ff800000\0" \ + "fdtfile=" __stringify(CONFIG_FDTFILE) "\0" \ + "setbootargs=setenv bootargs " \ + "root=${rootdev} rw console=${console}," \ + "${baudrate} ${othbootargs}\0" \ + "setipargs=setenv bootargs root=${rootdev} rw " \ + "nfsroot=${serverip}:${rootpath} " \ + "ip=${ipaddr}:${serverip}:${gatewayip}:" \ + "${netmask}:${hostname}:${netdev}:off " \ + "console=${console},${baudrate} ${othbootargs}\0" \ + "addmtd=setenv bootargs ${bootargs} ${mtdparts}\0" \ + "mtdids=" MTDIDS_DEFAULT "\0" \ + "mtdparts=" MTDPARTS_DEFAULT "\0" \ + "\0" + +#define CONFIG_NFSBOOTCOMMAND \ + "setenv rootdev /dev/nfs;" \ + "run setipargs;run addmtd;" \ + "tftp ${loadaddr} ${bootfile};" \ + "tftp ${fdtaddr} ${fdtfile};" \ + "fdt addr ${fdtaddr};" \ + "bootm ${loadaddr} - ${fdtaddr}" + +/* UBI Support */ +#define CONFIG_CMD_NAND_TRIMFFS +#define CONFIG_CMD_UBI +#define CONFIG_CMD_UBIFS +#define CONFIG_RBTREE +#define CONFIG_LZO +#define CONFIG_MTD_PARTITIONS + +/* bootcount support */ +#define CONFIG_BOOTCOUNT_LIMIT +#define CONFIG_BOOTCOUNT_I2C +#define CONFIG_BOOTCOUNT_ALEN 1 +#define CONFIG_SYS_BOOTCOUNT_ADDR 0x9 + +#define CONFIG_VERSION_VARIABLE + +#define CONFIG_FIT +#define CONFIG_FIT_SIGNATURE +#define CONFIG_CMD_FDT +#define CONFIG_CMD_HASH +#define CONFIG_RSA +#define CONFIG_SHA1 +#define CONFIG_SHA256 +#define CONFIG_OF_CONTROL + +#endif /* __CONFIG_H */ -- cgit v1.2.3 From e634c9dc7a9f2c5a868128e14d8dbc382706e21f Mon Sep 17 00:00:00 2001 From: Matthias Fuchs Date: Tue, 25 Mar 2014 22:00:00 +0100 Subject: ppc4xx: add support for new PMC440 revision with cleanup This patch adds support for the new PMC440 hardware revision 1.4. The board now uses Micrel KSZ9031 phys. Add missing i2c initialization before reading bootstrap eeprom. Fix a couple of coding style issues. Make local functions static. Signed-off-by: Matthias Fuchs Signed-off-by: Stefan Roese --- board/esd/pmc440/pmc440.c | 165 ++++++++++++++++++++++++++++------------------ 1 file changed, 101 insertions(+), 64 deletions(-) (limited to 'board') diff --git a/board/esd/pmc440/pmc440.c b/board/esd/pmc440/pmc440.c index e86996c55f1..062ae672761 100644 --- a/board/esd/pmc440/pmc440.c +++ b/board/esd/pmc440/pmc440.c @@ -12,7 +12,6 @@ * * SPDX-License-Identifier: GPL-2.0+ */ - #include #include #include @@ -34,14 +33,14 @@ DECLARE_GLOBAL_DATA_PTR; -extern flash_info_t flash_info[CONFIG_SYS_MAX_FLASH_BANKS]; /* info for FLASH chips */ +extern flash_info_t flash_info[CONFIG_SYS_MAX_FLASH_BANKS]; extern void __ft_board_setup(void *blob, bd_t *bd); ulong flash_get_size(ulong base, int banknum); -int pci_is_66mhz(void); +static int pci_is_66mhz(void); int is_monarch(void); -int bootstrap_eeprom_read(unsigned dev_addr, unsigned offset, - uchar *buffer, unsigned cnt); +static int bootstrap_eeprom_read(unsigned dev_addr, unsigned offset, + uchar *buffer, unsigned cnt); struct serial_device *default_serial_console(void) { @@ -58,23 +57,24 @@ struct serial_device *default_serial_console(void) if (((val & 0xf0000000) >> 29) != 7) return &eserial2_device; - ulong scratchreg = in_be32((void*)GPIO0_ISR3L); + ulong scratchreg = in_be32((void *)GPIO0_ISR3L); if (!(scratchreg & 0x80)) { /* mark scratchreg valid */ scratchreg = (scratchreg & 0xffffff00) | 0x80; + i2c_init_all(); + i = bootstrap_eeprom_read(CONFIG_SYS_I2C_BOOT_EEPROM_ADDR, 0x10, buf, 4); if ((i != -1) && (buf[0] == 0x19) && (buf[1] == 0x75)) { scratchreg |= buf[2]; /* bringup delay for console */ - for (delay=0; delay<(1000 * (ulong)buf[3]); delay++) { + for (delay = 0; delay < (1000 * (ulong)buf[3]); delay++) udelay(1000); - } } else scratchreg |= 0x01; - out_be32((void*)GPIO0_ISR3L, scratchreg); + out_be32((void *)GPIO0_ISR3L, scratchreg); } if (scratchreg & 0x01) @@ -93,10 +93,7 @@ int board_early_init_f(void) mtdcr(EBC0_CFGADDR, EBC0_CFG); mtdcr(EBC0_CFGDATA, 0xf8400000); - /* - * Setup the GPIO pins - * TODO: setup GPIOs via CONFIG_SYS_4xx_GPIO_TABLE in board's config file - */ + /* Setup the GPIO pins */ out_be32((void *)GPIO0_OR, 0x40000102); out_be32((void *)GPIO0_TCR, 0x4c90011f); out_be32((void *)GPIO0_OSRL, 0x28051400); @@ -259,7 +256,7 @@ int misc_init_r(void) * USB suff... */ if ((act == NULL || strcmp(act, "host") == 0) && - !(in_be32((void*)GPIO0_IR) & GPIO0_USB_PRSNT)){ + !(in_be32((void *)GPIO0_IR) & GPIO0_USB_PRSNT)) { /* SDR Setting */ mfsdr(SDR0_PFC1, sdr0_pfc1); mfsdr(SDR0_USB2D0CR, usb2d0cr); @@ -326,16 +323,16 @@ int misc_init_r(void) mtsdr(SDR0_SRST1, 0x00000000); mtsdr(SDR0_SRST0, 0x00000000); - if (!(in_be32((void*)GPIO0_IR) & GPIO0_USB_PRSNT)) { + if (!(in_be32((void *)GPIO0_IR) & GPIO0_USB_PRSNT)) { /* enable power on USB socket */ - out_be32((void*)GPIO1_OR, - in_be32((void*)GPIO1_OR) & ~GPIO1_USB_PWR_N); + out_be32((void *)GPIO1_OR, + in_be32((void *)GPIO1_OR) & ~GPIO1_USB_PWR_N); } printf("USB: Host\n"); } else if ((strcmp(act, "dev") == 0) || - (in_be32((void*)GPIO0_IR) & GPIO0_USB_PRSNT)) { + (in_be32((void *)GPIO0_IR) & GPIO0_USB_PRSNT)) { mfsdr(SDR0_USB2PHY0CR, usb2phy0cr); usb2phy0cr = usb2phy0cr &~SDR0_USB2PHY0CR_XOCLK_MASK; @@ -414,30 +411,31 @@ int misc_init_r(void) #endif /* turn off POST LED */ - out_be32((void*)GPIO1_OR, in_be32((void*)GPIO1_OR) & ~GPIO1_POST_N); + out_be32((void *)GPIO1_OR, in_be32((void *)GPIO1_OR) & ~GPIO1_POST_N); /* turn on RUN LED */ - out_be32((void*)GPIO0_OR, in_be32((void*)GPIO0_OR) & ~GPIO0_LED_RUN_N); + out_be32((void *)GPIO0_OR, + in_be32((void *)GPIO0_OR) & ~GPIO0_LED_RUN_N); return 0; } int is_monarch(void) { - if (in_be32((void*)GPIO1_IR) & GPIO1_NONMONARCH) + if (in_be32((void *)GPIO1_IR) & GPIO1_NONMONARCH) return 0; return 1; } -int pci_is_66mhz(void) +static int pci_is_66mhz(void) { - if (in_be32((void*)GPIO1_IR) & GPIO1_M66EN) + if (in_be32((void *)GPIO1_IR) & GPIO1_M66EN) return 1; return 0; } -int board_revision(void) +static int board_revision(void) { - return (int)((in_be32((void*)GPIO1_IR) & GPIO1_HWID_MASK) >> 4); + return (int)((in_be32((void *)GPIO1_IR) & GPIO1_HWID_MASK) >> 4); } int checkboard(void) @@ -495,7 +493,7 @@ void pci_target_init(struct pci_controller *hose) 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_PMM0PCILA, CONFIG_SYS_PCI_MEMBASE); /* PMM0 PCI Low Addr */ out32r(PCIL0_PMM0PCIHA, 0x00000000); /* PMM0 PCI High Address */ out32r(PCIL0_PMM0MA, 0xc0000001); /* 1G + No prefetching, */ /* and enable region */ @@ -532,7 +530,8 @@ void pci_target_init(struct pci_controller *hose) if (is_monarch()) { /* BAR2: map FPGA registers behind system memory at 1GB */ - pci_hose_write_config_dword(hose, 0, PCI_BASE_ADDRESS_2, 0x40000008); + pci_hose_write_config_dword(hose, 0, + PCI_BASE_ADDRESS_2, 0x40000008); } /* @@ -562,10 +561,10 @@ void pci_target_init(struct pci_controller *hose) CONFIG_SYS_PCI_CLASSCODE_NONMONARCH); /* PCI configuration done: release ERREADY */ - out_be32((void*)GPIO1_OR, - in_be32((void*)GPIO1_OR) | GPIO1_PPC_EREADY); - out_be32((void*)GPIO1_TCR, - in_be32((void*)GPIO1_TCR) | GPIO1_PPC_EREADY); + out_be32((void *)GPIO1_OR, + in_be32((void *)GPIO1_OR) | GPIO1_PPC_EREADY); + out_be32((void *)GPIO1_TCR, + in_be32((void *)GPIO1_TCR) | GPIO1_PPC_EREADY); } else { /* Program the board's subsystem id/classcode */ pci_hose_write_config_word(hose, 0, PCI_SUBSYSTEM_ID, @@ -595,14 +594,14 @@ void pci_master_init(struct pci_controller *hose) static void wait_for_pci_ready(void) { - if (!(in_be32((void*)GPIO1_IR) & GPIO1_PPC_EREADY)) { + if (!(in_be32((void *)GPIO1_IR) & GPIO1_PPC_EREADY)) { printf("PCI: Waiting for EREADY (CTRL-C to skip) ... "); while (1) { if (ctrlc()) { puts("abort\n"); break; } - if (in_be32((void*)GPIO1_IR) & GPIO1_PPC_EREADY) { + if (in_be32((void *)GPIO1_IR) & GPIO1_PPC_EREADY) { printf("done\n"); break; } @@ -641,34 +640,73 @@ int is_pci_host(struct pci_controller *hose) #endif /* defined(CONFIG_PCI) */ #ifdef CONFIG_RESET_PHY_R -void reset_phy(void) +static int pmc440_setup_vsc8601(char *devname, int phy_addr, + unsigned short behavior, unsigned short method) { - char *s; - unsigned short val_method, val_behavior; + /* adjust LED behavior */ + if (miiphy_write(devname, phy_addr, 0x1f, 0x0001) != 0) { + printf("Phy%d: register write access failed\n", phy_addr); + return -1; + } - /* special LED setup for NGCC/CANDES */ - if ((s = getenv("bd_type")) && - ((!strcmp(s, "ngcc")) || (!strcmp(s, "candes")))) { - val_method = 0x0e0a; - val_behavior = 0x0cf2; - } else { - /* PMC440 standard type */ - val_method = 0x0e10; - val_behavior = 0x0cf0; + miiphy_write(devname, phy_addr, 0x11, 0x0010); + miiphy_write(devname, phy_addr, 0x11, behavior); + miiphy_write(devname, phy_addr, 0x10, method); + miiphy_write(devname, phy_addr, 0x1f, 0x0000); + + return 0; +} + +static int pmc440_setup_ksz9031(char *devname, int phy_addr) +{ + unsigned short id1, id2; + + if (miiphy_read(devname, phy_addr, 2, &id1) || + miiphy_read(devname, phy_addr, 3, &id2)) { + printf("Phy%d: cannot read id\n", phy_addr); + return -1; } - if (miiphy_write("ppc_4xx_eth0", CONFIG_PHY_ADDR, 0x1f, 0x0001) == 0) { - miiphy_write("ppc_4xx_eth0", CONFIG_PHY_ADDR, 0x11, 0x0010); - miiphy_write("ppc_4xx_eth0", CONFIG_PHY_ADDR, 0x11, val_behavior); - miiphy_write("ppc_4xx_eth0", CONFIG_PHY_ADDR, 0x10, val_method); - miiphy_write("ppc_4xx_eth0", CONFIG_PHY_ADDR, 0x1f, 0x0000); + if ((id1 != 0x0022) || ((id2 & 0xfff0) != 0x1620)) { + printf("Phy%d: unexpected id\n", phy_addr); + return -1; } - if (miiphy_write("ppc_4xx_eth1", CONFIG_PHY1_ADDR, 0x1f, 0x0001) == 0) { - miiphy_write("ppc_4xx_eth1", CONFIG_PHY1_ADDR, 0x11, 0x0010); - miiphy_write("ppc_4xx_eth1", CONFIG_PHY1_ADDR, 0x11, val_behavior); - miiphy_write("ppc_4xx_eth1", CONFIG_PHY1_ADDR, 0x10, val_method); - miiphy_write("ppc_4xx_eth1", CONFIG_PHY1_ADDR, 0x1f, 0x0000); + /* MMD 2.08: adjust tx_clk pad skew */ + miiphy_write(devname, phy_addr, 0x0d, 2); + miiphy_write(devname, phy_addr, 0x0e, 8); + miiphy_write(devname, phy_addr, 0x0d, 0x4002); + miiphy_write(devname, phy_addr, 0x0e, 0xf | (0x17 << 5)); + + return 0; +} + +void reset_phy(void) +{ + char *s; + unsigned short val_method, val_behavior; + + if (gd->board_type < 4) { + /* special LED setup for NGCC/CANDES */ + s = getenv("bd_type"); + if (s && ((!strcmp(s, "ngcc")) || (!strcmp(s, "candes")))) { + val_method = 0x0e0a; + val_behavior = 0x0cf2; + } else { + /* PMC440 standard type */ + val_method = 0x0e10; + val_behavior = 0x0cf0; + } + + /* boards up to rev. 1.3 use Vitesse VSC8601 phys */ + pmc440_setup_vsc8601("ppc_4xx_eth0", CONFIG_PHY_ADDR, + val_method, val_behavior); + pmc440_setup_vsc8601("ppc_4xx_eth1", CONFIG_PHY1_ADDR, + val_method, val_behavior); + } else { + /* rev. 1.4 uses a Micrel KSZ9031 */ + pmc440_setup_ksz9031("ppc_4xx_eth0", CONFIG_PHY_ADDR); + pmc440_setup_ksz9031("ppc_4xx_eth1", CONFIG_PHY1_ADDR); } } #endif @@ -729,7 +767,6 @@ int bootstrap_eeprom_write(unsigned dev_addr, unsigned offset, * We must write the address again when changing pages * because the address counter only increments within a page. */ - while (offset < end) { unsigned alen, len; unsigned maxlen; @@ -771,8 +808,8 @@ int bootstrap_eeprom_write(unsigned dev_addr, unsigned offset, return rcode; } -int bootstrap_eeprom_read (unsigned dev_addr, unsigned offset, - uchar *buffer, unsigned cnt) +static int bootstrap_eeprom_read(unsigned dev_addr, unsigned offset, + uchar *buffer, unsigned cnt) { unsigned end = offset + cnt; unsigned blk_off; @@ -820,10 +857,10 @@ int board_usb_init(int index, enum usb_init_type init) int i; if ((act == NULL || strcmp(act, "host") == 0) && - !(in_be32((void*)GPIO0_IR) & GPIO0_USB_PRSNT)) + !(in_be32((void *)GPIO0_IR) & GPIO0_USB_PRSNT)) /* enable power on USB socket */ - out_be32((void*)GPIO1_OR, - in_be32((void*)GPIO1_OR) & ~GPIO1_USB_PWR_N); + out_be32((void *)GPIO1_OR, + in_be32((void *)GPIO1_OR) & ~GPIO1_USB_PWR_N); for (i=0; i<1000; i++) udelay(1000); @@ -834,7 +871,7 @@ int board_usb_init(int index, enum usb_init_type init) int usb_board_stop(void) { /* disable power on USB socket */ - out_be32((void*)GPIO1_OR, in_be32((void*)GPIO1_OR) | GPIO1_USB_PWR_N); + out_be32((void *)GPIO1_OR, in_be32((void *)GPIO1_OR) | GPIO1_USB_PWR_N); return 0; } @@ -858,8 +895,8 @@ void ft_board_setup(void *blob, bd_t *bd) rc = fdt_find_and_setprop(blob, "/plb/pci@1ec000000", "status", "disabled", sizeof("disabled"), 1); if (rc) { - printf("Unable to update property status in PCI node, err=%s\n", - fdt_strerror(rc)); + printf("Unable to update property status in PCI node, "); + printf("err=%s\n", fdt_strerror(rc)); } } } -- cgit v1.2.3 From 75504e9592745021006cb8905b5ff5a51d9d1cb3 Mon Sep 17 00:00:00 2001 From: Mateusz Zalega Date: Wed, 30 Apr 2014 13:07:48 +0200 Subject: usb: dfu: fix boards wo USB cable detection Former usb_cable_connected() patch broke compilation of boards which do not support this feature. I've renamed usb_cable_connected() to g_dnl_usb_cable_connected() and added its default implementation to gadget downloader driver code. There's only one driver of this kind and it's unlikely there'll be another, so there's no point in keeping it in /common. Previously this function was declared in usb.h. I've moved it, since it's more appropriate to keep it in g_dnl.h - usb.h seems to be intended for USB host implementation. Existing code, confronted with default -EOPNOTSUPP return value, continues as if the cable was connected. CONFIG_USB_CABLE_CHECK was removed. Change-Id: Ib9198621adee2811b391c64512f14646cefd0369 Signed-off-by: Mateusz Zalega Acked-by: Marek Vasut Acked-by: Lukasz Majewski --- README | 7 ------- board/samsung/origen/origen.c | 7 ------- board/samsung/trats/trats.c | 4 +--- board/samsung/trats2/trats2.c | 4 +--- board/samsung/universal_c210/universal.c | 7 ------- common/cmd_usb_mass_storage.c | 8 ++++++-- drivers/usb/gadget/f_mass_storage.c | 8 ++++---- drivers/usb/gadget/g_dnl.c | 5 +++++ include/configs/exynos4-dt.h | 1 - include/g_dnl.h | 1 + include/usb.h | 10 ---------- 11 files changed, 18 insertions(+), 44 deletions(-) (limited to 'board') diff --git a/README b/README index 12758dc6e79..b973344184f 100644 --- a/README +++ b/README @@ -1484,13 +1484,6 @@ The following options need to be configured: for your device - CONFIG_USBD_PRODUCTID 0xFFFF - Some USB device drivers may need to check USB cable attachment. - In this case you can enable following config in BoardName.h: - CONFIG_USB_CABLE_CHECK - This enables function definition: - - usb_cable_connected() in include/usb.h - Implementation of this function is board-specific. - - ULPI Layer Support: The ULPI (UTMI Low Pin (count) Interface) PHYs are supported via the generic ULPI layer. The generic layer accesses the ULPI PHY diff --git a/board/samsung/origen/origen.c b/board/samsung/origen/origen.c index d502f02d3da..a539267a1ca 100644 --- a/board/samsung/origen/origen.c +++ b/board/samsung/origen/origen.c @@ -30,13 +30,6 @@ int board_usb_init(int index, enum usb_init_type init) return 0; } -#ifdef CONFIG_USB_CABLE_CHECK -int usb_cable_connected(void) -{ - return 0; -} -#endif - #ifdef CONFIG_BOARD_EARLY_INIT_F int exynos_early_init_f(void) { diff --git a/board/samsung/trats/trats.c b/board/samsung/trats/trats.c index 7c79e7b73a7..ab0ad1d6505 100644 --- a/board/samsung/trats/trats.c +++ b/board/samsung/trats/trats.c @@ -430,8 +430,7 @@ int board_usb_init(int index, enum usb_init_type init) return s3c_udc_probe(&s5pc210_otg_data); } -#ifdef CONFIG_USB_CABLE_CHECK -int usb_cable_connected(void) +int g_dnl_board_usb_cable_connected(void) { struct pmic *muic = pmic_get("MAX8997_MUIC"); if (!muic) @@ -440,7 +439,6 @@ int usb_cable_connected(void) return !!muic->chrg->chrg_type(muic); } #endif -#endif static void pmic_reset(void) { diff --git a/board/samsung/trats2/trats2.c b/board/samsung/trats2/trats2.c index f558ef97a91..47095252a75 100644 --- a/board/samsung/trats2/trats2.c +++ b/board/samsung/trats2/trats2.c @@ -312,8 +312,7 @@ int board_usb_init(int index, enum usb_init_type init) return s3c_udc_probe(&s5pc210_otg_data); } -#ifdef CONFIG_USB_CABLE_CHECK -int usb_cable_connected(void) +int g_dnl_board_usb_cable_connected(void) { struct pmic *muic = pmic_get("MAX77693_MUIC"); if (!muic) @@ -322,7 +321,6 @@ int usb_cable_connected(void) return !!muic->chrg->chrg_type(muic); } #endif -#endif static int pmic_init_max77686(void) { diff --git a/board/samsung/universal_c210/universal.c b/board/samsung/universal_c210/universal.c index f9d71b617dd..8e49195fe1c 100644 --- a/board/samsung/universal_c210/universal.c +++ b/board/samsung/universal_c210/universal.c @@ -197,13 +197,6 @@ int board_usb_init(int index, enum usb_init_type init) return s3c_udc_probe(&s5pc210_otg_data); } -#ifdef CONFIG_USB_CABLE_CHECK -int usb_cable_connected(void) -{ - return 0; -} -#endif - int exynos_early_init_f(void) { wdt_stop(); diff --git a/common/cmd_usb_mass_storage.c b/common/cmd_usb_mass_storage.c index 5f557d5f857..14a5b6ae5ea 100644 --- a/common/cmd_usb_mass_storage.c +++ b/common/cmd_usb_mass_storage.c @@ -45,10 +45,14 @@ int do_usb_mass_storage(cmd_tbl_t *cmdtp, int flag, /* Timeout unit: seconds */ int cable_ready_timeout = UMS_CABLE_READY_TIMEOUT; - if (!usb_cable_connected()) { + if (!g_dnl_board_usb_cable_connected()) { + /* + * Won't execute if we don't know whether the cable is + * connected. + */ puts("Please connect USB cable.\n"); - while (!usb_cable_connected()) { + while (!g_dnl_board_usb_cable_connected()) { if (ctrlc()) { puts("\rCTRL+C - Operation aborted.\n"); goto exit; diff --git a/drivers/usb/gadget/f_mass_storage.c b/drivers/usb/gadget/f_mass_storage.c index f896169743c..4fae5cd3b1a 100644 --- a/drivers/usb/gadget/f_mass_storage.c +++ b/drivers/usb/gadget/f_mass_storage.c @@ -243,7 +243,7 @@ #include #include #include -#include +#include #include #include @@ -680,11 +680,11 @@ static int sleep_thread(struct fsg_common *common) /* Handle CTRL+C */ if (ctrlc()) return -EPIPE; -#ifdef CONFIG_USB_CABLE_CHECK + /* Check cable connection */ - if (!usb_cable_connected()) + if (!g_dnl_board_usb_cable_connected()) return -EIO; -#endif + k = 0; } diff --git a/drivers/usb/gadget/g_dnl.c b/drivers/usb/gadget/g_dnl.c index dd95afe86a5..973d7378b52 100644 --- a/drivers/usb/gadget/g_dnl.c +++ b/drivers/usb/gadget/g_dnl.c @@ -152,6 +152,11 @@ __weak int g_dnl_get_board_bcd_device_number(int gcnum) return gcnum; } +__weak int g_dnl_board_usb_cable_connected(void) +{ + return -EOPNOTSUPP; +} + static int g_dnl_get_bcd_device_number(struct usb_composite_dev *cdev) { struct usb_gadget *gadget = cdev->gadget; diff --git a/include/configs/exynos4-dt.h b/include/configs/exynos4-dt.h index 2040bf7784d..cbd2d204cf9 100644 --- a/include/configs/exynos4-dt.h +++ b/include/configs/exynos4-dt.h @@ -127,7 +127,6 @@ #define CONFIG_USB_GADGET_S3C_UDC_OTG #define CONFIG_USB_GADGET_DUALSPEED #define CONFIG_USB_GADGET_VBUS_DRAW 2 -#define CONFIG_USB_CABLE_CHECK #define CONFIG_CMD_USB_MASS_STORAGE #define CONFIG_USB_GADGET_MASS_STORAGE diff --git a/include/g_dnl.h b/include/g_dnl.h index 8f813c21ee6..f4e8d1089e6 100644 --- a/include/g_dnl.h +++ b/include/g_dnl.h @@ -11,6 +11,7 @@ #include #include int g_dnl_bind_fixup(struct usb_device_descriptor *, const char *); +int g_dnl_board_usb_cable_connected(void); int g_dnl_register(const char *s); void g_dnl_unregister(void); void g_dnl_set_serialnumber(char *); diff --git a/include/usb.h b/include/usb.h index 736730e8964..d9fedeeff7d 100644 --- a/include/usb.h +++ b/include/usb.h @@ -197,16 +197,6 @@ int board_usb_init(int index, enum usb_init_type init); */ int board_usb_cleanup(int index, enum usb_init_type init); -/* - * If CONFIG_USB_CABLE_CHECK is set then this function - * should be defined in board file. - * - * @return 1 if cable is connected and 0 otherwise. - */ -#ifdef CONFIG_USB_CABLE_CHECK -int usb_cable_connected(void); -#endif - #ifdef CONFIG_USB_STORAGE #define USB_MAX_STOR_DEV 5 -- cgit v1.2.3 From 41c2d60b3abad79f94a872d53ede016b1a891abc Mon Sep 17 00:00:00 2001 From: Mateusz Zalega Date: Mon, 28 Apr 2014 21:13:26 +0200 Subject: ums: always initialize mmc before ums_disk_init() In cases when MMC hadn't been initialized before, ie. by the user or other subsystem, it was still uninitialized while UMS media capacity check, leading to broken ums command. UMS has to initialize resources it uses. Tested on Samsung Goni. Signed-off-by: Mateusz Zalega Tested-by: Mateusz Zalega Acked-by: Lukasz Majewski Cc: Minkyu Kang --- board/samsung/common/ums.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'board') diff --git a/board/samsung/common/ums.c b/board/samsung/common/ums.c index dc155ad0e5b..cebabe920a2 100644 --- a/board/samsung/common/ums.c +++ b/board/samsung/common/ums.c @@ -66,11 +66,9 @@ static struct ums *ums_disk_init(struct mmc *mmc) struct ums *ums_init(unsigned int dev_num) { - struct mmc *mmc = NULL; + struct mmc *mmc = find_mmc_device(dev_num); - mmc = find_mmc_device(dev_num); - if (!mmc) + if (!mmc || mmc_init(mmc)) return NULL; - return ums_disk_init(mmc); } -- cgit v1.2.3