Lines Matching refs:cmb_data
117 struct cmb_data { struct
274 struct cmb_data *cmb_data; in cmf_copy_block() local
288 cmb_data = cdev->private->cmb; in cmf_copy_block()
289 hw_block = cmb_data->hw_block; in cmf_copy_block()
290 memcpy(cmb_data->last_block, hw_block, cmb_data->size); in cmf_copy_block()
291 cmb_data->last_update = get_tod_clock(); in cmf_copy_block()
353 struct cmb_data *cmb_data; in cmf_generic_reset() local
356 cmb_data = cdev->private->cmb; in cmf_generic_reset()
357 if (cmb_data) { in cmf_generic_reset()
358 memset(cmb_data->last_block, 0, cmb_data->size); in cmf_generic_reset()
363 memset(cmb_data->hw_block, 0, cmb_data->size); in cmf_generic_reset()
364 cmb_data->last_update = 0; in cmf_generic_reset()
439 struct cmb_data *cmb_data) in alloc_cmb_single() argument
458 struct cmb_data *data; in alloc_cmb_single()
471 cmb_data->hw_block = cmb; in alloc_cmb_single()
472 cdev->private->cmb = cmb_data; in alloc_cmb_single()
484 struct cmb_data *cmb_data; in alloc_cmb() local
487 cmb_data = kzalloc(sizeof(struct cmb_data), GFP_KERNEL); in alloc_cmb()
488 if (!cmb_data) in alloc_cmb()
491 cmb_data->last_block = kzalloc(sizeof(struct cmb), GFP_KERNEL); in alloc_cmb()
492 if (!cmb_data->last_block) { in alloc_cmb()
493 kfree(cmb_data); in alloc_cmb()
496 cmb_data->size = sizeof(struct cmb); in alloc_cmb()
524 ret = alloc_cmb_single(cdev, cmb_data); in alloc_cmb()
528 kfree(cmb_data->last_block); in alloc_cmb()
529 kfree(cmb_data); in alloc_cmb()
537 struct cmb_data *cmb_data; in free_cmb() local
543 cmb_data = priv->cmb; in free_cmb()
545 if (cmb_data) in free_cmb()
546 kfree(cmb_data->last_block); in free_cmb()
547 kfree(cmb_data); in free_cmb()
564 struct cmb_data *cmb_data; in set_cmb() local
572 cmb_data = cdev->private->cmb; in set_cmb()
573 offset = mme ? (struct cmb *)cmb_data->hw_block - cmb_area.mem : 0; in set_cmb()
598 struct cmb_data *cmb_data; in read_cmb() local
605 cmb_data = cdev->private->cmb; in read_cmb()
606 if (!cmb_data) in read_cmb()
609 cmb = cmb_data->hw_block; in read_cmb()
650 struct cmb_data *cmb_data; in readall_cmb() local
659 cmb_data = cdev->private->cmb; in readall_cmb()
660 if (!cmb_data) { in readall_cmb()
664 if (cmb_data->last_update == 0) { in readall_cmb()
668 cmb = cmb_data->last_block; in readall_cmb()
669 time = cmb_data->last_update - cdev->private->cmb_start_time; in readall_cmb()
762 struct cmb_data *cmb_data; in alloc_cmbe() local
770 cmb_data = kzalloc(sizeof(*cmb_data), GFP_KERNEL); in alloc_cmbe()
771 if (!cmb_data) in alloc_cmbe()
774 cmb_data->last_block = kzalloc(sizeof(struct cmbe), GFP_KERNEL); in alloc_cmbe()
775 if (!cmb_data->last_block) in alloc_cmbe()
778 cmb_data->size = sizeof(*cmbe); in alloc_cmbe()
779 cmb_data->hw_block = cmbe; in alloc_cmbe()
786 cdev->private->cmb = cmb_data; in alloc_cmbe()
802 if (cmb_data) in alloc_cmbe()
803 kfree(cmb_data->last_block); in alloc_cmbe()
804 kfree(cmb_data); in alloc_cmbe()
812 struct cmb_data *cmb_data; in free_cmbe() local
816 cmb_data = cdev->private->cmb; in free_cmbe()
818 if (cmb_data) { in free_cmbe()
819 kfree(cmb_data->last_block); in free_cmbe()
820 kmem_cache_free(cmbe_cache, cmb_data->hw_block); in free_cmbe()
822 kfree(cmb_data); in free_cmbe()
835 struct cmb_data *cmb_data; in set_cmbe() local
843 cmb_data = cdev->private->cmb; in set_cmbe()
844 mba = mme ? (unsigned long) cmb_data->hw_block : 0; in set_cmbe()
852 struct cmb_data *cmb_data; in read_cmbe() local
859 cmb_data = cdev->private->cmb; in read_cmbe()
860 if (!cmb_data) in read_cmbe()
863 cmb = cmb_data->hw_block; in read_cmbe()
910 struct cmb_data *cmb_data; in readall_cmbe() local
919 cmb_data = cdev->private->cmb; in readall_cmbe()
920 if (!cmb_data) { in readall_cmbe()
924 if (cmb_data->last_update == 0) { in readall_cmbe()
928 time = cmb_data->last_update - cdev->private->cmb_start_time; in readall_cmbe()
937 cmb = cmb_data->last_block; in readall_cmbe()