0003-ARM-kirkwood-fix-cpu-info-for-6282-device-id.patch 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. From fa0ece2cc571ba1ccb9d1e0a8d337417c032576e Mon Sep 17 00:00:00 2001
  2. From: Luka Perkov <luka@openwrt.org>
  3. Date: Mon, 23 Dec 2013 01:23:07 +0100
  4. Subject: [PATCH 3/9] ARM: kirkwood: fix cpu info for 6282 device id
  5. Signed-off-by: Luka Perkov <luka@openwrt.org>
  6. CC: Prafulla Wadaskar <prafulla@marvell.com>
  7. ---
  8. arch/arm/cpu/arm926ejs/kirkwood/cpu.c | 11 ++++++++---
  9. 1 file changed, 8 insertions(+), 3 deletions(-)
  10. --- a/arch/arm/cpu/arm926ejs/kirkwood/cpu.c
  11. +++ b/arch/arm/cpu/arm926ejs/kirkwood/cpu.c
  12. @@ -253,7 +253,7 @@ static void kw_sysrst_check(void)
  13. #if defined(CONFIG_DISPLAY_CPUINFO)
  14. int print_cpuinfo(void)
  15. {
  16. - char *rev;
  17. + char *rev = "??";
  18. u16 devid = (readl(KW_REG_PCIE_DEVID) >> 16) & 0xffff;
  19. u8 revid = readl(KW_REG_PCIE_REVID) & 0xff;
  20. @@ -264,7 +264,13 @@ int print_cpuinfo(void)
  21. switch (revid) {
  22. case 0:
  23. - rev = "Z0";
  24. + if (devid == 0x6281)
  25. + rev = "Z0";
  26. + else if (devid == 0x6282)
  27. + rev = "A0";
  28. + break;
  29. + case 1:
  30. + rev = "A1";
  31. break;
  32. case 2:
  33. rev = "A0";
  34. @@ -273,7 +279,6 @@ int print_cpuinfo(void)
  35. rev = "A1";
  36. break;
  37. default:
  38. - rev = "??";
  39. break;
  40. }