From: Oleksij Rempel Date: Sun, 27 Apr 2014 08:21:43 +0000 (+0200) Subject: remove some unused io defines X-Git-Tag: 1.4.0~6^2~10 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=cfbf660c5c53c02d4b7185b9d171e873c930054a;p=open-ath9k-htc-firmware.git remove some unused io defines Signed-off-by: Oleksij Rempel --- diff --git a/target_firmware/magpie_fw_dev/target/adf/adf_os_io_pvt.h b/target_firmware/magpie_fw_dev/target/adf/adf_os_io_pvt.h index 91d99c7..fd5659a 100755 --- a/target_firmware/magpie_fw_dev/target/adf/adf_os_io_pvt.h +++ b/target_firmware/magpie_fw_dev/target/adf/adf_os_io_pvt.h @@ -47,35 +47,8 @@ (((x) & 0x0000ff00) << 8) | \ (((x) & 0x000000ff) << 24)) -#if 0 -static __inline __uint64_t -__bswap64(__uint64_t _x) -{ - - return ((_x >> 56) | ((_x >> 40) & 0xff00) | ((_x >> 24) & 0xff0000) | - ((_x >> 8) & 0xff000000) | ((_x << 8) & ((__uint64_t)0xff << 32)) | - ((_x << 24) & ((__uint64_t)0xff << 40)) | - ((_x << 40) & ((__uint64_t)0xff << 48)) | ((_x << 56))); -} -#endif - -#define __adf_os_reg_read8(_dev, _addr) oops no implementation... - -#define __adf_os_reg_read16(_dev, _addr) oops no implementation... - -#define __adf_os_reg_read64(_dev, _addr) oops no implementation... - -#define __adf_os_reg_write8(_dev, _addr, _val) oops no implementation... - -#define __adf_os_reg_write16(_dev, _addr, _val) oops no implementation... - -// RAY: The delay is required. But needs to know why?? -//#define __adf_os_reg_write32(_dev, _addr, _val) *((a_uint32_t *)(0x10ff0000 + _addr)) = _val; A_DELAY_USECS(100); -//RAY 0806: Move the delay (100us) to the host side because of throughput issue #define __adf_os_reg_write32(_dev, _addr, _val) *((a_uint32_t *)(WLAN_BASE_ADDRESS + _addr)) = _val; -#define __adf_os_reg_write64(_dev, _addr, _val) oops no implementation... - #define __adf_os_ntohs(x) x #define __adf_os_ntohl(x) x @@ -83,19 +56,5 @@ __bswap64(__uint64_t _x) #define __adf_os_htonl(x) x #define __adf_os_cpu_to_le16(x) __bswap16(x) -#define __adf_os_cpu_to_le32(x) __bswap32(x) -#define __adf_os_cpu_to_le64(x) x - -#define __adf_os_cpu_to_be16(x) x -#define __adf_os_cpu_to_be32(x) x -#define __adf_os_cpu_to_be64(x) x - -#define __adf_os_le16_to_cpu(x) __bswap16(x) -#define __adf_os_le32_to_cpu(x) __bswap32(x) -#define __adf_os_le64_to_cpu(x) x - -#define __adf_os_be16_to_cpu(x) x -#define __adf_os_be32_to_cpu(x) x -#define __adf_os_be64_to_cpu(x) x #endif diff --git a/target_firmware/magpie_fw_dev/target/inc/adf_os_io.h b/target_firmware/magpie_fw_dev/target/inc/adf_os_io.h index 56528a1..018206f 100755 --- a/target_firmware/magpie_fw_dev/target/inc/adf_os_io.h +++ b/target_firmware/magpie_fw_dev/target/inc/adf_os_io.h @@ -43,27 +43,6 @@ #include - -/** - * @brief Read an 8-bit register value - * - * @param[in] osdev platform device object - * @param[in] addr register addr - * - * @return An 8-bit register value. - */ -#define adf_os_reg_read8(osdev, addr) __adf_os_reg_read8(osdev, addr) - -/** - * @brief Read a 16-bit register value - * - * @param[in] osdev platform device object - * @param[in] addr register addr - * - * @return A 16-bit register value. - */ -#define adf_os_reg_read16(osdev, addr) __adf_os_reg_read16(osdev, addr) - /** * @brief Read a 32-bit register value * @@ -78,34 +57,6 @@ static inline a_uint32_t ioread32(a_uint32_t addr) #define ioread32_mac(addr) ioread32(WLAN_BASE_ADDRESS + (addr)) -/** - * @brief Read a 64-bit register value - * - * @param[in] osdev platform device object - * @param[in] addr register addr - * - * @return A 64-bit register value. - */ -#define adf_os_reg_read64(osdev, addr) __adf_os_reg_read64(osdev, addr) - -/** - * @brief Write an 8-bit value into register - * - * @param[in] osdev platform device object - * @param[in] addr register addr - * @param[in] b the 8-bit value to be written - */ -#define adf_os_reg_write8(osdev, addr, b) __adf_os_reg_write8(osdev, addr, b) - -/** - * @brief Write a 16-bit value into register - * - * @param[in] osdev platform device object - * @param[in] addr register addr - * @param[in] w the 16-bit value to be written - */ -#define adf_os_reg_write16(osdev, addr, w) __adf_os_reg_write16(osdev, addr, w) - /** * @brief Write a 32-bit value into register * @@ -115,15 +66,6 @@ static inline a_uint32_t ioread32(a_uint32_t addr) */ #define adf_os_reg_write32(osdev, addr, l) __adf_os_reg_write32(osdev, addr, l) -/** - * @brief Write a 64-bit value into register - * - * @param[in] osdev platform device object - * @param[in] addr register addr - * @param[in] q the 64-bit value to be written - */ -#define adf_os_reg_write64(osdev, addr, q) __adf_os_reg_write64(osdev, addr, q) - /** * @brief Convert a 16-bit value from network byte order to host byte order */ @@ -144,64 +86,9 @@ static inline a_uint32_t ioread32(a_uint32_t addr) */ #define adf_os_htonl(x) __adf_os_htonl(x) -/** - * @brief Convert a 16-bit value from CPU byte order to big-endian byte order - */ -#define adf_os_cpu_to_be16(x) __adf_os_cpu_to_be16(x) - -/** - * @brief Convert a 32-bit value from CPU byte order to big-endian byte order - */ -#define adf_os_cpu_to_be32(x) __adf_os_cpu_to_be32(x) - -/** - * @brief Convert a 64-bit value from CPU byte order to big-endian byte order - */ -#define adf_os_cpu_to_be64(x) __adf_os_cpu_to_be64(x) - /** * @brief Convert a 16-bit value from CPU byte order to little-endian byte order */ #define adf_os_cpu_to_le16(x) __adf_os_cpu_to_le16(x) -/** - * @brief Convert a 32-bit value from CPU byte order to little-endian byte order - */ -#define adf_os_cpu_to_le32(x) __adf_os_cpu_to_le32(x) - -/** - * @brief Convert a 64-bit value from CPU byte order to little-endian byte order - */ -#define adf_os_cpu_to_le64(x) __adf_os_cpu_to_le64(x) - -/** - * @brief Convert a 16-bit value from big-endian byte order to CPU byte order - */ -#define adf_os_be16_to_cpu(x) __adf_os_be16_to_cpu(x) - -/** - * @brief Convert a 32-bit value from big-endian byte order to CPU byte order - */ -#define adf_os_be32_to_cpu(x) __adf_os_be32_to_cpu(x) - -/** - * @brief Convert a 64-bit value from big-endian byte order to CPU byte order - */ -#define adf_os_be64_to_cpu(x) __adf_os_be64_to_cpu(x) - -/** - * @brief Convert a 16-bit value from little-endian byte order to CPU byte order - */ -#define adf_os_le16_to_cpu(x) __adf_os_le16_to_cpu(x) - -/** - * @brief Convert a 32-bit value from little-endian byte order to CPU byte order - */ -#define adf_os_le32_to_cpu(x) __adf_os_le32_to_cpu(x) - -/** - * @brief Convert a 64-bit value from little-endian byte order to CPU byte order - */ -#define adf_os_le64_to_cpu(x) __adf_os_le64_to_cpu(x) - #endif