Cleanups and updates for cm-t35/3730
cover Cleanups and updates for cm-t35/3730
This patch series some what clean up cm-t35 board files, add separate EEPROM handling file,
fixes the incorrect board revision passed to Linux.
Nikita Kiryanov (6):
cm-t35: cleanup the config file
cm-t35: various cleanups
cm-t35: add EEPROM module and pass Linux a serial number
omap3: make get_board_rev() function weak
cm-t35: pass correct revision information to Linux
cm-t35: use the new EEPROM module to read the MAC address
arch/arm/cpu/armv7/omap3/sys_info.c | 3 +- board/cm_t35/Makefile | 4 +- board/cm_t35/cm_t35.c | 16 ++--- board/cm_t35/eeprom.c | 125 +++++++++++++++++++++++++++++++++++ board/cm_t35/eeprom.h | 45 +++++++++++++ include/configs/cm_t35.h | 80 +++++++++++----------- 6 files changed, 223 insertions(+), 50 deletions(-) create mode 100644 board/cm_t35/eeprom.c create mode 100644 board/cm_t35/eeprom.h
Signature · 1 line
1.7.3.4
PATCH 1/6 cm-t35: cleanup the config file
From: Nikita Kiryanov <[email protected]>
Remove values from boolean defines, fix indentation, etc.. No functional changes.
--- include/configs/cm_t35.h | 78 +++++++++++++++++++++++----------------------- 1 files changed, 39 insertions(+), 39 deletions(-)
include/configs/cm_t35.h +39 -39
@@ -1,6 +1,5 @@/* -* (C) Copyright 2011 -* CompuLab, Ltd. +* (C) Copyright 2011 CompuLab, Ltd. * Mike Rapoport <[email protected]> * Igor Grinberg <[email protected]> *
@@ -36,9 +35,9 @@/* * High Level Configuration Options */ -#define CONFIG_OMAP 1/* in a TI OMAP core */ -#define CONFIG_OMAP34XX 1/* which is a 34XX */ -#define CONFIG_CM_T3X 1/* working with CM-T35 and CM-T3730 */ +#define CONFIG_OMAP /* in a TI OMAP core */ +#define CONFIG_OMAP34XX /* which is a 34XX */ +#define CONFIG_CM_T3X /* working with CM-T35 and CM-T3730 */ #define CONFIG_SYS_TEXT_BASE 0x80008000
@@ -50,8 +49,8 @@/* * Display CPU and Board information */ -#define CONFIG_DISPLAY_CPUINFO 1 -#define CONFIG_DISPLAY_BOARDINFO 1 +#define CONFIG_DISPLAY_CPUINFO +#define CONFIG_DISPLAY_BOARDINFO /* Clock Defines */ #define V_OSCK 26000000/* Clock output from T2 */
@@ -69,17 +68,17 @@*/ #define CONFIG_SYS_BOOTMAPSZ 0x4000 -#define CONFIG_CMDLINE_TAG 1/* enable passing of ATAGs */ -#define CONFIG_SETUP_MEMORY_TAGS 1 -#define CONFIG_INITRD_TAG 1 -#define CONFIG_REVISION_TAG 1 +#define CONFIG_CMDLINE_TAG /* enable passing of ATAGs */ +#define CONFIG_SETUP_MEMORY_TAGS +#define CONFIG_INITRD_TAG +#define CONFIG_REVISION_TAG /* * Size of malloc() pool */ -#define CONFIG_ENV_SIZE (128 << 10)/* 128 KiB */ -/* Sector */ -#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + (128 << 10)) +#define CONFIG_ENV_SIZE (128 << 10)/* 128 KiB */ +/* Sector */ +#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + (128 << 10))/* * Hardware drivers
@@ -107,20 +106,21 @@#define CONFIG_BAUDRATE 115200#define CONFIG_SYS_BAUDRATE_TABLE {4800, 9600, 19200, 38400, 57600,\ 115200} -#define CONFIG_GENERIC_MMC 1 -#define CONFIG_MMC 1 -#define CONFIG_OMAP_HSMMC 1 -#define CONFIG_DOS_PARTITION 1 + +#define CONFIG_GENERIC_MMC +#define CONFIG_MMC +#define CONFIG_OMAP_HSMMC +#define CONFIG_DOS_PARTITION /* USB */ -#define CONFIG_MUSB_UDC 1 -#define CONFIG_USB_OMAP3 1 -#define CONFIG_TWL4030_USB 1 +#define CONFIG_MUSB_UDC +#define CONFIG_USB_OMAP3 +#define CONFIG_TWL4030_USB /* USB device configuration */ -#define CONFIG_USB_DEVICE 1 -#define CONFIG_USB_TTY 1 -#define CONFIG_SYS_CONSOLE_IS_IN_ENV 1 +#define CONFIG_USB_DEVICE +#define CONFIG_USB_TTY +#define CONFIG_SYS_CONSOLE_IS_IN_ENV /* commands to include */ #include <config_cmd_default.h>
@@ -131,10 +131,10 @@#define CONFIG_CMD_JFFS2 /* JFFS2 Support */ #define CONFIG_CMD_MTDPARTS /* Enable MTD parts commands */ #define CONFIG_MTD_DEVICE /* needed for mtdparts commands */ -#define MTDIDS_DEFAULT "nand0=nand" -#define MTDPARTS_DEFAULT "mtdparts=nand:512k(x-loader),"\ - "1920k(u-boot),128k(u-boot-env),"\ - "4m(kernel),-(fs)" +#define MTDIDS_DEFAULT "nand0=nand" +#define MTDPARTS_DEFAULT "mtdparts=nand:512k(x-loader),"\ + "1920k(u-boot),128k(u-boot-env),"\ + "4m(kernel),-(fs)"#define CONFIG_CMD_I2C /* I2C serial bus support */ #define CONFIG_CMD_MMC /* MMC support */
@@ -147,30 +147,30 @@#undef CONFIG_CMD_IMLS/* List all found images */ #define CONFIG_SYS_NO_FLASH -#define CONFIG_HARD_I2C 1 +#define CONFIG_HARD_I2C #define CONFIG_SYS_I2C_SPEED 100000#define CONFIG_SYS_I2C_SLAVE 1#define CONFIG_SYS_I2C_BUS 0#define CONFIG_SYS_I2C_BUS_SELECT 1 -#define CONFIG_DRIVER_OMAP34XX_I2C 1 +#define CONFIG_DRIVER_OMAP34XX_I2C /* * TWL4030 */ -#define CONFIG_TWL4030_POWER 1 -#define CONFIG_TWL4030_LED 1 +#define CONFIG_TWL4030_POWER +#define CONFIG_TWL4030_LED /* * Board NAND Info. */ -#define CONFIG_SYS_NAND_QUIET_TEST 1 +#define CONFIG_SYS_NAND_QUIET_TEST #define CONFIG_NAND_OMAP_GPMC #define CONFIG_SYS_NAND_ADDR NAND_BASE/* physical address */ /* to access nand */ #define CONFIG_SYS_NAND_BASE NAND_BASE/* physical address */ /* to access nand at */ /* CS0 */ -#define GPMC_NAND_ECC_LP_x16_LAYOUT 1 +#define GPMC_NAND_ECC_LP_x16_LAYOUT#define CONFIG_SYS_MAX_NAND_DEVICE 1/* Max number of NAND */ /* devices */
@@ -244,7 +244,7 @@#define CONFIG_AUTO_COMPLETE #define CONFIG_CMDLINE_EDITING #define CONFIG_TIMESTAMP -#define CONFIG_SYS_AUTOLOAD "no" +#define CONFIG_SYS_AUTOLOAD "no"#define CONFIG_SYS_LONGHELP /* undef to save memory */ #define CONFIG_SYS_HUSH_PARSER /* use "hush" command parser */ #define CONFIG_SYS_PROMPT_HUSH_PS2 "> "
@@ -308,7 +308,7 @@#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE#define CONFIG_SYS_ONENAND_BASE ONENAND_MAP -#define CONFIG_ENV_IS_IN_NAND 1 +#define CONFIG_ENV_IS_IN_NAND #define ONENAND_ENV_OFFSET 0x260000/* environment starts here */ #define SMNAND_ENV_OFFSET 0x260000/* environment starts here */
@@ -333,8 +333,8 @@ GENERATED_GBL_DATA_SIZE)/* Status LED */ -#define CONFIG_STATUS_LED 1/* Status LED enabled */ -#define CONFIG_BOARD_SPECIFIC_LED 1 +#define CONFIG_STATUS_LED /* Status LED enabled */ +#define CONFIG_BOARD_SPECIFIC_LED #define STATUS_LED_GREEN 0#define STATUS_LED_BIT STATUS_LED_GREEN#define STATUS_LED_STATE STATUS_LED_ON
@@ -344,7 +344,7 @@/* GPIO banks */ #ifdef CONFIG_STATUS_LED -#define CONFIG_OMAP3_GPIO_6 1/* GPIO186 is in GPIO bank 6 */ +#define CONFIG_OMAP3_GPIO_6 /* GPIO186 is in GPIO bank 6 */ #endif #endif /* __CONFIG_H */
Signature · 1 line
1.7.3.4
PATCH 1/6 cm-t35: cleanup the config file
Quoted 8 lines · Igor Grinberg
From: Nikita Kiryanov <[email protected]>
Remove values from boolean defines, fix indentation, etc.. No functional changes.
Signed-off-by Nikita Kiryanov <[email protected]>Signed-off-by Igor Grinberg <[email protected]>---
Forgot to mention that this patch depends on Thomas' clean up patch, either [1] or [2] (they are the same).
[1] http://patchwork.ozlabs.org/patch/133915/
[2] http://patchwork.ozlabs.org/patch/131793/
Signature · 2 lines
Regards, Igor.
PATCH 2/6 cm-t35: various cleanups
In reply to Igor GrinbergFrom: Nikita Kiryanov <[email protected]>
Move #ifdef CONFIG_SMC911X out of board_eth_init() function, simplify the board_mmc_init() function, and enclose handle_mac_address() in the CONFIG_SMC911X.
--- board/cm_t35/cm_t35.c | 10 ++++------ 1 files changed, 4 insertions(+), 6 deletions(-)
board/cm_t35/cm_t35.c +4 -6
@@ -1,6 +1,5 @@/* -* (C) Copyright 2011 -* CompuLab, Ltd. <www.compulab.co.il> +* (C) Copyright 2011 CompuLab, Ltd. <www.compulab.co.il> * * Authors: Mike Rapoport <[email protected]> * Igor Grinberg <[email protected]>
@@ -316,8 +315,7 @@ void set_muxconf_regs(void)#ifdef CONFIG_GENERIC_MMC int board_mmc_init (bd_t *bis) { -omap_mmc_init (0 ); -return 0 ; +return omap_mmc_init (0 ); }#endif
@@ -370,6 +368,7 @@ static void reset_net_chip(void)static inline void reset_net_chip (void ) {}#endif +#ifdef CONFIG_SMC911X /* * Routine: handle_mac_address * Description: prepare MAC address for on-board Ethernet.
@@ -404,7 +403,6 @@ int board_eth_init(bd_t *bis) {int rc =0 , rc1 =0 ; -#ifdef CONFIG_SMC911X setup_net_chip_gmpc ();reset_net_chip ();
@@ -419,7 +417,7 @@ int board_eth_init(bd_t *bis) rc1 =smc911x_initialize (1 ,SB_T35_SMC911X_BASE );if (rc1 >0 ) rc++; -#endif return rc; } +#endif
Signature · 1 line
1.7.3.4
PATCH 3/6 cm-t35: add EEPROM module and pass Linux a serial number
In reply to Igor GrinbergFrom: Nikita Kiryanov <[email protected]>
Add board specific EEPROM handling module,
read the serial number from the EEPROM and pass it to Linux.
--- board/cm_t35/Makefile | 4 ++- board/cm_t35/eeprom.c | 79 ++++++++++++++++++++++++++++++++++++++++++++++ board/cm_t35/eeprom.h | 38 ++++++++++++++++++++++ include/configs/cm_t35.h | 2 + 4 files changed, 122 insertions(+), 1 deletions(-) create mode 100644 board/cm_t35/eeprom.c create mode 100644 board/cm_t35/eeprom.h
board/cm_t35/Makefile +3 -1
@@ -25,7 +25,9 @@ include $(TOPDIR)/config.mk LIB = $(obj)lib$(BOARD).o -COBJS := cm_t35.o leds.o +COBJS-$(CONFIG_DRIVER_OMAP34XX_I2C) += eeprom.o + +COBJS := cm_t35.o leds.o $(COBJS-y) SRCS := $(COBJS:.o=.c) OBJS := $(addprefix $(obj),$(COBJS))
board/cm_t35/eeprom.c new file +79 -0
79 lines not on this page · raw message
board/cm_t35/eeprom.h new file +38 -0
@@ -0,0 +1,38 @@ +/* +* (C) Copyright 2011 CompuLab, Ltd. <www.compulab.co.il> +* +* Authors: Nikita Kiryanov <[email protected]> +* Igor Grinberg <[email protected]> +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License as +* published by the Free Software Foundation; either version 2 of +* the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc. +*/ +#ifndef _EEPROM_ +#define _EEPROM_ + +#include <common.h> + +#ifndef CONFIG_DRIVER_OMAP34XX_I2C +void get_board_serial (struct tag_serialnr *serialnr) +{ +/* +* This corresponds to what happens when we can communicate with the +* eeprom but don't get a valid board serial value. +*/ + serialnr->low =0 ; + serialnr->high =0 ; +}; +#endif /* CONFIG_DRIVER_OMAP34XX_I2C */ + +#endif
include/configs/cm_t35.h +2 -0
@@ -72,6 +72,7 @@#define CONFIG_SETUP_MEMORY_TAGS #define CONFIG_INITRD_TAG #define CONFIG_REVISION_TAG +#define CONFIG_SERIAL_TAG /* * Size of malloc() pool
@@ -153,6 +154,7 @@#define CONFIG_SYS_I2C_BUS 0#define CONFIG_SYS_I2C_BUS_SELECT 1#define CONFIG_DRIVER_OMAP34XX_I2C +#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1/* * TWL4030
Signature · 1 line
1.7.3.4
PATCH 3/6 cm-t35: add EEPROM module and pass Linux a serial number
Quoted 7 lines · Igor Grinberg
From: Nikita Kiryanov <[email protected]>
Add board specific EEPROM handling module,
read the serial number from the EEPROM and pass it to Linux.Signed-off-by Nikita Kiryanov <[email protected]>Signed-off-by Igor Grinberg <[email protected]>
[snip]
Quoted 1 line
+#define
EEPROM_ADDR0x50
Some grepping around says this is usually CONFIG_SYS_I2C_EEPROM_ADDR (in the config.h). Thanks.
Signature · 1 line
Tom
PATCH v2 3/6 cm-t35: add EEPROM module and pass Linux a serial number
From: Nikita Kiryanov <[email protected]>
Add board specific EEPROM handling module,
read the serial number from the EEPROM and pass it to Linux.
---
Changes in v2:
* Use CONFIG_SYS_I2C_EEPROM_ADDR instead of a custom define
* Fix strange linker warning: ".bss section overlaps previous sections" by changing the type of the eeprom_layout static global variable to int (probably this is a compiler bug).
board/cm_t35/Makefile | 4 ++- board/cm_t35/eeprom.c | 78 ++++++++++++++++++++++++++++++++++++++++++++++ board/cm_t35/eeprom.h | 38 ++++++++++++++++++++++ include/configs/cm_t35.h | 3 ++ 4 files changed, 122 insertions(+), 1 deletions(-) create mode 100644 board/cm_t35/eeprom.c create mode 100644 board/cm_t35/eeprom.h
board/cm_t35/Makefile +3 -1
@@ -25,7 +25,9 @@ include $(TOPDIR)/config.mk LIB = $(obj)lib$(BOARD).o -COBJS := cm_t35.o leds.o +COBJS-$(CONFIG_DRIVER_OMAP34XX_I2C) += eeprom.o + +COBJS := cm_t35.o leds.o $(COBJS-y) SRCS := $(COBJS:.o=.c) OBJS := $(addprefix $(obj),$(COBJS))
board/cm_t35/eeprom.c new file +78 -0
78 lines not on this page · raw message
board/cm_t35/eeprom.h new file +38 -0
@@ -0,0 +1,38 @@ +/* +* (C) Copyright 2011 CompuLab, Ltd. <www.compulab.co.il> +* +* Authors: Nikita Kiryanov <[email protected]> +* Igor Grinberg <[email protected]> +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License as +* published by the Free Software Foundation; either version 2 of +* the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc. +*/ +#ifndef _EEPROM_ +#define _EEPROM_ + +#include <common.h> + +#ifndef CONFIG_DRIVER_OMAP34XX_I2C +void get_board_serial (struct tag_serialnr *serialnr) +{ +/* +* This corresponds to what happens when we can communicate with the +* eeprom but don't get a valid board serial value. +*/ + serialnr->low =0 ; + serialnr->high =0 ; +}; +#endif /* CONFIG_DRIVER_OMAP34XX_I2C */ + +#endif
include/configs/cm_t35.h +3 -0
@@ -72,6 +72,7 @@#define CONFIG_SETUP_MEMORY_TAGS #define CONFIG_INITRD_TAG #define CONFIG_REVISION_TAG +#define CONFIG_SERIAL_TAG /* * Size of malloc() pool
@@ -153,6 +154,8 @@#define CONFIG_SYS_I2C_BUS 0#define CONFIG_SYS_I2C_BUS_SELECT 1#define CONFIG_DRIVER_OMAP34XX_I2C +#define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 +#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1/* * TWL4030
Signature · 1 line
1.7.3.4
PATCH v2 3/6 cm-t35: add EEPROM module and pass Linux a serial number
Dear Igor Grinberg,
Quoted 4 lines · In message <[email protected]> you wrote:
From: Nikita Kiryanov <[email protected]>
Add board specific EEPROM handling module,
read the serial number from the EEPROM and pass it to Linux.
...
Quoted 3 lines
* Fix strange linker warning: ".bss section overlaps previous sections" by changing the type of the
eeprom_layoutstatic global variable to int (probably this is a compiler bug).
Probably it is now. Did you inspect the linke rmap?
board/cm_t35/eeprom.c line 38
Quoted 5 lines
board/cm_t35/eeprom.c new file +5
-0+static int cm_t3x_eeprom_read (uint offset,uchar *buf,int len) +{ +return i2c_read (CONFIG_SYS_I2C_EEPROM_ADDR , offset, +CONFIG_SYS_I2C_EEPROM_ADDR_LEN , buf, len); +}
Is there any specific reason why you cannot use the standard eeprom_read() function here?
Quoted 2 lines
board/cm_t35/eeprom.h new file +0
-0
...
board/cm_t35/eeprom.h line 36
Quoted 11 lines
board/cm_t35/eeprom.h new file +11
-0+#ifndef CONFIG_DRIVER_OMAP34XX_I2C +void get_board_serial (struct tag_serialnr *serialnr) +{ +/* +* This corresponds to what happens when we can communicate with the +* eeprom but don't get a valid board serial value. +*/ + serialnr->low =0 ; + serialnr->high =0 ; +}; +#endif /* CONFIG_DRIVER_OMAP34XX_I2C */
Please do NOT place code into header files.
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: wd at denx.de A mouse is an elephant built by the Japanese.
PATCH v2 3/6 cm-t35: add EEPROM module and pass Linux a serial number
Quoted 5 lines · Wolfgang Denk
Dear Igor Grinberg,
Quoted 2 lines · In message<[email protected]> you wrote:
From: Nikita Kiryanov<[email protected]>
Quoted 8 lines
Quoted 2 lines
Add board specific EEPROM handling module,
read the serial number from the EEPROM and pass it to Linux....
Quoted 3 lines
* Fix strange linker warning: ".bss section overlaps previous sections" by changing the type of the
eeprom_layoutstatic global variable to int (probably this is a compiler bug).Probably it is now. Did you inspect the linke rmap?
u-boot.map shows the bss section aligning perfectly with the start of rel.dyn.
The difference between the original "working" version and the version with the warning
was an additional byte added by uchar eeprom_layout to the size of libcm_t35.o.
This shouldn't be a problem because the bss section is followed by an ALIGN(4), but
we decided to try changing eeprom_layout to an int and the problem went away.
When we tried to define 4 uchars the problem reappeared.
This suggests that this might be a compiler bug.
There's been some discussion about this in the following threads:
http://comments.gmane.org/gmane.comp.boot-loaders.u-boot/114646
http://comments.gmane.org/gmane.comp.boot-loaders.u-boot/90723
and we're not aware of any fix to the issue.
Quoted 7 lines
board/cm_t35/eeprom.c line 38
Quoted 5 lines
board/cm_t35/eeprom.c new file +5
-0+static int cm_t3x_eeprom_read (uint offset,uchar *buf,int len) +{ +return i2c_read (CONFIG_SYS_I2C_EEPROM_ADDR , offset, +CONFIG_SYS_I2C_EEPROM_ADDR_LEN , buf, len); +}Is there any specific reason why you cannot use the standard
eeprom_read()function here?
The inclusion of the entire eeprom library for this one function will just increase the image size needlessly. Moreover we don't want to add eeprom commands, because the eeprom on this module is for internal use only.
Quoted 15 lines
Quoted 2 lines
board/cm_t35/eeprom.h new file +0
-0...
board/cm_t35/eeprom.h line 36
Quoted 11 lines
board/cm_t35/eeprom.h new file +11
-0+#ifndef CONFIG_DRIVER_OMAP34XX_I2C +void get_board_serial (struct tag_serialnr *serialnr) +{ +/* +* This corresponds to what happens when we can communicate with the +* eeprom but don't get a valid board serial value. +*/ + serialnr->low =0 ; + serialnr->high =0 ; +}; +#endif /* CONFIG_DRIVER_OMAP34XX_I2C */ Please do NOT place code into header files.
Will be fixed in the next version.
Quoted 4 lines
Best regards,
Wolfgang Denk
PATCH v2 3/6 cm-t35: add EEPROM module and pass Linux a serial number
Le 09/01/2012 09:30, Nikita Kiryanov a ?crit :
Quoted 29 lines · Wolfgang Denk
Quoted 6 lines
Dear Igor Grinberg,
In message<[email protected]>
Quoted 2 lines · you
From: Nikita Kiryanov<[email protected]>
Quoted 8 lines
Quoted 2 lines
Add board specific EEPROM handling module,
read the serial number from the EEPROM and pass it to Linux....
Quoted 3 lines
* Fix strange linker warning: ".bss section overlaps previous sections" by changing the type of the
eeprom_layoutstatic global variable to int (probably this is a compiler bug).Probably it is now. Did you inspect the linke rmap?
u-boot.map shows the bss section aligning perfectly with the start of rel.dyn.
The difference between the original "working" version and the version with the warning
was an additional byte added by uchareeprom_layoutto the size of libcm_t35.o.
This shouldn't be a problem because the bss section is followed by an ALIGN(4), but
we decided to try changingeeprom_layoutto an int and the problem went away.
When we tried to define 4 uchars the problem reappeared.
Quoted 6 lines
This suggests that this might be a compiler bug.
There's been some discussion about this in the following threads:
http://comments.gmane.org/gmane.comp.boot-loaders.u-boot/114646
http://comments.gmane.org/gmane.comp.boot-loaders.u-boot/90723
and we're not aware of any fix to the issue.
Which prompted me to test --no-check-sections with CS 2009q1. Adding it to LDFLAGS_u-boot does reduce the annoyance from errors to a warning, but there is no way to completely make it disappear.
Amicalement,
Signature · 1 line
Albert.
PATCH v2 3/6 cm-t35: add EEPROM module and pass Linux a serial number
Hi Albert,
Quoted 32 lines · Albert ARIBAUD
Le 09/01/2012 09:30, Nikita Kiryanov a ?crit :
Quoted 31 lines · Wolfgang Denk
Quoted 6 lines
Dear Igor Grinberg,
In message<[email protected]>
Quoted 2 lines · you
From: Nikita Kiryanov<[email protected]>
Quoted 8 lines
Quoted 2 lines
Add board specific EEPROM handling module,
read the serial number from the EEPROM and pass it to Linux....
Quoted 3 lines
* Fix strange linker warning: ".bss section overlaps previous sections" by changing the type of the
eeprom_layoutstatic global variable to int (probably this is a compiler bug).Probably it is now. Did you inspect the linke rmap?
u-boot.map shows the bss section aligning perfectly with the start of rel.dyn.
The difference between the original "working" version and the version with the warning
was an additional byte added by uchareeprom_layoutto the size of libcm_t35.o.
This shouldn't be a problem because the bss section is followed by an ALIGN(4), but
we decided to try changingeeprom_layoutto an int and the problem went away.
When we tried to define 4 uchars the problem reappeared.This suggests that this might be a compiler bug.
Quoted 8 lines
Quoted 4 lines
There's been some discussion about this in the following threads:
http://comments.gmane.org/gmane.comp.boot-loaders.u-boot/114646
http://comments.gmane.org/gmane.comp.boot-loaders.u-boot/90723
and we're not aware of any fix to the issue.Which prompted me to test --no-check-sections with CS 2009q1. Adding it to LDFLAGS_u-boot does reduce the annoyance from errors to a warning, but there is no way to completely make it disappear.
So the conclusion is still a tool chain bug, right? Probably it doesn't hurt besides the annoying warning.
Signature · 2 lines
Regards, Igor.
PATCH v2 3/6 cm-t35: add EEPROM module and pass Linux a serial number
Hi Igor,
Le 07/02/2012 09:01, Igor Grinberg a ?crit :
Quoted 40 lines
Hi Albert,
Quoted 37 lines · Albert ARIBAUD
Le 09/01/2012 09:30, Nikita Kiryanov a ?crit :
Quoted 35 lines · Wolfgang Denk
Quoted 6 lines
Dear Igor Grinberg,
In message<[email protected]>
Quoted 2 lines · you
From: Nikita Kiryanov<[email protected]>
Quoted 8 lines
Quoted 2 lines
Add board specific EEPROM handling module,
read the serial number from the EEPROM and pass it to Linux....
Quoted 3 lines
* Fix strange linker warning: ".bss section overlaps previous sections" by changing the type of the
eeprom_layoutstatic global variable to int (probably this is a compiler bug).Probably it is now. Did you inspect the linke rmap?
u-boot.map shows the bss section aligning perfectly with the start of rel.dyn.
The difference between the original "working" version and the version with the warning
was an additional byte added by uchareeprom_layoutto the size of libcm_t35.o.
This shouldn't be a problem because the bss section is followed by an ALIGN(4), but
we decided to try changingeeprom_layoutto an int and the problem went away.
When we tried to define 4 uchars the problem reappeared.This suggests that this might be a compiler bug.
There's been some discussion about this in the following threads:
http://comments.gmane.org/gmane.comp.boot-loaders.u-boot/114646
http://comments.gmane.org/gmane.comp.boot-loaders.u-boot/90723
and we're not aware of any fix to the issue.
Quoted 6 lines
Quoted 3 lines
Which prompted me to test --no-check-sections with CS 2009q1. Adding it to LDFLAGS_u-boot does reduce the annoyance from errors to a warning, but there is no way to completely make it disappear.
So the conclusion is still a tool chain bug, right? Probably it doesn't hurt besides the annoying warning.
Sorry for being slow.
Yes, it seems to be a toolchain bug and limited to a spurious warning. However, spurious warnings are always a pain when doing a MAKEALL arm, because the board is listed among the unclean and failed builds and then one must go through these individually and remember that this specific warning is both unimportant and unavoidable.
Amicalement,
Signature · 1 line
Albert.
PATCH v2 3/6 cm-t35: add EEPROM module and pass Linux a serial number
Quoted 53 lines · Albert ARIBAUD
Hi Igor,
Le 07/02/2012 09:01, Igor Grinberg a ?crit :
Quoted 42 lines
Hi Albert,
Quoted 39 lines · Albert ARIBAUD
Le 09/01/2012 09:30, Nikita Kiryanov a ?crit :
Quoted 37 lines · Wolfgang Denk
Quoted 8 lines
Dear Igor Grinberg,
In message<[email protected]>
Quoted 4 lines · you
From: Nikita Kiryanov<[email protected]>
Add board specific EEPROM handling module,
read the serial number from the EEPROM and pass it to Linux.Quoted 8 lines
...
Quoted 5 lines
* Fix strange linker warning: ".bss section overlaps previous sections"
by changing the type of theeeprom_layoutstatic global variable to int
(probably this is a compiler bug).Probably it is now. Did you inspect the linke rmap?
u-boot.map shows the bss section aligning perfectly with the start of rel.dyn.
The difference between the original "working" version and the version with the warning
was an additional byte added by uchareeprom_layoutto the size of libcm_t35.o.
This shouldn't be a problem because the bss section is followed by an ALIGN(4), but
we decided to try changingeeprom_layoutto an int and the problem went away.
When we tried to define 4 uchars the problem reappeared.This suggests that this might be a compiler bug.
There's been some discussion about this in the following threads:
http://comments.gmane.org/gmane.comp.boot-loaders.u-boot/114646
http://comments.gmane.org/gmane.comp.boot-loaders.u-boot/90723
and we're not aware of any fix to the issue.Quoted 7 lines
Quoted 4 lines
Which prompted me to test --no-check-sections with CS 2009q1. Adding it to LDFLAGS_u-boot does reduce the annoyance from errors to a warning,
but there is no way to completely make it disappear.So the conclusion is still a tool chain bug, right? Probably it doesn't hurt besides the annoying warning.
Quoted 7 lines
Sorry for being slow.
Yes, it seems to be a toolchain bug and limited to a spurious warning. However, spurious warnings are always a pain when doing a MAKEALL arm, because the board is listed among the unclean and failed builds and then one must go through these individually and remember that this specific warning is both unimportant and unavoidable.
Have we gone and bugged any toolchain folks about what caused / fixed this problem so that perhaps we can option around it or otherwise squash this?
Signature · 1 line
Tom
PATCH v2 3/6 cm-t35: add EEPROM module and pass Linux a serial number
Le 17/02/2012 18:10, Tom Rini a ?crit :
Quoted 63 lines · Albert ARIBAUD
Quoted 54 lines
Hi Igor,
Le 07/02/2012 09:01, Igor Grinberg a ?crit :
Quoted 43 lines
Hi Albert,
Quoted 40 lines · Albert ARIBAUD
Le 09/01/2012 09:30, Nikita Kiryanov a ?crit :
Quoted 38 lines · Wolfgang Denk
Quoted 8 lines
Dear Igor Grinberg,
In message<[email protected]>
Quoted 4 lines · you
From: Nikita Kiryanov<[email protected]>
Add board specific EEPROM handling module,
read the serial number from the EEPROM and pass it to Linux.Quoted 8 lines
...
Quoted 5 lines
* Fix strange linker warning: ".bss section overlaps previous sections"
by changing the type of theeeprom_layoutstatic global variable to int
(probably this is a compiler bug).Probably it is now. Did you inspect the linke rmap?
u-boot.map shows the bss section aligning perfectly with the start of rel.dyn.
The difference between the original "working" version and the version with the warning
was an additional byte added by uchareeprom_layoutto the size of libcm_t35.o.
This shouldn't be a problem because the bss section is followed by an ALIGN(4), but
we decided to try changingeeprom_layoutto an int and the problem went
away.
When we tried to define 4 uchars the problem reappeared.This suggests that this might be a compiler bug.
There's been some discussion about this in the following threads:
http://comments.gmane.org/gmane.comp.boot-loaders.u-boot/114646
http://comments.gmane.org/gmane.comp.boot-loaders.u-boot/90723
and we're not aware of any fix to the issue.Quoted 7 lines
Quoted 4 lines
Which prompted me to test --no-check-sections with CS 2009q1. Adding it to LDFLAGS_u-boot does reduce the annoyance from errors to a warning,
but there is no way to completely make it disappear.So the conclusion is still a tool chain bug, right? Probably it doesn't hurt besides the annoying warning.
Quoted 7 lines
Sorry for being slow.
Yes, it seems to be a toolchain bug and limited to a spurious warning. However, spurious warnings are always a pain when doing a MAKEALL arm, because the board is listed among the unclean and failed builds and then one must go through these individually and remember that this specific warning is both unimportant and unavoidable.
Quoted 3 lines
Have we gone and bugged any toolchain folks about what caused / fixed this problem so that perhaps we can option around it or otherwise squash this?
I haven't, as I work mostly with ELDK42 and occasionally recent (2010 and later) CS and current Ubuntu-provided Linaro toolchains, and don't see the warning -- and I don't think toolchain providers will bother about warnings from old releases that do not still exist in current ones, just like we don't bother with issues present only in older version of U-Boot.
But if somebody on the list is using the current version of some toolchain that does emit this warning, then yes, they should indeed bring the issue to the toolchain provider, or at least raise their hand here.
Amicalement,
Signature · 1 line
Albert.
PATCH v2 3/6 cm-t35: add EEPROM module and pass Linux a serial number
In reply to Albert ARIBAUDQuoted 43 lines · Albert ARIBAUD
Hi Igor,
Le 07/02/2012 09:01, Igor Grinberg a ?crit :
Quoted 40 lines
Hi Albert,
Quoted 37 lines · Albert ARIBAUD
Le 09/01/2012 09:30, Nikita Kiryanov a ?crit :
Quoted 35 lines · Wolfgang Denk
Quoted 6 lines
Dear Igor Grinberg,
In message<[email protected]>
Quoted 2 lines · you
From: Nikita Kiryanov<[email protected]>
Quoted 8 lines
Quoted 2 lines
Add board specific EEPROM handling module,
read the serial number from the EEPROM and pass it to Linux....
Quoted 3 lines
* Fix strange linker warning: ".bss section overlaps previous sections" by changing the type of the
eeprom_layoutstatic global variable to int (probably this is a compiler bug).Probably it is now. Did you inspect the linke rmap?
u-boot.map shows the bss section aligning perfectly with the start of rel.dyn.
The difference between the original "working" version and the version with the warning
was an additional byte added by uchareeprom_layoutto the size of libcm_t35.o.
This shouldn't be a problem because the bss section is followed by an ALIGN(4), but
we decided to try changingeeprom_layoutto an int and the problem went away.
When we tried to define 4 uchars the problem reappeared.This suggests that this might be a compiler bug.
There's been some discussion about this in the following threads:
http://comments.gmane.org/gmane.comp.boot-loaders.u-boot/114646
http://comments.gmane.org/gmane.comp.boot-loaders.u-boot/90723
and we're not aware of any fix to the issue.
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
Which prompted me to test --no-check-sections with CS 2009q1. Adding it to LDFLAGS_u-boot does reduce the annoyance from errors to a warning, but there is no way to completely make it disappear.
So the conclusion is still a tool chain bug, right? Probably it doesn't hurt besides the annoying warning.
Sorry for being slow.
This is fine, I was also out for a week or so...
Quoted 2 lines
Yes, it seems to be a toolchain bug and limited to a spurious warning. However, spurious warnings are always a pain when doing a MAKEALL arm, because the board is listed among the unclean and failed builds and then one must go through these individually and remember that this specific warning is both unimportant and unavoidable.
That is exactly the reason why we tried (and succeeded) to workaround the issue...
Signature · 2 lines
Regards, Igor.
PATCH v3 3/6 cm-t35: add EEPROM module and pass Linux a serial number
In reply to Wolfgang DenkFrom: Nikita Kiryanov <[email protected]>
Add board specific EEPROM handling module,
read the serial number from the EEPROM and pass it to Linux.
---
Changes in v2:
* Use CONFIG_SYS_I2C_EEPROM_ADDR instead of a custom define
* Fix strange linker warning: ".bss section overlaps previous sections" by changing the type of the eeprom_layout static global variable to int (probably this is a compiler bug).
Changes in v3:
* Move the default implementation of get_board_serial out of eeprom.h and into cm_t35.c
* Make get_board_serial default implementation weak.
board/cm_t35/Makefile | 4 ++- board/cm_t35/cm_t35.c | 11 ++++++ board/cm_t35/eeprom.c | 78 ++++++++++++++++++++++++++++++++++++++++++++++ include/configs/cm_t35.h | 3 ++ 4 files changed, 95 insertions(+), 1 deletions(-) create mode 100644 board/cm_t35/eeprom.c
board/cm_t35/Makefile +3 -1
@@ -25,7 +25,9 @@ include $(TOPDIR)/config.mk LIB = $(obj)lib$(BOARD).o -COBJS := cm_t35.o leds.o +COBJS-$(CONFIG_DRIVER_OMAP34XX_I2C) += eeprom.o + +COBJS := cm_t35.o leds.o $(COBJS-y) SRCS := $(COBJS:.o=.c) OBJS := $(addprefix $(obj),$(COBJS))
board/cm_t35/cm_t35.c +11 -0
@@ -33,6 +33,7 @@#include <net.h> #include <i2c.h> #include <twl4030.h> +#include <linux/compiler.h> #include <asm/io.h> #include <asm/arch/mem.h>
@@ -421,3 +422,13 @@ int board_eth_init(bd_t *bis) return rc; }#endif + +void __weak get_board_serial (struct tag_serialnr *serialnr) +{ +/* +* This corresponds to what happens when we can communicate with the +* eeprom but don't get a valid board serial value. +*/ + serialnr->low =0 ; + serialnr->high =0 ; +};
board/cm_t35/eeprom.c new file +78 -0
78 lines not on this page · raw message
include/configs/cm_t35.h +3 -0
@@ -72,6 +72,7 @@#define CONFIG_SETUP_MEMORY_TAGS #define CONFIG_INITRD_TAG #define CONFIG_REVISION_TAG +#define CONFIG_SERIAL_TAG /* * Size of malloc() pool
@@ -153,6 +154,8 @@#define CONFIG_SYS_I2C_BUS 0#define CONFIG_SYS_I2C_BUS_SELECT 1#define CONFIG_DRIVER_OMAP34XX_I2C +#define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 +#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1/* * TWL4030
Signature · 1 line
1.7.3.4
PATCH 4/6 omap3: make get_board_rev() function weak
In reply to Igor GrinbergFrom: Nikita Kiryanov <[email protected]>
--- arch/arm/cpu/armv7/omap3/sys_info.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
arch/arm/cpu/armv7/omap3/sys_info.c +2 -1
@@ -197,10 +197,11 @@ u32 get_gpmc0_width(void)* get_board_rev() - setup to pass kernel board revision information * returns:(bit[0-3] sub version, higher bit[7-4] is higher version) *************************************************************************/ -u32 get_board_rev (void ) +u32 __get_board_rev (void ) {return 0x20 ; } +u32 get_board_rev (void ) __attribute__((weak,alias ("__get_board_rev" )));/******************************************************** * get_base(); get upper addr of current execution
Signature · 1 line
1.7.3.4
PATCH 4/6 omap3: make get_board_rev() function weak
Quoted 4 lines · Igor Grinberg
From: Nikita Kiryanov <[email protected]>
Signed-off-by Nikita Kiryanov <[email protected]>Signed-off-by Igor Grinberg <[email protected]>
Please add <linux/compiler.h> and just put __weak in front of get_board_rev, thanks.
Signature · 1 line
Tom
PATCH v2 4/6 omap3: make get_board_rev() function weak
From: Nikita Kiryanov <[email protected]>
Current get_board_rev() function returns a hard coded value which is obviously incorrect for the majority of boards.
Allow boards to provide a correct implementation by making this function weak.
---
Changes in v2:
* Changed the way get_board_rev is defined as weak - remove alias and just add __weak in definition.
arch/arm/cpu/armv7/omap3/sys_info.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
arch/arm/cpu/armv7/omap3/sys_info.c +2 -1
@@ -30,6 +30,7 @@#include <asm/arch/mem.h> /* get mem tables */ #include <asm/arch/sys_proto.h> #include <i2c.h> +#include <linux/compiler.h> extern omap3_sysinfo sysinfo;static struct ctrl *ctrl_base = (struct ctrl *)OMAP34XX_CTRL_BASE ;
@@ -197,7 +198,7 @@ u32 get_gpmc0_width(void)* get_board_rev() - setup to pass kernel board revision information * returns:(bit[0-3] sub version, higher bit[7-4] is higher version) *************************************************************************/ -u32 get_board_rev (void ) +u32 __weak get_board_rev (void ) {return 0x20 ; }
Signature · 1 line
1.7.3.4
PATCH 5/6 cm-t35: pass correct revision information to Linux
In reply to Igor GrinbergFrom: Nikita Kiryanov <[email protected]>
Read revision from EEPROM and pass it to Linux.
--- board/cm_t35/eeprom.c | 28 ++++++++++++++++++++++++++++ 1 files changed, 28 insertions(+), 0 deletions(-)
board/cm_t35/eeprom.c +28 -0
@@ -27,6 +27,10 @@#define EEPROM_LAYOUT_VER_OFFSET 44#define BOARD_SERIAL_OFFSET 20#define BOARD_SERIAL_OFFSET_LEGACY 8 +#define BOARD_REV_OFFSET 0 +#define BOARD_REV_OFFSET_LEGACY 6 +#define BOARD_REV_SIZE 4 +#define BOARD_REV_SIZE_LEGACY 2#define LAYOUT_INVALID 0#define LAYOUT_LEGACY 0xff
@@ -77,3 +81,27 @@ void get_board_serial(struct tag_serialnr *serialnr) serialnr->high = serial[1 ]; } } + +/* +* Routine: get_board_rev +* Description: read system revision +*/ +u32 get_board_rev (void ) +{ +u32 rev =0 ; +uint offset =BOARD_REV_OFFSET_LEGACY ; +int len =BOARD_REV_SIZE_LEGACY ; + +if (eeprom_setup_layout ()) +return 0 ; + +if (eeprom_layout !=LAYOUT_LEGACY ) { + offset =BOARD_REV_OFFSET ; + len =BOARD_REV_SIZE ; + } + +if (cm_t3x_eeprom_read (offset, (uchar *)&rev, len)) +return 0 ; + +return rev; +};
Signature · 1 line
1.7.3.4
PATCH 6/6 cm-t35: use the new EEPROM module to read the MAC address
In reply to Igor GrinbergFrom: Nikita Kiryanov <[email protected]>
Switch to the new EEPROM module and fix the problem of MAC address being read from the wrong offset due to lack of distinction between EEPROM layouts.
--- board/cm_t35/cm_t35.c | 6 +++--- board/cm_t35/eeprom.c | 18 ++++++++++++++++++ board/cm_t35/eeprom.h | 9 ++++++++- 3 files changed, 29 insertions(+), 4 deletions(-)
board/cm_t35/cm_t35.c +3 -3
@@ -41,6 +41,8 @@#include <asm/arch/sys_proto.h> #include <asm/mach-types.h> +#include "eeprom.h" +DECLARE_GLOBAL_DATA_PTR ;const omap3_sysinfo sysinfo = {
@@ -382,11 +384,9 @@ static int handle_mac_address(void)if (rc)return 0 ; -#ifdef CONFIG_DRIVER_OMAP34XX_I2C - rc =i2c_read (0x50 ,0 ,1 , enetaddr,6 ); + rc =cm_t3x_eeprom_read_mac_addr (enetaddr);if (rc)return rc; -#endif if (!is_valid_ether_addr (enetaddr))return -1 ;
board/cm_t35/eeprom.c +18 -0
@@ -31,6 +31,8 @@#define BOARD_REV_OFFSET_LEGACY 6#define BOARD_REV_SIZE 4#define BOARD_REV_SIZE_LEGACY 2 +#define MAC_ADDR_OFFSET 4 +#define MAC_ADDR_OFFSET_LEGACY 0#define LAYOUT_INVALID 0#define LAYOUT_LEGACY 0xff
@@ -83,6 +85,22 @@ void get_board_serial(struct tag_serialnr *serialnr) }/* +* Routine: cm_t3x_eeprom_read_mac_addr +* Description: read mac address and store it in buf. +*/ +int cm_t3x_eeprom_read_mac_addr (uchar *buf) +{ +uint offset; + +if (eeprom_setup_layout ()) +return 0 ; + + offset = (eeprom_layout !=LAYOUT_LEGACY ) ? +MAC_ADDR_OFFSET :MAC_ADDR_OFFSET_LEGACY ; +return cm_t3x_eeprom_read (offset, buf,6 ); +} + +/* * Routine: get_board_rev * Description: read system revision */
board/cm_t35/eeprom.h +8 -1
@@ -23,7 +23,9 @@#include <common.h> -#ifndef CONFIG_DRIVER_OMAP34XX_I2C +#ifdef CONFIG_DRIVER_OMAP34XX_I2C +int cm_t3x_eeprom_read_mac_addr (uchar *buf); +#else void get_board_serial (struct tag_serialnr *serialnr) {/*
@@ -33,6 +35,11 @@ void get_board_serial(struct tag_serialnr *serialnr) serialnr->low =0 ; serialnr->high =0 ; }; + +int cm_t3x_eeprom_read_mac_addr (uchar *buf) +{ +return 1 ; +}#endif /* CONFIG_DRIVER_OMAP34XX_I2C */ #endif
Signature · 1 line
1.7.3.4
PATCH v2 6/6 cm-t35: use the new EEPROM module to read the MAC address
From: Nikita Kiryanov <[email protected]>
Switch to the new EEPROM module and fix the problem of MAC address being read from the wrong offset due to lack of distinction between EEPROM layouts.
---
Changes in v2:
* Make the cm_t3x_eeprom_read_mac_addr() stub static inline.
* Remove unused include from eeprom.h
board/cm_t35/cm_t35.c | 6 +++--- board/cm_t35/eeprom.c | 18 ++++++++++++++++++ board/cm_t35/eeprom.h | 33 +++++++++++++++++++++++++++++++++ 3 files changed, 54 insertions(+), 3 deletions(-) create mode 100644 board/cm_t35/eeprom.h
board/cm_t35/cm_t35.c +3 -3
@@ -42,6 +42,8 @@#include <asm/arch/sys_proto.h> #include <asm/mach-types.h> +#include "eeprom.h" +DECLARE_GLOBAL_DATA_PTR ;const omap3_sysinfo sysinfo = {
@@ -383,11 +385,9 @@ static int handle_mac_address(void)if (rc)return 0 ; -#ifdef CONFIG_DRIVER_OMAP34XX_I2C - rc =i2c_read (0x50 ,0 ,1 , enetaddr,6 ); + rc =cm_t3x_eeprom_read_mac_addr (enetaddr);if (rc)return rc; -#endif if (!is_valid_ether_addr (enetaddr))return -1 ;
board/cm_t35/eeprom.c +18 -0
@@ -29,6 +29,8 @@#define BOARD_REV_OFFSET_LEGACY 6#define BOARD_REV_SIZE 4#define BOARD_REV_SIZE_LEGACY 2 +#define MAC_ADDR_OFFSET 4 +#define MAC_ADDR_OFFSET_LEGACY 0#define LAYOUT_INVALID 0#define LAYOUT_LEGACY 0xff
@@ -82,6 +84,22 @@ void get_board_serial(struct tag_serialnr *serialnr) }/* +* Routine: cm_t3x_eeprom_read_mac_addr +* Description: read mac address and store it in buf. +*/ +int cm_t3x_eeprom_read_mac_addr (uchar *buf) +{ +uint offset; + +if (eeprom_setup_layout ()) +return 0 ; + + offset = (eeprom_layout !=LAYOUT_LEGACY ) ? +MAC_ADDR_OFFSET :MAC_ADDR_OFFSET_LEGACY ; +return cm_t3x_eeprom_read (offset, buf,6 ); +} + +/* * Routine: get_board_rev * Description: read system revision */
board/cm_t35/eeprom.h new file +33 -0
@@ -0,0 +1,33 @@ +/* +* (C) Copyright 2011 CompuLab, Ltd. <www.compulab.co.il> +* +* Authors: Nikita Kiryanov <[email protected]> +* Igor Grinberg <[email protected]> +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License as +* published by the Free Software Foundation; either version 2 of +* the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc. +*/ +#ifndef _EEPROM_ +#define _EEPROM_ + +#ifdef CONFIG_DRIVER_OMAP34XX_I2C +int cm_t3x_eeprom_read_mac_addr (uchar *buf); +#else +static inline int cm_t3x_eeprom_read_mac_addr (uchar *buf) +{ +return 1 ; +} +#endif + +#endif
Signature · 1 line
1.7.3.4
cover Cleanups and updates for cm-t35/3730
In reply to Igor GrinbergQuoted 12 lines · Igor Grinberg
This patch series some what clean up cm-t35 board files, add separate EEPROM handling file,
fixes the incorrect board revision passed to Linux.Nikita Kiryanov (6):
cm-t35: cleanup the config file
cm-t35: various cleanups
cm-t35: add EEPROM module and pass Linux a serial number
omap3: makeget_board_rev()function weak
cm-t35: pass correct revision information to Linux
cm-t35: use the new EEPROM module to read the MAC address
Quoted 9 lines
arch/arm/cpu/armv7/omap3/sys_info.c | 3 +- board/cm_t35/Makefile | 4 +- board/cm_t35/cm_t35.c | 16 ++--- board/cm_t35/eeprom.c | 125 +++++++++++++++++++++++++++++++++++ board/cm_t35/eeprom.h | 45 +++++++++++++ include/configs/cm_t35.h | 80 +++++++++++----------- 6 files changed, 223 insertions(+), 50 deletions(-) create mode 100644 board/cm_t35/eeprom.c create mode 100644 board/cm_t35/eeprom.h
I've read the whole series now and commented on a few of them. Thanks.
Signature · 1 line
Tom
cover Cleanups and updates for cm-t35/3730
Quoted 23 lines · Tom Rini
Quoted 18 lines · Igor Grinberg
This patch series some what clean up cm-t35 board files, add separate EEPROM handling file,
fixes the incorrect board revision passed to Linux.Nikita Kiryanov (6):
? cm-t35: cleanup the config file
? cm-t35: various cleanups
? cm-t35: add EEPROM module and pass Linux a serial number ? omap3: makeget_board_rev()function weak
? cm-t35: pass correct revision information to Linux ? cm-t35: use the new EEPROM module to read the MAC address?arch/arm/cpu/armv7/omap3/sys_info.c | ? ?3 +- ?board/cm_t35/Makefile ? ? ? ? ? ? ? | ? ?4 +- ?board/cm_t35/cm_t35.c ? ? ? ? ? ? ? | ? 16 ++--- ?board/cm_t35/eeprom.c ? ? ? ? ? ? ? | ?125 +++++++++++++++++++++++++++++++++++ ?board/cm_t35/eeprom.h ? ? ? ? ? ? ? | ? 45 +++++++++++++ ?include/configs/cm_t35.h ? ? ? ? ? ?| ? 80 +++++++++++-----------Quoted 3 lines
?6 files changed, 223 insertions(+), 50 deletions(-) ?create mode 100644
board/cm_t35/eeprom.c?create mode 100644board/cm_t35/eeprom.h
Quoted 1 line
I've read the whole series now and commented on a few of them. ?Thanks.
As the comments have been addressed, I've taken the latest-in-patchwork versions into u-boot-ti/master, thanks!
Signature · 1 line
Tom