summaryrefslogtreecommitdiffstats
path: root/include/part.h
diff options
context:
space:
mode:
authorEgbert Eich <eich@suse.com>2013-04-09 06:03:36 +0000
committerTom Rini <trini@ti.com>2013-05-01 16:24:02 -0400
commitae1768a72cf70c00eec6824a5cc9079b0a247640 (patch)
treef39da7d478d7208b2603d0466c258dd9e710c30f /include/part.h
parent9d956e0fefa39ba49250f61e3c7aa3dadafdb7fd (diff)
downloadtalos-obmc-uboot-ae1768a72cf70c00eec6824a5cc9079b0a247640.tar.gz
talos-obmc-uboot-ae1768a72cf70c00eec6824a5cc9079b0a247640.zip
disk/gpt: Fix GPT partition handling for blocksize != 512
Disks beyond 2T in size use blocksizes of 4096 bytes. However a lot of code in u-boot still assumes a 512 byte blocksize. This patch fixes the handling of GPTs. Signed-off-by: Egbert Eich <eich@suse.com>
Diffstat (limited to 'include/part.h')
-rw-r--r--include/part.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/part.h b/include/part.h
index c58a734ada..12e9b056e4 100644
--- a/include/part.h
+++ b/include/part.h
@@ -55,6 +55,10 @@ typedef struct block_dev_desc {
void *priv; /* driver private struct pointer */
}block_dev_desc_t;
+#define BLOCK_CNT(size, block_dev_desc) (PAD_COUNT(size, block_dev_desc->blksz))
+#define PAD_TO_BLOCKSIZE(size, block_dev_desc) \
+ (PAD_SIZE(size, block_dev_desc->blksz))
+
/* Interface types: */
#define IF_TYPE_UNKNOWN 0
#define IF_TYPE_IDE 1
OpenPOWER on IntegriCloud