ARM: Fix for broken compilation when defining CONFIG_CMD_ELF
PATCH 1/1 ARM: Fix for broken compilation when defining CONFIG_CMD_ELF
ARM: Fix for broken compilation when definingCONFIG_CMD_ELF caused by missing dcache
status/enable/disable functions.
Signed-off-by Hugo Villeneuve <[email protected]>
---
cpu/arm926ejs/cpu.c | 51 +++++++++++++++++++++++++++++--------- include/configs/davinci_sffsdr.h | 1 + 2 files changed, 40 insertions(+), 12 deletions(-)
cpu/arm926ejs/cpu.c +39 -12
@@ -134,25 +134,52 @@ int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])return (0 ); } -void icache_enable (void ) +/* cache_bit must be either C1_IC or C1_DC */ +static void cache_enable (uint32_t cache_bit) { -ulong reg; +uint32_t reg; - reg =read_p15_c1 ();/* get control reg. */ -cp_delay (); -write_p15_c1 (reg |C1_IC ); + reg =read_p15_c1 ();/* get control reg. */ +cp_delay (); +write_p15_c1 (reg | cache_bit); } -void icache_disable (void ) +/* cache_bit must be either C1_IC or C1_DC */ +static void cache_disable (uint32_t cache_bit) { -ulong reg; +uint32_t reg; - reg =read_p15_c1 (); -cp_delay (); -write_p15_c1 (reg & ~C1_IC ); + reg =read_p15_c1 (); +cp_delay (); +write_p15_c1 (reg & ~cache_bit); } -int icache_status (void ) +void icache_enable (void ) { -return (read_p15_c1 () &C1_IC ) !=0 ; +cache_enable (C1_IC ); +} + +void icache_disable (void ) +{ +cache_disable (C1_IC ); +} + +int icache_status (void ) +{ +return (read_p15_c1 () &C1_IC ) !=0 ; +} + +void dcache_enable (void ) +{ +cache_enable (C1_DC ); +} + +void dcache_disable (void ) +{ +cache_disable (C1_DC ); +} + +int dcache_status (void ) +{ +return (read_p15_c1 () &C1_DC ) !=0 ; }
include/configs/davinci_sffsdr.h +1 -0
@@ -137,6 +137,7 @@#define CONFIG_CMD_SAVES #define CONFIG_CMD_NAND #define CONFIG_CMD_EEPROM +#define CONFIG_CMD_ELF /* Needed to load Integrity kernel. */ #undef CONFIG_CMD_BDI#undef CONFIG_CMD_FPGA#undef CONFIG_CMD_SETGETDCR
Wolfgang Denk
AppliedPATCH 1/1 ARM: Fix for broken compilation when defining CONFIG_CMD_ELF
Quoted 11 lines · In message <[email protected]> you…
ARM: Fix for broken compilation when defining
CONFIG_CMD_ELFcaused by missing dcache
status/enable/disable functions.Signed-off-by Hugo Villeneuve <[email protected]>---
cpu/arm926ejs/cpu.c | 51 +++++++++++++++++++++++++++++--------- include/configs/davinci_sffsdr.h | 1 + 2 files changed, 40 insertions(+), 12 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 5 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
The C-shell doesn't parse. It adhoculates.
- Casper.Dik at Holland.Sun.COM in <[email protected]>