Staging: netwave: delete the driver
[linux/fpc-iii.git] / drivers / net / wireless / wl12xx / wl1271_io.h
blobfa9a0b35788f2e08dfe238a1e07fb852f2f01f0f
1 /*
2 * This file is part of wl1271
4 * Copyright (C) 1998-2009 Texas Instruments. All rights reserved.
5 * Copyright (C) 2008-2010 Nokia Corporation
7 * Contact: Luciano Coelho <luciano.coelho@nokia.com>
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * version 2 as published by the Free Software Foundation.
13 * This program is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
21 * 02110-1301 USA
25 #ifndef __WL1271_IO_H__
26 #define __WL1271_IO_H__
28 struct wl1271;
30 void wl1271_io_reset(struct wl1271 *wl);
31 void wl1271_io_init(struct wl1271 *wl);
33 /* Raw target IO, address is not translated */
34 void wl1271_raw_write(struct wl1271 *wl, int addr, void *buf,
35 size_t len, bool fixed);
36 void wl1271_raw_read(struct wl1271 *wl, int addr, void *buf,
37 size_t len, bool fixed);
39 /* Translated target IO */
40 void wl1271_read(struct wl1271 *wl, int addr, void *buf, size_t len,
41 bool fixed);
42 void wl1271_write(struct wl1271 *wl, int addr, void *buf, size_t len,
43 bool fixed);
44 u32 wl1271_read32(struct wl1271 *wl, int addr);
45 void wl1271_write32(struct wl1271 *wl, int addr, u32 val);
47 /* Top Register IO */
48 void wl1271_top_reg_write(struct wl1271 *wl, int addr, u16 val);
49 u16 wl1271_top_reg_read(struct wl1271 *wl, int addr);
51 int wl1271_set_partition(struct wl1271 *wl,
52 struct wl1271_partition_set *p);
54 static inline u32 wl1271_raw_read32(struct wl1271 *wl, int addr)
56 wl1271_raw_read(wl, addr, &wl->buffer_32,
57 sizeof(wl->buffer_32), false);
59 return wl->buffer_32;
62 static inline void wl1271_raw_write32(struct wl1271 *wl, int addr, u32 val)
64 wl->buffer_32 = val;
65 wl1271_raw_write(wl, addr, &wl->buffer_32,
66 sizeof(wl->buffer_32), false);
68 #endif