No up_en/disable_irq's
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3022 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
parent
a117c6bc8e
commit
50cea43ee4
@ -178,9 +178,6 @@ void up_irqinitialize(void)
|
||||
{
|
||||
int group;
|
||||
|
||||
/* Disable all interrupts */
|
||||
#warning "Missing logic"
|
||||
|
||||
/* Initialize the table that provides the value of the IPR register to
|
||||
* use to assign a group to different interrupt priorities.
|
||||
*/
|
||||
@ -218,45 +215,6 @@ void up_irqinitialize(void)
|
||||
#endif
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_disable_irq
|
||||
*
|
||||
* Description:
|
||||
* Disable the IRQ specified by 'irq'
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void up_disable_irq(int irq)
|
||||
{
|
||||
#warning "Missing logic"
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_enable_irq
|
||||
*
|
||||
* Description:
|
||||
* Enable the IRQ specified by 'irq'
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void up_enable_irq(int irq)
|
||||
{
|
||||
#warning "Missing logic"
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_maskack_irq
|
||||
*
|
||||
* Description:
|
||||
* Mask the IRQ and acknowledge it
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void up_maskack_irq(int irq)
|
||||
{
|
||||
up_disable_irq(irq);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_prioritize_irq
|
||||
*
|
||||
|
@ -102,7 +102,6 @@ void up_lowinit(void)
|
||||
/* Perform board-level initialization */
|
||||
|
||||
up_boardinitialize();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -403,20 +403,10 @@ static void up_shutdown(struct uart_dev_s *dev)
|
||||
static int up_attach(struct uart_dev_s *dev)
|
||||
{
|
||||
struct up_dev_s *priv = (struct up_dev_s*)dev->priv;
|
||||
int ret;
|
||||
|
||||
/* Attach and enable the IRQ */
|
||||
/* Attach the IRQ */
|
||||
|
||||
ret = irq_attach(priv->irq, up_interrupt);
|
||||
if (ret == OK)
|
||||
{
|
||||
/* Enable the interrupt (RX and TX interrupts are still disabled
|
||||
* in the USART
|
||||
*/
|
||||
|
||||
up_enable_irq(priv->irq);
|
||||
}
|
||||
return ret;
|
||||
return irq_attach(priv->irq, up_interrupt);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
@ -432,7 +422,7 @@ static int up_attach(struct uart_dev_s *dev)
|
||||
static void up_detach(struct uart_dev_s *dev)
|
||||
{
|
||||
struct up_dev_s *priv = (struct up_dev_s*)dev->priv;
|
||||
up_disable_irq(priv->irq);
|
||||
up_serialout(priv, AVR32_USART_IDR_OFFSET, 0xffffffff);
|
||||
irq_detach(priv->irq);
|
||||
}
|
||||
|
||||
|
@ -89,10 +89,6 @@ uint32_t *up_doirq(int irq, uint32_t *regs)
|
||||
DEBUGASSERT(current_regs == NULL);
|
||||
current_regs = regs;
|
||||
|
||||
/* Mask and acknowledge the interrupt */
|
||||
|
||||
up_maskack_irq(irq);
|
||||
|
||||
/* Deliver the IRQ */
|
||||
|
||||
irq_dispatch(irq, regs);
|
||||
@ -108,10 +104,6 @@ uint32_t *up_doirq(int irq, uint32_t *regs)
|
||||
/* Indicate that we are no long in an interrupt handler */
|
||||
|
||||
current_regs = NULL;
|
||||
|
||||
/* Unmask the last interrupt (global interrupts are still disabled) */
|
||||
|
||||
up_enable_irq(irq);
|
||||
#endif
|
||||
up_ledoff(LED_INIRQ);
|
||||
return regs;
|
||||
|
@ -134,12 +134,14 @@ __start:
|
||||
|
||||
/* Then jump to OS entry (will not return) */
|
||||
|
||||
rjmp os_start
|
||||
lddpc pc, .Los_start
|
||||
|
||||
.Lstackbase:
|
||||
.word _ebss+CONFIG_IDLETHREAD_STACKSIZE-4
|
||||
.Lvectortab:
|
||||
.word vectortab
|
||||
.Los_start:
|
||||
.word os_start
|
||||
.size __start, .-__start
|
||||
|
||||
/* This global variable is unsigned long g_heapbase and is
|
||||
|
@ -194,10 +194,6 @@ extern void lowconsole_init(void);
|
||||
|
||||
extern void up_timerinit(void);
|
||||
|
||||
/* Defined in chip/xxx_irq.c */
|
||||
|
||||
extern void up_maskack_irq(int irq);
|
||||
|
||||
/* Defined in configs/<board-name>/src/up_leds.c */
|
||||
|
||||
#ifdef CONFIG_ARCH_LEDS
|
||||
|
@ -52,6 +52,9 @@
|
||||
# CONFIG_DRAM_SIZE - Describes the installed DRAM.
|
||||
# CONFIG_DRAM_START - The start address of DRAM (physical)
|
||||
# CONFIG_DRAM_END - Last address+1 of installed RAM
|
||||
# CONFIG_ARCH_NOINTC - define if the architecture does not
|
||||
# support an interrupt controller or otherwise cannot support
|
||||
# APIs like up_enable_irq() and up_disable_irq().
|
||||
# CONFIG_ARCH_IRQPRIO - Define if MCU supports interrupt prioritization
|
||||
# CONFIG_ARCH_INTERRUPTSTACK - This architecture supports an interrupt
|
||||
# stack. If defined, this symbol is the size of the interrupt
|
||||
@ -80,6 +83,7 @@ CONFIG_BOARD_LOOPSPERMSEC=7982
|
||||
CONFIG_DRAM_SIZE=(32*1024)
|
||||
CONFIG_DRAM_START=0x10000000
|
||||
CONFIG_DRAM_END=(CONFIG_DRAM_START+CONFIG_DRAM_SIZE)
|
||||
CONFIG_ARCH_NOINTC=y
|
||||
CONFIG_ARCH_IRQPRIO=y
|
||||
CONFIG_ARCH_INTERRUPTSTACK=n
|
||||
CONFIG_ARCH_STACKDUMP=y
|
||||
|
@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
* sched/irq_attach.c
|
||||
*
|
||||
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007-2008, 2010 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
Loading…
Reference in New Issue
Block a user