[PATCH] ARM: OMAP: 2430SDP: Use defines in asm/sizes.h

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Instead of manually calculating the partition sizes, it's
better to use defines already set in include/asm-arm/sizes.h

Compile test only.

Signed-off-by: Felipe Balbi <felipe.balbi@xxxxxxxxx>
---
 arch/arm/mach-omap2/board-2430sdp-flash.c |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/arch/arm/mach-omap2/board-2430sdp-flash.c b/arch/arm/mach-omap2/board-2430sdp-flash.c
index 47aa8bf..3428483 100644
--- a/arch/arm/mach-omap2/board-2430sdp-flash.c
+++ b/arch/arm/mach-omap2/board-2430sdp-flash.c
@@ -38,25 +38,26 @@ static struct mtd_partition nand_partitions[] = {
 	{
 		.name		= "X-Loader",
 		.offset		= 0,
-		.size		= 4*(64*2048),  /* 0-3 blks reserved.
-						   Mandated by ROM code */
+		.size		= SZ_512K,	 /* 0-3 blks reserved.
+						  * Mandated by ROM code
+						  */
 		.mask_flags	= MTD_WRITEABLE	/* force read-only */
 	},
 	{
 		.name		= "U-Boot",
 		.offset		= MTDPART_OFS_APPEND,
-		.size		=  4*(64*2048),
+		.size		= SZ_512K,
 		.mask_flags	= MTD_WRITEABLE	/* force read-only */
 	},
 	{
 		.name		= "U-Boot Environment",
 		.offset		= MTDPART_OFS_APPEND,
-		.size		= 2*(64*2048),
+		.size		= SZ_256K,
 	},
 	{
 		.name		= "Kernel",
 		.offset		= MTDPART_OFS_APPEND,
-		.size		= 32*(64*2048),		/* 4*1M */
+		.size		= SZ_4M,		/* 4*1M */
 	},
 	{
 		.name		= "File System",
-- 
1.5.5.1.99.gf0ec4

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux