Fixes to get clean i.MXADS build

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3533 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo
2011-04-26 23:11:02 +00:00
parent 4e04155ad1
commit 52852aca58
7 changed files with 24 additions and 19 deletions
+5 -1
View File
@@ -1706,9 +1706,13 @@
* configs/lpcxpresso-lpc1668/nx: Add a NX graphics configuration for the LPCXPRESO * configs/lpcxpresso-lpc1668/nx: Add a NX graphics configuration for the LPCXPRESO
board. board.
* graphics/nxglib/nxglib_nonintersecting.c: Fix some single bit errors in * graphics/nxglib/nxglib_nonintersecting.c: Fix some single bit errors in
calculation of non-intersecting regions. This was causing an anomoaly calculation of non-intersecting regions. This was causing an anomaly
in examples/nx in column 0. in examples/nx in column 0.
* drivers/mtd/rammtd.c: Added a RAM based MTD driver. This RAM driver simulates * drivers/mtd/rammtd.c: Added a RAM based MTD driver. This RAM driver simulates
FLASH and is useful for testing purposes. FLASH and is useful for testing purposes.
* arch/arm/src/arm/up_head.S: Fix backward conditional compilation. This cause
the configs/mx1ads configuration to fail to build but does not appear to affect
any other ARM9 build.
+1 -2
View File
@@ -177,7 +177,7 @@
* to the base address of the section containing both. * to the base address of the section containing both.
*/ */
#ifndef CONFIG_ARCH_LOWVECTORS #ifdef CONFIG_ARCH_LOWVECTORS
.macro mksection, section, pgtable .macro mksection, section, pgtable
bic \section, \pgtable, #0x000ff000 bic \section, \pgtable, #0x000ff000
.endm .endm
@@ -306,7 +306,6 @@ __start:
#endif /* CONFIG_PAGING */ #endif /* CONFIG_PAGING */
#endif /* CONFIG_ARCH_ROMPGTABLE */ #endif /* CONFIG_ARCH_ROMPGTABLE */
/* The following logic will set up the ARM920/ARM926 for normal operation. /* The following logic will set up the ARM920/ARM926 for normal operation.
* *
* Here we expect to have: * Here we expect to have:
+1 -1
View File
@@ -117,7 +117,7 @@ extern void imx_boardinitialize(void);
static inline void up_setlevel1entry(uint32_t paddr, uint32_t vaddr, uint32_t mmuflags) static inline void up_setlevel1entry(uint32_t paddr, uint32_t vaddr, uint32_t mmuflags)
{ {
uint32_t *pgtable = (uint32_t*)PGTABLE_VBASE; uint32_t *pgtable = (uint32_t*)PGTABLE_BASE_VADDR;
uint32_t index = vaddr >> 20; uint32_t index = vaddr >> 20;
/* Save the page table entry */ /* Save the page table entry */
+12 -12
View File
@@ -233,19 +233,19 @@
* We will reuse this memory for coarse page tables as follows: * We will reuse this memory for coarse page tables as follows:
*/ */
#define PGTABLE_PBASE IMX_SDRAM0_PSECTION #define PGTABLE_BASE_PADDR IMX_SDRAM0_PSECTION
#define PGTABLE_SDRAM_PBASE PGTABLE_PBASE #define PGTABLE_SDRAM_PADDR PGTABLE_BASE_PADDR
#define PGTABLE_COARSE_PBASE (PGTABLE_PBASE+0x00000800) #define PGTABLE_COARSE_PBASE (PGTABLE_BASE_PADDR+0x00000800)
#define PGTABLE_COARSE_PEND (PGTABLE_PBASE+0x00003000) #define PGTABLE_COARSE_PEND (PGTABLE_BASE_PADDR+0x00003000)
#define PTTABLE_PERIPHERALS_PBASE (PGTABLE_PBASE+0x00003000) #define PTTABLE_PERIPHERALS_PBASE (PGTABLE_BASE_PADDR+0x00003000)
#define PGTABLE_PEND (PGTABLE_PBASE+0x00004000) #define PGTABLE_PEND (PGTABLE_BASE_PADDR+0x00004000)
#define PGTABLE_VBASE IMX_SDRAM_VSECTION #define PGTABLE_BASE_VADDR IMX_SDRAM_VSECTION
#define PGTABLE_SDRAM_VBASE PGTABLE_VBASE #define PGTABLE_SDRAM_VADDR PGTABLE_BASE_VADDR
#define PGTABLE_COARSE_VBASE (PGTABLE_VBASE+0x00000800) #define PGTABLE_COARSE_VBASE (PGTABLE_BASE_VADDR+0x00000800)
#define PGTABLE_COARSE_VEND (PGTABLE_VBASE+0x00003000) #define PGTABLE_COARSE_VEND (PGTABLE_BASE_VADDR+0x00003000)
#define PTTABLE_PERIPHERALS_VBASE (PGTABLE_VBASE+0x00003000) #define PTTABLE_PERIPHERALS_VBASE (PGTABLE_BASE_VADDR+0x00003000)
#define PGTABLE_VEND (PGTABLE_VBASE+0x00004000) #define PGTABLE_VEND (PGTABLE_BASE_VADDR+0x00004000)
#define PGTABLE_COARSE_TABLE_SIZE (4*256) #define PGTABLE_COARSE_TABLE_SIZE (4*256)
#define PGTABLE_COARSE_ALLOC (PGTABLE_COARSE_VEND-PGTABLE_COARSE_VBASE) #define PGTABLE_COARSE_ALLOC (PGTABLE_COARSE_VEND-PGTABLE_COARSE_VBASE)
+3 -1
View File
@@ -44,7 +44,9 @@
#include <string.h> #include <string.h>
#include <assert.h> #include <assert.h>
#include <errno.h> #include <errno.h>
#include <debug.h>
#include <nuttx/kmalloc.h>
#include <nuttx/ioctl.h> #include <nuttx/ioctl.h>
#include <nuttx/mtd.h> #include <nuttx/mtd.h>
@@ -316,7 +318,7 @@ FAR struct mtd_dev_s *rammtd_initialize(FAR uint8_t *start, size_t size)
/* Create an instance of the RAM MTD device state structure */ /* Create an instance of the RAM MTD device state structure */
priv = (FAR struct ram_dev_s *)kzmalloc(sizeof(struct ram_dev_s)); priv = (FAR struct ram_dev_s *)kmalloc(sizeof(struct ram_dev_s));
if (!priv) if (!priv)
{ {
fdbg("Failed to allocate the RAM MTD state structure\n"); fdbg("Failed to allocate the RAM MTD state structure\n");
+1 -1
View File
@@ -216,6 +216,7 @@ static int fat_open(FAR struct file *filep, const char *relpath,
if ((oflags & (O_CREAT|O_EXCL)) == (O_CREAT|O_EXCL)) if ((oflags & (O_CREAT|O_EXCL)) == (O_CREAT|O_EXCL))
{ {
/* Already exists -- can't create it exclusively */ /* Already exists -- can't create it exclusively */
ret = -EEXIST; ret = -EEXIST;
goto errout_with_semaphore; goto errout_with_semaphore;
} }
@@ -251,7 +252,6 @@ static int fat_open(FAR struct file *filep, const char *relpath,
} }
/* fall through to finish the file open operations */ /* fall through to finish the file open operations */
} }
else if (ret == -ENOENT) else if (ret == -ENOENT)
{ {
+1 -1
View File
@@ -105,7 +105,7 @@ struct stat
mode_t st_mode; /* File type, atributes, and access mode bits */ mode_t st_mode; /* File type, atributes, and access mode bits */
off_t st_size; /* Size of file/directory, in bytes */ off_t st_size; /* Size of file/directory, in bytes */
blksize_t st_blksize; /* Blocksize used for filesystem I/O */ blksize_t st_blksize; /* Blocksize used for filesystem I/O */
blkcnt_t st_blocks; /* Number of blocks allocated*/ blkcnt_t st_blocks; /* Number of blocks allocated */
time_t st_atime; /* Time of last access */ time_t st_atime; /* Time of last access */
time_t st_mtime; /* Time of last modification */ time_t st_mtime; /* Time of last modification */
time_t st_ctime; /* Time of last status change */ time_t st_ctime; /* Time of last status change */