Message ID | 1484027877-8729-1-git-send-email-gwshan@linux.vnet.ibm.com |
---|---|
State | Superseded |
Headers | show |
On Tue, Jan 10, 2017 at 04:57:57PM +1100, Gavin Shan wrote: >The platform isn't compatible with palmetto until the root device-tree >node's "model" property is NULL or "palmetto". However, we could have >"TN71-BP012" for the property on palmetto. > > linux# cat /proc/device-tree/model > TN71-BP012 > >This skips the validation on root device-tree node's "model" property >on palmetto, meaning we will check the "compatible" property only. > >Cc: stable >Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Stewart, could you please comment? Without it, the PCI slots aren't populated on palmetto where I usually test PCI functionality on. Thanks, Gavin >--- > platforms/astbmc/palmetto.c | 11 ++--------- > 1 file changed, 2 insertions(+), 9 deletions(-) > >diff --git a/platforms/astbmc/palmetto.c b/platforms/astbmc/palmetto.c >index 0c7feff..dbe203e 100644 >--- a/platforms/astbmc/palmetto.c >+++ b/platforms/astbmc/palmetto.c >@@ -25,15 +25,8 @@ > > static bool palmetto_probe(void) > { >- const char *model; >- >- if (!dt_node_is_compatible(dt_root, "ibm,powernv")) >- return false; >- >- /* Temporary ... eventually we'll get that in compatible */ >- model = dt_prop_get_def(dt_root, "model", NULL); >- if ((!model || !strstr(model, "palmetto")) && >- (!dt_node_is_compatible(dt_root, "tyan,palmetto"))) >+ if (!dt_node_is_compatible(dt_root, "ibm,powernv") || >+ !dt_node_is_compatible(dt_root, "tyan,palmetto")) > return false; > > /* Lot of common early inits here */ >-- >2.7.4 >
diff --git a/platforms/astbmc/palmetto.c b/platforms/astbmc/palmetto.c index 0c7feff..dbe203e 100644 --- a/platforms/astbmc/palmetto.c +++ b/platforms/astbmc/palmetto.c @@ -25,15 +25,8 @@ static bool palmetto_probe(void) { - const char *model; - - if (!dt_node_is_compatible(dt_root, "ibm,powernv")) - return false; - - /* Temporary ... eventually we'll get that in compatible */ - model = dt_prop_get_def(dt_root, "model", NULL); - if ((!model || !strstr(model, "palmetto")) && - (!dt_node_is_compatible(dt_root, "tyan,palmetto"))) + if (!dt_node_is_compatible(dt_root, "ibm,powernv") || + !dt_node_is_compatible(dt_root, "tyan,palmetto")) return false; /* Lot of common early inits here */
The platform isn't compatible with palmetto until the root device-tree node's "model" property is NULL or "palmetto". However, we could have "TN71-BP012" for the property on palmetto. linux# cat /proc/device-tree/model TN71-BP012 This skips the validation on root device-tree node's "model" property on palmetto, meaning we will check the "compatible" property only. Cc: stable Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> --- platforms/astbmc/palmetto.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-)