nios2: remove obsolete PCI5441 and PK1C20 boards

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
This commit is contained in:
Thomas Chou
2014-08-21 14:36:30 +08:00
parent 00a2517fcb
commit 70fbc46192
17 changed files with 0 additions and 749 deletions

View File

@@ -1,170 +0,0 @@
/*
* (C) Copyright 2000-2004
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
*
* SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
#include <asm/io.h>
#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 (dst, b);
/* 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);
}

View File

@@ -1,15 +0,0 @@
if TARGET_PCI5441
config SYS_BOARD
string
default "pci5441"
config SYS_VENDOR
string
default "psyent"
config SYS_CONFIG_NAME
string
default "PCI5441"
endif

View File

@@ -1,6 +0,0 @@
PCI5441 BOARD
M: Scott McNutt <smcnutt@psyent.com>
S: Maintained
F: board/psyent/pci5441/
F: include/configs/PCI5441.h
F: configs/PCI5441_defconfig

View File

@@ -1,8 +0,0 @@
#
# (C) Copyright 2001-2006
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
#
# SPDX-License-Identifier: GPL-2.0+
#
obj-y := pci5441.o ../common/AMDLV065D.o

View File

@@ -1,14 +0,0 @@
#
# (C) Copyright 2004, Psyent Corporation <www.psyent.com>
# Scott McNutt <smcnutt@psyent.com>
#
# SPDX-License-Identifier: GPL-2.0+
#
CONFIG_SYS_TEXT_BASE = 0x018e0000
PLATFORM_CPPFLAGS += -mno-hw-div -mno-hw-mul
ifeq ($(debug),1)
PLATFORM_CPPFLAGS += -DDEBUG
endif

View File

@@ -1,24 +0,0 @@
/*
* (C) Copyright 2004, Psyent Corporation <www.psyent.com>
* Scott McNutt <smcnutt@psyent.com>
*
* SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
int board_early_init_f (void)
{
return 0;
}
int checkboard (void)
{
puts ("BOARD : Psyent PCI-5441\n");
return 0;
}
phys_size_t initdram (int board_type)
{
return (0);
}

View File

@@ -1,15 +0,0 @@
if TARGET_PK1C20
config SYS_BOARD
string
default "pk1c20"
config SYS_VENDOR
string
default "psyent"
config SYS_CONFIG_NAME
string
default "PK1C20"
endif

View File

@@ -1,6 +0,0 @@
PK1C20 BOARD
M: Scott McNutt <smcnutt@psyent.com>
S: Maintained
F: board/psyent/pk1c20/
F: include/configs/PK1C20.h
F: configs/PK1C20_defconfig

View File

@@ -1,8 +0,0 @@
#
# (C) Copyright 2001-2006
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
#
# SPDX-License-Identifier: GPL-2.0+
#
obj-y := pk1c20.o led.o ../common/AMDLV065D.o

View File

@@ -1,14 +0,0 @@
#
# (C) Copyright 2004, Psyent Corporation <www.psyent.com>
# Scott McNutt <smcnutt@psyent.com>
#
# SPDX-License-Identifier: GPL-2.0+
#
CONFIG_SYS_TEXT_BASE = 0x01fc0000
PLATFORM_CPPFLAGS += -mno-hw-div -mno-hw-mul
ifeq ($(debug),1)
PLATFORM_CPPFLAGS += -DDEBUG
endif

View File

@@ -1,46 +0,0 @@
/*
* (C) Copyright 2004, Psyent Corporation <www.psyent.com>
* Scott McNutt <smcnutt@psyent.com>
*
* SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
#include <asm/io.h>
#include <nios2-io.h>
#include <status_led.h>
/* The LED port is configured as output only, so we
* must track the state manually.
*/
static led_id_t val = 0;
void __led_init (led_id_t mask, int state)
{
nios_pio_t *pio = (nios_pio_t *)CONFIG_SYS_LEDPIO_ADDR;
if (state == STATUS_LED_ON)
val &= ~mask;
else
val |= mask;
writel (val, &pio->data);
}
void __led_set (led_id_t mask, int state)
{
nios_pio_t *pio = (nios_pio_t *)CONFIG_SYS_LEDPIO_ADDR;
if (state == STATUS_LED_ON)
val &= ~mask;
else
val |= mask;
writel (val, &pio->data);
}
void __led_toggle (led_id_t mask)
{
nios_pio_t *pio = (nios_pio_t *)CONFIG_SYS_LEDPIO_ADDR;
val ^= mask;
writel (val, &pio->data);
}

View File

@@ -1,36 +0,0 @@
/*
* (C) Copyright 2004, Psyent Corporation <www.psyent.com>
* Scott McNutt <smcnutt@psyent.com>
*
* SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
#include <netdev.h>
int board_early_init_f (void)
{
return 0;
}
int checkboard (void)
{
puts ("BOARD : Psyent PK-1C20\n");
return 0;
}
phys_size_t initdram (int board_type)
{
return (0);
}
#ifdef CONFIG_CMD_NET
int board_eth_init(bd_t *bis)
{
int rc = 0;
#ifdef CONFIG_SMC91111
rc = smc91111_initialize(0, CONFIG_SMC91111_BASE);
#endif
return rc;
}
#endif