net/ethoc: add CONFIG_DM_ETH support
Extract reusable parts from ethoc_init, ethoc_set_mac_address, ethoc_send and ethoc_receive, move the rest under #ifdef CONFIG_DM_ETH. Add U_BOOT_DRIVER, eth_ops structure and implement required methods. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
This commit is contained in:
committed by
Joe Hershberger
parent
a84a757ae7
commit
5d43feabf3
20
include/dm/platform_data/net_ethoc.h
Normal file
20
include/dm/platform_data/net_ethoc.h
Normal file
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
* Copyright (C) 2016 Cadence Design Systems Inc.
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0
|
||||
*/
|
||||
|
||||
#ifndef _ETHOC_H
|
||||
#define _ETHOC_H
|
||||
|
||||
#include <net.h>
|
||||
|
||||
#ifdef CONFIG_DM_ETH
|
||||
|
||||
struct ethoc_eth_pdata {
|
||||
struct eth_pdata eth_pdata;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* _ETHOC_H */
|
||||
Reference in New Issue
Block a user