return size;
}
-static ssize_t calliope_iva_read(struct file *file, struct kobject *kobj,
- struct bin_attribute *battr, char *buf,
- loff_t off, size_t size)
-{
- struct device *dev = kobj_to_dev(kobj);
-
- dev_dbg(dev, "%s(%lld, %zu)\n", __func__, off, size);
-
- memcpy(buf, battr->private + off, size);
- return size;
-}
-
static ssize_t calliope_dram_read(struct file *file, struct kobject *kobj,
struct bin_attribute *battr, char *buf,
loff_t off, size_t size)
/* size will be updated later */
static BIN_ATTR_RO(calliope_sram, 0);
-static BIN_ATTR_RO(calliope_iva, IVA_FIRMWARE_SIZE);
static BIN_ATTR_RO(calliope_dram, DRAM_FIRMWARE_SIZE);
static struct bin_attribute *calliope_bin_attrs[] = {
&bin_attr_calliope_sram,
- &bin_attr_calliope_iva,
&bin_attr_calliope_dram,
};
ret = device_create_file(dev, &dev_attr_gpr);
bin_attr_calliope_sram.size = data->sram_size;
bin_attr_calliope_sram.private = data->sram_base;
- bin_attr_calliope_iva.private = data->iva_base;
bin_attr_calliope_dram.private = data->dram_base;
for (i = 0; i < ARRAY_SIZE(calliope_bin_attrs); i++) {
struct bin_attribute *battr = calliope_bin_attrs[i];