From 5d43feabf3707ae4e879b54450e5a3c3c664b2b9 Mon Sep 17 00:00:00 2001 From: Max Filippov Date: Fri, 5 Aug 2016 18:26:17 +0300 Subject: 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 Reviewed-by: Simon Glass Acked-by: Joe Hershberger --- include/dm/platform_data/net_ethoc.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 include/dm/platform_data/net_ethoc.h (limited to 'include/dm/platform_data/net_ethoc.h') diff --git a/include/dm/platform_data/net_ethoc.h b/include/dm/platform_data/net_ethoc.h new file mode 100644 index 0000000..1d8c73c --- /dev/null +++ b/include/dm/platform_data/net_ethoc.h @@ -0,0 +1,20 @@ +/* + * Copyright (C) 2016 Cadence Design Systems Inc. + * + * SPDX-License-Identifier: GPL-2.0 + */ + +#ifndef _ETHOC_H +#define _ETHOC_H + +#include + +#ifdef CONFIG_DM_ETH + +struct ethoc_eth_pdata { + struct eth_pdata eth_pdata; +}; + +#endif + +#endif /* _ETHOC_H */ -- cgit v1.1 From 59b7dfa0d1dd54752427fc5f8b80e3f72e847298 Mon Sep 17 00:00:00 2001 From: Max Filippov Date: Fri, 5 Aug 2016 18:26:20 +0300 Subject: net/ethoc: support private memory configurations The ethoc device can be configured to have a private memory region instead of having access to the main memory. In that case egress packets must be copied into that memory for transmission and pointers to that memory need to be passed to net_process_received_packet or returned from the recv callback. Signed-off-by: Max Filippov Acked-by: Joe Hershberger --- include/dm/platform_data/net_ethoc.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/dm/platform_data/net_ethoc.h') diff --git a/include/dm/platform_data/net_ethoc.h b/include/dm/platform_data/net_ethoc.h index 1d8c73c..3f94bde 100644 --- a/include/dm/platform_data/net_ethoc.h +++ b/include/dm/platform_data/net_ethoc.h @@ -13,6 +13,7 @@ struct ethoc_eth_pdata { struct eth_pdata eth_pdata; + phys_addr_t packet_base; }; #endif -- cgit v1.1