Commit 42fb35a8 authored by davidcunado-arm's avatar davidcunado-arm Committed by GitHub
Browse files

Merge pull request #982 from hzhuang1/fix_hikey960

Fix hikey960
parents c396b736 8aa928ac
...@@ -45,7 +45,7 @@ int ufshc_send_uic_cmd(uintptr_t base, uic_cmd_t *cmd) ...@@ -45,7 +45,7 @@ int ufshc_send_uic_cmd(uintptr_t base, uic_cmd_t *cmd)
data = mmio_read_32(base + IS); data = mmio_read_32(base + IS);
} while ((data & UFS_INT_UCCS) == 0); } while ((data & UFS_INT_UCCS) == 0);
mmio_write_32(base + IS, UFS_INT_UCCS); mmio_write_32(base + IS, UFS_INT_UCCS);
return mmio_read_32(base + UCMDARG2) && CONFIG_RESULT_CODE_MASK; return mmio_read_32(base + UCMDARG2) & CONFIG_RESULT_CODE_MASK;
} }
int ufshc_dme_get(unsigned int attr, unsigned int idx, unsigned int *val) int ufshc_dme_get(unsigned int attr, unsigned int idx, unsigned int *val)
...@@ -77,7 +77,7 @@ int ufshc_dme_get(unsigned int attr, unsigned int idx, unsigned int *val) ...@@ -77,7 +77,7 @@ int ufshc_dme_get(unsigned int attr, unsigned int idx, unsigned int *val)
return -EINVAL; return -EINVAL;
} while ((data & UFS_INT_UCCS) == 0); } while ((data & UFS_INT_UCCS) == 0);
mmio_write_32(base + IS, UFS_INT_UCCS); mmio_write_32(base + IS, UFS_INT_UCCS);
data = mmio_read_32(base + UCMDARG2) && CONFIG_RESULT_CODE_MASK; data = mmio_read_32(base + UCMDARG2) & CONFIG_RESULT_CODE_MASK;
assert(data == 0); assert(data == 0);
*val = mmio_read_32(base + UCMDARG3); *val = mmio_read_32(base + UCMDARG3);
...@@ -106,7 +106,7 @@ int ufshc_dme_set(unsigned int attr, unsigned int idx, unsigned int val) ...@@ -106,7 +106,7 @@ int ufshc_dme_set(unsigned int attr, unsigned int idx, unsigned int val)
return -EINVAL; return -EINVAL;
} while ((data & UFS_INT_UCCS) == 0); } while ((data & UFS_INT_UCCS) == 0);
mmio_write_32(base + IS, UFS_INT_UCCS); mmio_write_32(base + IS, UFS_INT_UCCS);
data = mmio_read_32(base + UCMDARG2) && CONFIG_RESULT_CODE_MASK; data = mmio_read_32(base + UCMDARG2) & CONFIG_RESULT_CODE_MASK;
assert(data == 0); assert(data == 0);
return 0; return 0;
} }
......
...@@ -111,9 +111,7 @@ static int adcin_data_remap(unsigned int adcin_value) ...@@ -111,9 +111,7 @@ static int adcin_data_remap(unsigned int adcin_value)
{ {
int ret; int ret;
if (adcin_value < HKADC_DATA_GRADE0) if (adcin_value < HKADC_DATA_GRADE1)
ret = BOARDID_UNKNOWN;
else if (adcin_value < HKADC_DATA_GRADE1)
ret = BOARDID_VALUE0; ret = BOARDID_VALUE0;
else if (adcin_value < HKADC_DATA_GRADE2) else if (adcin_value < HKADC_DATA_GRADE2)
ret = BOARDID_VALUE1; ret = BOARDID_VALUE1;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment