#endif
#include <ide.h>
#include <ata.h>
-#include <cmd_ide.h>
#include <cmd_disk.h>
#ifdef CONFIG_STATUS_LED
# include <status_led.h>
/* ------------------------------------------------------------------------- */
#ifdef CONFIG_IDE_LED
+#ifndef CONFIG_KUP4K
static void ide_led (uchar led, uchar status);
#else
+extern void ide_led (uchar led, uchar status);
+#endif
+#else
#ifndef CONFIG_AMIGAONEG3SE
#define ide_led(a,b) /* dummy */
#else
SHOW_BOOT_PROGRESS (-1);
return 1;
}
- if (strncmp(info.type, BOOT_PART_TYPE, sizeof(info.type)) != 0) {
+ if ((strncmp(info.type, BOOT_PART_TYPE, sizeof(info.type)) != 0) &&
+ (strncmp(info.type, BOOT_PART_COMP, sizeof(info.type)) != 0)) {
printf ("\n** Invalid partition type \"%.32s\""
" (expect \"" BOOT_PART_TYPE "\")\n",
info.type);
#ifdef CONFIG_IDE_8xx_PCCARD
extern int pcmcia_on (void);
+ extern int ide_devices_found; /* Initialized in check_ide_device() */
WATCHDOG_RESET();
+ ide_devices_found = 0;
/* initialize the PCMCIA IDE adapter card */
- if (pcmcia_on())
+ pcmcia_on();
+ if (!ide_devices_found)
return;
udelay (1000000); /* 1 s */
#endif /* CONFIG_IDE_8xx_PCCARD */
int dev = bus * (CFG_IDE_MAXDEVICE / max_bus_scan);
#endif
+#ifdef CONFIG_IDE_8xx_PCCARD
+ /* Skip non-ide devices from probing */
+ if ((ide_devices_found & (1 << bus)) == 0) {
+ ide_led ((LED_IDE1 | LED_IDE2), 0); /* LED's off */
+ continue;
+ }
+#endif
printf ("Bus %d: ", bus);
ide_bus_ok[bus] = 0;
#endif /* __PPC__ */
#ifdef __PPC__
-__inline__ unsigned ld_le16(const volatile unsigned short *addr)
-{
- unsigned val;
-
- __asm__ __volatile__ ("lhbrx %0,0,%1" : "=r"(val) : "r"(addr), "m"(*addr));
- return val;
-}
-
-#ifdef CONFIG_AMIGAONEG3SE
+# ifdef CONFIG_AMIGAONEG3SE
static void
output_data_short(int dev, ulong *sect_buf, int words)
{
ushort *dbuf;
volatile ushort *pbuf;
-
+
pbuf = (ushort *)(ATA_CURR_BASE(dev)+ATA_DATA_REG);
dbuf = (ushort *)sect_buf;
while (words--) {
if (words&1)
*pbuf = 0;
}
-#endif
+# endif /* CONFIG_AMIGAONEG3SE */
static void
input_swap_data(int dev, ulong *sect_buf, int words)
#endif /* __PPC__ */
-
-
#ifdef __PPC__
static void
output_data(int dev, ulong *sect_buf, int words)
/* ------------------------------------------------------------------------- */
-#if defined(CONFIG_IDE_LED) && !defined(CONFIG_AMIGAONEG3SE)
+#if defined(CONFIG_IDE_LED) && !defined(CONFIG_AMIGAONEG3SE) && !defined(CONFIG_KUP4K)
static uchar led_buffer = 0; /* Buffer for current LED status */
*/
-
#undef ATAPI_DEBUG
#ifdef ATAPI_DEBUG
}
-
static void atapi_inquiry(block_dev_desc_t * dev_desc)
{
unsigned char ccb[12]; /* Command descriptor block */
#endif /* CONFIG_ATAPI */
+cmd_tbl_t U_BOOT_CMD(IDE) = MK_CMD_ENTRY(
+ "ide", 5, 1, do_ide,
+ "ide - IDE sub-system\n",
+ "reset - reset IDE controller\n"
+ "ide info - show available IDE devices\n"
+ "ide device [dev] - show or set current device\n"
+ "ide part [dev] - print partition table of one or all IDE devices\n"
+ "ide read addr blk# cnt\n"
+ "ide write addr blk# cnt - read/write `cnt'"
+ " blocks starting at block `blk#'\n"
+ " to/from memory address `addr'\n"
+);
+
+cmd_tbl_t U_BOOT_CMD(DISK) = MK_CMD_ENTRY(
+ "diskboot", 3, 1, do_diskboot,
+ "diskboot- boot from IDE device\n",
+ "loadAddr dev:part\n"
+);
+
#endif /* CONFIG_COMMANDS & CFG_CMD_IDE */