diff options
author | H. Nikolaus Schaller <hns@goldelico.com> | 2013-01-25 10:06:25 +0100 |
---|---|---|
committer | H. Nikolaus Schaller <hns@goldelico.com> | 2013-01-25 10:06:25 +0100 |
commit | 3df518cf99af7c41a44f88bfd13df825a667ac23 (patch) | |
tree | 529285415dc35204322f0d7eb290a99f74d1e98e | |
parent | 123892db1f82697dd09821f74c54c12f4bf5519b (diff) | |
download | bootable_bootloader_goldelico_gta04-3df518cf99af7c41a44f88bfd13df825a667ac23.zip bootable_bootloader_goldelico_gta04-3df518cf99af7c41a44f88bfd13df825a667ac23.tar.gz bootable_bootloader_goldelico_gta04-3df518cf99af7c41a44f88bfd13df825a667ac23.tar.bz2 |
added code to "systest wlan" command to test if U1102 works
-rw-r--r-- | boot-scr/boot.txt | 14 | ||||
-rw-r--r-- | u-boot/board/goldelico/gta04/systest.c | 33 | ||||
-rw-r--r-- | u-boot/include/configs/omap3_beagle.h | 2 |
3 files changed, 39 insertions, 10 deletions
diff --git a/boot-scr/boot.txt b/boot-scr/boot.txt index 3c5fd88..0d876bf 100644 --- a/boot-scr/boot.txt +++ b/boot-scr/boot.txt @@ -119,13 +119,13 @@ if test "x${gta04}" != "x${VERSION}" # then # if load mmc 0:${p} ${loadaddr} uImage # then -# echo found kernel on FAT partition $p +# echo found kernel /uImage on partition $p # run mmcargs # start with default mmc args # KERNEL=1 # DONE=1 # elif load mmc 0:${p} ${loadaddr} /boot/uImage # then -# echo found kernel on EXT partition $p +# echo found kernel /boot/uImage on partition $p # setenv mmcroot "/dev/mmcblk0p${p} rw" # run mmcargs # start with default mmc args # KERNEL=1 @@ -315,7 +315,7 @@ then status set 10 i2c dev 0 - if load mmc 0 0x80200000 x-load.flash + if fatload mmc 0 0x80200000 x-load.flash then status set 18 echo *** flashing Xloader *** @@ -333,7 +333,7 @@ then status set 10 # the official u-boot partition goes from 0x80000 to 0x27ffff i.e. 2 MByte - if load mmc 0 0x80300000 u-boot.flash + if fatload mmc 0 0x80300000 u-boot.flash then echo *** flashing U-Boot *** status set 18 @@ -348,7 +348,7 @@ then # since u-boot is approx 260 kByte status set 10 - if load mmc 0 0x80300000 splash.rgb16z + if fatload mmc 0 0x80300000 splash.rgb16z then echo *** flashing splash *** status set 18 @@ -358,7 +358,7 @@ then fi status set 10 - if load mmc 0 0x80300000 menu.rgb16z + if fatload mmc 0 0x80300000 menu.rgb16z then echo *** flashing menu *** status set 18 @@ -368,7 +368,7 @@ then fi status set 10 - if load mmc 0 0x80300000 boot.scr + if fatload mmc 0 0x80300000 boot.scr then echo *** flashing boot.scr *** status set 18 diff --git a/u-boot/board/goldelico/gta04/systest.c b/u-boot/board/goldelico/gta04/systest.c index 590d70f..7c34101 100644 --- a/u-boot/board/goldelico/gta04/systest.c +++ b/u-boot/board/goldelico/gta04/systest.c @@ -585,11 +585,40 @@ int wlanbtpower(void) int wlanbttest(int test) { /* Bluetooth VAUX4 = 3.3V -- CHECKME: 3.3 V is not officially supported! We use 0x09 = 2.8V here*/ #ifdef CONFIG_OMAP3_GTA04 + int ret=0; wlanbtpower(); if(test) { + int i; // now, we should be able to test the UART for the BT part... - return !bt_hci(1); + ret |= !bt_hci(1); + /* test if U1102 (SN74AVCA604LZYX is feeding back the clock */ + omap_request_gpio(130); + omap_request_gpio(139); + omap_set_gpio_direction(130, 1); // output + omap_set_gpio_direction(139, 1); // input + writew((IDIS | PTD | DIS | M4), OMAP34XX_CTRL_BASE + CP(MMC2_CLK)); // make output GPIO + writew((IEN | PTD | DIS | M4), OMAP34XX_CTRL_BASE + CP(MMC2_DAT7)); // make input GPIO w/o pullup/down + for(i=0; i<8; i++) + { + int val; + udelay(100); + omap_set_gpio_dataout(130, i%2); // set clock output + udelay(300); + val=omap_get_gpio_datain(139); // read clock feedback + if(i%2 == 0) + { + if(val) + printf("clock 0 --> feedback 1\n"); + } + else + { + if(!val) + printf("clock 1 --> feedback 0\n"); + } + } + writew((IDIS | PTD | DIS | M0), OMAP34XX_CTRL_BASE + CP(MMC2_CLK)); // switch back to MMC clock out mode + writew((IEN | PTD | DIS | M1), OMAP34XX_CTRL_BASE + CP(MMC2_DAT7)); // switch back to MMC clock in mode } return 0; #else @@ -724,7 +753,7 @@ static struct { 136, 0, "MMC2_DIR_DAT0", CP(MMC2_DAT4) }, { 137, 0, "MMC2_DIR_DAT1", CP(MMC2_DAT5) }, { 138, 0, "MMC2_DIR_CMD", CP(MMC2_DAT6) }, - { 139, 0, "MMC2_DIR_CLKIN", CP(MMC2_DAT7) }, + { 139, 0, "MMC2_DIR_CLKIN", CP(MMC2_DAT7) }, // if U1102 works, this should follow GPIO130 { 140, 0, "BT_DX", CP(MCBSP3_DX) }, { 141, 0, "BT_DR", CP(MCBSP3_DR) }, { 142, 0, "BT_CLKX", CP(MCBSP3_CLKX) }, diff --git a/u-boot/include/configs/omap3_beagle.h b/u-boot/include/configs/omap3_beagle.h index 9866d49..519da79 100644 --- a/u-boot/include/configs/omap3_beagle.h +++ b/u-boot/include/configs/omap3_beagle.h @@ -322,7 +322,7 @@ #define CONFIG_ENV_OFFSET boot_flash_off #define CONFIG_ENV_ADDR SMNAND_ENV_OFFSET -//#define CONFIG_START_WITH_DEFAULT_ENVIRONMENT 1 +#define CONFIG_START_WITH_DEFAULT_ENVIRONMENT 1 #ifndef __ASSEMBLY__ extern unsigned int boot_flash_base; |