linux/drivers/staging/media/atomisp/pci/hmm/hmm.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Support for Medifield PNW Camera Imaging ISP subsystem.
 *
 * Copyright (c) 2010-2017 Intel Corporation. All Rights Reserved.
 *
 * Copyright (c) 2010 Silicon Hive www.siliconhive.com.
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License version
 * 2 as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 *
 */
/*
 * This file contains entry functions for memory management of ISP driver
 */
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/mm.h>
#include <linux/highmem.h>	/* for kmap */
#include <linux/io.h>		/* for page_to_phys */
#include <linux/sysfs.h>

#include "hmm/hmm.h"
#include "hmm/hmm_bo.h"

#include "atomisp_internal.h"
#include "asm/cacheflush.h"
#include "mmu/isp_mmu.h"
#include "mmu/sh_mmu_mrfld.h"

struct hmm_bo_device bo_device;
static ia_css_ptr dummy_ptr =;
static bool hmm_initialized;

/*
 * p: private
 * v: vmalloc
 */
static const char hmm_bo_type_string[] =;

static ssize_t bo_show(struct device *dev, struct device_attribute *attr,
		       char *buf, struct list_head *bo_list, bool active)
{}

static ssize_t active_bo_show(struct device *dev, struct device_attribute *attr,
			      char *buf)
{}

static ssize_t free_bo_show(struct device *dev, struct device_attribute *attr,
			    char *buf)
{}


static DEVICE_ATTR_RO(active_bo);
static DEVICE_ATTR_RO(free_bo);

static struct attribute *sysfs_attrs_ctrl[] =;

static struct attribute_group atomisp_attribute_group[] =;

int hmm_init(void)
{}

void hmm_cleanup(void)
{}

static ia_css_ptr __hmm_alloc(size_t bytes, enum hmm_bo_type type,
			      void *vmalloc_addr)
{}

ia_css_ptr hmm_alloc(size_t bytes)
{}

ia_css_ptr hmm_create_from_vmalloc_buf(size_t bytes, void *vmalloc_addr)
{}

void hmm_free(ia_css_ptr virt)
{}

static inline int hmm_check_bo(struct hmm_buffer_object *bo, unsigned int ptr)
{}

/* Read function in ISP memory management */
static int load_and_flush_by_kmap(ia_css_ptr virt, void *data,
				  unsigned int bytes)
{}

/* Read function in ISP memory management */
static int load_and_flush(ia_css_ptr virt, void *data, unsigned int bytes)
{}

/* Read function in ISP memory management */
int hmm_load(ia_css_ptr virt, void *data, unsigned int bytes)
{}

/* Flush hmm data from the data cache */
int hmm_flush(ia_css_ptr virt, unsigned int bytes)
{}

/* Write function in ISP memory management */
int hmm_store(ia_css_ptr virt, const void *data, unsigned int bytes)
{}

/* memset function in ISP memory management */
int hmm_set(ia_css_ptr virt, int c, unsigned int bytes)
{}

/* Virtual address to physical address convert */
phys_addr_t hmm_virt_to_phys(ia_css_ptr virt)
{}

int hmm_mmap(struct vm_area_struct *vma, ia_css_ptr virt)
{}

/* Map ISP virtual address into IA virtual address */
void *hmm_vmap(ia_css_ptr virt, bool cached)
{}

/* Flush the memory which is mapped as cached memory through hmm_vmap */
void hmm_flush_vmap(ia_css_ptr virt)
{}

void hmm_vunmap(ia_css_ptr virt)
{}