Skip to content

Commit

Permalink
ath6kl: move remaining content from htc_hif.h to hif.h
Browse files Browse the repository at this point in the history
Now htc_hif.h can be removed.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
  • Loading branch information
Kalle Valo committed Nov 11, 2011
1 parent 533cbbb commit 2e1cb23
Show file tree
Hide file tree
Showing 6 changed files with 57 additions and 80 deletions.
2 changes: 1 addition & 1 deletion drivers/net/wireless/ath/ath6kl/debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#ifndef DEBUG_H
#define DEBUG_H

#include "htc_hif.h"
#include "hif.h"

enum ATH6K_DEBUG_MASK {
ATH6KL_DBG_WLAN_CONNECT = BIT(0), /* wlan connect */
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/ath/ath6kl/hif.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include "hif.h"

#include "core.h"
#include "target.h"
#include "hif-ops.h"
#include "htc_hif.h"
#include "debug.h"

#define MAILBOX_FOR_BLOCK_SIZE 1
Expand Down
53 changes: 53 additions & 0 deletions drivers/net/wireless/ath/ath6kl/hif.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,16 @@
/* mode to enable special 4-bit interrupt assertion without clock */
#define SDIO_IRQ_MODE_ASYNC_4BIT_IRQ (1 << 0)

/* HTC runs over mailbox 0 */
#define HTC_MAILBOX 0

#define ATH6KL_TARGET_DEBUG_INTR_MASK 0x01

/* FIXME: are these duplicates with MAX_SCATTER_ values in hif.h? */
#define ATH6KL_SCATTER_ENTRIES_PER_REQ 16
#define ATH6KL_MAX_TRANSFER_SIZE_PER_SCATTER (16 * 1024)
#define ATH6KL_SCATTER_REQS 4

struct bus_request {
struct list_head list;

Expand Down Expand Up @@ -186,6 +196,34 @@ struct hif_scatter_req {
struct hif_scatter_item scat_list[1];
};

struct ath6kl_irq_proc_registers {
u8 host_int_status;
u8 cpu_int_status;
u8 error_int_status;
u8 counter_int_status;
u8 mbox_frame;
u8 rx_lkahd_valid;
u8 host_int_status2;
u8 gmbox_rx_avail;
__le32 rx_lkahd[2];
__le32 rx_gmbox_lkahd_alias[2];
} __packed;

struct ath6kl_irq_enable_reg {
u8 int_status_en;
u8 cpu_int_status_en;
u8 err_int_status_en;
u8 cntr_int_status_en;
} __packed;

struct ath6kl_device {
spinlock_t lock;
struct ath6kl_irq_proc_registers irq_proc_reg;
struct ath6kl_irq_enable_reg irq_en_reg;
struct htc_target *htc_cnxt;
struct ath6kl *ar;
};

struct ath6kl_hif_ops {
int (*read_write_sync)(struct ath6kl *ar, u32 addr, u8 *buf,
u32 len, u32 request);
Expand All @@ -206,4 +244,19 @@ struct ath6kl_hif_ops {
int (*resume)(struct ath6kl *ar);
};

int ath6kl_hif_setup(struct ath6kl_device *dev);
int ath6kl_hif_unmask_intrs(struct ath6kl_device *dev);
int ath6kl_hif_mask_intrs(struct ath6kl_device *dev);
int ath6kl_hif_poll_mboxmsg_rx(struct ath6kl_device *dev,
u32 *lk_ahd, int timeout);
int ath6kl_hif_rx_control(struct ath6kl_device *dev, bool enable_rx);
int ath6kl_hif_disable_intrs(struct ath6kl_device *dev);

int ath6kl_hif_rw_comp_handler(void *context, int status);
int ath6kl_hif_intr_bh_handler(struct ath6kl *ar);

/* Scatter Function and Definitions */
int ath6kl_hif_submit_scat_req(struct ath6kl_device *dev,
struct hif_scatter_req *scat_req, bool read);

#endif
2 changes: 1 addition & 1 deletion drivers/net/wireless/ath/ath6kl/htc.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

#include "core.h"
#include "htc_hif.h"
#include "hif.h"
#include "debug.h"
#include "hif-ops.h"
#include <asm/unaligned.h>
Expand Down
76 changes: 0 additions & 76 deletions drivers/net/wireless/ath/ath6kl/htc_hif.h

This file was deleted.

2 changes: 1 addition & 1 deletion drivers/net/wireless/ath/ath6kl/sdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include <linux/mmc/sdio_ids.h>
#include <linux/mmc/sdio.h>
#include <linux/mmc/sd.h>
#include "htc_hif.h"
#include "hif.h"
#include "hif-ops.h"
#include "target.h"
#include "debug.h"
Expand Down

0 comments on commit 2e1cb23

Please sign in to comment.