rk: remove ioremap_nocache and devm_ioremap_nocache
According to commit 4bdc0d676a ("remove ioremap_nocache and devm_ioremap_nocache").
ioremap has provided non-cached semantics by default since the Linux 2.6
days, so remove the additional ioremap_nocache interface.
Change-Id: Id62917547d7d0d838ac3785f8c2bfd2d645af034
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
This commit is contained in:
@@ -683,7 +683,7 @@ void _mali_mem_cow_copy_page(mali_page_node *src_node, mali_page_node *dst_node)
|
||||
/*
|
||||
* use ioremap to map src for BLOCK memory
|
||||
*/
|
||||
src = ioremap_nocache(_mali_page_node_get_dma_addr(src_node), _MALI_OSK_MALI_PAGE_SIZE);
|
||||
src = ioremap(_mali_page_node_get_dma_addr(src_node), _MALI_OSK_MALI_PAGE_SIZE);
|
||||
memcpy(dst, src , _MALI_OSK_MALI_PAGE_SIZE);
|
||||
iounmap(src);
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ void _mali_osk_write_mem_barrier(void)
|
||||
|
||||
mali_io_address _mali_osk_mem_mapioregion(uintptr_t phys, u32 size, const char *description)
|
||||
{
|
||||
return (mali_io_address)ioremap_nocache(phys, size);
|
||||
return (mali_io_address)ioremap(phys, size);
|
||||
}
|
||||
|
||||
void _mali_osk_mem_unmapioregion(uintptr_t phys, u32 size, mali_io_address virt)
|
||||
|
||||
@@ -96,7 +96,7 @@ static int mali_secure_mode_init_juno(void)
|
||||
|
||||
MALI_DEBUG_ASSERT(NULL == secure_mode_mapped_addr);
|
||||
|
||||
secure_mode_mapped_addr = ioremap_nocache(phys_addr_page, map_size);
|
||||
secure_mode_mapped_addr = ioremap(phys_addr_page, map_size);
|
||||
if (NULL != secure_mode_mapped_addr) {
|
||||
return mali_gpu_reset_and_secure_mode_disable_juno();
|
||||
}
|
||||
@@ -580,7 +580,7 @@ static u32 mali_read_phys(u32 phys_addr)
|
||||
u32 phys_offset = phys_addr & 0x00001FFF;
|
||||
u32 map_size = phys_offset + sizeof(u32);
|
||||
u32 ret = 0xDEADBEEF;
|
||||
void *mem_mapped = ioremap_nocache(phys_addr_page, map_size);
|
||||
void *mem_mapped = ioremap(phys_addr_page, map_size);
|
||||
if (NULL != mem_mapped) {
|
||||
ret = (u32)ioread32(((u8 *)mem_mapped) + phys_offset);
|
||||
iounmap(mem_mapped);
|
||||
@@ -595,7 +595,7 @@ static void mali_write_phys(u32 phys_addr, u32 value)
|
||||
u32 phys_addr_page = phys_addr & 0xFFFFE000;
|
||||
u32 phys_offset = phys_addr & 0x00001FFF;
|
||||
u32 map_size = phys_offset + sizeof(u32);
|
||||
void *mem_mapped = ioremap_nocache(phys_addr_page, map_size);
|
||||
void *mem_mapped = ioremap(phys_addr_page, map_size);
|
||||
if (NULL != mem_mapped) {
|
||||
iowrite32(value, ((u8 *)mem_mapped) + phys_offset);
|
||||
iounmap(mem_mapped);
|
||||
|
||||
@@ -970,7 +970,7 @@ static int adf_pdp_probe_device(struct platform_device *pdev)
|
||||
pci_resource_start(pdata->pdev, DCPDP_REG_PCI_BASENUM)
|
||||
+ DCPDP_PCI_PDP_REG_OFFSET;
|
||||
|
||||
pdp->regs = ioremap_nocache(pdp->regs_start, pdp->regs_size);
|
||||
pdp->regs = ioremap(pdp->regs_start, pdp->regs_size);
|
||||
if (!pdp->regs) {
|
||||
dev_err(&pdev->dev, "Failed to map PDP registers\n");
|
||||
err = -EIO;
|
||||
@@ -989,7 +989,7 @@ static int adf_pdp_probe_device(struct platform_device *pdev)
|
||||
pci_resource_start(pdata->pdev, DCPDP_REG_PCI_BASENUM)
|
||||
+ DCPDP_PCI_PLL_REG_OFFSET;
|
||||
|
||||
pdp->pll_regs = ioremap_nocache(pdp->pll_regs_start,
|
||||
pdp->pll_regs = ioremap(pdp->pll_regs_start,
|
||||
pdp->pll_regs_size);
|
||||
if (!pdp->pll_regs) {
|
||||
dev_err(&pdev->dev, "Failed to map PLL registers\n");
|
||||
|
||||
@@ -173,7 +173,7 @@ static int apollo_set_clocks(struct apollo_device *apollo)
|
||||
pll_clock_resource =
|
||||
pci_resource_start(apollo->pdev, SYS_APOLLO_REG_PCI_BASENUM)
|
||||
+ SYS_APOLLO_REG_PLL_OFFSET;
|
||||
pll_regs = ioremap_nocache(pll_clock_resource, SYS_APOLLO_REG_PLL_SIZE);
|
||||
pll_regs = ioremap(pll_clock_resource, SYS_APOLLO_REG_PLL_SIZE);
|
||||
if (!pll_regs) {
|
||||
dev_err(&apollo->pdev->dev,
|
||||
"Failed to map apollo PLL registers\n");
|
||||
@@ -661,7 +661,7 @@ static int apollo_rogue_bist(struct apollo_device *apollo)
|
||||
"Failed to request rogue register region\n");
|
||||
goto err_out;
|
||||
}
|
||||
rogue_regs = ioremap_nocache(regs_resource, regs_resource_size);
|
||||
rogue_regs = ioremap(regs_resource, regs_resource_size);
|
||||
if (!rogue_regs) {
|
||||
dev_err(&apollo->pdev->dev,
|
||||
"Failed to map rogue register region\n");
|
||||
@@ -1207,7 +1207,7 @@ static int apollo_init(struct pci_dev *pdev, const struct pci_device_id *id)
|
||||
pci_resource_start(pdev, SYS_APOLLO_REG_PCI_BASENUM)
|
||||
+ SYS_APOLLO_REG_SYS_OFFSET;
|
||||
|
||||
apollo->tcf_registers = ioremap_nocache(apollo->tcf_register_resource,
|
||||
apollo->tcf_registers = ioremap(apollo->tcf_register_resource,
|
||||
SYS_APOLLO_REG_SYS_SIZE);
|
||||
if (!apollo->tcf_registers) {
|
||||
dev_err(&pdev->dev, "Failed to map TCF registers\n");
|
||||
|
||||
+2
-2
@@ -65,13 +65,13 @@ _IORemapWrapper(IMG_CPU_PHYADDR BasePAddr,
|
||||
switch (ui32CPUCacheMode)
|
||||
{
|
||||
case PVRSRV_MEMALLOCFLAG_CPU_UNCACHED:
|
||||
pvIORemapCookie = (void *)ioremap_nocache(BasePAddr.uiAddr, ui32Bytes);
|
||||
pvIORemapCookie = (void *)ioremap(BasePAddr.uiAddr, ui32Bytes);
|
||||
break;
|
||||
case PVRSRV_MEMALLOCFLAG_CPU_WRITE_COMBINE:
|
||||
#if defined(CONFIG_X86) || defined(CONFIG_ARM) || defined(CONFIG_ARM64)
|
||||
pvIORemapCookie = (void *)ioremap_wc(BasePAddr.uiAddr, ui32Bytes);
|
||||
#else
|
||||
pvIORemapCookie = (void *)ioremap_nocache(BasePAddr.uiAddr, ui32Bytes);
|
||||
pvIORemapCookie = (void *)ioremap(BasePAddr.uiAddr, ui32Bytes);
|
||||
#endif
|
||||
break;
|
||||
case PVRSRV_MEMALLOCFLAG_CPU_CACHED:
|
||||
|
||||
@@ -983,7 +983,7 @@ static int adf_pdp_probe_device(struct platform_device *pdev)
|
||||
pci_resource_start(pdata->pdev, DCPDP_REG_PCI_BASENUM)
|
||||
+ DCPDP_PCI_PDP_REG_OFFSET;
|
||||
|
||||
pdp->regs = ioremap_nocache(pdp->regs_start, pdp->regs_size);
|
||||
pdp->regs = ioremap(pdp->regs_start, pdp->regs_size);
|
||||
if (!pdp->regs) {
|
||||
dev_err(&pdev->dev, "Failed to map PDP registers\n");
|
||||
err = -EIO;
|
||||
@@ -1002,7 +1002,7 @@ static int adf_pdp_probe_device(struct platform_device *pdev)
|
||||
pci_resource_start(pdata->pdev, DCPDP_REG_PCI_BASENUM)
|
||||
+ DCPDP_PCI_PLL_REG_OFFSET;
|
||||
|
||||
pdp->pll_regs = ioremap_nocache(pdp->pll_regs_start,
|
||||
pdp->pll_regs = ioremap(pdp->pll_regs_start,
|
||||
pdp->pll_regs_size);
|
||||
if (!pdp->pll_regs) {
|
||||
dev_err(&pdev->dev, "Failed to map PLL registers\n");
|
||||
|
||||
@@ -174,7 +174,7 @@ static int apollo_set_clocks(struct apollo_device *apollo)
|
||||
pll_clock_resource =
|
||||
pci_resource_start(apollo->pdev, SYS_APOLLO_REG_PCI_BASENUM)
|
||||
+ SYS_APOLLO_REG_PLL_OFFSET;
|
||||
pll_regs = ioremap_nocache(pll_clock_resource, SYS_APOLLO_REG_PLL_SIZE);
|
||||
pll_regs = ioremap(pll_clock_resource, SYS_APOLLO_REG_PLL_SIZE);
|
||||
if (!pll_regs) {
|
||||
dev_err(&apollo->pdev->dev,
|
||||
"Failed to map apollo PLL registers\n");
|
||||
@@ -662,7 +662,7 @@ static int apollo_rogue_bist(struct apollo_device *apollo)
|
||||
"Failed to request rogue register region\n");
|
||||
goto err_out;
|
||||
}
|
||||
rogue_regs = ioremap_nocache(regs_resource, regs_resource_size);
|
||||
rogue_regs = ioremap(regs_resource, regs_resource_size);
|
||||
if (!rogue_regs) {
|
||||
dev_err(&apollo->pdev->dev,
|
||||
"Failed to map rogue register region\n");
|
||||
@@ -981,7 +981,7 @@ int apollo_sys_strings(struct device *dev,
|
||||
pci_resource_start(apollo->pdev, SYS_APOLLO_REG_PCI_BASENUM)
|
||||
+ 0x40F0;
|
||||
|
||||
host_fpga_registers = ioremap_nocache(host_fpga_register_resource,
|
||||
host_fpga_registers = ioremap(host_fpga_register_resource,
|
||||
0x04);
|
||||
if (!host_fpga_registers) {
|
||||
dev_err(&apollo->pdev->dev, "Failed to map host fpga registers\n");
|
||||
@@ -1282,7 +1282,7 @@ static int apollo_dev_init(struct apollo_device *apollo, struct pci_dev *pdev)
|
||||
pci_resource_start(pdev, SYS_APOLLO_REG_PCI_BASENUM)
|
||||
+ SYS_APOLLO_REG_SYS_OFFSET;
|
||||
|
||||
apollo->tcf_registers = ioremap_nocache(apollo->tcf_register_resource,
|
||||
apollo->tcf_registers = ioremap(apollo->tcf_register_resource,
|
||||
SYS_APOLLO_REG_SYS_SIZE);
|
||||
if (!apollo->tcf_registers) {
|
||||
dev_err(&pdev->dev, "Failed to map TCF registers\n");
|
||||
|
||||
+2
-2
@@ -69,13 +69,13 @@ _IORemapWrapper(IMG_CPU_PHYADDR BasePAddr,
|
||||
switch (ui32CPUCacheMode)
|
||||
{
|
||||
case PVRSRV_MEMALLOCFLAG_CPU_UNCACHED:
|
||||
pvIORemapCookie = (void *)ioremap_nocache(BasePAddr.uiAddr, ui32Bytes);
|
||||
pvIORemapCookie = (void *)ioremap(BasePAddr.uiAddr, ui32Bytes);
|
||||
break;
|
||||
case PVRSRV_MEMALLOCFLAG_CPU_WRITE_COMBINE:
|
||||
#if defined(CONFIG_X86) || defined(CONFIG_ARM) || defined(CONFIG_ARM64)
|
||||
pvIORemapCookie = (void *)ioremap_wc(BasePAddr.uiAddr, ui32Bytes);
|
||||
#else
|
||||
pvIORemapCookie = (void *)ioremap_nocache(BasePAddr.uiAddr, ui32Bytes);
|
||||
pvIORemapCookie = (void *)ioremap(BasePAddr.uiAddr, ui32Bytes);
|
||||
#endif
|
||||
break;
|
||||
case PVRSRV_MEMALLOCFLAG_CPU_CACHED:
|
||||
|
||||
@@ -390,7 +390,7 @@ extern int osl_error(int bcmerror);
|
||||
|
||||
/* map/unmap physical to virtual I/O */
|
||||
#if !defined(CONFIG_MMC_MSM7X00A)
|
||||
#define REG_MAP(pa, size) ioremap_nocache((unsigned long)(pa), (unsigned long)(size))
|
||||
#define REG_MAP(pa, size) ioremap((unsigned long)(pa), (unsigned long)(size))
|
||||
#else
|
||||
#define REG_MAP(pa, size) (void *)(0)
|
||||
#endif /* !defined(CONFIG_MMC_MSM7X00A */
|
||||
|
||||
@@ -404,7 +404,7 @@ extern uint64 osl_sysuptime_us(void);
|
||||
|
||||
/* map/unmap physical to virtual I/O */
|
||||
#if !defined(CONFIG_MMC_MSM7X00A)
|
||||
#define REG_MAP(pa, size) ioremap_nocache((unsigned long)(pa), (unsigned long)(size))
|
||||
#define REG_MAP(pa, size) ioremap((unsigned long)(pa), (unsigned long)(size))
|
||||
#else
|
||||
#define REG_MAP(pa, size) (void *)(0)
|
||||
#endif /* !defined(CONFIG_MMC_MSM7X00A */
|
||||
|
||||
@@ -412,7 +412,7 @@ extern uint64 osl_sysuptime_us(void);
|
||||
|
||||
/* map/unmap physical to virtual I/O */
|
||||
#if !defined(CONFIG_MMC_MSM7X00A)
|
||||
#define REG_MAP(pa, size) ioremap_nocache((unsigned long)(pa), (unsigned long)(size))
|
||||
#define REG_MAP(pa, size) ioremap((unsigned long)(pa), (unsigned long)(size))
|
||||
#else
|
||||
#define REG_MAP(pa, size) (void *)(0)
|
||||
#endif /* !defined(CONFIG_MMC_MSM7X00A */
|
||||
|
||||
@@ -446,7 +446,7 @@ extern uint64 osl_systztime_us(void);
|
||||
|
||||
/* map/unmap physical to virtual I/O */
|
||||
#if !defined(CONFIG_MMC_MSM7X00A)
|
||||
#define REG_MAP(pa, size) ioremap_nocache((unsigned long)(pa), (unsigned long)(size))
|
||||
#define REG_MAP(pa, size) ioremap((unsigned long)(pa), (unsigned long)(size))
|
||||
#else
|
||||
#define REG_MAP(pa, size) (void *)(0)
|
||||
#endif /* !defined(CONFIG_MMC_MSM7X00A */
|
||||
|
||||
@@ -1035,7 +1035,7 @@ static struct dvobj_priv *pci_dvobj_init(struct pci_dev *pdev, const struct pci_
|
||||
#endif /* RTK_DMP_PLATFORM */
|
||||
|
||||
#ifdef RTK_DMP_PLATFORM
|
||||
dvobj->pci_mem_start = (unsigned long)ioremap_nocache(pmem_start, pmem_len);
|
||||
dvobj->pci_mem_start = (unsigned long)ioremap(pmem_start, pmem_len);
|
||||
#elif defined(RTK_129X_PLATFORM)
|
||||
if (pdev->bus->number == 0x00)
|
||||
dvobj->ctrl_start =
|
||||
@@ -1053,7 +1053,7 @@ static struct dvobj_priv *pci_dvobj_init(struct pci_dev *pdev, const struct pci_
|
||||
dvobj->tran_addr = dvobj->ctrl_start + PCIE_TRANSLATE_OFFSET;
|
||||
|
||||
dvobj->pci_mem_start =
|
||||
(unsigned long)ioremap_nocache(pmem_start, pmem_len);
|
||||
(unsigned long)ioremap(pmem_start, pmem_len);
|
||||
#else
|
||||
/* shared mem start */
|
||||
dvobj->pci_mem_start = (unsigned long)pci_iomap(pdev, i, pmem_len);
|
||||
|
||||
@@ -1389,7 +1389,7 @@ int apollo_sys_strings(struct device *dev,
|
||||
pci_resource_start(apollo->pdev, SYS_APOLLO_REG_PCI_BASENUM)
|
||||
+ 0x40F0;
|
||||
|
||||
host_fpga_registers = ioremap_nocache(host_fpga_base, 0x04);
|
||||
host_fpga_registers = ioremap(host_fpga_base, 0x04);
|
||||
if (!host_fpga_registers) {
|
||||
dev_err(&apollo->pdev->dev,
|
||||
"Failed to map host fpga registers\n");
|
||||
@@ -2030,7 +2030,7 @@ static int setup_io_region(struct pci_dev *pdev,
|
||||
region->region.size = size;
|
||||
|
||||
region->registers
|
||||
= ioremap_nocache(region->region.base, region->region.size);
|
||||
= ioremap(region->region.base, region->region.size);
|
||||
|
||||
if (!region->registers) {
|
||||
dev_err(&pdev->dev, "Failed to map apollo registers\n");
|
||||
|
||||
@@ -1054,13 +1054,13 @@ OSMapPhysToLin(IMG_CPU_PHYADDR BasePAddr,
|
||||
switch (ui32MappingFlags)
|
||||
{
|
||||
case PVRSRV_MEMALLOCFLAG_CPU_UNCACHED:
|
||||
pvLinAddr = (void *)ioremap_nocache(BasePAddr.uiAddr, ui32Bytes);
|
||||
pvLinAddr = (void *)ioremap(BasePAddr.uiAddr, ui32Bytes);
|
||||
break;
|
||||
case PVRSRV_MEMALLOCFLAG_CPU_WRITE_COMBINE:
|
||||
#if defined(CONFIG_X86) || defined(CONFIG_ARM) || defined(CONFIG_ARM64)
|
||||
pvLinAddr = (void *)ioremap_wc(BasePAddr.uiAddr, ui32Bytes);
|
||||
#else
|
||||
pvLinAddr = (void *)ioremap_nocache(BasePAddr.uiAddr, ui32Bytes);
|
||||
pvLinAddr = (void *)ioremap(BasePAddr.uiAddr, ui32Bytes);
|
||||
#endif
|
||||
break;
|
||||
case PVRSRV_MEMALLOCFLAG_CPU_CACHED:
|
||||
|
||||
@@ -1147,7 +1147,7 @@ static int configure_shm(struct tee_tz *ptee)
|
||||
if (ptee->shm_cached)
|
||||
ptee->shm_vaddr = ioremap_cache(ptee->shm_paddr, shm_size);
|
||||
else
|
||||
ptee->shm_vaddr = ioremap_nocache(ptee->shm_paddr, shm_size);
|
||||
ptee->shm_vaddr = ioremap(ptee->shm_paddr, shm_size);
|
||||
|
||||
if (ptee->shm_vaddr == NULL) {
|
||||
dev_err(DEV, "shm ioremap failed\n");
|
||||
|
||||
Reference in New Issue
Block a user