1affae2bfSwdenk /* 2affae2bfSwdenk * (C) Copyright 2001 3affae2bfSwdenk * Wolfgang Denk, DENX Software Engineering, wd@denx.de. 4affae2bfSwdenk * 5affae2bfSwdenk * See file CREDITS for list of people who contributed to this 6affae2bfSwdenk * project. 7affae2bfSwdenk * 8affae2bfSwdenk * This program is free software; you can redistribute it and/or 9affae2bfSwdenk * modify it under the terms of the GNU General Public License as 10affae2bfSwdenk * published by the Free Software Foundation; either version 2 of 11affae2bfSwdenk * the License, or (at your option) any later version. 12affae2bfSwdenk * 13affae2bfSwdenk * This program is distributed in the hope that it will be useful, 14affae2bfSwdenk * but WITHOUT ANY WARRANTY; without even the implied warranty of 15affae2bfSwdenk * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16affae2bfSwdenk * GNU General Public License for more details. 17affae2bfSwdenk * 18affae2bfSwdenk * You should have received a copy of the GNU General Public License 19affae2bfSwdenk * along with this program; if not, write to the Free Software 20affae2bfSwdenk * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 21affae2bfSwdenk * MA 02111-1307 USA 22affae2bfSwdenk */ 23affae2bfSwdenk 24affae2bfSwdenk #include <common.h> 25affae2bfSwdenk #include <command.h> 26affae2bfSwdenk #include <ide.h> 27735dd97bSGrant Likely #include <part.h> 28affae2bfSwdenk 29affae2bfSwdenk #undef PART_DEBUG 30affae2bfSwdenk 31affae2bfSwdenk #ifdef PART_DEBUG 32affae2bfSwdenk #define PRINTF(fmt,args...) printf (fmt ,##args) 33affae2bfSwdenk #else 34affae2bfSwdenk #define PRINTF(fmt,args...) 35affae2bfSwdenk #endif 36affae2bfSwdenk 37cde5c64dSJon Loeliger #if (defined(CONFIG_CMD_IDE) || \ 3875eb82ecSunsik Kim defined(CONFIG_CMD_MG_DISK) || \ 39c7057b52SDave Liu defined(CONFIG_CMD_SATA) || \ 40cde5c64dSJon Loeliger defined(CONFIG_CMD_SCSI) || \ 41cde5c64dSJon Loeliger defined(CONFIG_CMD_USB) || \ 421968e615Swdenk defined(CONFIG_MMC) || \ 431968e615Swdenk defined(CONFIG_SYSTEMACE) ) 44affae2bfSwdenk 45735dd97bSGrant Likely struct block_drvr { 46735dd97bSGrant Likely char *name; 47735dd97bSGrant Likely block_dev_desc_t* (*get_dev)(int dev); 48735dd97bSGrant Likely }; 49735dd97bSGrant Likely 50735dd97bSGrant Likely static const struct block_drvr block_drvr[] = { 51cde5c64dSJon Loeliger #if defined(CONFIG_CMD_IDE) 52735dd97bSGrant Likely { .name = "ide", .get_dev = ide_get_dev, }, 53735dd97bSGrant Likely #endif 54c7057b52SDave Liu #if defined(CONFIG_CMD_SATA) 55c7057b52SDave Liu {.name = "sata", .get_dev = sata_get_dev, }, 56c7057b52SDave Liu #endif 57cde5c64dSJon Loeliger #if defined(CONFIG_CMD_SCSI) 58735dd97bSGrant Likely { .name = "scsi", .get_dev = scsi_get_dev, }, 59735dd97bSGrant Likely #endif 60cde5c64dSJon Loeliger #if defined(CONFIG_CMD_USB) && defined(CONFIG_USB_STORAGE) 61735dd97bSGrant Likely { .name = "usb", .get_dev = usb_stor_get_dev, }, 62735dd97bSGrant Likely #endif 63735dd97bSGrant Likely #if defined(CONFIG_MMC) 64735dd97bSGrant Likely { .name = "mmc", .get_dev = mmc_get_dev, }, 65735dd97bSGrant Likely #endif 66735dd97bSGrant Likely #if defined(CONFIG_SYSTEMACE) 67735dd97bSGrant Likely { .name = "ace", .get_dev = systemace_get_dev, }, 68735dd97bSGrant Likely #endif 6975eb82ecSunsik Kim #if defined(CONFIG_CMD_MG_DISK) 7075eb82ecSunsik Kim { .name = "mgd", .get_dev = mg_disk_get_dev, }, 7175eb82ecSunsik Kim #endif 72735dd97bSGrant Likely { }, 73735dd97bSGrant Likely }; 74735dd97bSGrant Likely 75751bb571SStefan Roese DECLARE_GLOBAL_DATA_PTR; 76751bb571SStefan Roese 77735dd97bSGrant Likely block_dev_desc_t *get_dev(char* ifname, int dev) 78735dd97bSGrant Likely { 79735dd97bSGrant Likely const struct block_drvr *drvr = block_drvr; 80751bb571SStefan Roese block_dev_desc_t* (*reloc_get_dev)(int dev); 81751bb571SStefan Roese 826c7cac8cSStefan Roese while (drvr->name) { 83521af04dSPeter Tyser reloc_get_dev = drvr->get_dev; 84521af04dSPeter Tyser #ifndef CONFIG_RELOC_FIXUP_WORKS 85521af04dSPeter Tyser reloc_get_dev += gd->reloc_off; 86521af04dSPeter Tyser #endif 87751bb571SStefan Roese if (strncmp(ifname, drvr->name, strlen(drvr->name)) == 0) 88751bb571SStefan Roese return reloc_get_dev(dev); 89735dd97bSGrant Likely drvr++; 90735dd97bSGrant Likely } 91735dd97bSGrant Likely return NULL; 92735dd97bSGrant Likely } 93735dd97bSGrant Likely #else 94735dd97bSGrant Likely block_dev_desc_t *get_dev(char* ifname, int dev) 95735dd97bSGrant Likely { 96735dd97bSGrant Likely return NULL; 97735dd97bSGrant Likely } 98735dd97bSGrant Likely #endif 99735dd97bSGrant Likely 100cde5c64dSJon Loeliger #if (defined(CONFIG_CMD_IDE) || \ 10175eb82ecSunsik Kim defined(CONFIG_CMD_MG_DISK) || \ 102c7057b52SDave Liu defined(CONFIG_CMD_SATA) || \ 103cde5c64dSJon Loeliger defined(CONFIG_CMD_SCSI) || \ 104cde5c64dSJon Loeliger defined(CONFIG_CMD_USB) || \ 105735dd97bSGrant Likely defined(CONFIG_MMC) || \ 106735dd97bSGrant Likely defined(CONFIG_SYSTEMACE) ) 107735dd97bSGrant Likely 108affae2bfSwdenk /* ------------------------------------------------------------------------- */ 109affae2bfSwdenk /* 110affae2bfSwdenk * reports device info to the user 111affae2bfSwdenk */ 11269a2a4d9SSergei Trofimovich 11369a2a4d9SSergei Trofimovich #ifdef CONFIG_LBA48 11469a2a4d9SSergei Trofimovich typedef uint64_t lba512_t; 11569a2a4d9SSergei Trofimovich #else 11669a2a4d9SSergei Trofimovich typedef lbaint_t lba512_t; 11769a2a4d9SSergei Trofimovich #endif 11869a2a4d9SSergei Trofimovich 11969a2a4d9SSergei Trofimovich /* 12069a2a4d9SSergei Trofimovich * Overflowless variant of (block_count * mul_by / div_by) 12169a2a4d9SSergei Trofimovich * when div_by > mul_by 12269a2a4d9SSergei Trofimovich */ 12369a2a4d9SSergei Trofimovich static lba512_t lba512_muldiv (lba512_t block_count, lba512_t mul_by, lba512_t div_by) 12469a2a4d9SSergei Trofimovich { 12569a2a4d9SSergei Trofimovich lba512_t bc_quot, bc_rem; 12669a2a4d9SSergei Trofimovich 12769a2a4d9SSergei Trofimovich /* x * m / d == x / d * m + (x % d) * m / d */ 12869a2a4d9SSergei Trofimovich bc_quot = block_count / div_by; 12969a2a4d9SSergei Trofimovich bc_rem = block_count - div_by * bc_quot; 13069a2a4d9SSergei Trofimovich return bc_quot * mul_by + (bc_rem * mul_by) / div_by; 13169a2a4d9SSergei Trofimovich } 13269a2a4d9SSergei Trofimovich 133affae2bfSwdenk void dev_print (block_dev_desc_t *dev_desc) 134affae2bfSwdenk { 13569a2a4d9SSergei Trofimovich lba512_t lba512; /* number of blocks if 512bytes block size */ 136affae2bfSwdenk 137af75a45dSWolfgang Denk if (dev_desc->type == DEV_TYPE_UNKNOWN) { 138af75a45dSWolfgang Denk puts ("not available\n"); 139af75a45dSWolfgang Denk return; 140af75a45dSWolfgang Denk } 141af75a45dSWolfgang Denk 1428ec6e332STor Krill switch (dev_desc->if_type) { 143574b3195SDetlev Zundel case IF_TYPE_SCSI: 144574b3195SDetlev Zundel printf ("(%d:%d) Vendor: %s Prod.: %s Rev: %s\n", 145574b3195SDetlev Zundel dev_desc->target,dev_desc->lun, 146affae2bfSwdenk dev_desc->vendor, 147affae2bfSwdenk dev_desc->product, 148affae2bfSwdenk dev_desc->revision); 149574b3195SDetlev Zundel break; 1506e24a1ebSRemy Bohmer case IF_TYPE_ATAPI: 151574b3195SDetlev Zundel case IF_TYPE_IDE: 152574b3195SDetlev Zundel case IF_TYPE_SATA: 153574b3195SDetlev Zundel printf ("Model: %s Firm: %s Ser#: %s\n", 154574b3195SDetlev Zundel dev_desc->vendor, 155574b3195SDetlev Zundel dev_desc->revision, 156574b3195SDetlev Zundel dev_desc->product); 157574b3195SDetlev Zundel break; 1586e24a1ebSRemy Bohmer case IF_TYPE_SD: 1596e24a1ebSRemy Bohmer case IF_TYPE_MMC: 16047bebe34SNícolas Carneiro Lebedenco case IF_TYPE_USB: 16147bebe34SNícolas Carneiro Lebedenco printf ("Vendor: %s Rev: %s Prod: %s\n", 16247bebe34SNícolas Carneiro Lebedenco dev_desc->vendor, 16347bebe34SNícolas Carneiro Lebedenco dev_desc->revision, 16447bebe34SNícolas Carneiro Lebedenco dev_desc->product); 16547bebe34SNícolas Carneiro Lebedenco break; 1666e24a1ebSRemy Bohmer case IF_TYPE_DOC: 1676e24a1ebSRemy Bohmer puts("device type DOC\n"); 1686e24a1ebSRemy Bohmer return; 1698ec6e332STor Krill case IF_TYPE_UNKNOWN: 1706e24a1ebSRemy Bohmer puts("device type unknown\n"); 1716e24a1ebSRemy Bohmer return; 172574b3195SDetlev Zundel default: 1736e24a1ebSRemy Bohmer printf("Unhandled device type: %i\n", dev_desc->if_type); 174574b3195SDetlev Zundel return; 175affae2bfSwdenk } 176affae2bfSwdenk puts (" Type: "); 177affae2bfSwdenk if (dev_desc->removable) 178affae2bfSwdenk puts ("Removable "); 179affae2bfSwdenk switch (dev_desc->type & 0x1F) { 180726c0f1eSDetlev Zundel case DEV_TYPE_HARDDISK: 181726c0f1eSDetlev Zundel puts ("Hard Disk"); 182affae2bfSwdenk break; 183726c0f1eSDetlev Zundel case DEV_TYPE_CDROM: 184726c0f1eSDetlev Zundel puts ("CD ROM"); 185affae2bfSwdenk break; 186726c0f1eSDetlev Zundel case DEV_TYPE_OPDISK: 187726c0f1eSDetlev Zundel puts ("Optical Device"); 188affae2bfSwdenk break; 189726c0f1eSDetlev Zundel case DEV_TYPE_TAPE: 190726c0f1eSDetlev Zundel puts ("Tape"); 191affae2bfSwdenk break; 192726c0f1eSDetlev Zundel default: 193726c0f1eSDetlev Zundel printf ("# %02X #", dev_desc->type & 0x1F); 194affae2bfSwdenk break; 195affae2bfSwdenk } 196affae2bfSwdenk puts ("\n"); 197affae2bfSwdenk if ((dev_desc->lba * dev_desc->blksz)>0L) { 198affae2bfSwdenk ulong mb, mb_quot, mb_rem, gb, gb_quot, gb_rem; 199c40b2956Swdenk lbaint_t lba; 2006e592385Swdenk 201c40b2956Swdenk lba = dev_desc->lba; 202affae2bfSwdenk 203c40b2956Swdenk lba512 = (lba * (dev_desc->blksz/512)); 204affae2bfSwdenk /* round to 1 digit */ 20569a2a4d9SSergei Trofimovich mb = lba512_muldiv(lba512, 10, 2048); /* 2048 = (1024 * 1024) / 512 MB */ 20669a2a4d9SSergei Trofimovich 207affae2bfSwdenk mb_quot = mb / 10; 208affae2bfSwdenk mb_rem = mb - (10 * mb_quot); 209affae2bfSwdenk 210affae2bfSwdenk gb = mb / 1024; 211affae2bfSwdenk gb_quot = gb / 10; 212affae2bfSwdenk gb_rem = gb - (10 * gb_quot); 21342dfe7a1Swdenk #ifdef CONFIG_LBA48 2146e592385Swdenk if (dev_desc->lba48) 215c40b2956Swdenk printf (" Supports 48-bit addressing\n"); 216c40b2956Swdenk #endif 2174b142febSHeiko Schocher #if defined(CONFIG_SYS_64BIT_LBA) 2186c6166f5SMike Frysinger printf (" Capacity: %ld.%ld MB = %ld.%ld GB (%Ld x %ld)\n", 219c40b2956Swdenk mb_quot, mb_rem, 220c40b2956Swdenk gb_quot, gb_rem, 221c40b2956Swdenk lba, 222c40b2956Swdenk dev_desc->blksz); 223c40b2956Swdenk #else 224affae2bfSwdenk printf (" Capacity: %ld.%ld MB = %ld.%ld GB (%ld x %ld)\n", 225affae2bfSwdenk mb_quot, mb_rem, 226affae2bfSwdenk gb_quot, gb_rem, 227c40b2956Swdenk (ulong)lba, 228affae2bfSwdenk dev_desc->blksz); 229c40b2956Swdenk #endif 230affae2bfSwdenk } else { 231affae2bfSwdenk puts (" Capacity: not available\n"); 232affae2bfSwdenk } 233affae2bfSwdenk } 234b3aff0cbSJon Loeliger #endif 235affae2bfSwdenk 236cde5c64dSJon Loeliger #if (defined(CONFIG_CMD_IDE) || \ 23775eb82ecSunsik Kim defined(CONFIG_CMD_MG_DISK) || \ 238c7057b52SDave Liu defined(CONFIG_CMD_SATA) || \ 239cde5c64dSJon Loeliger defined(CONFIG_CMD_SCSI) || \ 240cde5c64dSJon Loeliger defined(CONFIG_CMD_USB) || \ 2417fac3f69SHaavard Skinnemoen defined(CONFIG_MMC) || \ 2423f85ce27Swdenk defined(CONFIG_SYSTEMACE) ) 243affae2bfSwdenk 244affae2bfSwdenk #if defined(CONFIG_MAC_PARTITION) || \ 245affae2bfSwdenk defined(CONFIG_DOS_PARTITION) || \ 246c7de829cSwdenk defined(CONFIG_ISO_PARTITION) || \ 24707f3d789Srichardretanubun defined(CONFIG_AMIGA_PARTITION) || \ 24807f3d789Srichardretanubun defined(CONFIG_EFI_PARTITION) 249affae2bfSwdenk 250affae2bfSwdenk void init_part (block_dev_desc_t * dev_desc) 251affae2bfSwdenk { 252affae2bfSwdenk #ifdef CONFIG_ISO_PARTITION 253affae2bfSwdenk if (test_part_iso(dev_desc) == 0) { 254affae2bfSwdenk dev_desc->part_type = PART_TYPE_ISO; 255affae2bfSwdenk return; 256affae2bfSwdenk } 257affae2bfSwdenk #endif 258affae2bfSwdenk 259affae2bfSwdenk #ifdef CONFIG_MAC_PARTITION 260affae2bfSwdenk if (test_part_mac(dev_desc) == 0) { 261affae2bfSwdenk dev_desc->part_type = PART_TYPE_MAC; 262affae2bfSwdenk return; 263affae2bfSwdenk } 264affae2bfSwdenk #endif 265affae2bfSwdenk 26607f3d789Srichardretanubun /* must be placed before DOS partition detection */ 26707f3d789Srichardretanubun #ifdef CONFIG_EFI_PARTITION 26807f3d789Srichardretanubun if (test_part_efi(dev_desc) == 0) { 26907f3d789Srichardretanubun dev_desc->part_type = PART_TYPE_EFI; 27007f3d789Srichardretanubun return; 27107f3d789Srichardretanubun } 27207f3d789Srichardretanubun #endif 27307f3d789Srichardretanubun 274affae2bfSwdenk #ifdef CONFIG_DOS_PARTITION 275affae2bfSwdenk if (test_part_dos(dev_desc) == 0) { 276affae2bfSwdenk dev_desc->part_type = PART_TYPE_DOS; 277affae2bfSwdenk return; 278affae2bfSwdenk } 279affae2bfSwdenk #endif 280c7de829cSwdenk 281c7de829cSwdenk #ifdef CONFIG_AMIGA_PARTITION 282c7de829cSwdenk if (test_part_amiga(dev_desc) == 0) { 283c7de829cSwdenk dev_desc->part_type = PART_TYPE_AMIGA; 284c7de829cSwdenk return; 285c7de829cSwdenk } 286c7de829cSwdenk #endif 287affae2bfSwdenk } 288affae2bfSwdenk 289affae2bfSwdenk 2903e3b9569SPeter Pearse int get_partition_info (block_dev_desc_t *dev_desc, int part 2913e3b9569SPeter Pearse , disk_partition_t *info) 292affae2bfSwdenk { 293affae2bfSwdenk switch (dev_desc->part_type) { 294affae2bfSwdenk #ifdef CONFIG_MAC_PARTITION 295affae2bfSwdenk case PART_TYPE_MAC: 296affae2bfSwdenk if (get_partition_info_mac(dev_desc,part,info) == 0) { 297affae2bfSwdenk PRINTF ("## Valid MAC partition found ##\n"); 298affae2bfSwdenk return (0); 299affae2bfSwdenk } 300affae2bfSwdenk break; 301affae2bfSwdenk #endif 302affae2bfSwdenk 303affae2bfSwdenk #ifdef CONFIG_DOS_PARTITION 304affae2bfSwdenk case PART_TYPE_DOS: 305affae2bfSwdenk if (get_partition_info_dos(dev_desc,part,info) == 0) { 306affae2bfSwdenk PRINTF ("## Valid DOS partition found ##\n"); 307affae2bfSwdenk return (0); 308affae2bfSwdenk } 309affae2bfSwdenk break; 310affae2bfSwdenk #endif 311affae2bfSwdenk 312affae2bfSwdenk #ifdef CONFIG_ISO_PARTITION 313affae2bfSwdenk case PART_TYPE_ISO: 314affae2bfSwdenk if (get_partition_info_iso(dev_desc,part,info) == 0) { 315affae2bfSwdenk PRINTF ("## Valid ISO boot partition found ##\n"); 316affae2bfSwdenk return (0); 317affae2bfSwdenk } 318affae2bfSwdenk break; 319affae2bfSwdenk #endif 320c7de829cSwdenk 321c7de829cSwdenk #ifdef CONFIG_AMIGA_PARTITION 322c7de829cSwdenk case PART_TYPE_AMIGA: 323c7de829cSwdenk if (get_partition_info_amiga(dev_desc, part, info) == 0) 324c7de829cSwdenk { 325c7de829cSwdenk PRINTF ("## Valid Amiga partition found ##\n"); 326c7de829cSwdenk return (0); 327c7de829cSwdenk } 328c7de829cSwdenk break; 329c7de829cSwdenk #endif 33007f3d789Srichardretanubun 33107f3d789Srichardretanubun #ifdef CONFIG_EFI_PARTITION 33207f3d789Srichardretanubun case PART_TYPE_EFI: 33307f3d789Srichardretanubun if (get_partition_info_efi(dev_desc,part,info) == 0) { 33407f3d789Srichardretanubun PRINTF ("## Valid EFI partition found ##\n"); 33507f3d789Srichardretanubun return (0); 33607f3d789Srichardretanubun } 33707f3d789Srichardretanubun break; 33807f3d789Srichardretanubun #endif 339affae2bfSwdenk default: 340affae2bfSwdenk break; 341affae2bfSwdenk } 342affae2bfSwdenk return (-1); 343affae2bfSwdenk } 344affae2bfSwdenk 345affae2bfSwdenk static void print_part_header (const char *type, block_dev_desc_t * dev_desc) 346affae2bfSwdenk { 347affae2bfSwdenk puts ("\nPartition Map for "); 348affae2bfSwdenk switch (dev_desc->if_type) { 349726c0f1eSDetlev Zundel case IF_TYPE_IDE: 350726c0f1eSDetlev Zundel puts ("IDE"); 351affae2bfSwdenk break; 352726c0f1eSDetlev Zundel case IF_TYPE_SATA: 353726c0f1eSDetlev Zundel puts ("SATA"); 354c7057b52SDave Liu break; 355726c0f1eSDetlev Zundel case IF_TYPE_SCSI: 356726c0f1eSDetlev Zundel puts ("SCSI"); 357affae2bfSwdenk break; 358726c0f1eSDetlev Zundel case IF_TYPE_ATAPI: 359726c0f1eSDetlev Zundel puts ("ATAPI"); 360affae2bfSwdenk break; 361726c0f1eSDetlev Zundel case IF_TYPE_USB: 362726c0f1eSDetlev Zundel puts ("USB"); 363affae2bfSwdenk break; 364726c0f1eSDetlev Zundel case IF_TYPE_DOC: 365726c0f1eSDetlev Zundel puts ("DOC"); 366affae2bfSwdenk break; 367*8f3b9642SLei Wen case IF_TYPE_MMC: 368*8f3b9642SLei Wen puts ("MMC"); 369*8f3b9642SLei Wen break; 370726c0f1eSDetlev Zundel default: 371726c0f1eSDetlev Zundel puts ("UNKNOWN"); 372affae2bfSwdenk break; 373affae2bfSwdenk } 374affae2bfSwdenk printf (" device %d -- Partition Type: %s\n\n", 375affae2bfSwdenk dev_desc->dev, type); 376affae2bfSwdenk } 377affae2bfSwdenk 378affae2bfSwdenk void print_part (block_dev_desc_t * dev_desc) 379affae2bfSwdenk { 380affae2bfSwdenk 381affae2bfSwdenk switch (dev_desc->part_type) { 382affae2bfSwdenk #ifdef CONFIG_MAC_PARTITION 383affae2bfSwdenk case PART_TYPE_MAC: 384affae2bfSwdenk PRINTF ("## Testing for valid MAC partition ##\n"); 385affae2bfSwdenk print_part_header ("MAC", dev_desc); 386affae2bfSwdenk print_part_mac (dev_desc); 387affae2bfSwdenk return; 388affae2bfSwdenk #endif 389affae2bfSwdenk #ifdef CONFIG_DOS_PARTITION 390affae2bfSwdenk case PART_TYPE_DOS: 391affae2bfSwdenk PRINTF ("## Testing for valid DOS partition ##\n"); 392affae2bfSwdenk print_part_header ("DOS", dev_desc); 393affae2bfSwdenk print_part_dos (dev_desc); 394affae2bfSwdenk return; 395affae2bfSwdenk #endif 396affae2bfSwdenk 397affae2bfSwdenk #ifdef CONFIG_ISO_PARTITION 398affae2bfSwdenk case PART_TYPE_ISO: 399affae2bfSwdenk PRINTF ("## Testing for valid ISO Boot partition ##\n"); 400affae2bfSwdenk print_part_header ("ISO", dev_desc); 401affae2bfSwdenk print_part_iso (dev_desc); 402affae2bfSwdenk return; 403affae2bfSwdenk #endif 404c7de829cSwdenk 405c7de829cSwdenk #ifdef CONFIG_AMIGA_PARTITION 406c7de829cSwdenk case PART_TYPE_AMIGA: 407c7de829cSwdenk PRINTF ("## Testing for a valid Amiga partition ##\n"); 408c7de829cSwdenk print_part_header ("AMIGA", dev_desc); 409c7de829cSwdenk print_part_amiga (dev_desc); 410c7de829cSwdenk return; 411c7de829cSwdenk #endif 41207f3d789Srichardretanubun 41307f3d789Srichardretanubun #ifdef CONFIG_EFI_PARTITION 41407f3d789Srichardretanubun case PART_TYPE_EFI: 41507f3d789Srichardretanubun PRINTF ("## Testing for valid EFI partition ##\n"); 41607f3d789Srichardretanubun print_part_header ("EFI", dev_desc); 41707f3d789Srichardretanubun print_part_efi (dev_desc); 41807f3d789Srichardretanubun return; 41907f3d789Srichardretanubun #endif 420affae2bfSwdenk } 421affae2bfSwdenk puts ("## Unknown partition table\n"); 422affae2bfSwdenk } 423affae2bfSwdenk 424affae2bfSwdenk 42507f3d789Srichardretanubun #else /* neither MAC nor DOS nor ISO nor AMIGA nor EFI partition configured */ 4263e3b9569SPeter Pearse # error neither CONFIG_MAC_PARTITION nor CONFIG_DOS_PARTITION 42707f3d789Srichardretanubun # error nor CONFIG_ISO_PARTITION nor CONFIG_AMIGA_PARTITION 42807f3d789Srichardretanubun # error nor CONFIG_EFI_PARTITION configured! 429affae2bfSwdenk #endif 430affae2bfSwdenk 431cde5c64dSJon Loeliger #endif 432