sysinfo-common.c 424 B

123456789101112131415161718192021
  1. /*
  2. * System information routines for all OMAP based boards.
  3. *
  4. * (C) Copyright 2017 Linaro Ltd.
  5. * Sam Protsenko <semen.protsenko@linaro.org>
  6. *
  7. * SPDX-License-Identifier: GPL-2.0+
  8. */
  9. #include <asm/arch/omap.h>
  10. #include <asm/io.h>
  11. #include <asm/omap_common.h>
  12. /**
  13. * Tell if device is GP/HS/EMU/TST.
  14. */
  15. u32 get_device_type(void)
  16. {
  17. return (readl((*ctrl)->control_status) & DEVICE_TYPE_MASK) >>
  18. DEVICE_TYPE_SHIFT;
  19. }