disk/part.c: Make features optional

If we don't want to build support for any partition types we can now
add #undef CONFIG_PARTITIONS in a board config file to keep this from
being compiled in. Otherwise boards assume this is compiled in by
default

Signed-off-by: Matthew McClintock <msm@freescale.com>
This commit is contained in:
Matthew McClintock
2011-05-24 05:31:19 +00:00
committed by Wolfgang Denk
parent 07c07635b4
commit df3fc52608
10 changed files with 32 additions and 3 deletions

View File

@@ -719,10 +719,12 @@ void ide_init (void)
/* ------------------------------------------------------------------------- */
#ifdef CONFIG_PARTITIONS
block_dev_desc_t * ide_get_dev(int dev)
{
return (dev < CONFIG_SYS_IDE_MAXDEVICE) ? &ide_dev_desc[dev] : NULL;
}
#endif
#ifdef CONFIG_IDE_8xx_DIRECT

View File

@@ -57,10 +57,12 @@ int __sata_initialize(void)
}
int sata_initialize(void) __attribute__((weak,alias("__sata_initialize")));
#ifdef CONFIG_PARTITIONS
block_dev_desc_t *sata_get_dev(int dev)
{
return (dev < CONFIG_SYS_SATA_MAX_DEVICE) ? &sata_dev_desc[dev] : NULL;
}
#endif
int do_sata(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{

View File

@@ -194,11 +194,12 @@ void scsi_init(void)
}
#endif
#ifdef CONFIG_PARTITIONS
block_dev_desc_t * scsi_get_dev(int dev)
{
return (dev < CONFIG_SYS_SCSI_MAX_DEVICE) ? &scsi_dev_desc[dev] : NULL;
}
#endif
/******************************************************************************
* scsi boot command intepreter. Derived from diskboot

View File

@@ -173,11 +173,12 @@ unsigned long usb_stor_write(int device, unsigned long blknr,
struct usb_device * usb_get_dev_index(int index);
void uhci_show_temp_int_td(void);
#ifdef CONFIG_PARTITIONS
block_dev_desc_t *usb_stor_get_dev(int index)
{
return (index < usb_max_devs) ? &usb_dev_desc[index] : NULL;
}
#endif
void usb_show_progress(void)
{