cpu_info-rcar.c 460 B

1234567891011121314151617181920212223242526
  1. /*
  2. * arch/arm/cpu/armv7/rmobile/cpu_info-rcar.c
  3. *
  4. * Copyright (C) 2013,2014 Renesas Electronics Corporation
  5. *
  6. * SPDX-License-Identifier: GPL-2.0
  7. */
  8. #include <common.h>
  9. #include <asm/io.h>
  10. #define PRR 0xFF000044
  11. u32 rmobile_get_cpu_type(void)
  12. {
  13. return (readl(PRR) & 0x00007F00) >> 8;
  14. }
  15. u32 rmobile_get_cpu_rev_integer(void)
  16. {
  17. return ((readl(PRR) & 0x000000F0) >> 4) + 1;
  18. }
  19. u32 rmobile_get_cpu_rev_fraction(void)
  20. {
  21. return readl(PRR) & 0x0000000F;
  22. }