fdt_reset.h 695 B

1234567891011121314151617181920212223242526272829303132
  1. /*
  2. * SPDX-License-Identifier: BSD-2-Clause
  3. *
  4. * Copyright (c) 2020 Western Digital Corporation or its affiliates.
  5. *
  6. * Authors:
  7. * Anup Patel <anup.patel@wdc.com>
  8. */
  9. #ifndef __FDT_RESET_H__
  10. #define __FDT_RESET_H__
  11. #include <sbi/sbi_types.h>
  12. struct fdt_reset {
  13. const struct fdt_match *match_table;
  14. int (*init)(void *fdt, int nodeoff, const struct fdt_match *match);
  15. };
  16. /**
  17. * fdt_reset_driver_init() - initialize reset driver based on the device-tree
  18. */
  19. int fdt_reset_driver_init(void *fdt, struct fdt_reset *drv);
  20. /**
  21. * fdt_reset_init() - initialize reset drivers based on the device-tree
  22. *
  23. * This function shall be invoked in final init.
  24. */
  25. void fdt_reset_init(void);
  26. #endif