[U-Boot] [PATCH 00/10] nios2: change ioremap to map_physmem

Change ioremap() to map_physmem(,,MAP_NOCACHE), as it is more used in u-boot. There are no other archs use ioremap(), except nios2.
Thomas Chou (10): altera_jtag_uart: change ioremap to map_physmem altera_uart: change ioremap to map_physmem altera_timer: change ioremap to map_physmem altera_spi: change ioremap to map_physmem altera_sysid: change ioremap to map_physmem altera_tse: change ioremap to map_physmem altera_qspi: change ioremap to map_physmem altera_pio: change ioremap to map_physmem nios2: dma-mapping.h: change ioremap to map_physmem nios2: zap ioremap
arch/nios2/include/asm/dma-mapping.h | 2 +- arch/nios2/include/asm/io.h | 6 ------ drivers/gpio/altera_pio.c | 5 +++-- drivers/misc/altera_sysid.c | 5 +++-- drivers/mtd/altera_qspi.c | 2 +- drivers/net/altera_tse.c | 2 +- drivers/serial/altera_jtag_uart.c | 5 +++-- drivers/serial/altera_uart.c | 5 +++-- drivers/spi/altera_spi.c | 5 +++-- drivers/timer/altera_timer.c | 5 +++-- 10 files changed, 21 insertions(+), 21 deletions(-)

Change ioremap() to map_physmem(), as it is more used in u-boot.
Signed-off-by: Thomas Chou thomas@wytron.com.tw --- drivers/serial/altera_jtag_uart.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/serial/altera_jtag_uart.c b/drivers/serial/altera_jtag_uart.c index c77bea3..cb11b31 100644 --- a/drivers/serial/altera_jtag_uart.c +++ b/drivers/serial/altera_jtag_uart.c @@ -97,8 +97,9 @@ static int altera_jtaguart_ofdata_to_platdata(struct udevice *dev) { struct altera_jtaguart_platdata *plat = dev_get_platdata(dev);
- plat->regs = ioremap(dev_get_addr(dev), - sizeof(struct altera_jtaguart_regs)); + plat->regs = map_physmem(dev_get_addr(dev), + sizeof(struct altera_jtaguart_regs), + MAP_NOCACHE);
return 0; }

Change ioremap() to map_physmem(), as it is more used in u-boot.
Signed-off-by: Thomas Chou thomas@wytron.com.tw --- drivers/serial/altera_uart.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/serial/altera_uart.c b/drivers/serial/altera_uart.c index 5d76c33..eff9c59 100644 --- a/drivers/serial/altera_uart.c +++ b/drivers/serial/altera_uart.c @@ -89,8 +89,9 @@ static int altera_uart_ofdata_to_platdata(struct udevice *dev) { struct altera_uart_platdata *plat = dev_get_platdata(dev);
- plat->regs = ioremap(dev_get_addr(dev), - sizeof(struct altera_uart_regs)); + plat->regs = map_physmem(dev_get_addr(dev), + sizeof(struct altera_uart_regs), + MAP_NOCACHE); plat->uartclk = fdtdec_get_int(gd->fdt_blob, dev->of_offset, "clock-frequency", 0);

Change ioremap() to map_physmem(), as it is more used in u-boot.
Signed-off-by: Thomas Chou thomas@wytron.com.tw --- drivers/timer/altera_timer.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/timer/altera_timer.c b/drivers/timer/altera_timer.c index 46a598a..971ed38 100644 --- a/drivers/timer/altera_timer.c +++ b/drivers/timer/altera_timer.c @@ -75,8 +75,9 @@ static int altera_timer_ofdata_to_platdata(struct udevice *dev) { struct altera_timer_platdata *plat = dev_get_platdata(dev);
- plat->regs = ioremap(dev_get_addr(dev), - sizeof(struct altera_timer_regs)); + plat->regs = map_physmem(dev_get_addr(dev), + sizeof(struct altera_timer_regs), + MAP_NOCACHE); plat->clock_rate = fdtdec_get_int(gd->fdt_blob, dev->of_offset, "clock-frequency", 0);

Change ioremap() to map_physmem(), as it is more used in u-boot.
Signed-off-by: Thomas Chou thomas@wytron.com.tw --- drivers/spi/altera_spi.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/spi/altera_spi.c b/drivers/spi/altera_spi.c index 3e09592..eb1ba27 100644 --- a/drivers/spi/altera_spi.c +++ b/drivers/spi/altera_spi.c @@ -174,8 +174,9 @@ static int altera_spi_ofdata_to_platdata(struct udevice *bus) { struct altera_spi_platdata *plat = dev_get_platdata(bus);
- plat->regs = ioremap(dev_get_addr(bus), - sizeof(struct altera_spi_regs)); + plat->regs = map_physmem(dev_get_addr(bus), + sizeof(struct altera_spi_regs), + MAP_NOCACHE);
return 0; }

Change ioremap() to map_physmem(), as it is more used in u-boot.
Signed-off-by: Thomas Chou thomas@wytron.com.tw --- drivers/misc/altera_sysid.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/misc/altera_sysid.c b/drivers/misc/altera_sysid.c index 737520f..2d0fa2a 100644 --- a/drivers/misc/altera_sysid.c +++ b/drivers/misc/altera_sysid.c @@ -76,8 +76,9 @@ static int altera_sysid_ofdata_to_platdata(struct udevice *dev) { struct altera_sysid_platdata *plat = dev_get_platdata(dev);
- plat->regs = ioremap(dev_get_addr(dev), - sizeof(struct altera_sysid_regs)); + plat->regs = map_physmem(dev_get_addr(dev), + sizeof(struct altera_sysid_regs), + MAP_NOCACHE);
return 0; }

Change ioremap() to map_physmem(), as it is more used in u-boot.
Signed-off-by: Thomas Chou thomas@wytron.com.tw --- drivers/net/altera_tse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/altera_tse.c b/drivers/net/altera_tse.c index 5692fe9..3eaa270 100644 --- a/drivers/net/altera_tse.c +++ b/drivers/net/altera_tse.c @@ -608,7 +608,7 @@ static int altera_tse_probe(struct udevice *dev) addr = fdt_translate_address((void *)blob, node, cell + idx); size = fdt_addr_to_cpu(cell[idx + addrc]); - base = ioremap(addr, size); + base = map_physmem(addr, size, MAP_NOCACHE); len = strlen(list); if (strcmp(list, "control_port") == 0) priv->mac_dev = base;

Change ioremap() to map_physmem(), as it is more used in u-boot.
Signed-off-by: Thomas Chou thomas@wytron.com.tw --- drivers/mtd/altera_qspi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mtd/altera_qspi.c b/drivers/mtd/altera_qspi.c index 1826dc8..50c6e0e 100644 --- a/drivers/mtd/altera_qspi.c +++ b/drivers/mtd/altera_qspi.c @@ -243,7 +243,7 @@ static int altera_qspi_ofdata_to_platdata(struct udevice *dev) addr = fdt_translate_address((void *)blob, node, cell + idx); size = fdt_addr_to_cpu(cell[idx + addrc]); - base = ioremap(addr, size); + base = map_physmem(addr, size, MAP_NOCACHE); len = strlen(list); if (strcmp(list, "avl_csr") == 0) { pdata->regs = base;

Change ioremap() to map_physmem(), as it is more used in u-boot.
Signed-off-by: Thomas Chou thomas@wytron.com.tw --- drivers/gpio/altera_pio.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/gpio/altera_pio.c b/drivers/gpio/altera_pio.c index 7ceb80e..6f42bf8 100644 --- a/drivers/gpio/altera_pio.c +++ b/drivers/gpio/altera_pio.c @@ -89,8 +89,9 @@ static int altera_pio_ofdata_to_platdata(struct udevice *dev) { struct altera_pio_platdata *plat = dev_get_platdata(dev);
- plat->regs = ioremap(dev_get_addr(dev), - sizeof(struct altera_pio_regs)); + plat->regs = map_physmem(dev_get_addr(dev), + sizeof(struct altera_pio_regs), + MAP_NOCACHE); plat->gpio_count = fdtdec_get_int(gd->fdt_blob, dev->of_offset, "altr,gpio-bank-width", 32); plat->bank_name = fdt_getprop(gd->fdt_blob, dev->of_offset,

Change ioremap() to map_physmem(), as it is more used in u-boot.
Signed-off-by: Thomas Chou thomas@wytron.com.tw --- arch/nios2/include/asm/dma-mapping.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/nios2/include/asm/dma-mapping.h b/arch/nios2/include/asm/dma-mapping.h index 1562d35..65f67bc 100644 --- a/arch/nios2/include/asm/dma-mapping.h +++ b/arch/nios2/include/asm/dma-mapping.h @@ -19,6 +19,6 @@ static inline void *dma_alloc_coherent(size_t len, unsigned long *handle) if (handle) *handle = addr;
- return ioremap(addr, len); + return map_physmem(addr, len, MAP_NOCACHE); } #endif /* __ASM_NIOS2_DMA_MAPPING_H */

Zap ioremap(), as it is replaced by map_physmem(,,MAP_NOCACHE).
Signed-off-by: Thomas Chou thomas@wytron.com.tw --- arch/nios2/include/asm/io.h | 6 ------ 1 file changed, 6 deletions(-)
diff --git a/arch/nios2/include/asm/io.h b/arch/nios2/include/asm/io.h index 95d8801..e951500 100644 --- a/arch/nios2/include/asm/io.h +++ b/arch/nios2/include/asm/io.h @@ -47,12 +47,6 @@ static inline phys_addr_t virt_to_phys(void * vaddr) return (phys_addr_t)vaddr & gd->arch.physaddr_mask; }
-static inline void *ioremap(unsigned long physaddr, unsigned long size) -{ - DECLARE_GLOBAL_DATA_PTR; - return (void *)(gd->arch.io_region_base | physaddr); -} - #define __raw_writeb(v,a) (*(volatile unsigned char *)(a) = (v)) #define __raw_writew(v,a) (*(volatile unsigned short *)(a) = (v)) #define __raw_writel(v,a) (*(volatile unsigned int *)(a) = (v))

On Saturday, November 14, 2015 at 06:59:21 AM, Thomas Chou wrote:
Change ioremap() to map_physmem(,,MAP_NOCACHE), as it is more used in u-boot. There are no other archs use ioremap(), except nios2.
Thomas Chou (10): altera_jtag_uart: change ioremap to map_physmem altera_uart: change ioremap to map_physmem altera_timer: change ioremap to map_physmem altera_spi: change ioremap to map_physmem altera_sysid: change ioremap to map_physmem altera_tse: change ioremap to map_physmem altera_qspi: change ioremap to map_physmem altera_pio: change ioremap to map_physmem nios2: dma-mapping.h: change ioremap to map_physmem nios2: zap ioremap
arch/nios2/include/asm/dma-mapping.h | 2 +- arch/nios2/include/asm/io.h | 6 ------ drivers/gpio/altera_pio.c | 5 +++-- drivers/misc/altera_sysid.c | 5 +++-- drivers/mtd/altera_qspi.c | 2 +- drivers/net/altera_tse.c | 2 +- drivers/serial/altera_jtag_uart.c | 5 +++-- drivers/serial/altera_uart.c | 5 +++-- drivers/spi/altera_spi.c | 5 +++-- drivers/timer/altera_timer.c | 5 +++-- 10 files changed, 21 insertions(+), 21 deletions(-)
Quickly
Reviewed-by: Marek Vasut marex@denx.de
Best regards, Marek Vasut

On 2015年11月14日 13:59, Thomas Chou wrote:
Change ioremap() to map_physmem(,,MAP_NOCACHE), as it is more used in u-boot. There are no other archs use ioremap(), except nios2.
Thomas Chou (10): altera_jtag_uart: change ioremap to map_physmem altera_uart: change ioremap to map_physmem altera_timer: change ioremap to map_physmem altera_spi: change ioremap to map_physmem altera_sysid: change ioremap to map_physmem altera_tse: change ioremap to map_physmem altera_qspi: change ioremap to map_physmem altera_pio: change ioremap to map_physmem nios2: dma-mapping.h: change ioremap to map_physmem nios2: zap ioremap
arch/nios2/include/asm/dma-mapping.h | 2 +- arch/nios2/include/asm/io.h | 6 ------ drivers/gpio/altera_pio.c | 5 +++-- drivers/misc/altera_sysid.c | 5 +++-- drivers/mtd/altera_qspi.c | 2 +- drivers/net/altera_tse.c | 2 +- drivers/serial/altera_jtag_uart.c | 5 +++-- drivers/serial/altera_uart.c | 5 +++-- drivers/spi/altera_spi.c | 5 +++-- drivers/timer/altera_timer.c | 5 +++-- 10 files changed, 21 insertions(+), 21 deletions(-)
Applied to u-boot-nios.
participants (2)
-
Marek Vasut
-
Thomas Chou