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

View File

@ -1706,9 +1706,13 @@
* configs/lpcxpresso-lpc1668/nx: Add a NX graphics configuration for the LPCXPRESO
board.
* 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.
* drivers/mtd/rammtd.c: Added a RAM based MTD driver. This RAM driver simulates
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.

View File

@ -177,7 +177,7 @@
* to the base address of the section containing both.
*/
#ifndef CONFIG_ARCH_LOWVECTORS
#ifdef CONFIG_ARCH_LOWVECTORS
.macro mksection, section, pgtable
bic \section, \pgtable, #0x000ff000
.endm
@ -306,7 +306,6 @@ __start:
#endif /* CONFIG_PAGING */
#endif /* CONFIG_ARCH_ROMPGTABLE */
/* The following logic will set up the ARM920/ARM926 for normal operation.
*
* Here we expect to have:

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)
{
uint32_t *pgtable = (uint32_t*)PGTABLE_VBASE;
uint32_t *pgtable = (uint32_t*)PGTABLE_BASE_VADDR;
uint32_t index = vaddr >> 20;
/* Save the page table entry */

View File

@ -233,19 +233,19 @@
* We will reuse this memory for coarse page tables as follows:
*/
#define PGTABLE_PBASE IMX_SDRAM0_PSECTION
#define PGTABLE_SDRAM_PBASE PGTABLE_PBASE
#define PGTABLE_COARSE_PBASE (PGTABLE_PBASE+0x00000800)
#define PGTABLE_COARSE_PEND (PGTABLE_PBASE+0x00003000)
#define PTTABLE_PERIPHERALS_PBASE (PGTABLE_PBASE+0x00003000)
#define PGTABLE_PEND (PGTABLE_PBASE+0x00004000)
#define PGTABLE_BASE_PADDR IMX_SDRAM0_PSECTION
#define PGTABLE_SDRAM_PADDR PGTABLE_BASE_PADDR
#define PGTABLE_COARSE_PBASE (PGTABLE_BASE_PADDR+0x00000800)
#define PGTABLE_COARSE_PEND (PGTABLE_BASE_PADDR+0x00003000)
#define PTTABLE_PERIPHERALS_PBASE (PGTABLE_BASE_PADDR+0x00003000)
#define PGTABLE_PEND (PGTABLE_BASE_PADDR+0x00004000)
#define PGTABLE_VBASE IMX_SDRAM_VSECTION
#define PGTABLE_SDRAM_VBASE PGTABLE_VBASE
#define PGTABLE_COARSE_VBASE (PGTABLE_VBASE+0x00000800)
#define PGTABLE_COARSE_VEND (PGTABLE_VBASE+0x00003000)
#define PTTABLE_PERIPHERALS_VBASE (PGTABLE_VBASE+0x00003000)
#define PGTABLE_VEND (PGTABLE_VBASE+0x00004000)
#define PGTABLE_BASE_VADDR IMX_SDRAM_VSECTION
#define PGTABLE_SDRAM_VADDR PGTABLE_BASE_VADDR
#define PGTABLE_COARSE_VBASE (PGTABLE_BASE_VADDR+0x00000800)
#define PGTABLE_COARSE_VEND (PGTABLE_BASE_VADDR+0x00003000)
#define PTTABLE_PERIPHERALS_VBASE (PGTABLE_BASE_VADDR+0x00003000)
#define PGTABLE_VEND (PGTABLE_BASE_VADDR+0x00004000)
#define PGTABLE_COARSE_TABLE_SIZE (4*256)
#define PGTABLE_COARSE_ALLOC (PGTABLE_COARSE_VEND-PGTABLE_COARSE_VBASE)

View File

@ -44,7 +44,9 @@
#include <string.h>
#include <assert.h>
#include <errno.h>
#include <debug.h>
#include <nuttx/kmalloc.h>
#include <nuttx/ioctl.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 */
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)
{
fdbg("Failed to allocate the RAM MTD state structure\n");

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))
{
/* Already exists -- can't create it exclusively */
ret = -EEXIST;
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 */
}
else if (ret == -ENOENT)
{

View File

@ -105,7 +105,7 @@ struct stat
mode_t st_mode; /* File type, atributes, and access mode bits */
off_t st_size; /* Size of file/directory, in bytes */
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_mtime; /* Time of last modification */
time_t st_ctime; /* Time of last status change */