diff --git a/ChangeLog b/ChangeLog index 85edb20c0b..075fa969e2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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. + diff --git a/arch/arm/src/arm/up_head.S b/arch/arm/src/arm/up_head.S index 6afdeeb174..7ed94bd9a6 100644 --- a/arch/arm/src/arm/up_head.S +++ b/arch/arm/src/arm/up_head.S @@ -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: diff --git a/arch/arm/src/imx/imx_boot.c b/arch/arm/src/imx/imx_boot.c index 9cd4d390ea..65a6951ce9 100644 --- a/arch/arm/src/imx/imx_boot.c +++ b/arch/arm/src/imx/imx_boot.c @@ -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 */ diff --git a/arch/arm/src/imx/imx_memorymap.h b/arch/arm/src/imx/imx_memorymap.h index 0b7603befb..7eafc908a5 100644 --- a/arch/arm/src/imx/imx_memorymap.h +++ b/arch/arm/src/imx/imx_memorymap.h @@ -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) diff --git a/drivers/mtd/rammtd.c b/drivers/mtd/rammtd.c index 707192d888..5bdfa50179 100644 --- a/drivers/mtd/rammtd.c +++ b/drivers/mtd/rammtd.c @@ -44,7 +44,9 @@ #include #include #include +#include +#include #include #include @@ -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"); diff --git a/fs/fat/fs_fat32.c b/fs/fat/fs_fat32.c index 25354e9365..2d880dabc9 100644 --- a/fs/fat/fs_fat32.c +++ b/fs/fat/fs_fat32.c @@ -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) { diff --git a/include/sys/stat.h b/include/sys/stat.h index ec3715dc8b..bb166e7e25 100644 --- a/include/sys/stat.h +++ b/include/sys/stat.h @@ -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 */