staticint wl1251_translate_reg_addr(struct wl1251 *wl, int addr)
{ /* If the address is lower than REGISTERS_BASE, it means that this is * a chip-specific register address, so look it up in the registers
* table */ if (addr < REGISTERS_BASE) { /* Make sure we don't go over the table */ if (addr >= ACX_REG_TABLE_LEN) {
wl1251_error("address out of range (%d)", addr); return -EINVAL;
}
addr = wl1251_io_reg_table[addr];
}
/* Set the partitions to access the chip addresses. * * There are two VIRTUAL partitions (the memory partition and the * registers partition), which are mapped to two different areas of the * PHYSICAL (hardware) memory. This function also makes other checks to * ensure that the partitions are not overlapping. In the diagram below, the * memory partition comes before the register partition, but the opposite is * also supported. * * PHYSICAL address * space * * | | * ...+----+--> mem_start * VIRTUAL address ... | | * space ... | | [PART_0] * ... | | * 0x00000000 <--+----+... ...+----+--> mem_start + mem_size * | | ... | | * |MEM | ... | | * | | ... | | * part_size <--+----+... | | {unused area) * | | ... | | * |REG | ... | | * part_size | | ... | | * + <--+----+... ...+----+--> reg_start * reg_size ... | | * ... | | [PART_1] * ... | | * ...+----+--> reg_start + reg_size * | | *
*/ void wl1251_set_partition(struct wl1251 *wl,
u32 mem_start, u32 mem_size,
u32 reg_start, u32 reg_size)
{ struct wl1251_partition_set *partition;
partition = kmalloc(sizeof(*partition), GFP_KERNEL); if (!partition) {
wl1251_error("can not allocate partition buffer"); return;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.