Googler | 695f9d9 | 2023-09-11 15:38:29 +0800 | [diff] [blame^] | 1 | /* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */ |
| 2 | /* |
| 3 | * board/amlogic/gxtvbb_p301_v1/eth_setup.c |
| 4 | * |
| 5 | * Copyright (C) 2020 Amlogic, Inc. All rights reserved. |
| 6 | * |
| 7 | */ |
| 8 | |
| 9 | #include <common.h> |
| 10 | #include <malloc.h> |
| 11 | #include <errno.h> |
| 12 | #include <environment.h> |
| 13 | #include <fdt_support.h> |
| 14 | #include <libfdt.h> |
| 15 | #include <asm/arch/eth_setup.h> |
| 16 | /* |
| 17 | * |
| 18 | *setup eth device board socket |
| 19 | * |
| 20 | */ |
| 21 | struct eth_board_socket* eth_board_setup(char *name){ |
| 22 | struct eth_board_socket* new_board; |
| 23 | new_board= (struct eth_board_socket*) malloc(sizeof(struct eth_board_socket)); |
| 24 | if (NULL == new_board) return NULL; |
| 25 | if (name != NULL) { |
| 26 | new_board->name=(char*)malloc(strlen(name)); |
| 27 | strncpy(new_board->name,name,strlen(name)); |
| 28 | }else{ |
| 29 | new_board->name="gxb"; |
| 30 | } |
| 31 | |
| 32 | new_board->eth_pinmux_setup=NULL ; |
| 33 | new_board->eth_clock_configure=NULL; |
| 34 | new_board->eth_hw_reset=NULL; |
| 35 | return new_board; |
| 36 | } |
| 37 | //pinmux HHI_GCLK_MPEG1[bit 3] |
| 38 | // |