cpu.c 944 B

1234567891011121314151617181920212223242526272829303132
  1. // SPDX-License-Identifier: GPL-2.0
  2. //
  3. // Copyright (c) 2009-2011 Samsung Electronics Co., Ltd.
  4. // http://www.samsung.com
  5. //
  6. // Samsung CPU Support
  7. #include <linux/module.h>
  8. #include <linux/kernel.h>
  9. #include <linux/init.h>
  10. #include <linux/io.h>
  11. #include "map-base.h"
  12. #include "cpu.h"
  13. unsigned long samsung_cpu_id;
  14. void __init s3c64xx_init_cpu(void)
  15. {
  16. samsung_cpu_id = readl_relaxed(S3C_VA_SYS + 0x118);
  17. if (!samsung_cpu_id) {
  18. /*
  19. * S3C6400 has the ID register in a different place,
  20. * and needs a write before it can be read.
  21. */
  22. writel_relaxed(0x0, S3C_VA_SYS + 0xA1C);
  23. samsung_cpu_id = readl_relaxed(S3C_VA_SYS + 0xA1C);
  24. }
  25. pr_info("Samsung CPU ID: 0x%08lx\n", samsung_cpu_id);
  26. pr_err("The platform is deprecated and scheduled for removal. Please reach to the maintainers of the platform and [email protected] if you still use it. Without such feedback, the platform will be removed after 2022.\n");
  27. }