Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e051af57 authored by Michal Simek's avatar Michal Simek
Browse files

microblaze: Extend cpuinfo for support write-back caches



There is missing checking agains PVR but this is not important
for now. There are some missing checking too.

Signed-off-by: default avatarMichal Simek <monstr@monstr.eu>
parent 44e4e196
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -53,6 +53,7 @@ struct cpuinfo {
	u32 dcache_write;
	u32 dcache_write;
	u32 dcache_line_length;
	u32 dcache_line_length;
	u32 dcache_size;
	u32 dcache_size;
	u32 dcache_wb;
	unsigned long dcache_base;
	unsigned long dcache_base;
	unsigned long dcache_high;
	unsigned long dcache_high;


+1 −0
Original line number Original line Diff line number Diff line
@@ -96,6 +96,7 @@ void __init set_cpuinfo_static(struct cpuinfo *ci, struct device_node *cpu)
	ci->dcache_size = fcpu(cpu, "d-cache-size");
	ci->dcache_size = fcpu(cpu, "d-cache-size");
	ci->dcache_base = fcpu(cpu, "d-cache-baseaddr");
	ci->dcache_base = fcpu(cpu, "d-cache-baseaddr");
	ci->dcache_high = fcpu(cpu, "d-cache-highaddr");
	ci->dcache_high = fcpu(cpu, "d-cache-highaddr");
	ci->dcache_wb = fcpu(cpu, "xlnx,dcache-use-writeback");


	ci->use_dopb = fcpu(cpu, "xlnx,d-opb");
	ci->use_dopb = fcpu(cpu, "xlnx,d-opb");
	ci->use_iopb = fcpu(cpu, "xlnx,i-opb");
	ci->use_iopb = fcpu(cpu, "xlnx,i-opb");
+6 −2
Original line number Original line Diff line number Diff line
@@ -103,11 +103,15 @@ static int show_cpuinfo(struct seq_file *m, void *v)
	else
	else
		count += seq_printf(m, "Icache:\t\tno\n");
		count += seq_printf(m, "Icache:\t\tno\n");


	if (cpuinfo.use_dcache)
	if (cpuinfo.use_dcache) {
		count += seq_printf(m,
		count += seq_printf(m,
				"Dcache:\t\t%ukB\n",
				"Dcache:\t\t%ukB\n",
				cpuinfo.dcache_size >> 10);
				cpuinfo.dcache_size >> 10);
		if (cpuinfo.dcache_wb)
			count += seq_printf(m, "\t\twrite-back\n");
		else
		else
			count += seq_printf(m, "\t\twrite-through\n");
	} else
		count += seq_printf(m, "Dcache:\t\tno\n");
		count += seq_printf(m, "Dcache:\t\tno\n");


	count += seq_printf(m,
	count += seq_printf(m,