blob: d1271ffccad2671467ff9e35a9afeed296349fb3 [file] [log] [blame]
Alexey Brodkin511ab042014-02-04 12:56:19 +04001/*
2 * Copyright (C) 2013-2014 Synopsys, Inc. All rights reserved.
3 *
4 * SPDX-License-Identifier: GPL-2.0+
5 */
6
7#include <common.h>
8#include <dwmmc.h>
9#include <malloc.h>
10#include <netdev.h>
11#include <phy.h>
12
13DECLARE_GLOBAL_DATA_PTR;
14
15int board_mmc_init(bd_t *bis)
16{
17 struct dwmci_host *host = NULL;
18
19 host = malloc(sizeof(struct dwmci_host));
20 if (!host) {
21 printf("dwmci_host malloc fail!\n");
22 return 1;
23 }
24
25 memset(host, 0, sizeof(struct dwmci_host));
26 host->name = "Synopsys Mobile storage";
27 host->ioaddr = (void *)ARC_DWMMC_BASE;
28 host->buswidth = 4;
29 host->dev_index = 0;
30 host->bus_hz = 25000000;
31
32 add_dwmci(host, 52000000, 400000);
33
34 return 0;
35}
36
37int board_eth_init(bd_t *bis)
38{
Alexey Brodkinb4d2ad02014-02-08 10:24:35 +040039 if (designware_initialize(ARC_DWGMAC_BASE,
Alexey Brodkin511ab042014-02-04 12:56:19 +040040 PHY_INTERFACE_MODE_RGMII) >= 0)
41 return 1;
42
43 return 0;
44}