Author: kientzle
Date: Sat Jan 19 17:12:23 2013
New Revision: 245672
URL: http://svnweb.freebsd.org/changeset/base/245672

Log:
  Clarify the error messages for unrecognized pins and muxtypes.

Modified:
  head/sys/arm/ti/ti_scm.c

Modified: head/sys/arm/ti/ti_scm.c
==============================================================================
--- head/sys/arm/ti/ti_scm.c    Sat Jan 19 16:22:41 2013        (r245671)
+++ head/sys/arm/ti/ti_scm.c    Sat Jan 19 17:12:23 2013        (r245672)
@@ -155,8 +155,10 @@ ti_scm_padconf_set_internal(struct ti_sc
        }
 
        /* couldn't find the mux mode */
-       if (mode >= 8)
+       if (mode >= 8) {
+               printf("Invalid mode \"%s\"\n", muxmode);
                return (EINVAL);
+       }
 
        /* set the mux mode */
        reg_val |= (uint16_t)(mode & ti_scm_dev.padconf_muxmode_mask);
@@ -391,13 +393,16 @@ ti_scm_padconf_init_from_fdt(struct ti_s
                                while (padstates->state != NULL) {
                                        if (strcmp(padstates->state, padstate) 
== 0) {
                                                err = 
ti_scm_padconf_set_internal(sc,
-                                                       padconf, muxname, 
padstates->reg);
+                                                   padconf, muxname, 
padstates->reg);
                                        }
                                        padstates++;
                                }
                                if (err)
-                                       device_printf(sc->sc_dev, "err: failed 
to configure"
-                                               "pin \"%s\"\n", 
padconf->ballname);
+                                       device_printf(sc->sc_dev,
+                                           "err: failed to configure "
+                                           "pin \"%s\" as \"%s\"\n",
+                                           padconf->ballname,
+                                           muxname);
                        }
                        padconf++;
                }
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to