Patchwork [U-Boot,I2C] fix: error ATMEL_FIO_BASE undeclared, if use I2C_Soft on AT91

login
register
mail settings
Submitter esw@bus-elektronik.de
Date Dec. 20, 2011, 4:05 p.m.
Message ID <4EF0B24A.7020805@bus-elektronik.de>
Download mbox | patch
Permalink /patch/132507/
State Accepted
Commit 781322755f11b8f75f6a0a93ae51d36cd7862be1
Delegated to: Heiko Schocher
Headers show

Comments

esw@bus-elektronik.de - Dec. 20, 2011, 4:05 p.m.
* Since AT91 name schema was changed to ATMEL_BASE_xxx, I2C_SOFT 
  on AT91 devices fails with 'error: ATMEL_FIO_BASE undeclared'
* change ATMEL_PIO_BASE to ATMEL_BASE_PIOA will fix this

Signed-off-by: Jens Scharsig <esw@bus-elektronik.de>
---
 include/i2c.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Heiko Schocher - Jan. 11, 2012, 7:16 a.m.
Hello esw@bus-elektronik.de (Jens?),

esw@bus-elektronik.de wrote:
> * Since AT91 name schema was changed to ATMEL_BASE_xxx, I2C_SOFT 
>   on AT91 devices fails with 'error: ATMEL_FIO_BASE undeclared'
> * change ATMEL_PIO_BASE to ATMEL_BASE_PIOA will fix this
> 
> Signed-off-by: Jens Scharsig <esw@bus-elektronik.de>
> ---
>  include/i2c.h |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)

Thanks!

[hs@pollux u-boot-i2c]$ ./MAKEALL -a arm -s at91
[...]

--------------------- SUMMARY ----------------------------
Boards compiled: 55
----------------------------------------------------------
[hs@pollux u-boot-i2c]$

Applied to u-boot-i2c.git

bye,
Heiko

Patch

diff --git a/include/i2c.h b/include/i2c.h
index ee31034..1f35acf 100644
--- a/include/i2c.h
+++ b/include/i2c.h
@@ -78,7 +78,7 @@ 
 # elif (defined(CONFIG_AT91RM9200) || \
 	defined(CONFIG_AT91SAM9260) ||  defined(CONFIG_AT91SAM9261) || \
 	defined(CONFIG_AT91SAM9263)) && !defined(CONFIG_AT91_LEGACY)
-#  define I2C_SOFT_DECLARATIONS	at91_pio_t *pio	= (at91_pio_t *) AT91_PIO_BASE;
+#  define I2C_SOFT_DECLARATIONS	at91_pio_t *pio	= (at91_pio_t *) ATMEL_BASE_PIOA;
 # else
 #  define I2C_SOFT_DECLARATIONS
 # endif