summaryrefslogtreecommitdiff
path: root/include/part.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/part.h')
-rw-r--r--include/part.h75
1 files changed, 48 insertions, 27 deletions
diff --git a/include/part.h b/include/part.h
index 3cdae02..e68ddcc 100644
--- a/include/part.h
+++ b/include/part.h
@@ -2,6 +2,8 @@
* (C) Copyright 2000-2004
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
*
+ * Copyright (C) 2008-2011 Freescale Semiconductor, Inc.
+ *
* See file CREDITS for list of people who contributed to this
* project.
*
@@ -49,6 +51,9 @@ typedef struct block_dev_desc {
unsigned long start,
lbaint_t blkcnt,
const void *buffer);
+ unsigned long (*block_erase)(int dev,
+ unsigned long start,
+ lbaint_t blkcnt);
void *priv; /* driver private struct pointer */
}block_dev_desc_t;
@@ -93,55 +98,71 @@ typedef struct disk_partition {
} disk_partition_t;
/* Misc _get_dev functions */
-block_dev_desc_t* get_dev(char* ifname, int dev);
-block_dev_desc_t* ide_get_dev(int dev);
-block_dev_desc_t* sata_get_dev(int dev);
-block_dev_desc_t* scsi_get_dev(int dev);
-block_dev_desc_t* usb_stor_get_dev(int dev);
-block_dev_desc_t* mmc_get_dev(int dev);
-block_dev_desc_t* systemace_get_dev(int dev);
-block_dev_desc_t* mg_disk_get_dev(int dev);
+#ifdef CONFIG_PARTITIONS
+block_dev_desc_t *get_dev(char* ifname, int dev);
+block_dev_desc_t *ide_get_dev(int dev);
+block_dev_desc_t *sata_get_dev(int dev);
+block_dev_desc_t *scsi_get_dev(int dev);
+block_dev_desc_t *usb_stor_get_dev(int dev);
+block_dev_desc_t *mmc_get_dev(int dev);
+block_dev_desc_t *systemace_get_dev(int dev);
+block_dev_desc_t *mg_disk_get_dev(int dev);
/* disk/part.c */
-int get_partition_info (block_dev_desc_t * dev_desc, int part, disk_partition_t *info);
-void print_part (block_dev_desc_t *dev_desc);
-void init_part (block_dev_desc_t *dev_desc);
+int get_partition_info(block_dev_desc_t *dev_desc, int part, disk_partition_t *info);
+void print_part(block_dev_desc_t *dev_desc);
+void init_part(block_dev_desc_t *dev_desc);
void dev_print(block_dev_desc_t *dev_desc);
-
+#else
+static inline block_dev_desc_t *get_dev(char* ifname, int dev) { return NULL; }
+static inline block_dev_desc_t *ide_get_dev(int dev) { return NULL; }
+static inline block_dev_desc_t *sata_get_dev(int dev) { return NULL; }
+static inline block_dev_desc_t *scsi_get_dev(int dev) { return NULL; }
+static inline block_dev_desc_t *usb_stor_get_dev(int dev) { return NULL; }
+static inline block_dev_desc_t *mmc_get_dev(int dev) { return NULL; }
+static inline block_dev_desc_t *systemace_get_dev(int dev) { return NULL; }
+static inline block_dev_desc_t *mg_disk_get_dev(int dev) { return NULL; }
+
+static inline int get_partition_info(block_dev_desc_t *dev_desc, int part,
+ disk_partition_t *info) { return -1; }
+static inline void print_part(block_dev_desc_t *dev_desc) {}
+static inline void init_part(block_dev_desc_t *dev_desc) {}
+static inline void dev_print(block_dev_desc_t *dev_desc) {}
+#endif
#ifdef CONFIG_MAC_PARTITION
/* disk/part_mac.c */
-int get_partition_info_mac (block_dev_desc_t * dev_desc, int part, disk_partition_t *info);
-void print_part_mac (block_dev_desc_t *dev_desc);
-int test_part_mac (block_dev_desc_t *dev_desc);
+int get_partition_info_mac(block_dev_desc_t *dev_desc, int part, disk_partition_t *info);
+void print_part_mac(block_dev_desc_t *dev_desc);
+int test_part_mac(block_dev_desc_t *dev_desc);
#endif
#ifdef CONFIG_DOS_PARTITION
/* disk/part_dos.c */
-int get_partition_info_dos (block_dev_desc_t * dev_desc, int part, disk_partition_t *info);
-void print_part_dos (block_dev_desc_t *dev_desc);
-int test_part_dos (block_dev_desc_t *dev_desc);
+int get_partition_info_dos(block_dev_desc_t *dev_desc, int part, disk_partition_t *info);
+void print_part_dos(block_dev_desc_t *dev_desc);
+int test_part_dos(block_dev_desc_t *dev_desc);
#endif
#ifdef CONFIG_ISO_PARTITION
/* disk/part_iso.c */
-int get_partition_info_iso (block_dev_desc_t * dev_desc, int part, disk_partition_t *info);
-void print_part_iso (block_dev_desc_t *dev_desc);
-int test_part_iso (block_dev_desc_t *dev_desc);
+int get_partition_info_iso(block_dev_desc_t *dev_desc, int part, disk_partition_t *info);
+void print_part_iso(block_dev_desc_t *dev_desc);
+int test_part_iso(block_dev_desc_t *dev_desc);
#endif
#ifdef CONFIG_AMIGA_PARTITION
/* disk/part_amiga.c */
-int get_partition_info_amiga (block_dev_desc_t * dev_desc, int part, disk_partition_t *info);
-void print_part_amiga (block_dev_desc_t *dev_desc);
-int test_part_amiga (block_dev_desc_t *dev_desc);
+int get_partition_info_amiga(block_dev_desc_t *dev_desc, int part, disk_partition_t *info);
+void print_part_amiga(block_dev_desc_t *dev_desc);
+int test_part_amiga(block_dev_desc_t *dev_desc);
#endif
#ifdef CONFIG_EFI_PARTITION
/* disk/part_efi.c */
-int get_partition_info_efi (block_dev_desc_t * dev_desc, int part, disk_partition_t *info);
-void print_part_efi (block_dev_desc_t *dev_desc);
-int test_part_efi (block_dev_desc_t *dev_desc);
+int get_partition_info_efi(block_dev_desc_t *dev_desc, int part, disk_partition_t *info);
+void print_part_efi(block_dev_desc_t *dev_desc);
+int test_part_efi(block_dev_desc_t *dev_desc);
#endif
#endif /* _PART_H */