rkcommon.h 656 B

12345678910111213141516171819202122232425262728
  1. /*
  2. * (C) Copyright 2015 Google, Inc
  3. * Written by Simon Glass <sjg@chromium.org>
  4. *
  5. * SPDX-License-Identifier: GPL-2.0+
  6. */
  7. #ifndef _RKCOMMON_H
  8. #define _RKCOMMON_H
  9. enum {
  10. RK_BLK_SIZE = 512,
  11. RK_CODE1_OFFSET = 4,
  12. RK_MAX_CODE1_SIZE = 32 << 10,
  13. };
  14. /**
  15. * rkcommon_set_header() - set up the header for a Rockchip boot image
  16. *
  17. * This sets up a 2KB header which can be interpreted by the Rockchip boot ROM.
  18. *
  19. * @buf: Pointer to header place (must be at least 2KB in size)
  20. * @file_size: Size of the file we want the boot ROM to load, in bytes
  21. * @return 0 if OK, -ENOSPC if too large
  22. */
  23. int rkcommon_set_header(void *buf, uint file_size);
  24. #endif