summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorMarcus Shawcroft <marcus.shawcroft@arm.com>2016-06-16 17:33:47 +0100
committerMaureen Helm <maureen.helm@nxp.com>2016-10-16 09:57:35 +0000
commit87077727bf88351f4edf43d4007340012c2ebd61 (patch)
tree3a01f9a13a04284bb159e8ce22521e22565bef1e /arch
parent6ce68cb6cbd929d9816b18d8427374084789efb7 (diff)
eth: Add KSDK ENET driver.
Provide a network driver wrapped around the KSDK ENET and PHY drivers. The driver performs one shot PHY setup. There is no support for PHY disconnect, reconnect or configuration change. The PHY setup, implement via KSDK contains polled code that can block the initialization thread for a few seconds. There is no statistics collection for either normal operation or error behaviour. Origin: Original Change-Id: Ia0f2e89a61348ed949976070353e823c178fcb24 Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/soc/nxp_kinetis/k6x/Kconfig.defconfig.mk64f1210
-rw-r--r--arch/arm/soc/nxp_kinetis/k6x/soc.c6
2 files changed, 16 insertions, 0 deletions
diff --git a/arch/arm/soc/nxp_kinetis/k6x/Kconfig.defconfig.mk64f12 b/arch/arm/soc/nxp_kinetis/k6x/Kconfig.defconfig.mk64f12
index d78d28c76..82307e8c3 100644
--- a/arch/arm/soc/nxp_kinetis/k6x/Kconfig.defconfig.mk64f12
+++ b/arch/arm/soc/nxp_kinetis/k6x/Kconfig.defconfig.mk64f12
@@ -209,4 +209,14 @@ endif # SPI_K64
endif # SPI
+if ETHERNET
+
+config ETH_KSDK
+ def_bool y
+
+config ETH_KSDK_0
+ def_bool y
+
+endif # ETHERNET
+
endif # SOC_MK64F12
diff --git a/arch/arm/soc/nxp_kinetis/k6x/soc.c b/arch/arm/soc/nxp_kinetis/k6x/soc.c
index 061b8542a..ecb86b443 100644
--- a/arch/arm/soc/nxp_kinetis/k6x/soc.c
+++ b/arch/arm/soc/nxp_kinetis/k6x/soc.c
@@ -41,6 +41,8 @@
#define ER32KSEL_RTC (2)
#define ER32KSEL_LPO1KHZ (3)
+#define TIMESRC_OSCERCLK (2)
+
/*
* K64F Flash configuration fields
* These 16 bytes, which must be loaded to address 0x400, include default
@@ -139,6 +141,10 @@ static ALWAYS_INLINE void clkInit(void)
CONFIG_MCG_FCRDIV);
CLOCK_SetSimConfig(&simConfig);
+
+#if CONFIG_ETH_KSDK
+ CLOCK_SetEnetTime0Clock(TIMESRC_OSCERCLK);
+#endif
}
/**