atmel_ebi.c 796 B

12345678910111213141516171819202122232425262728293031323334353637
  1. // SPDX-License-Identifier: GPL-2.0-only
  2. /*
  3. * Copyright (C) 2022 Microchip Technology Inc. and its subsidiaries
  4. */
  5. #include <dm/device.h>
  6. #include <dm/read.h>
  7. #include <dm/uclass.h>
  8. #include <fdtdec.h>
  9. static int atmel_ebi_probe(struct udevice *dev)
  10. {
  11. int ret;
  12. struct udevice *ndev;
  13. ret = uclass_get_device_by_driver(UCLASS_MTD,
  14. DM_DRIVER_GET(atmel_nand_controller),
  15. &ndev);
  16. if (ret)
  17. printf("Failed to probe nand driver (err = %d)\n", ret);
  18. return ret;
  19. }
  20. static const struct udevice_id atmel_ebi_match[] = {
  21. {.compatible = "microchip,sam9x60-ebi"},
  22. {.compatible = "atmel,sama5d3-ebi"},
  23. { /* Sentinel */ }
  24. };
  25. U_BOOT_DRIVER(atmel_ebi) = {
  26. .name = "atmel_ebi",
  27. .id = UCLASS_NOP,
  28. .of_match = atmel_ebi_match,
  29. .probe = atmel_ebi_probe,
  30. .bind = dm_scan_fdt_dev,
  31. };