提交 2e5f98e3 编写于 作者: H Hanjun Guo 提交者: Zheng Zengkai

arm64: phytium: using MIDR_PHYTIUM_FT2000PLUS instead of ARM_CPU_IMP_PHYTIUM

hulk inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I41AUQ
CVE: NA

-------------------------------------

Update the code to using MIDR_PHYTIUM_FT2000PLUS, instead of
ARM_CPU_IMP_PHYTIUM, which will distinguish FTC662 and FTC663.
Signed-off-by: NHanjun Guo <guohanjun@huawei.com>
Cc: Guo Hui <guohui@uniontech.com>
Cc: Cheng Jian <cj.chengjian@huawei.com>
Cc: Zhen Lei <thunder.leizhen@huawei.com>
Cc: Xiuqi Xie <xiexiuqi@huawei.com>
Reviewed-by: NXie XiuQi <xiexiuqi@huawei.com>
Signed-off-by: NCheng Jian <cj.chengjian@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 2157e3ca
......@@ -53,9 +53,11 @@ void store_cpu_topology(unsigned int cpuid)
cpuid_topo->thread_id = -1;
cpuid_topo->core_id = cpuid;
cpuid_topo->package_id = cpu_to_node(cpuid);
if (read_cpuid_implementor() == ARM_CPU_IMP_PHYTIUM) {
/* Some PHYTIUM FT2000PLUS platform firmware has no PPTT table */
if ((read_cpuid_id() & MIDR_CPU_MODEL_MASK) == MIDR_PHYTIUM_FT2000PLUS
&& cpu_to_node(cpuid) == NUMA_NO_NODE) {
cpuid_topo->thread_id = 0;
cpuid_topo->core_id = cpuid;
cpuid_topo->package_id = 0;
}
......
......@@ -375,8 +375,10 @@ static int xhci_pci_setup(struct usb_hcd *hcd)
#include <asm/cputype.h>
static void phytium_xhci_pci_workaround(struct pci_dev *dev)
{
u32 midr = read_cpuid_id();
/* Firmware bug, DMA mask is not reported by the firmware */
if (read_cpuid_implementor() == ARM_CPU_IMP_PHYTIUM)
if ((midr & MIDR_CPU_MODEL_MASK) == MIDR_PHYTIUM_FT2000PLUS)
dma_set_mask(&dev->dev, DMA_BIT_MASK(64));
}
#else
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册