• Home
  • Raw
  • Download

Lines Matching refs:fw

104 int meson_sm_call(struct meson_sm_firmware *fw, unsigned int cmd_index,  in meson_sm_call()  argument
109 if (!fw->chip) in meson_sm_call()
112 cmd = meson_sm_get_cmd(fw->chip, cmd_index); in meson_sm_call()
142 int meson_sm_call_read(struct meson_sm_firmware *fw, void *buffer, in meson_sm_call_read() argument
149 if (!fw->chip) in meson_sm_call_read()
152 if (!fw->chip->cmd_shmem_out_base) in meson_sm_call_read()
155 if (bsize > fw->chip->shmem_size) in meson_sm_call_read()
158 if (meson_sm_call(fw, cmd_index, &size, arg0, arg1, arg2, arg3, arg4) < 0) in meson_sm_call_read()
170 memcpy(buffer, fw->sm_shmem_out_base, size); in meson_sm_call_read()
191 int meson_sm_call_write(struct meson_sm_firmware *fw, void *buffer, in meson_sm_call_write() argument
197 if (!fw->chip) in meson_sm_call_write()
200 if (size > fw->chip->shmem_size) in meson_sm_call_write()
203 if (!fw->chip->cmd_shmem_in_base) in meson_sm_call_write()
206 memcpy(fw->sm_shmem_in_base, buffer, size); in meson_sm_call_write()
208 if (meson_sm_call(fw, cmd_index, &written, arg0, arg1, arg2, arg3, arg4) < 0) in meson_sm_call_write()
244 struct meson_sm_firmware *fw; in serial_show() local
248 fw = platform_get_drvdata(pdev); in serial_show()
254 ret = meson_sm_call_read(fw, id_buf, SM_CHIP_ID_LENGTH, SM_GET_CHIP_ID, in serial_show()
288 struct meson_sm_firmware *fw; in meson_sm_probe() local
290 fw = devm_kzalloc(dev, sizeof(*fw), GFP_KERNEL); in meson_sm_probe()
291 if (!fw) in meson_sm_probe()
297 fw->sm_shmem_in_base = meson_sm_map_shmem(chip->cmd_shmem_in_base, in meson_sm_probe()
299 if (WARN_ON(!fw->sm_shmem_in_base)) in meson_sm_probe()
304 fw->sm_shmem_out_base = meson_sm_map_shmem(chip->cmd_shmem_out_base, in meson_sm_probe()
306 if (WARN_ON(!fw->sm_shmem_out_base)) in meson_sm_probe()
310 fw->chip = chip; in meson_sm_probe()
312 platform_set_drvdata(pdev, fw); in meson_sm_probe()
322 iounmap(fw->sm_shmem_in_base); in meson_sm_probe()