diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-07-28 17:09:37 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-07-28 17:09:37 -0600 |
commit | 4bcbce3323afdbd617fb5755b84a26797403f96b (patch) | |
tree | ed3583befe0ac206865add47ecdd5bde92b0f97a /nuttx/configs/sama5d4-ek/src | |
parent | 11650303a904f96224249d2ac5799dd355788cd9 (diff) | |
download | px4-nuttx-4bcbce3323afdbd617fb5755b84a26797403f96b.tar.gz px4-nuttx-4bcbce3323afdbd617fb5755b84a26797403f96b.tar.bz2 px4-nuttx-4bcbce3323afdbd617fb5755b84a26797403f96b.zip |
Fixes to last SAMA5 PMIC checkin
Diffstat (limited to 'nuttx/configs/sama5d4-ek/src')
-rw-r--r-- | nuttx/configs/sama5d4-ek/src/dram_main.c | 6 | ||||
-rw-r--r-- | nuttx/configs/sama5d4-ek/src/sam_pmic.c | 15 | ||||
-rw-r--r-- | nuttx/configs/sama5d4-ek/src/sama5d4-ek.h | 2 |
3 files changed, 9 insertions, 14 deletions
diff --git a/nuttx/configs/sama5d4-ek/src/dram_main.c b/nuttx/configs/sama5d4-ek/src/dram_main.c index 291a07050..6c7ccf03c 100644 --- a/nuttx/configs/sama5d4-ek/src/dram_main.c +++ b/nuttx/configs/sama5d4-ek/src/dram_main.c @@ -111,7 +111,7 @@ int dram_main(int argc, char *argv) * JP23 will be closed and the PMIC will be initialized. */ - sam_pmic_initialize() + sam_pmic_initialize(); /* DRAM was already initialized at boot time, so we are ready to load the * Intel HEX stream into DRAM. @@ -167,8 +167,8 @@ int dram_main(int argc, char *argv) /* Invalidate caches and TLBs */ - arch_invalidate_icache(); - arch_invalidate_dcache_all(); + cp15_invalidate_icache(); + cp15_invalidate_dcache_all(); cp15_invalidate_tlbs(); /* Then jump into NOR flash */ diff --git a/nuttx/configs/sama5d4-ek/src/sam_pmic.c b/nuttx/configs/sama5d4-ek/src/sam_pmic.c index c74220a0c..c35587392 100644 --- a/nuttx/configs/sama5d4-ek/src/sam_pmic.c +++ b/nuttx/configs/sama5d4-ek/src/sam_pmic.c @@ -39,17 +39,12 @@ #include <nuttx/config.h> -#include <stdbool.h> -#include <stdio.h> -#include <debug.h> -#include <assert.h> +#include <stdint.h> #include <errno.h> +#include <debug.h> #include <nuttx/i2c.h> -#include <arch/board/board.h> - -#include "up_arch.h" #include "sam_twi.h" #include "sama5d4-ek.h" @@ -113,15 +108,15 @@ void sam_pmic_initialize(void) buffer[0] = 0x0b; buffer[1] = 0xee; - (void)I2C_SEND(i2c, buffer, 2); + (void)I2C_WRITE(i2c, buffer, 2); buffer[0] = 0x02; buffer[1] = 0x0f; - (void)I2C_SEND(i2c, buffer, 2); + (void)I2C_WRITE(i2c, buffer, 2); buffer[0] = 0x03; buffer[1] = 0x0f; - (void)I2C_SEND(i2c, buffer, 2); + (void)I2C_WRITE(i2c, buffer, 2); } } diff --git a/nuttx/configs/sama5d4-ek/src/sama5d4-ek.h b/nuttx/configs/sama5d4-ek/src/sama5d4-ek.h index df2403c9e..56ac91f7e 100644 --- a/nuttx/configs/sama5d4-ek/src/sama5d4-ek.h +++ b/nuttx/configs/sama5d4-ek/src/sama5d4-ek.h @@ -985,7 +985,7 @@ int sam_audio_null_initialize(int minor); ****************************************************************************/ #ifdef HAVE_PMIC -void sam_pmic_initialize(void) +void sam_pmic_initialize(void); #else # define sam_pmic_initialize() #endif |