summaryrefslogtreecommitdiff
path: root/nuttx/arch/sh
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-08-06 16:26:01 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-08-06 16:26:01 -0600
commit893d3a9e60609f17026d1eeb774ab993ea393c42 (patch)
treeae0789b7eadbdac15f2b63c67663dd42df397e49 /nuttx/arch/sh
parente42e89d84e13db8feda4056b3e3499a14b065d47 (diff)
downloadpx4-nuttx-893d3a9e60609f17026d1eeb774ab993ea393c42.tar.gz
px4-nuttx-893d3a9e60609f17026d1eeb774ab993ea393c42.tar.bz2
px4-nuttx-893d3a9e60609f17026d1eeb774ab993ea393c42.zip
Rename up_timerinit() to up_timer_initailize(); Add prototypes for candidate interfaces for the tickless OS; Don't build existing timer initialization logic if CONFIG_SCHED_TICKLESS is defined.
Diffstat (limited to 'nuttx/arch/sh')
-rw-r--r--nuttx/arch/sh/src/common/up_initialize.c2
-rw-r--r--nuttx/arch/sh/src/common/up_internal.h2
-rw-r--r--nuttx/arch/sh/src/m16c/Make.defs20
-rw-r--r--nuttx/arch/sh/src/m16c/m16c_timerisr.c4
-rw-r--r--nuttx/arch/sh/src/sh1/Make.defs30
-rw-r--r--nuttx/arch/sh/src/sh1/sh1_timerisr.c4
6 files changed, 35 insertions, 27 deletions
diff --git a/nuttx/arch/sh/src/common/up_initialize.c b/nuttx/arch/sh/src/common/up_initialize.c
index 061923016..2c91f6f30 100644
--- a/nuttx/arch/sh/src/common/up_initialize.c
+++ b/nuttx/arch/sh/src/common/up_initialize.c
@@ -127,7 +127,7 @@ void up_initialize(void)
/* Initialize the system timer interrupt */
#if !defined(CONFIG_SUPPRESS_INTERRUPTS) && !defined(CONFIG_SUPPRESS_TIMER_INTS)
- up_timerinit();
+ up_timer_initialize();
#endif
/* Register devices */
diff --git a/nuttx/arch/sh/src/common/up_internal.h b/nuttx/arch/sh/src/common/up_internal.h
index 9734ec51a..180f6cebe 100644
--- a/nuttx/arch/sh/src/common/up_internal.h
+++ b/nuttx/arch/sh/src/common/up_internal.h
@@ -206,7 +206,7 @@ extern void up_wdtinit(void);
/* Defined in up_timerisr.c */
-extern void up_timerinit(void);
+extern void up_timer_initialize(void);
/* Defined in chip-specific logic if CONFIG_ARCH_NOINTC is not set */
diff --git a/nuttx/arch/sh/src/m16c/Make.defs b/nuttx/arch/sh/src/m16c/Make.defs
index be8f160ea..ae5d34be6 100644
--- a/nuttx/arch/sh/src/m16c/Make.defs
+++ b/nuttx/arch/sh/src/m16c/Make.defs
@@ -1,7 +1,7 @@
##############################################################################
# arch/sh/src/m16c/Make.defs
#
-# Copyright (C) 2009 Gregory Nutt. All rights reserved.
+# Copyright (C) 2009, 2014 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
@@ -33,21 +33,25 @@
#
##############################################################################
-HEAD_ASRC = m16c_head.S
+HEAD_ASRC = m16c_head.S
-CMN_ASRCS =
-CMN_CSRCS = up_allocateheap.c up_assert.c up_blocktask.c \
+CMN_ASRCS =
+CMN_CSRCS = up_allocateheap.c up_assert.c up_blocktask.c \
up_createstack.c up_doirq.c up_exit.c up_idle.c up_initialize.c \
up_interruptcontext.c up_lowputs.c up_mdelay.c up_puts.c \
up_releasepending.c up_releasestack.c up_reprioritizertr.c \
up_udelay.c up_unblocktask.c up_usestack.c
-CHIP_ASRCS = m16c_vectors.S
-CHIP_CSRCS = m16c_initialstate.c m16c_copystate.c m16c_lowputc.c m16c_irq.c \
- m16c_timerisr.c m16c_serial.c m16c_dumpstate.c
+CHIP_ASRCS = m16c_vectors.S
+CHIP_CSRCS = m16c_initialstate.c m16c_copystate.c m16c_lowputc.c m16c_irq.c \
+ m16c_serial.c m16c_dumpstate.c
+
+ifneq ($(CONFIG_SCHED_TICKLESS),y)
+CHIP_CSRCS += m16c_timerisr.c
+endif
ifneq ($(CONFIG_DISABLE_SIGNALS),y)
-CHIP_CSRCS += m16c_schedulesigaction.c m16c_sigdeliver.c
+CHIP_CSRCS += m16c_schedulesigaction.c m16c_sigdeliver.c
endif
diff --git a/nuttx/arch/sh/src/m16c/m16c_timerisr.c b/nuttx/arch/sh/src/m16c/m16c_timerisr.c
index dfc7f4d91..04d4a619b 100644
--- a/nuttx/arch/sh/src/m16c/m16c_timerisr.c
+++ b/nuttx/arch/sh/src/m16c/m16c_timerisr.c
@@ -136,7 +136,7 @@ int up_timerisr(int irq, uint32_t *regs)
}
/****************************************************************************
- * Function: up_timerinit
+ * Function: up_timer_initialize
*
* Description:
* This function is called during start-up to initialize
@@ -144,7 +144,7 @@ int up_timerisr(int irq, uint32_t *regs)
*
****************************************************************************/
-void up_timerinit(void)
+void up_timer_initialize(void)
{
/* Make sure that no timers are running and that all timer interrupts are
* disabled.
diff --git a/nuttx/arch/sh/src/sh1/Make.defs b/nuttx/arch/sh/src/sh1/Make.defs
index ab96a3657..28a3150d5 100644
--- a/nuttx/arch/sh/src/sh1/Make.defs
+++ b/nuttx/arch/sh/src/sh1/Make.defs
@@ -1,7 +1,7 @@
##############################################################################
# arch/sh/src/sh1/Make.defs
#
-# Copyright (C) 2008, 2009 Gregory Nutt. All rights reserved.
+# Copyright (C) 2008, 2009, 2014 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
@@ -33,24 +33,28 @@
#
##############################################################################
-HEAD_ASRC = sh1_head.S
+HEAD_ASRC = sh1_head.S
-CMN_ASRCS =
-CMN_CSRCS = up_allocateheap.c up_assert.c up_blocktask.c \
- up_createstack.c up_doirq.c up_exit.c up_idle.c up_initialize.c \
- up_initialstate.c up_interruptcontext.c up_lowputs.c \
- up_mdelay.c up_puts.c up_releasepending.c up_releasestack.c \
- up_reprioritizertr.c up_udelay.c up_unblocktask.c up_usestack.c
+CMN_ASRCS =
+CMN_CSRCS = up_allocateheap.c up_assert.c up_blocktask.c
+CMN_CSRCS += up_createstack.c up_doirq.c up_exit.c up_idle.c up_initialize.c
+CMN_CSRCS += up_initialstate.c up_interruptcontext.c up_lowputs.c
+CMN_CSRCS += up_mdelay.c up_puts.c up_releasepending.c up_releasestack.c
+CMN_CSRCS += up_reprioritizertr.c up_udelay.c up_unblocktask.c up_usestack.c
-CHIP_ASRCS = sh1_vector.S sh1_saveusercontext.S
-CHIP_CSRCS = sh1_lowputc.c sh1_irq.c sh1_timerisr.c sh1_serial.c \
- sh1_initialstate.c sh1_copystate.c sh1_dumpstate.c
+CHIP_ASRCS = sh1_vector.S sh1_saveusercontext.S
+CHIP_CSRCS = sh1_lowputc.c sh1_irq.c sh1_serial.c sh1_initialstate.c
+CHIP_CSRCS += sh1_copystate.c sh1_dumpstate.c
+
+ifneq ($(CONFIG_SCHED_TICKLESS),y)
+CHIP_CSRCS += sh1_timerisr.c
+endif
ifneq ($(CONFIG_DISABLE_SIGNALS),y)
-CMN_CSRCS += sh1_schedulesigaction.c sh1_sigdeliver.c
+CMN_CSRCS += sh1_schedulesigaction.c sh1_sigdeliver.c
endif
ifeq ($(CONFIG_USBDEV),y)
-CHIP_CSRCS +=
+CHIP_CSRCS +=
endif
diff --git a/nuttx/arch/sh/src/sh1/sh1_timerisr.c b/nuttx/arch/sh/src/sh1/sh1_timerisr.c
index 803829058..fe0ab89c5 100644
--- a/nuttx/arch/sh/src/sh1/sh1_timerisr.c
+++ b/nuttx/arch/sh/src/sh1/sh1_timerisr.c
@@ -151,7 +151,7 @@ int up_timerisr(int irq, uint32_t *regs)
}
/****************************************************************************
- * Function: up_timerinit
+ * Function: up_timer_initialize
*
* Description:
* This function is called during start-up to initialize
@@ -159,7 +159,7 @@ int up_timerisr(int irq, uint32_t *regs)
*
****************************************************************************/
-void up_timerinit(void)
+void up_timer_initialize(void)
{
uint8_t reg8;