mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-06-13 15:03:58 +03:00
Compare commits
7 Commits
LABEL_2005
...
LABEL_2005
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f4733a0764 | ||
|
|
b05dcb58fe | ||
|
|
47b1e3d77f | ||
|
|
e58cf2a0cf | ||
|
|
1968e615d4 | ||
|
|
151ab83a93 | ||
|
|
b9649854f6 |
27
CHANGELOG
27
CHANGELOG
@@ -2,6 +2,33 @@
|
||||
Changes for U-Boot 1.1.3:
|
||||
======================================================================
|
||||
|
||||
* Add port initialization for digital I/O on INKA4x0
|
||||
|
||||
* Patch by Stefan Roese, 01 March 2005:
|
||||
Update for esd boards dp405 and hub405
|
||||
|
||||
* Fix get_partition_info() parameter error in all other calls
|
||||
(common/cmd_ide.c, common/cmd_reiser.c, common/cmd_scsi.c).
|
||||
|
||||
* Enable USB and IDE support for INKA4x0 board
|
||||
|
||||
* Patch by Andrew Dyer, 28 February 2005:
|
||||
fix ext2load passing an incorrect pointer to get_partition_info()
|
||||
resulting in load failure for devices other than 0
|
||||
|
||||
* Add support for SRAM and 2 x Quad UARTs on INKA4x0 board
|
||||
|
||||
* Cleanup USB and partition defines
|
||||
|
||||
* Add support for ext2 filesystems and image timestamps to TQM5200 board
|
||||
|
||||
* Add reset code for Coral-P on INKA4x0 board
|
||||
|
||||
* Patch by Martin Krause, 28 Jun 2004:
|
||||
Update for TRAB board.
|
||||
|
||||
* Fix some missing "volatile"s in MPC5xxx FEC driver
|
||||
|
||||
* Fix cirrus voltage detection (for CPC45)
|
||||
|
||||
* Fix byteorder problem in usbboot and scsiboot commands.
|
||||
|
||||
2
README
2
README
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# (C) Copyright 2000 - 2004
|
||||
# (C) Copyright 2000 - 2005
|
||||
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
||||
#
|
||||
# See file CREDITS for list of people who contributed to this
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -30,6 +30,47 @@
|
||||
extern void lxt971_no_sleep(void);
|
||||
|
||||
|
||||
int board_revision(void)
|
||||
{
|
||||
unsigned long osrl_reg;
|
||||
unsigned long isr1l_reg;
|
||||
unsigned long tcr_reg;
|
||||
unsigned long value;
|
||||
|
||||
/*
|
||||
* Get version of HUB405 board from GPIO's
|
||||
*/
|
||||
|
||||
/*
|
||||
* Setup GPIO pin(s) (IRQ6/GPIO23)
|
||||
*/
|
||||
osrl_reg = in32(GPIO0_OSRH);
|
||||
isr1l_reg = in32(GPIO0_ISR1H);
|
||||
tcr_reg = in32(GPIO0_TCR);
|
||||
out32(GPIO0_OSRH, osrl_reg & ~0x00030000); /* output select */
|
||||
out32(GPIO0_ISR1H, isr1l_reg | 0x00030000); /* input select */
|
||||
out32(GPIO0_TCR, tcr_reg & ~0x00000100); /* select input */
|
||||
|
||||
udelay(1000); /* wait some time before reading input */
|
||||
value = in32(GPIO0_IR) & 0x00000100; /* get config bits */
|
||||
|
||||
/*
|
||||
* Restore GPIO settings
|
||||
*/
|
||||
out32(GPIO0_OSRH, osrl_reg); /* output select */
|
||||
out32(GPIO0_ISR1H, isr1l_reg); /* input select */
|
||||
out32(GPIO0_TCR, tcr_reg); /* enable output driver for outputs */
|
||||
|
||||
if (value & 0x00000100) {
|
||||
/* Revision 1.1 or 1.2 detected */
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Revision 1.0 */
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int board_early_init_f (void)
|
||||
{
|
||||
/*
|
||||
@@ -69,6 +110,8 @@ int misc_init_f (void)
|
||||
|
||||
int misc_init_r (void)
|
||||
{
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
volatile unsigned char *duart0_mcr = (unsigned char *)((ulong)DUART0_BA + 4);
|
||||
volatile unsigned char *duart1_mcr = (unsigned char *)((ulong)DUART1_BA + 4);
|
||||
volatile unsigned char *duart2_mcr = (unsigned char *)((ulong)DUART2_BA + 4);
|
||||
@@ -77,6 +120,7 @@ int misc_init_r (void)
|
||||
unsigned long val;
|
||||
int delay, flashcnt;
|
||||
char *str;
|
||||
char hw_rev[4];
|
||||
|
||||
/*
|
||||
* Enable interrupts in exar duart mcr[3]
|
||||
@@ -121,14 +165,14 @@ int misc_init_r (void)
|
||||
*/
|
||||
str = getenv("bd_type"); /* this is only set on non prototype hardware */
|
||||
if (str != NULL) {
|
||||
if ((strcmp(str, "swch405") == 0) || (strcmp(str, "hub405") == 0)) {
|
||||
if ((strcmp(str, "swch405") == 0) || ((!strcmp(str, "hub405") && (gd->board_type >= 1)))) {
|
||||
unsigned char led_reg_default = 0;
|
||||
str = getenv("ap_pwr");
|
||||
if (!str || (str && (str[0] == '1')))
|
||||
led_reg_default = 0x04 | 0x02 ; /* U2_LED | AP_PWR */
|
||||
|
||||
/*
|
||||
* Flash LEDs on SWCH405
|
||||
* Flash LEDs
|
||||
*/
|
||||
for (flashcnt = 0; flashcnt < 3; flashcnt++) {
|
||||
*led_reg = led_reg_default; /* LED_A..D off */
|
||||
@@ -150,6 +194,11 @@ int misc_init_r (void)
|
||||
out32(GPIO0_OR, in32(GPIO0_OR) & ~CFG_DUART_RST); /* set reset to low */
|
||||
udelay(1000); /* wait 1ms */
|
||||
|
||||
/*
|
||||
* Store hardware revision in environment for further processing
|
||||
*/
|
||||
sprintf(hw_rev, "1.%ld", gd->board_type);
|
||||
setenv("hw_rev", hw_rev);
|
||||
return (0);
|
||||
}
|
||||
|
||||
@@ -159,6 +208,8 @@ int misc_init_r (void)
|
||||
*/
|
||||
int checkboard (void)
|
||||
{
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
unsigned char str[64];
|
||||
int i = getenv_r ("serial#", str, sizeof(str));
|
||||
|
||||
@@ -170,7 +221,14 @@ int checkboard (void)
|
||||
puts(str);
|
||||
}
|
||||
|
||||
putc ('\n');
|
||||
if (getenv_r("bd_type", str, sizeof(str)) != -1) {
|
||||
printf(" (%s", str);
|
||||
} else {
|
||||
puts(" (Missing bd_type!");
|
||||
}
|
||||
|
||||
gd->board_type = board_revision();
|
||||
printf(", Rev 1.%ld)\n", gd->board_type);
|
||||
|
||||
/*
|
||||
* Disable sleep mode in LXT971
|
||||
|
||||
@@ -43,13 +43,11 @@ static void sdram_start (int hi_addr)
|
||||
long hi_addr_bit = hi_addr ? 0x01000000 : 0;
|
||||
|
||||
/* unlock mode register */
|
||||
*(vu_long *)MPC5XXX_SDRAM_CTRL = SDRAM_CONTROL | 0x80000000 |
|
||||
hi_addr_bit;
|
||||
*(vu_long *)MPC5XXX_SDRAM_CTRL = SDRAM_CONTROL | 0x80000000 | hi_addr_bit;
|
||||
__asm__ volatile ("sync");
|
||||
|
||||
/* precharge all banks */
|
||||
*(vu_long *)MPC5XXX_SDRAM_CTRL = SDRAM_CONTROL | 0x80000002 |
|
||||
hi_addr_bit;
|
||||
*(vu_long *)MPC5XXX_SDRAM_CTRL = SDRAM_CONTROL | 0x80000002 | hi_addr_bit;
|
||||
__asm__ volatile ("sync");
|
||||
|
||||
#if SDRAM_DDR
|
||||
@@ -63,13 +61,11 @@ static void sdram_start (int hi_addr)
|
||||
#endif
|
||||
|
||||
/* precharge all banks */
|
||||
*(vu_long *)MPC5XXX_SDRAM_CTRL = SDRAM_CONTROL | 0x80000002 |
|
||||
hi_addr_bit;
|
||||
*(vu_long *)MPC5XXX_SDRAM_CTRL = SDRAM_CONTROL | 0x80000002 | hi_addr_bit;
|
||||
__asm__ volatile ("sync");
|
||||
|
||||
/* auto refresh */
|
||||
*(vu_long *)MPC5XXX_SDRAM_CTRL = SDRAM_CONTROL | 0x80000004 |
|
||||
hi_addr_bit;
|
||||
*(vu_long *)MPC5XXX_SDRAM_CTRL = SDRAM_CONTROL | 0x80000004 | hi_addr_bit;
|
||||
__asm__ volatile ("sync");
|
||||
|
||||
/* set mode register */
|
||||
@@ -177,15 +173,79 @@ void flash_preinit(void)
|
||||
*(vu_long *)MPC5XXX_BOOTCS_CFG &= ~0x1; /* clear RO */
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PCI
|
||||
#define GPIO_PSC3_9 0x04000000UL
|
||||
|
||||
int misc_init_f (void)
|
||||
{
|
||||
/* Initialize GPIO output pins.
|
||||
*/
|
||||
/* Configure GPT as GPIO output */
|
||||
*(vu_long *)MPC5XXX_GPT0_ENABLE =
|
||||
*(vu_long *)MPC5XXX_GPT1_ENABLE =
|
||||
*(vu_long *)MPC5XXX_GPT2_ENABLE =
|
||||
*(vu_long *)MPC5XXX_GPT3_ENABLE =
|
||||
*(vu_long *)MPC5XXX_GPT4_ENABLE =
|
||||
*(vu_long *)MPC5XXX_GPT5_ENABLE = 0x24;
|
||||
|
||||
|
||||
/* Configure PSC3_6,7 as GPIO output */
|
||||
*(vu_long *)MPC5XXX_GPIO_ENABLE |= 0x00003000;
|
||||
*(vu_long *)MPC5XXX_GPIO_DIR |= 0x00003000;
|
||||
|
||||
/* Configure PSC3_8 as GPIO output, no interrupt */
|
||||
*(vu_long *)MPC5XXX_GPIO_SI_ENABLE |= 0x04000000;
|
||||
*(vu_long *)MPC5XXX_GPIO_SI_DIR |= 0x04000000;
|
||||
*(vu_long *)MPC5XXX_GPIO_SI_IEN &= ~0x04000000;
|
||||
|
||||
/* Configure PSC3_9 and GPIO_WKUP6,7 as GPIO output */
|
||||
*(vu_long *)MPC5XXX_WU_GPIO_ENABLE |= 0xc4000000;
|
||||
*(vu_long *)MPC5XXX_WU_GPIO_DIR |= 0xc4000000;
|
||||
|
||||
/*
|
||||
* Reset Coral-P graphics controller
|
||||
*/
|
||||
*(vu_long *) MPC5XXX_WU_GPIO_ENABLE |= GPIO_PSC3_9;
|
||||
*(vu_long *) MPC5XXX_WU_GPIO_DIR |= GPIO_PSC3_9;
|
||||
*(vu_long *) MPC5XXX_WU_GPIO_DATA |= GPIO_PSC3_9;
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PCI
|
||||
static struct pci_controller hose;
|
||||
|
||||
extern void pci_mpc5xxx_init(struct pci_controller *);
|
||||
|
||||
void pci_init_board(void)
|
||||
{
|
||||
pci_mpc5xxx_init(&hose);
|
||||
pci_mpc5xxx_init(&hose);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined (CFG_CMD_IDE) && defined (CONFIG_IDE_RESET)
|
||||
|
||||
#define GPIO_PSC1_4 0x01000000UL
|
||||
|
||||
void init_ide_reset (void)
|
||||
{
|
||||
debug ("init_ide_reset\n");
|
||||
|
||||
/* Configure PSC1_4 as GPIO output for ATA reset */
|
||||
*(vu_long *) MPC5XXX_WU_GPIO_ENABLE |= GPIO_PSC1_4;
|
||||
*(vu_long *) MPC5XXX_WU_GPIO_DIR |= GPIO_PSC1_4;
|
||||
/* Deassert reset */
|
||||
*(vu_long *) MPC5XXX_WU_GPIO_DATA |= GPIO_PSC1_4;
|
||||
}
|
||||
|
||||
void ide_set_reset (int idereset)
|
||||
{
|
||||
debug ("ide_reset(%d)\n", idereset);
|
||||
|
||||
if (idereset) {
|
||||
*(vu_long *) MPC5XXX_WU_GPIO_DATA &= ~GPIO_PSC1_4;
|
||||
/* Make a delay. MPC5200 spec says 25 usec min */
|
||||
udelay(500000);
|
||||
} else {
|
||||
*(vu_long *) MPC5XXX_WU_GPIO_DATA |= GPIO_PSC1_4;
|
||||
}
|
||||
}
|
||||
#endif /* defined (CFG_CMD_IDE) && defined (CONFIG_IDE_RESET) */
|
||||
|
||||
@@ -416,6 +416,13 @@ au_update_eeprom(int idx)
|
||||
int off;
|
||||
uint32_t val;
|
||||
|
||||
/* special case for prepare.img */
|
||||
if (idx == IDX_PREPARE) {
|
||||
/* enable the power switch */
|
||||
*CPLD_VFD_BK &= ~POWER_OFF;
|
||||
return 0;
|
||||
}
|
||||
|
||||
hdr = (image_header_t *)LOAD_ADDR;
|
||||
/* write the time field into EEPROM */
|
||||
off = auee_off[idx].time;
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include <common.h>
|
||||
#include <command.h>
|
||||
#include <s3c2400.h>
|
||||
#include <rtc.h>
|
||||
|
||||
/*
|
||||
* TRAB board specific commands. Especially commands for burn-in and function
|
||||
@@ -117,6 +118,7 @@ int i2c_write_multiple (uchar chip, uint addr, int alen,
|
||||
uchar *buffer, int len);
|
||||
int i2c_read_multiple (uchar chip, uint addr, int alen,
|
||||
uchar *buffer, int len);
|
||||
int do_temp_log (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
|
||||
|
||||
/* helper functions */
|
||||
static void adc_init (void);
|
||||
@@ -173,6 +175,7 @@ int do_burn_in (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
|
||||
led_init ();
|
||||
global_vars_init ();
|
||||
test_function_table_init ();
|
||||
spi_init ();
|
||||
|
||||
if (global_vars_write_to_eeprom () != 0) {
|
||||
printf ("%s: error writing global_vars to eeprom\n",
|
||||
@@ -334,7 +337,6 @@ int do_contact_temp (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
|
||||
}
|
||||
|
||||
spi_init ();
|
||||
tsc2000_reg_init ();
|
||||
|
||||
contact_temp = tsc2000_contact_temp();
|
||||
printf ("%d degree C * 100\n", contact_temp) ;
|
||||
@@ -577,7 +579,6 @@ static int test_contact_temp (void)
|
||||
{
|
||||
int contact_temp;
|
||||
|
||||
spi_init ();
|
||||
contact_temp = tsc2000_contact_temp ();
|
||||
|
||||
if ((contact_temp < MIN_CONTACT_TEMP)
|
||||
@@ -840,4 +841,55 @@ static int dummy(void)
|
||||
return (0);
|
||||
}
|
||||
|
||||
int do_temp_log (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
|
||||
{
|
||||
int contact_temp;
|
||||
int delay = 0;
|
||||
#if (CONFIG_COMMANDS & CFG_CMD_DATE)
|
||||
struct rtc_time tm;
|
||||
#endif
|
||||
|
||||
if (argc > 2) {
|
||||
printf ("Usage:\n%s\n", cmdtp->usage);
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (argc > 1) {
|
||||
delay = simple_strtoul(argv[1], NULL, 10);
|
||||
}
|
||||
|
||||
spi_init ();
|
||||
while (1) {
|
||||
|
||||
#if (CONFIG_COMMANDS & CFG_CMD_DATE)
|
||||
rtc_get (&tm);
|
||||
printf ("%4d-%02d-%02d %2d:%02d:%02d - ",
|
||||
tm.tm_year, tm.tm_mon, tm.tm_mday,
|
||||
tm.tm_hour, tm.tm_min, tm.tm_sec);
|
||||
#endif
|
||||
|
||||
contact_temp = tsc2000_contact_temp();
|
||||
printf ("%d\n", contact_temp) ;
|
||||
|
||||
if (delay != 0)
|
||||
/*
|
||||
* reset timer to avoid timestamp overflow problem
|
||||
* after about 68 minutes of udelay() time.
|
||||
*/
|
||||
reset_timer_masked ();
|
||||
sdelay (delay);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
U_BOOT_CMD(
|
||||
tlog, 2, 1, do_temp_log,
|
||||
"tlog - log contact temperature [1/100 C] to console (endlessly)\n",
|
||||
"delay\n"
|
||||
" - contact temperature [1/100 C] is printed endlessly to console\n"
|
||||
" <delay> specifies the seconds to wait between two measurements\n"
|
||||
" For each measurment a timestamp is printeted\n"
|
||||
);
|
||||
|
||||
#endif /* CFG_CMD_BSP */
|
||||
|
||||
@@ -31,6 +31,16 @@
|
||||
|
||||
#include "Pt1000_temp_data.h"
|
||||
|
||||
/* helper function */
|
||||
#define abs(value) (((value) < 0) ? ((value)*-1) : (value))
|
||||
|
||||
/*
|
||||
* Maximal allowed deviation between two immediate meassurments of an analog
|
||||
* thermo channel. 1 DIGIT = 0.0276 °C. This is used to filter sporadic
|
||||
* "jumps" in measurment.
|
||||
*/
|
||||
#define MAX_DEVIATION 18 /* unit: DIGITs of adc; 18 DIGIT = 0.5 °C */
|
||||
|
||||
void spi_init(void)
|
||||
{
|
||||
S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO();
|
||||
@@ -227,15 +237,48 @@ s32 tsc2000_contact_temp (void)
|
||||
long adc_pt1000, offset;
|
||||
long u_pt1000;
|
||||
long contact_temp;
|
||||
|
||||
long temp1, temp2;
|
||||
|
||||
tsc2000_reg_init ();
|
||||
tsc2000_set_range (3);
|
||||
|
||||
adc_pt1000 = tsc2000_read_channel (14);
|
||||
/*
|
||||
* Because of sporadic "jumps" in the measured adc values every
|
||||
* channel is read two times. If there is a significant difference
|
||||
* between the two measurements, then print an error and do a third
|
||||
* measurement, because it is very unlikely that a successive third
|
||||
* measurement goes also wrong.
|
||||
*/
|
||||
temp1 = tsc2000_read_channel (14);
|
||||
temp2 = tsc2000_read_channel (14);
|
||||
if (abs(temp2 - temp1) < MAX_DEVIATION)
|
||||
adc_pt1000 = temp2;
|
||||
else {
|
||||
printf ("%s: read adc value (channel 14) exceeded max allowed "
|
||||
"deviation: %d * 0.0276 °C\n",
|
||||
__FUNCTION__, MAX_DEVIATION);
|
||||
printf ("adc value 1: %ld DIGITs\nadc value 2: %ld DIGITs\n",
|
||||
temp1, temp2);
|
||||
adc_pt1000 = tsc2000_read_channel (14);
|
||||
printf ("use (third read) adc value: adc_pt1000 = "
|
||||
"%ld DIGITs\n", adc_pt1000);
|
||||
}
|
||||
debug ("read channel 14 (pt1000 adc value): %ld\n", adc_pt1000);
|
||||
|
||||
offset = tsc2000_read_channel (15);
|
||||
temp1 = tsc2000_read_channel (15);
|
||||
temp2 = tsc2000_read_channel (15);
|
||||
if (abs(temp2 - temp1) < MAX_DEVIATION)
|
||||
offset = temp2;
|
||||
else {
|
||||
printf ("%s: read adc value (channel 15) exceeded max allowed "
|
||||
"deviation: %d * 0.0276 °C\n",
|
||||
__FUNCTION__, MAX_DEVIATION);
|
||||
printf ("adc value 1: %ld DIGITs\nadc value 2: %ld DIGITs\n",
|
||||
temp1, temp2);
|
||||
offset = tsc2000_read_channel (15);
|
||||
printf ("use (third read) adc value: offset = %ld DIGITs\n",
|
||||
offset);
|
||||
}
|
||||
debug ("read channel 15 (offset): %ld\n", offset);
|
||||
|
||||
/*
|
||||
|
||||
@@ -41,6 +41,9 @@
|
||||
#include <linux/ctype.h>
|
||||
#include <asm/byteorder.h>
|
||||
#include <ext2fs.h>
|
||||
#if ((CONFIG_COMMANDS & CFG_CMD_USB) && defined(CONFIG_USB_STORAGE))
|
||||
#include <usb.h>
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_DOS_PARTITION
|
||||
#error DOS partition support must be selected
|
||||
@@ -223,7 +226,7 @@ int do_ext2load (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
|
||||
PRINTF("Using device %s%d, partition %d\n", argv[1], dev, part);
|
||||
|
||||
if (part != 0) {
|
||||
if (get_partition_info (&dev_desc[dev], part, &info)) {
|
||||
if (get_partition_info (dev_desc, part, &info)) {
|
||||
printf ("** Bad partition %d **\n", part);
|
||||
return(1);
|
||||
}
|
||||
|
||||
@@ -413,7 +413,7 @@ int do_diskboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
|
||||
}
|
||||
part = simple_strtoul(++ep, NULL, 16);
|
||||
}
|
||||
if (get_partition_info (&ide_dev_desc[dev], part, &info)) {
|
||||
if (get_partition_info (ide_dev_desc, part, &info)) {
|
||||
SHOW_BOOT_PROGRESS (-1);
|
||||
return 1;
|
||||
}
|
||||
@@ -450,11 +450,12 @@ int do_diskboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
|
||||
checksum = ntohl(hdr->ih_hcrc);
|
||||
hdr->ih_hcrc = 0;
|
||||
|
||||
if (crc32 (0, (char *)&hdr, sizeof(image_header_t)) != checksum) {
|
||||
if (crc32 (0, (char *)hdr, sizeof(image_header_t)) != checksum) {
|
||||
puts ("\n** Bad Header Checksum **\n");
|
||||
SHOW_BOOT_PROGRESS (-2);
|
||||
return 1;
|
||||
}
|
||||
hdr->ih_hcrc = htonl(checksum); /* restore checksum for later use */
|
||||
|
||||
print_image_hdr (hdr);
|
||||
|
||||
@@ -870,7 +871,7 @@ input_swap_data(int dev, ulong *sect_buf, int words)
|
||||
dbuf+=1;
|
||||
}
|
||||
}
|
||||
#else
|
||||
#else
|
||||
volatile ushort *pbuf = (ushort *)(ATA_CURR_BASE(dev)+ATA_DATA_REG);
|
||||
ushort *dbuf = (ushort *)sect_buf;
|
||||
|
||||
|
||||
@@ -212,7 +212,7 @@ int do_reiserload (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
|
||||
PRINTF("Using device %s%d, partition %d\n", argv[1], dev, part);
|
||||
|
||||
if (part != 0) {
|
||||
if (get_partition_info (&dev_desc[dev], part, &info)) {
|
||||
if (get_partition_info (dev_desc, part, &info)) {
|
||||
printf ("** Bad partition %d **\n", part);
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -243,7 +243,7 @@ int do_scsiboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
|
||||
}
|
||||
part = simple_strtoul(++ep, NULL, 16);
|
||||
}
|
||||
if (get_partition_info (&scsi_dev_desc[dev], part, &info)) {
|
||||
if (get_partition_info (scsi_dev_desc, part, &info)) {
|
||||
printf("error reading partinfo\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -32,7 +32,9 @@
|
||||
|
||||
#include <usb.h>
|
||||
|
||||
#ifdef CONFIG_USB_STORAGE
|
||||
static int usb_stor_curr_dev=-1; /* current device */
|
||||
#endif
|
||||
|
||||
/* some display routines (info command) */
|
||||
char * usb_get_class_desc(unsigned char dclass)
|
||||
@@ -441,7 +443,9 @@ int do_usb (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
|
||||
|
||||
int i;
|
||||
struct usb_device *dev = NULL;
|
||||
#ifdef CONFIG_USB_STORAGE
|
||||
block_dev_desc_t *stor_dev;
|
||||
#endif
|
||||
|
||||
if ((strncmp(argv[1],"reset",5) == 0) ||
|
||||
(strncmp(argv[1],"start",5) == 0)){
|
||||
|
||||
@@ -115,7 +115,7 @@ static void mpc5xxx_fec_tbd_init(mpc5xxx_fec_priv *fec)
|
||||
}
|
||||
|
||||
/********************************************************************/
|
||||
static void mpc5xxx_fec_rbd_clean(mpc5xxx_fec_priv *fec, FEC_RBD * pRbd)
|
||||
static void mpc5xxx_fec_rbd_clean(mpc5xxx_fec_priv *fec, volatile FEC_RBD * pRbd)
|
||||
{
|
||||
/*
|
||||
* Reset buffer descriptor as empty
|
||||
@@ -141,7 +141,7 @@ static void mpc5xxx_fec_rbd_clean(mpc5xxx_fec_priv *fec, FEC_RBD * pRbd)
|
||||
/********************************************************************/
|
||||
static void mpc5xxx_fec_tbd_scrub(mpc5xxx_fec_priv *fec)
|
||||
{
|
||||
FEC_TBD *pUsedTbd;
|
||||
volatile FEC_TBD *pUsedTbd;
|
||||
|
||||
#if (DEBUG & 0x1)
|
||||
printf ("tbd_scrub: fec->cleanTbdNum = %d, fec->usedTbdIndex = %d\n",
|
||||
@@ -354,10 +354,10 @@ static int mpc5xxx_fec_init(struct eth_device *dev, bd_t * bis)
|
||||
/*
|
||||
* Initialize SmartDMA parameters stored in SRAM
|
||||
*/
|
||||
*(int *)FEC_TBD_BASE = (int)fec->tbdBase;
|
||||
*(int *)FEC_RBD_BASE = (int)fec->rbdBase;
|
||||
*(int *)FEC_TBD_NEXT = (int)fec->tbdBase;
|
||||
*(int *)FEC_RBD_NEXT = (int)fec->rbdBase;
|
||||
*(volatile int *)FEC_TBD_BASE = (int)fec->tbdBase;
|
||||
*(volatile int *)FEC_RBD_BASE = (int)fec->rbdBase;
|
||||
*(volatile int *)FEC_TBD_NEXT = (int)fec->tbdBase;
|
||||
*(volatile int *)FEC_RBD_NEXT = (int)fec->rbdBase;
|
||||
|
||||
/*
|
||||
* Enable FEC-Lite controller
|
||||
@@ -688,7 +688,7 @@ static int mpc5xxx_fec_send(struct eth_device *dev, volatile void *eth_data,
|
||||
* 6-byte Ethernet addresses.
|
||||
*/
|
||||
mpc5xxx_fec_priv *fec = (mpc5xxx_fec_priv *)dev->priv;
|
||||
FEC_TBD *pTbd;
|
||||
volatile FEC_TBD *pTbd;
|
||||
|
||||
#if (DEBUG & 0x20)
|
||||
printf("tbd status: 0x%04x\n", fec->tbdBase[0].status);
|
||||
@@ -779,7 +779,7 @@ static int mpc5xxx_fec_recv(struct eth_device *dev)
|
||||
* This command pulls one frame from the card
|
||||
*/
|
||||
mpc5xxx_fec_priv *fec = (mpc5xxx_fec_priv *)dev->priv;
|
||||
FEC_RBD *pRbd = &fec->rbdBase[fec->rbdIndex];
|
||||
volatile FEC_RBD *pRbd = &fec->rbdBase[fec->rbdIndex];
|
||||
unsigned long ievent;
|
||||
int frame_length, len = 0;
|
||||
NBUF *frame;
|
||||
|
||||
@@ -36,7 +36,8 @@
|
||||
#if ((CONFIG_COMMANDS & CFG_CMD_IDE) || \
|
||||
(CONFIG_COMMANDS & CFG_CMD_SCSI) || \
|
||||
(CONFIG_COMMANDS & CFG_CMD_USB) || \
|
||||
(CONFIG_MMC) || (CONFIG_SYSTEMACE) )
|
||||
defined(CONFIG_MMC) || \
|
||||
defined(CONFIG_SYSTEMACE) )
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
/*
|
||||
|
||||
@@ -26,7 +26,11 @@
|
||||
#include <ide.h>
|
||||
#include "part_amiga.h"
|
||||
|
||||
#if ((CONFIG_COMMANDS & CFG_CMD_IDE) || (CONFIG_COMMANDS & CFG_CMD_SCSI)) && defined(CONFIG_AMIGA_PARTITION)
|
||||
#if ((CONFIG_COMMANDS & CFG_CMD_IDE) || \
|
||||
(CONFIG_COMMANDS & CFG_CMD_SCSI) || \
|
||||
(CONFIG_COMMANDS & CFG_CMD_USB) || \
|
||||
defined(CONFIG_MMC) || \
|
||||
defined(CONFIG_SYSTEMACE) ) && defined(CONFIG_AMIGA_PARTITION)
|
||||
|
||||
#undef AMIGA_DEBUG
|
||||
|
||||
|
||||
@@ -38,7 +38,8 @@
|
||||
#if ((CONFIG_COMMANDS & CFG_CMD_IDE) || \
|
||||
(CONFIG_COMMANDS & CFG_CMD_SCSI) || \
|
||||
(CONFIG_COMMANDS & CFG_CMD_USB) || \
|
||||
(CONFIG_SYSTEMACE)) && defined(CONFIG_DOS_PARTITION)
|
||||
defined(CONFIG_MMC) || \
|
||||
defined(CONFIG_SYSTEMACE) ) && defined(CONFIG_DOS_PARTITION)
|
||||
|
||||
/* Convert char[4] in little endian format to the host format integer
|
||||
*/
|
||||
|
||||
@@ -25,9 +25,13 @@
|
||||
#include <command.h>
|
||||
#include "part_iso.h"
|
||||
|
||||
#if ((CONFIG_COMMANDS & CFG_CMD_IDE) || (CONFIG_COMMANDS & CFG_CMD_SCSI)) && defined(CONFIG_ISO_PARTITION)
|
||||
#if ((CONFIG_COMMANDS & CFG_CMD_IDE) || \
|
||||
(CONFIG_COMMANDS & CFG_CMD_SCSI) || \
|
||||
(CONFIG_COMMANDS & CFG_CMD_USB) || \
|
||||
defined(CONFIG_MMC) || \
|
||||
defined(CONFIG_SYSTEMACE) ) && defined(CONFIG_ISO_PARTITION)
|
||||
|
||||
#undef ISO_PART_DEBUG
|
||||
/* #define ISO_PART_DEBUG */
|
||||
|
||||
#ifdef ISO_PART_DEBUG
|
||||
#define PRINTF(fmt,args...) printf (fmt ,##args)
|
||||
|
||||
@@ -34,7 +34,11 @@
|
||||
#include <ide.h>
|
||||
#include "part_mac.h"
|
||||
|
||||
#if ((CONFIG_COMMANDS & CFG_CMD_IDE) || (CONFIG_COMMANDS & CFG_CMD_SCSI)) && defined(CONFIG_MAC_PARTITION)
|
||||
#if ((CONFIG_COMMANDS & CFG_CMD_IDE) || \
|
||||
(CONFIG_COMMANDS & CFG_CMD_SCSI) || \
|
||||
(CONFIG_COMMANDS & CFG_CMD_USB) || \
|
||||
defined(CONFIG_MMC) || \
|
||||
defined(CONFIG_SYSTEMACE) ) && defined(CONFIG_MAC_PARTITION)
|
||||
|
||||
/* stdlib.h causes some compatibility problems; should fixe these! -- wd */
|
||||
#ifndef __ldiv_t_defined
|
||||
|
||||
@@ -33,7 +33,6 @@
|
||||
static block_dev_desc_t *ext2fs_block_dev_desc;
|
||||
static disk_partition_t part_info;
|
||||
|
||||
#undef DEBUG
|
||||
int ext2fs_set_blk_dev (block_dev_desc_t * rbdd, int part)
|
||||
{
|
||||
ext2fs_block_dev_desc = rbdd;
|
||||
@@ -74,9 +73,7 @@ int ext2fs_devread (int sector, int byte_offset, int byte_len, char *buf) {
|
||||
sector += byte_offset >> SECTOR_BITS;
|
||||
byte_offset &= SECTOR_SIZE - 1;
|
||||
|
||||
#if defined(DEBUG)
|
||||
printf (" <%d, %d, %d>\n", sector, byte_offset, byte_len);
|
||||
#endif
|
||||
debug (" <%d, %d, %d>\n", sector, byte_offset, byte_len);
|
||||
|
||||
if (ext2fs_block_dev_desc == NULL) {
|
||||
printf ("** Invalid Block Device Descriptor (NULL)\n");
|
||||
|
||||
@@ -42,6 +42,8 @@
|
||||
|
||||
#define CONFIG_SYS_CLK_FREQ 33330000 /* external frequency to pll */
|
||||
|
||||
#define CONFIG_BOARD_TYPES 1 /* support board types */
|
||||
|
||||
#define CONFIG_BAUDRATE 9600
|
||||
#define CONFIG_BOOTDELAY 3 /* autoboot after 3 seconds */
|
||||
|
||||
|
||||
@@ -132,7 +132,7 @@
|
||||
|
||||
/* IDE */
|
||||
#if defined (CONFIG_MINIFAP) || defined (CONFIG_STK52XX)
|
||||
#define ADD_IDE_CMD CFG_CMD_IDE | CFG_CMD_FAT
|
||||
#define ADD_IDE_CMD (CFG_CMD_IDE | CFG_CMD_FAT | CFG_CMD_EXT2)
|
||||
#else
|
||||
#define ADD_IDE_CMD 0
|
||||
#endif
|
||||
@@ -141,20 +141,25 @@
|
||||
* Supported commands
|
||||
*/
|
||||
#define CONFIG_COMMANDS (CONFIG_CMD_DFL | \
|
||||
CFG_CMD_EEPROM | \
|
||||
CFG_CMD_I2C | \
|
||||
ADD_IDE_CMD | \
|
||||
ADD_PCI_CMD | \
|
||||
ADD_USB_CMD | \
|
||||
CFG_CMD_POST_DIAG | \
|
||||
CFG_CMD_ASKENV | \
|
||||
CFG_CMD_DATE | \
|
||||
CFG_CMD_REGINFO | \
|
||||
CFG_CMD_DHCP | \
|
||||
CFG_CMD_ECHO | \
|
||||
CFG_CMD_EEPROM | \
|
||||
CFG_CMD_I2C | \
|
||||
CFG_CMD_MII | \
|
||||
CFG_CMD_PING | \
|
||||
ADD_IDE_CMD)
|
||||
CFG_CMD_POST_DIAG | \
|
||||
CFG_CMD_REGINFO )
|
||||
|
||||
/* this must be included AFTER the definition of CONFIG_COMMANDS (if any) */
|
||||
#include <cmd_confdefs.h>
|
||||
|
||||
#define CONFIG_TIMESTAMP /* display image timestamps */
|
||||
|
||||
#if (TEXT_BASE == 0xFC000000) /* Boot low */
|
||||
# define CFG_LOWBOOT 1
|
||||
#endif
|
||||
|
||||
@@ -29,25 +29,27 @@
|
||||
* (easy to change)
|
||||
*/
|
||||
|
||||
#define CONFIG_MPC5xxx 1 /* This is an MPC5xxx CPU */
|
||||
#define CONFIG_MPC5200 1 /* (more precisely an MPC5200 CPU) */
|
||||
#define CONFIG_INKA4X0 1 /* INKA4x0 board */
|
||||
#define CONFIG_MPC5xxx 1 /* This is an MPC5xxx CPU */
|
||||
#define CONFIG_MPC5200 1 /* (more precisely an MPC5200 CPU) */
|
||||
#define CONFIG_INKA4X0 1 /* INKA4x0 board */
|
||||
|
||||
#define CFG_MPC5XXX_CLKIN 33000000 /* ... running at 33.000000MHz */
|
||||
#define CFG_MPC5XXX_CLKIN 33000000 /* ... running at 33.000000MHz */
|
||||
|
||||
#define BOOTFLAG_COLD 0x01 /* Normal Power-On: Boot from FLASH */
|
||||
#define BOOTFLAG_WARM 0x02 /* Software reboot */
|
||||
#define BOOTFLAG_COLD 0x01 /* Normal Power-On: Boot from FLASH */
|
||||
#define BOOTFLAG_WARM 0x02 /* Software reboot */
|
||||
|
||||
#define CFG_CACHELINE_SIZE 32 /* For MPC5xxx CPUs */
|
||||
#define CONFIG_MISC_INIT_F 1 /* Use misc_init_f() */
|
||||
|
||||
#define CFG_CACHELINE_SIZE 32 /* For MPC5xxx CPUs */
|
||||
#if (CONFIG_COMMANDS & CFG_CMD_KGDB)
|
||||
# define CFG_CACHELINE_SHIFT 5 /* log base 2 of the above value */
|
||||
# define CFG_CACHELINE_SHIFT 5 /* log base 2 of the above value */
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Serial console configuration
|
||||
*/
|
||||
#define CONFIG_PSC_CONSOLE 1 /* console is on PSC1 */
|
||||
#define CONFIG_BAUDRATE 115200 /* ... at 115200 bps */
|
||||
#define CONFIG_PSC_CONSOLE 1 /* console is on PSC1 */
|
||||
#define CONFIG_BAUDRATE 115200 /* ... at 115200 bps */
|
||||
#define CFG_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200, 230400 }
|
||||
|
||||
/*
|
||||
@@ -78,12 +80,17 @@
|
||||
* Supported commands
|
||||
*/
|
||||
#define CONFIG_COMMANDS (CONFIG_CMD_DFL | \
|
||||
CFG_CMD_EXT2 | \
|
||||
CFG_CMD_FAT | \
|
||||
CFG_CMD_IDE | \
|
||||
CFG_CMD_PCI | \
|
||||
CFG_CMD_USB )
|
||||
|
||||
/* this must be included AFTER the definition of CONFIG_COMMANDS (if any) */
|
||||
#include <cmd_confdefs.h>
|
||||
|
||||
#define CONFIG_TIMESTAMP 1 /* Print image info with timestamp */
|
||||
|
||||
#if (TEXT_BASE == 0xFFE00000) /* Boot low */
|
||||
# define CFG_LOWBOOT 1
|
||||
#endif
|
||||
@@ -257,6 +264,21 @@
|
||||
#define CFG_CS0_START CFG_FLASH_BASE
|
||||
#define CFG_CS0_SIZE CFG_FLASH_SIZE
|
||||
|
||||
/* 32Mbit SRAM @0x30000000 */
|
||||
#define CFG_CS1_START 0x30000000
|
||||
#define CFG_CS1_SIZE 0x00400000
|
||||
#define CFG_CS1_CFG 0x31800 /* for pci_clk = 33 MHz */
|
||||
|
||||
/* 2 quad UART @0x80000000 (MBAR is relocated to 0xF0000000) */
|
||||
#define CFG_CS2_START 0x80000000
|
||||
#define CFG_CS2_SIZE 0x0001000
|
||||
#define CFG_CS2_CFG 0x21800 /* for pci_clk = 33 MHz */
|
||||
|
||||
/* GPIO in @0x30400000 */
|
||||
#define CFG_CS3_START 0x30400000
|
||||
#define CFG_CS3_SIZE 0x00100000
|
||||
#define CFG_CS3_CFG 0x31800 /* for pci_clk = 33 MHz */
|
||||
|
||||
#define CFG_CS_BURST 0x00000000
|
||||
#define CFG_CS_DEADCYCLE 0x33333333
|
||||
|
||||
@@ -265,7 +287,42 @@
|
||||
*-----------------------------------------------------------------------
|
||||
*/
|
||||
#define CONFIG_USB_OHCI
|
||||
#define CONFIG_USB_CLOCK 0x00015555
|
||||
#define CONFIG_USB_CONFIG 0x00001000
|
||||
#define CONFIG_USB_CLOCK 0x00015555
|
||||
#define CONFIG_USB_CONFIG 0x00001000
|
||||
#define CONFIG_USB_STORAGE
|
||||
|
||||
/*-----------------------------------------------------------------------
|
||||
* IDE/ATA stuff Supports IDE harddisk
|
||||
*-----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#undef CONFIG_IDE_8xx_PCCARD /* Use IDE with PC Card Adapter */
|
||||
|
||||
#undef CONFIG_IDE_8xx_DIRECT /* Direct IDE not supported */
|
||||
#undef CONFIG_IDE_LED /* LED for ide not supported */
|
||||
|
||||
#define CONFIG_IDE_RESET /* reset for ide supported */
|
||||
#define CONFIG_IDE_PREINIT
|
||||
|
||||
#define CFG_IDE_MAXBUS 1 /* max. 1 IDE bus */
|
||||
#define CFG_IDE_MAXDEVICE 2 /* max. 1 drive per IDE bus */
|
||||
|
||||
#define CFG_ATA_IDE0_OFFSET 0x0000
|
||||
|
||||
#define CFG_ATA_BASE_ADDR MPC5XXX_ATA
|
||||
|
||||
/* Offset for data I/O */
|
||||
#define CFG_ATA_DATA_OFFSET (0x0060)
|
||||
|
||||
/* Offset for normal register accesses */
|
||||
#define CFG_ATA_REG_OFFSET (CFG_ATA_DATA_OFFSET)
|
||||
|
||||
/* Offset for alternate registers */
|
||||
#define CFG_ATA_ALT_OFFSET (0x005C)
|
||||
|
||||
/* Interval between registers */
|
||||
#define CFG_ATA_STRIDE 4
|
||||
|
||||
#define CONFIG_ATAPI 1
|
||||
|
||||
#endif /* __CONFIG_H */
|
||||
|
||||
@@ -290,10 +290,10 @@
|
||||
#endif /* CFG_HUSH_PARSER */
|
||||
#endif /* CONFIG_FLASH_8MB */
|
||||
|
||||
#if 0 /* disabled for development */
|
||||
#if 1 /* feel free to disable for development */
|
||||
#define CONFIG_AUTOBOOT_KEYED /* Enable password protection */
|
||||
#define CONFIG_AUTOBOOT_PROMPT "\nEnter password - autoboot in %d sec...\n"
|
||||
#define CONFIG_AUTOBOOT_DELAY_STR "system" /* 1st password */
|
||||
#define CONFIG_AUTOBOOT_DELAY_STR "R" /* 1st "password" */
|
||||
#endif
|
||||
|
||||
#if (CONFIG_COMMANDS & CFG_CMD_KGDB)
|
||||
|
||||
@@ -233,6 +233,21 @@
|
||||
/* General Purpose Timers registers */
|
||||
#define MPC5XXX_GPT0_ENABLE (MPC5XXX_GPT + 0x0)
|
||||
#define MPC5XXX_GPT0_COUNTER (MPC5XXX_GPT + 0x4)
|
||||
#define MPC5XXX_GPT1_ENABLE (MPC5XXX_GPT + 0x10)
|
||||
#define MPC5XXX_GPT1_COUNTER (MPC5XXX_GPT + 0x14)
|
||||
#define MPC5XXX_GPT2_ENABLE (MPC5XXX_GPT + 0x20)
|
||||
#define MPC5XXX_GPT2_COUNTER (MPC5XXX_GPT + 0x24)
|
||||
#define MPC5XXX_GPT3_ENABLE (MPC5XXX_GPT + 0x30)
|
||||
#define MPC5XXX_GPT3_COUNTER (MPC5XXX_GPT + 0x34)
|
||||
#define MPC5XXX_GPT4_ENABLE (MPC5XXX_GPT + 0x40)
|
||||
#define MPC5XXX_GPT4_COUNTER (MPC5XXX_GPT + 0x44)
|
||||
#define MPC5XXX_GPT5_ENABLE (MPC5XXX_GPT + 0x50)
|
||||
#define MPC5XXX_GPT5_COUNTER (MPC5XXX_GPT + 0x54)
|
||||
#define MPC5XXX_GPT6_ENABLE (MPC5XXX_GPT + 0x60)
|
||||
#define MPC5XXX_GPT6_COUNTER (MPC5XXX_GPT + 0x64)
|
||||
#define MPC5XXX_GPT7_ENABLE (MPC5XXX_GPT + 0x70)
|
||||
#define MPC5XXX_GPT7_COUNTER (MPC5XXX_GPT + 0x74)
|
||||
|
||||
|
||||
/* ATA registers */
|
||||
#define MPC5XXX_ATA_HOST_CONFIG (MPC5XXX_ATA + 0x0000)
|
||||
|
||||
Reference in New Issue
Block a user