提交 95def3cf 编写于 作者: V Vignesh R 提交者: Tom Rini

i2c: i2c-uclass-compat: avoid any BSS usage

As I2C can be used before DRAM initialization for reading EEPROM,
avoid using static variables stored in BSS, since BSS is in DRAM, which
may not have been initialised yet. Explicitly mark "static global"
variables as belonging to the .data section.
Signed-off-by: NVignesh R <vigneshr@ti.com>
Acked-by: Heiko Schocher<hs@denx.de>
Reviewed-by: NSimon Glass <sjg@chromium.org>
上级 0812d1a0
......@@ -9,7 +9,7 @@
#include <errno.h>
#include <i2c.h>
static int cur_busnum;
static int cur_busnum __attribute__((section(".data")));
static int i2c_compat_get_device(uint chip_addr, int alen,
struct udevice **devp)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册