移植wifi,显然必须了解wifi的基础结构,尤其在Android下的结构。

1 wifi的系统结构:

2 SDIO/wifi驱动分析

1.1 Android 下的wifi配置设置

在GOOGLE的网站上有一个wifi的大致介绍 -》

1.2 WL18xx Platform Integration Guide

http://processors.wiki.ti.com/index.php/WL18xx_Platform_Integration_Guide

Software Porting

WLAN SW Blocks

The host communicates via SDIO to the WLAN device. On the device side, the WLAN MAC is responsiblefor the 802.11 MAC functions, and conveys WLAN packets from/to the external host to/from the FW.The MAC is responsible for the timing and the time critical decisions only. The PHY performs the 802.11PHY functions of encoding/decoding and modulation/demodulation, and is responsible for the RF functionsof up/down modulation to carrier frequency, filtering and amplification.

Board Initialization file

  • For each platform there is a board file inside the PSP where the initial board related software bringup is done
  • The board file is located inside the linux kernel source tree under “arch/arm/mach-(omap2/davinci)/board-xxxx.c
  • Note: This presentation is mostly based on board_am335x-evm.c located under “arch/arm/mach-omap2”, but similar initilization is needed for every new platform which is connecting to the same type of WiLink module.

【实践】x210系统下的板子的设置如下:

hanson@hanson-desktop:~/x210_ics_rtm_v13/kernel/arch/arm/mach-s5pv210$ vim mach-x210.c

Initialization sequence

  • Inside the am335x-evm board file there is an initialization function called am335x_evm_setup(). This function is called when the Linux kernel boots.
  • For the standard am335x-evm this function is calling setup_general_purpose_evm() function which sets up all the peripherals that are in use.
  • This function initiates calls to all the initialization functions which are located inside the gen_purp_evm_dev_cfg[] device configuration structure.
  • The functions which are related to the connectivity parts are mmc2_wl12xx_init, uart1_wl12xx_init and wl12xx_init. These functions are descibed below.

MMC initialization

  • The WLAN subsystem is usually connected using a second MMC port of the host processor. The first MMC is normally used for SD card.
  • On the Aam335x-evm MMC3 is being used and an init function is provided for initializing this MMC structure data.
  • Before we can use the SDIO pins they need to be muxed in the kernel for SDIO mode.

The SDIO related pin muxes are set in the structure below:

/* Module pin mux for wlan and bluetooth */
static struct pinmux_config mmc2_wl12xx_pin_mux[] = {{"gpmc_a1.mmc2_dat0",   OMAP_MUX_MODE3 | AM33XX_PIN_INPUT_PULLUP},<br>{"gpmc_a2.mmc2_dat1", OMAP_MUX_MODE3 | AM33XX_PIN_INPUT_PULLUP},{"gpmc_a3.mmc2_dat2",   OMAP_MUX_MODE3 | AM33XX_PIN_INPUT_PULLUP},{"gpmc_ben1.mmc2_dat3", OMAP_MUX_MODE3 | AM33XX_PIN_INPUT_PULLUP},{"gpmc_csn3.mmc2_cmd",  OMAP_MUX_MODE3 | AM33XX_PIN_INPUT_PULLUP},{"gpmc_clk.mmc2_clk",   OMAP_MUX_MODE3 | AM33XX_PIN_INPUT_PULLUP},{NULL, 0},
};

The below function is used for setting up this MMC interface. In this function the pin mux structure is being intialized and then the inteface is initilized as a non-removeable card working in 4-Bit mode.

static void mmc2_wl12xx_init(int evm_id, int profile)
{setup_pin_mux(mmc2_wl12xx_pin_mux);am335x_mmc[1].mmc =        3;am335x_mmc[1].name =     "wl1271";am335x_mmc[1].caps =        MMC_CAP_4_BIT_DATA | MMC_CAP_POWER_OFF_CARD;am335x_mmc[1].nonremovable =   true;am335x_mmc[1].gpio_cd =       -EINVAL;am335x_mmc[1].gpio_wp =        -EINVAL;am335x_mmc[1].ocr_mask =   MMC_VDD_32_33 | MMC_VDD_33_34; /* 3V3 *//* mmc will be initialized when mmc0_init is called */return;
}
  • The mmc2_wl12xx_init() function is placed inside the board configuration structure seen below and when it is called during board startup a second mmc interface is created in the kernel (mmc1) which is used for communicating with the WLAN sub-system.
/* General Purpose EVM */
static struct evm_dev_cfg gen_purp_evm_dev_cfg[] = {{enable_ecap0, DEV_ON_DGHTR_BRD, (PROFILE_0 | PROFILE_1 | PROFILE_2 | PROFILE_7) },{lcdc_init, DEV_ON_DGHTR_BRD, (PROFILE_0 | PROFILE_1 | PROFILE_2 | PROFILE_7) },
...
...{mmc1_init,      DEV_ON_DGHTR_BRD, PROFILE_2},{mmc2_wl12xx_init, DEV_ON_BASEBOARD, (PROFILE_0 | PROFILE_3 | PROFILE_5)},{mmc0_init,      DEV_ON_BASEBOARD, (PROFILE_ALL & ~PROFILE_5)},{mmc0_no_cd_init, DEV_ON_BASEBOARD, PROFILE_5},{spi0_init,        DEV_ON_DGHTR_BRD, PROFILE_2},{uart1_wl12xx_init,    DEV_ON_BASEBOARD, (PROFILE_0 | PROFILE_3 | PROFILE_5)},{wl12xx_init,        DEV_ON_BASEBOARD, (PROFILE_0 | PROFILE_3 | PROFILE_5)},
...
...{haptics_init,   DEV_ON_DGHTR_BRD, (PROFILE_4)},{NULL, 0, 0},
};

GPIO Pins Configuration

  • In addition to the MMC, UART intefcaes, the WiLink module needs three additional GPIO lines:

    • WLAN Enable (GPIO1_16): Set as an output pin
    • WLAN Irq (GPIO3_17): Set as a GPIO input pin
    • BT/GPS Enable (GPIO3_21): Set as a GPIO output pin with pull-up enabled. The pullup is needed for keeping the chip enabled when system is suspending so we would not need to releoad the firmware after each suspend/resume cycle.

The strucure below is used for setting the muxing of these pins:

static struct pinmux_config wl12xx_pin_mux[] = {{"gpmc_a0.gpio1_16",       OMAP_MUX_MODE7 | AM33XX_PIN_OUTPUT},{"mcasp0_ahclkr.gpio3_17", OMAP_MUX_MODE7 | AM33XX_PIN_INPUT},{"mcasp0_ahclkx.gpio3_21", OMAP_MUX_MODE7 | AM33XX_PIN_OUTPUT_PULLUP},{NULL, 0},
};

Important Build guid:(Suggest from TI emproee)

0 BSP build guide

http://processors.wiki.ti.com/index.php?title=WL18xx_AMxxx_platform_integration_guide

1

http://processors.wiki.ti.com/index.php/WL18xx_WiFi_Build_Process

2

http://www.omappedia.com/wiki/4AJ.2.3_OMAP4_Jelly_Bean_Release_Notes#Building_WLAN_driver

Ref : Basic:

1    Android WIFI框架分析(1)

http://blog.csdn.net/wh_19910525/article/details/7384480

http://blog.csdn.net/menuconfig/article/details/7306931

2 Android_Wifi_HAL层

http://blog.csdn.net/c0611/article/details/16804035

3 android WIFI学习总结

http://blog.csdn.net/ldinvicible/article/details/11909411

4 Android开发--WIFi基本结构

http://blog.csdn.net/liuhui_8989/article/details/23045499

5 Android平台开发-WIFI 驱动移植 -- 详细

http://blog.csdn.net/wh_19910525/article/details/7392199

6  WIFI INSTANT by blog

http://blog.csdn.net/wh_19910525/article/category/1107726

7 Android WIFI guide

http://www.kandroid.org/online-pdk/guide/wifi.html

8 SDIO/wifi驱动分析BASIC

http://blog.csdn.net/wh_19910525/article/details/7392518

ref:Porting

1 Atheros AR6003 SDIO WiFi Integration

https://developer.ridgerun.com/wiki/index.php/Atheros_AR6003_SDIO_WiFi_Integration#Open_Source_project

2 wl12xx Driver for Texas Instrumwl12xx

Driver for Texas Instruments' Wilink(tm) combo devices WL1271/3 and WL1281/3 ents' Wilink(tm) combo devices WL1271/3 and WL1281/

http://wireless.kernel.org/en/users/Drivers/wl12xx

3 linux下MMC/SD/SDIO驱动系列之二 ---- host注册过程(一)

http://blog.csdn.net/xieweihua2012/article/details/12844733

4 How to Support New WiFi Card in AndroidHow to Support New WiFi Card in Android

https://community.freescale.com/docs/DOC-93603

TI ReF:

-1 TI E2E for wireless

WiLink™ WiFi + Bluetooth Forum

WL18xx & WL127x Applications.

http://e2e.ti.com/support/wireless_connectivity/f/307.aspx

-2 TI Linux SDKs

http://www.ti.com/lsds/ti/tools-software/linux.page

0 basic WL18xx Linux Wireless Architecture

WL18xx Linux Wireless Architecture

http://processors.wiki.ti.com/index.php/WL18xx_Linux_Wireless_Architecture

1 WL18xx Guide list

1 http://processors.wiki.ti.com/index.php/WL18xx?DCMP=wilink8&HQS=wilink8wiki

2 WL18xx Platform Integration Guide

http://processors.wiki.ti.com/index.php/WL18xx_Platform_Integration_Guide

3 TI mail list

https://lists.yoctoproject.org/listinfo/meta-ti

4 TI support and question website

http://e2e.ti.com/

http://www.wi-linktech.com/

http://www.deyisupport.com/question_answer/dsp_arm/sitara_arm/f/25/t/59289.aspx

5 TI-Android-ICS-PortingGuide

http://processors.wiki.ti.com/index.php/TI-Android-ICS-PortingGuide#WLAN

TI-Android-ICS-4.0.3-DevKit-3.0.1 ReleaseNotes

http://processors.wiki.ti.com/index.php/TI-Android-ICS-4.0.3-DevKit-3.0.1_ReleaseNotes

Ref: Deep:

1 Linux WPA/WPA2/IEEE 802.1X Supplicant

http://w1.fi/wpa_supplicant/

Source Referece:

1 完整的TI解决方案

http://processors.wiki.ti.com/index.php/TI-Android-ICS-4.0.3-DevKit-3.0.1_ReleaseNotes

Component Version Repository (Branch) Commit ID / Baseline Base Repository Commit ID / Base Tag
Bootloader 2011.09 http://gitorious.org/rowboat/u-boot

(am335x-master-android-ics)

e3f1bbc http://arago-project.org/git/projects/?p=u-boot-am33x.git;a=shortlog;h=refs/heads/AM335XPSP_04.06.00.07 AM335XPSP_04.06.00.07
AM335x Linux Kernel 3.2 http://gitorious.org/rowboat/kernel

(rowboat-am335x-kernel-3.2)

1b21543a http://arago-project.org/git/projects/?p=linux-am33x.git;a=shortlog;h=refs/heads/AM335XPSP_04.06.00.07  
SGX Release ddk 1.8

http://gitorious.org/rowboat/hardware-ti-sgx

(ti_sgx_sdk-ddk_1.8)

30ccc34 None None
Android Filesystem ICS 4.0.3 http://gitorious.org/rowboat TI-Android-ICS-4.0.3-DevKit-3.0.1.xml https://android.googlesource.com/platform/manifest.git android-4.0.3_r1

2 WL8 Rlease:

http://processors.wiki.ti.com/index.php/WL8_release_download_page

本文系统:

ARM cotext-A8 x210 platform

Android 4.0

Ubuntu 10.10

Made by Frank Huang @ makin.huang@gmail.com




【实践驱动开发3-004】TI WL1835MODCOM8 在android的移植 - 系统结构初始化和参考列表相关推荐

  1. 【实践驱动开发3-001】TI WL1835MODCOM8 在android的移植 - 准备

    TI 的无线芯片的支持很好,不过有一个问题,那就是TI总是一堆堆的给你东西,TI的OMAP系列虽然很好,但是贵啊!如果我们想在其他平台上拿TI的某一个模块进来,还真的有点麻烦. 本文尝试在x210上用 ...

  2. 【实践驱动开发3-003】TI WL1835MODCOM8 在android的移植 - 软件获取2

    TI的产品线太多了,所以当你要选定一部分资源的时候,往往会陷入浩瀚的海洋的感觉,一个链接接着一个链接: 1 软件下载链接指向:http://processors.wiki.ti.com/index.p ...

  3. 【实践驱动开发3-006】TI WL1835MODCOM8 在android的移植 - SDIO wifi驱动的注册步骤

     说明之前:文档建立在实际的项目中: 硬件环境是三星x210,软件是android4.0 ubuntu13.04 EDITING AREA Linux的platform 机制简介 从 Linux ...

  4. 【实践驱动开发3-002】TI WL1835MODCOM8 在android的移植 - 软件获取

    继续上一篇,我们还是要找到能减少改动最小的一个SDK驱动包.TI 给出的SDK是基于am3355的,所以,改动是必须的, 这里把大部分SDK相关的东西该为灰色. 在软件包里面的发表说明里面有关于软件的 ...

  5. 【实践驱动开发3-005】TI WL1835MODCOM8 在android的移植 - SDIO and wifi 基础

    硬件环境是三星x210,软件是android4.0 ubuntu13.04 1 SDIO接口介绍 1.sdio接口层解析 SDIO总线 SDIO总线 和 USB总线 类似,SDIO也有两端,其中一端是 ...

  6. 【实践驱动开发2-001】wifi 在android 下的实现 - AR6000 系列移植详细步骤

    说明之前:文档建立在实际的项目中: 硬件环境是三星x210,软件是android4.0 ubuntu13.04 1  如何获取驱动: 1.1 AR6000 3.1的资源包最新可以找到的地方: 2014 ...

  7. WINCE下SOS驱动开发

    ********************************LoongEmbedded************************ 作者:LoongEmbedded(kandi) 时间:201 ...

  8. 如何正确入门Windows系统下驱动开发领域?

    [作者] 猪头三 作者网站: http://www.x86asm.com 原文链接: http://blog.csdn.net/Code_GodFather/...0/5975901.aspx [贡献 ...

  9. 随想录(驱动开发程序员需要的一些技能)

    [ 声明:版权所有,欢迎转载,请勿用于商业用途.  联系信箱:feixiaoxing @163.com] 驱动程序员因为和底层设备打交道的地方比较多,所以很多人认为开发驱动程序是一门非常高级的活儿.但 ...

最新文章

  1. 前端需要了解的 Cookies 和 WebStorage
  2. 深入理解计算机操作系统(一)
  3. MYSQL出错代码和出错信息对照表
  4. 【深度学习】mask_rcnn训练自己的数据集以及模型使用(实践结合GitHub项目)
  5. 网上linux实验平台,Linux操作系统实验教程
  6. 前端javascript知识(二)
  7. 特斯拉工程师当UP主评测自动驾驶,结果被公司开除
  8. 如何更新mysql数据库字段_如何使用MySQL一个表中的字段更新另一个表中字段
  9. 韩国ETRI提出实时Anchor-Free实例分割算法CenterMask,代码将开源
  10. 亲测三遍!8步搭建一个属于自己的网站
  11. js解析json数据
  12. VMware下虚拟系统上网与互ping
  13. c语言switch编写个人所得税,C语言编写一个计算个人所得税的程序,要求输入收入金额,能够输...
  14. Spring2.5注解事务配置
  15. Ubantu指令收藏
  16. 照片转3d模型_云从科技3D人体重建技术刷新3项纪录!仅凭照片即可生成精细模型...
  17. 深度解析|积分墙防作弊,一直在发展
  18. (解读)什么是渗透测试(Penetration Testing)?
  19. 关于 ‘cosylocal‘ 进程占满内存的问题
  20. Mysql orchestrator高可用

热门文章

  1. JEB 无源码调试 以dvm smali字节码方式,Demo尝试
  2. docsify搭建知识库
  3. python 标准库之os
  4. react hooks使用_如何使用React Hooks和Context API构建简单的PokémonWeb App
  5. 数据结构链表代码_代码简介:链表数据结构如何工作
  6. 设置maven的阿里云代理
  7. Python3中异常处理和try/except,try/finally的用法
  8. 2万8千张图片如何用python组成一张(简洁明了附源码)
  9. Python爬虫进阶必备 | X中网密码加密算法分析
  10. windows 下使用 nc 命令报错,与 Linux 不同。