diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-06-29 09:52:07 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-06-29 09:52:07 -0600 |
commit | e4e1e3587c95b71161000634604cb6c689e59f51 (patch) | |
tree | 7df76cca1dd10e59bd912e50a2ddb4c3a3ea86d4 | |
parent | 9ddd0ba9a3764f18445b49a3df1d5d0096f0870c (diff) | |
download | nuttx-e4e1e3587c95b71161000634604cb6c689e59f51.tar.gz nuttx-e4e1e3587c95b71161000634604cb6c689e59f51.tar.bz2 nuttx-e4e1e3587c95b71161000634604cb6c689e59f51.zip |
SAMA5D: Don't use explicit DMACH_FLAG_MEMPID_SHIFT; it does not exist in the SAMA5D4
-rw-r--r-- | nuttx/arch/arm/src/sama5/sam_adc.c | 2 | ||||
-rw-r--r-- | nuttx/arch/arm/src/sama5/sam_hsmci.c | 4 | ||||
-rw-r--r-- | nuttx/arch/arm/src/sama5/sam_nand.c | 6 | ||||
-rw-r--r-- | nuttx/arch/arm/src/sama5/sam_spi.c | 6 | ||||
-rw-r--r-- | nuttx/arch/arm/src/sama5/sam_ssc.c | 21 | ||||
-rw-r--r-- | nuttx/configs/sama5d4-ek/README.txt | 8 |
6 files changed, 22 insertions, 25 deletions
diff --git a/nuttx/arch/arm/src/sama5/sam_adc.c b/nuttx/arch/arm/src/sama5/sam_adc.c index 28ca5ee03..ef415ee59 100644 --- a/nuttx/arch/arm/src/sama5/sam_adc.c +++ b/nuttx/arch/arm/src/sama5/sam_adc.c @@ -322,7 +322,7 @@ ((SAM_IRQ_ADC << DMACH_FLAG_PERIPHPID_SHIFT) | DMACH_FLAG_PERIPHAHB_AHB_IF2 | \ DMACH_FLAG_PERIPHH2SEL | DMACH_FLAG_PERIPHISPERIPH | \ DMACH_FLAG_PERIPHWIDTH_16BITS | DMACH_FLAG_PERIPHCHUNKSIZE_1 | \ - ((0x3f) << DMACH_FLAG_MEMPID_SHIFT) | DMACH_FLAG_MEMAHB_AHB_IF0 | \ + DMACH_FLAG_MEMPID(0x3f) | DMACH_FLAG_MEMAHB_AHB_IF0 | \ DMACH_FLAG_MEMWIDTH_16BITS | DMACH_FLAG_MEMINCREMENT | \ DMACH_FLAG_MEMCHUNKSIZE_1) #endif diff --git a/nuttx/arch/arm/src/sama5/sam_hsmci.c b/nuttx/arch/arm/src/sama5/sam_hsmci.c index dee323642..3628fb8aa 100644 --- a/nuttx/arch/arm/src/sama5/sam_hsmci.c +++ b/nuttx/arch/arm/src/sama5/sam_hsmci.c @@ -197,7 +197,7 @@ DMACH_FLAG_PERIPHH2SEL | DMACH_FLAG_PERIPHISPERIPH | \ DMACH_FLAG_PERIPHWIDTH_32BITS | DMACH_FLAG_PERIPHINCREMENT | \ DMACH_FLAG_PERIPHCHUNKSIZE_1 | \ - ((0x3f) << DMACH_FLAG_MEMPID_SHIFT) | DMACH_FLAG_MEMAHB_AHB_IF0 | \ + DMACH_FLAG_MEMPID(0x3f) | DMACH_FLAG_MEMAHB_AHB_IF0 | \ DMACH_FLAG_MEMWIDTH_32BITS | DMACH_FLAG_MEMINCREMENT | \ DMACH_FLAG_MEMCHUNKSIZE_4) @@ -206,7 +206,7 @@ (((pid) << DMACH_FLAG_PERIPHPID_SHIFT) | DMACH_FLAG_PERIPHAHB_AHB_IF2 | \ DMACH_FLAG_PERIPHH2SEL | DMACH_FLAG_PERIPHISPERIPH | \ DMACH_FLAG_PERIPHWIDTH_32BITS | DMACH_FLAG_PERIPHCHUNKSIZE_1 | \ - ((0x3f) << DMACH_FLAG_MEMPID_SHIFT) | DMACH_FLAG_MEMAHB_AHB_IF0 | \ + DMACH_FLAG_MEMPID(0x3f) | DMACH_FLAG_MEMAHB_AHB_IF0 | \ DMACH_FLAG_MEMWIDTH_32BITS | DMACH_FLAG_MEMINCREMENT | \ DMACH_FLAG_MEMCHUNKSIZE_4) diff --git a/nuttx/arch/arm/src/sama5/sam_nand.c b/nuttx/arch/arm/src/sama5/sam_nand.c index 9e4bf0e8b..47c6d5e6c 100644 --- a/nuttx/arch/arm/src/sama5/sam_nand.c +++ b/nuttx/arch/arm/src/sama5/sam_nand.c @@ -112,7 +112,7 @@ (((0x3f) << DMACH_FLAG_PERIPHPID_SHIFT) | DMACH_FLAG_PERIPHAHB_AHB_IF0 | \ DMACH_FLAG_PERIPHWIDTH_32BITS | DMACH_FLAG_PERIPHINCREMENT | \ DMACH_FLAG_PERIPHCHUNKSIZE_1 | \ - ((0x3f) << DMACH_FLAG_MEMPID_SHIFT) | DMACH_FLAG_MEMAHB_AHB_IF0 | \ + DMACH_FLAG_MEMPID(0x3f) | DMACH_FLAG_MEMAHB_AHB_IF0 | \ DMACH_FLAG_MEMWIDTH_32BITS | DMACH_FLAG_MEMINCREMENT | \ DMACH_FLAG_MEMCHUNKSIZE_1) @@ -120,7 +120,7 @@ DMACH_FLAG_FIFOCFG_LARGEST | \ (((0x3f) << DMACH_FLAG_PERIPHPID_SHIFT) | DMACH_FLAG_PERIPHAHB_AHB_IF0 | \ DMACH_FLAG_PERIPHWIDTH_8BITS | DMACH_FLAG_PERIPHCHUNKSIZE_1 | \ - ((0x3f) << DMACH_FLAG_MEMPID_SHIFT) | DMACH_FLAG_MEMAHB_AHB_IF0 | \ + DMACH_FLAG_MEMPID(0x3f) | DMACH_FLAG_MEMAHB_AHB_IF0 | \ DMACH_FLAG_MEMWIDTH_8BITS | DMACH_FLAG_MEMINCREMENT | \ DMACH_FLAG_MEMCHUNKSIZE_1) @@ -128,7 +128,7 @@ DMACH_FLAG_FIFOCFG_LARGEST | \ (((0x3f) << DMACH_FLAG_PERIPHPID_SHIFT) | DMACH_FLAG_PERIPHAHB_AHB_IF0 | \ DMACH_FLAG_PERIPHWIDTH_16BITS | DMACH_FLAG_PERIPHCHUNKSIZE_1 | \ - ((0x3f) << DMACH_FLAG_MEMPID_SHIFT) | DMACH_FLAG_MEMAHB_AHB_IF0 | \ + DMACH_FLAG_MEMPID(0x3f) | DMACH_FLAG_MEMAHB_AHB_IF0 | \ DMACH_FLAG_MEMWIDTH_16BITS | DMACH_FLAG_MEMINCREMENT | \ DMACH_FLAG_MEMCHUNKSIZE_1) diff --git a/nuttx/arch/arm/src/sama5/sam_spi.c b/nuttx/arch/arm/src/sama5/sam_spi.c index 29b068d65..549ac675d 100644 --- a/nuttx/arch/arm/src/sama5/sam_spi.c +++ b/nuttx/arch/arm/src/sama5/sam_spi.c @@ -1440,8 +1440,7 @@ static void spi_exchange(struct spi_dev_s *dev, const void *txbuffer, ((uint32_t)spi->pid << DMACH_FLAG_PERIPHPID_SHIFT) | DMACH_FLAG_PERIPHH2SEL | DMACH_FLAG_PERIPHISPERIPH | DMACH_FLAG_PERIPHAHB_AHB_IF2 | DMACH_FLAG_PERIPHWIDTH_8BITS | - DMACH_FLAG_PERIPHCHUNKSIZE_1 | - ((uint32_t)(0x3f) << DMACH_FLAG_MEMPID_SHIFT) | + DMACH_FLAG_PERIPHCHUNKSIZE_1 | DMACH_FLAG_MEMPID(0x3f) | DMACH_FLAG_MEMAHB_AHB_IF0 | DMACH_FLAG_MEMWIDTH_8BITS | DMACH_FLAG_MEMCHUNKSIZE_1; @@ -1464,8 +1463,7 @@ static void spi_exchange(struct spi_dev_s *dev, const void *txbuffer, ((uint32_t)spi->pid << DMACH_FLAG_PERIPHPID_SHIFT) | DMACH_FLAG_PERIPHH2SEL | DMACH_FLAG_PERIPHISPERIPH | DMACH_FLAG_PERIPHAHB_AHB_IF2 | DMACH_FLAG_PERIPHWIDTH_8BITS | - DMACH_FLAG_PERIPHCHUNKSIZE_1 | - ((uint32_t)(0x3f) << DMACH_FLAG_MEMPID_SHIFT) | + DMACH_FLAG_PERIPHCHUNKSIZE_1 | DMACH_FLAG_MEMPID(0x3f) | DMACH_FLAG_MEMAHB_AHB_IF0 | DMACH_FLAG_MEMWIDTH_8BITS | DMACH_FLAG_MEMCHUNKSIZE_1; diff --git a/nuttx/arch/arm/src/sama5/sam_ssc.c b/nuttx/arch/arm/src/sama5/sam_ssc.c index 3024e5ba3..821002330 100644 --- a/nuttx/arch/arm/src/sama5/sam_ssc.c +++ b/nuttx/arch/arm/src/sama5/sam_ssc.c @@ -191,26 +191,23 @@ #define DMA8_FLAGS \ (DMACH_FLAG_PERIPHAHB_AHB_IF2 | DMACH_FLAG_PERIPHH2SEL | \ DMACH_FLAG_PERIPHISPERIPH | DMACH_FLAG_PERIPHWIDTH_8BITS | \ - DMACH_FLAG_PERIPHCHUNKSIZE_1 | \ - ((0x3f) << DMACH_FLAG_MEMPID_SHIFT) | DMACH_FLAG_MEMAHB_AHB_IF0 | \ - DMACH_FLAG_MEMWIDTH_16BITS | DMACH_FLAG_MEMINCREMENT | \ - DMACH_FLAG_MEMCHUNKSIZE_4) + DMACH_FLAG_PERIPHCHUNKSIZE_1 | DMACH_FLAG_MEMPID(0x3f) | \ + DMACH_FLAG_MEMAHB_AHB_IF0 | DMACH_FLAG_MEMWIDTH_16BITS | \ + DMACH_FLAG_MEMINCREMENT | DMACH_FLAG_MEMCHUNKSIZE_4) #define DMA16_FLAGS \ (DMACH_FLAG_PERIPHAHB_AHB_IF2 | DMACH_FLAG_PERIPHH2SEL | \ DMACH_FLAG_PERIPHISPERIPH | DMACH_FLAG_PERIPHWIDTH_16BITS | \ - DMACH_FLAG_PERIPHCHUNKSIZE_1 | \ - ((0x3f) << DMACH_FLAG_MEMPID_SHIFT) | DMACH_FLAG_MEMAHB_AHB_IF0 | \ - DMACH_FLAG_MEMWIDTH_16BITS | DMACH_FLAG_MEMINCREMENT | \ - DMACH_FLAG_MEMCHUNKSIZE_4) + DMACH_FLAG_PERIPHCHUNKSIZE_1 | DMACH_FLAG_MEMPID(0x3f) | \ + DMACH_FLAG_MEMAHB_AHB_IF0 | DMACH_FLAG_MEMWIDTH_16BITS | \ + DMACH_FLAG_MEMINCREMENT | DMACH_FLAG_MEMCHUNKSIZE_4) #define DMA32_FLAGS \ (DMACH_FLAG_PERIPHAHB_AHB_IF2 | DMACH_FLAG_PERIPHH2SEL | \ DMACH_FLAG_PERIPHISPERIPH | DMACH_FLAG_PERIPHWIDTH_32BITS | \ - DMACH_FLAG_PERIPHCHUNKSIZE_1 | \ - ((0x3f) << DMACH_FLAG_MEMPID_SHIFT) | DMACH_FLAG_MEMAHB_AHB_IF0 | \ - DMACH_FLAG_MEMWIDTH_32BITS | DMACH_FLAG_MEMINCREMENT | \ - DMACH_FLAG_MEMCHUNKSIZE_4) + DMACH_FLAG_PERIPHCHUNKSIZE_1 | DMACH_FLAG_MEMPID(0x3f) | \ + DMACH_FLAG_MEMAHB_AHB_IF0 | DMACH_FLAG_MEMWIDTH_32BITS | \ + DMACH_FLAG_MEMINCREMENT | DMACH_FLAG_MEMCHUNKSIZE_4) /* DMA timeout. The value is not critical; we just don't want the system to * hang in the event that a DMA does not finish. This is set to diff --git a/nuttx/configs/sama5d4-ek/README.txt b/nuttx/configs/sama5d4-ek/README.txt index 869de8c29..001942e3e 100644 --- a/nuttx/configs/sama5d4-ek/README.txt +++ b/nuttx/configs/sama5d4-ek/README.txt @@ -3094,9 +3094,11 @@ Configurations This is a little program to help debug of code in DRAM. It does the following: - - It configures DRAM, - - It loads and Intel HEX file into DRAM over the terminal port, - - Waits for you to break in with GDB. + - Sets the clocking so that the SAMA5 is running at 528MHz. + - Configures DRAM, + - Loads and Intel HEX file into DRAM over the terminal port, + - Waits for you to break in with GDB (or optionally starts the + newly loaded program). At that point, you can set the PC and begin executing from SDRAM under debug control. See the section entitled "Creating and Using |