Skip to content
Browse files

beaglebone: always execute the pin free checks

This code needs to run when there are no capes and when there are capes present.

Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
  • Loading branch information...
1 parent 4d4b4e2 commit 17e9236d876bb86622b7e2d41a3a801f7a4a4699 @koenkooi koenkooi committed May 23, 2012
Showing with 13 additions and 13 deletions.
  1. +13 −13 arch/arm/mach-omap2/board-am335xevm.c
View
26 arch/arm/mach-omap2/board-am335xevm.c
@@ -2589,7 +2589,7 @@ static void beaglebone_cape_setup(struct memory_accessor *mem_acc, void *context
ret = mem_acc->read(mem_acc, (char *)&cape_config, 0, sizeof(cape_config));
if (ret != sizeof(cape_config)) {
pr_warning("BeagleBone cape EEPROM: could not read eeprom at address 0x%x\n", capecount + 0x53);
- return;
+ goto out2;
}
if (cape_config.header != AM335X_EEPROM_HEADER) {
@@ -2724,6 +2724,16 @@ static void beaglebone_cape_setup(struct memory_accessor *mem_acc, void *context
beaglebone_w1gpio_free = 0;
}
+ goto out2;
+out:
+ /*
+ * If the EEPROM hasn't been programed or an incorrect header
+ * or board name are read, assume this is an old beaglebone board
+ * (< Rev A3)
+ */
+ pr_err("Could not detect BeagleBone cape properly\n");
+ beaglebone_cape_detected = false;
+out2:
if (capecount > 3) {
if (beaglebone_tsadcpins_free == 1) {
pr_info("BeagleBone cape: exporting ADC pins to sysfs\n");
@@ -2741,20 +2751,10 @@ static void beaglebone_cape_setup(struct memory_accessor *mem_acc, void *context
spi_register_board_info(bone_spidev2_info, ARRAY_SIZE(bone_spidev2_info));
}
if(beaglebone_w1gpio_free == 1) {
+ pr_info("BeagleBone cape: initializing w1-gpio\n");
bonew1_gpio_init(0,0);
}
- }
-
- return;
-out:
- /*
- * If the EEPROM hasn't been programed or an incorrect header
- * or board name are read, assume this is an old beaglebone board
- * (< Rev A3)
- */
- pr_err("Could not detect BeagleBone cape properly\n");
- beaglebone_cape_detected = false;
-
+ }
}
static struct at24_platform_data cape_eeprom_info = {

0 comments on commit 17e9236

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