diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-08-16 15:04:09 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-08-16 15:04:09 -0600 |
commit | fddb234e576e1c12946e600a8d010652d5d60dd5 (patch) | |
tree | cc54581fa03b371bba31f1022710e015d8a5e4f4 /nuttx/configs/sama5d4-ek | |
parent | cb437c654b374337ef9a41bc3c49d0aa9c1c3edd (diff) | |
download | px4-nuttx-fddb234e576e1c12946e600a8d010652d5d60dd5.tar.gz px4-nuttx-fddb234e576e1c12946e600a8d010652d5d60dd5.tar.bz2 px4-nuttx-fddb234e576e1c12946e600a8d010652d5d60dd5.zip |
More of the PHY event notification logic change: Fix some compile errors when full feature is enabled; Add some missing ioctol logic
Diffstat (limited to 'nuttx/configs/sama5d4-ek')
-rw-r--r-- | nuttx/configs/sama5d4-ek/src/sam_ethernet.c | 39 | ||||
-rw-r--r-- | nuttx/configs/sama5d4-ek/src/sam_hsmci.c | 2 | ||||
-rw-r--r-- | nuttx/configs/sama5d4-ek/src/sam_nandflash.c | 2 | ||||
-rw-r--r-- | nuttx/configs/sama5d4-ek/src/sam_spi.c | 2 | ||||
-rw-r--r-- | nuttx/configs/sama5d4-ek/src/sam_usb.c | 2 | ||||
-rw-r--r-- | nuttx/configs/sama5d4-ek/src/sama5d4-ek.h | 18 |
6 files changed, 34 insertions, 31 deletions
diff --git a/nuttx/configs/sama5d4-ek/src/sam_ethernet.c b/nuttx/configs/sama5d4-ek/src/sam_ethernet.c index de115f923..22c93b4d5 100644 --- a/nuttx/configs/sama5d4-ek/src/sam_ethernet.c +++ b/nuttx/configs/sama5d4-ek/src/sam_ethernet.c @@ -41,6 +41,7 @@ #include <string.h> #include <assert.h> +#include <debug.h> #include <nuttx/irq.h> #include <nuttx/arch.h> @@ -48,6 +49,8 @@ #include "sam_pio.h" #include "sam_ethernet.h" +#include "sama5d4-ek.h" + #ifdef HAVE_NETWORK /************************************************************************************ @@ -59,11 +62,11 @@ #endif #ifdef CONFIG_SAMA5_EMAC0_ISETH0 -# SAMA5_EMAC0_DEVNAME "eth0" -# SAMA5_EMAC1_DEVNAME "eth1" +# define SAMA5_EMAC0_DEVNAME "eth0" +# define SAMA5_EMAC1_DEVNAME "eth1" #else -# SAMA5_EMAC0_DEVNAME "eth1" -# SAMA5_EMAC1_DEVNAME "eth0" +# define SAMA5_EMAC0_DEVNAME "eth1" +# define SAMA5_EMAC1_DEVNAME "eth0" #endif /************************************************************************************ @@ -72,10 +75,10 @@ #ifdef CONFIG_SAMA5_PIOE_IRQ #ifdef CONFIG_SAMA5_EMAC0 -static xcpt g_emac0_handler; +static xcpt_t g_emac0_handler; #endif #ifdef CONFIG_SAMA5_EMAC1 -static xcpt g_emac1_handler; +static xcpt_t g_emac1_handler; #endif #endif @@ -97,11 +100,11 @@ static xcpt g_emac1_handler; void weak_function sam_netinitialize(void) { -#ifdef CONFIG_SAMA4_EMAC0 +#ifdef CONFIG_SAMA5_EMAC0 sam_configpio(PIO_INT_ETH0); #endif -#ifdef CONFIG_SAMA4_EMAC1 +#ifdef CONFIG_SAMA5_EMAC1 sam_configpio(PIO_INT_ETH1); #endif } @@ -160,10 +163,10 @@ void weak_function sam_netinitialize(void) ****************************************************************************/ #ifdef CONFIG_SAMA5_PIOE_IRQ -xcpt_t arch_phy_irq(FAR const char *intf, xcpt_t handler); +xcpt_t arch_phy_irq(FAR const char *intf, xcpt_t handler) { irqstate_t flags; - xcpt_t *handler; + xcpt_t *phandler; xcpt_t oldhandler; pio_pinset_t pinset; int irq; @@ -173,18 +176,18 @@ xcpt_t arch_phy_irq(FAR const char *intf, xcpt_t handler); #ifdef CONFIG_SAMA5_EMAC0 if (strcmp(intf, SAMA5_EMAC0_DEVNAME) == 0) { - handler = &g_emac0_handler; - pinset = PIO_INT_ETH0; - irq = IRQ_INT_ETH0; + phandler = &g_emac0_handler; + pinset = PIO_INT_ETH0; + irq = IRQ_INT_ETH0; } else #endif #ifdef CONFIG_SAMA5_EMAC1 if (strcmp(intf, SAMA5_EMAC1_DEVNAME) == 0) { - handler = &g_emac1_handler; - pinset = PIO_INT_ETH1; - irq = IRQ_INT_ETH1; + phandler = &g_emac1_handler; + pinset = PIO_INT_ETH1; + irq = IRQ_INT_ETH1; } else #endif @@ -201,8 +204,8 @@ xcpt_t arch_phy_irq(FAR const char *intf, xcpt_t handler); /* Get the old button interrupt handler and save the new one */ - oldhandler = *handler; - *handler = handler; + oldhandler = *phandler; + *phandler = handler; /* Configure the interrupt */ diff --git a/nuttx/configs/sama5d4-ek/src/sam_hsmci.c b/nuttx/configs/sama5d4-ek/src/sam_hsmci.c index 99016a8a6..a4b6a91d1 100644 --- a/nuttx/configs/sama5d4-ek/src/sam_hsmci.c +++ b/nuttx/configs/sama5d4-ek/src/sam_hsmci.c @@ -33,7 +33,7 @@ * ****************************************************************************/ -/* The SAMA4D4-EK provides a two SD memory card slots: (1) a full size SD +/* The SAMA5D4-EK provides a two SD memory card slots: (1) a full size SD * card slot (J10), and (2) a microSD memory card slot (J11). * * The full size SD card slot connects via HSMCI0. The card detect discrete diff --git a/nuttx/configs/sama5d4-ek/src/sam_nandflash.c b/nuttx/configs/sama5d4-ek/src/sam_nandflash.c index 651e2eca3..9044526b3 100644 --- a/nuttx/configs/sama5d4-ek/src/sam_nandflash.c +++ b/nuttx/configs/sama5d4-ek/src/sam_nandflash.c @@ -4,7 +4,7 @@ * Copyright (C) 2014 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <gnutt@nuttx.org> * - * Most of this file derives from Atmel sample code for the SAMA4D4-EK + * Most of this file derives from Atmel sample code for the SAMA5D4-EK * board. That sample code has licensing that is compatible with the NuttX * modified BSD license: * diff --git a/nuttx/configs/sama5d4-ek/src/sam_spi.c b/nuttx/configs/sama5d4-ek/src/sam_spi.c index 905e79877..56105cfbc 100644 --- a/nuttx/configs/sama5d4-ek/src/sam_spi.c +++ b/nuttx/configs/sama5d4-ek/src/sam_spi.c @@ -89,7 +89,7 @@ * Name: sam_spiinitialize * * Description: - * Called to configure SPI chip select PIO pins for the SAMA4D4-EK board. + * Called to configure SPI chip select PIO pins for the SAMA5D4-EK board. * ************************************************************************************/ diff --git a/nuttx/configs/sama5d4-ek/src/sam_usb.c b/nuttx/configs/sama5d4-ek/src/sam_usb.c index b3f510b9f..eeb090860 100644 --- a/nuttx/configs/sama5d4-ek/src/sam_usb.c +++ b/nuttx/configs/sama5d4-ek/src/sam_usb.c @@ -197,7 +197,7 @@ static int ehci_waiter(int argc, char *argv[]) * * Description: * Called from sam_usbinitialize very early in inialization to setup USB-related - * GPIO pins for the SAMA4D4-EK board. + * GPIO pins for the SAMA5D4-EK board. * * USB Ports * The SAMA5D4 series-MB features three USB communication ports: diff --git a/nuttx/configs/sama5d4-ek/src/sama5d4-ek.h b/nuttx/configs/sama5d4-ek/src/sama5d4-ek.h index e99a152f1..fc49e0b6c 100644 --- a/nuttx/configs/sama5d4-ek/src/sama5d4-ek.h +++ b/nuttx/configs/sama5d4-ek/src/sama5d4-ek.h @@ -540,7 +540,7 @@ #define MXT_I2C_ADDRESS 0x4c /* HSMCI Card Slots *****************************************************************/ -/* The SAMA4D4-EK provides a two SD memory card slots: (1) a full size SD +/* The SAMA5D4-EK provides a two SD memory card slots: (1) a full size SD * card slot (J10), and (2) a microSD memory card slot (J11). * * The full size SD card slot connects via HSMCI0. The card detect discrete @@ -597,7 +597,7 @@ PIO_PORT_PIOE | PIO_PIN15) /* USB Ports ************************************************************************/ -/* The SAMA4D4-EK features three USB communication ports: +/* The SAMA5D4-EK features three USB communication ports: * * * Port A Host High Speed (EHCI) and Full Speed (OHCI) multiplexed with * USB Device High Speed Micro AB connector, J1 @@ -685,7 +685,7 @@ /* Ethernet */ -#ifdef CONFIG_SAMA4_EMACB +#ifdef CONFIG_SAMA5_EMACB /* ETH0/1: Ethernet 10/100 (EMAC) Ports * * Networking support via the can be added to NSH by selecting the following @@ -747,13 +747,13 @@ * - LCD_ETH1_CONFIG = 1 & LCD_DETECT# =0: LCD 5v enable */ -#ifdef CONFIG_SAMA4_EMAC0 +#ifdef CONFIG_SAMA5_EMAC0 # define PIO_INT_ETH0 (PIO_INPUT | PIO_CFG_PULLUP | PIO_CFG_DEGLITCH | \ PIO_INT_BOTHEDGES | PIO_PORT_PIOE | PIO_PIN1) # define IRQ_INT_ETH0 SAM_IRQ_PE1 #endif -#ifdef CONFIG_SAMA4_EMAC1 +#ifdef CONFIG_SAMA5_EMAC1 # define PIO_INT_ETH1 (PIO_INPUT | PIO_CFG_PULLUP | PIO_CFG_DEGLITCH | \ PIO_INT_BOTHEDGES | PIO_PORT_PIOE | PIO_PIN2) # define IRQ_INT_ETH1 SAM_IRQ_PE2 @@ -844,7 +844,7 @@ * Name: sam_spiinitialize * * Description: - * Called to configure SPI chip select PIO pins for the SAMA4D4-EK board. + * Called to configure SPI chip select PIO pins for the SAMA5D4-EK board. * ************************************************************************************/ @@ -858,7 +858,7 @@ void weak_function sam_spiinitialize(void); * Description: * Configures DDR2 (MT47H128M16RT 128MB or, optionally, MT47H64M16HR) * - * Per the SAMA4D4-EK User guide: "Two SDRAM/DDR2 used as main system memory. + * Per the SAMA5D4-EK User guide: "Two SDRAM/DDR2 used as main system memory. * MT47H128M16 - 2 Gb - 16 Meg x 16 x 8 banks, the board provides up to 2 Gb on- * board, soldered DDR2 SDRAM. The memory bus is 32 bits wide and operates with * up to 166 MHz." @@ -870,7 +870,7 @@ void weak_function sam_spiinitialize(void); * Column address A[9:0] (1K) * Bank address BA[2:0] a(24,25) (8) * - * This logic was taken from Atmel sample code for the SAMA4D4-EK. + * This logic was taken from Atmel sample code for the SAMA5D4-EK. * * Input Parameters: * devtype - Either DDRAM_MT47H128M16RT or DDRAM_MT47H64M16HR @@ -999,7 +999,7 @@ bool sam_writeprotected(int slotno); * * Description: * Called from sam_usbinitialize very early in inialization to setup USB-related - * PIO pins for the SAMA4D4-EK board. + * PIO pins for the SAMA5D4-EK board. * ************************************************************************************/ |