[PATCH 4/11] Add platform_has_feature()

Michael Ellerman michael at ellerman.id.au
Fri Mar 15 00:42:12 EST 2013

On Fri, Mar 08, 2013 at 10:02:31PM -0600, Nathan Fontenot wrote:
> The firmware_has_feature() function makes it easy to check for supported
> features of the hardware. There is not corresponding function to check for
> features supported by the client architecture.

Actually it doesn't tell you about features of the hardware, it tells
you about features of the firmware, or the platform ..

So I think you should really just be adding a new firmware feature flag,
and adding whatever glue code is required to set it based on what you
find in the device tree.

Also notice where you end up using it:

-       if (firmware_has_feature(FW_FEATURE_OPAL))
+       if (firmware_has_feature(FW_FEATURE_OPAL) ||
+           platform_has_feature(OV5_TYPE1_AFFINITY)) {
+               dbg("Using form 1 affinity\n");
		form1_affinity = 1;

Could be:

+       if (firmware_has_feature(FW_FEATURE_FORM1_AFFINITY) ||


More information about the Linuxppc-dev mailing list