RE: [PATCH] serial: samsung: remove the use of statically remapped controller address

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thomas Abraham wrote:
> 
> The address S3C_VA_UART is a statically ioremapped address. The driver
> should not be using this. Instead, the driver should setup a mapping
> during probe.
> 
> Cc: Kukjin Kim <kgene.kim@xxxxxxxxxxx>

Looks good to me:
Acked-by: Kukjin Kim <kgene.kim@xxxxxxxxxxx>

Greg, if you're ok on this, please pick this up in your tree :-)

Thanks.

- Kukjin

> Signed-off-by: Thomas Abraham <thomas.abraham@xxxxxxxxxx>
> ---
>  drivers/tty/serial/samsung.c |    8 ++++++--
>  1 files changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/tty/serial/samsung.c b/drivers/tty/serial/samsung.c
> index e514b3a..d6c4f659 100644
> --- a/drivers/tty/serial/samsung.c
> +++ b/drivers/tty/serial/samsung.c
> @@ -47,7 +47,6 @@
>  #include <asm/irq.h>
> 
>  #include <mach/hardware.h>
> -#include <mach/map.h>
> 
>  #include <plat/regs-serial.h>
>  #include <plat/clock.h>
> @@ -1143,8 +1142,13 @@ static int s3c24xx_serial_init_port(struct
> s3c24xx_uart_port *ourport,
> 
>  	dbg("resource %p (%lx..%lx)\n", res, res->start, res->end);
> 
> +	port->membase = devm_ioremap(port->dev, res->start,
> resource_size(res));
> +	if (!port->membase) {
> +		dev_err(port->dev, "failed to remap controller address\n");
> +		return -EBUSY;
> +	}
> +
>  	port->mapbase = res->start;
> -	port->membase = S3C_VA_UART + (res->start & 0xfffff);
>  	ret = platform_get_irq(platdev, 0);
>  	if (ret < 0)
>  		port->irq = 0;
> --
> 1.7.5.4

--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux SoC Development]     [Linux Rockchip Development]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Linux SCSI]     [Yosemite News]

  Powered by Linux