Lines Matching refs:dfse

25 	struct snd_sof_dfsentry *dfse = file->private_data;  in sof_dfsentry_read()  local
26 struct snd_sof_dev *sdev = dfse->sdev; in sof_dfsentry_read()
33 size = dfse->size; in sof_dfsentry_read()
53 if (pos + size + 4 < dfse->size) in sof_dfsentry_read()
61 if (dfse->type == SOF_DFSENTRY_TYPE_IOMEM) { in sof_dfsentry_read()
70 dfse->access_type == SOF_DEBUGFS_ACCESS_ALWAYS) { in sof_dfsentry_read()
71 memcpy_fromio(buf, dfse->io_mem + pos, size); in sof_dfsentry_read()
75 memcpy(buf, dfse->cache_buf + pos, size); in sof_dfsentry_read()
80 dfse->access_type == SOF_DEBUGFS_ACCESS_D0_ONLY) { in sof_dfsentry_read()
87 memcpy_fromio(buf, dfse->io_mem + pos, size); in sof_dfsentry_read()
90 memcpy(buf, ((u8 *)(dfse->buf) + pos), size); in sof_dfsentry_read()
119 struct snd_sof_dfsentry *dfse; in snd_sof_debugfs_io_item() local
124 dfse = devm_kzalloc(sdev->dev, sizeof(*dfse), GFP_KERNEL); in snd_sof_debugfs_io_item()
125 if (!dfse) in snd_sof_debugfs_io_item()
128 dfse->type = SOF_DFSENTRY_TYPE_IOMEM; in snd_sof_debugfs_io_item()
129 dfse->io_mem = base; in snd_sof_debugfs_io_item()
130 dfse->size = size; in snd_sof_debugfs_io_item()
131 dfse->sdev = sdev; in snd_sof_debugfs_io_item()
132 dfse->access_type = access_type; in snd_sof_debugfs_io_item()
140 dfse->cache_buf = devm_kzalloc(sdev->dev, size, GFP_KERNEL); in snd_sof_debugfs_io_item()
141 if (!dfse->cache_buf) in snd_sof_debugfs_io_item()
146 debugfs_create_file(name, 0444, sdev->debugfs_root, dfse, in snd_sof_debugfs_io_item()
150 list_add(&dfse->list, &sdev->dfsentry_list); in snd_sof_debugfs_io_item()
175 struct snd_sof_dfsentry *dfse; in snd_sof_debugfs_buf_item() local
180 dfse = devm_kzalloc(sdev->dev, sizeof(*dfse), GFP_KERNEL); in snd_sof_debugfs_buf_item()
181 if (!dfse) in snd_sof_debugfs_buf_item()
184 dfse->type = SOF_DFSENTRY_TYPE_BUF; in snd_sof_debugfs_buf_item()
185 dfse->buf = base; in snd_sof_debugfs_buf_item()
186 dfse->size = size; in snd_sof_debugfs_buf_item()
187 dfse->sdev = sdev; in snd_sof_debugfs_buf_item()
189 debugfs_create_file(name, mode, sdev->debugfs_root, dfse, in snd_sof_debugfs_buf_item()
192 list_add(&dfse->list, &sdev->dfsentry_list); in snd_sof_debugfs_buf_item()
252 struct snd_sof_dfsentry *dfse = file->private_data; in memory_info_read() local
253 struct snd_sof_dev *sdev = dfse->sdev; in memory_info_read()
258 dfse->buf_data_size = 0; in memory_info_read()
259 data_length = memory_info_update(sdev, dfse->buf, dfse->size); in memory_info_read()
262 dfse->buf_data_size = data_length; in memory_info_read()
265 return simple_read_from_buffer(to, count, ppos, dfse->buf, dfse->buf_data_size); in memory_info_read()
270 struct snd_sof_dfsentry *dfse = inode->i_private; in memory_info_open() local
271 struct snd_sof_dev *sdev = dfse->sdev; in memory_info_open()
273 file->private_data = dfse; in memory_info_open()
276 if (!dfse->buf) { in memory_info_open()
277 dfse->buf = devm_kmalloc(sdev->dev, PAGE_SIZE, GFP_KERNEL); in memory_info_open()
278 if (!dfse->buf) in memory_info_open()
280 dfse->size = PAGE_SIZE; in memory_info_open()
294 struct snd_sof_dfsentry *dfse; in snd_sof_dbg_memory_info_init() local
296 dfse = devm_kzalloc(sdev->dev, sizeof(*dfse), GFP_KERNEL); in snd_sof_dbg_memory_info_init()
297 if (!dfse) in snd_sof_dbg_memory_info_init()
301 dfse->type = SOF_DFSENTRY_TYPE_BUF; in snd_sof_dbg_memory_info_init()
302 dfse->sdev = sdev; in snd_sof_dbg_memory_info_init()
304 debugfs_create_file("memory_info", 0444, sdev->debugfs_root, dfse, &memory_info_fops); in snd_sof_dbg_memory_info_init()
307 list_add(&dfse->list, &sdev->dfsentry_list); in snd_sof_dbg_memory_info_init()