arch/arm/src/lpc54xx: Add (incomplete) Ethernet register definition file. Add framework for an Ethernet driver. Initial commit is just the drivers/skeleton.c with naming updated for the LPC54.

This commit is contained in:
Gregory Nutt
2017-12-26 12:55:58 -06:00
parent edef041f93
commit f5c5f89592
10 changed files with 1749 additions and 16 deletions
+7
View File
@@ -401,6 +401,13 @@ config LPC54_EMC
bool "External Memory Controller (EMC)"
default n
config LPC54_ETHERNET
bool "Ethernet"
default n
select NETDEVICES
select ARCH_HAVE_PHY
depends on EXPERIMENTAL
config LPC54_LCD
bool "LCD controller"
default n
+3
View File
@@ -136,6 +136,9 @@ ifeq ($(CONFIG_LPC54_EMC),y)
CHIP_CSRCS += lpc54_emc.c
endif
ifeq ($(CONFIG_LPC54_ETHERNET),y)
CHIP_CSRCS += lpc54_ethernet.c
endif
ifeq ($(CONFIG_LPC54_LCD),y)
CHIP_CSRCS += lpc54_lcd.c
endif
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -4,7 +4,7 @@
* Copyright (C) 2017 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Derives from the LPC43xx tickless most logic
* Derives from the LPC43xx tickless mode logic
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
+5 -3
View File
@@ -77,9 +77,11 @@ STATUS
been well tested.
2017-12-26: Added an RNG driver. The RNG is actually controlled by a ROM
function. This driver seems to work fine when single stepping. However,
if I collect samples indefinitely, I do a reserved interrupt. I suspect
that to use the ROM at high frequencies it may be necessary to modify the
ROM access timing in some way.
if I collect samples indefinitely, I get a reserved interrupt. The symptom
before the crash is that local variables are getting corrupted after the
call into ROM. Increasing the stack size does not seem to help. Perhaps
to use the ROM at high frequencies it may be necessary to modify the ROM
access timing in some way???
There is still no support for the Accelerometer, SPIFI, Ethernet, or USB.
There is a complete, but not-yet-functional SD card drirver. There is a
+1
View File
@@ -3,6 +3,7 @@ CONFIG_ARCH_BOARD_LPCXPRESSO_LPC54628=y
CONFIG_ARCH_BOARD="lpcxpresso-lpc54628"
CONFIG_ARCH_CHIP_LPC54628=y
CONFIG_ARCH_CHIP_LPC54XX=y
CONFIG_ARCH_INTERRUPTSTACK=2048
CONFIG_ARCH_STACKDUMP=y
CONFIG_ARCH_STDARG_H=y
CONFIG_ARCH="arm"
@@ -4,6 +4,7 @@ CONFIG_ARCH_BOARD="lpcxpresso-lpc54628"
CONFIG_ARCH_BUTTONS=y
CONFIG_ARCH_CHIP_LPC54628=y
CONFIG_ARCH_CHIP_LPC54XX=y
CONFIG_ARCH_INTERRUPTSTACK=2048
CONFIG_ARCH_IRQBUTTONS=y
CONFIG_ARCH_STACKDUMP=y
CONFIG_ARCH_STDARG_H=y
@@ -7,6 +7,7 @@ CONFIG_ARCH_BOARD_LPCXPRESSO_LPC54628=y
CONFIG_ARCH_BOARD="lpcxpresso-lpc54628"
CONFIG_ARCH_CHIP_LPC54628=y
CONFIG_ARCH_CHIP_LPC54XX=y
CONFIG_ARCH_INTERRUPTSTACK=2048
CONFIG_ARCH_STACKDUMP=y
CONFIG_ARCH_STDARG_H=y
CONFIG_ARCH="arm"
+7 -12
View File
@@ -1,7 +1,7 @@
/****************************************************************************
* drivers/net/skeleton.c
*
* Copyright (C) 2017 Gregory Nutt. All rights reserved.
* Copyright (C) 2018 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -71,16 +71,11 @@
# error Work queue support is required in this configuration (CONFIG_SCHED_WORKQUEUE)
#else
/* Use the selected work queue */
/* The low priority work queue is preferred. If it is not enabled, LPWORK
* will be the same as HPWORK.
*/
# if defined(CONFIG_skeleton_HPWORK)
# define ETHWORK HPWORK
# elif defined(CONFIG_skeleton_LPWORK)
# define ETHWORK LPWORK
# else
# error Neither CONFIG_skeleton_HPWORK nor CONFIG_skeleton_LPWORK defined
# endif
#endif
#define ETHWORK LPWORK
/* CONFIG_skeleton_NINTERFACES determines the number of physical interfaces
* that will be supported.
@@ -127,7 +122,7 @@ struct skel_driver_s
* Private Data
****************************************************************************/
/* These statically allocated structur would mean that only a single
/* These statically allocated structur eswould mean that only a single
* instance of the device could be supported. In order to support multiple
* devices instances, this data would have to be allocated dynamically.
*/
@@ -192,7 +187,7 @@ static void skel_ipv6multicast(FAR struct skel_driver_s *priv);
#endif
#ifdef CONFIG_NETDEV_IOCTL
static int skel_ioctl(FAR struct net_driver_s *dev, int cmd,
unsigned long arg);
unsigned long arg);
#endif
/****************************************************************************