mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 11:26:02 +09:00
ddr: fix dmc_monitor register bit missmatch on G12A/G12B [1/1]
PD#172256 Problem: On G12A/G12B, bit for ddr0 protection 0 vilation is not same Solution: Fix bit missmatch problem Verify: U212 Change-Id: I5dca14c8bc96bdcb85dbe8bbd5a9a18157834bcf Signed-off-by: tao zeng <tao.zeng@amlogic.com>
This commit is contained in:
@@ -83,10 +83,17 @@ static void check_violation(struct dmc_monitor *mon)
|
||||
struct page *page;
|
||||
unsigned long *p;
|
||||
char id_str[4];
|
||||
char off1 = 21, off2 = 10;
|
||||
|
||||
if (mon->chip == MESON_CPU_MAJOR_ID_G12B) {
|
||||
/* bit fix for G12B */
|
||||
off1 = 24;
|
||||
off2 = 13;
|
||||
}
|
||||
|
||||
for (i = 1; i < 4; i += 2) {
|
||||
status = dmc_rw(DMC_VIO_ADDR0 + (i << 2), 0, DMC_READ);
|
||||
if (!(status & DMC_VIO_PROT_RANGE0))
|
||||
if (!(status & (1 << off1)))
|
||||
continue;
|
||||
addr = dmc_rw(DMC_VIO_ADDR0 + ((i - 1) << 2), 0,
|
||||
DMC_READ);
|
||||
@@ -100,7 +107,7 @@ static void check_violation(struct dmc_monitor *mon)
|
||||
continue;
|
||||
}
|
||||
|
||||
port = (status >> 13) & 0x1f;
|
||||
port = (status >> off2) & 0x1f;
|
||||
subport = (status >> 6) & 0xf;
|
||||
pr_info(DMC_TAG", addr:%08lx, s:%08lx, ID:%s, sub:%s, c:%ld\n",
|
||||
addr, status, to_ports(port),
|
||||
|
||||
@@ -66,7 +66,7 @@ static int dev_name_to_id(const char *dev_name)
|
||||
}
|
||||
if (i >= dmc_mon->port_num)
|
||||
return -1;
|
||||
return i;
|
||||
return dmc_mon->port[i].port_id;
|
||||
}
|
||||
|
||||
char *to_ports(int id)
|
||||
|
||||
Reference in New Issue
Block a user