mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-28 23:51:33 +00:00
MX5: Reuse the gd->tbl value for timestamp and add gd->lastinc for lastinc bss
The usage of bss values in drivers before initialisation of bss is forbidden. In that special case some data in .rel.dyn gets corrupted. This patch is the same as recently applied for arm926js architecture. Signed-off-by: Stefano Babic <sbabic@denx.de> CC: Heiko Schocher <hs@denx.de>
This commit is contained in:
parent
eae4988b45
commit
db106ef7eb
1 changed files with 4 additions and 2 deletions
|
@ -44,8 +44,10 @@ static struct mxc_gpt *cur_gpt = (struct mxc_gpt *)GPT1_BASE_ADDR;
|
|||
#define GPTCR_CLKSOURCE_32 (4<<6) /* Clock source */
|
||||
#define GPTCR_TEN (1) /* Timer enable */
|
||||
|
||||
static ulong timestamp;
|
||||
static ulong lastinc;
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
#define timestamp (gd->tbl)
|
||||
#define lastinc (gd->lastinc)
|
||||
|
||||
int timer_init(void)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue