diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-11-18 11:02:22 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-11-18 11:02:22 -0600 |
commit | 99fcd931e29042c7a532674ff99c76daf3d3f68b (patch) | |
tree | 74c253a2e47403f41ce0fa8900aa3c0640b81a12 | |
parent | 87c318d32fed2b36d195f3a5e2c50d196616e228 (diff) | |
download | px4-nuttx-99fcd931e29042c7a532674ff99c76daf3d3f68b.tar.gz px4-nuttx-99fcd931e29042c7a532674ff99c76daf3d3f68b.tar.bz2 px4-nuttx-99fcd931e29042c7a532674ff99c76daf3d3f68b.zip |
SAMA5D4-EK EMAC1: Correct name of EMAC1 configuration variable
-rw-r--r-- | apps/netutils/dhcpd/dhcpd.c | 1 | ||||
-rw-r--r-- | nuttx/arch/arm/src/sama5/Kconfig | 2 | ||||
-rw-r--r-- | nuttx/arch/arm/src/sama5/sam_emacb.c | 17 |
3 files changed, 12 insertions, 8 deletions
diff --git a/apps/netutils/dhcpd/dhcpd.c b/apps/netutils/dhcpd/dhcpd.c index 3f8aae0a5..93b061db7 100644 --- a/apps/netutils/dhcpd/dhcpd.c +++ b/apps/netutils/dhcpd/dhcpd.c @@ -89,7 +89,6 @@ #define DHCP_OPTION_SUBNET_MASK 1 /* 1 Subnet Mask */ #define DHCP_OPTION_ROUTER 3 /* 4 Router */ #define DHCP_OPTION_DNS_SERVER 6 /* 4N DNS */ -#define DHCP_OPTION_DNS_SERVER_L 4 /* DNS Length */ #define DHCP_OPTION_REQ_IPADDR 50 /* 4 Requested IP Address */ #define DHCP_OPTION_LEASE_TIME 51 /* 4 IP address lease time */ #define DHCP_OPTION_OVERLOAD 52 /* 1 Option overload */ diff --git a/nuttx/arch/arm/src/sama5/Kconfig b/nuttx/arch/arm/src/sama5/Kconfig index b169179d7..a33d08f11 100644 --- a/nuttx/arch/arm/src/sama5/Kconfig +++ b/nuttx/arch/arm/src/sama5/Kconfig @@ -1793,7 +1793,7 @@ config SAMA5_EMAC0_ISETH0 bool "EMAC0 is eth0" depends on SAMA5_EMAC0 -config SAMA5_EMAC0_ISETH1 +config SAMA5_EMAC1_ISETH0 bool "EMAC1 is eth0" depends on SAMA5_EMAC1 diff --git a/nuttx/arch/arm/src/sama5/sam_emacb.c b/nuttx/arch/arm/src/sama5/sam_emacb.c index bfd95fd35..946264fb6 100644 --- a/nuttx/arch/arm/src/sama5/sam_emacb.c +++ b/nuttx/arch/arm/src/sama5/sam_emacb.c @@ -604,7 +604,7 @@ static const struct sam_emacattr_s g_emac0_attr = .base = SAM_EMAC0_VBASE, .handler = sam_emac0_interrupt, - .emac = 0, + .emac = EMAC0_INTF, .irq = SAM_IRQ_EMAC0, /* PHY Configuration */ @@ -672,7 +672,7 @@ static const struct sam_emacattr_s g_emac1_attr = .base = SAM_EMAC1_VBASE, .handler = sam_emac1_interrupt, - .emac = 1, + .emac = EMAC1_INTF, .irq = SAM_IRQ_EMAC1, /* PHY Configuration */ @@ -3248,7 +3248,7 @@ static inline void sam_ethgpioconfig(struct sam_emac_s *priv) #if defined(CONFIG_SAMA5_EMAC0) /* Configure EMAC0 PIO pins */ - if (priv->attr->emac == 0) + if (priv->attr->emac == EMAC0_INTF) { /* Configure PIO pins common to RMII and MII mode*/ @@ -3277,12 +3277,13 @@ static inline void sam_ethgpioconfig(struct sam_emac_s *priv) sam_configpio(PIO_EMAC0_COL); /* Collision Detect */ } } + else #endif #if defined(CONFIG_SAMA5_EMAC1) /* Configure EMAC0 PIO pins */ - if (priv->attr->emac == 1) + if (priv->attr->emac == EMAC1_INTF) { /* Configure PIO pins common to RMII and MII mode*/ @@ -3311,7 +3312,11 @@ static inline void sam_ethgpioconfig(struct sam_emac_s *priv) sam_configpio(PIO_EMAC1_COL); /* Collision Detect */ } } + else #endif + { + nvdbg("ERROR: emac=%d\n", priv->attr->emac); + } } /**************************************************************************** @@ -3463,7 +3468,7 @@ static void sam_emac_enableclk(struct sam_emac_s *priv) #if defined(CONFIG_SAMA5_EMAC0) && defined(CONFIG_SAMA5_EMAC1) /* Both EMAC blocks are selected, which are we enabling? */ - if (priv->attr->emac == 0) + if (priv->attr->emac == EMAC0_INTF) { sam_emac0_enableclk(); } @@ -3506,7 +3511,7 @@ static void sam_emac_disableclk(struct sam_emac_s *priv) #if defined(CONFIG_SAMA5_EMAC0) && defined(CONFIG_SAMA5_EMAC1) /* Both EMAC blocks are selected, which are we disabling? */ - if (priv->attr->emac == 0) + if (priv->attr->emac == EMAC0_INTF) { sam_emac0_disableclk(); } |