]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
* Fix get_partition_info() parameter error in all other calls
authorwdenk <wdenk>
Fri, 4 Mar 2005 11:27:31 +0000 (11:27 +0000)
committerwdenk <wdenk>
Fri, 4 Mar 2005 11:27:31 +0000 (11:27 +0000)
  (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

CHANGELOG
board/inka4x0/inka4x0.c
common/cmd_ext2.c
common/cmd_ide.c
common/cmd_reiser.c
common/cmd_scsi.c
fs/ext2/dev.c
include/configs/inka4x0.h

index 5d6ecf5aa4185fe4025a278cedd3829464992a6e..38b8d24e8eb411fea7e53522abfcfffe820c4b5e 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -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
index 08a1b7f00bc65dd2cd290588b497c6ac3ef36fd8..4900201dd8fb741638132134b68f87e36e343c24 100644 (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) */
index 75afb320ecc1cf555072c37b7d33eac37ee6db18..af836cd614ef4e61ad2eab6f137a914c69be9ddc 100644 (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);
                }
index 1cc88e3e508d5bf091dc4d3ae8f6c0a19227de6e..e185c95b26d6ce7bfc6bab5ea526ba8d6a55a2d6 100644 (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;
        }
index cb316e596959ef966299c7a60400b0e1892282ac..508ffcbdac8eb4e3dfd04c7ae5ddb7fcfe375714 100644 (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;
                }
index 68e46b6389749493f5f7cb70edf933e6c5846e8f..7ee9d8efb1cc86b15378d4b79637527fc3d741bf 100644 (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;
        }
index 35a576daa8136fc3bcc0de7ad8975111102c762a..1469e982b74fc4e6cab8e3c05348ddc24799f4d7 100644 (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");
index 15b124a2ab1e767d335f24cda62597452ea47e96..038ab75e7cdce8f72dc84d2cf6c86c1c610e108f 100644 (file)
  * 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
 #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 */