[v4,02/10] ti: common: board_detect: Rename EEPROM scratch start macro

Message ID 1489410273-10159-3-git-send-email-rogerq@ti.com
State New
Headers show
Series
  • am57xx-idk LCD and am571x-idk 6 port ethernet pinmux
Related show

Commit Message

Roger Quadros March 13, 2017, 1:04 p.m.
From: Lokesh Vutla <lokeshvutla@ti.com>

Non OMAP platforms i.e. Keystone will also need to use the board
EEPROM helpers so let's make the macro platform independent.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
---
 arch/arm/include/asm/omap_common.h | 8 +++++---
 board/ti/common/board_detect.h     | 2 +-
 2 files changed, 6 insertions(+), 4 deletions(-)

Comments

Tom Rini March 21, 2017, 6:08 p.m. | #1
On Mon, Mar 13, 2017 at 03:04:25PM +0200, Roger Quadros wrote:

> From: Lokesh Vutla <lokeshvutla@ti.com>

> 

> Non OMAP platforms i.e. Keystone will also need to use the board

> EEPROM helpers so let's make the macro platform independent.

> 

> Signed-off-by: Roger Quadros <rogerq@ti.com>

> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>

> Reviewed-by: Tom Rini <trini@konsulko.com>


Applied to u-boot/master, thanks!

-- 
Tom

Patch hide | download patch | download mbox

diff --git a/arch/arm/include/asm/omap_common.h b/arch/arm/include/asm/omap_common.h
index 2034a5e..c1a70b1 100644
--- a/arch/arm/include/asm/omap_common.h
+++ b/arch/arm/include/asm/omap_common.h
@@ -767,9 +767,11 @@  static inline u8 is_dra72x(void)
 #define OMAP_SRAM_SCRATCH_VCORES_PTR    (SRAM_SCRATCH_SPACE_ADDR + 0x1C)
 #define OMAP_SRAM_SCRATCH_SYS_CTRL	(SRAM_SCRATCH_SPACE_ADDR + 0x20)
 #define OMAP_SRAM_SCRATCH_BOOT_PARAMS	(SRAM_SCRATCH_SPACE_ADDR + 0x24)
-#define OMAP_SRAM_SCRATCH_BOARD_EEPROM_START (SRAM_SCRATCH_SPACE_ADDR + 0x28)
-#define OMAP_SRAM_SCRATCH_BOARD_EEPROM_END (SRAM_SCRATCH_SPACE_ADDR + 0x200)
-#define OMAP_SRAM_SCRATCH_SPACE_END	(OMAP_SRAM_SCRATCH_BOARD_EEPROM_END)
+#ifndef TI_SRAM_SCRATCH_BOARD_EEPROM_START
+#define TI_SRAM_SCRATCH_BOARD_EEPROM_START (SRAM_SCRATCH_SPACE_ADDR + 0x28)
+#define TI_SRAM_SCRATCH_BOARD_EEPROM_END (SRAM_SCRATCH_SPACE_ADDR + 0x200)
+#endif
+#define OMAP_SRAM_SCRATCH_SPACE_END	(TI_SRAM_SCRATCH_BOARD_EEPROM_END)
 
 /* Boot parameters */
 #define DEVICE_DATA_OFFSET	0x18
diff --git a/board/ti/common/board_detect.h b/board/ti/common/board_detect.h
index 343fcb4..52b0075 100644
--- a/board/ti/common/board_detect.h
+++ b/board/ti/common/board_detect.h
@@ -98,7 +98,7 @@  struct ti_common_eeprom {
 };
 
 #define TI_EEPROM_DATA ((struct ti_common_eeprom *)\
-				OMAP_SRAM_SCRATCH_BOARD_EEPROM_START)
+				TI_SRAM_SCRATCH_BOARD_EEPROM_START)
 
 /**
  * ti_i2c_eeprom_am_get() - Consolidated eeprom data collection for AM* TI EVMs