From 19f3200ea3952515e661f655604ba6902228b643 Mon Sep 17 00:00:00 2001 From: Heinrich Toews Date: Mon, 17 Nov 2025 07:41:21 +0100 Subject: [PATCH] save changes Signed-off-by: Heinrich Toews --- .../dts/ti/k3-am623-pfc-750-84xx-wosm.dtsi | 4 +-- drivers/uio/uio.c | 28 +++++++++++++++++-- 2 files changed, 28 insertions(+), 4 deletions(-) diff --git a/arch/arm64/boot/dts/ti/k3-am623-pfc-750-84xx-wosm.dtsi b/arch/arm64/boot/dts/ti/k3-am623-pfc-750-84xx-wosm.dtsi index 717a6624d4ca..d314b428c980 100644 --- a/arch/arm64/boot/dts/ti/k3-am623-pfc-750-84xx-wosm.dtsi +++ b/arch/arm64/boot/dts/ti/k3-am623-pfc-750-84xx-wosm.dtsi @@ -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>; }; }; diff --git a/drivers/uio/uio.c b/drivers/uio/uio.c index 5252766c0ed4..bc9882ce3c8e 100644 --- a/drivers/uio/uio.c +++ b/drivers/uio/uio.c @@ -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)