@@ -81,10 +81,10 @@
|
||||
|
||||
/*
|
||||
* FSS Memory Region: External Memory Space (Region 3)
|
||||
* OSPI EVERSPIN MRAM
|
||||
* OSPI EVERSPIN MRAM em008lxo (8Mb)
|
||||
*
|
||||
*/
|
||||
reg = <0x05 0x00000000 0x01 0x00000000>;
|
||||
reg = <0x05 0x00000000 0x00 0x00100000>;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
+26
-2
@@ -745,10 +745,18 @@ static int uio_mmap_physical(struct vm_area_struct *vma)
|
||||
|
||||
pr_info("TWx: %s:%d\n", __func__, __LINE__);
|
||||
vma->vm_ops = &uio_physical_vm_ops;
|
||||
if (idev->info->mem[mi].memtype == UIO_MEM_PHYS)
|
||||
if (idev->info->mem[mi].memtype == UIO_MEM_PHYS) {
|
||||
pr_info("TWx: %s:%d pgprot_noncached() config.\n",
|
||||
__func__, __LINE__);
|
||||
vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
|
||||
}
|
||||
|
||||
pr_info("TWx: %s:%d\n", __func__, __LINE__);
|
||||
pr_info("TWx: %s:%d vma->vm_start 0x%lx mem->addr 0x%llx pfn 0x%llx size 0x%lx.\n",
|
||||
__func__, __LINE__,
|
||||
vma->vm_start,
|
||||
mem->addr,
|
||||
mem->addr >> PAGE_SHIFT,
|
||||
vma->vm_end - vma->vm_start);
|
||||
/*
|
||||
* We cannot use the vm_iomap_memory() helper here,
|
||||
* because vma->vm_pgoff is the map index we looked
|
||||
@@ -763,6 +771,22 @@ static int uio_mmap_physical(struct vm_area_struct *vma)
|
||||
mem->addr >> PAGE_SHIFT,
|
||||
vma->vm_end - vma->vm_start,
|
||||
vma->vm_page_prot);
|
||||
#if 0
|
||||
/**
|
||||
* remap_pfn_range - remap kernel memory to userspace
|
||||
* @vma: user vma to map to
|
||||
* @addr: target page aligned user address to start at
|
||||
* @pfn: page frame number of kernel physical memory address
|
||||
* @size: size of mapping area
|
||||
* @prot: page protection flags for this mapping
|
||||
*
|
||||
* Note: this is only safe if the mm semaphore is held when called.
|
||||
*
|
||||
* Return: %0 on success, negative error code otherwise.
|
||||
*/
|
||||
int remap_pfn_range(struct vm_area_struct *vma, unsigned long addr,
|
||||
unsigned long pfn, unsigned long size, pgprot_t prot)
|
||||
#endif
|
||||
}
|
||||
|
||||
static int uio_mmap(struct file *filep, struct vm_area_struct *vma)
|
||||
|
||||
Reference in New Issue
Block a user