Merge branch 'master' of github.com:apache/incubator-nuttx
This commit is contained in:
commit
c5090d38cc
@ -179,7 +179,6 @@
|
||||
#define STM32_IRQ_MDIOS (STM32_IRQ_FIRST + 109) /* 109: MDIO slave global interrupt */
|
||||
|
||||
#define STM32_IRQ_NEXTINTS 110
|
||||
#define STM32_IRQ_NIRQS (STM32_IRQ_FIRST + 110)
|
||||
|
||||
/* EXTI interrupts (Do not use IRQ numbers) */
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
* arch/arm/src/imxrt/imxrt_ehci.c
|
||||
*
|
||||
* Copyright (C) 2013-2017 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2013-2017, 2020 Gregory Nutt. All rights reserved.
|
||||
* Authors: Gregory Nutt <gnutt@nuttx.org>
|
||||
* Dave Marples <dave@marples.net>
|
||||
*
|
||||
|
@ -78,7 +78,7 @@
|
||||
|
||||
/* Configuration ************************************************************/
|
||||
|
||||
#if ((defined(CONFIG_IMXRT_USDHC1) && !defined(CONFIG_IMXRT_USDHC2)) || \
|
||||
#if ((defined(CONFIG_IMXRT_USDHC1) && !defined(CONFIG_IMXRT_USDHC2)) || \
|
||||
(defined(CONFIG_IMXRT_USDHC2) && !defined(CONFIG_IMXRT_USDHC1)))
|
||||
# define IMXRT_MAX_SDHC_DEV_SLOTS 1
|
||||
#elif (defined(CONFIG_IMXRT_USDHC1) && defined(CONFIG_IMXRT_USDHC2))
|
||||
@ -1232,11 +1232,30 @@ static int imxrt_interrupt(int irq, void *context, FAR void *arg)
|
||||
|
||||
/* We don't want any more ints now, so switch it off */
|
||||
|
||||
priv->cintints = 0;
|
||||
regval &= ~USDHC_INT_CINT;
|
||||
priv->cintints = regval;
|
||||
putreg32(regval, priv->addr + IMXRT_USDHC_IRQSIGEN_OFFSET);
|
||||
}
|
||||
|
||||
if ((pending & USDHC_INT_CINS) != 0 || (pending & USDHC_INT_CRM) != 0)
|
||||
{
|
||||
if (up_interrupt_context())
|
||||
{
|
||||
/* Yes.. queue it */
|
||||
|
||||
mcinfo("Queuing callback to %p(%p)\n", priv->callback, priv->cbarg);
|
||||
(void)work_queue(HPWORK, &priv->cbwork, (worker_t)priv->callback,
|
||||
priv->cbarg, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* No.. then just call the callback here */
|
||||
|
||||
mcinfo("Callback to %p(%p)\n", priv->callback, priv->cbarg);
|
||||
priv->callback(priv->cbarg);
|
||||
}
|
||||
}
|
||||
|
||||
/* Handle wait events *****************************************************/
|
||||
|
||||
pending = enabled & priv->waitints;
|
||||
@ -3019,7 +3038,14 @@ void imxrt_usdhc_set_sdio_card_isr(FAR struct sdio_dev_s *dev,
|
||||
priv->cintints = 0;
|
||||
}
|
||||
|
||||
flags = enter_critical_section();
|
||||
#if defined(CONFIG_MMCSD_HAVE_CARDDETECT)
|
||||
if (priv->sw_cd_gpio == 0)
|
||||
{
|
||||
priv->cintints |= USDHC_INT_CINS | USDHC_INT_CRM;
|
||||
}
|
||||
#endif
|
||||
|
||||
flags = enter_critical_section();
|
||||
regval = getreg32(priv->addr + IMXRT_USDHC_IRQSIGEN_OFFSET);
|
||||
regval = (regval & ~USDHC_INT_CINT) | priv->cintints;
|
||||
putreg32(regval, priv->addr + IMXRT_USDHC_IRQSIGEN_OFFSET);
|
||||
|
@ -494,7 +494,7 @@ void up_irqinitialize(void)
|
||||
irq_attach(STM32_IRQ_RESERVED, stm32_reserved, NULL);
|
||||
#endif
|
||||
|
||||
stm32_dumpnvic("initial", STM32_IRQ_NIRQS);
|
||||
stm32_dumpnvic("initial", NR_IRQS);
|
||||
|
||||
/* If a debugger is connected, try to prevent it from catching hardfaults.
|
||||
* If CONFIG_ARMV7M_USEBASEPRI, no hardfaults are expected in normal
|
||||
|
@ -519,7 +519,7 @@ void up_irqinitialize(void)
|
||||
irq_attach(STM32_IRQ_RESERVED, stm32_reserved, NULL);
|
||||
#endif
|
||||
|
||||
stm32_dumpnvic("initial", STM32_IRQ_NIRQS);
|
||||
stm32_dumpnvic("initial", NR_IRQS);
|
||||
|
||||
/* If a debugger is connected, try to prevent it from catching hardfaults.
|
||||
* If CONFIG_ARMV7M_USEBASEPRI, no hardfaults are expected in normal
|
||||
|
@ -46,6 +46,7 @@
|
||||
/* In mstatus register */
|
||||
|
||||
#define MSTATUS_MIE (0x1 << 3) /* Machine Interrupt Enable */
|
||||
#define MSTATUS_MPIE (0x1 << 7) /* Machine Previous Interrupt Enable */
|
||||
|
||||
/* In mie (machine interrupt enable) register */
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* arch/arm/src/fe310/fe310_clockconfig.c
|
||||
* arch/risc-v/src/fe310/fe310_clockconfig.c
|
||||
*
|
||||
* Copyright (C) 2019 Masayuki Ishikawa. All rights reserved.
|
||||
* Author: Masayuki Ishikawa <masayuki.ishikawa@gmail.com>
|
||||
|
@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* arch/arm/src/fe310/fe310_clockconfig.h
|
||||
* arch/risc-v/src/fe310/fe310_clockconfig.h
|
||||
*
|
||||
* Copyright (C) 2019 Masayuki Ishikawa. All rights reserved.
|
||||
* Author: Masayuki Ishikawa <masayuki.ishikawa@gmail.com>
|
||||
|
@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* arch/arm/src/fe310/fe310_gpio.c
|
||||
* arch/risc-v/src/fe310/fe310_gpio.c
|
||||
*
|
||||
* Copyright (C) 2019 Masayuki Ishikawa. All rights reserved.
|
||||
* Author: Masayuki Ishikawa <masayuki.ishikawa@gmail.com>
|
||||
|
@ -100,7 +100,6 @@ void up_irqinitialize(void)
|
||||
/* Attach the ecall interrupt handler */
|
||||
|
||||
irq_attach(FE310_IRQ_ECALLM, up_swint, NULL);
|
||||
up_enable_irq(FE310_IRQ_ECALLM);
|
||||
|
||||
#ifndef CONFIG_SUPPRESS_INTERRUPTS
|
||||
|
||||
@ -188,13 +187,13 @@ void up_enable_irq(int irq)
|
||||
* Name: up_get_newintctx
|
||||
*
|
||||
* Description:
|
||||
* Return a value for EPIC. But FE310 doesn't use EPIC for event control.
|
||||
* Return initial mstatus when a task is created.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
uint32_t up_get_newintctx(void)
|
||||
{
|
||||
return 0;
|
||||
return (MSTATUS_MPIE | MSTATUS_MIE);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
@ -238,7 +237,7 @@ irqstate_t up_irq_save(void)
|
||||
|
||||
void up_irq_restore(irqstate_t flags)
|
||||
{
|
||||
/* Machine mode - mstatus */
|
||||
/* Write flags to mstatus */
|
||||
|
||||
asm volatile("csrw mstatus, %0" : /* no output */ : "r" (flags));
|
||||
}
|
||||
|
@ -398,6 +398,11 @@ static int up_interrupt(int irq, void *context, FAR void *arg)
|
||||
|
||||
status = up_serialin(priv, UART_IP_OFFSET);
|
||||
|
||||
if (status == 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
if (status & UART_IP_RXWM)
|
||||
{
|
||||
/* Process incoming bytes */
|
||||
@ -405,9 +410,12 @@ static int up_interrupt(int irq, void *context, FAR void *arg)
|
||||
uart_recvchars(dev);
|
||||
}
|
||||
|
||||
/* Process outgoing bytes */
|
||||
if (status & UART_IP_TXWM)
|
||||
{
|
||||
/* Process outgoing bytes */
|
||||
|
||||
uart_xmitchars(dev);
|
||||
uart_xmitchars(dev);
|
||||
}
|
||||
}
|
||||
|
||||
return OK;
|
||||
|
@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
* boards/arm/imxrt/imxrt1060-evk/src/imxrt_bringup.c
|
||||
*
|
||||
* Copyright (C) 2018 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2018, 2020 Gregory Nutt. All rights reserved.
|
||||
* Authors: Gregory Nutt <gnutt@nuttx.org>
|
||||
* David Sidrane <david_s5@nscdg.com>
|
||||
*
|
||||
@ -121,7 +121,10 @@ static int nsh_sdmmc_initialize(void)
|
||||
"ERROR: Failed to bind SDIO to the MMC/SD driver: %d\n",
|
||||
ret);
|
||||
}
|
||||
|
||||
imxrt_usdhc_set_sdio_card_isr(sdmmc, NULL, NULL);
|
||||
}
|
||||
|
||||
return OK;
|
||||
}
|
||||
#else
|
||||
|
@ -623,7 +623,7 @@ static void bcmf_poll_work(FAR void *arg)
|
||||
/* Setup the watchdog poll timer again */
|
||||
|
||||
wd_start(priv->bc_txpoll, BCMF_WDDELAY, bcmf_poll_expiry, 1,
|
||||
, (wdparm_t)priv);
|
||||
(wdparm_t)priv);
|
||||
exit_unlock:
|
||||
net_unlock();
|
||||
}
|
||||
|
@ -60,7 +60,7 @@
|
||||
* Name: file_read
|
||||
*
|
||||
* Description:
|
||||
* file_read() is an interanl OS interface. It is functionally similar to
|
||||
* file_read() is an internal OS interface. It is functionally similar to
|
||||
* the standard read() interface except:
|
||||
*
|
||||
* - It does not modify the errno variable,
|
||||
|
@ -466,18 +466,6 @@ int net_lockedwait_uninterruptible(sem_t *sem);
|
||||
FAR struct iob_s *net_ioballoc(bool throttled, enum iob_user_e consumerid);
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Name: net_setipid
|
||||
*
|
||||
* Description:
|
||||
* This function may be used at boot time to set the initial ip_id.
|
||||
*
|
||||
* Assumptions:
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void net_setipid(uint16_t id);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: net_checksd
|
||||
*
|
||||
|
@ -47,7 +47,6 @@ endif
|
||||
|
||||
ifeq ($(CONFIG_NET_IPv4),y)
|
||||
SOCK_CSRCS += ipv4_setsockopt.c ipv4_getsockname.c ipv4_getpeername.c
|
||||
SOCK_CSRCS += inet_setipid.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_NET_IPv6),y)
|
||||
|
@ -129,18 +129,6 @@ struct tcp_conn_s; /* Forward reference */
|
||||
#endif
|
||||
struct socket; /* Forward reference */
|
||||
|
||||
/****************************************************************************
|
||||
* Name: inet_setipid
|
||||
*
|
||||
* Description:
|
||||
* This function may be used at boot time to set the initial ip_id.
|
||||
*
|
||||
* Assumptions:
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void inet_setipid(uint16_t id);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: inet_sockif
|
||||
*
|
||||
@ -159,7 +147,7 @@ void inet_setipid(uint16_t id);
|
||||
****************************************************************************/
|
||||
|
||||
FAR const struct sock_intf_s *
|
||||
inet_sockif(sa_family_t family, int type, int protocol);
|
||||
inet_sockif(sa_family_t family, int type, int protocol);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: ipv4_setsockopt and ipv6_setsockopt
|
||||
|
@ -1,67 +0,0 @@
|
||||
/****************************************************************************
|
||||
* net/inet/net_setipid.c
|
||||
*
|
||||
* Copyright (C) 2007, 2009, 2017 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#ifdef CONFIG_NET
|
||||
|
||||
#include <stdint.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include "inet/inet.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: inet_setipid
|
||||
*
|
||||
* Description:
|
||||
* This function may be used at boot time to set the initial ip_id.
|
||||
*
|
||||
* Assumptions:
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void inet_setipid(uint16_t id)
|
||||
{
|
||||
g_ipid = id;
|
||||
}
|
||||
|
||||
#endif /* CONFIG_NET */
|
Loading…
Reference in New Issue
Block a user