summaryrefslogtreecommitdiff
path: root/board/cobra5272
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2019-12-03 06:05:35 +0300
committerTom Rini <trini@konsulko.com>2019-12-03 06:05:35 +0300
commita4ef0657e3075d0f951d78cc1398cb7e05af648a (patch)
tree9a4387de5845e6fd1331f0af32bfd82fac9eb039 /board/cobra5272
parent357040645f9f56b33909520483df9f840be7e181 (diff)
parentcb3ef6810a27c8ddf5db8694bcef9337f27d12ce (diff)
downloadu-boot-a4ef0657e3075d0f951d78cc1398cb7e05af648a.tar.xz
Merge branch '2019-12-02-master-imports'
- A large series of clean-ups to reduce common.h contents
Diffstat (limited to 'board/cobra5272')
-rw-r--r--board/cobra5272/flash.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/board/cobra5272/flash.c b/board/cobra5272/flash.c
index e5edc2a040..1d3c5acddf 100644
--- a/board/cobra5272/flash.c
+++ b/board/cobra5272/flash.c
@@ -6,6 +6,8 @@
#include <common.h>
#include <console.h>
+#include <cpu_func.h>
+#include <irq_func.h>
#define PHYS_FLASH_1 CONFIG_SYS_FLASH_BASE
#define FLASH_BANK_SIZE 0x200000
@@ -164,9 +166,9 @@ int flash_erase (flash_info_t * info, int s_first, int s_last)
* chip is in programming mode.
*/
- cflag = icache_status ();
- icache_disable ();
- iflag = disable_interrupts ();
+ cflag = icache_status();
+ icache_disable();
+ iflag = disable_interrupts();
printf ("\n");
@@ -234,10 +236,10 @@ int flash_erase (flash_info_t * info, int s_first, int s_last)
udelay (10000);
if (iflag)
- enable_interrupts ();
+ enable_interrupts();
if (cflag)
- icache_enable ();
+ icache_enable();
return rc;
}
@@ -267,9 +269,9 @@ static int write_word (flash_info_t * info, ulong dest, ulong data)
* chip is in programming mode.
*/
- cflag = icache_status ();
- icache_disable ();
- iflag = disable_interrupts ();
+ cflag = icache_status();
+ icache_disable();
+ iflag = disable_interrupts();
MEM_FLASH_ADDR1 = CMD_UNLOCK1;
MEM_FLASH_ADDR2 = CMD_UNLOCK2;
@@ -300,10 +302,10 @@ static int write_word (flash_info_t * info, ulong dest, ulong data)
rc = ERR_PROG_ERROR;
if (iflag)
- enable_interrupts ();
+ enable_interrupts();
if (cflag)
- icache_enable ();
+ icache_enable();
return rc;
}