From ae1768a72cf70c00eec6824a5cc9079b0a247640 Mon Sep 17 00:00:00 2001 From: Egbert Eich Date: Tue, 9 Apr 2013 06:03:36 +0000 Subject: 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 --- include/part.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/part.h') 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 -- cgit v1.2.1