Skip to content
Browse files

Workaround for boards with (mistaken) ASCII interpretation for the nu…

…mpins field.

Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
  • Loading branch information...
1 parent 0b3d103 commit eef5dc2448943332c7ed169a934dd152143d4437 @modmaker modmaker committed with koenkooi May 14, 2012
Showing with 6 additions and 0 deletions.
  1. +6 −0 arch/arm/mach-omap2/board-am335xevm.c
View
6 arch/arm/mach-omap2/board-am335xevm.c
@@ -2488,6 +2488,12 @@ static void bone_io_config_from_cape_eeprom( void)
u16* pmuxdata;
char status[ NR_ITEMS( cape_config.muxdata) + 1];
+ // Workaround for capes that have encoded this as ASCII
+ if (cnt > 256) {
+ pr_info( "BeagleBone cape: workaround for bad 'numpins' setting\n");
+ cnt = (cape_config.numpins & 255) - '0';
+ cnt = 10 * cnt + ((cape_config.numpins >> 8) & 255) - '0';
+ }
pr_info( "BeagleBone cape: configuring %2d out of %2d signals:\n",
cnt, NR_ITEMS( cape_config.muxdata));
RULER( NR_ITEMS( cape_config.muxdata));

0 comments on commit eef5dc2

Please sign in to comment.
Something went wrong with that request. Please try again.