1 // Copyright 2018 The Fuchsia Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 #include <ddk/binding.h>
5 #include <ddk/device.h>
6 #include <ddk/driver.h>
7 #include <ddk/platform-defs.h>
8 #include <stdlib.h>
9 #include <string.h>
10 
11 extern zx_status_t dwmac_bind(void* ctx, zx_device_t* parent);
12 
13 static zx_driver_ops_t dwmac_driver_ops = {
14     .version = DRIVER_OPS_VERSION,
15     .bind = dwmac_bind,
16 };
17 
18 // clang-format off
19 ZIRCON_DRIVER_BEGIN(dwmac, dwmac_driver_ops, "designware_mac", "0.1", 2)
20     BI_ABORT_IF(NE, BIND_PLATFORM_DEV_VID, PDEV_VID_DESIGNWARE),
21     BI_MATCH_IF(EQ, BIND_PLATFORM_DEV_DID, PDEV_DID_ETH_MAC),
22 ZIRCON_DRIVER_END(dwmac)
23