Add peripheral configuration logic for the SAM3X/3A; Change all references to SAM3/4 SPI to SPI0 for compatibity with the SAM3X/3A which has SPI0 and SPI1; Add directory which will eventually holdl an Arduino Due port

This commit is contained in:
Gregory Nutt
2013-06-26 18:46:44 -06:00
parent b44495a7c6
commit 288adb2f5a
21 changed files with 654 additions and 56 deletions
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -354,7 +354,7 @@ SAM3U-EK-specific Configuration Options
CONFIG_SAM34_HSMCI - High Speed Multimedia Card Interface
CONFIG_SAM34_TWI0 - Two-Wire Interface 0
CONFIG_SAM34_TWI1 - Two-Wire Interface 1
CONFIG_SAM34_SPI - Serial Peripheral Interface
CONFIG_SAM34_SPI0 - Serial Peripheral Interface
CONFIG_SAM34_SSC - Synchronous Serial Controller
CONFIG_SAM34_TC0 - Timer Counter 0
CONFIG_SAM34_TC1 - Timer Counter 1
@@ -587,7 +587,7 @@ Configuration sub-directories
CONFIG_ADS7843E_THRESHY=39
System Type -> Peripherals:
CONFIG_SAM34_SPI=y : Enable support for SPI
CONFIG_SAM34_SPI0=y : Enable support for SPI
System Type:
CONFIG_GPIO_IRQ=y : GPIO interrupt support
+1 -1
View File
@@ -135,7 +135,7 @@ CONFIG_ARCH_CHIP_SAM3U=y
#
# AT91SAM3/4 Peripheral Support
#
# CONFIG_SAM34_SPI is not set
# CONFIG_SAM34_SPI0 is not set
# CONFIG_SAM34_SSC is not set
# CONFIG_SAM34_TC0 is not set
# CONFIG_SAM34_TC1 is not set
+25 -3
View File
@@ -98,7 +98,13 @@ CONFIG_ARMV7M_OABI_TOOLCHAIN=y
# AT91SAM3/4 Configuration Options
#
CONFIG_ARCH_CHIP_AT91SAM3U4E=y
# CONFIG_ARCH_CHIP_SAM34_NDMACHANC2C is not set
# CONFIG_ARCH_CHIP_AT91SAM3X8E is not set
# CONFIG_ARCH_CHIP_AT91SAM3X8C is not set
# CONFIG_ARCH_CHIP_AT91SAM3X4E is not set
# CONFIG_ARCH_CHIP_AT91SAM3X4C is not set
# CONFIG_ARCH_CHIP_AT91SAM3A8C is not set
# CONFIG_ARCH_CHIP_AT91SAM3A4C is not set
# CONFIG_ARCH_CHIP_ATSAM4LC2C is not set
# CONFIG_ARCH_CHIP_ATSAM4LC2B is not set
# CONFIG_ARCH_CHIP_ATSAM4LC2A is not set
# CONFIG_ARCH_CHIP_ATSAM4LC4C is not set
@@ -121,13 +127,15 @@ CONFIG_ARCH_CHIP_AT91SAM3U4E=y
# CONFIG_ARCH_CHIP_ATSAM4S8C is not set
# CONFIG_ARCH_CHIP_ATSAM4S8B is not set
CONFIG_ARCH_CHIP_SAM3U=y
# CONFIG_ARCH_CHIP_SAM3X is not set
# CONFIG_ARCH_CHIP_SAM3A is not set
# CONFIG_ARCH_CHIP_SAM4L is not set
# CONFIG_ARCH_CHIP_SAM4S is not set
#
# AT91SAM3/4 Peripheral Support
#
# CONFIG_SAM34_SPI is not set
# CONFIG_SAM34_SPI0 is not set
# CONFIG_SAM34_SSC is not set
# CONFIG_SAM34_TC0 is not set
# CONFIG_SAM34_TC1 is not set
@@ -148,6 +156,7 @@ CONFIG_SAM34_UART0=y
# CONFIG_SAM34_NAND is not set
# CONFIG_SAM34_DMA is not set
# CONFIG_SAM34_UDPHS is not set
# CONFIG_SAM34_UOTGHS is not set
# CONFIG_SAM34_RTC is not set
# CONFIG_SAM34_RTT is not set
# CONFIG_SAM34_WDT is not set
@@ -164,6 +173,14 @@ CONFIG_SAM34_UART0=y
#
# External Memory Configuration
#
CONFIG_ARCH_HAVE_EXTNAND=y
CONFIG_ARCH_HAVE_EXTNOR=y
CONFIG_ARCH_HAVE_EXTSRAM0=y
CONFIG_ARCH_HAVE_EXTSRAM1=y
# CONFIG_ARCH_EXTNAND is not set
# CONFIG_ARCH_EXTNOR is not set
# CONFIG_ARCH_EXTSRAM0 is not set
# CONFIG_ARCH_EXTSRAM1 is not set
#
# Architecture Options
@@ -242,7 +259,7 @@ CONFIG_DEV_CONSOLE=y
# CONFIG_FDCLONE_DISABLE is not set
# CONFIG_FDCLONE_STDIO is not set
CONFIG_SDCLONE_DISABLE=y
# CONFIG_SCHED_WAITPID is not set
CONFIG_SCHED_WAITPID=y
# CONFIG_SCHED_STARTHOOK is not set
# CONFIG_SCHED_ATEXIT is not set
# CONFIG_SCHED_ONEXIT is not set
@@ -642,6 +659,11 @@ CONFIG_NSH_ARCHINIT=y
# FLASH Erase-all Command
#
#
# RAM test
#
# CONFIG_SYSTEM_RAMTEST is not set
#
# readline()
#
+1 -1
View File
@@ -127,7 +127,7 @@ CONFIG_ARCH_CHIP_SAM3U=y
#
# AT91SAM3/4 Peripheral Support
#
# CONFIG_SAM34_SPI is not set
# CONFIG_SAM34_SPI0 is not set
# CONFIG_SAM34_SSC is not set
# CONFIG_SAM34_TC0 is not set
# CONFIG_SAM34_TC1 is not set
+1 -1
View File
@@ -127,7 +127,7 @@ CONFIG_ARCH_CHIP_SAM3U=y
#
# AT91SAM3/4 Peripheral Support
#
# CONFIG_SAM34_SPI is not set
# CONFIG_SAM34_SPI0 is not set
# CONFIG_SAM34_SSC is not set
# CONFIG_SAM34_TC0 is not set
# CONFIG_SAM34_TC1 is not set
+1 -1
View File
@@ -74,7 +74,7 @@ void sam_boardinitialize(void)
* sam_spiinitialize() has been brought into the link.
*/
#ifdef CONFIG_SAM34_SPI
#ifdef CONFIG_SAM34_SPI0
if (sam_spiinitialize)
{
sam_spiinitialize();
+2 -2
View File
@@ -53,7 +53,7 @@
#include "sam_spi.h"
#include "sam3u-ek.h"
#ifdef CONFIG_SAM34_SPI
#ifdef CONFIG_SAM34_SPI0
/************************************************************************************
* Definitions
@@ -201,4 +201,4 @@ uint8_t sam_spistatus(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
return 0;
}
#endif /* CONFIG_SAM34_SPI */
#endif /* CONFIG_SAM34_SPI0 */
+2 -2
View File
@@ -62,8 +62,8 @@
# error "Touchscreen support requires CONFIG_INPUT"
#endif
#ifndef CONFIG_SAM34_SPI
# error "Touchscreen support requires CONFIG_SAM34_SPI"
#ifndef CONFIG_SAM34_SPI0
# error "Touchscreen support requires CONFIG_SAM34_SPI0"
#endif
#ifndef CONFIG_GPIOA_IRQ
+3 -3
View File
@@ -528,7 +528,7 @@ SAM4L Xplained Pro-specific Configuration Options
PBA
---
CONFIG_SAM34_IISC
CONFIG_SAM34_SPI
CONFIG_SAM34_SPI0
CONFIG_SAM34_TC0
CONFIG_SAM34_TC1
CONFIG_SAM34_TWIM0
@@ -739,7 +739,7 @@ Configuration sub-directories
details.
System Type -> Peripherals:
CONFIG_SAM34_SPI=y : Enable the SAM4L SPI peripheral
CONFIG_SAM34_SPI0=y : Enable the SAM4L SPI peripheral
Device Drivers
CONFIG_SPI=y : Enable SPI support
@@ -793,7 +793,7 @@ Configuration sub-directories
changes to the configuration:
System Type -> Peripherals:
CONFIG_SAM34_SPI=y : Enable the SAM4L SPI peripheral
CONFIG_SAM34_SPI0=y : Enable the SAM4L SPI peripheral
Device Drivers -> SPI
CONFIG_SPI=y : Enable SPI support
+46 -18
View File
@@ -92,12 +92,19 @@ CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT=y
# CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL is not set
# CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL is not set
CONFIG_ARMV7M_OABI_TOOLCHAIN=y
# CONFIG_GPIO_IRQ is not set
#
# AT91SAM3/4 Configuration Options
#
# CONFIG_ARCH_CHIP_AT91SAM3U4E is not set
# CONFIG_ARCH_CHIP_SAM34_NDMACHANC2C is not set
# CONFIG_ARCH_CHIP_AT91SAM3X8E is not set
# CONFIG_ARCH_CHIP_AT91SAM3X8C is not set
# CONFIG_ARCH_CHIP_AT91SAM3X4E is not set
# CONFIG_ARCH_CHIP_AT91SAM3X4C is not set
# CONFIG_ARCH_CHIP_AT91SAM3A8C is not set
# CONFIG_ARCH_CHIP_AT91SAM3A4C is not set
# CONFIG_ARCH_CHIP_ATSAM4LC2C is not set
# CONFIG_ARCH_CHIP_ATSAM4LC2B is not set
# CONFIG_ARCH_CHIP_ATSAM4LC2A is not set
CONFIG_ARCH_CHIP_ATSAM4LC4C=y
@@ -109,17 +116,19 @@ CONFIG_ARCH_CHIP_ATSAM4LC4C=y
# CONFIG_ARCH_CHIP_ATSAM4LS4C is not set
# CONFIG_ARCH_CHIP_ATSAM4LS4B is not set
# CONFIG_ARCH_CHIP_ATSAM4LS4A is not set
# CONFIG_CONFIG_ARCH_CHIP_ATSAM4SD32C is not set
# CONFIG_CONFIG_ARCH_CHIP_ATSAM4SD32B is not set
# CONFIG_CONFIG_ARCH_CHIP_ATSAM4SD16C is not set
# CONFIG_CONFIG_ARCH_CHIP_ATSAM4SD16B is not set
# CONFIG_CONFIG_ARCH_CHIP_ATSAM4SA16C is not set
# CONFIG_CONFIG_ARCH_CHIP_ATSAM4SA16B is not set
# CONFIG_CONFIG_ARCH_CHIP_ATSAM4S16C is not set
# CONFIG_CONFIG_ARCH_CHIP_ATSAM4S16B is not set
# CONFIG_CONFIG_ARCH_CHIP_ATSAM4S8C is not set
# CONFIG_CONFIG_ARCH_CHIP_ATSAM4S8B is not set
# CONFIG_ARCH_CHIP_ATSAM4SD32C is not set
# CONFIG_ARCH_CHIP_ATSAM4SD32B is not set
# CONFIG_ARCH_CHIP_ATSAM4SD16C is not set
# CONFIG_ARCH_CHIP_ATSAM4SD16B is not set
# CONFIG_ARCH_CHIP_ATSAM4SA16C is not set
# CONFIG_ARCH_CHIP_ATSAM4SA16B is not set
# CONFIG_ARCH_CHIP_ATSAM4S16C is not set
# CONFIG_ARCH_CHIP_ATSAM4S16B is not set
# CONFIG_ARCH_CHIP_ATSAM4S8C is not set
# CONFIG_ARCH_CHIP_ATSAM4S8B is not set
# CONFIG_ARCH_CHIP_SAM3U is not set
# CONFIG_ARCH_CHIP_SAM3X is not set
# CONFIG_ARCH_CHIP_SAM3A is not set
CONFIG_ARCH_CHIP_SAM4L=y
# CONFIG_ARCH_CHIP_SAM4S is not set
@@ -131,7 +140,7 @@ CONFIG_SAM_PICOCACHE=y
# CONFIG_SAM34_APBA is not set
# CONFIG_SAM34_AESA is not set
# CONFIG_SAM34_IISC is not set
# CONFIG_SAM34_SPI is not set
# CONFIG_SAM34_SPI0 is not set
# CONFIG_SAM34_TC0 is not set
# CONFIG_SAM34_TC1 is not set
# CONFIG_SAM34_TWIM0 is not set
@@ -145,9 +154,9 @@ CONFIG_SAM34_USART0=y
# CONFIG_SAM34_USART1 is not set
# CONFIG_SAM34_USART2 is not set
# CONFIG_SAM34_USART3 is not set
# CONFIG_SAM34_ADCIFE is not set
# CONFIG_SAM34_ADC12B is not set
# CONFIG_SAM34_DACC is not set
# CONFIG_SAM34_ACIFC is not set
# CONFIG_SAM34_ACC is not set
# CONFIG_SAM34_GLOC is not set
# CONFIG_SAM34_ABDACB is not set
# CONFIG_SAM34_TRNG is not set
@@ -165,7 +174,17 @@ CONFIG_SAM34_USART0=y
# CONFIG_SAM34_AST is not set
# CONFIG_SAM34_WDT is not set
# CONFIG_SAM34_EIC is not set
#
# AT91SAM3/4 Clock Configuration
#
# CONFIG_SAM32_RESET_PERIPHCLKS is not set
# CONFIG_SAM34_OSC0 is not set
# CONFIG_SAM34_OSC32K is not set
# CONFIG_SAM34_RC80M is not set
# CONFIG_SAM34_RCFAST is not set
# CONFIG_SAM34_RC1M is not set
# CONFIG_SAM34_RC32K is not set
#
# AT91SAM3/4 USART Configuration
@@ -175,9 +194,6 @@ CONFIG_USART0_ISUART=y
#
# AT91SAM3/4 GPIO Interrupt Configuration
#
# CONFIG_GPIOA_IRQ is not set
# CONFIG_GPIOB_IRQ is not set
# CONFIG_GPIOC_IRQ is not set
#
# External Memory Configuration
@@ -241,6 +257,13 @@ CONFIG_NSH_MMCSDMINOR=0
# Board-Specific Options
#
#
# SAM4L Xplained Pro Modules
#
# CONFIG_SAM4L_XPLAINED_SLCD1MODULE is not set
# CONFIG_SAM4L_XPLAINED_IOMODULE is not set
# CONFIG_SAM4L_XPLAINED_OLED1MODULE is not set
#
# RTOS Features
#
@@ -260,7 +283,7 @@ CONFIG_DEV_CONSOLE=y
# CONFIG_FDCLONE_DISABLE is not set
# CONFIG_FDCLONE_STDIO is not set
CONFIG_SDCLONE_DISABLE=y
# CONFIG_SCHED_WAITPID is not set
CONFIG_SCHED_WAITPID=y
# CONFIG_SCHED_STARTHOOK is not set
# CONFIG_SCHED_ATEXIT is not set
# CONFIG_SCHED_ONEXIT is not set
@@ -663,6 +686,11 @@ CONFIG_NSH_CONSOLE=y
# FLASH Erase-all Command
#
#
# RAM test
#
# CONFIG_SYSTEM_RAMTEST is not set
#
# readline()
#
+1 -1
View File
@@ -131,7 +131,7 @@ CONFIG_SAM_PICOCACHE=y
# CONFIG_SAM34_APBA is not set
# CONFIG_SAM34_AESA is not set
# CONFIG_SAM34_IISC is not set
# CONFIG_SAM34_SPI is not set
# CONFIG_SAM34_SPI0 is not set
# CONFIG_SAM34_TC0 is not set
# CONFIG_SAM34_TC1 is not set
# CONFIG_SAM34_TWIM0 is not set
+3 -3
View File
@@ -46,7 +46,7 @@ ifeq ($(CONFIG_HAVE_CXX),y)
CSRCS += sam_cxxinitialize.c
endif
ifeq ($(CONFIG_SAM34_SPI),y)
ifeq ($(CONFIG_SAM34_SPI0),y)
CSRCS += sam_spi.c
endif
@@ -70,13 +70,13 @@ CSRCS += sam_slcd.c
endif
endif
ifeq ($(CONFIG_SAM34_SPI),y)
ifeq ($(CONFIG_SAM34_SPI0),y)
ifeq ($(CONFIG_SAM4L_XPLAINED_IOMODULE),y)
CSRCS += sam_mmcsd.c
endif
endif
ifeq ($(CONFIG_SAM34_SPI),y)
ifeq ($(CONFIG_SAM34_SPI0),y)
ifeq ($(CONFIG_SAM4L_XPLAINED_OLED1MODULE),y)
ifeq ($(CONFIG_LCD_UG2832HSWEG04),y)
CSRCS += sam_ug2832hsweg04.c
+6 -6
View File
@@ -189,8 +189,8 @@
#ifdef CONFIG_SAM4L_XPLAINED_IOMODULE
# ifndef CONFIG_SAM34_SPI
# error CONFIG_SAM34_SPI is required to use the I/O1 module
# ifndef CONFIG_SAM34_SPI0
# error CONFIG_SAM34_SPI0 is required to use the I/O1 module
# endif
# if defined(CONFIG_SAM4L_XPLAINED_IOMODULE_EXT1)
@@ -248,8 +248,8 @@
#ifdef CONFIG_SAM4L_XPLAINED_OLED1MODULE
# ifndef CONFIG_SAM34_SPI
# error CONFIG_SAM34_SPI is required to use the OLED1 module
# ifndef CONFIG_SAM34_SPI0
# error CONFIG_SAM34_SPI0 is required to use the OLED1 module
# endif
# ifndef CONFIG_SPI_CMDDATA
@@ -337,11 +337,11 @@ void weak_function sam_spiinitialize(void);
*
* Description:
* Initialize the SPI-based SD card. Requires CONFIG_SAM4L_XPLAINED_IOMODULE=y,
* CONFIG_DISABLE_MOUNTPOINT=n, CONFIG_MMCSD=y, and CONFIG_SAM34_SPI=y
* CONFIG_DISABLE_MOUNTPOINT=n, CONFIG_MMCSD=y, and CONFIG_SAM34_SPI0=y
*
************************************************************************************/
#if defined(CONFIG_SAM34_SPI) && defined(CONFIG_SAM4L_XPLAINED_IOMODULE)
#if defined(CONFIG_SAM34_SPI0) && defined(CONFIG_SAM4L_XPLAINED_IOMODULE)
int sam_sdinitialize(int minor);
#endif
+1 -1
View File
@@ -71,7 +71,7 @@ void sam_boardinitialize(void)
* sam_spiinitialize() has been brought into the link.
*/
#ifdef CONFIG_SAM34_SPI
#ifdef CONFIG_SAM34_SPI0
if (sam_spiinitialize)
{
sam_spiinitialize();
+3 -3
View File
@@ -59,8 +59,8 @@
# error Mountpoints are disabled (CONFIG_DISABLE_MOUNTPOINT=y)
#endif
#ifndef CONFIG_SAM34_SPI
# error SPI support is required (CONFIG_SAM34_SPI)
#ifndef CONFIG_SAM34_SPI0
# error SPI support is required (CONFIG_SAM34_SPI0)
#endif
#ifndef CONFIG_MMCSD
@@ -81,7 +81,7 @@
* - CONFIG_SAM4L_XPLAINED_IOMODULE=y,
* - CONFIG_DISABLE_MOUNTPOINT=n,
* - CONFIG_MMCSD=y, and
* - CONFIG_SAM34_SPI=y
* - CONFIG_SAM34_SPI0=y
*
*****************************************************************************/
+1 -1
View File
@@ -112,7 +112,7 @@ int nsh_archinitialize(void)
}
}
#endif
#if defined(CONFIG_SAM34_SPI) && defined(CONFIG_SAM4L_XPLAINED_IOMODULE)
#if defined(CONFIG_SAM34_SPI0) && defined(CONFIG_SAM4L_XPLAINED_IOMODULE)
/* Initialize the SPI-based MMC/SD slot */
{
+2 -2
View File
@@ -49,7 +49,7 @@
#include "sam_spi.h"
#include "sam4l-xplained.h"
#ifdef CONFIG_SAM34_SPI
#ifdef CONFIG_SAM34_SPI0
/************************************************************************************
* Definitions
@@ -236,7 +236,7 @@ uint8_t sam_spistatus(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
return ret;
}
#endif /* CONFIG_SAM34_SPI */
#endif /* CONFIG_SAM34_SPI0 */
/****************************************************************************
* Name: sam_spicmddata
@@ -103,8 +103,8 @@
# error "The OLED driver requires CONFIG_LCD_UG2832HSWEG04 in the configuration"
#endif
#ifndef CONFIG_SAM34_SPI
# error "The OLED driver requires CONFIG_SAM34_SPI in the configuration"
#ifndef CONFIG_SAM34_SPI0
# error "The OLED driver requires CONFIG_SAM34_SPI0 in the configuration"
#endif
#ifndef CONFIG_SPI_CMDDATA
+1 -1
View File
@@ -444,7 +444,7 @@ SAM4S Xplained-specific Configuration Options
CONFIG_SAM34_HSMCI - High Speed Multimedia Card Interface
CONFIG_SAM34_TWI0 - Two-Wire Interface 0
CONFIG_SAM34_TWI1 - Two-Wire Interface 1
CONFIG_SAM34_SPI - Serial Peripheral Interface
CONFIG_SAM34_SPI0 - Serial Peripheral Interface
CONFIG_SAM34_SSC - Synchronous Serial Controller
CONFIG_SAM34_TC0 - Timer Counter 0
CONFIG_SAM34_TC1 - Timer Counter 1
+15 -2
View File
@@ -98,7 +98,13 @@ CONFIG_ARMV7M_OABI_TOOLCHAIN=y
# AT91SAM3/4 Configuration Options
#
# CONFIG_ARCH_CHIP_AT91SAM3U4E is not set
# CONFIG_ARCH_CHIP_SAM34_NDMACHANC2C is not set
# CONFIG_ARCH_CHIP_AT91SAM3X8E is not set
# CONFIG_ARCH_CHIP_AT91SAM3X8C is not set
# CONFIG_ARCH_CHIP_AT91SAM3X4E is not set
# CONFIG_ARCH_CHIP_AT91SAM3X4C is not set
# CONFIG_ARCH_CHIP_AT91SAM3A8C is not set
# CONFIG_ARCH_CHIP_AT91SAM3A4C is not set
# CONFIG_ARCH_CHIP_ATSAM4LC2C is not set
# CONFIG_ARCH_CHIP_ATSAM4LC2B is not set
# CONFIG_ARCH_CHIP_ATSAM4LC2A is not set
# CONFIG_ARCH_CHIP_ATSAM4LC4C is not set
@@ -121,13 +127,15 @@ CONFIG_ARCH_CHIP_ATSAM4S16C=y
# CONFIG_ARCH_CHIP_ATSAM4S8C is not set
# CONFIG_ARCH_CHIP_ATSAM4S8B is not set
# CONFIG_ARCH_CHIP_SAM3U is not set
# CONFIG_ARCH_CHIP_SAM3X is not set
# CONFIG_ARCH_CHIP_SAM3A is not set
# CONFIG_ARCH_CHIP_SAM4L is not set
CONFIG_ARCH_CHIP_SAM4S=y
#
# AT91SAM3/4 Peripheral Support
#
# CONFIG_SAM34_SPI is not set
# CONFIG_SAM34_SPI0 is not set
# CONFIG_SAM34_SSC is not set
# CONFIG_SAM34_TC0 is not set
# CONFIG_SAM34_TC1 is not set
@@ -652,6 +660,11 @@ CONFIG_NSH_CONSOLE=y
# FLASH Erase-all Command
#
#
# RAM test
#
# CONFIG_SYSTEM_RAMTEST is not set
#
# readline()
#