2 * This file is part of wl12xx
4 * Copyright (C) 2008 Nokia Corporation
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * version 2 as published by the Free Software Foundation.
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
21 #ifndef __WL1251_IO_H__
22 #define __WL1251_IO_H__
26 static inline u32
wl1251_read32(struct wl1251
*wl
, int addr
)
30 wl
->if_ops
->read(wl
, addr
, &response
, sizeof(u32
));
35 static inline void wl1251_write32(struct wl1251
*wl
, int addr
, u32 val
)
37 wl
->if_ops
->write(wl
, addr
, &val
, sizeof(u32
));
40 /* Memory target IO, address is translated to partition 0 */
41 void wl1251_mem_read(struct wl1251
*wl
, int addr
, void *buf
, size_t len
);
42 void wl1251_mem_write(struct wl1251
*wl
, int addr
, void *buf
, size_t len
);
43 u32
wl1251_mem_read32(struct wl1251
*wl
, int addr
);
44 void wl1251_mem_write32(struct wl1251
*wl
, int addr
, u32 val
);
46 u32
wl1251_reg_read32(struct wl1251
*wl
, int addr
);
47 void wl1251_reg_write32(struct wl1251
*wl
, int addr
, u32 val
);