drivers/net/wireless/ti/wlcore/io.h
Source file repositories/reference/linux-study-clean/drivers/net/wireless/ti/wlcore/io.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/ti/wlcore/io.h- Extension
.h- Size
- 6039 bytes
- Lines
- 230
- Domain
- Driver Families
- Bucket
- drivers/net
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/irqreturn.h
Detected Declarations
struct wl1271function wlcore_raw_writefunction wlcore_raw_readfunction wlcore_raw_read_datafunction wlcore_raw_write_datafunction wlcore_raw_read32function wlcore_raw_write32function wlcore_readfunction wlcore_writefunction wlcore_write_datafunction wlcore_read_datafunction wlcore_read_hwaddrfunction wlcore_read32function wlcore_write32function wlcore_read_regfunction wlcore_write_regfunction wl1271_power_offfunction wl1271_power_on
Annotated Snippet
#ifndef __IO_H__
#define __IO_H__
#include <linux/irqreturn.h>
#define HW_ACCESS_MEMORY_MAX_RANGE 0x1FFC0
#define HW_PARTITION_REGISTERS_ADDR 0x1FFC0
#define HW_PART0_SIZE_ADDR (HW_PARTITION_REGISTERS_ADDR)
#define HW_PART0_START_ADDR (HW_PARTITION_REGISTERS_ADDR + 4)
#define HW_PART1_SIZE_ADDR (HW_PARTITION_REGISTERS_ADDR + 8)
#define HW_PART1_START_ADDR (HW_PARTITION_REGISTERS_ADDR + 12)
#define HW_PART2_SIZE_ADDR (HW_PARTITION_REGISTERS_ADDR + 16)
#define HW_PART2_START_ADDR (HW_PARTITION_REGISTERS_ADDR + 20)
#define HW_PART3_SIZE_ADDR (HW_PARTITION_REGISTERS_ADDR + 24)
#define HW_PART3_START_ADDR (HW_PARTITION_REGISTERS_ADDR + 28)
#define HW_ACCESS_REGISTER_SIZE 4
#define HW_ACCESS_PRAM_MAX_RANGE 0x3c000
struct wl1271;
void wlcore_disable_interrupts(struct wl1271 *wl);
void wlcore_disable_interrupts_nosync(struct wl1271 *wl);
void wlcore_enable_interrupts(struct wl1271 *wl);
void wlcore_synchronize_interrupts(struct wl1271 *wl);
void wl1271_io_reset(struct wl1271 *wl);
void wl1271_io_init(struct wl1271 *wl);
int wlcore_translate_addr(struct wl1271 *wl, int addr);
/* Raw target IO, address is not translated */
static inline int __must_check wlcore_raw_write(struct wl1271 *wl, int addr,
void *buf, size_t len,
bool fixed)
{
int ret;
if (test_bit(WL1271_FLAG_IO_FAILED, &wl->flags) ||
WARN_ON((test_bit(WL1271_FLAG_IN_ELP, &wl->flags) &&
addr != HW_ACCESS_ELP_CTRL_REG)))
return -EIO;
ret = wl->if_ops->write(wl->dev, addr, buf, len, fixed);
if (ret && wl->state != WLCORE_STATE_OFF)
set_bit(WL1271_FLAG_IO_FAILED, &wl->flags);
return ret;
}
static inline int __must_check wlcore_raw_read(struct wl1271 *wl, int addr,
void *buf, size_t len,
bool fixed)
{
int ret;
if (test_bit(WL1271_FLAG_IO_FAILED, &wl->flags) ||
WARN_ON((test_bit(WL1271_FLAG_IN_ELP, &wl->flags) &&
addr != HW_ACCESS_ELP_CTRL_REG)))
return -EIO;
ret = wl->if_ops->read(wl->dev, addr, buf, len, fixed);
if (ret && wl->state != WLCORE_STATE_OFF)
set_bit(WL1271_FLAG_IO_FAILED, &wl->flags);
return ret;
}
static inline int __must_check wlcore_raw_read_data(struct wl1271 *wl, int reg,
void *buf, size_t len,
bool fixed)
{
return wlcore_raw_read(wl, wl->rtable[reg], buf, len, fixed);
}
static inline int __must_check wlcore_raw_write_data(struct wl1271 *wl, int reg,
void *buf, size_t len,
bool fixed)
{
return wlcore_raw_write(wl, wl->rtable[reg], buf, len, fixed);
}
static inline int __must_check wlcore_raw_read32(struct wl1271 *wl, int addr,
u32 *val)
{
int ret;
ret = wlcore_raw_read(wl, addr, wl->buffer_32,
sizeof(*wl->buffer_32), false);
Annotation
- Immediate include surface: `linux/irqreturn.h`.
- Detected declarations: `struct wl1271`, `function wlcore_raw_write`, `function wlcore_raw_read`, `function wlcore_raw_read_data`, `function wlcore_raw_write_data`, `function wlcore_raw_read32`, `function wlcore_raw_write32`, `function wlcore_read`, `function wlcore_write`, `function wlcore_write_data`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.