* 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
This commit is contained in:
wdenk 2005-03-04 11:27:31 +00:00
parent 47b1e3d77f
commit b05dcb58fe
8 changed files with 85 additions and 8 deletions

View file

@ -5,6 +5,15 @@ Changes for U-Boot 1.1.3:
* 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

View file

@ -200,3 +200,32 @@ void pci_init_board(void)
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) */

View file

@ -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);
}

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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");

View file

@ -80,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
@ -281,4 +286,38 @@
#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 */