SAMA5 EMAC: Incremental progress. Still not code complete
This commit is contained in:
parent
6a01d80bb2
commit
a791ae11ce
@ -191,7 +191,8 @@ void sam_boardinitialize(void);
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
#if defined(CONFIG_NET) && (defined(CONFIG_SAMA5_EMAC) || defined(CONFIG_SAMA5_GMAC))
|
||||
#if defined(CONFIG_NET) && (defined(CONFIG_SAMA5_EMAC) || defined(CONFIG_SAMA5_GMAC)) && \
|
||||
defined(CONFIG_SAMA5_PIOE_IRQ)
|
||||
xcpt_t sam_phyirq(int intf, xcpt_t irqhandler);
|
||||
#endif
|
||||
|
||||
|
@ -151,14 +151,15 @@ xcpt_t up_irqbutton(int id, xcpt_t irqhandler)
|
||||
|
||||
/* Get the old button interrupt handler and save the new one */
|
||||
|
||||
oldhandler = *g_irquser1;
|
||||
*g_irquser1 = irqhandler;
|
||||
oldhandler = g_irquser1;
|
||||
g_irquser1 = irqhandler;
|
||||
|
||||
/* Configure the interrupt */
|
||||
|
||||
sam_pioirq(IRQ_USER1);
|
||||
(void)irq_attach(IRQ_USER1, irqhandler);
|
||||
sam_pioirqenable(IRQ_USER1);
|
||||
irqrestore(flags);
|
||||
}
|
||||
|
||||
/* Return the old button handler (so that it can be restored) */
|
||||
|
@ -47,9 +47,22 @@
|
||||
#ifdef HAVE_NETWORK
|
||||
|
||||
/************************************************************************************
|
||||
* Definitions
|
||||
* Pre-processor Definitions
|
||||
************************************************************************************/
|
||||
|
||||
/************************************************************************************
|
||||
* Private Data
|
||||
************************************************************************************/
|
||||
|
||||
#ifdef CONFIG_SAMA5_PIOE_IRQ
|
||||
#ifdef CONFIG_SAMA5_EMAC
|
||||
static xcpt g_emac_handler;
|
||||
#endif
|
||||
#ifdef CONFIG_SAMA5_GMAC
|
||||
static xcpt g_gmac_handler;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/************************************************************************************
|
||||
* Private Functions
|
||||
************************************************************************************/
|
||||
@ -117,6 +130,7 @@ void weak_function sam_netinitialize(void)
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
#ifdef CONFIG_SAMA5_PIOE_IRQ
|
||||
xcpt_t sam_phyirq(int intf, xcpt_t irqhandler)
|
||||
{
|
||||
irqstate_t flags;
|
||||
@ -164,7 +178,9 @@ xcpt_t sam_phyirq(int intf, xcpt_t irqhandler)
|
||||
|
||||
/* Return the old button handler (so that it can be restored) */
|
||||
|
||||
irqrestore(flags);
|
||||
return oldhandler;
|
||||
}
|
||||
#endif /* CONFIG_SAMA5_PIOE_IRQ */
|
||||
|
||||
#endif /* HAVE_NETWORK */
|
||||
|
@ -90,7 +90,7 @@ static struct usbhost_connection_s *g_ehciconn;
|
||||
/* Overcurrent interrupt handler */
|
||||
|
||||
#if defined(HAVE_USBHOST) && defined(CONFIG_SAMA5_PIOD_IRQ)
|
||||
static xcpt_t *g_ochandler;
|
||||
static xcpt_t g_ochandler;
|
||||
#endif
|
||||
|
||||
/************************************************************************************
|
||||
@ -476,8 +476,8 @@ xcpt_t sam_setup_overcurrent(xcpt_t handler)
|
||||
|
||||
/* Get the old button interrupt handler and save the new one */
|
||||
|
||||
oldhandler = *g_ochandler;
|
||||
*g_ochandler = handler;
|
||||
oldhandler = g_ochandler;
|
||||
g_ochandler = handler;
|
||||
|
||||
/* Configure the interrupt */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user