Lines Matching refs:word

168 static int prepare_access(struct ocotp_regs **regs, u32 bank, u32 word,  in prepare_access()  argument
174 word >= ARRAY_SIZE((*regs)->bank[0].fuse_regs) >> 2 || in prepare_access()
182 word >= ARRAY_SIZE((*regs)->bank[0].fuse_regs) >> 3) { in prepare_access()
215 static int prepare_read(struct ocotp_regs **regs, u32 bank, u32 word, u32 *val, in prepare_read() argument
218 return prepare_access(regs, bank, word, val != NULL, caller); in prepare_read()
221 int fuse_read(u32 bank, u32 word, u32 *val) in fuse_read() argument
228 ret = prepare_read(&regs, bank, word, val, __func__); in fuse_read()
233 phy_word = fuse_word_physical(bank, word); in fuse_read()
295 static void setup_direct_access(struct ocotp_regs *regs, u32 bank, u32 word, in setup_direct_access() argument
302 u32 addr = bank << 2 | word; in setup_direct_access()
308 word += 4; in setup_direct_access()
310 addr = bank << 3 | word; in setup_direct_access()
319 int fuse_sense(u32 bank, u32 word, u32 *val) in fuse_sense() argument
324 ret = prepare_read(&regs, bank, word, val, __func__); in fuse_sense()
328 setup_direct_access(regs, bank, word, false); in fuse_sense()
332 *val = readl((&regs->read_fuse_data0) + (word << 2)); in fuse_sense()
348 static int prepare_write(struct ocotp_regs **regs, u32 bank, u32 word, in prepare_write() argument
357 ret = fuse_sense(bank, word, &val); in prepare_write()
368 return prepare_access(regs, bank, word, true, caller); in prepare_write()
371 int fuse_prog(u32 bank, u32 word, u32 val) in fuse_prog() argument
376 ret = prepare_write(&regs, bank, word, __func__); in fuse_prog()
380 setup_direct_access(regs, bank, word, true); in fuse_prog()
382 switch (word) { in fuse_prog()
426 int fuse_override(u32 bank, u32 word, u32 val) in fuse_override() argument
433 ret = prepare_write(&regs, bank, word, __func__); in fuse_override()
438 phy_word = fuse_word_physical(bank, word); in fuse_override()