• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /asus-wl-520gu-7.0.1.45/src/shared/

Lines Matching refs:osh

31 sflash_cmd(osl_t *osh, chipcregs_t *cc, uint opcode)
33 W_REG(osh, &cc->flashcontrol, SFLASH_START | opcode);
34 while (R_REG(osh, &cc->flashcontrol) & SFLASH_BUSY);
42 osl_t *osh;
46 osh = sb_osh(sbh);
55 sflash_cmd(osh, cc, SFLASH_ST_DP);
56 sflash_cmd(osh, cc, SFLASH_ST_RES);
57 id = R_REG(osh, &cc->flashdata);
90 W_REG(osh, &cc->flashaddress, 1);
91 sflash_cmd(osh, cc, SFLASH_ST_RES);
92 id2 = R_REG(osh, &cc->flashdata);
104 sflash_cmd(osh, cc, SFLASH_AT_STATUS);
105 id = R_REG(osh, &cc->flashdata) & 0x3c;
156 osl_t *osh;
173 osh = sb_osh(sbh);
180 *to = R_REG(osh, from);
188 *(uint32 *)to = R_REG(osh, (uint32 *)from);
201 osl_t *osh;
205 osh = sb_osh(sbh);
213 sflash_cmd(osh, cc, SFLASH_ST_RDSR);
214 return R_REG(osh, &cc->flashdata) & SFLASH_ST_WIP;
217 sflash_cmd(osh, cc, SFLASH_AT_STATUS);
218 return !(R_REG(osh, &cc->flashdata) & SFLASH_AT_READY);
238 osl_t *osh;
242 osh = sb_osh(sbh);
255 retry: sflash_cmd(osh, cc, SFLASH_ST_WREN);
262 W_REG(osh, &cc->flashaddress, off);
263 W_REG(osh, &cc->flashdata, *buf++);
265 OR_REG(osh, &cc->gpioout, mask);
267 sflash_cmd(osh, cc, SFLASH_ST_PP);
274 AND_REG(osh, &cc->gpioout, ~mask);
286 sflash_cmd(osh, cc, *buf++);
293 AND_REG(osh, &cc->gpioout, ~mask);
306 sflash_cmd(osh, cc, SFLASH_ST_CSA | SFLASH_ST_PP);
329 sflash_cmd(osh, cc, SFLASH_ST_CSA | *buf++);
350 W_REG(osh, &cc->flashaddress, off);
351 W_REG(osh, &cc->flashdata, *buf);
353 sflash_cmd(osh, cc, SFLASH_ST_PP);
362 W_REG(osh, &cc->flashaddress, page);
363 sflash_cmd(osh, cc, SFLASH_AT_BUF1_LOAD);
370 W_REG(osh, &cc->flashaddress, byte++);
371 W_REG(osh, &cc->flashdata, *buf++);
372 sflash_cmd(osh, cc, SFLASH_AT_BUF1_WRITE);
375 W_REG(osh, &cc->flashaddress, page);
376 sflash_cmd(osh, cc, SFLASH_AT_BUF1_PROGRAM);
390 osl_t *osh;
394 osh = sb_osh(sbh);
402 sflash_cmd(osh, cc, SFLASH_ST_WREN);
403 W_REG(osh, &cc->flashaddress, offset);
404 sflash_cmd(osh, cc, SFLASH_ST_SE);
407 W_REG(osh, &cc->flashaddress, offset << 1);
408 sflash_cmd(osh, cc, SFLASH_AT_PAGE_ERASE);
427 osl_t *osh;
431 osh = sb_osh(sbh);
445 if (!(block = MALLOC(osh, blocksize)))
516 MFREE(osh, block, blocksize);