summaryrefslogtreecommitdiff
path: root/nuttx/arch
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2013-03-08 22:01:50 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2013-03-08 22:01:50 +0000
commitf2c129b281fc8fa30eccb9b34df534f954ee3c47 (patch)
treea5ff5a1a0415f7fabf66180ccb432243740f4d74 /nuttx/arch
parent5e160bcf59441ce40088ca089cbeb4461a0b0d6a (diff)
downloadpx4-nuttx-f2c129b281fc8fa30eccb9b34df534f954ee3c47.tar.gz
px4-nuttx-f2c129b281fc8fa30eccb9b34df534f954ee3c47.tar.bz2
px4-nuttx-f2c129b281fc8fa30eccb9b34df534f954ee3c47.zip
up_addregion should use kmm_addregion; move garbage kmm*.c file to mm/. for now
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5721 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch')
-rw-r--r--nuttx/arch/8051/src/up_allocateheap.c9
-rw-r--r--nuttx/arch/arm/src/calypso/calypso_heap.c5
-rw-r--r--nuttx/arch/arm/src/imx/imx_allocateheap.c8
-rw-r--r--nuttx/arch/arm/src/lpc17xx/lpc17_allocateheap.c4
-rw-r--r--nuttx/arch/arm/src/lpc31xx/lpc31_allocateheap.c9
-rw-r--r--nuttx/arch/arm/src/lpc43xx/lpc43_allocateheap.c12
-rw-r--r--nuttx/arch/arm/src/sam3u/sam3u_allocateheap.c2
-rw-r--r--nuttx/arch/arm/src/stm32/stm32_allocateheap.c8
-rw-r--r--nuttx/arch/z16/src/common/up_allocateheap.c7
-rw-r--r--nuttx/arch/z80/src/common/up_allocateheap.c7
10 files changed, 38 insertions, 33 deletions
diff --git a/nuttx/arch/8051/src/up_allocateheap.c b/nuttx/arch/8051/src/up_allocateheap.c
index b797b4420..f2238507a 100644
--- a/nuttx/arch/8051/src/up_allocateheap.c
+++ b/nuttx/arch/8051/src/up_allocateheap.c
@@ -1,7 +1,7 @@
/************************************************************
* up_allocateheap.c
*
- * Copyright (C) 2007 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2007, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -38,11 +38,14 @@
************************************************************/
#include <nuttx/config.h>
+
#include <sys/types.h>
#include <sched.h>
#include <debug.h>
+
#include <nuttx/arch.h>
-#include <nuttx/mm.h>
+#include <nuttx/kmalloc.h>
+
#include "os_internal.h"
#include "up_internal.h"
#include "up_mem.h"
@@ -84,6 +87,6 @@ void up_allocate_heap(FAR void **heap_start, size_t *heap_size)
#if CONFIG_MM_REGIONS > 1
void up_addregion(void)
{
- mm_addregion((FAR void*)UP_HEAP2_BASE, UP_HEAP2_END - UP_HEAP2_BASE);
+ kmm_addregion((FAR void*)UP_HEAP2_BASE, UP_HEAP2_END - UP_HEAP2_BASE);
}
#endif
diff --git a/nuttx/arch/arm/src/calypso/calypso_heap.c b/nuttx/arch/arm/src/calypso/calypso_heap.c
index 095fd1a5a..994b10059 100644
--- a/nuttx/arch/arm/src/calypso/calypso_heap.c
+++ b/nuttx/arch/arm/src/calypso/calypso_heap.c
@@ -42,7 +42,7 @@
****************************************************************************/
#include <nuttx/config.h>
-#include <nuttx/mm.h>
+#include <nuttx/kmalloc.h>
#include <sys/types.h>
#include <debug.h>
@@ -96,7 +96,6 @@ void up_addregion(void)
/* Configure the RHEA bridge with some sane default values */
calypso_rhea_cfg(0, 0, 0xff, 0, 1, 0, 0);
- mm_addregion((FAR void*)CONFIG_HEAP2_BASE, CONFIG_HEAP2_SIZE);
-
+ kmm_addregion((FAR void*)CONFIG_HEAP2_BASE, CONFIG_HEAP2_SIZE);
}
#endif
diff --git a/nuttx/arch/arm/src/imx/imx_allocateheap.c b/nuttx/arch/arm/src/imx/imx_allocateheap.c
index 4831c8c8b..3279ddbd9 100644
--- a/nuttx/arch/arm/src/imx/imx_allocateheap.c
+++ b/nuttx/arch/arm/src/imx/imx_allocateheap.c
@@ -2,7 +2,7 @@
* arch/arm/src/imx/imx_allocateheap.c
* arch/arm/src/chip/imx_allocateheap.c
*
- * Copyright (C) 2009 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2009, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -44,7 +44,7 @@
#include <stdint.h>
#include <debug.h>
-#include <nuttx/mm.h>
+#include <nuttx/kmalloc.h>
#include <nuttx/arch.h>
#include <arch/board/board.h>
@@ -105,14 +105,14 @@ void up_addregion(void)
# if (CONFIG_DRAM_NUTTXENTRY & 0xffff0000) != CONFIG_DRAM_VSTART
uint32_t start = CONFIG_DRAM_VSTART + 0x1000;
uint32_t end = (CONFIG_DRAM_NUTTXENTRY & 0xffff0000);
- mm_addregion((FAR void*)start, end - start);
+ kmm_addregion((FAR void*)start, end - start);
# endif
#endif
/* Check for any additional memory regions */
#if defined(CONFIG_HEAP2_BASE) && defined(CONFIG_HEAP2_SIZE)
- mm_addregion((FAR void*)CONFIG_HEAP2_BASE, CONFIG_HEAP2_SIZE);
+ kmm_addregion((FAR void*)CONFIG_HEAP2_BASE, CONFIG_HEAP2_SIZE);
#endif
}
#endif
diff --git a/nuttx/arch/arm/src/lpc17xx/lpc17_allocateheap.c b/nuttx/arch/arm/src/lpc17xx/lpc17_allocateheap.c
index 5da6ffa22..b09220a53 100644
--- a/nuttx/arch/arm/src/lpc17xx/lpc17_allocateheap.c
+++ b/nuttx/arch/arm/src/lpc17xx/lpc17_allocateheap.c
@@ -1,7 +1,7 @@
/****************************************************************************
* arch/arm/src/lpc17xx/lpc17_allocateheap.c
*
- * Copyright (C) 2010-2011 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2010-2011, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -224,7 +224,7 @@ void up_addregion(void)
/* Yes... Add the AHB SRAM heap region. */
- mm_addregion((FAR void*)LPC17_AHB_HEAPBASE, LPC17_AHB_HEAPSIZE);
+ kmm_addregion((FAR void*)LPC17_AHB_HEAPBASE, LPC17_AHB_HEAPSIZE);
#endif
}
#endif
diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_allocateheap.c b/nuttx/arch/arm/src/lpc31xx/lpc31_allocateheap.c
index 58772a630..204fdf6c1 100644
--- a/nuttx/arch/arm/src/lpc31xx/lpc31_allocateheap.c
+++ b/nuttx/arch/arm/src/lpc31xx/lpc31_allocateheap.c
@@ -1,7 +1,7 @@
/************************************************************************
* arch/arm/src/lpc31xx/lpc31_allocateheap.c
*
- * Copyright (C) 2009-2010 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2009-2010, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -43,6 +43,7 @@
#include <debug.h>
#include <nuttx/arch.h>
+#include <nuttx/kmalloc.h>
#include <arch/board/board.h>
#include "arm.h"
@@ -192,15 +193,15 @@ void up_allocate_heap(FAR void **heap_start, size_t *heap_size)
void up_addregion(void)
{
#if defined(CONFIG_ARCH_EXTSRAM0) && defined(CONFIG_ARCH_EXTSRAM0HEAP)
- mm_addregion((FAR void*)LPC31_EXTSRAM0_VSECTION, CONFIG_ARCH_EXTSRAM0SIZE);
+ kmm_addregion((FAR void*)LPC31_EXTSRAM0_VSECTION, CONFIG_ARCH_EXTSRAM0SIZE);
#endif
#if defined(CONFIG_ARCH_EXTSRAM1) && defined(CONFIG_ARCH_EXTSRAM1HEAP)
- mm_addregion((FAR void*)LPC31_EXTSRAM1_VSECTION, CONFIG_ARCH_EXTSRAM1SIZE);
+ kmm_addregion((FAR void*)LPC31_EXTSRAM1_VSECTION, CONFIG_ARCH_EXTSRAM1SIZE);
#endif
#if defined(CONFIG_ARCH_EXTDRAM) && defined(CONFIG_ARCH_EXTDRAMHEAP)
- mm_addregion((FAR void*)LPC31_EXTSDRAM_VSECTION, CONFIG_ARCH_EXTDRAMSIZE);
+ kmm_addregion((FAR void*)LPC31_EXTSDRAM_VSECTION, CONFIG_ARCH_EXTDRAMSIZE);
#endif
}
#endif
diff --git a/nuttx/arch/arm/src/lpc43xx/lpc43_allocateheap.c b/nuttx/arch/arm/src/lpc43xx/lpc43_allocateheap.c
index 7912f6c6e..ef96bcb0c 100644
--- a/nuttx/arch/arm/src/lpc43xx/lpc43_allocateheap.c
+++ b/nuttx/arch/arm/src/lpc43xx/lpc43_allocateheap.c
@@ -1,7 +1,7 @@
/****************************************************************************
* arch/arm/src/lpc43xx/lpc43_allocateheap.c
*
- * Copyright (C) 2012 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2012-2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -43,7 +43,7 @@
#include <debug.h>
#include <nuttx/arch.h>
-#include <nuttx/mm.h>
+#include <nuttx/kmalloc.h>
#include <arch/board/board.h>
#include "chip.h"
@@ -259,7 +259,7 @@ void up_addregion(void)
#if CONFIG_MM_REGIONS > 1
/* Add the next SRAM region (which should exist) */
- mm_addregion((FAR void*)MM_REGION2_BASE, MM_REGION2_SIZE);
+ kmm_addregion((FAR void*)MM_REGION2_BASE, MM_REGION2_SIZE);
#ifdef MM_REGION3_BASE
/* Add the third SRAM region (which will not exist in configuration B) */
@@ -267,12 +267,12 @@ void up_addregion(void)
#if CONFIG_MM_REGIONS > 2
/* Add the third SRAM region (which may not exist) */
- mm_addregion((FAR void*)MM_REGION3_BASE, MM_REGION3_SIZE);
+ kmm_addregion((FAR void*)MM_REGION3_BASE, MM_REGION3_SIZE);
#if CONFIG_MM_REGIONS > 3 && defined(MM_DMAHEAP_BASE)
/* Add the DMA region (which may not be available) */
- mm_addregion((FAR void*)MM_DMAHEAP_BASE, MM_DMAHEAP_SIZE);
+ kmm_addregion((FAR void*)MM_DMAHEAP_BASE, MM_DMAHEAP_SIZE);
#endif /* CONFIG_MM_REGIONS > 3 && defined(MM_DMAHEAP_BASE) */
#endif /* CONFIG_MM_REGIONS > 2 */
@@ -281,7 +281,7 @@ void up_addregion(void)
#if CONFIG_MM_REGIONS > 2 && defined(MM_DMAHEAP_BASE)
/* Add the DMA region (which may not be available) */
- mm_addregion((FAR void*)MM_DMAHEAP_BASE, MM_DMAHEAP_SIZE);
+ kmm_addregion((FAR void*)MM_DMAHEAP_BASE, MM_DMAHEAP_SIZE);
#endif /* CONFIG_MM_REGIONS > 3 && defined(MM_DMAHEAP_BASE) */
#endif /* MM_REGION3_BASE */
diff --git a/nuttx/arch/arm/src/sam3u/sam3u_allocateheap.c b/nuttx/arch/arm/src/sam3u/sam3u_allocateheap.c
index 1f4b5fdd2..a5236e74d 100644
--- a/nuttx/arch/arm/src/sam3u/sam3u_allocateheap.c
+++ b/nuttx/arch/arm/src/sam3u/sam3u_allocateheap.c
@@ -1,7 +1,7 @@
/****************************************************************************
* arch/arm/src/common/sam3u_allocateheap.c
*
- * Copyright (C) 2010 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2010, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
diff --git a/nuttx/arch/arm/src/stm32/stm32_allocateheap.c b/nuttx/arch/arm/src/stm32/stm32_allocateheap.c
index e4c21ccdb..b70a29b44 100644
--- a/nuttx/arch/arm/src/stm32/stm32_allocateheap.c
+++ b/nuttx/arch/arm/src/stm32/stm32_allocateheap.c
@@ -1,7 +1,7 @@
/****************************************************************************
* arch/arm/src/stm32/up_allocateheap.c
*
- * Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2011-2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -43,7 +43,7 @@
#include <debug.h>
#include <nuttx/arch.h>
-#include <nuttx/mm.h>
+#include <nuttx/kmalloc.h>
#include <arch/board/board.h>
@@ -385,13 +385,13 @@ void up_addregion(void)
/* Add the STM32F20xxx/STM32F40xxx CCM SRAM heap region. */
#ifndef CONFIG_STM32_CCMEXCLUDE
- mm_addregion((FAR void*)SRAM2_START, SRAM2_END-SRAM2_START);
+ kmm_addregion((FAR void*)SRAM2_START, SRAM2_END-SRAM2_START);
#endif
/* Add the external FSMC SRAM heap region. */
#ifdef CONFIG_STM32_FSMC_SRAM
- mm_addregion((FAR void*)CONFIG_HEAP2_BASE, CONFIG_HEAP2_SIZE);
+ kmm_addregion((FAR void*)CONFIG_HEAP2_BASE, CONFIG_HEAP2_SIZE);
#endif
}
#endif
diff --git a/nuttx/arch/z16/src/common/up_allocateheap.c b/nuttx/arch/z16/src/common/up_allocateheap.c
index 72686b751..62ea870e9 100644
--- a/nuttx/arch/z16/src/common/up_allocateheap.c
+++ b/nuttx/arch/z16/src/common/up_allocateheap.c
@@ -1,7 +1,7 @@
/****************************************************************************
* common/up_allocateheap.c
*
- * Copyright (C) 2008 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2008, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -41,8 +41,9 @@
#include <sys/types.h>
#include <debug.h>
+
#include <nuttx/arch.h>
-#include <nuttx/mm.h>
+#include <nuttx/kmalloc.h>
#include <arch/board/board.h>
#include "chip/chip.h"
@@ -107,6 +108,6 @@ void up_allocate_heap(FAR void **heap_start, size_t *heap_size)
#if CONFIG_MM_REGIONS > 1
void up_addregion(void)
{
- mm_addregion((FAR void*)CONFIG_HEAP2_BASE, CONFIG_HEAP2_SIZE);
+ kmm_addregion((FAR void*)CONFIG_HEAP2_BASE, CONFIG_HEAP2_SIZE);
}
#endif
diff --git a/nuttx/arch/z80/src/common/up_allocateheap.c b/nuttx/arch/z80/src/common/up_allocateheap.c
index 94b06e375..734d678e7 100644
--- a/nuttx/arch/z80/src/common/up_allocateheap.c
+++ b/nuttx/arch/z80/src/common/up_allocateheap.c
@@ -1,7 +1,7 @@
/****************************************************************************
* common/up_allocateheap.c
*
- * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2007, 2008, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -41,8 +41,9 @@
#include <sys/types.h>
#include <debug.h>
+
#include <nuttx/arch.h>
-#include <nuttx/mm.h>
+#include <nuttx/kmalloc.h>
#include "up_arch.h"
#include "up_internal.h"
@@ -109,6 +110,6 @@ void up_allocate_heap(FAR void **heap_start, size_t *heap_size)
#if CONFIG_MM_REGIONS > 1
void up_addregion(void)
{
- mm_addregion((FAR void*)CONFIG_HEAP2_BASE, CONFIG_HEAP2_SIZE);
+ kmm_addregion((FAR void*)CONFIG_HEAP2_BASE, CONFIG_HEAP2_SIZE);
}
#endif