Skip to content

Commit

Permalink
Changes from review of last PR
Browse files Browse the repository at this point in the history
  • Loading branch information
gregory-nutt committed Feb 19, 2017
1 parent b566baa commit 0fc226d
Show file tree
Hide file tree
Showing 18 changed files with 61 additions and 91 deletions.
4 changes: 3 additions & 1 deletion Documentation/README.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<tr align="center" bgcolor="#e4e4e4">
<td>
<h1><big><font color="#3c34ec"><i>NuttX README Files</i></font></big></h1>
<p>Last Updated: February 14, 2017</p>
<p>Last Updated: February 19, 2017</p>
</td>
</tr>
</table>
Expand Down Expand Up @@ -287,6 +287,8 @@ <h1><big><font color="#3c34ec"><i>NuttX README Files</i></font></big></h1>
| | `- <a href="https://bitbucket.org/nuttx/nuttx/src/master/configs/tm4c1294-launchpad/README.txt" target="_blank"><b><i>README.txt</i></b></a>
| |- twr-k60n512/
| | `- <a href="https://bitbucket.org/nuttx/nuttx/src/master/configs/twr-k60n512/README.txt" target="_blank"><b><i>README.txt</i></b></a>
| |- twr-k64f120m/
| | `- <a href="https://bitbucket.org/nuttx/nuttx/src/master/configs/twr-k64f120m/README.txt" target="_blank"><b><i>README.txt</i></b></a>
| |- "u-blox-c027/
| | `- <a href="https://bitbucket.org/nuttx/nuttx/src/master/configs/u-blox-c027/README.txt" target="_blank"><b><i>README.txt</i></b></a>
| |- ubw32/
Expand Down
2 changes: 2 additions & 0 deletions README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1671,6 +1671,8 @@ nuttx/
| | `- README.txt
| |- twr-k60n512/
| | `- README.txt
| |- twr-k64f120m/
| | `- README.txt
| |- u-blox-co27/
| | `- README.txt
| |- ubw32/
Expand Down
19 changes: 11 additions & 8 deletions arch/arm/src/kinetis/kinetis_enet.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@
#else
# error "Unrecognized or missing PHY selection"
#endif

#define BOARD_PHY_10BASET(s) (((s) & (1 << MII_PHYCTRL2_MODE_SHIFT)) != 0)
#define BOARD_PHY_100BASET(s) (((s) & (2 << MII_PHYCTRL2_MODE_SHIFT)) != 0)
#define BOARD_PHY_ISDUPLEX(s) (((s) & (4 << MII_PHYCTRL2_MODE_SHIFT)) != 0)
Expand Down Expand Up @@ -207,7 +208,6 @@
# define SIM_SOPT2_RMIISRC SIM_SOPT2_RMIISRC_EXTBYP
#endif


/****************************************************************************
* Private Types
****************************************************************************/
Expand Down Expand Up @@ -1757,7 +1757,7 @@ static inline int kinetis_initphy(struct kinetis_driver_s *priv)

/* Start auto negotiation */

ninfo("%s: Start autonegotiation...\n", BOARD_PHY_NAME);
ninfo("%s: Start Autonegotiation...\n", BOARD_PHY_NAME);
kinetis_writemii(priv, phyaddr, MII_MCR,
(MII_MCR_ANRESTART | MII_MCR_ANENABLE));

Expand All @@ -1772,10 +1772,12 @@ static inline int kinetis_initphy(struct kinetis_driver_s *priv)
BOARD_PHY_NAME, ret);
return ret;
}

if (phydata & MII_MSR_ANEGCOMPLETE)
{
break;
}

usleep(LINK_WAITUS);
}

Expand All @@ -1786,14 +1788,14 @@ static inline int kinetis_initphy(struct kinetis_driver_s *priv)
}
else
{
/* TODO: autonegotitation has right now failed. Maybe the Eth cable is not connected.
/* TODO: Autonegotitation has right now failed. Maybe the Eth cable is not connected.
PHY chip have mechanisms to configure link OK. We should leave autconf on,
and find a way to re-configure MCU whenever the link is ready. */

ninfo("%s: Autonegotiation failed (is cable plugged-in ?), default to 10Mbs mode\n", \
BOARD_PHY_NAME);

/* Stop auto negociation */
/* Stop auto negotiation */

kinetis_writemii(priv, phyaddr, MII_MCR, 0);
}
Expand All @@ -1809,7 +1811,6 @@ static inline int kinetis_initphy(struct kinetis_driver_s *priv)
return ret;
}


ninfo("%s: BOARD_PHY_STATUS: %04x\n", BOARD_PHY_NAME, phydata);

/* Set up the transmit and receive control registers based on the
Expand Down Expand Up @@ -1862,7 +1863,7 @@ static inline int kinetis_initphy(struct kinetis_driver_s *priv)
}
else
{
/* This might happen if autonegotiation did not complete(?) */
/* This might happen if Autonegotiation did not complete(?) */

nerr("ERROR: Neither 10- nor 100-BaseT reported: PHY STATUS=%04x\n",
phydata);
Expand Down Expand Up @@ -2151,8 +2152,10 @@ int kinetis_netinitialize(int intf)

#ifdef CONFIG_NET_ETHERNET
/* Determine a semi-unique MAC address from MCU UID
We use UID Low and Mid Low registers to get 64 bits, from which we keep 48 bits.
We then force unicast and locally administered bits (b0 and b1, 1st octet) */
* We use UID Low and Mid Low registers to get 64 bits, from which we keep
* 48 bits. We then force unicast and locally administered bits (b0 and b1,
* 1st octet)
*/

uint32_t uidl = getreg32(KINETIS_SIM_UIDL);
uint32_t uidml = getreg32(KINETIS_SIM_UIDML);
Expand Down
22 changes: 11 additions & 11 deletions configs/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,12 @@ config ARCH_BOARD_CLOUDCTRL
board design.

config ARCH_BOARD_DEMOS92S12NEC64
bool "Freescale DMO9S12NE64 board"
bool "NXP/FreeScale DMO9S12NE64 board"
depends on ARCH_CHIP_MCS92S12NEC64
select ARCH_HAVE_LEDS
select ARCH_HAVE_BUTTONS
---help---
Freescale DMO9S12NE64 board based on the MC9S12NE64 hcs12 cpu. This
NXP/FreeScale DMO9S12NE64 board based on the MC9S12NE64 hcs12 cpu. This
port uses the m9s12x GCC toolchain. STATUS: (Still) under development; it
is code complete but has not yet been verified.

Expand Down Expand Up @@ -185,7 +185,7 @@ config ARCH_BOARD_FREEDOM_K64F
select ARCH_HAVE_IRQBUTTONS
---help---
development board.
This port uses the FreeScale FREEDOM-K64F development board. This
This port uses the NXP/FreeScale FREEDOM-K64F development board. This
board uses the Kinetis K64 MK64FN1M0VLL12 Cortex-M4 MCU.

config ARCH_BOARD_FREEDOM_K66F
Expand All @@ -196,23 +196,23 @@ config ARCH_BOARD_FREEDOM_K66F
select ARCH_HAVE_IRQBUTTONS
---help---
development board.
This port uses the FreeScale FREEDOM-K66F development board. This
This port uses the NXP/FreeScale FREEDOM-K66F development board. This
board uses the Kinetis K66 MK66FN2M0VMD18 Cortex-M4 MCU.

config ARCH_BOARD_FREEDOM_KL25Z
bool "Freescale Freedom KL25Z"
bool "NXP/FreeScale Freedom KL25Z"
depends on ARCH_CHIP_MKL25Z128
select ARCH_HAVE_LEDS
---help---
This is the configuration for the Freescale Freedom KL25Z board. This
This is the configuration for the NXP/FreeScale Freedom KL25Z board. This
board has the K25Z120LE3AN chip with a built-in SDA debugger.

config ARCH_BOARD_FREEDOM_KL26Z
bool "Freescale Freedom KL26Z"
bool "NXP/FreeScale Freedom KL26Z"
depends on ARCH_CHIP_MKL26Z128
select ARCH_HAVE_LEDS
---help---
This is the configuration for the Freescale Freedom KL26Z board. This
This is the configuration for the NXP/FreeScale Freedom KL26Z board. This
board has the K26Z128VLH4 chip with a built-in SDA debugger.

config ARCH_BOARD_HYMINI_STM32V
Expand All @@ -235,13 +235,13 @@ config ARCH_BOARD_LINCOLN60
Micromint Lincoln 60 board using the NXP LPC1769 MCU.

config ARCH_BOARD_KWIKSTIK_K40
bool "FreeScale KwikStik-K40 development board"
bool "NXP/FreeScale KwikStik-K40 development board"
depends on ARCH_CHIP_MK40X256VLQ100
select ARCH_HAVE_LEDS
select ARCH_HAVE_BUTTONS
select ARCH_HAVE_IRQBUTTONS
---help---
Kinetis K40 Cortex-M4 MCU. This port uses the FreeScale KwikStik-K40
Kinetis K40 Cortex-M4 MCU. This port uses the NXP/FreeScale KwikStik-K40
development board.

config ARCH_BOARD_LAUNCHXL_TMS57004
Expand Down Expand Up @@ -387,7 +387,7 @@ config ARCH_BOARD_MX1ADS
select ARCH_HAVE_LEDS
---help---
This is a port to the Motorola MX1ADS development board. That board
is based on the Freescale i.MX1 processor. The i.MX1 is an ARM920T.
is based on the NXP/FreeScale i.MX1 processor. The i.MX1 is an ARM920T.
STATUS: This port is nearly code complete but was never fully
integrated due to tool-related issues.

Expand Down
14 changes: 9 additions & 5 deletions configs/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ configs/cloudctrl
the STM32F107VC MCU.

configs/demo9s12ne64
Freescale DMO9S12NE64 board based on the MC9S12NE64 hcs12 cpu. This
NXP/FreeScale DMO9S12NE64 board based on the MC9S12NE64 hcs12 cpu. This
port uses the m9s12x GCC toolchain. STATUS: (Still) under development; it
is code complete but has not yet been verified.

Expand Down Expand Up @@ -266,12 +266,12 @@ configs/fire-stm32v2
the boards are supported but only version 2 has been tested.

configs/freedom-k64f
This port uses the FreeScale FREEDOM-K64F development board. This board
This port uses the NXP/FreeScale FREEDOM-K64F development board. This board
uses the Kinetis K64 MK64FN1M0VLL12 Cortex-M4 MCU.

configs/freedom-kl25z
configs/freedom-kl26z
These configurations are for the Freescale Freedom KL25Z and very similar
These configurations are for the NXP/FreeScale Freedom KL25Z and very similar
KL26Z board. The Freedom-KL25Z features the K25Z120LE3AN chip; the
Freedom-KL26Z has the K26Z128VLH4 chip. These are separate configurations
because of minor differences in the on-board logic. Both include a
Expand All @@ -282,7 +282,7 @@ configs/hymini-stm32v
STM32F103VCT chip.

configs/kwikstik-k40.
Kinetis K40 Cortex-M4 MCU. This port uses the FreeScale KwikStik-K40
Kinetis K40 Cortex-M4 MCU. This port uses the NXP/FreeScale KwikStik-K40
development board.

configs/launchxl-tms57004
Expand Down Expand Up @@ -375,7 +375,7 @@ configs/moxa

configs/mx1ads
This is a port to the Motorola MX1ADS development board. That board
is based on the Freescale i.MX1 processor. The i.MX1 is an ARM920T.
is based on the NXP/FreeScale i.MX1 processor. The i.MX1 is an ARM920T.
STATUS: This port is nearly code complete but was never fully
integrated due to tool-related issues.

Expand Down Expand Up @@ -737,6 +737,10 @@ configs/twr-k60n512
Kinetis K60 Cortex-M4 MCU. This port uses the FreeScale TWR-K60N512
development board.

configs/twr-k64f120m
Kinetis K64 Cortex-M4 MCU. This port uses the FreeScale TWR-K64F120M
development board.

configs/ubw32

This is the port to the Sparkfun UBW32 board. This port uses the original v2.4
Expand Down
3 changes: 1 addition & 2 deletions configs/twr-k64f120m/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,4 @@ config TWR_K64F120M_SDHC_AUTOMOUNT_UDELAY
default 2000

endif # TWR_K64F120M_SDHC_AUTOMOUNT

endif
endif # ARCH_BOARD_TWR_K64F120M
13 changes: 6 additions & 7 deletions configs/twr-k64f120m/include/board.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
/************************************************************************************
* configs/twr-k60n512/include/board.h
* include/arch/board/board.h
* configs/twr-k64f120m/include/board.h
*
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
* Copyright (C) 2017 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <[email protected]>
*
* Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -34,8 +33,8 @@
*
************************************************************************************/

#ifndef __ARCH_BOARD_BOARD_H
#define __ARCH_BOARD_BOARD_H
#ifndef __CONFIGS_TWR_K64F120M_INCLUDE_BOARCH_H
#define __CONFIGS_TWR_K64F120M_INCLUDE_BOARCH_H

/************************************************************************************
* Included Files
Expand Down Expand Up @@ -187,12 +186,12 @@ extern "C" {
*
************************************************************************************/

EXTERN void kinetis_boardinitialize(void);
void kinetis_boardinitialize(void);

#undef EXTERN
#if defined(__cplusplus)
}
#endif

#endif /* __ASSEMBLY__ */
#endif /* __ARCH_BOARD_BOARD_H */
#endif /* __CONFIGS_TWR_K64F120M_INCLUDE_BOARCH_H */
2 changes: 1 addition & 1 deletion configs/twr-k64f120m/netnsh/Make.defs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
############################################################################
# configs/twr-k64f120m/netnsh/Make.defs
#
# Copyright (C) 2011 Gregory Nutt. All rights reserved.
# Copyright (C) 2017 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <[email protected]>
#
# Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion configs/twr-k64f120m/netnsh/setenv.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
# configs/twr-k64f120m/netnsh/setenv.sh
#
# Copyright (C) 2011 Gregory Nutt. All rights reserved.
# Copyright (C) 2017 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <[email protected]>
#
# Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion configs/twr-k64f120m/nsh/Make.defs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
############################################################################
# configs/twr-k64f120m/nsh/Make.defs
#
# Copyright (C) 2011 Gregory Nutt. All rights reserved.
# Copyright (C) 2017 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <[email protected]>
#
# Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion configs/twr-k64f120m/nsh/setenv.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
# configs/twr-k64f120m/nsh/setenv.sh
#
# Copyright (C) 2011 Gregory Nutt. All rights reserved.
# Copyright (C) 2017 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <[email protected]>
#
# Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion configs/twr-k64f120m/scripts/ld.script
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/****************************************************************************
* configs/twr-k64f120m/scripts/ld.script
*
* Copyright (C) 2011, 2015 Gregory Nutt. All rights reserved.
* Copyright (C) 2017 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <[email protected]>
*
* Redistribution and use in source and binary forms, with or without
Expand Down
10 changes: 5 additions & 5 deletions configs/twr-k64f120m/src/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
############################################################################
# configs/twr-k64f120m/src/Makefile
#
# Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
# Copyright (C) 2017 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <[email protected]>
#
# Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -36,15 +36,15 @@
-include $(TOPDIR)/Make.defs

ASRCS =
#CSRCS = k60_boot.c k60_spi.c
#CSRCS = k64_boot.c k64_spi.c
CSRCS = k64_boot.c

ifeq ($(CONFIG_ARCH_LEDS),y)
CSRCS += k64_leds.c
endif

ifeq ($(CONFIG_ARCH_BUTTONS),y)
#CSRCS += k60_buttons.c
#CSRCS += k64_buttons.c
endif

ifeq ($(CONFIG_LIB_BOARDCTL),y)
Expand All @@ -59,11 +59,11 @@ endif
endif

ifeq ($(CONFIG_USBDEV),y)
#CSRCS += k60_usbdev.c
#CSRCS += k64_usbdev.c
endif

ifeq ($(CONFIG_USBMSC),y)
#CSRCS += k60_usbmsc.c
#CSRCS += k64_usbmsc.c
endif

include $(TOPDIR)/configs/Board.mk
Loading

0 comments on commit 0fc226d

Please sign in to comment.