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 aml_eth_bind(void* ctx, zx_device_t* parent);
12 
13 static zx_driver_ops_t aml_eth_driver_ops = {
14     .version = DRIVER_OPS_VERSION,
15     .bind = aml_eth_bind,
16 };
17 
18 // clang-format off
19 ZIRCON_DRIVER_BEGIN(aml_eth, aml_eth_driver_ops, "aml-ethernet", "0.1", 3)
20     BI_ABORT_IF(NE, BIND_PLATFORM_DEV_VID, PDEV_VID_KHADAS),
21     BI_ABORT_IF(NE, BIND_PLATFORM_DEV_PID, PDEV_PID_VIM2),
22     BI_MATCH_IF(EQ, BIND_PLATFORM_DEV_DID, PDEV_DID_AMLOGIC_ETH),
23 ZIRCON_DRIVER_END(aml_eth)
24