Qualcomm ARM Based driver Updates for v3.16-2

* Updated MSM uart driver to not access GSBI control registers
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.10 (GNU/Linux)
 Comment: GPGTools - https://gpgtools.org
 
 iQIcBAABCgAGBQJTiLCsAAoJEF9hYXeAcXzB9RUP/Rl6+5hKbOwe3sy+V/uNcJaC
 nUaVK22DtQeZm3zql3yZqpY0hLHjOrDC5/tA+qfxNwIgwODO2h0RGt7Zdze13HqG
 oofBnlww8IcdByjliP3laGzeECjCJcWA2Y6T2hDC/Jrf7UuiBmYF8zPQZ8TTSWK9
 99973SibGHvaiEKXKpMxKmIN3BQAHVb4DyxR4DVe1SA8rx9/XOfI/COCzbkvUTZF
 khzXlXhv1fCpC1z5YoJeX2qRTcnoH88HaTxxHcdbWlxVoMjWusW1bWDfqNK8gXjZ
 FbzjkjY8bQI9flnTIoIivcbnWTHSWj3Ogi91A4qNZK7zOxaAKQnqE5WA0IUJMIXN
 bVHxgoDj3ytxajo5mKwWqk5T6uh2gvG/dzm/GZQbeZxmDldMXjqcDLdLvw3j3ajQ
 msyePaojvbfe9Lktl2VeNOiIdmzxTG0FzBQ3NzN6nerb+c1TE9w9tayIag3xsEJh
 YcV9eGhoD2RTULNIGrchtPagg5viUBfaDlROWJQW4qanohzFPXPMd0WorNqniM/0
 tzlI3ezzrcl2jr8dnfbL+cwe/0mLlMk81Wk8nqbekXfSxZp20kqA94rXIEtcXO3r
 lvKPgHzYW6V2Lkvjx0Dr+8k6GgEylxJ2krsB9E9erny/8j+QQML1bIuKZbuPGte7
 Z07uxHRNv9vRBhwJEqWZ
 =wbH5
 -----END PGP SIGNATURE-----

Merge tag 'qcom-drivers-for-3.16-2' of git://git.kernel.org/pub/scm/linux/kernel/git/galak/linux-qcom into next/drivers

Merge "Qualcomm ARM Based driver Updates for v3.16-2" from Kumar Gala:

* Updated MSM uart driver to not access GSBI control registers

* tag 'qcom-drivers-for-3.16-2' of git://git.kernel.org/pub/scm/linux/kernel/git/galak/linux-qcom:
  tty: serial: msm: Remove direct access to GSBI

Signed-off-by: Olof Johansson <olof@lixom.net>
This commit is contained in:
Olof Johansson 2014-05-30 20:55:45 -07:00
Родитель 182434f748 31964ffebb
Коммит b5de1ce01a
2 изменённых файлов: 2 добавлений и 51 удалений

Просмотреть файл

@ -52,7 +52,6 @@ struct msm_port {
struct clk *clk;
struct clk *pclk;
unsigned int imr;
void __iomem *gsbi_base;
int is_uartdm;
unsigned int old_snap_state;
};
@ -599,9 +598,7 @@ static const char *msm_type(struct uart_port *port)
static void msm_release_port(struct uart_port *port)
{
struct platform_device *pdev = to_platform_device(port->dev);
struct msm_port *msm_port = UART_TO_MSM(port);
struct resource *uart_resource;
struct resource *gsbi_resource;
resource_size_t size;
uart_resource = platform_get_resource(pdev, IORESOURCE_MEM, 0);
@ -612,28 +609,12 @@ static void msm_release_port(struct uart_port *port)
release_mem_region(port->mapbase, size);
iounmap(port->membase);
port->membase = NULL;
if (msm_port->gsbi_base) {
writel_relaxed(GSBI_PROTOCOL_IDLE,
msm_port->gsbi_base + GSBI_CONTROL);
gsbi_resource = platform_get_resource(pdev, IORESOURCE_MEM, 1);
if (unlikely(!gsbi_resource))
return;
size = resource_size(gsbi_resource);
release_mem_region(gsbi_resource->start, size);
iounmap(msm_port->gsbi_base);
msm_port->gsbi_base = NULL;
}
}
static int msm_request_port(struct uart_port *port)
{
struct msm_port *msm_port = UART_TO_MSM(port);
struct platform_device *pdev = to_platform_device(port->dev);
struct resource *uart_resource;
struct resource *gsbi_resource;
resource_size_t size;
int ret;
@ -652,30 +633,8 @@ static int msm_request_port(struct uart_port *port)
goto fail_release_port;
}
gsbi_resource = platform_get_resource(pdev, IORESOURCE_MEM, 1);
/* Is this a GSBI-based port? */
if (gsbi_resource) {
size = resource_size(gsbi_resource);
if (!request_mem_region(gsbi_resource->start, size,
"msm_serial")) {
ret = -EBUSY;
goto fail_release_port_membase;
}
msm_port->gsbi_base = ioremap(gsbi_resource->start, size);
if (!msm_port->gsbi_base) {
ret = -EBUSY;
goto fail_release_gsbi;
}
}
return 0;
fail_release_gsbi:
release_mem_region(gsbi_resource->start, size);
fail_release_port_membase:
iounmap(port->membase);
fail_release_port:
release_mem_region(port->mapbase, size);
return ret;
@ -683,7 +642,6 @@ fail_release_port:
static void msm_config_port(struct uart_port *port, int flags)
{
struct msm_port *msm_port = UART_TO_MSM(port);
int ret;
if (flags & UART_CONFIG_TYPE) {
port->type = PORT_MSM;
@ -691,9 +649,6 @@ static void msm_config_port(struct uart_port *port, int flags)
if (ret)
return;
}
if (msm_port->gsbi_base)
writel_relaxed(GSBI_PROTOCOL_UART,
msm_port->gsbi_base + GSBI_CONTROL);
}
static int msm_verify_port(struct uart_port *port, struct serial_struct *ser)
@ -1110,6 +1065,7 @@ static struct of_device_id msm_match_table[] = {
static struct platform_driver msm_platform_driver = {
.remove = msm_serial_remove,
.probe = msm_serial_probe,
.driver = {
.name = "msm_serial",
.owner = THIS_MODULE,
@ -1125,7 +1081,7 @@ static int __init msm_serial_init(void)
if (unlikely(ret))
return ret;
ret = platform_driver_probe(&msm_platform_driver, msm_serial_probe);
ret = platform_driver_register(&msm_platform_driver);
if (unlikely(ret))
uart_unregister_driver(&msm_uart_driver);

Просмотреть файл

@ -109,11 +109,6 @@
#define UART_ISR 0x0014
#define UART_ISR_TX_READY (1 << 7)
#define GSBI_CONTROL 0x0
#define GSBI_PROTOCOL_CODE 0x30
#define GSBI_PROTOCOL_UART 0x40
#define GSBI_PROTOCOL_IDLE 0x0
#define UARTDM_RXFS 0x50
#define UARTDM_RXFS_BUF_SHIFT 0x7
#define UARTDM_RXFS_BUF_MASK 0x7