summaryrefslogtreecommitdiff
path: root/board/hardkernel/odroid-common/eth_setup.c
diff options
context:
space:
mode:
authorDongjin Kim <tobetter@gmail.com>2018-07-31 12:23:27 +0900
committerDongjin Kim <tobetter@hardkernel.com>2018-07-31 12:29:22 +0900
commit7d6fe6cfd577e07ddd1a6659625002ef188bde1b (patch)
treeaa44d95addbcf28a1a3e9c044d01beee19efcaf1 /board/hardkernel/odroid-common/eth_setup.c
parent84bb12df725fc9d1c9321e8ee03c9a80a1ef7a15 (diff)
downloadu-boot-odroid-c1-7d6fe6cfd577e07ddd1a6659625002ef188bde1b.tar.gz
ODROID-COMMON: board: move 'eth_setup.c' to common folder
Change-Id: I78bf1944328da225d526c60d29d6b9011233f1a3 Signed-off-by: Dongjin Kim <tobetter@gmail.com>
Diffstat (limited to 'board/hardkernel/odroid-common/eth_setup.c')
-rw-r--r--board/hardkernel/odroid-common/eth_setup.c52
1 files changed, 52 insertions, 0 deletions
diff --git a/board/hardkernel/odroid-common/eth_setup.c b/board/hardkernel/odroid-common/eth_setup.c
new file mode 100644
index 0000000000..519aff0cbd
--- /dev/null
+++ b/board/hardkernel/odroid-common/eth_setup.c
@@ -0,0 +1,52 @@
+/*
+ * board/hardkernel/odroid-common/eth_setup.c
+ *
+ * Copyright (C) 2015 Amlogic, Inc. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+*/
+
+#include <common.h>
+#include <malloc.h>
+#include <errno.h>
+#include <environment.h>
+#include <fdt_support.h>
+#include <libfdt.h>
+#include <asm/arch/eth_setup.h>
+
+/*
+ * setup eth device board socket
+ */
+struct eth_board_socket* eth_board_setup(char *name)
+{
+ struct eth_board_socket* new_board;
+
+ new_board = (struct eth_board_socket*)malloc(sizeof(struct eth_board_socket));
+ if (NULL == new_board)
+ return NULL;
+
+ if (name != NULL) {
+ new_board->name = (char*)malloc(strlen(name));
+ strncpy(new_board->name, name, strlen(name));
+ }else{
+ new_board->name = "gxb";
+ }
+
+ new_board->eth_pinmux_setup = NULL ;
+ new_board->eth_clock_configure = NULL;
+ new_board->eth_hw_reset = NULL;
+
+ return new_board;
+}