]> git.sur5r.net Git - u-boot/blobdiff - disk/part_efi.c
ARM: rmobile: Represent SF partitioning with mtdparts on Porter
[u-boot] / disk / part_efi.c
index f6f5bee8cd8b8b6f0474858151155f367deb4e0f..72e3997b841b0c60b2c48d0bf56c198f63a4deb8 100644 (file)
@@ -1,8 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * Copyright (C) 2008 RuggedCom, Inc.
  * Richard Retanubun <RichardRetanubun@RuggedCom.com>
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 /*
@@ -24,7 +23,7 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-#ifdef HAVE_BLOCK_DEVICE
+#ifdef CONFIG_HAVE_BLOCK_DEVICE
 /**
  * efi_crc32() - EFI version of crc32 function
  * @buf: buffer to calculate crc32 of
@@ -350,7 +349,7 @@ static int part_test_efi(struct blk_desc *dev_desc)
 static int set_protective_mbr(struct blk_desc *dev_desc)
 {
        /* Setup the Protective MBR */
-       ALLOC_CACHE_ALIGN_BUFFER(legacy_mbr, p_mbr, 1);
+       ALLOC_CACHE_ALIGN_BUFFER_PAD(legacy_mbr, p_mbr, 1, dev_desc->blksz);
        memset(p_mbr, 0, sizeof(*p_mbr));
 
        if (p_mbr == NULL) {
@@ -931,7 +930,7 @@ static int is_gpt_valid(struct blk_desc *dev_desc, u64 lba,
                return 0;
        }
 
-       ALLOC_CACHE_ALIGN_BUFFER(legacy_mbr, mbr, dev_desc->blksz);
+       ALLOC_CACHE_ALIGN_BUFFER_PAD(legacy_mbr, mbr, 1, dev_desc->blksz);
 
        /* Read MBR Header from device */
        if (blk_dread(dev_desc, 0, 1, (ulong *)mbr) != 1) {