summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfgang Denk <wd@pollux.denx.de>2005-08-12 22:35:59 +0200
committerWolfgang Denk <wd@pollux.denx.de>2005-08-12 22:35:59 +0200
commit8d4ba3da5e5d254c69d44fd74fa322986318b16f (patch)
treeac3cb2a5182d1cca82dce9cea3dc5c5c857141a1
parent4d302d69c83f7a09239c6575bc6cd37f1a4c77ae (diff)
Eliminate calls of ARM libgcc.a helper functions _divsi3 and _modsi3
Patch by Anders Larsen, 26 Apr 2005
-rw-r--r--CHANGELOG3
-rw-r--r--cpu/arm920t/at91rm9200/serial.c2
-rw-r--r--drivers/cfi_flash.c4
3 files changed, 6 insertions, 3 deletions
diff --git a/CHANGELOG b/CHANGELOG
index a8db4a8c7d4..98f95a57001 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -2,6 +2,9 @@
Changes for U-Boot 1.1.3:
======================================================================
+* Eliminate calls of ARM libgcc.a helper functions _divsi3 and _modsi3
+ Patch by Anders Larsen, 26 Apr 2005
+
* measure_gclk() is needed when DEBUG is enabled
Patch by Bryan O'Donoghue, 25 Apr 2005
diff --git a/cpu/arm920t/at91rm9200/serial.c b/cpu/arm920t/at91rm9200/serial.c
index b529cfa41b7..a281932b77d 100644
--- a/cpu/arm920t/at91rm9200/serial.c
+++ b/cpu/arm920t/at91rm9200/serial.c
@@ -56,7 +56,7 @@ void serial_setbrg (void)
if ((baudrate = gd->baudrate) <= 0)
baudrate = CONFIG_BAUDRATE;
/* MASTER_CLOCK/(16 * baudrate) */
- us->US_BRGR = (AT91C_MASTER_CLOCK >> 4)/baudrate;
+ us->US_BRGR = (AT91C_MASTER_CLOCK >> 4) / (unsigned)baudrate;
}
int serial_init (void)
diff --git a/drivers/cfi_flash.c b/drivers/cfi_flash.c
index d8489d46c06..3d0f2045011 100644
--- a/drivers/cfi_flash.c
+++ b/drivers/cfi_flash.c
@@ -557,7 +557,7 @@ int write_buff (flash_info_t * info, uchar * src, ulong addr, ulong cnt)
i = buffered_size > cnt ? cnt : buffered_size;
if ((rc = flash_write_cfibuffer (info, wp, src, i)) != ERR_OK)
return rc;
- i -= (i % info->portwidth);
+ i -= i & (info->portwidth - 1);
wp += i;
src += i;
cnt -= i;
@@ -805,7 +805,7 @@ static void flash_make_cmd (flash_info_t * info, uchar cmd, void *cmdbuf)
uchar *cp = (uchar *) cmdbuf;
for (i = 0; i < info->portwidth; i++)
- *cp++ = ((i + 1) % info->chipwidth) ? '\0' : cmd;
+ *cp++ = ((i + 1) & (info->chipwidth - 1)) ? '\0' : cmd;
#if defined(__LITTLE_ENDIAN)
switch (info->portwidth) {
case FLASH_CFI_8BIT: