summaryrefslogtreecommitdiff
path: root/board/freescale/m5253demo/flash.c
AgeCommit message (Collapse)Author
2017-05-12m5253demo: Fix static variable in non-static inline function warningTom Rini
The function 'spin_wheel' is declared as inline, but not static and thus we see warnings that 'w' and 'p' are declared static in a non-static inline function. Correct this by marking spin_wheel as static inline. Cc: TsiChung Liew <Tsi-Chung.Liew@freescale.com> Signed-off-by: Tom Rini <trini@konsulko.com>
2014-07-22m68k: fix an undefined behavior warning of M5253DEMO boardMasahiro Yamada
The latest GCC is so clever that it reports more warnings than old ones did: ------------------------------>8------------------------------ board/freescale/m5253demo/flash.c: In function 'flash_get_offsets': board/freescale/m5253demo/flash.c:65:23: warning: iteration 2047u invokes undefined behavior [-Waggressive-loop-optimizations] info->start[k + 1] = info->start[k] + CONFIG_SYS_SST_SECTSZ; ^ board/freescale/m5253demo/flash.c:64:3: note: containing loop for (k = 0, j = 0; j < CONFIG_SYS_SST_SECT; j++, k++) { ^ ------------------------------8<------------------------------ The cause of the warning is like this: The for statement iterates 2048 times in flash_get_offsets() func. (Notice CONFIG_SYS_SST_SECT is defined as 2048) The last iteration does info->start[2048] = info->start[2047] + CONFIG_SYS_SST_SECTSZ; causing an undefined behavior. (Please note the array size of info->start is 2048. CONFIG_SYS_MAX_FLASH_SECT is defined as 2048 for this board.) This commit fixes that so as not to overrun the info->start array. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Cc: Jason Jin <Jason.jin@freescale.com>
2014-06-19freescale: m5253demo: fix unused-but-set-variable warningsMasahiro Yamada
Fix the following warning messages: In function 'flash_erase': 180:21: warning: variable 'last' set but not used [-Wunused-but-set-variable] In function 'write_buff': 322:10: warning: variable 'port_width' set but not used [-Wunused-but-set-variable] Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Cc: TsiChung Liew <Tsi-Chung.Liew@freescale.com>
2013-07-24Add GPL-2.0+ SPDX-License-Identifier to source filesWolfgang Denk
Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by: Tom Rini <trini@ti.com>
2008-10-18rename CFG_ macros to CONFIG_SYSJean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-08-14ColdFire: Add M5253DEMO platform support for MCF5253TsiChung Liew
Signed-off-by: TsiChung Liew <Tsi-Chung.Liew@freescale.com>