Changes from review of last PR

This commit is contained in:
Gregory Nutt 2017-02-19 14:58:37 -06:00
parent b566baaf5c
commit 0fc226dd53
18 changed files with 61 additions and 91 deletions

View File

@ -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>
@ -287,6 +287,8 @@ nuttx/
| | `- <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/

View File

@ -1671,6 +1671,8 @@ nuttx/
| | `- README.txt
| |- twr-k60n512/
| | `- README.txt
| |- twr-k64f120m/
| | `- README.txt
| |- u-blox-co27/
| | `- README.txt
| |- ubw32/

View File

@ -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)
@ -207,7 +208,6 @@
# define SIM_SOPT2_RMIISRC SIM_SOPT2_RMIISRC_EXTBYP
#endif
/****************************************************************************
* Private Types
****************************************************************************/
@ -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));
@ -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);
}
@ -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);
}
@ -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
@ -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);
@ -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);

View File

@ -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.
@ -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
@ -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
@ -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
@ -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.

View File

@ -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.
@ -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
@ -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
@ -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.
@ -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

View File

@ -33,5 +33,4 @@ config TWR_K64F120M_SDHC_AUTOMOUNT_UDELAY
default 2000
endif # TWR_K64F120M_SDHC_AUTOMOUNT
endif
endif # ARCH_BOARD_TWR_K64F120M

View File

@ -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 <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@ -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
@ -187,7 +186,7 @@ extern "C" {
*
************************************************************************************/
EXTERN void kinetis_boardinitialize(void);
void kinetis_boardinitialize(void);
#undef EXTERN
#if defined(__cplusplus)
@ -195,4 +194,4 @@ EXTERN void kinetis_boardinitialize(void);
#endif
#endif /* __ASSEMBLY__ */
#endif /* __ARCH_BOARD_BOARD_H */
#endif /* __CONFIGS_TWR_K64F120M_INCLUDE_BOARCH_H */

View File

@ -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 <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without

View File

@ -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 <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without

View File

@ -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 <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without

View File

@ -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 <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without

View File

@ -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 <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without

View File

@ -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 <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
@ -36,7 +36,7 @@
-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)
@ -44,7 +44,7 @@ CSRCS += k64_leds.c
endif
ifeq ($(CONFIG_ARCH_BUTTONS),y)
#CSRCS += k60_buttons.c
#CSRCS += k64_buttons.c
endif
ifeq ($(CONFIG_LIB_BOARDCTL),y)
@ -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

View File

@ -1,7 +1,7 @@
/****************************************************************************
* config/twr-k64f120m/src/k64_appinit.c
*
* Copyright (C) 2011, 2016 Gregory Nutt. All rights reserved.
* Copyright (C) 2017 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@ -55,26 +55,6 @@
#include "kinetis.h"
#include "twrk64.h"
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
/* Configuration ************************************************************/
/****************************************************************************
* Private Types
****************************************************************************/
/****************************************************************************
* Private Data
****************************************************************************/
/****************************************************************************
* Private Functions
****************************************************************************/
/****************************************************************************
* Public Functions
****************************************************************************/
@ -123,9 +103,9 @@ int board_app_initialize(uintptr_t arg)
}
#endif
#ifdef HAVE_MMCSD
/* Initialize the MMC/SD driver and possible automount */
return k64_sdhc_initialize();
#endif
return OK;

View File

@ -1,7 +1,7 @@
/************************************************************************************
* configs/twr-k64f120m/src/k64_automount.c
*
* Copyright (C) 2016 Gregory Nutt. All rights reserved.
* Copyright (C) 2017 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@ -53,22 +53,10 @@
#ifdef HAVE_AUTOMOUNTER
/************************************************************************************
* Pre-processor Definitions
************************************************************************************/
#if 0
#ifndef NULL
# define NULL (FAR void *)0
#endif
#ifndef OK
# define OK 0
#endif
#endif
/************************************************************************************
* Private Types
************************************************************************************/
/* This structure represents the changeable state of the automounter */
struct k64_automount_state_s

View File

@ -1,7 +1,7 @@
/****************************************************************************
* configs/twr-k64f120m/src/k64_leds.c
*
* Copyright (C) 2011, 2013, 2015 Gregory Nutt. All rights reserved.
* Copyright (C) 2017 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@ -49,6 +49,7 @@
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
/* The TWR-K64F120M has four LEDs:
*
* 1. D5 / Green LED PTE6

View File

@ -1,7 +1,7 @@
/****************************************************************************
* config/twr-k64f120m/src/k64_sdhc.c
*
* Copyright (C) 2016 Gregory Nutt. All rights reserved.
* Copyright (C) 2017 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@ -72,16 +72,12 @@
#include "twrk64.h"
#ifdef HAVE_MMCSD
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
/****************************************************************************
* Private Types
****************************************************************************/
/* This structure holds static information unique to one SDHC peripheral */
struct k64_sdhc_state_s

View File

@ -157,7 +157,6 @@
# undef HAVE_USBDEV
#endif
/* How many SPI modules does this chip support? The LM3S6918 supports 2 SPI
* modules (others may support more -- in such case, the following must be
* expanded).
@ -170,7 +169,6 @@
# undef CONFIG_KINETIS_SPI2
#endif
/* Button definitions ***************************************************************/
/* The TWR-K64F120M has 2 user buttons (plus a reset button):
*
@ -268,7 +266,6 @@ TODO See README
void weak_function k64_spidev_initialize(void);
/************************************************************************************
* Name: k64_usbinitialize
*
@ -387,6 +384,5 @@ void k64_automount_event(bool inserted);
int k64_pwm_setup(void);
#endif
#endif /* __ASSEMBLY__ */
#endif /* __CONFIGS_TWR_K64F120M_SRC_TWRK64_H */