projects
/
platform
/
kernel
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge tag 'tpm-030822' of https://source.denx.de/u-boot/custodians/u-boot-tpm
[platform/kernel/u-boot.git]
/
board
/
freescale
/
m5253demo
/
flash.c
diff --git
a/board/freescale/m5253demo/flash.c
b/board/freescale/m5253demo/flash.c
index
0706b62
..
bff1ac5
100644
(file)
--- a/
board/freescale/m5253demo/flash.c
+++ b/
board/freescale/m5253demo/flash.c
@@
-8,6
+8,9
@@
*/
#include <common.h>
*/
#include <common.h>
+#include <flash.h>
+#include <init.h>
+#include <irq_func.h>
#include <asm/immap.h>
#include <asm/immap.h>
@@
-239,7
+242,8
@@
int flash_erase(flash_info_t * info, int s_first, int s_last)
count = 0;
}
count = 0;
}
- if (get_timer(start) > CONFIG_SYS_FLASH_ERASE_TOUT) {
+ /* check timeout, 1000ms */
+ if (get_timer(start) > 1000) {
printf("Timeout\n");
*addr = 0x00F0; /* reset to read mode */
printf("Timeout\n");
*addr = 0x00F0; /* reset to read mode */
@@
-291,8
+295,8
@@
int flash_erase(flash_info_t * info, int s_first, int s_last)
enable_interrupts();
while ((*addr & 0x0080) != 0x0080) {
enable_interrupts();
while ((*addr & 0x0080) != 0x0080) {
- if (get_timer(start) >
-
CONFIG_SYS_FLASH_ERASE_TOUT
) {
+ /* check timeout, 1000ms */
+
if (get_timer(start) > 1000
) {
printf("Timeout\n");
*addr = 0x00F0; /* reset to read mode */
printf("Timeout\n");
*addr = 0x00F0; /* reset to read mode */
@@
-427,7
+431,8
@@
int write_word(flash_info_t * info, FPWV * dest, u16 data)
/* data polling for D7 */
while (res == 0
&& (*dest & (u8) 0x00800080) != (data & (u8) 0x00800080)) {
/* data polling for D7 */
while (res == 0
&& (*dest & (u8) 0x00800080) != (data & (u8) 0x00800080)) {
- if (get_timer(start) > CONFIG_SYS_FLASH_WRITE_TOUT) {
+ /* check timeout, 500ms */
+ if (get_timer(start) > 500) {
*dest = (u8) 0x00F000F0; /* reset bank */
res = 1;
}
*dest = (u8) 0x00F000F0; /* reset bank */
res = 1;
}