summaryrefslogtreecommitdiff
path: root/arch/blackfin/mach-bf609/boards/ezkit.c
diff options
context:
space:
mode:
authorSonic Zhang <sonic.zhang@analog.com>2013-08-15 10:08:05 +0400
committerSteven Miao <realmz6@gmail.com>2013-09-13 06:42:38 +0400
commit1d899fd652fac98bcbad1f1573f5a6a0224ea2dd (patch)
tree76ebbde8f4759df5db210a0ecc086b29d5de6bad /arch/blackfin/mach-bf609/boards/ezkit.c
parente57860929c7d9833275597e5f02810c262a8b6e0 (diff)
downloadlinux-1d899fd652fac98bcbad1f1573f5a6a0224ea2dd.tar.xz
blackfin: Add STMMAC platform data to enable dwmac1000 driver on BF60x.
- Enable GMAC - Set propler DMA PBL - Disable DMA store and forward mode - Select PTP input clock from MII clock. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Steven Miao <realmz6@gmail.com>
Diffstat (limited to 'arch/blackfin/mach-bf609/boards/ezkit.c')
-rw-r--r--arch/blackfin/mach-bf609/boards/ezkit.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/blackfin/mach-bf609/boards/ezkit.c b/arch/blackfin/mach-bf609/boards/ezkit.c
index d4dcbab70bb7..d56a55ad83a7 100644
--- a/arch/blackfin/mach-bf609/boards/ezkit.c
+++ b/arch/blackfin/mach-bf609/boards/ezkit.c
@@ -104,6 +104,7 @@ static struct platform_device bfin_rotary_device = {
#if defined(CONFIG_STMMAC_ETH) || defined(CONFIG_STMMAC_ETH_MODULE)
#include <linux/stmmac.h>
+#include <linux/phy.h>
static unsigned short pins[] = P_RMII0;
@@ -111,11 +112,26 @@ static struct stmmac_mdio_bus_data phy_private_data = {
.phy_mask = 1,
};
+static struct stmmac_dma_cfg eth_dma_cfg = {
+ .pbl = 2,
+};
+
+int stmmac_ptp_clk_init(struct platform_device *pdev)
+{
+ bfin_write32(PADS0_EMAC_PTP_CLKSEL, 0);
+ return 0;
+}
+
static struct plat_stmmacenet_data eth_private_data = {
+ .has_gmac = 1,
.bus_id = 0,
.enh_desc = 1,
.phy_addr = 1,
.mdio_bus_data = &phy_private_data,
+ .dma_cfg = &eth_dma_cfg,
+ .force_thresh_dma_mode = 1,
+ .interface = PHY_INTERFACE_MODE_RMII,
+ .init = stmmac_ptp_clk_init,
};
static struct platform_device bfin_eth_device = {