summaryrefslogtreecommitdiff
path: root/drivers/dataflash.c
diff options
context:
space:
mode:
authorWolfgang Denk <wd@pollux.denx.de>2006-03-11 22:53:33 +0100
committerWolfgang Denk <wd@pollux.denx.de>2006-03-11 22:53:33 +0100
commitd52fb7e3d135704334bd6f97f3444e824665b76f (patch)
treee1e91e323b603533acda1c1de53388c588e3753c /drivers/dataflash.c
parent4367a01036bdb67e7fc3000cedba7195fbdee304 (diff)
downloadu-boot-imx-d52fb7e3d135704334bd6f97f3444e824665b76f.zip
u-boot-imx-d52fb7e3d135704334bd6f97f3444e824665b76f.tar.gz
u-boot-imx-d52fb7e3d135704334bd6f97f3444e824665b76f.tar.bz2
Some code cleanup for GCC 4.x
Diffstat (limited to 'drivers/dataflash.c')
-rw-r--r--drivers/dataflash.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/dataflash.c b/drivers/dataflash.c
index ded0395..17eb859 100644
--- a/drivers/dataflash.c
+++ b/drivers/dataflash.c
@@ -174,8 +174,7 @@ void dataflash_print_info (void)
/* Function Name : AT91F_DataflashSelect */
/* Object : Select the correct device */
/*------------------------------------------------------------------------------*/
-AT91PS_DataFlash AT91F_DataflashSelect (AT91PS_DataFlash pFlash,
- unsigned int *addr)
+AT91PS_DataFlash AT91F_DataflashSelect (AT91PS_DataFlash pFlash, unsigned long *addr)
{
char addr_valid = 0;
int i;
@@ -291,7 +290,7 @@ int i,j, area1, area2, addr_valid = 0;
/*------------------------------------------------------------------------------*/
int read_dataflash (unsigned long addr, unsigned long size, char *result)
{
- int AddrToRead = addr;
+ unsigned long AddrToRead = addr;
AT91PS_DataFlash pFlash = &DataFlashInst;
pFlash = AT91F_DataflashSelect (pFlash, &AddrToRead);
@@ -313,7 +312,7 @@ int read_dataflash (unsigned long addr, unsigned long size, char *result)
int write_dataflash (unsigned long addr_dest, unsigned long addr_src,
unsigned long size)
{
- int AddrToWrite = addr_dest;
+ unsigned long AddrToWrite = addr_dest;
AT91PS_DataFlash pFlash = &DataFlashInst;
pFlash = AT91F_DataflashSelect (pFlash, &AddrToWrite);
@@ -330,7 +329,7 @@ int write_dataflash (unsigned long addr_dest, unsigned long addr_src,
if (AddrToWrite == -1)
return -1;
- return AT91F_DataFlashWrite (pFlash, (char *) addr_src, AddrToWrite, size);
+ return AT91F_DataFlashWrite (pFlash, (uchar *)addr_src, AddrToWrite, size);
}