PageRenderTime 50ms CodeModel.GetById 21ms RepoModel.GetById 0ms app.codeStats 0ms

/drivers/net/wireless/tiwlan1251/pform/linux/inc/mmc_tnetw1150_api.h

http://github.com/CyanogenMod/cm-kernel
C Header | 115 lines | 28 code | 14 blank | 73 comment | 0 complexity | ffc1460d3878989d1ae4757bdc416e63 MD5 | raw file
Possible License(s): AGPL-1.0, GPL-2.0, LGPL-2.0
  1. /****************************************************************************
  2. **+-----------------------------------------------------------------------+**
  3. **| |**
  4. **| Copyright(c) 1998 - 2008 Texas Instruments. All rights reserved. |**
  5. **| All rights reserved. |**
  6. **| |**
  7. **| Redistribution and use in source and binary forms, with or without |**
  8. **| modification, are permitted provided that the following conditions |**
  9. **| are met: |**
  10. **| |**
  11. **| * Redistributions of source code must retain the above copyright |**
  12. **| notice, this list of conditions and the following disclaimer. |**
  13. **| * Redistributions in binary form must reproduce the above copyright |**
  14. **| notice, this list of conditions and the following disclaimer in |**
  15. **| the documentation and/or other materials provided with the |**
  16. **| distribution. |**
  17. **| * Neither the name Texas Instruments nor the names of its |**
  18. **| contributors may be used to endorse or promote products derived |**
  19. **| from this software without specific prior written permission. |**
  20. **| |**
  21. **| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |**
  22. **| "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |**
  23. **| LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |**
  24. **| A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |**
  25. **| OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |**
  26. **| SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |**
  27. **| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |**
  28. **| DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |**
  29. **| THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |**
  30. **| (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |**
  31. **| OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |**
  32. **| |**
  33. **+-----------------------------------------------------------------------+**
  34. ****************************************************************************/
  35. #ifndef MMC_TNETW1150_API_H
  36. #define MMC_TNETW1150_API_H
  37. #undef CONFIG_CEE
  38. #define CONFIG_CEE
  39. #include "mmc_omap_api.h"
  40. /*
  41. First partition is used to access first 90K of memory
  42. during FW download or 90K of data memory during WLAN driver
  43. regular work (0x00000-0x167FF; 0x00C800-0x22FFF - two
  44. regions with overlap).
  45. */
  46. #define SDIO_DOWNLOAD_PARTITION_START (0x000000)
  47. /* 90K*/
  48. #define SDIO_DOWNLOAD_PARTITION_SIZE (0x016800)
  49. /*End of download partition is (0x0167FF) (90K)*/
  50. /* 60K*/
  51. #define SDIO_MEM_PARTITION_START (0x00F000)
  52. /* 90K*/
  53. #define SDIO_MEM_PARTITION_SIZE (0x016800)
  54. /*End of first partition is (0x025799) (150K)*/
  55. /*
  56. Second partition is 34K of registers.
  57. */
  58. /*3072K*/
  59. #define SDIO_REG_PARTITION_START (0x300000)
  60. /* 34K*/
  61. #define SDIO_REG_PARTITION_SIZE (0x008800)
  62. /*End of second partition is (0x3087FF) (3106K) */
  63. /* 90K*/
  64. #define SDIO_DRIVER_REG_PARTITION_START (0x016800)
  65. #define AMAP_MAX_REGIONS 4
  66. /*128K-64B*/
  67. #define AMAP_ONE_REGION (0x01FFC0)
  68. /* Status Card Register (SCR) address mapping */
  69. typedef struct {
  70. unsigned int reg_size; /* Region size */
  71. unsigned int scr_offset; /* Region offset in SCR address space */
  72. } address_mapping_region;
  73. typedef struct {
  74. unsigned int num_of_parts; /* number of partitions in use */
  75. /* h/w-dependant base addresses */
  76. address_mapping_region map_reg[AMAP_MAX_REGIONS]; /* CSR addresses */
  77. } SDIO_TNETWConfigParams;
  78. /*
  79. Initialization of TNETW memory configuration.
  80. */
  81. SDIO_Status SDIO_TNETWInit(SDIO_TNETWConfigParams *);
  82. /*
  83. This function configures the slave SDIO device for the required
  84. operation mode.
  85. */
  86. SDIO_Status SDIO_TNETWConfig(SDIO_Handle, Peripheral_ConfigParams **);
  87. /*
  88. This function performs convertion of peripheral adddress into 17 bits
  89. SDIO address. If found that the memory partition configuration must be
  90. changed, the memory is re-mapped in accordance to requested address.
  91. */
  92. SDIO_Address SDIO_ConvertTNETWToSDIOMaster(Peripheral_Address, SDIO_BufferLength);
  93. /*
  94. This function sets the ELP REG in the TNET
  95. */
  96. SDIO_Status SDIO_TNETW_Set_ELP_Reg(SDIO_Handle sdioHandle, Peripheral_Address start_addr, unsigned int data);
  97. /*
  98. This function gets the ELP REG in the TNET
  99. */
  100. SDIO_Status SDIO_TNETW_Get_ELP_Reg(SDIO_Handle sdioHandle, Peripheral_Address start_addr, unsigned int *data);
  101. #endif /* MMC_TNETW1150_API_H */