AT91SAM3 now supports kernel-mode heap; SAM3U-EK knsh configuration converted to use kconfig-frontends tool
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5726 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
parent
3dc5b1fa9f
commit
34e3bb60ce
@ -104,11 +104,11 @@ config ARCH_CHIP_NUC1XX
|
||||
NPX LPC43XX architectures (ARM Cortex-M4).
|
||||
|
||||
config ARCH_CHIP_SAM3U
|
||||
bool "Atmel AT91SAM3U"
|
||||
bool "Atmel AT91SAM3"
|
||||
select ARCH_CORTEXM3
|
||||
select ARCH_HAVE_MPU
|
||||
---help---
|
||||
Atmel AT91SAM3U architectures (ARM Cortex-M3)
|
||||
Atmel AT91SAM3 architectures (ARM Cortex-M3)
|
||||
|
||||
config ARCH_CHIP_STM32
|
||||
bool "STMicro STM32"
|
||||
|
@ -3,4 +3,95 @@
|
||||
# see misc/tools/kconfig-language.txt.
|
||||
#
|
||||
|
||||
comment "AT91SAM3U Configuration Options"
|
||||
comment "AT91SAM3 Configuration Options"
|
||||
|
||||
choice
|
||||
prompt "AT91SAM3 Chip Selection"
|
||||
default ARCH_CHIP_AT91SAM3U4E
|
||||
depends on ARCH_CHIP_SAM3U
|
||||
|
||||
config ARCH_CHIP_AT91SAM3U4E
|
||||
bool "AT91SAM3U4E"
|
||||
|
||||
endchoice
|
||||
|
||||
menu "AT91SAM3 Peripheral Support"
|
||||
|
||||
config SAM3U_DMA
|
||||
bool "DMA"
|
||||
default n
|
||||
|
||||
config SAM3U_NAND
|
||||
bool "NAND support"
|
||||
default n
|
||||
|
||||
config SAM3U_HSMCI
|
||||
bool "HSMCI"
|
||||
default n
|
||||
|
||||
config SAM3U_UART
|
||||
bool "UART"
|
||||
default y
|
||||
select ARCH_HAVE_UART
|
||||
|
||||
config SAM3U_USART0
|
||||
bool "USART0"
|
||||
default n
|
||||
|
||||
config SAM3U_USART1
|
||||
bool "USART1"
|
||||
default n
|
||||
|
||||
config SAM3U_USART2
|
||||
bool "USART2"
|
||||
default n
|
||||
|
||||
config SAM3U_USART3
|
||||
bool "USART3"
|
||||
default n
|
||||
|
||||
endmenu
|
||||
|
||||
menu "AT91SAM3 UART Configuration"
|
||||
|
||||
config USART0_ISUART
|
||||
bool "USART0 is a UART"
|
||||
default y
|
||||
depends on SAM3U_USART0
|
||||
select ARCH_HAVE_USART0
|
||||
|
||||
config USART1_ISUART
|
||||
bool "USART1 is a UART"
|
||||
default y
|
||||
depends on SAM3U_USART1
|
||||
select ARCH_HAVE_USART1
|
||||
|
||||
config USART2_ISUART
|
||||
bool "USART2 is a UART"
|
||||
default n
|
||||
depends on SAM3U_USART2
|
||||
select ARCH_HAVE_USART2
|
||||
|
||||
config USART3_ISUART
|
||||
bool "USART3 is a UART"
|
||||
default y
|
||||
depends on SAM3U_USART3
|
||||
select ARCH_HAVE_USART2
|
||||
|
||||
endmenu
|
||||
|
||||
menu "AT91SAM3 GPIO Interrupt Configuration"
|
||||
|
||||
config GPIOA_IRQ
|
||||
bool "GPIOA interrupts"
|
||||
default n
|
||||
|
||||
config GPIOB_IRQ
|
||||
bool "GPIOB interrupts"
|
||||
default n
|
||||
|
||||
config GPIOC_IRQ
|
||||
bool "GPIOC interrupts"
|
||||
default n
|
||||
|
||||
endmenu
|
||||
|
@ -78,6 +78,68 @@
|
||||
# warning "CONFIG_DRAM_END is before end of SRAM0... not all of SRAM0 used"
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_MM_KERNEL_HEAPSIZE
|
||||
# if CONFIG_MM_KERNEL_HEAPSIZE < (1 << 5) /* Kernel heap size < 2**5 */
|
||||
# define KHEAP_SIZE (1 << 4) /* Use size 2**4 */
|
||||
# elif CONFIG_MM_KERNEL_HEAPSIZE < (1 << 6) /* Kernel heap size < 2**6 */
|
||||
# define KHEAP_SIZE (1 << 5) /* Use size 2**5 */
|
||||
# elif CONFIG_MM_KERNEL_HEAPSIZE < (1 << 7) /* Kernel heap size < 2**7 */
|
||||
# define KHEAP_SIZE (1 << 6) /* Use size 2**6 */
|
||||
# elif CONFIG_MM_KERNEL_HEAPSIZE < (1 << 8) /* Kernel heap size < 2**8 */
|
||||
# define KHEAP_SIZE (1 << 7) /* Use size 2**7 */
|
||||
# elif CONFIG_MM_KERNEL_HEAPSIZE < (1 << 9) /* Kernel heap size < 2**9 */
|
||||
# define KHEAP_SIZE (1 << 8) /* Use size 2**8 */
|
||||
# elif CONFIG_MM_KERNEL_HEAPSIZE < (1 << 10) /* Kernel heap size < 2**10 */
|
||||
# define KHEAP_SIZE (1 << 9) /* Use size 2**9 */
|
||||
# elif CONFIG_MM_KERNEL_HEAPSIZE < (1 << 11) /* Kernel heap size < 2**11 */
|
||||
# define KHEAP_SIZE (1 << 10) /* Use size 2**10 */
|
||||
# elif CONFIG_MM_KERNEL_HEAPSIZE < (1 << 12) /* Kernel heap size < 2**12 */
|
||||
# define KHEAP_SIZE (1 << 11) /* Use size 2**11 */
|
||||
# elif CONFIG_MM_KERNEL_HEAPSIZE < (1 << 13) /* Kernel heap size < 2**13 */
|
||||
# define KHEAP_SIZE (1 << 12) /* Use size 2**12 */
|
||||
# elif CONFIG_MM_KERNEL_HEAPSIZE < (1 << 14) /* Kernel heap size < 2**14 */
|
||||
# define KHEAP_SIZE (1 << 13) /* Use size 2**13 */
|
||||
# elif CONFIG_MM_KERNEL_HEAPSIZE < (1 << 15) /* Kernel heap size < 2**15 */
|
||||
# define KHEAP_SIZE (1 << 14) /* Use size 2**14 */
|
||||
# elif CONFIG_MM_KERNEL_HEAPSIZE < (1 << 16) /* Kernel heap size < 2**16 */
|
||||
# define KHEAP_SIZE (1 << 15) /* Use size 2**15 */
|
||||
# elif CONFIG_MM_KERNEL_HEAPSIZE < (1 << 17) /* Kernel heap size < 2**17 */
|
||||
# define KHEAP_SIZE (1 << 16) /* Use size 2**16 */
|
||||
# elif CONFIG_MM_KERNEL_HEAPSIZE < (1 << 18) /* Kernel heap size < 2**18 */
|
||||
# define KHEAP_SIZE (1 << 17) /* Use size 2**17 */
|
||||
# elif CONFIG_MM_KERNEL_HEAPSIZE < (1 << 19) /* Kernel heap size < 2**19 */
|
||||
# define KHEAP_SIZE (1 << 18) /* Use size 2**18 */
|
||||
# elif CONFIG_MM_KERNEL_HEAPSIZE < (1 << 20) /* Kernel heap size < 2**20 */
|
||||
# define KHEAP_SIZE (1 << 19) /* Use size 2**19 */
|
||||
# elif CONFIG_MM_KERNEL_HEAPSIZE < (1 << 21) /* Kernel heap size < 2**21 */
|
||||
# define KHEAP_SIZE (1 << 20) /* Use size 2**20 */
|
||||
# elif CONFIG_MM_KERNEL_HEAPSIZE < (1 << 22) /* Kernel heap size < 2**22 */
|
||||
# define KHEAP_SIZE (1 << 21) /* Use size 2**21 */
|
||||
# elif CONFIG_MM_KERNEL_HEAPSIZE < (1 << 23) /* Kernel heap size < 2**23 */
|
||||
# define KHEAP_SIZE (1 << 22) /* Use size 2**22 */
|
||||
# elif CONFIG_MM_KERNEL_HEAPSIZE < (1 << 24) /* Kernel heap size < 2**24 */
|
||||
# define KHEAP_SIZE (1 << 23) /* Use size 2**23 */
|
||||
# elif CONFIG_MM_KERNEL_HEAPSIZE < (1 << 25) /* Kernel heap size < 2**25 */
|
||||
# define KHEAP_SIZE (1 << 24) /* Use size 2**24 */
|
||||
# elif CONFIG_MM_KERNEL_HEAPSIZE < (1 << 26) /* Kernel heap size < 2**26 */
|
||||
# define KHEAP_SIZE (1 << 25) /* Use size 2**25 */
|
||||
# elif CONFIG_MM_KERNEL_HEAPSIZE < (1 << 27) /* Kernel heap size < 2**27 */
|
||||
# define KHEAP_SIZE (1 << 26) /* Use size 2**26 */
|
||||
# elif CONFIG_MM_KERNEL_HEAPSIZE < (1 << 28) /* Kernel heap size < 2**28 */
|
||||
# define KHEAP_SIZE (1 << 27) /* Use size 2**27 */
|
||||
# elif CONFIG_MM_KERNEL_HEAPSIZE < (1 << 29) /* Kernel heap size < 2**29 */
|
||||
# define KHEAP_SIZE (1 << 28) /* Use size 2**28 */
|
||||
# elif CONFIG_MM_KERNEL_HEAPSIZE < (1 << 30) /* Kernel heap size < 2**30 */
|
||||
# define KHEAP_SIZE (1 << 29) /* Use size 2**29 */
|
||||
# elif CONFIG_MM_KERNEL_HEAPSIZE < (1 << 31) /* Kernel heap size < 2**31 */
|
||||
# define KHEAP_SIZE (1 << 30) /* Use size 2**30 */
|
||||
# else
|
||||
# define KHEAP_SIZE (1 << 31) /* Use size 2**31 */
|
||||
# endif
|
||||
|
||||
# define KHEAP_MASK (KHEAP_SIZE - 1)
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
****************************************************************************/
|
||||
@ -107,6 +169,24 @@
|
||||
|
||||
void up_allocate_heap(FAR void **heap_start, size_t *heap_size)
|
||||
{
|
||||
#if defined(CONFIG_NUTTX_KERNEL) && defined(CONFIG_MM_KERNEL_HEAP)
|
||||
uintptr_t kbase = ((uintptr_t)g_heapbase + KHEAP_MASK) & ~KHEAP_MASK;
|
||||
uintptr_t ubase = kbase + KHEAP_SIZE;
|
||||
size_t usize = CONFIG_DRAM_END - ubase;
|
||||
|
||||
DEBUGASSERT(ubase < (uintptr_t)CONFIG_DRAM_END);
|
||||
|
||||
/* Return the heap settings */
|
||||
|
||||
up_ledon(LED_HEAPALLOCATE);
|
||||
*heap_start = (FAR void*)ubase;
|
||||
*heap_size = usize;
|
||||
|
||||
/* Allow access to the heap memory */
|
||||
|
||||
sam3u_mpu_uheap((uintptr_t)ubase, usize);
|
||||
#else
|
||||
|
||||
size_t size = CONFIG_DRAM_END - g_heapbase;
|
||||
|
||||
/* Return the heap settings */
|
||||
@ -115,11 +195,41 @@ void up_allocate_heap(FAR void **heap_start, size_t *heap_size)
|
||||
*heap_start = (FAR void*)g_heapbase;
|
||||
*heap_size = size;
|
||||
|
||||
/* Allow access to the heap memory */
|
||||
/* Allow user access to the user heap memory */
|
||||
|
||||
sam3u_mpuheap((uintptr_t)g_heapbase, size);
|
||||
sam3u_mpu_uheap((uintptr_t)g_heapbase, size);
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_allocate_kheap
|
||||
*
|
||||
* Description:
|
||||
* For the kernel build (CONFIG_NUTTX_KERNEL=y) with both kernel- and
|
||||
* user-space heaps (CONFIG_MM_KERNEL_HEAP=y), this function allocates
|
||||
* (and protects) the kernel-space heap.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(CONFIG_NUTTX_KERNEL) && defined(CONFIG_MM_KERNEL_HEAP)
|
||||
void up_allocate_kheap(FAR void **heap_start, size_t *heap_size)
|
||||
{
|
||||
uintptr_t kbase = ((uintptr_t)g_heapbase + KHEAP_MASK) & ~KHEAP_MASK;
|
||||
|
||||
DEBUGASSERT((kbase + KHEAP_SIZE) < (uintptr_t)CONFIG_DRAM_END);
|
||||
|
||||
/* Return the heap settings */
|
||||
|
||||
*heap_start = (FAR void*)kbase;
|
||||
*heap_size = KHEAP_SIZE;
|
||||
|
||||
/* Prohibit user access to the kernel heap memory */
|
||||
|
||||
sam3u_mpu_kheap((uintptr_t)kbase, KHEAP_SIZE);
|
||||
}
|
||||
#endif
|
||||
|
||||
/************************************************************************
|
||||
* Name: up_addregion
|
||||
*
|
||||
@ -136,18 +246,18 @@ void up_addregion(void)
|
||||
|
||||
kmm_addregion((FAR void*)SAM3U_INTSRAM1_BASE, CONFIG_SAM3U_SRAM1_SIZE);
|
||||
|
||||
/* Allow access to the heap memory */
|
||||
/* Allow user access to the heap memory */
|
||||
|
||||
sam3u_mpuheap(SAM3U_INTSRAM1_BASE, CONFIG_SAM3U_SRAM1_SIZE);
|
||||
sam3u_mpu_uheap(SAM3U_INTSRAM1_BASE, CONFIG_SAM3U_SRAM1_SIZE);
|
||||
|
||||
/* Add the region */
|
||||
|
||||
#if CONFIG_MM_REGIONS > 2
|
||||
kmm_addregion((FAR void*)SAM3U_NFCSRAM_BASE, CONFIG_SAM3U_NFCSRAM_SIZE);
|
||||
|
||||
/* Allow access to the heap memory */
|
||||
/* Allow user access to the heap memory */
|
||||
|
||||
sam3u_mpuheap(SAM3U_NFCSRAM_BASE, CONFIG_SAM3U_NFCSRAM_SIZE);
|
||||
sam3u_mpu_uheap(SAM3U_NFCSRAM_BASE, CONFIG_SAM3U_NFCSRAM_SIZE);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
@ -1,7 +1,7 @@
|
||||
/************************************************************************************
|
||||
* arch/arm/src/sam3u/sam3u_internal.h
|
||||
*
|
||||
* Copyright (C) 2009-2011 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2009-2011, 2013 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -409,7 +409,8 @@ struct sam3u_dmaregs_s
|
||||
#undef EXTERN
|
||||
#if defined(__cplusplus)
|
||||
#define EXTERN extern "C"
|
||||
extern "C" {
|
||||
extern "C"
|
||||
{
|
||||
#else
|
||||
#define EXTERN extern
|
||||
#endif
|
||||
@ -431,7 +432,7 @@ extern "C" {
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
EXTERN void sam3u_clockconfig(void);
|
||||
void sam3u_clockconfig(void);
|
||||
|
||||
/************************************************************************************
|
||||
* Name: sam3u_lowsetup
|
||||
@ -443,7 +444,7 @@ EXTERN void sam3u_clockconfig(void);
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
EXTERN void sam3u_lowsetup(void);
|
||||
void sam3u_lowsetup(void);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: sam3u_userspace
|
||||
@ -457,7 +458,7 @@ EXTERN void sam3u_lowsetup(void);
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_NUTTX_KERNEL
|
||||
EXTERN void sam3u_userspace(void);
|
||||
void sam3u_userspace(void);
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
@ -470,23 +471,29 @@ EXTERN void sam3u_userspace(void);
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_NUTTX_KERNEL
|
||||
EXTERN void sam3u_mpuinitialize(void);
|
||||
void sam3u_mpuinitialize(void);
|
||||
#else
|
||||
# define sam3u_mpuinitialize()
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Name: sam3u_mpuheap
|
||||
* Name: sam3u_mpu_uheap and sam3u_mpu_uheap
|
||||
*
|
||||
* Description:
|
||||
* Map a heap region.
|
||||
* Map a user- or kernel-heap region.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_NUTTX_KERNEL
|
||||
EXTERN void sam3u_mpuheap(uintptr_t start, size_t size);
|
||||
void sam3u_mpu_uheap(uintptr_t start, size_t size);
|
||||
#else
|
||||
# define sam3u_mpuheap(start,size)
|
||||
# define sam3u_mpu_uheap(start,size)
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_NUTTX_KERNEL) && defined(CONFIG_MM_KERNEL_HEAP)
|
||||
void sam3u_mpu_kheap(uintptr_t start, size_t size);
|
||||
#else
|
||||
# define sam3u_mpu_kheap(start,size)
|
||||
#endif
|
||||
|
||||
/************************************************************************************
|
||||
@ -498,7 +505,7 @@ EXTERN void sam3u_mpuheap(uintptr_t start, size_t size);
|
||||
************************************************************************************/
|
||||
|
||||
#ifdef CONFIG_GPIO_IRQ
|
||||
EXTERN void sam3u_gpioirqinitialize(void);
|
||||
void sam3u_gpioirqinitialize(void);
|
||||
#else
|
||||
# define sam3u_gpioirqinitialize()
|
||||
#endif
|
||||
@ -511,7 +518,7 @@ EXTERN void sam3u_gpioirqinitialize(void);
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
EXTERN int sam3u_configgpio(uint16_t cfgset);
|
||||
int sam3u_configgpio(uint16_t cfgset);
|
||||
|
||||
/************************************************************************************
|
||||
* Name: sam3u_gpiowrite
|
||||
@ -521,7 +528,7 @@ EXTERN int sam3u_configgpio(uint16_t cfgset);
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
EXTERN void sam3u_gpiowrite(uint16_t pinset, bool value);
|
||||
void sam3u_gpiowrite(uint16_t pinset, bool value);
|
||||
|
||||
/************************************************************************************
|
||||
* Name: sam3u_gpioread
|
||||
@ -531,7 +538,7 @@ EXTERN void sam3u_gpiowrite(uint16_t pinset, bool value);
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
EXTERN bool sam3u_gpioread(uint16_t pinset);
|
||||
bool sam3u_gpioread(uint16_t pinset);
|
||||
|
||||
/************************************************************************************
|
||||
* Name: sam3u_gpioirq
|
||||
@ -542,7 +549,7 @@ EXTERN bool sam3u_gpioread(uint16_t pinset);
|
||||
************************************************************************************/
|
||||
|
||||
#ifdef CONFIG_GPIO_IRQ
|
||||
EXTERN void sam3u_gpioirq(uint16_t pinset);
|
||||
void sam3u_gpioirq(uint16_t pinset);
|
||||
#else
|
||||
# define sam3u_gpioirq(pinset)
|
||||
#endif
|
||||
@ -556,7 +563,7 @@ EXTERN void sam3u_gpioirq(uint16_t pinset);
|
||||
************************************************************************************/
|
||||
|
||||
#ifdef CONFIG_GPIO_IRQ
|
||||
EXTERN void sam3u_gpioirqenable(int irq);
|
||||
void sam3u_gpioirqenable(int irq);
|
||||
#else
|
||||
# define sam3u_gpioirqenable(irq)
|
||||
#endif
|
||||
@ -570,7 +577,7 @@ EXTERN void sam3u_gpioirqenable(int irq);
|
||||
************************************************************************************/
|
||||
|
||||
#ifdef CONFIG_GPIO_IRQ
|
||||
EXTERN void sam3u_gpioirqdisable(int irq);
|
||||
void sam3u_gpioirqdisable(int irq);
|
||||
#else
|
||||
# define sam3u_gpioirqdisable(irq)
|
||||
#endif
|
||||
@ -584,7 +591,7 @@ EXTERN void sam3u_gpioirqdisable(int irq);
|
||||
************************************************************************************/
|
||||
|
||||
#ifdef CONFIG_DEBUG_GPIO
|
||||
EXTERN int sam3u_dumpgpio(uint32_t pinset, const char *msg);
|
||||
int sam3u_dumpgpio(uint32_t pinset, const char *msg);
|
||||
#else
|
||||
# define sam3u_dumpgpio(p,m)
|
||||
#endif
|
||||
@ -609,7 +616,7 @@ EXTERN int sam3u_dumpgpio(uint32_t pinset, const char *msg);
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
EXTERN DMA_HANDLE sam3u_dmachannel(uint32_t dmach_flags);
|
||||
DMA_HANDLE sam3u_dmachannel(uint32_t dmach_flags);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: sam3u_dmafree
|
||||
@ -624,7 +631,7 @@ EXTERN DMA_HANDLE sam3u_dmachannel(uint32_t dmach_flags);
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
EXTERN void sam3u_dmafree(DMA_HANDLE handle);
|
||||
void sam3u_dmafree(DMA_HANDLE handle);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: sam3u_dmatxsetup
|
||||
@ -637,8 +644,8 @@ EXTERN void sam3u_dmafree(DMA_HANDLE handle);
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
EXTERN int sam3u_dmatxsetup(DMA_HANDLE handle, uint32_t paddr, uint32_t maddr,
|
||||
size_t nbytes);
|
||||
int sam3u_dmatxsetup(DMA_HANDLE handle, uint32_t paddr, uint32_t maddr,
|
||||
size_t nbytes);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: sam3u_dmarxsetup
|
||||
@ -651,8 +658,8 @@ EXTERN int sam3u_dmatxsetup(DMA_HANDLE handle, uint32_t paddr, uint32_t maddr,
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
EXTERN int sam3u_dmarxsetup(DMA_HANDLE handle, uint32_t paddr, uint32_t maddr,
|
||||
size_t nbytes);
|
||||
int sam3u_dmarxsetup(DMA_HANDLE handle, uint32_t paddr, uint32_t maddr,
|
||||
size_t nbytes);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: sam3u_dmastart
|
||||
@ -662,7 +669,7 @@ EXTERN int sam3u_dmarxsetup(DMA_HANDLE handle, uint32_t paddr, uint32_t maddr,
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
EXTERN int sam3u_dmastart(DMA_HANDLE handle, dma_callback_t callback, void *arg);
|
||||
int sam3u_dmastart(DMA_HANDLE handle, dma_callback_t callback, void *arg);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: sam3u_dmastop
|
||||
@ -674,7 +681,7 @@ EXTERN int sam3u_dmastart(DMA_HANDLE handle, dma_callback_t callback, void *arg)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
EXTERN void sam3u_dmastop(DMA_HANDLE handle);
|
||||
void sam3u_dmastop(DMA_HANDLE handle);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: sam3u_dmasample
|
||||
@ -685,7 +692,7 @@ EXTERN void sam3u_dmastop(DMA_HANDLE handle);
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_DEBUG_DMA
|
||||
EXTERN void sam3u_dmasample(DMA_HANDLE handle, struct sam3u_dmaregs_s *regs);
|
||||
void sam3u_dmasample(DMA_HANDLE handle, struct sam3u_dmaregs_s *regs);
|
||||
#else
|
||||
# define sam3u_dmasample(handle,regs)
|
||||
#endif
|
||||
@ -699,8 +706,8 @@ EXTERN void sam3u_dmasample(DMA_HANDLE handle, struct sam3u_dmaregs_s *regs);
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_DEBUG_DMA
|
||||
EXTERN void sam3u_dmadump(DMA_HANDLE handle, const struct sam3u_dmaregs_s *regs,
|
||||
const char *msg);
|
||||
void sam3u_dmadump(DMA_HANDLE handle, const struct sam3u_dmaregs_s *regs,
|
||||
const char *msg);
|
||||
#else
|
||||
# define sam3u_dmadump(handle,regs,msg)
|
||||
#endif
|
||||
@ -720,7 +727,7 @@ EXTERN void sam3u_dmadump(DMA_HANDLE handle, const struct sam3u_dmaregs_s *regs,
|
||||
****************************************************************************/
|
||||
|
||||
struct sdio_dev_s; /* See include/nuttx/sdio.h */
|
||||
EXTERN FAR struct sdio_dev_s *sdio_initialize(int slotno);
|
||||
FAR struct sdio_dev_s *sdio_initialize(int slotno);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: sdio_mediachange
|
||||
@ -741,7 +748,7 @@ EXTERN FAR struct sdio_dev_s *sdio_initialize(int slotno);
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
EXTERN void sdio_mediachange(FAR struct sdio_dev_s *dev, bool cardinslot);
|
||||
void sdio_mediachange(FAR struct sdio_dev_s *dev, bool cardinslot);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: sdio_wrprotect
|
||||
@ -759,7 +766,7 @@ EXTERN void sdio_mediachange(FAR struct sdio_dev_s *dev, bool cardinslot);
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
EXTERN void sdio_wrprotect(FAR struct sdio_dev_s *dev, bool wrprotect);
|
||||
void sdio_wrprotect(FAR struct sdio_dev_s *dev, bool wrprotect);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: sam3u_spicsnumber, sam3u_spiselect, sam3u_spistatus, and
|
||||
@ -825,7 +832,7 @@ enum spi_dev_e;
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
EXTERN int sam3u_spicsnumber(enum spi_dev_e devid);
|
||||
int sam3u_spicsnumber(enum spi_dev_e devid);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: sam3u_spiselect
|
||||
@ -853,7 +860,7 @@ EXTERN int sam3u_spicsnumber(enum spi_dev_e devid);
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
EXTERN void sam3u_spiselect(enum spi_dev_e devid, bool selected);
|
||||
void sam3u_spiselect(enum spi_dev_e devid, bool selected);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: sam3u_spistatus
|
||||
@ -870,7 +877,7 @@ EXTERN void sam3u_spiselect(enum spi_dev_e devid, bool selected);
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
EXTERN uint8_t sam3u_spistatus(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
|
||||
uint8_t sam3u_spistatus(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: sam3u_spicmddata
|
||||
@ -897,7 +904,7 @@ EXTERN uint8_t sam3u_spistatus(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
EXTERN int sam3u_spicmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
|
||||
int sam3u_spicmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
|
||||
#endif
|
||||
#endif /* CONFIG_SAM3U_SPI */
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
* arch/arm/src/common/sam3u_mpuinit.c
|
||||
*
|
||||
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2011, 2013 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -102,17 +102,26 @@ void sam3u_mpuinitialize(void)
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: sam3u_mpuheap
|
||||
* Name: sam3u_mpu_uheap and sam3u_mpu_uheap
|
||||
*
|
||||
* Description:
|
||||
* Map a heap region (probably needs to extension to handle external SRAM).
|
||||
* Map a user- or kernel-heap region.
|
||||
*
|
||||
* This logic may need an extension to handle external SRAM).
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void sam3u_mpuheap(uintptr_t start, size_t size)
|
||||
void sam3u_mpu_uheap(uintptr_t start, size_t size)
|
||||
{
|
||||
mpu_userintsram(start, size);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_MM_KERNEL_HEAP
|
||||
void sam3u_mpu_kheap(uintptr_t start, size_t size)
|
||||
{
|
||||
mpu_privintsram(start, size);
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* CONFIG_NUTTX_KERNEL */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user