[PATCH 2/3] ep93xx: add /proc/cpuinfo extension

H Hartley Sweeten hartleys at visionengravers.com
Tue Mar 23 12:34:32 EDT 2010


On Tuesday, March 23, 2010 8:36 AM, Mika Westerberg wrote:
> On Mon, Mar 22, 2010 at 01:39:00PM -0500, H Hartley Sweeten wrote:
>> Add a callback to mach-ep93xx for the /proc/cpuinfo extension.
>> 
>> This cpuinfo extension dumps the processor unique ID and Maverick
>> Key as well as the processor silicon revision and a number of
>> boot configuration options.
>> 
>> Signed-off-by: H Hartley Sweeten <hsweeten at visionengravers.com>
>> 
>> ---

[snip]

>> +	seq_printf(m, "Boot mode\t: %s %ssync %sternal %d-bit\n",
>> +		(val & EP93XX_SYSCON_SYSCFG_SBOOT) ? "serial" : "normal",
>> +		(val & EP93XX_SYSCON_SYSCFG_LASDO) ? "" : "a",
>> +		(val & EP93XX_SYSCON_SYSCFG_LEECLK) ? "in" : "ex",
>> +		ep93xx_boot_width());
>           ^^^^^^^^^^^^^^^^^
> 
> I got following compile error:
>
>  CC      arch/arm/mach-ep93xx/core.o
> arch/arm/mach-ep93xx/core.c: In function 'ep93xx_cpuinfo':
> arch/arm/mach-ep93xx/core.c:707: error: implicit declaration of function 'ep93xx_boot_width'
> make[1]: *** [arch/arm/mach-ep93xx/core.o] Error 1
> make: *** [arch/arm/mach-ep93xx] Error 2
>
> Should this function be included in the patch set also? I applied these on top of
> latest mainline kernel.

Grr.. Left that piece out, sorry about that.

I will post the updated patch in a bit.

If you want to test this now, just put the following after the 
ep93xx_chip_revision() in core.c (and of course the proper prototype in
platform.h).

Regards,
Hartley

---

/**
 * ep93xx_boot_width() - returns the external bus width for the boot device
 */
int ep93xx_boot_width(void)
{
	u32 val;
	int width;

	val = __raw_readl(EP93XX_SYSCON_SYSCFG);
	if (val & EP93XX_SYSCON_SYSCFG_LASDO) {
		/* Sync boot */
		if (val & EP93XX_SYSCON_SYSCFG_LCSN7)
			width = 32;
		else
			width = 16;
	} else {
		/* Async boot */
		if (val & EP93XX_SYSCON_SYSCFG_LCSN7)
			width = 32;
		else if (val & EP93XX_SYSCON_SYSCFG_LCSN6)
			width = 16;
		else
			width = 8;
	}
	return width;
}



More information about the linux-arm-kernel mailing list