TI: OMAP3: Remove SZ_xx references
PATCH 1/1 TI: OMAP3: Remove SZ_xx references
From: Sandeep Paulraj <[email protected]>
This patch removes dependency on the sizes.h header file and removes all references to SZ_xx.
---
Compiled all OMAP3 based boards.
cpu/arm_cortexa8/omap3/mem.c | 6 +++--- cpu/arm_cortexa8/omap3/sys_info.c | 2 +- include/configs/devkit8000.h | 15 +++++++-------- include/configs/omap3_beagle.h | 15 +++++++-------- include/configs/omap3_evm.h | 15 +++++++-------- include/configs/omap3_overo.h | 15 +++++++-------- include/configs/omap3_pandora.h | 15 +++++++-------- include/configs/omap3_zoom1.h | 15 +++++++-------- include/configs/omap3_zoom2.h | 15 +++++++-------- 9 files changed, 53 insertions(+), 60 deletions(-)
cpu/arm_cortexa8/omap3/mem.c +3 -3
@@ -92,7 +92,7 @@ void make_cs1_contiguous(void)u32 size, a_add_low, a_add_high; size =get_sdr_cs_size (CS0 ); - size /=SZ_32M ;/* find size to offset CS1 */ + size /= (32 <<20 );/* find size to offset CS1 */ a_add_high = (size &3 ) <<8 ;/* set up low field */ a_add_low = (size &0x3C ) >>2 ;/* set up high field */ writel ((a_add_high | a_add_low), &sdrc_base->cs_cfg);
@@ -249,7 +249,7 @@ void gpmc_init(void)enable_gpmc_cs_config (gpmc_config, &gpmc_cfg->cs[0 ], base, size);#if defined(CONFIG_ENV_IS_IN_NAND ) f_off =SMNAND_ENV_OFFSET ; - f_sec =SZ_128K ; + f_sec = (128 <<10 );/* env setup */ boot_flash_base = base; boot_flash_off = f_off;
@@ -265,7 +265,7 @@ void gpmc_init(void)enable_gpmc_cs_config (gpmc_config, &gpmc_cfg->cs[0 ], base, size);#if defined(CONFIG_ENV_IS_IN_ONENAND ) f_off =ONENAND_ENV_OFFSET ; - f_sec =SZ_128K ; + f_sec = (128 <<10 );/* env setup */ boot_flash_base = base; boot_flash_off = f_off;
cpu/arm_cortexa8/omap3/sys_info.c +1 -1
@@ -124,7 +124,7 @@ u32 get_sdr_cs_size(u32 cs)/* get ram size field */ size =readl (&sdrc_base->cs[cs].mcfg) >>8 ; size &=0x3FF ;/* remove unwanted bits */ - size *=SZ_2M ;/* find size in MB */ + size *= (2 <<20 );/* find size in MB */ return size; }
include/configs/devkit8000.h +7 -8
@@ -30,7 +30,6 @@#ifndef __CONFIG_H#define __CONFIG_H -#include <asm/sizes.h> /* High Level Configuration Options */ #define CONFIG_ARMCORTEXA8 1/* This is an ARM V7 CPU core */
@@ -59,9 +58,9 @@#define CONFIG_REVISION_TAG 1/* Size of malloc() pool */ -#define CONFIG_ENV_SIZE SZ_128K/* Total Size Environment */ +#define CONFIG_ENV_SIZE (128 << 10)/* 128 KiB */ /* Sector */ -#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + SZ_128K) +#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + (128 << 10))#define CONFIG_SYS_GBL_DATA_SIZE 128/* bytes reserved for */ /* initial data */
@@ -270,16 +269,16 @@#define CONFIG_SYS_HZ 1000/* The stack sizes are set up in start.S using the settings below */ -#define CONFIG_STACKSIZE SZ_128K/* regular stack */ +#define CONFIG_STACKSIZE (128 << 10)/* regular stack 128 KiB */ #ifdef CONFIG_USE_IRQ -#define CONFIG_STACKSIZE_IRQ SZ_4K/* IRQ stack */ -#define CONFIG_STACKSIZE_FIQ SZ_4K/* FIQ stack */ +#define CONFIG_STACKSIZE_IRQ (128 << 10)/* IRQ stack 4 KiB */ +#define CONFIG_STACKSIZE_FIQ (128 << 10)/* FIQ stack 4 KiB */ #endif /* Physical Memory Map */ #define CONFIG_NR_DRAM_BANKS 2/* CS1 may or may not be populated */ #define PHYS_SDRAM_1 OMAP34XX_SDRC_CS0 -#define PHYS_SDRAM_1_SIZE SZ_128M/* at least 128 meg */ +#define PHYS_SDRAM_1_SIZE (128 << 20)/*@least 128 MiB */ #define PHYS_SDRAM_2 OMAP34XX_SDRC_CS1/* SDRAM Bank Allocation method */
@@ -288,7 +287,7 @@/* NAND and environment organization */ #define PISMO1_NAND_SIZE GPMC_SIZE_128M -#define CONFIG_SYS_MONITOR_LEN SZ_256K/* Reserve 2 sectors */ +#define CONFIG_SYS_MONITOR_LEN (256 << 10)/* Reserve 2 sectors */ #define CONFIG_ENV_IS_IN_NAND 1#define SMNAND_ENV_OFFSET 0x260000/* environment starts here */
include/configs/omap3_beagle.h +7 -8
@@ -27,7 +27,6 @@#ifndef __CONFIG_H#define __CONFIG_H -#include <asm/sizes.h> /* * High Level Configuration Options
@@ -62,9 +61,9 @@/* * Size of malloc() pool */ -#define CONFIG_ENV_SIZE SZ_128K/* Total Size Environment */ +#define CONFIG_ENV_SIZE (128 << 10)/* 128 KiB */ /* Sector */ -#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + SZ_128K) +#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + (128 << 10))#define CONFIG_SYS_GBL_DATA_SIZE 128/* bytes reserved for */ /* initial data */
@@ -238,10 +237,10 @@* * The stack sizes are set up in start.S using the settings below */ -#define CONFIG_STACKSIZE SZ_128K/* regular stack */ +#define CONFIG_STACKSIZE (128 << 10)/* regular stack 128 KiB */ #ifdef CONFIG_USE_IRQ -#define CONFIG_STACKSIZE_IRQ SZ_4K/* IRQ stack */ -#define CONFIG_STACKSIZE_FIQ SZ_4K/* FIQ stack */ +#define CONFIG_STACKSIZE_IRQ (4 << 10)/* IRQ stack 4 KiB */ +#define CONFIG_STACKSIZE_FIQ (4 << 10)/* FIQ stack 4 KiB */ #endif /*-----------------------------------------------------------------------
@@ -249,7 +248,7 @@*/ #define CONFIG_NR_DRAM_BANKS 2/* CS1 may or may not be populated */ #define PHYS_SDRAM_1 OMAP34XX_SDRC_CS0 -#define PHYS_SDRAM_1_SIZE SZ_32M/* at least 32 meg */ +#define PHYS_SDRAM_1_SIZE (32 << 20)/*@least 32 MiB */ #define PHYS_SDRAM_2 OMAP34XX_SDRC_CS1/* SDRAM Bank Allocation method */
@@ -268,7 +267,7 @@#define CONFIG_SYS_MAX_FLASH_SECT 520/* max number of sectors on */ /* one chip */ #define CONFIG_SYS_MAX_FLASH_BANKS 2/* max number of flash banks */ -#define CONFIG_SYS_MONITOR_LEN SZ_256K/* Reserve 2 sectors */ +#define CONFIG_SYS_MONITOR_LEN (256 << 10)/* Reserve 2 sectors */ #define CONFIG_SYS_FLASH_BASE boot_flash_base
include/configs/omap3_evm.h +7 -8
@@ -32,7 +32,6 @@#ifndef __CONFIG_H#define __CONFIG_H -#include <asm/sizes.h> /* * High Level Configuration Options
@@ -67,9 +66,9 @@/* * Size of malloc() pool */ -#define CONFIG_ENV_SIZE SZ_128K/* Total Size Environment */ +#define CONFIG_ENV_SIZE (128 << 10)/* 128 KiB */ /* Sector */ -#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + SZ_128K) +#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + (128 << 10))#define CONFIG_SYS_GBL_DATA_SIZE 128/* bytes reserved for */ /* initial data */ /*
@@ -230,10 +229,10 @@* * The stack sizes are set up in start.S using the settings below */ -#define CONFIG_STACKSIZE SZ_128K/* regular stack */ +#define CONFIG_STACKSIZE (128 << 10)/* regular stack 128 KiB */ #ifdef CONFIG_USE_IRQ -#define CONFIG_STACKSIZE_IRQ SZ_4K/* IRQ stack */ -#define CONFIG_STACKSIZE_FIQ SZ_4K/* FIQ stack */ +#define CONFIG_STACKSIZE_IRQ (4 << 10)/* IRQ stack 4 KiB */ +#define CONFIG_STACKSIZE_FIQ (4 << 10)/* FIQ stack 4 KiB */ #endif /*-----------------------------------------------------------------------
@@ -241,7 +240,7 @@*/ #define CONFIG_NR_DRAM_BANKS 2/* CS1 may or may not be populated */ #define PHYS_SDRAM_1 OMAP34XX_SDRC_CS0 -#define PHYS_SDRAM_1_SIZE SZ_32M/* at least 32 meg */ +#define PHYS_SDRAM_1_SIZE (32 << 20)/*@least 32 MiB */ #define PHYS_SDRAM_2 OMAP34XX_SDRC_CS1/* SDRAM Bank Allocation method */
@@ -260,7 +259,7 @@#define CONFIG_SYS_MAX_FLASH_SECT 520/* max number of sectors */ /* on one chip */ #define CONFIG_SYS_MAX_FLASH_BANKS 2/* max number of flash banks */ -#define CONFIG_SYS_MONITOR_LEN SZ_256K/* Reserve 2 sectors */ +#define CONFIG_SYS_MONITOR_LEN (256 << 10)/* Reserve 2 sectors */ #define CONFIG_SYS_FLASH_BASE boot_flash_base
include/configs/omap3_overo.h +7 -8
@@ -19,7 +19,6 @@#ifndef __CONFIG_H#define __CONFIG_H -#include <asm/sizes.h> /* * High Level Configuration Options
@@ -54,9 +53,9 @@/* * Size of malloc() pool */ -#define CONFIG_ENV_SIZE SZ_128K/* Total Size Environment */ +#define CONFIG_ENV_SIZE (128 << 10)/* 128 KiB */ /* Sector */ -#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + SZ_128K) +#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + (128 << 10))#define CONFIG_SYS_GBL_DATA_SIZE 128/* bytes reserved for */ /* initial data */
@@ -223,10 +222,10 @@* * The stack sizes are set up in start.S using the settings below */ -#define CONFIG_STACKSIZE SZ_128K/* regular stack */ +#define CONFIG_STACKSIZE (128 << 10)/* regular stack 128 KiB */ #ifdef CONFIG_USE_IRQ -#define CONFIG_STACKSIZE_IRQ SZ_4K/* IRQ stack */ -#define CONFIG_STACKSIZE_FIQ SZ_4K/* FIQ stack */ +#define CONFIG_STACKSIZE_IRQ (4 << 10)/* IRQ stack 4 KiB */ +#define CONFIG_STACKSIZE_FIQ (4 << 10)/* FIQ stack 4 KiB */ #endif /*-----------------------------------------------------------------------
@@ -234,7 +233,7 @@*/ #define CONFIG_NR_DRAM_BANKS 2/* CS1 may or may not be populated */ #define PHYS_SDRAM_1 OMAP34XX_SDRC_CS0 -#define PHYS_SDRAM_1_SIZE SZ_32M/* at least 32 meg */ +#define PHYS_SDRAM_1_SIZE (32 << 20)/*@least 32 MiB */ #define PHYS_SDRAM_2 OMAP34XX_SDRC_CS1/* SDRAM Bank Allocation method */
@@ -253,7 +252,7 @@#define CONFIG_SYS_MAX_FLASH_SECT 520/* max number of sectors on */ /* one chip */ #define CONFIG_SYS_MAX_FLASH_BANKS 2/* max number of flash banks */ -#define CONFIG_SYS_MONITOR_LEN SZ_256K/* Reserve 2 sectors */ +#define CONFIG_SYS_MONITOR_LEN (256 << 10)/* Reserve 2 sectors */ #define CONFIG_SYS_FLASH_BASE boot_flash_base
include/configs/omap3_pandora.h +7 -8
@@ -22,7 +22,6 @@#ifndef __CONFIG_H#define __CONFIG_H -#include <asm/sizes.h> /* * High Level Configuration Options
@@ -57,9 +56,9 @@/* * Size of malloc() pool */ -#define CONFIG_ENV_SIZE SZ_128K/* Total Size Environment */ +#define CONFIG_ENV_SIZE (128 << 10)/* 128 KiB */ /* Sector */ -#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + SZ_128K) +#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + (128 << 10))#define CONFIG_SYS_GBL_DATA_SIZE 128/* bytes reserved for */ /* initial data */
@@ -227,10 +226,10 @@* * The stack sizes are set up in start.S using the settings below */ -#define CONFIG_STACKSIZE SZ_128K/* regular stack */ +#define CONFIG_STACKSIZE (128 << 10)/* regular stack 128 KiB */ #ifdef CONFIG_USE_IRQ -#define CONFIG_STACKSIZE_IRQ SZ_4K/* IRQ stack */ -#define CONFIG_STACKSIZE_FIQ SZ_4K/* FIQ stack */ +#define CONFIG_STACKSIZE_IRQ (4 << 10)/* IRQ stack 4 KiB */ +#define CONFIG_STACKSIZE_FIQ (4 << 10)/* FIQ stack 4 KiB */ #endif /*-----------------------------------------------------------------------
@@ -238,7 +237,7 @@*/ #define CONFIG_NR_DRAM_BANKS 2/* CS1 may or may not be populated */ #define PHYS_SDRAM_1 OMAP34XX_SDRC_CS0 -#define PHYS_SDRAM_1_SIZE SZ_32M/* at least 32 meg */ +#define PHYS_SDRAM_1_SIZE (32 << 20)/*@least 32 MiB */ #define PHYS_SDRAM_2 OMAP34XX_SDRC_CS1/* SDRAM Bank Allocation method */
@@ -257,7 +256,7 @@#define CONFIG_SYS_MAX_FLASH_SECT 520/* max number of sectors on */ /* one chip */ #define CONFIG_SYS_MAX_FLASH_BANKS 2/* max number of flash banks */ -#define CONFIG_SYS_MONITOR_LEN SZ_256K/* Reserve 2 sectors */ +#define CONFIG_SYS_MONITOR_LEN (256 << 10)/* Reserve 2 sectors */ #define CONFIG_SYS_FLASH_BASE boot_flash_base
include/configs/omap3_zoom1.h +7 -8
@@ -28,7 +28,6 @@#ifndef __CONFIG_H#define __CONFIG_H -#include <asm/sizes.h> /* * High Level Configuration Options
@@ -63,9 +62,9 @@/* * Size of malloc() pool */ -#define CONFIG_ENV_SIZE SZ_128K/* Total Size Environment */ +#define CONFIG_ENV_SIZE (128 << 10)/* 128 KiB */ /* Sector */ -#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + SZ_128K) +#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + (128 << 10))#define CONFIG_SYS_GBL_DATA_SIZE 128/* bytes reserved for */ /* initial data */
@@ -235,10 +234,10 @@* * The stack sizes are set up in start.S using the settings below */ -#define CONFIG_STACKSIZE SZ_128K/* regular stack */ +#define CONFIG_STACKSIZE (128 << 10)/* regular stack 128 KiB */ #ifdef CONFIG_USE_IRQ -#define CONFIG_STACKSIZE_IRQ SZ_4K/* IRQ stack */ -#define CONFIG_STACKSIZE_FIQ SZ_4K/* FIQ stack */ +#define CONFIG_STACKSIZE_IRQ (4 << 10)/* IRQ stack 4 KiB */ +#define CONFIG_STACKSIZE_FIQ (4 << 10)/* FIQ stack 4 KiB */ #endif /*-----------------------------------------------------------------------
@@ -246,7 +245,7 @@*/ #define CONFIG_NR_DRAM_BANKS 2/* CS1 may or may not be populated */ #define PHYS_SDRAM_1 OMAP34XX_SDRC_CS0 -#define PHYS_SDRAM_1_SIZE SZ_32M/* at least 32 meg */ +#define PHYS_SDRAM_1_SIZE (32 << 20)/*@least 32 MiB */ #define PHYS_SDRAM_2 OMAP34XX_SDRC_CS1/* SDRAM Bank Allocation method */
@@ -265,7 +264,7 @@#define CONFIG_SYS_MAX_FLASH_SECT 520/* max number of sectors on */ /* one chip */ #define CONFIG_SYS_MAX_FLASH_BANKS 2/* max number of flash banks */ -#define CONFIG_SYS_MONITOR_LEN SZ_256K/* Reserve 2 sectors */ +#define CONFIG_SYS_MONITOR_LEN (256 << 10)/* Reserve 2 sectors */ #define CONFIG_SYS_FLASH_BASE boot_flash_base
include/configs/omap3_zoom2.h +7 -8
@@ -29,7 +29,6 @@#ifndef __CONFIG_H#define __CONFIG_H -#include <asm/sizes.h> /* * High Level Configuration Options
@@ -64,9 +63,9 @@/* * Size of malloc() pool */ -#define CONFIG_ENV_SIZE SZ_128K/* Total Size Environment */ +#define CONFIG_ENV_SIZE (128 << 10)/* 128 KiB */ /* Sector */ -#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + SZ_128K) +#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + (128 << 10))#define CONFIG_SYS_GBL_DATA_SIZE 128/* bytes reserved for */ /* initial data */ /*
@@ -200,10 +199,10 @@* * The stack sizes are set up in start.S using these settings */ -#define CONFIG_STACKSIZE SZ_128K +#define CONFIG_STACKSIZE (128 << 10)/* regular stack 128 KiB */ #ifdef CONFIG_USE_IRQ -#define CONFIG_STACKSIZE_IRQ SZ_4K -#define CONFIG_STACKSIZE_FIQ SZ_4K +#define CONFIG_STACKSIZE_IRQ (4 << 10)/* IRQ stack 4 KiB */ +#define CONFIG_STACKSIZE_FIQ (4 << 10)/* FIQ stack 4 KiB */ #endif /*-----------------------------------------------------------------------
@@ -211,7 +210,7 @@*/ #define CONFIG_NR_DRAM_BANKS 2/* CS1 may or may not be populated */ #define PHYS_SDRAM_1 OMAP34XX_SDRC_CS0 -#define PHYS_SDRAM_1_SIZE SZ_32M/* at least 32 meg */ +#define PHYS_SDRAM_1_SIZE (32 << 20)/*@least 32 MiB */ #define PHYS_SDRAM_2 OMAP34XX_SDRC_CS1/* SDRAM Bank Allocation method */
@@ -230,7 +229,7 @@#define CONFIG_SYS_MAX_FLASH_SECT 520/* max number of sectors on */ /* one chip */ #define CONFIG_SYS_MAX_FLASH_BANKS 2/* max number of flash banks */ -#define CONFIG_SYS_MONITOR_LEN SZ_256K/* Reserve 2 sectors */ +#define CONFIG_SYS_MONITOR_LEN (256 << 10)/* Reserve 2 sectors */ #define CONFIG_SYS_FLASH_BASE boot_flash_base
Signature · 1 line
1.6.0.4
PATCH 1/1 TI: OMAP3: Remove SZ_xx references
Dear s-paulraj at ti.com,
Quoted 4 lines · In message <[email protected]> you wrote:
From: Sandeep Paulraj <[email protected]>
This patch removes dependency on the
sizes.hheader file and removes all references toSZ_xx.
...
cpu/arm_cortexa8/omap3/mem.c void make_cs1_contiguous(void) · line 95
Quoted 8 lines
cpu/arm_cortexa8/omap3/mem.c +1
-1@@ -92,7 +92,7 @@ void make_cs1_contiguous(void)u32 size, a_add_low, a_add_high; size =get_sdr_cs_size (CS0 ); - size /=SZ_32M ;/* find size to offset CS1 */ + size /= (32 <<20 );/* find size to offset CS1 */
I have to admit that I don;t understand what you are doing here. But you can go one step further and write this as:
size >>= 25;
(whic does not make it any easier to unerstand, though).
...
cpu/arm_cortexa8/omap3/mem.c void make_cs1_contiguous(void) · line 98
Quoted 5 lines
cpu/arm_cortexa8/omap3/mem.c +2
-2#ifdef CONFIG_USE_IRQ -#define CONFIG_STACKSIZE_IRQ SZ_4K/* IRQ stack */ -#define CONFIG_STACKSIZE_FIQ SZ_4K/* FIQ stack */ +#define CONFIG_STACKSIZE_IRQ (128 << 10)/* IRQ stack 4 KiB */ +#define CONFIG_STACKSIZE_FIQ (128 << 10)/* FIQ stack 4 KiB */
This looks like a copy & paste error to me? At least, the comment and the code don't match. Please fix.
Best regards,
Wolfgang Denk
Signature · 4 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [email protected] Genitiv ins Wasser, weil's Dativ ist!