Skip to contentSkip to conversation

AT91CAP9 support

U-Boot-Users Peter Pearse 2 participants 3 messages Feb 8, 2008 – Feb 11, 2008

lore
Share & tools
lore
#0 lore raw

Stelian

Until the next merge window your patches "AT91CAP9 support" are
available from

git://linux-arm.org/u-boot-armdev.git#080116_at91cap9

Your board seem to be the first to make use of CONFIG_HAS_DATAFLASH.

This has resulted in the following warnings (ELDK toolchain):

env_dataflash.c: In function 'env_get_char_spec':
env_dataflash.c:47: warning: pointer targets in passing argument 3 of 'read_dataflash' differ in signedness
env_dataflash.c: In function 'env_relocate_spec':
env_dataflash.c:53: warning: pointer targets in passing argument 3 of 'read_dataflash' differ in signedness
env_dataflash.c: In function 'env_init':
env_dataflash.c:80: warning: passing argument 3 of 'read_dataflash' from incompatible pointer type
env_dataflash.c:86: warning: pointer targets in passing argument 3 of 'read_dataflash' differ in signedness

I am assuming these do not impair the functionality of the binary.

Regards

Peter

#1 lore raw

Le vendredi 08 f?vrier 2008 ? 14:31 +0000, Peter Pearse a ?crit :

Quoted 6 lines

Stelian

Until the next merge window your patches "AT91CAP9 support" are
available from

git://linux-arm.org/u-boot-armdev.git#080116_at91cap9

Ok, I double checked that tree and it compiles and works fine here.

Quoted 3 lines

Your board seem to be the first to make use of CONFIG_HAS_DATAFLASH.

This has resulted in the following warnings (ELDK toolchain):

[...]

Harmless warnings, you can silence them using the below patch.

Thanks,

Stelian.

---------------------------------

read_dataflash() takes a signed char pointer as a parameter. Silence a few warnings dues to incorrect parameter types in env_dataflash.c.

common/env_dataflash.c +5 -6
index 93fff29..d7e8ee8 100644
@@ -44,22 +44,22 @@ extern uchar default_environment[];
 uchar env_get_char_spec (int index)
 {
 	uchar c;
-	read_dataflash (CFG_ENV_ADDR+index+offsetof(env_t,data),1,&c);
+	read_dataflash(CFG_ENV_ADDR + index + offsetof(env_t,data),
+		       1, (char *)&c);
 	return (c);
 }
 
 void env_relocate_spec (void)
 {
-	read_dataflash (CFG_ENV_ADDR,CFG_ENV_SIZE,(uchar *)env_ptr);
+	read_dataflash(CFG_ENV_ADDR, CFG_ENV_SIZE, (char *)env_ptr);
 }
 
 int saveenv(void)
 {
-/* env must be copied to do not alter env structure in memory*/
-unsigned char temp[CFG_ENV_SIZE];
-int i;
+	/* env must be copied to do not alter env structure in memory*/
+	unsigned char temp[CFG_ENV_SIZE];
 	memcpy(temp, env_ptr, CFG_ENV_SIZE);
-	return write_dataflash (CFG_ENV_ADDR, (unsigned long)temp,

CFG_ENV_SIZE);
+ return write_dataflash(CFG_ENV_ADDR, (unsigned long)temp,
CFG_ENV_SIZE);
}

/************************************************************************
@@ -77,13 +77,14 @@ int env_init(void)
AT91F_DataflashInit(); /* prepare for DATAFLASH read/write */

/* read old CRC */
- read_dataflash (CFG_ENV_ADDR+offsetof(env_t,crc),sizeof(ulong),&crc);
+ read_dataflash(CFG_ENV_ADDR + offsetof(env_t, crc),
+ sizeof(ulong), (char *)&crc);
new = 0;
len = ENV_SIZE;
off = offsetof(env_t,data);
while (len > 0) {
int n = (len > sizeof(buf)) ? sizeof(buf) : len;
- read_dataflash (CFG_ENV_ADDR+off,n , buf);
+ read_dataflash(CFG_ENV_ADDR + off, n, (char *)buf);
new = crc32 (new, buf, n);
len -= n;
off += n;

Signature · 1 line
Stelian Pop <[email protected]>
#2 lore raw
Quoted 21 lines

-----Original Message-----
From: Stelian Pop [mailto:stelian at popies.net]
Sent: 11 February 2008 10:50
To: Peter Pearse
Cc: u-boot-users at lists.sourceforge.net
Subject: Re: [ARM] AT91CAP9 support

Le vendredi 08 f?vrier 2008 ? 14:31 +0000, Peter Pearse a ?crit :

Quoted 3 lines

Stelian

Until the next merge window your patches "AT91CAP9

support" are

Quoted 3 lines

available from

git://linux-arm.org/u-boot-armdev.git#080116_at91cap9

Ok, I double checked that tree and it compiles and works fine here.

Quoted 8 lines
Quoted 1 line

Your board seem to be the first to make use of

CONFIG_HAS_DATAFLASH.

Quoted 2 lines

This has resulted in the following warnings (ELDK toolchain):

[...]

Harmless warnings, you can silence them using the below patch.

OK will apply

Regards

Peter