Skip to contentSkip to conversation

omap3evm: Add support for EFI partitions

PATCH New Sanjeev Premi 1 participant 3 messages Nov 15, 2011

lore
Share & tools
lore
#0 lore raw

v2 cover omap3evm: Add support for EFI partitions

After enabling CONFIG_EFI_PARTITION, following errors were noticed.

part_efi.c: In function 'print_part_efi':
part_efi.c:133:5: warning: passing argument 3 of 'is_gpt_valid'
from incompatible pointer type
part_efi.c:95:12: note: expected 'struct gpt_header *' but arg ument is of type 'struct gpt_header **'
part_efi.c: In function 'get_partition_info_efi':
part_efi.c:173:4: warning: passing argument 3 of 'is_gpt_valid ' from incompatible pointer type
part_efi.c:95:12: note: expected 'struct gpt_header *' but arg ument is of type 'struct gpt_header **'
part_efi.c: In function 'alloc_read_gpt_entries':
part_efi.c:384:18: error: 'CONFIG_SYS_CACHELINE_SIZE' undeclar ed (first use in this function)
part_efi.c:384:18: note: each undeclared identifier is reporte d only once for each function it appears in
make[1]: *** [part_efi.o] Error 1
make[1]: Leaving directory `/home/premi/disk'
make: *** [disk/libdisk.o] Error 2

Tested working via command "mmc part" on OMAP3EVM on MMC card with EFI partitions.

Changes since v1:
* Use ARCH_DMA_MINALIGN instead of CONFIG_SYS_CACHELINE_SIZE in disk/part_efi.c.
* Removed (now) redundant definition of CONFIG_SYS_CACHELINE_SIZE from /include/configs/omap3_evm_common.h

REF: http://lists.denx.de/pipermail/u-boot/2011-November/109895.html

Sanjeev Premi (2):
part_efi: Fix compile errors
omap3evm: Add support for EFI partitions

 disk/part_efi.c             |    6 +++---
 include/configs/omap3_evm.h |    1 +
 2 files changed, 4 insertions(+), 3 deletions(-)
Cc Sandeep Paulraj <[email protected]>
#1 lore raw

PATCH v2 1/2 part_efi: Fix compile errors

Fix errors noticed after enabling CONFIG_EFI_PARTITION for the OMAP3 EVM board:

part_efi.c: In function 'print_part_efi':
part_efi.c:133:5: warning: passing argument 3 of 'is_gpt_valid'
from incompatible pointer type
part_efi.c:95:12: note: expected 'struct gpt_header *' but arg ument is of type 'struct gpt_header **'
part_efi.c: In function 'get_partition_info_efi':
part_efi.c:173:4: warning: passing argument 3 of 'is_gpt_valid ' from incompatible pointer type
part_efi.c:95:12: note: expected 'struct gpt_header *' but arg ument is of type 'struct gpt_header **'
part_efi.c: In function 'alloc_read_gpt_entries':
part_efi.c:384:18: error: 'CONFIG_SYS_CACHELINE_SIZE' undeclare d (first use in this function)

---

Changes since v1:
* Use ARCH_DMA_MINALIGN instead of CONFIG_SYS_CACHELINE_SIZE in disk/part_efi.c.

It is based on definition of ARCH_DMA_MINALIGN introduced in 44d6cbb6a77665caa14be2a561c4148446b3ba7e:

arm: cache: define ARCH_DMA_MINALIGN for DMA buffer alignment

 disk/part_efi.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
disk/part_efi.c +3 -3
index e7f2714..b6cda57 100644
@@ -130,7 +130,7 @@ void print_part_efi(block_dev_desc_t * dev_desc)
 	}
 	/* This function validates AND fills in the GPT header and PTE */
 	if (is_gpt_valid(dev_desc, GPT_PRIMARY_PARTITION_TABLE_LBA,
-			 &(gpt_head), &gpt_pte) != 1) {
+			 gpt_head, &gpt_pte) != 1) {
 		printf("%s: *** ERROR: Invalid GPT ***\n", __func__);
 		return;
 	}
@@ -169,7 +169,7 @@ int get_partition_info_efi(block_dev_desc_t * dev_desc, int part,
 
 	/* This function validates AND fills in the GPT header and PTE */
 	if (is_gpt_valid(dev_desc, GPT_PRIMARY_PARTITION_TABLE_LBA,
-			&(gpt_head), &gpt_pte) != 1) {
+			gpt_head, &gpt_pte) != 1) {
 		printf("%s: *** ERROR: Invalid GPT ***\n", __func__);
 		return -1;
 	}
@@ -380,7 +380,7 @@ static gpt_entry *alloc_read_gpt_entries(block_dev_desc_t * dev_desc,
 
 	/* Allocate memory for PTE, remember to FREE */
 	if (count != 0) {
-		pte = memalign(CONFIG_SYS_CACHELINE_SIZE, count);
+		pte = memalign(ARCH_DMA_MINALIGN, count);
 	}
 
 	if (count == 0 || pte == NULL) {
Signature · 1 line
1.7.0.4
#2 lore raw

PATCH v2 2/2 omap3evm: Add support for EFI partitions

In reply to Sanjeev Premi

Defines CONFIG_EFI_PARTITION for OMAP3 EVM.

Cc Sandeep Paulraj <[email protected]>
Cc Tom Rini <[email protected]>

---

Changes since v1:
* Removed definition of CONFIG_SYS_CACHELINE_SIZE as it is no longer needed - since ARCH_DMA_MINALIGN is being used in previous patch.

 include/configs/omap3_evm.h |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
include/configs/omap3_evm.h +1 -0
index 47ec39f..9228ef1 100644
@@ -84,6 +84,7 @@
 #define CONFIG_GENERIC_MMC
 #define CONFIG_OMAP_HSMMC
 #define CONFIG_DOS_PARTITION
+#define CONFIG_EFI_PARTITION
 
 /* USB
  *
Signature · 1 line
1.7.0.4