--- zzzz-none-000/linux-3.10.107/drivers/tty/nozomi.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/drivers/tty/nozomi.c 2021-02-04 17:41:59.000000000 +0000 @@ -140,8 +140,8 @@ #define R_FCR 0x0000 /* Flow Control Register */ #define R_IER 0x0004 /* Interrupt Enable Register */ -#define CONFIG_MAGIC 0xEFEFFEFE -#define TOGGLE_VALID 0x0000 +#define NOZOMI_CONFIG_MAGIC 0xEFEFFEFE +#define TOGGLE_VALID 0x0000 /* Definition of interrupt tokens */ #define MDM_DL1 0x0001 @@ -523,7 +523,7 @@ } /* Setup pointers to different channels and also setup buffer sizes. */ -static void setup_memory(struct nozomi *dc) +static void nozomi_setup_memory(struct nozomi *dc) { void __iomem *offset = dc->base_addr + dc->config_table.dl_start; /* The length reported is including the length field of 4 bytes, @@ -660,9 +660,9 @@ read_mem32((u32 *) &dc->config_table, dc->base_addr + 0, sizeof(struct config_table)); - if (dc->config_table.signature != CONFIG_MAGIC) { + if (dc->config_table.signature != NOZOMI_CONFIG_MAGIC) { dev_err(&dc->pdev->dev, "ConfigTable Bad! 0x%08X != 0x%08X\n", - dc->config_table.signature, CONFIG_MAGIC); + dc->config_table.signature, NOZOMI_CONFIG_MAGIC); return 0; } @@ -671,7 +671,7 @@ int i; DBG1("Second phase, configuring card"); - setup_memory(dc); + nozomi_setup_memory(dc); dc->port[PORT_MDM].toggle_ul = dc->config_table.toggle.mdm_ul; dc->port[PORT_MDM].toggle_dl = dc->config_table.toggle.mdm_dl; @@ -705,7 +705,7 @@ dc->config_table.version); /* Here we should disable all I/O over F32. */ - setup_memory(dc); + nozomi_setup_memory(dc); /* * We should send ALL channel pair tokens back along @@ -823,7 +823,7 @@ struct tty_struct *tty = tty_port_tty_get(&port->port); int i, ret; - size = __le32_to_cpu(readl(addr)); + read_mem32((u32 *) &size, addr, 4); /* DBG1( "%d bytes port: %d", size, index); */ if (tty && test_bit(TTY_THROTTLED, &tty->flags)) { @@ -959,7 +959,7 @@ dev_err(&dc->pdev->dev, "ERROR: flow control received for non-existing port\n"); return 0; - }; + } DBG1("0x%04X->0x%04X", *((u16 *)&dc->port[port].ctrl_dl), *((u16 *)&ctrl_dl)); @@ -1025,7 +1025,7 @@ dev_err(&dc->pdev->dev, "ERROR: send flow control " \ "received for non-existing port\n"); - }; + } return CTRL_ERROR; } @@ -1805,7 +1805,7 @@ default: DBG1("ERR: 0x%08X, %d", cmd, cmd); break; - }; + } return rval; }