Error Resetting Sdio Communications -110
0 Wiki Network Create a new issue Builds Commits Issue Boards Authored by Linux Build Service Account 2013-04-03 15:48:05 -0700 Browse Files Options Browse Files Tag Download Plain Diff Committed by Gerrit - the friendly Code Review server 2013-04-03 15:48:05 -0700 Commit 2d5a4861a22a2d4d01329c2c34ffa64d1ec55da0 2d5a4861 2 parents 1e5b3c5f f57db62c Merge "mmc: sdio: fix sdio_reset_comm() to take care of UHS card reset" Hide whitespace changes Inline Side-by-side Showing 1 changed file with 1 additions and 74 deletions drivers/mmc/core/sdio.c drivers/mmc/core/sdio.c View file @2d5a486 ......@@ -1243,79 +1243,6 @@ err: int sdio_reset_comm(struct mmc_card *card) { struct mmc_host *host = card->host; u32 ocr; int err; printk("%s():\n", __func__); mmc_claim_host(host); mmc_go_idle(host); mmc_set_clock(host, host->f_min); err = mmc_send_io_op_cond(host, 0, &ocr); if (err) goto err; host->ocr = mmc_select_voltage(host, ocr); if (!host->ocr) { err = -EINVAL; goto err; } err = mmc_send_io_op_cond(host, host->ocr, &ocr); if (err) goto err; if (mmc_host_is_spi(host)) { err = mmc_spi_set_crc(host, use_spi_crc); if (err) goto err; } if (!mmc_host_is_spi(host)) { err = mmc_send_relative_addr(host, &card->rca); if (err) goto err; mmc_set_bus_mode(host, MMC_BUSMODE_PUSHPULL); } if (!mmc_host_is_spi(host)) { err = mmc_select_card(card); if (err) goto err; } /* * Switch to high-speed (if supported). */ err = sdio_enable_hs(card); if (err > 0) mmc_sd_go_highspeed(card); else if (err) goto err; /* * Change to the card's maximum speed. */ mmc_set_clock(host, mmc_sdio_get_max_clock(card)); err = sdio_enable_4bit_bus(card); if (err > 0) { if (host->caps & MMC_CAP_8_BIT_DATA) mmc_set_bus_width(host, MMC_BUS_WIDTH_8); else if (host->caps & MMC_CAP_4_BIT_DATA) mmc_set_bus_width(host, MMC_BUS_WIDTH_4); } else if (err) goto err; mmc_release_host(host); return 0; err: printk("%s: Error resetting
free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or (at * your option) any later version. */#include
and get a .ko file(such as dhd.ko). (3)Opennvram.txt and modify crystal (for example,you use 38.4MHz on hardware,then xtalfreq=38400) (4)copy dhd.ko to /opt/nfsroot/system/lib/modules (5)copy http://pr010.blogspot.com/2015/07/broadcom-wifi-driver-porting.html sdio-bcm4329-dhd.bin(firmware) and nvram.txt to /opt/nfsroot/system/lib/modules (6)enter ~/android22/kernel_imx/drivers/mmc/core and find sdio.c http://git.ti.com/android-sdk/kernel-omap/commit/fab60fb8440ad72f849185360b18a0e80e6f1c90?format=patch file search whether there is the following function, if not , please search it on website(google) int sdio_reset_comm(struct mmc_card *card) { } EXPORT_SYMBOL(sido_reset_comm); (7)configure linux kernel a. choose Device driver-->Network driver support-->Wireless LAN [*]Wireless Lan [*]IEEE802.11 For error resetting Host AP [*]Support downloading firmware images with host AP driver. [*] Support for non-volatile firmware download b.choose Networking support-->Wireless [*] old wireless static regulatory definitions [*] wireless extensions sysfs files (8) load driver #/system/bin/insmod /system/lib/modules/dhd.ko "firmware_path=/system/etc/wifi/sdio-bcm4329-dhd.bin nvram_path=/system/etc/wifi/nvram.txt" The following will display : /#DHD: dongle ram error resetting sdio size is set to 294912(orig 294912) Firmware version = wl0: Aug 11 2010 13:21:15 version 4.218.243.1 eth1: Broadcom Dongle Host Driver mac=00:26:37:a4:f7:e7 Enter wl_control_wl_start Exited wl_control_wl_start <-------How to debug wifi on linux command line --------------------> customer can use "wireless-tools" to debug wifi network. this tool can be downloaded from internet. after compliling, some tools can be got : frename iwconfig iwevent iwgetid iwlist iwpriv iwspy **Use "iwconfig" to set AP ( router) #iwconfig eth1 mode Managed #iwconfig eth1 key 1234567890 #iwconfig eth1 key open #iwconfig eth1 essid TP-LINK_432F1A **Get DHCP Address #/system/bin/dhcpcd eth1 **Search AP #iwlist eth1 scan Cell 01 - Address: 00:23:CD:43:2F:1A ESSID:"TP-LINK_432F1A" Cell 02 - Address: 00:23:CD:5D:56:66 ESSID:"TP-LINK_789" ******Customer can also use "wpa_supplicant" to test BCM4329" A. Configurewpa_supplicant.conf file Open /opt/nfsroot/system/etc/wifi/wpa_supplicant.conf and add the following lines: ctrl_interface=DIR=/data/misc/wifi/wpa_supplicant GROUP=wifi ap_scan=1 update_config=1 B. Run wpa_supplicant service by back #/system/bin/wpa_supplicant -B -Dwext -ieth1 -c/data/misc/wifi/wpa_supplicant.conf C. Run wpa