Fix the build. protctl is only used on powerpc.

While here, remove the need to check the SVR SPR, as others may be compatible
with the p1022-esdhc type.
This commit is contained in:
Justin Hibbits 2016-11-02 23:43:18 +00:00
parent ea9e23edf3
commit e8f58f1fb8
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=308231

View File

@ -811,7 +811,9 @@ fsl_sdhci_attach(device_t dev)
struct fsl_sdhci_softc *sc = device_get_softc(dev);
int rid, err;
phandle_t node;
#ifdef __powerpc__
uint32_t protctl;
#endif
sc->dev = dev;
@ -869,7 +871,7 @@ fsl_sdhci_attach(device_t dev)
*/
#ifdef __powerpc__
/* P1022 has the '*_BRST_LEN' fields as reserved, always reading 0x10 */
if ((SVR_VER(mfspr(SPR_SVR)) & 0xfff6) == SVR_P1022 )
if (ofw_bus_is_compatible(dev, "fsl,p1022-esdhc"))
WR4(sc, SDHC_WTMK_LVL, 0x10801080);
else
#endif