cpuinfo.h 931 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /* SPDX-License-Identifier: GPL-2.0-or-later */
  2. /*
  3. * OpenRISC Linux
  4. *
  5. * Linux architectural port borrowing liberally from similar works of
  6. * others. All original copyrights apply as per the original source
  7. * declaration.
  8. *
  9. * OpenRISC implementation:
  10. * Copyright (C) 2003 Matjaz Breskvar <phoenix@bsemi.com>
  11. * Copyright (C) 2010-2011 Jonas Bonn <jonas@southpole.se>
  12. * et al.
  13. */
  14. #ifndef __ASM_OPENRISC_CPUINFO_H
  15. #define __ASM_OPENRISC_CPUINFO_H
  16. #include <asm/spr.h>
  17. #include <asm/spr_defs.h>
  18. struct cache_desc {
  19. u32 size;
  20. u32 sets;
  21. u32 block_size;
  22. u32 ways;
  23. };
  24. struct cpuinfo_or1k {
  25. u32 clock_frequency;
  26. struct cache_desc icache;
  27. struct cache_desc dcache;
  28. u16 coreid;
  29. };
  30. extern struct cpuinfo_or1k cpuinfo_or1k[NR_CPUS];
  31. extern void setup_cpuinfo(void);
  32. /*
  33. * Check if the cache component exists.
  34. */
  35. extern bool cpu_cache_is_present(const unsigned int cache_type);
  36. #endif /* __ASM_OPENRISC_CPUINFO_H */