* [PATCH 00/16] sh-sci: Remove unnecessary fields from platform data
@ 2013-11-28 21:43 Laurent Pinchart
2013-11-28 21:43 ` [PATCH 01/16] serial: sh-sci: Move overrun_bit and error_mask fields out of pdata Laurent Pinchart
` (16 more replies)
0 siblings, 17 replies; 18+ messages in thread
From: Laurent Pinchart @ 2013-11-28 21:43 UTC (permalink / raw)
To: linux-sh; +Cc: linux-serial
Hello,
This patch set removes or replaces unneeded fields from the sh-sci platform
data structure. Fields are simply removed when unused (gpios), moved to the
sci_port structure when used by the driver but not by board code (overrun_bit
and error_mask), or replaced by a more explicit field with a default value
computed in the driver for most cases (scbrr_algo_id).
The patches are based on top of the sh-sci DT patch series previously posted
to the mailing lists.
Laurent Pinchart (16):
serial: sh-sci: Move overrun_bit and error_mask fields out of pdata
serial: sh-sci: Remove unused GPIO request code
serial: sh-sci: Compute overrun_bit without using baud rate algo
serial: sh-sci: Rework baud rate calculation
ARM: shmobile: sh7372: Don't set plat_sci_port scbrr_algo_id field
ARM: shmobile: sh73a0: Don't set plat_sci_port scbrr_algo_id field
ARM: shmobile: r7s72100: Don't set plat_sci_port scbrr_algo_id field
ARM: shmobile: r8a73a4: Don't set plat_sci_port scbrr_algo_id field
ARM: shmobile: r8a7740: Don't set plat_sci_port scbrr_algo_id field
ARM: shmobile: r8a7778: Don't set plat_sci_port scbrr_algo_id field
ARM: shmobile: r8a7779: Don't set plat_sci_port scbrr_algo_id field
ARM: shmobile: r8a7790: Don't set plat_sci_port scbrr_algo_id field
ARM: shmobile: r8a7791: Don't set plat_sci_port scbrr_algo_id field
sh: sh772[34]: Set serial port sampling rate to 8 for SCIFA ports
sh: Don't set plat_sci_port scbrr_algo_id field
serial: sh-sci: Remove platform data scbrr_algo_id field
arch/arm/mach-shmobile/setup-r7s72100.c | 1 -
arch/arm/mach-shmobile/setup-r8a73a4.c | 1 -
arch/arm/mach-shmobile/setup-r8a7740.c | 1 -
arch/arm/mach-shmobile/setup-r8a7778.c | 1 -
arch/arm/mach-shmobile/setup-r8a7779.c | 1 -
arch/arm/mach-shmobile/setup-r8a7790.c | 11 +--
arch/arm/mach-shmobile/setup-r8a7791.c | 9 +-
arch/arm/mach-shmobile/setup-sh7372.c | 1 -
arch/arm/mach-shmobile/setup-sh73a0.c | 1 -
arch/sh/kernel/cpu/sh2/setup-sh7619.c | 3 -
arch/sh/kernel/cpu/sh2a/setup-mxg.c | 1 -
arch/sh/kernel/cpu/sh2a/setup-sh7201.c | 8 --
arch/sh/kernel/cpu/sh2a/setup-sh7203.c | 4 -
arch/sh/kernel/cpu/sh2a/setup-sh7206.c | 4 -
arch/sh/kernel/cpu/sh2a/setup-sh7264.c | 8 --
arch/sh/kernel/cpu/sh2a/setup-sh7269.c | 8 --
arch/sh/kernel/cpu/sh3/setup-sh7705.c | 2 -
arch/sh/kernel/cpu/sh3/setup-sh770x.c | 3 -
arch/sh/kernel/cpu/sh3/setup-sh7710.c | 2 -
arch/sh/kernel/cpu/sh3/setup-sh7720.c | 2 -
arch/sh/kernel/cpu/sh4/setup-sh4-202.c | 1 -
arch/sh/kernel/cpu/sh4/setup-sh7750.c | 2 -
arch/sh/kernel/cpu/sh4/setup-sh7760.c | 4 -
arch/sh/kernel/cpu/sh4a/setup-sh7343.c | 4 -
arch/sh/kernel/cpu/sh4a/setup-sh7366.c | 1 -
arch/sh/kernel/cpu/sh4a/setup-sh7722.c | 3 -
arch/sh/kernel/cpu/sh4a/setup-sh7723.c | 9 +-
arch/sh/kernel/cpu/sh4a/setup-sh7724.c | 9 +-
arch/sh/kernel/cpu/sh4a/setup-sh7734.c | 6 --
arch/sh/kernel/cpu/sh4a/setup-sh7757.c | 3 -
arch/sh/kernel/cpu/sh4a/setup-sh7763.c | 3 -
arch/sh/kernel/cpu/sh4a/setup-sh7770.c | 10 --
arch/sh/kernel/cpu/sh4a/setup-sh7780.c | 4 -
arch/sh/kernel/cpu/sh4a/setup-sh7785.c | 6 --
arch/sh/kernel/cpu/sh4a/setup-sh7786.c | 6 --
arch/sh/kernel/cpu/sh4a/setup-shx3.c | 3 -
arch/sh/kernel/cpu/sh5/setup-sh5.c | 1 -
drivers/tty/serial/sh-sci.c | 170 ++++++++++----------------------
drivers/tty/serial/sh-sci.h | 2 +-
include/linux/serial_sci.h | 25 +----
40 files changed, 68 insertions(+), 276 deletions(-)
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 18+ messages in thread* [PATCH 01/16] serial: sh-sci: Move overrun_bit and error_mask fields out of pdata 2013-11-28 21:43 [PATCH 00/16] sh-sci: Remove unnecessary fields from platform data Laurent Pinchart @ 2013-11-28 21:43 ` Laurent Pinchart 2013-11-28 21:43 ` [PATCH 02/16] serial: sh-sci: Remove unused GPIO request code Laurent Pinchart ` (15 subsequent siblings) 16 siblings, 0 replies; 18+ messages in thread From: Laurent Pinchart @ 2013-11-28 21:43 UTC (permalink / raw) To: linux-sh; +Cc: linux-serial None of the fields is ever set by board code, and both of them are set in the driver at probe time. Move them out of struct plat_sci_port to struct sci_port. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> --- drivers/tty/serial/sh-sci.c | 50 +++++++++++++++++++++------------------------ drivers/tty/serial/sh-sci.h | 2 +- include/linux/serial_sci.h | 3 --- 3 files changed, 24 insertions(+), 31 deletions(-) diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c index 28f8b7e..475b364 100644 --- a/drivers/tty/serial/sh-sci.c +++ b/drivers/tty/serial/sh-sci.c @@ -82,6 +82,9 @@ struct sci_port { /* Platform configuration */ struct plat_sci_port *cfg; + int overrun_bit; + unsigned int error_mask; + /* Break timer */ struct timer_list break_timer; @@ -774,19 +777,15 @@ static int sci_handle_errors(struct uart_port *port) struct tty_port *tport = &port->state->port; struct sci_port *s = to_sci_port(port); - /* - * Handle overruns, if supported. - */ - if (s->cfg->overrun_bit != SCIx_NOT_SUPPORTED) { - if (status & (1 << s->cfg->overrun_bit)) { - port->icount.overrun++; + /* Handle overruns */ + if (status & (1 << s->overrun_bit)) { + port->icount.overrun++; - /* overrun error */ - if (tty_insert_flip_char(tport, 0, TTY_OVERRUN)) - copied++; + /* overrun error */ + if (tty_insert_flip_char(tport, 0, TTY_OVERRUN)) + copied++; - dev_notice(port->dev, "overrun error"); - } + dev_notice(port->dev, "overrun error"); } if (status & SCxSR_FER(port)) { @@ -848,7 +847,7 @@ static int sci_handle_fifo_overrun(struct uart_port *port) if (!reg->size) return 0; - if ((serial_port_in(port, SCLSR) & (1 << s->cfg->overrun_bit))) { + if ((serial_port_in(port, SCLSR) & (1 << s->overrun_bit))) { serial_port_out(port, SCLSR, 0); port->icount.overrun++; @@ -2257,28 +2256,25 @@ static int sci_init_single(struct platform_device *dev, /* * Establish some sensible defaults for the error detection. */ - if (!p->error_mask) - p->error_mask = (p->type == PORT_SCI) ? + sci_port->error_mask = (p->type == PORT_SCI) ? SCI_DEFAULT_ERROR_MASK : SCIF_DEFAULT_ERROR_MASK; /* * Establish sensible defaults for the overrun detection, unless * the part has explicitly disabled support for it. */ - if (p->overrun_bit != SCIx_NOT_SUPPORTED) { - if (p->type == PORT_SCI) - p->overrun_bit = 5; - else if (p->scbrr_algo_id == SCBRR_ALGO_4) - p->overrun_bit = 9; - else - p->overrun_bit = 0; + if (p->type == PORT_SCI) + sci_port->overrun_bit = 5; + else if (p->scbrr_algo_id == SCBRR_ALGO_4) + sci_port->overrun_bit = 9; + else + sci_port->overrun_bit = 0; - /* - * Make the error mask inclusive of overrun detection, if - * supported. - */ - p->error_mask |= (1 << p->overrun_bit); - } + /* + * Make the error mask inclusive of overrun detection, if + * supported. + */ + sci_port->error_mask |= 1 << sci_port->overrun_bit; port->type = p->type; port->flags = UPF_FIXED_PORT | p->flags; diff --git a/drivers/tty/serial/sh-sci.h b/drivers/tty/serial/sh-sci.h index 5aca736..d5db81a 100644 --- a/drivers/tty/serial/sh-sci.h +++ b/drivers/tty/serial/sh-sci.h @@ -9,7 +9,7 @@ #define SCxSR_PER(port) (((port)->type == PORT_SCI) ? SCI_PER : SCIF_PER) #define SCxSR_BRK(port) (((port)->type == PORT_SCI) ? 0x00 : SCIF_BRK) -#define SCxSR_ERRORS(port) (to_sci_port(port)->cfg->error_mask) +#define SCxSR_ERRORS(port) (to_sci_port(port)->error_mask) #if defined(CONFIG_CPU_SUBTYPE_SH7705) || \ defined(CONFIG_CPU_SUBTYPE_SH7720) || \ diff --git a/include/linux/serial_sci.h b/include/linux/serial_sci.h index 0f6ca22..2c8e9c1 100644 --- a/include/linux/serial_sci.h +++ b/include/linux/serial_sci.h @@ -126,9 +126,6 @@ struct plat_sci_port { /* * Platform overrides if necessary, defaults otherwise. */ - int overrun_bit; - unsigned int error_mask; - int port_reg; unsigned char regshift; unsigned char regtype; -- 1.8.3.2 ^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 02/16] serial: sh-sci: Remove unused GPIO request code 2013-11-28 21:43 [PATCH 00/16] sh-sci: Remove unnecessary fields from platform data Laurent Pinchart 2013-11-28 21:43 ` [PATCH 01/16] serial: sh-sci: Move overrun_bit and error_mask fields out of pdata Laurent Pinchart @ 2013-11-28 21:43 ` Laurent Pinchart 2013-11-28 21:43 ` [PATCH 03/16] serial: sh-sci: Compute overrun_bit without using baud rate algo Laurent Pinchart ` (14 subsequent siblings) 16 siblings, 0 replies; 18+ messages in thread From: Laurent Pinchart @ 2013-11-28 21:43 UTC (permalink / raw) To: linux-sh; +Cc: linux-serial The driver requests at initialization time GPIOs passed through platform data. No platform makes use of this feature, remove it. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> --- drivers/tty/serial/sh-sci.c | 67 --------------------------------------------- include/linux/serial_sci.h | 12 -------- 2 files changed, 79 deletions(-) diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c index 475b364..e75ead0 100644 --- a/drivers/tty/serial/sh-sci.c +++ b/drivers/tty/serial/sh-sci.c @@ -32,7 +32,6 @@ #include <linux/dma-mapping.h> #include <linux/err.h> #include <linux/errno.h> -#include <linux/gpio.h> #include <linux/init.h> #include <linux/interrupt.h> #include <linux/ioport.h> @@ -97,7 +96,6 @@ struct sci_port { int irqs[SCIx_NR_IRQS]; char *irqstr[SCIx_NR_IRQS]; - char *gpiostr[SCIx_NR_FNS]; struct dma_chan *chan_tx; struct dma_chan *chan_rx; @@ -1167,67 +1165,6 @@ static void sci_free_irq(struct sci_port *port) } } -static const char *sci_gpio_names[SCIx_NR_FNS] = { - "sck", "rxd", "txd", "cts", "rts", -}; - -static const char *sci_gpio_str(unsigned int index) -{ - return sci_gpio_names[index]; -} - -static void sci_init_gpios(struct sci_port *port) -{ - struct uart_port *up = &port->port; - int i; - - if (!port->cfg) - return; - - for (i = 0; i < SCIx_NR_FNS; i++) { - const char *desc; - int ret; - - if (!port->cfg->gpios[i]) - continue; - - desc = sci_gpio_str(i); - - port->gpiostr[i] = kasprintf(GFP_KERNEL, "%s:%s", - dev_name(up->dev), desc); - - /* - * If we've failed the allocation, we can still continue - * on with a NULL string. - */ - if (!port->gpiostr[i]) - dev_notice(up->dev, "%s string allocation failure\n", - desc); - - ret = gpio_request(port->cfg->gpios[i], port->gpiostr[i]); - if (unlikely(ret != 0)) { - dev_notice(up->dev, "failed %s gpio request\n", desc); - - /* - * If we can't get the GPIO for whatever reason, - * no point in keeping the verbose string around. - */ - kfree(port->gpiostr[i]); - } - } -} - -static void sci_free_gpios(struct sci_port *port) -{ - int i; - - for (i = 0; i < SCIx_NR_FNS; i++) - if (port->cfg->gpios[i]) { - gpio_free(port->cfg->gpios[i]); - kfree(port->gpiostr[i]); - } -} - static unsigned int sci_tx_empty(struct uart_port *port) { unsigned short status = serial_port_in(port, SCxSR); @@ -2244,8 +2181,6 @@ static int sci_init_single(struct platform_device *dev, port->dev = &dev->dev; - sci_init_gpios(sci_port); - pm_runtime_enable(&dev->dev); } @@ -2302,8 +2237,6 @@ static int sci_init_single(struct platform_device *dev, static void sci_cleanup_single(struct sci_port *port) { - sci_free_gpios(port); - clk_put(port->iclk); clk_put(port->fclk); diff --git a/include/linux/serial_sci.h b/include/linux/serial_sci.h index 2c8e9c1..3d5d878 100644 --- a/include/linux/serial_sci.h +++ b/include/linux/serial_sci.h @@ -58,17 +58,6 @@ enum { /* HSSRR HSCIF */ #define HSCIF_SRE 0x8000 -/* Offsets into the sci_port->gpios array */ -enum { - SCIx_SCK, - SCIx_RXD, - SCIx_TXD, - SCIx_CTS, - SCIx_RTS, - - SCIx_NR_FNS, -}; - enum { SCIx_PROBE_REGTYPE, @@ -115,7 +104,6 @@ struct plat_sci_port_ops { * Platform device specific platform_data struct */ struct plat_sci_port { - unsigned int gpios[SCIx_NR_FNS]; /* SCK, RXD, TXD, CTS, RTS */ unsigned int type; /* SCI / SCIF / IRDA / HSCIF */ upf_t flags; /* UPF_* flags */ unsigned long capabilities; /* Port features/capabilities */ -- 1.8.3.2 ^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 03/16] serial: sh-sci: Compute overrun_bit without using baud rate algo 2013-11-28 21:43 [PATCH 00/16] sh-sci: Remove unnecessary fields from platform data Laurent Pinchart 2013-11-28 21:43 ` [PATCH 01/16] serial: sh-sci: Move overrun_bit and error_mask fields out of pdata Laurent Pinchart 2013-11-28 21:43 ` [PATCH 02/16] serial: sh-sci: Remove unused GPIO request code Laurent Pinchart @ 2013-11-28 21:43 ` Laurent Pinchart 2013-11-28 21:43 ` [PATCH 04/16] serial: sh-sci: Rework baud rate calculation Laurent Pinchart ` (13 subsequent siblings) 16 siblings, 0 replies; 18+ messages in thread From: Laurent Pinchart @ 2013-11-28 21:43 UTC (permalink / raw) To: linux-sh; +Cc: linux-serial The overrun bit index is a property of the hardware. It's currently computed based on a different and unrelated hardware property, the baud rate calculation algorithm. Compute it using hardware identification information only. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> --- drivers/tty/serial/sh-sci.c | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c index e75ead0..d9b14d0 100644 --- a/drivers/tty/serial/sh-sci.c +++ b/drivers/tty/serial/sh-sci.c @@ -2137,30 +2137,38 @@ static int sci_init_single(struct platform_device *dev, sci_port->irqs[3] = sci_port->irqs[0]; } + if (p->regtype == SCIx_PROBE_REGTYPE) { + ret = sci_probe_regmap(p); + if (unlikely(ret)) + return ret; + } + switch (p->type) { case PORT_SCIFB: port->fifosize = 256; + sci_port->overrun_bit = 9; break; case PORT_HSCIF: port->fifosize = 128; + sci_port->overrun_bit = 0; break; case PORT_SCIFA: port->fifosize = 64; + sci_port->overrun_bit = 9; break; case PORT_SCIF: port->fifosize = 16; + if (p->regtype == SCIx_SH7705_SCIF_REGTYPE) + sci_port->overrun_bit = 9; + else + sci_port->overrun_bit = 0; break; default: port->fifosize = 1; + sci_port->overrun_bit = 5; break; } - if (p->regtype == SCIx_PROBE_REGTYPE) { - ret = sci_probe_regmap(p); - if (unlikely(ret)) - return ret; - } - if (!early) { sci_port->iclk = clk_get(&dev->dev, "sci_ick"); if (IS_ERR(sci_port->iclk)) { @@ -2198,12 +2206,6 @@ static int sci_init_single(struct platform_device *dev, * Establish sensible defaults for the overrun detection, unless * the part has explicitly disabled support for it. */ - if (p->type == PORT_SCI) - sci_port->overrun_bit = 5; - else if (p->scbrr_algo_id == SCBRR_ALGO_4) - sci_port->overrun_bit = 9; - else - sci_port->overrun_bit = 0; /* * Make the error mask inclusive of overrun detection, if -- 1.8.3.2 ^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 04/16] serial: sh-sci: Rework baud rate calculation 2013-11-28 21:43 [PATCH 00/16] sh-sci: Remove unnecessary fields from platform data Laurent Pinchart ` (2 preceding siblings ...) 2013-11-28 21:43 ` [PATCH 03/16] serial: sh-sci: Compute overrun_bit without using baud rate algo Laurent Pinchart @ 2013-11-28 21:43 ` Laurent Pinchart 2013-11-28 21:43 ` [PATCH 05/16] ARM: shmobile: sh7372: Don't set plat_sci_port scbrr_algo_id field Laurent Pinchart ` (12 subsequent siblings) 16 siblings, 0 replies; 18+ messages in thread From: Laurent Pinchart @ 2013-11-28 21:43 UTC (permalink / raw) To: linux-sh; +Cc: linux-serial Computing the baud rate register value requires knowledge of the hardware sampling rate. This information is currently encoded in a baud rate calculation algorithm ID passed through platform data. However, it can be derived from the port type directly in most cases. Compute the sampling rate internally in the driver if the baud rate calculation algorithm ID isn't specified, and allow platforms to override the sampling rate through platform data in special cases (this is only required for SCIFA ports on sh7723 and sh7724, the reason needs to be investigated). Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> --- drivers/tty/serial/sh-sci.c | 43 ++++++++++++++++++++++++++++++------------- include/linux/serial_sci.h | 2 ++ 2 files changed, 32 insertions(+), 13 deletions(-) diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c index d9b14d0..c65d37b 100644 --- a/drivers/tty/serial/sh-sci.c +++ b/drivers/tty/serial/sh-sci.c @@ -83,6 +83,7 @@ struct sci_port { struct plat_sci_port *cfg; int overrun_bit; unsigned int error_mask; + unsigned int sampling_rate; /* Break timer */ @@ -1763,10 +1764,13 @@ static void sci_shutdown(struct uart_port *port) sci_free_irq(s); } -static unsigned int sci_scbrr_calc(unsigned int algo_id, unsigned int bps, +static unsigned int sci_scbrr_calc(struct sci_port *s, unsigned int bps, unsigned long freq) { - switch (algo_id) { + if (s->sampling_rate) + return DIV_ROUND_CLOSEST(freq, s->sampling_rate * bps) - 1; + + switch (s->cfg->scbrr_algo_id) { case SCBRR_ALGO_1: return freq / (16 * bps); case SCBRR_ALGO_2: @@ -1856,12 +1860,11 @@ static void sci_set_termios(struct uart_port *port, struct ktermios *termios, baud = uart_get_baud_rate(port, termios, old, 0, max_baud); if (likely(baud && port->uartclk)) { - if (s->cfg->scbrr_algo_id == SCBRR_ALGO_6) { + if (s->cfg->type == PORT_HSCIF) { sci_baud_calc_hscif(baud, port->uartclk, &t, &srr, &cks); } else { - t = sci_scbrr_calc(s->cfg->scbrr_algo_id, baud, - port->uartclk); + t = sci_scbrr_calc(s, baud, port->uartclk); for (cks = 0; t >= 256 && cks <= 3; cks++) t >>= 2; } @@ -2105,6 +2108,7 @@ static int sci_init_single(struct platform_device *dev, { struct uart_port *port = &sci_port->port; const struct resource *res; + unsigned int sampling_rate; unsigned int i; int ret; @@ -2147,28 +2151,47 @@ static int sci_init_single(struct platform_device *dev, case PORT_SCIFB: port->fifosize = 256; sci_port->overrun_bit = 9; + sampling_rate = 16; break; case PORT_HSCIF: port->fifosize = 128; + sampling_rate = 0; sci_port->overrun_bit = 0; break; case PORT_SCIFA: port->fifosize = 64; sci_port->overrun_bit = 9; + sampling_rate = 16; break; case PORT_SCIF: port->fifosize = 16; - if (p->regtype == SCIx_SH7705_SCIF_REGTYPE) + if (p->regtype == SCIx_SH7705_SCIF_REGTYPE) { sci_port->overrun_bit = 9; - else + sampling_rate = 16; + } else { sci_port->overrun_bit = 0; + sampling_rate = 32; + } break; default: port->fifosize = 1; sci_port->overrun_bit = 5; + sampling_rate = 32; break; } + /* Set the sampling rate if the baud rate calculation algorithm isn't + * specified. + */ + if (p->scbrr_algo_id == SCBRR_ALGO_NONE) { + /* SCIFA on sh7723 and sh7724 need a custom sampling rate that + * doesn't match the SoC datasheet, this should be investigated. + * Let platform data override the sampling rate for now. + */ + sci_port->sampling_rate = p->sampling_rate ? p->sampling_rate + : sampling_rate; + } + if (!early) { sci_port->iclk = clk_get(&dev->dev, "sci_ick"); if (IS_ERR(sci_port->iclk)) { @@ -2407,7 +2430,6 @@ static int sci_remove(struct platform_device *dev) struct sci_port_info { unsigned int type; unsigned int regtype; - unsigned int brr_algo; }; static const struct of_device_id of_sci_match[] = { @@ -2416,28 +2438,24 @@ static const struct of_device_id of_sci_match[] = { .data = (void *)&(const struct sci_port_info) { .type = PORT_SCIF, .regtype = SCIx_SH4_SCIF_REGTYPE, - .brr_algo = SCBRR_ALGO_2, }, }, { .compatible = "renesas,scifa", .data = (void *)&(const struct sci_port_info) { .type = PORT_SCIFA, .regtype = SCIx_SCIFA_REGTYPE, - .brr_algo = SCBRR_ALGO_4, }, }, { .compatible = "renesas,scifb", .data = (void *)&(const struct sci_port_info) { .type = PORT_SCIFB, .regtype = SCIx_SCIFB_REGTYPE, - .brr_algo = SCBRR_ALGO_4, }, }, { .compatible = "renesas,hscif", .data = (void *)&(const struct sci_port_info) { .type = PORT_HSCIF, .regtype = SCIx_HSCIF_REGTYPE, - .brr_algo = SCBRR_ALGO_6, }, }, { /* Terminator */ @@ -2482,7 +2500,6 @@ sci_parse_dt(struct platform_device *pdev, unsigned int *dev_id) p->type = info->type; p->regtype = info->regtype; p->scscr = SCSCR_RE | SCSCR_TE; - p->scbrr_algo_id = info->brr_algo; return p; } diff --git a/include/linux/serial_sci.h b/include/linux/serial_sci.h index 3d5d878..06dc806 100644 --- a/include/linux/serial_sci.h +++ b/include/linux/serial_sci.h @@ -11,6 +11,7 @@ #define SCIx_NOT_SUPPORTED (-1) enum { + SCBRR_ALGO_NONE, /* Compute sampling rate in the driver */ SCBRR_ALGO_1, /* clk / (16 * bps) */ SCBRR_ALGO_2, /* DIV_ROUND_CLOSEST(clk, 32 * bps) - 1 */ SCBRR_ALGO_3, /* clk / (8 * bps) */ @@ -108,6 +109,7 @@ struct plat_sci_port { upf_t flags; /* UPF_* flags */ unsigned long capabilities; /* Port features/capabilities */ + unsigned int sampling_rate; unsigned int scbrr_algo_id; /* SCBRR calculation algo */ unsigned int scscr; /* SCSCR initialization */ -- 1.8.3.2 ^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 05/16] ARM: shmobile: sh7372: Don't set plat_sci_port scbrr_algo_id field 2013-11-28 21:43 [PATCH 00/16] sh-sci: Remove unnecessary fields from platform data Laurent Pinchart ` (3 preceding siblings ...) 2013-11-28 21:43 ` [PATCH 04/16] serial: sh-sci: Rework baud rate calculation Laurent Pinchart @ 2013-11-28 21:43 ` Laurent Pinchart 2013-11-28 21:43 ` [PATCH 06/16] ARM: shmobile: sh73a0: " Laurent Pinchart ` (11 subsequent siblings) 16 siblings, 0 replies; 18+ messages in thread From: Laurent Pinchart @ 2013-11-28 21:43 UTC (permalink / raw) To: linux-sh; +Cc: linux-serial The field will be removed from the sh-sci driver. Don't set it and let the driver handle baud rate calculation internally. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> --- arch/arm/mach-shmobile/setup-sh7372.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/arm/mach-shmobile/setup-sh7372.c b/arch/arm/mach-shmobile/setup-sh7372.c index 798f8ac..2730127 100644 --- a/arch/arm/mach-shmobile/setup-sh7372.c +++ b/arch/arm/mach-shmobile/setup-sh7372.c @@ -91,7 +91,6 @@ void __init sh7372_pinmux_init(void) static struct plat_sci_port scif##index##_platform_data = { \ .type = scif_type, \ .flags = UPF_BOOT_AUTOCONF, \ - .scbrr_algo_id = SCBRR_ALGO_4, \ .scscr = SCSCR_RE | SCSCR_TE, \ }; \ \ -- 1.8.3.2 ^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 06/16] ARM: shmobile: sh73a0: Don't set plat_sci_port scbrr_algo_id field 2013-11-28 21:43 [PATCH 00/16] sh-sci: Remove unnecessary fields from platform data Laurent Pinchart ` (4 preceding siblings ...) 2013-11-28 21:43 ` [PATCH 05/16] ARM: shmobile: sh7372: Don't set plat_sci_port scbrr_algo_id field Laurent Pinchart @ 2013-11-28 21:43 ` Laurent Pinchart 2013-11-28 21:43 ` [PATCH 07/16] ARM: shmobile: r7s72100: " Laurent Pinchart ` (10 subsequent siblings) 16 siblings, 0 replies; 18+ messages in thread From: Laurent Pinchart @ 2013-11-28 21:43 UTC (permalink / raw) To: linux-sh; +Cc: linux-serial The field will be removed from the sh-sci driver. Don't set it and let the driver handle baud rate calculation internally. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> --- arch/arm/mach-shmobile/setup-sh73a0.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/arm/mach-shmobile/setup-sh73a0.c b/arch/arm/mach-shmobile/setup-sh73a0.c index 55ed98f..f74ab53 100644 --- a/arch/arm/mach-shmobile/setup-sh73a0.c +++ b/arch/arm/mach-shmobile/setup-sh73a0.c @@ -76,7 +76,6 @@ void __init sh73a0_pinmux_init(void) static struct plat_sci_port scif##index##_platform_data = { \ .type = scif_type, \ .flags = UPF_BOOT_AUTOCONF, \ - .scbrr_algo_id = SCBRR_ALGO_4, \ .scscr = SCSCR_RE | SCSCR_TE, \ }; \ \ -- 1.8.3.2 ^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 07/16] ARM: shmobile: r7s72100: Don't set plat_sci_port scbrr_algo_id field 2013-11-28 21:43 [PATCH 00/16] sh-sci: Remove unnecessary fields from platform data Laurent Pinchart ` (5 preceding siblings ...) 2013-11-28 21:43 ` [PATCH 06/16] ARM: shmobile: sh73a0: " Laurent Pinchart @ 2013-11-28 21:43 ` Laurent Pinchart 2013-11-28 21:43 ` [PATCH 08/16] ARM: shmobile: r8a73a4: " Laurent Pinchart ` (9 subsequent siblings) 16 siblings, 0 replies; 18+ messages in thread From: Laurent Pinchart @ 2013-11-28 21:43 UTC (permalink / raw) To: linux-sh; +Cc: linux-serial The field will be removed from the sh-sci driver. Don't set it and let the driver handle baud rate calculation internally. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> --- arch/arm/mach-shmobile/setup-r7s72100.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/arm/mach-shmobile/setup-r7s72100.c b/arch/arm/mach-shmobile/setup-r7s72100.c index 81b995b..9c0b3a9 100644 --- a/arch/arm/mach-shmobile/setup-r7s72100.c +++ b/arch/arm/mach-shmobile/setup-r7s72100.c @@ -33,7 +33,6 @@ static const struct plat_sci_port scif##index##_platform_data = { \ .type = PORT_SCIF, \ .regtype = SCIx_SH2_SCIF_FIFODATA_REGTYPE, \ .flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP, \ - .scbrr_algo_id = SCBRR_ALGO_2, \ .scscr = SCSCR_RIE | SCSCR_TIE | SCSCR_RE | SCSCR_TE | \ SCSCR_REIE, \ }; \ -- 1.8.3.2 ^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 08/16] ARM: shmobile: r8a73a4: Don't set plat_sci_port scbrr_algo_id field 2013-11-28 21:43 [PATCH 00/16] sh-sci: Remove unnecessary fields from platform data Laurent Pinchart ` (6 preceding siblings ...) 2013-11-28 21:43 ` [PATCH 07/16] ARM: shmobile: r7s72100: " Laurent Pinchart @ 2013-11-28 21:43 ` Laurent Pinchart 2013-11-28 21:43 ` [PATCH 09/16] ARM: shmobile: r8a7740: " Laurent Pinchart ` (8 subsequent siblings) 16 siblings, 0 replies; 18+ messages in thread From: Laurent Pinchart @ 2013-11-28 21:43 UTC (permalink / raw) To: linux-sh; +Cc: linux-serial The field will be removed from the sh-sci driver. Don't set it and let the driver handle baud rate calculation internally. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> --- arch/arm/mach-shmobile/setup-r8a73a4.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/arm/mach-shmobile/setup-r8a73a4.c b/arch/arm/mach-shmobile/setup-r8a73a4.c index ef32ce2..cd36f80 100644 --- a/arch/arm/mach-shmobile/setup-r8a73a4.c +++ b/arch/arm/mach-shmobile/setup-r8a73a4.c @@ -44,7 +44,6 @@ void __init r8a73a4_pinmux_init(void) static struct plat_sci_port scif##index##_platform_data = { \ .type = scif_type, \ .flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP, \ - .scbrr_algo_id = SCBRR_ALGO_4, \ .scscr = _scscr, \ }; \ \ -- 1.8.3.2 ^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 09/16] ARM: shmobile: r8a7740: Don't set plat_sci_port scbrr_algo_id field 2013-11-28 21:43 [PATCH 00/16] sh-sci: Remove unnecessary fields from platform data Laurent Pinchart ` (7 preceding siblings ...) 2013-11-28 21:43 ` [PATCH 08/16] ARM: shmobile: r8a73a4: " Laurent Pinchart @ 2013-11-28 21:43 ` Laurent Pinchart 2013-11-28 21:43 ` [PATCH 10/16] ARM: shmobile: r8a7778: " Laurent Pinchart ` (7 subsequent siblings) 16 siblings, 0 replies; 18+ messages in thread From: Laurent Pinchart @ 2013-11-28 21:43 UTC (permalink / raw) To: linux-sh; +Cc: linux-serial The field will be removed from the sh-sci driver. Don't set it and let the driver handle baud rate calculation internally. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> --- arch/arm/mach-shmobile/setup-r8a7740.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/arm/mach-shmobile/setup-r8a7740.c b/arch/arm/mach-shmobile/setup-r8a7740.c index 81a4366..8f3c681 100644 --- a/arch/arm/mach-shmobile/setup-r8a7740.c +++ b/arch/arm/mach-shmobile/setup-r8a7740.c @@ -208,7 +208,6 @@ static struct platform_device irqpin3_device = { static struct plat_sci_port scif##index##_platform_data = { \ .type = scif_type, \ .flags = UPF_BOOT_AUTOCONF, \ - .scbrr_algo_id = SCBRR_ALGO_4, \ .scscr = SCSCR_RE | SCSCR_TE, \ }; \ \ -- 1.8.3.2 ^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 10/16] ARM: shmobile: r8a7778: Don't set plat_sci_port scbrr_algo_id field 2013-11-28 21:43 [PATCH 00/16] sh-sci: Remove unnecessary fields from platform data Laurent Pinchart ` (8 preceding siblings ...) 2013-11-28 21:43 ` [PATCH 09/16] ARM: shmobile: r8a7740: " Laurent Pinchart @ 2013-11-28 21:43 ` Laurent Pinchart 2013-11-28 21:43 ` [PATCH 11/16] ARM: shmobile: r8a7779: " Laurent Pinchart ` (6 subsequent siblings) 16 siblings, 0 replies; 18+ messages in thread From: Laurent Pinchart @ 2013-11-28 21:43 UTC (permalink / raw) To: linux-sh; +Cc: linux-serial The field will be removed from the sh-sci driver. Don't set it and let the driver handle baud rate calculation internally. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> --- arch/arm/mach-shmobile/setup-r8a7778.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/arm/mach-shmobile/setup-r8a7778.c b/arch/arm/mach-shmobile/setup-r8a7778.c index 47c8230..855e2f3 100644 --- a/arch/arm/mach-shmobile/setup-r8a7778.c +++ b/arch/arm/mach-shmobile/setup-r8a7778.c @@ -48,7 +48,6 @@ static struct plat_sci_port scif##index##_platform_data = { \ .flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP, \ .scscr = SCSCR_RE | SCSCR_TE | SCSCR_CKE1, \ - .scbrr_algo_id = SCBRR_ALGO_2, \ .type = PORT_SCIF, \ }; \ \ -- 1.8.3.2 ^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 11/16] ARM: shmobile: r8a7779: Don't set plat_sci_port scbrr_algo_id field 2013-11-28 21:43 [PATCH 00/16] sh-sci: Remove unnecessary fields from platform data Laurent Pinchart ` (9 preceding siblings ...) 2013-11-28 21:43 ` [PATCH 10/16] ARM: shmobile: r8a7778: " Laurent Pinchart @ 2013-11-28 21:43 ` Laurent Pinchart 2013-11-28 21:43 ` [PATCH 12/16] ARM: shmobile: r8a7790: " Laurent Pinchart ` (5 subsequent siblings) 16 siblings, 0 replies; 18+ messages in thread From: Laurent Pinchart @ 2013-11-28 21:43 UTC (permalink / raw) To: linux-sh; +Cc: linux-serial The field will be removed from the sh-sci driver. Don't set it and let the driver handle baud rate calculation internally. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> --- arch/arm/mach-shmobile/setup-r8a7779.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/arm/mach-shmobile/setup-r8a7779.c b/arch/arm/mach-shmobile/setup-r8a7779.c index 85371ee..8e860b3 100644 --- a/arch/arm/mach-shmobile/setup-r8a7779.c +++ b/arch/arm/mach-shmobile/setup-r8a7779.c @@ -193,7 +193,6 @@ void __init r8a7779_pinmux_init(void) static struct plat_sci_port scif##index##_platform_data = { \ .type = PORT_SCIF, \ .flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP, \ - .scbrr_algo_id = SCBRR_ALGO_2, \ .scscr = SCSCR_RE | SCSCR_TE | SCSCR_CKE1, \ }; \ \ -- 1.8.3.2 ^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 12/16] ARM: shmobile: r8a7790: Don't set plat_sci_port scbrr_algo_id field 2013-11-28 21:43 [PATCH 00/16] sh-sci: Remove unnecessary fields from platform data Laurent Pinchart ` (10 preceding siblings ...) 2013-11-28 21:43 ` [PATCH 11/16] ARM: shmobile: r8a7779: " Laurent Pinchart @ 2013-11-28 21:43 ` Laurent Pinchart 2013-11-28 21:43 ` [PATCH 13/16] ARM: shmobile: r8a7791: " Laurent Pinchart ` (4 subsequent siblings) 16 siblings, 0 replies; 18+ messages in thread From: Laurent Pinchart @ 2013-11-28 21:43 UTC (permalink / raw) To: linux-sh; +Cc: linux-serial The field will be removed from the sh-sci driver. Don't set it and let the driver handle baud rate calculation internally. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> --- arch/arm/mach-shmobile/setup-r8a7790.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/arch/arm/mach-shmobile/setup-r8a7790.c b/arch/arm/mach-shmobile/setup-r8a7790.c index 70bb553..bb805a4 100644 --- a/arch/arm/mach-shmobile/setup-r8a7790.c +++ b/arch/arm/mach-shmobile/setup-r8a7790.c @@ -78,11 +78,10 @@ void __init r8a7790_pinmux_init(void) r8a7790_register_gpio(5); } -#define __R8A7790_SCIF(scif_type, _scscr, algo, index, baseaddr, irq) \ +#define __R8A7790_SCIF(scif_type, _scscr, index, baseaddr, irq) \ static struct plat_sci_port scif##index##_platform_data = { \ .type = scif_type, \ .flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP, \ - .scbrr_algo_id = algo, \ .scscr = _scscr, \ }; \ \ @@ -93,19 +92,19 @@ static struct resource scif##index##_resources[] = { \ #define R8A7790_SCIF(index, baseaddr, irq) \ __R8A7790_SCIF(PORT_SCIF, SCSCR_RE | SCSCR_TE, \ - SCBRR_ALGO_2, index, baseaddr, irq) + index, baseaddr, irq) #define R8A7790_SCIFA(index, baseaddr, irq) \ __R8A7790_SCIF(PORT_SCIFA, SCSCR_RE | SCSCR_TE | SCSCR_CKE0, \ - SCBRR_ALGO_4, index, baseaddr, irq) + index, baseaddr, irq) #define R8A7790_SCIFB(index, baseaddr, irq) \ __R8A7790_SCIF(PORT_SCIFB, SCSCR_RE | SCSCR_TE, \ - SCBRR_ALGO_4, index, baseaddr, irq) + index, baseaddr, irq) #define R8A7790_HSCIF(index, baseaddr, irq) \ __R8A7790_SCIF(PORT_HSCIF, SCSCR_RE | SCSCR_TE, \ - SCBRR_ALGO_6, index, baseaddr, irq) + index, baseaddr, irq) R8A7790_SCIFA(0, 0xe6c40000, gic_spi(144)); /* SCIFA0 */ R8A7790_SCIFA(1, 0xe6c50000, gic_spi(145)); /* SCIFA1 */ -- 1.8.3.2 ^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 13/16] ARM: shmobile: r8a7791: Don't set plat_sci_port scbrr_algo_id field 2013-11-28 21:43 [PATCH 00/16] sh-sci: Remove unnecessary fields from platform data Laurent Pinchart ` (11 preceding siblings ...) 2013-11-28 21:43 ` [PATCH 12/16] ARM: shmobile: r8a7790: " Laurent Pinchart @ 2013-11-28 21:43 ` Laurent Pinchart 2013-11-28 21:43 ` [PATCH 14/16] sh: sh772[34]: Set serial port sampling rate to 8 for SCIFA ports Laurent Pinchart ` (3 subsequent siblings) 16 siblings, 0 replies; 18+ messages in thread From: Laurent Pinchart @ 2013-11-28 21:43 UTC (permalink / raw) To: linux-sh; +Cc: linux-serial The field will be removed from the sh-sci driver. Don't set it and let the driver handle baud rate calculation internally. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> --- arch/arm/mach-shmobile/setup-r8a7791.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/arch/arm/mach-shmobile/setup-r8a7791.c b/arch/arm/mach-shmobile/setup-r8a7791.c index f15b537..e28404e 100644 --- a/arch/arm/mach-shmobile/setup-r8a7791.c +++ b/arch/arm/mach-shmobile/setup-r8a7791.c @@ -84,11 +84,10 @@ void __init r8a7791_pinmux_init(void) r8a7791_register_gpio(7); } -#define __R8A7791_SCIF(scif_type, algo, index, baseaddr, irq) \ +#define __R8A7791_SCIF(scif_type, index, baseaddr, irq) \ static struct plat_sci_port scif##index##_platform_data = { \ .type = scif_type, \ .flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP, \ - .scbrr_algo_id = algo, \ .scscr = SCSCR_RE | SCSCR_TE, \ }; \ \ @@ -98,13 +97,13 @@ static struct resource scif##index##_resources[] = { \ } #define R8A7791_SCIF(index, baseaddr, irq) \ - __R8A7791_SCIF(PORT_SCIF, SCBRR_ALGO_2, index, baseaddr, irq) + __R8A7791_SCIF(PORT_SCIF, index, baseaddr, irq) #define R8A7791_SCIFA(index, baseaddr, irq) \ - __R8A7791_SCIF(PORT_SCIFA, SCBRR_ALGO_4, index, baseaddr, irq) + __R8A7791_SCIF(PORT_SCIFA, index, baseaddr, irq) #define R8A7791_SCIFB(index, baseaddr, irq) \ - __R8A7791_SCIF(PORT_SCIFB, SCBRR_ALGO_4, index, baseaddr, irq) + __R8A7791_SCIF(PORT_SCIFB, index, baseaddr, irq) R8A7791_SCIFA(0, 0xe6c40000, gic_spi(144)); /* SCIFA0 */ R8A7791_SCIFA(1, 0xe6c50000, gic_spi(145)); /* SCIFA1 */ -- 1.8.3.2 ^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 14/16] sh: sh772[34]: Set serial port sampling rate to 8 for SCIFA ports 2013-11-28 21:43 [PATCH 00/16] sh-sci: Remove unnecessary fields from platform data Laurent Pinchart ` (12 preceding siblings ...) 2013-11-28 21:43 ` [PATCH 13/16] ARM: shmobile: r8a7791: " Laurent Pinchart @ 2013-11-28 21:43 ` Laurent Pinchart 2013-11-28 21:43 ` [PATCH 15/16] sh: Don't set plat_sci_port scbrr_algo_id field Laurent Pinchart ` (2 subsequent siblings) 16 siblings, 0 replies; 18+ messages in thread From: Laurent Pinchart @ 2013-11-28 21:43 UTC (permalink / raw) To: linux-sh; +Cc: linux-serial SCIFA ports on sh7723 and sh7724 seem to use a sampling rate of half the value specified in the datasheet. This is currently handled by a custom baud rate calculation algorithm. The algorithm ID will be removed from platform data, set the sampling rate directly instead. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> --- arch/sh/kernel/cpu/sh4a/setup-sh7723.c | 6 +++--- arch/sh/kernel/cpu/sh4a/setup-sh7724.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7723.c b/arch/sh/kernel/cpu/sh4a/setup-sh7723.c index 521a09e..079951b 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7723.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7723.c @@ -98,7 +98,7 @@ static struct plat_sci_port scif3_platform_data = { .flags = UPF_BOOT_AUTOCONF, .port_reg = SCIx_NOT_SUPPORTED, .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE, - .scbrr_algo_id = SCBRR_ALGO_3, + .sampling_rate = 8, .type = PORT_SCIFA, }; @@ -121,7 +121,7 @@ static struct plat_sci_port scif4_platform_data = { .port_reg = SCIx_NOT_SUPPORTED, .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE, - .scbrr_algo_id = SCBRR_ALGO_3, + .sampling_rate = 8, .type = PORT_SCIFA, }; @@ -144,7 +144,7 @@ static struct plat_sci_port scif5_platform_data = { .port_reg = SCIx_NOT_SUPPORTED, .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE, - .scbrr_algo_id = SCBRR_ALGO_3, + .sampling_rate = 8, .type = PORT_SCIFA, }; diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7724.c b/arch/sh/kernel/cpu/sh4a/setup-sh7724.c index fb0a237..59c3594 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7724.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7724.c @@ -365,7 +365,7 @@ static struct plat_sci_port scif3_platform_data = { .port_reg = SCIx_NOT_SUPPORTED, .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RE | SCSCR_TE, - .scbrr_algo_id = SCBRR_ALGO_3, + .sampling_rate = 8, .type = PORT_SCIFA, }; @@ -388,7 +388,7 @@ static struct plat_sci_port scif4_platform_data = { .port_reg = SCIx_NOT_SUPPORTED, .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RE | SCSCR_TE, - .scbrr_algo_id = SCBRR_ALGO_3, + .sampling_rate = 8, .type = PORT_SCIFA, }; @@ -411,7 +411,7 @@ static struct plat_sci_port scif5_platform_data = { .port_reg = SCIx_NOT_SUPPORTED, .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RE | SCSCR_TE, - .scbrr_algo_id = SCBRR_ALGO_3, + .sampling_rate = 8, .type = PORT_SCIFA, }; -- 1.8.3.2 ^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 15/16] sh: Don't set plat_sci_port scbrr_algo_id field 2013-11-28 21:43 [PATCH 00/16] sh-sci: Remove unnecessary fields from platform data Laurent Pinchart ` (13 preceding siblings ...) 2013-11-28 21:43 ` [PATCH 14/16] sh: sh772[34]: Set serial port sampling rate to 8 for SCIFA ports Laurent Pinchart @ 2013-11-28 21:43 ` Laurent Pinchart 2013-11-28 21:43 ` [PATCH 16/16] serial: sh-sci: Remove platform data " Laurent Pinchart 2013-12-03 18:44 ` [PATCH 00/16] sh-sci: Remove unnecessary fields from platform data Greg KH 16 siblings, 0 replies; 18+ messages in thread From: Laurent Pinchart @ 2013-11-28 21:43 UTC (permalink / raw) To: linux-sh; +Cc: linux-serial The field will be removed from the sh-sci driver. Don't set it and let the driver handle baud rate calculation internally. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> --- arch/sh/kernel/cpu/sh2/setup-sh7619.c | 3 --- arch/sh/kernel/cpu/sh2a/setup-mxg.c | 1 - arch/sh/kernel/cpu/sh2a/setup-sh7201.c | 8 -------- arch/sh/kernel/cpu/sh2a/setup-sh7203.c | 4 ---- arch/sh/kernel/cpu/sh2a/setup-sh7206.c | 4 ---- arch/sh/kernel/cpu/sh2a/setup-sh7264.c | 8 -------- arch/sh/kernel/cpu/sh2a/setup-sh7269.c | 8 -------- arch/sh/kernel/cpu/sh3/setup-sh7705.c | 2 -- arch/sh/kernel/cpu/sh3/setup-sh770x.c | 3 --- arch/sh/kernel/cpu/sh3/setup-sh7710.c | 2 -- arch/sh/kernel/cpu/sh3/setup-sh7720.c | 2 -- arch/sh/kernel/cpu/sh4/setup-sh4-202.c | 1 - arch/sh/kernel/cpu/sh4/setup-sh7750.c | 2 -- arch/sh/kernel/cpu/sh4/setup-sh7760.c | 4 ---- arch/sh/kernel/cpu/sh4a/setup-sh7343.c | 4 ---- arch/sh/kernel/cpu/sh4a/setup-sh7366.c | 1 - arch/sh/kernel/cpu/sh4a/setup-sh7722.c | 3 --- arch/sh/kernel/cpu/sh4a/setup-sh7723.c | 3 --- arch/sh/kernel/cpu/sh4a/setup-sh7724.c | 3 --- arch/sh/kernel/cpu/sh4a/setup-sh7734.c | 6 ------ arch/sh/kernel/cpu/sh4a/setup-sh7757.c | 3 --- arch/sh/kernel/cpu/sh4a/setup-sh7763.c | 3 --- arch/sh/kernel/cpu/sh4a/setup-sh7770.c | 10 ---------- arch/sh/kernel/cpu/sh4a/setup-sh7780.c | 4 ---- arch/sh/kernel/cpu/sh4a/setup-sh7785.c | 6 ------ arch/sh/kernel/cpu/sh4a/setup-sh7786.c | 6 ------ arch/sh/kernel/cpu/sh4a/setup-shx3.c | 3 --- arch/sh/kernel/cpu/sh5/setup-sh5.c | 1 - 28 files changed, 108 deletions(-) diff --git a/arch/sh/kernel/cpu/sh2/setup-sh7619.c b/arch/sh/kernel/cpu/sh2/setup-sh7619.c index 1a4fe7c..3860b0b 100644 --- a/arch/sh/kernel/cpu/sh2/setup-sh7619.c +++ b/arch/sh/kernel/cpu/sh2/setup-sh7619.c @@ -63,7 +63,6 @@ static DECLARE_INTC_DESC(intc_desc, "sh7619", vectors, NULL, static struct plat_sci_port scif0_platform_data = { .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE, - .scbrr_algo_id = SCBRR_ALGO_2, .type = PORT_SCIF, }; @@ -85,7 +84,6 @@ static struct platform_device scif0_device = { static struct plat_sci_port scif1_platform_data = { .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE, - .scbrr_algo_id = SCBRR_ALGO_2, .type = PORT_SCIF, }; @@ -107,7 +105,6 @@ static struct platform_device scif1_device = { static struct plat_sci_port scif2_platform_data = { .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE, - .scbrr_algo_id = SCBRR_ALGO_2, .type = PORT_SCIF, }; diff --git a/arch/sh/kernel/cpu/sh2a/setup-mxg.c b/arch/sh/kernel/cpu/sh2a/setup-mxg.c index 9bdc611..63e996f 100644 --- a/arch/sh/kernel/cpu/sh2a/setup-mxg.c +++ b/arch/sh/kernel/cpu/sh2a/setup-mxg.c @@ -201,7 +201,6 @@ static struct platform_device mtu2_2_device = { static struct plat_sci_port scif0_platform_data = { .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE, - .scbrr_algo_id = SCBRR_ALGO_2, .type = PORT_SCIF, }; diff --git a/arch/sh/kernel/cpu/sh2a/setup-sh7201.c b/arch/sh/kernel/cpu/sh2a/setup-sh7201.c index 7585c4e..2c68744 100644 --- a/arch/sh/kernel/cpu/sh2a/setup-sh7201.c +++ b/arch/sh/kernel/cpu/sh2a/setup-sh7201.c @@ -180,7 +180,6 @@ static DECLARE_INTC_DESC(intc_desc, "sh7201", vectors, groups, static struct plat_sci_port scif0_platform_data = { .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE, - .scbrr_algo_id = SCBRR_ALGO_2, .type = PORT_SCIF, }; @@ -202,7 +201,6 @@ static struct platform_device scif0_device = { static struct plat_sci_port scif1_platform_data = { .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE, - .scbrr_algo_id = SCBRR_ALGO_2, .type = PORT_SCIF, }; @@ -224,7 +222,6 @@ static struct platform_device scif1_device = { static struct plat_sci_port scif2_platform_data = { .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE, - .scbrr_algo_id = SCBRR_ALGO_2, .type = PORT_SCIF, }; @@ -246,7 +243,6 @@ static struct platform_device scif2_device = { static struct plat_sci_port scif3_platform_data = { .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE, - .scbrr_algo_id = SCBRR_ALGO_2, .type = PORT_SCIF, }; @@ -268,7 +264,6 @@ static struct platform_device scif3_device = { static struct plat_sci_port scif4_platform_data = { .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE, - .scbrr_algo_id = SCBRR_ALGO_2, .type = PORT_SCIF, }; @@ -290,7 +285,6 @@ static struct platform_device scif4_device = { static struct plat_sci_port scif5_platform_data = { .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE, - .scbrr_algo_id = SCBRR_ALGO_2, .type = PORT_SCIF, }; @@ -312,7 +306,6 @@ static struct platform_device scif5_device = { static struct plat_sci_port scif6_platform_data = { .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE, - .scbrr_algo_id = SCBRR_ALGO_2, .type = PORT_SCIF, }; @@ -334,7 +327,6 @@ static struct platform_device scif6_device = { static struct plat_sci_port scif7_platform_data = { .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE, - .scbrr_algo_id = SCBRR_ALGO_2, .type = PORT_SCIF, }; diff --git a/arch/sh/kernel/cpu/sh2a/setup-sh7203.c b/arch/sh/kernel/cpu/sh2a/setup-sh7203.c index f2a9baa..d55a0f3 100644 --- a/arch/sh/kernel/cpu/sh2a/setup-sh7203.c +++ b/arch/sh/kernel/cpu/sh2a/setup-sh7203.c @@ -177,7 +177,6 @@ static struct plat_sci_port scif0_platform_data = { .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RIE | SCSCR_TIE | SCSCR_RE | SCSCR_TE | SCSCR_REIE, - .scbrr_algo_id = SCBRR_ALGO_2, .type = PORT_SCIF, .regtype = SCIx_SH2_SCIF_FIFODATA_REGTYPE, }; @@ -201,7 +200,6 @@ static struct plat_sci_port scif1_platform_data = { .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RIE | SCSCR_TIE | SCSCR_RE | SCSCR_TE | SCSCR_REIE, - .scbrr_algo_id = SCBRR_ALGO_2, .type = PORT_SCIF, .regtype = SCIx_SH2_SCIF_FIFODATA_REGTYPE, }; @@ -225,7 +223,6 @@ static struct plat_sci_port scif2_platform_data = { .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RIE | SCSCR_TIE | SCSCR_RE | SCSCR_TE | SCSCR_REIE, - .scbrr_algo_id = SCBRR_ALGO_2, .type = PORT_SCIF, .regtype = SCIx_SH2_SCIF_FIFODATA_REGTYPE, }; @@ -249,7 +246,6 @@ static struct plat_sci_port scif3_platform_data = { .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RIE | SCSCR_TIE | SCSCR_RE | SCSCR_TE | SCSCR_REIE, - .scbrr_algo_id = SCBRR_ALGO_2, .type = PORT_SCIF, .regtype = SCIx_SH2_SCIF_FIFODATA_REGTYPE, }; diff --git a/arch/sh/kernel/cpu/sh2a/setup-sh7206.c b/arch/sh/kernel/cpu/sh2a/setup-sh7206.c index fc7cacd..241e745 100644 --- a/arch/sh/kernel/cpu/sh2a/setup-sh7206.c +++ b/arch/sh/kernel/cpu/sh2a/setup-sh7206.c @@ -136,7 +136,6 @@ static DECLARE_INTC_DESC(intc_desc, "sh7206", vectors, groups, static struct plat_sci_port scif0_platform_data = { .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE, - .scbrr_algo_id = SCBRR_ALGO_2, .type = PORT_SCIF, }; @@ -158,7 +157,6 @@ static struct platform_device scif0_device = { static struct plat_sci_port scif1_platform_data = { .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE, - .scbrr_algo_id = SCBRR_ALGO_2, .type = PORT_SCIF, }; @@ -180,7 +178,6 @@ static struct platform_device scif1_device = { static struct plat_sci_port scif2_platform_data = { .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE, - .scbrr_algo_id = SCBRR_ALGO_2, .type = PORT_SCIF, }; @@ -202,7 +199,6 @@ static struct platform_device scif2_device = { static struct plat_sci_port scif3_platform_data = { .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE, - .scbrr_algo_id = SCBRR_ALGO_2, .type = PORT_SCIF, }; diff --git a/arch/sh/kernel/cpu/sh2a/setup-sh7264.c b/arch/sh/kernel/cpu/sh2a/setup-sh7264.c index 00edbda..ad5b0f4 100644 --- a/arch/sh/kernel/cpu/sh2a/setup-sh7264.c +++ b/arch/sh/kernel/cpu/sh2a/setup-sh7264.c @@ -229,7 +229,6 @@ static struct plat_sci_port scif0_platform_data = { .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RIE | SCSCR_TIE | SCSCR_RE | SCSCR_TE | SCSCR_REIE | SCSCR_TOIE, - .scbrr_algo_id = SCBRR_ALGO_2, .type = PORT_SCIF, .regtype = SCIx_SH2_SCIF_FIFODATA_REGTYPE, }; @@ -256,7 +255,6 @@ static struct plat_sci_port scif1_platform_data = { .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RIE | SCSCR_TIE | SCSCR_RE | SCSCR_TE | SCSCR_REIE | SCSCR_TOIE, - .scbrr_algo_id = SCBRR_ALGO_2, .type = PORT_SCIF, .regtype = SCIx_SH2_SCIF_FIFODATA_REGTYPE, }; @@ -283,7 +281,6 @@ static struct plat_sci_port scif2_platform_data = { .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RIE | SCSCR_TIE | SCSCR_RE | SCSCR_TE | SCSCR_REIE | SCSCR_TOIE, - .scbrr_algo_id = SCBRR_ALGO_2, .type = PORT_SCIF, .regtype = SCIx_SH2_SCIF_FIFODATA_REGTYPE, }; @@ -310,7 +307,6 @@ static struct plat_sci_port scif3_platform_data = { .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RIE | SCSCR_TIE | SCSCR_RE | SCSCR_TE | SCSCR_REIE | SCSCR_TOIE, - .scbrr_algo_id = SCBRR_ALGO_2, .type = PORT_SCIF, .regtype = SCIx_SH2_SCIF_FIFODATA_REGTYPE, }; @@ -337,7 +333,6 @@ static struct plat_sci_port scif4_platform_data = { .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RIE | SCSCR_TIE | SCSCR_RE | SCSCR_TE | SCSCR_REIE | SCSCR_TOIE, - .scbrr_algo_id = SCBRR_ALGO_2, .type = PORT_SCIF, .regtype = SCIx_SH2_SCIF_FIFODATA_REGTYPE, }; @@ -364,7 +359,6 @@ static struct plat_sci_port scif5_platform_data = { .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RIE | SCSCR_TIE | SCSCR_RE | SCSCR_TE | SCSCR_REIE | SCSCR_TOIE, - .scbrr_algo_id = SCBRR_ALGO_2, .type = PORT_SCIF, .regtype = SCIx_SH2_SCIF_FIFODATA_REGTYPE, }; @@ -391,7 +385,6 @@ static struct plat_sci_port scif6_platform_data = { .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RIE | SCSCR_TIE | SCSCR_RE | SCSCR_TE | SCSCR_REIE | SCSCR_TOIE, - .scbrr_algo_id = SCBRR_ALGO_2, .type = PORT_SCIF, .regtype = SCIx_SH2_SCIF_FIFODATA_REGTYPE, }; @@ -418,7 +411,6 @@ static struct plat_sci_port scif7_platform_data = { .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RIE | SCSCR_TIE | SCSCR_RE | SCSCR_TE | SCSCR_REIE | SCSCR_TOIE, - .scbrr_algo_id = SCBRR_ALGO_2, .type = PORT_SCIF, .regtype = SCIx_SH2_SCIF_FIFODATA_REGTYPE, }; diff --git a/arch/sh/kernel/cpu/sh2a/setup-sh7269.c b/arch/sh/kernel/cpu/sh2a/setup-sh7269.c index 5cdbaac..3995119 100644 --- a/arch/sh/kernel/cpu/sh2a/setup-sh7269.c +++ b/arch/sh/kernel/cpu/sh2a/setup-sh7269.c @@ -251,7 +251,6 @@ static struct plat_sci_port scif0_platform_data = { .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RIE | SCSCR_TIE | SCSCR_RE | SCSCR_TE | SCSCR_REIE | SCSCR_TOIE, - .scbrr_algo_id = SCBRR_ALGO_2, .type = PORT_SCIF, .regtype = SCIx_SH2_SCIF_FIFODATA_REGTYPE, }; @@ -278,7 +277,6 @@ static struct plat_sci_port scif1_platform_data = { .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RIE | SCSCR_TIE | SCSCR_RE | SCSCR_TE | SCSCR_REIE | SCSCR_TOIE, - .scbrr_algo_id = SCBRR_ALGO_2, .type = PORT_SCIF, .regtype = SCIx_SH2_SCIF_FIFODATA_REGTYPE, }; @@ -305,7 +303,6 @@ static struct plat_sci_port scif2_platform_data = { .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RIE | SCSCR_TIE | SCSCR_RE | SCSCR_TE | SCSCR_REIE | SCSCR_TOIE, - .scbrr_algo_id = SCBRR_ALGO_2, .type = PORT_SCIF, .regtype = SCIx_SH2_SCIF_FIFODATA_REGTYPE, }; @@ -332,7 +329,6 @@ static struct plat_sci_port scif3_platform_data = { .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RIE | SCSCR_TIE | SCSCR_RE | SCSCR_TE | SCSCR_REIE | SCSCR_TOIE, - .scbrr_algo_id = SCBRR_ALGO_2, .type = PORT_SCIF, .regtype = SCIx_SH2_SCIF_FIFODATA_REGTYPE, }; @@ -359,7 +355,6 @@ static struct plat_sci_port scif4_platform_data = { .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RIE | SCSCR_TIE | SCSCR_RE | SCSCR_TE | SCSCR_REIE | SCSCR_TOIE, - .scbrr_algo_id = SCBRR_ALGO_2, .type = PORT_SCIF, .regtype = SCIx_SH2_SCIF_FIFODATA_REGTYPE, }; @@ -386,7 +381,6 @@ static struct plat_sci_port scif5_platform_data = { .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RIE | SCSCR_TIE | SCSCR_RE | SCSCR_TE | SCSCR_REIE | SCSCR_TOIE, - .scbrr_algo_id = SCBRR_ALGO_2, .type = PORT_SCIF, .regtype = SCIx_SH2_SCIF_FIFODATA_REGTYPE, }; @@ -413,7 +407,6 @@ static struct plat_sci_port scif6_platform_data = { .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RIE | SCSCR_TIE | SCSCR_RE | SCSCR_TE | SCSCR_REIE | SCSCR_TOIE, - .scbrr_algo_id = SCBRR_ALGO_2, .type = PORT_SCIF, .regtype = SCIx_SH2_SCIF_FIFODATA_REGTYPE, }; @@ -440,7 +433,6 @@ static struct plat_sci_port scif7_platform_data = { .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RIE | SCSCR_TIE | SCSCR_RE | SCSCR_TE | SCSCR_REIE | SCSCR_TOIE, - .scbrr_algo_id = SCBRR_ALGO_2, .type = PORT_SCIF, .regtype = SCIx_SH2_SCIF_FIFODATA_REGTYPE, }; diff --git a/arch/sh/kernel/cpu/sh3/setup-sh7705.c b/arch/sh/kernel/cpu/sh3/setup-sh7705.c index 10dd0a0..c76b254 100644 --- a/arch/sh/kernel/cpu/sh3/setup-sh7705.c +++ b/arch/sh/kernel/cpu/sh3/setup-sh7705.c @@ -73,7 +73,6 @@ static struct plat_sci_port scif0_platform_data = { .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_TIE | SCSCR_RIE | SCSCR_TE | SCSCR_RE | SCSCR_CKE1 | SCSCR_CKE0, - .scbrr_algo_id = SCBRR_ALGO_4, .type = PORT_SCIF, .ops = &sh770x_sci_port_ops, .regtype = SCIx_SH7705_SCIF_REGTYPE, @@ -97,7 +96,6 @@ static struct platform_device scif0_device = { static struct plat_sci_port scif1_platform_data = { .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_TIE | SCSCR_RIE | SCSCR_TE | SCSCR_RE, - .scbrr_algo_id = SCBRR_ALGO_4, .type = PORT_SCIF, .ops = &sh770x_sci_port_ops, .regtype = SCIx_SH7705_SCIF_REGTYPE, diff --git a/arch/sh/kernel/cpu/sh3/setup-sh770x.c b/arch/sh/kernel/cpu/sh3/setup-sh770x.c index d5541b0..ff1465c 100644 --- a/arch/sh/kernel/cpu/sh3/setup-sh770x.c +++ b/arch/sh/kernel/cpu/sh3/setup-sh770x.c @@ -112,7 +112,6 @@ static struct plat_sci_port scif0_platform_data = { .port_reg = 0xa4000136, .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_TE | SCSCR_RE, - .scbrr_algo_id = SCBRR_ALGO_2, .type = PORT_SCI, .ops = &sh770x_sci_port_ops, .regshift = 1, @@ -138,7 +137,6 @@ static struct platform_device scif0_device = { static struct plat_sci_port scif1_platform_data = { .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_TE | SCSCR_RE, - .scbrr_algo_id = SCBRR_ALGO_2, .type = PORT_SCIF, .ops = &sh770x_sci_port_ops, .regtype = SCIx_SH3_SCIF_REGTYPE, @@ -165,7 +163,6 @@ static struct plat_sci_port scif2_platform_data = { .port_reg = SCIx_NOT_SUPPORTED, .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_TE | SCSCR_RE, - .scbrr_algo_id = SCBRR_ALGO_2, .type = PORT_IRDA, .ops = &sh770x_sci_port_ops, .regshift = 1, diff --git a/arch/sh/kernel/cpu/sh3/setup-sh7710.c b/arch/sh/kernel/cpu/sh3/setup-sh7710.c index de229f5..e2ce936 100644 --- a/arch/sh/kernel/cpu/sh3/setup-sh7710.c +++ b/arch/sh/kernel/cpu/sh3/setup-sh7710.c @@ -101,7 +101,6 @@ static struct plat_sci_port scif0_platform_data = { .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_TE | SCSCR_RE | SCSCR_REIE | SCSCR_CKE1 | SCSCR_CKE0, - .scbrr_algo_id = SCBRR_ALGO_2, .type = PORT_SCIF, }; @@ -124,7 +123,6 @@ static struct plat_sci_port scif1_platform_data = { .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_TE | SCSCR_RE | SCSCR_REIE | SCSCR_CKE1 | SCSCR_CKE0, - .scbrr_algo_id = SCBRR_ALGO_2, .type = PORT_SCIF, }; diff --git a/arch/sh/kernel/cpu/sh3/setup-sh7720.c b/arch/sh/kernel/cpu/sh3/setup-sh7720.c index ca83581..1d5729d 100644 --- a/arch/sh/kernel/cpu/sh3/setup-sh7720.c +++ b/arch/sh/kernel/cpu/sh3/setup-sh7720.c @@ -54,7 +54,6 @@ static struct platform_device rtc_device = { static struct plat_sci_port scif0_platform_data = { .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RE | SCSCR_TE, - .scbrr_algo_id = SCBRR_ALGO_4, .type = PORT_SCIF, .ops = &sh7720_sci_port_ops, .regtype = SCIx_SH7705_SCIF_REGTYPE, @@ -78,7 +77,6 @@ static struct platform_device scif0_device = { static struct plat_sci_port scif1_platform_data = { .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RE | SCSCR_TE, - .scbrr_algo_id = SCBRR_ALGO_4, .type = PORT_SCIF, .ops = &sh7720_sci_port_ops, .regtype = SCIx_SH7705_SCIF_REGTYPE, diff --git a/arch/sh/kernel/cpu/sh4/setup-sh4-202.c b/arch/sh/kernel/cpu/sh4/setup-sh4-202.c index 0fc6a10..a8bd778 100644 --- a/arch/sh/kernel/cpu/sh4/setup-sh4-202.c +++ b/arch/sh/kernel/cpu/sh4/setup-sh4-202.c @@ -19,7 +19,6 @@ static struct plat_sci_port scif0_platform_data = { .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE, - .scbrr_algo_id = SCBRR_ALGO_2, .type = PORT_SCIF, }; diff --git a/arch/sh/kernel/cpu/sh4/setup-sh7750.c b/arch/sh/kernel/cpu/sh4/setup-sh7750.c index 5613c15..a447a24 100644 --- a/arch/sh/kernel/cpu/sh4/setup-sh7750.c +++ b/arch/sh/kernel/cpu/sh4/setup-sh7750.c @@ -41,7 +41,6 @@ static struct plat_sci_port sci_platform_data = { .port_reg = 0xffe0001C, .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_TE | SCSCR_RE, - .scbrr_algo_id = SCBRR_ALGO_2, .type = PORT_SCI, .regshift = 2, }; @@ -64,7 +63,6 @@ static struct platform_device sci_device = { static struct plat_sci_port scif_platform_data = { .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_TE | SCSCR_RE | SCSCR_REIE, - .scbrr_algo_id = SCBRR_ALGO_2, .type = PORT_SCIF, }; diff --git a/arch/sh/kernel/cpu/sh4/setup-sh7760.c b/arch/sh/kernel/cpu/sh4/setup-sh7760.c index a83e6f5..1abd9fb 100644 --- a/arch/sh/kernel/cpu/sh4/setup-sh7760.c +++ b/arch/sh/kernel/cpu/sh4/setup-sh7760.c @@ -130,7 +130,6 @@ static DECLARE_INTC_DESC(intc_desc_irq, "sh7760-irq", vectors_irq, groups, static struct plat_sci_port scif0_platform_data = { .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE, - .scbrr_algo_id = SCBRR_ALGO_2, .type = PORT_SCIF, .regtype = SCIx_SH4_SCIF_FIFODATA_REGTYPE, }; @@ -157,7 +156,6 @@ static struct plat_sci_port scif1_platform_data = { .flags = UPF_BOOT_AUTOCONF, .type = PORT_SCIF, .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE, - .scbrr_algo_id = SCBRR_ALGO_2, .regtype = SCIx_SH4_SCIF_FIFODATA_REGTYPE, }; @@ -182,7 +180,6 @@ static struct platform_device scif1_device = { static struct plat_sci_port scif2_platform_data = { .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE, - .scbrr_algo_id = SCBRR_ALGO_2, .type = PORT_SCIF, .regtype = SCIx_SH4_SCIF_FIFODATA_REGTYPE, }; @@ -208,7 +205,6 @@ static struct platform_device scif2_device = { static struct plat_sci_port scif3_platform_data = { .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE, - .scbrr_algo_id = SCBRR_ALGO_2, .type = PORT_SCI, .regshift = 2, }; diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7343.c b/arch/sh/kernel/cpu/sh4a/setup-sh7343.c index 8b45f67..245d192 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7343.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7343.c @@ -20,7 +20,6 @@ static struct plat_sci_port scif0_platform_data = { .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RE | SCSCR_TE | SCSCR_CKE1, - .scbrr_algo_id = SCBRR_ALGO_2, .type = PORT_SCIF, }; @@ -42,7 +41,6 @@ static struct platform_device scif0_device = { static struct plat_sci_port scif1_platform_data = { .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RE | SCSCR_TE | SCSCR_CKE1, - .scbrr_algo_id = SCBRR_ALGO_2, .type = PORT_SCIF, }; @@ -64,7 +62,6 @@ static struct platform_device scif1_device = { static struct plat_sci_port scif2_platform_data = { .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RE | SCSCR_TE | SCSCR_CKE1, - .scbrr_algo_id = SCBRR_ALGO_2, .type = PORT_SCIF, }; @@ -86,7 +83,6 @@ static struct platform_device scif2_device = { static struct plat_sci_port scif3_platform_data = { .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RE | SCSCR_TE | SCSCR_CKE1, - .scbrr_algo_id = SCBRR_ALGO_2, .type = PORT_SCIF, }; diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7366.c b/arch/sh/kernel/cpu/sh4a/setup-sh7366.c index 317f710..6f56cbd 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7366.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7366.c @@ -23,7 +23,6 @@ static struct plat_sci_port scif0_platform_data = { .port_reg = 0xa405013e, .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE, - .scbrr_algo_id = SCBRR_ALGO_2, .type = PORT_SCIF, }; diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7722.c b/arch/sh/kernel/cpu/sh4a/setup-sh7722.c index 6aeebb5..5a94efc 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7722.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7722.c @@ -181,7 +181,6 @@ struct platform_device dma_device = { static struct plat_sci_port scif0_platform_data = { .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE, - .scbrr_algo_id = SCBRR_ALGO_2, .type = PORT_SCIF, .ops = &sh7722_sci_port_ops, .regtype = SCIx_SH4_SCIF_NO_SCSPTR_REGTYPE, @@ -205,7 +204,6 @@ static struct platform_device scif0_device = { static struct plat_sci_port scif1_platform_data = { .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE, - .scbrr_algo_id = SCBRR_ALGO_2, .type = PORT_SCIF, .ops = &sh7722_sci_port_ops, .regtype = SCIx_SH4_SCIF_NO_SCSPTR_REGTYPE, @@ -229,7 +227,6 @@ static struct platform_device scif1_device = { static struct plat_sci_port scif2_platform_data = { .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE, - .scbrr_algo_id = SCBRR_ALGO_2, .type = PORT_SCIF, .ops = &sh7722_sci_port_ops, .regtype = SCIx_SH4_SCIF_NO_SCSPTR_REGTYPE, diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7723.c b/arch/sh/kernel/cpu/sh4a/setup-sh7723.c index 079951b..3c5eb09 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7723.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7723.c @@ -26,7 +26,6 @@ static struct plat_sci_port scif0_platform_data = { .port_reg = 0xa4050160, .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE, - .scbrr_algo_id = SCBRR_ALGO_2, .type = PORT_SCIF, .regtype = SCIx_SH4_SCIF_NO_SCSPTR_REGTYPE, }; @@ -50,7 +49,6 @@ static struct plat_sci_port scif1_platform_data = { .port_reg = SCIx_NOT_SUPPORTED, .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE, - .scbrr_algo_id = SCBRR_ALGO_2, .type = PORT_SCIF, .regtype = SCIx_SH4_SCIF_NO_SCSPTR_REGTYPE, }; @@ -74,7 +72,6 @@ static struct plat_sci_port scif2_platform_data = { .port_reg = SCIx_NOT_SUPPORTED, .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE, - .scbrr_algo_id = SCBRR_ALGO_2, .type = PORT_SCIF, .regtype = SCIx_SH4_SCIF_NO_SCSPTR_REGTYPE, }; diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7724.c b/arch/sh/kernel/cpu/sh4a/setup-sh7724.c index 59c3594..60ebbc6 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7724.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7724.c @@ -293,7 +293,6 @@ static struct plat_sci_port scif0_platform_data = { .port_reg = SCIx_NOT_SUPPORTED, .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE, - .scbrr_algo_id = SCBRR_ALGO_2, .type = PORT_SCIF, .regtype = SCIx_SH4_SCIF_NO_SCSPTR_REGTYPE, }; @@ -317,7 +316,6 @@ static struct plat_sci_port scif1_platform_data = { .port_reg = SCIx_NOT_SUPPORTED, .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE, - .scbrr_algo_id = SCBRR_ALGO_2, .type = PORT_SCIF, .regtype = SCIx_SH4_SCIF_NO_SCSPTR_REGTYPE, }; @@ -341,7 +339,6 @@ static struct plat_sci_port scif2_platform_data = { .port_reg = SCIx_NOT_SUPPORTED, .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE, - .scbrr_algo_id = SCBRR_ALGO_2, .type = PORT_SCIF, .regtype = SCIx_SH4_SCIF_NO_SCSPTR_REGTYPE, }; diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7734.c b/arch/sh/kernel/cpu/sh4a/setup-sh7734.c index bedf8fb..dad4ed1 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7734.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7734.c @@ -27,7 +27,6 @@ static struct plat_sci_port scif0_platform_data = { .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE, - .scbrr_algo_id = SCBRR_ALGO_2, .type = PORT_SCIF, .regtype = SCIx_SH4_SCIF_REGTYPE, }; @@ -50,7 +49,6 @@ static struct platform_device scif0_device = { static struct plat_sci_port scif1_platform_data = { .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE, - .scbrr_algo_id = SCBRR_ALGO_2, .type = PORT_SCIF, .regtype = SCIx_SH4_SCIF_REGTYPE, }; @@ -73,7 +71,6 @@ static struct platform_device scif1_device = { static struct plat_sci_port scif2_platform_data = { .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE, - .scbrr_algo_id = SCBRR_ALGO_2, .type = PORT_SCIF, .regtype = SCIx_SH4_SCIF_REGTYPE, }; @@ -96,7 +93,6 @@ static struct platform_device scif2_device = { static struct plat_sci_port scif3_platform_data = { .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE | SCSCR_TOIE, - .scbrr_algo_id = SCBRR_ALGO_2, .type = PORT_SCIF, .regtype = SCIx_SH4_SCIF_REGTYPE, }; @@ -119,7 +115,6 @@ static struct platform_device scif3_device = { static struct plat_sci_port scif4_platform_data = { .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE, - .scbrr_algo_id = SCBRR_ALGO_2, .type = PORT_SCIF, .regtype = SCIx_SH4_SCIF_REGTYPE, }; @@ -142,7 +137,6 @@ static struct platform_device scif4_device = { static struct plat_sci_port scif5_platform_data = { .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE, - .scbrr_algo_id = SCBRR_ALGO_2, .type = PORT_SCIF, .regtype = SCIx_SH4_SCIF_REGTYPE, }; diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7757.c b/arch/sh/kernel/cpu/sh4a/setup-sh7757.c index 6b8d0e6..e43e5db 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7757.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7757.c @@ -26,7 +26,6 @@ static struct plat_sci_port scif2_platform_data = { .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE, - .scbrr_algo_id = SCBRR_ALGO_2, .type = PORT_SCIF, }; @@ -48,7 +47,6 @@ static struct platform_device scif2_device = { static struct plat_sci_port scif3_platform_data = { .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE, - .scbrr_algo_id = SCBRR_ALGO_2, .type = PORT_SCIF, }; @@ -70,7 +68,6 @@ static struct platform_device scif3_device = { static struct plat_sci_port scif4_platform_data = { .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE, - .scbrr_algo_id = SCBRR_ALGO_2, .type = PORT_SCIF, }; diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7763.c b/arch/sh/kernel/cpu/sh4a/setup-sh7763.c index 940505c..5eebbd7 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7763.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7763.c @@ -21,7 +21,6 @@ static struct plat_sci_port scif0_platform_data = { .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE, - .scbrr_algo_id = SCBRR_ALGO_2, .type = PORT_SCIF, .regtype = SCIx_SH4_SCIF_FIFODATA_REGTYPE, }; @@ -44,7 +43,6 @@ static struct platform_device scif0_device = { static struct plat_sci_port scif1_platform_data = { .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE, - .scbrr_algo_id = SCBRR_ALGO_2, .type = PORT_SCIF, .regtype = SCIx_SH4_SCIF_FIFODATA_REGTYPE, }; @@ -67,7 +65,6 @@ static struct platform_device scif1_device = { static struct plat_sci_port scif2_platform_data = { .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE, - .scbrr_algo_id = SCBRR_ALGO_2, .type = PORT_SCIF, .regtype = SCIx_SH4_SCIF_FIFODATA_REGTYPE, }; diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7770.c b/arch/sh/kernel/cpu/sh4a/setup-sh7770.c index f9c04de..e1ba8cb7 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7770.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7770.c @@ -18,7 +18,6 @@ static struct plat_sci_port scif0_platform_data = { .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE | SCSCR_TOIE, - .scbrr_algo_id = SCBRR_ALGO_2, .type = PORT_SCIF, }; @@ -40,7 +39,6 @@ static struct platform_device scif0_device = { static struct plat_sci_port scif1_platform_data = { .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE | SCSCR_TOIE, - .scbrr_algo_id = SCBRR_ALGO_2, .type = PORT_SCIF, }; @@ -62,7 +60,6 @@ static struct platform_device scif1_device = { static struct plat_sci_port scif2_platform_data = { .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE | SCSCR_TOIE, - .scbrr_algo_id = SCBRR_ALGO_2, .type = PORT_SCIF, }; @@ -84,7 +81,6 @@ static struct platform_device scif2_device = { static struct plat_sci_port scif3_platform_data = { .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE | SCSCR_TOIE, - .scbrr_algo_id = SCBRR_ALGO_2, .type = PORT_SCIF, }; @@ -106,7 +102,6 @@ static struct platform_device scif3_device = { static struct plat_sci_port scif4_platform_data = { .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE | SCSCR_TOIE, - .scbrr_algo_id = SCBRR_ALGO_2, .type = PORT_SCIF, }; @@ -128,7 +123,6 @@ static struct platform_device scif4_device = { static struct plat_sci_port scif5_platform_data = { .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE | SCSCR_TOIE, - .scbrr_algo_id = SCBRR_ALGO_2, .type = PORT_SCIF, }; @@ -150,7 +144,6 @@ static struct platform_device scif5_device = { static struct plat_sci_port scif6_platform_data = { .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE | SCSCR_TOIE, - .scbrr_algo_id = SCBRR_ALGO_2, .type = PORT_SCIF, }; @@ -172,7 +165,6 @@ static struct platform_device scif6_device = { static struct plat_sci_port scif7_platform_data = { .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE | SCSCR_TOIE, - .scbrr_algo_id = SCBRR_ALGO_2, .type = PORT_SCIF, }; @@ -194,7 +186,6 @@ static struct platform_device scif7_device = { static struct plat_sci_port scif8_platform_data = { .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE | SCSCR_TOIE, - .scbrr_algo_id = SCBRR_ALGO_2, .type = PORT_SCIF, }; @@ -216,7 +207,6 @@ static struct platform_device scif8_device = { static struct plat_sci_port scif9_platform_data = { .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE | SCSCR_TOIE, - .scbrr_algo_id = SCBRR_ALGO_2, .type = PORT_SCIF, }; diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7780.c b/arch/sh/kernel/cpu/sh4a/setup-sh7780.c index 227f8f4..668e54b 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7780.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7780.c @@ -20,7 +20,6 @@ static struct plat_sci_port scif0_platform_data = { .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE | SCSCR_CKE1, - .scbrr_algo_id = SCBRR_ALGO_1, .type = PORT_SCIF, .regtype = SCIx_SH4_SCIF_FIFODATA_REGTYPE, }; @@ -43,7 +42,6 @@ static struct platform_device scif0_device = { static struct plat_sci_port scif1_platform_data = { .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE | SCSCR_CKE1, - .scbrr_algo_id = SCBRR_ALGO_1, .type = PORT_SCIF, .regtype = SCIx_SH4_SCIF_FIFODATA_REGTYPE, }; @@ -419,9 +417,7 @@ void __init plat_early_device_setup(void) { if (mach_is_sh2007()) { scif0_platform_data.scscr &= ~SCSCR_CKE1; - scif0_platform_data.scbrr_algo_id = SCBRR_ALGO_2; scif1_platform_data.scscr &= ~SCSCR_CKE1; - scif1_platform_data.scbrr_algo_id = SCBRR_ALGO_2; } early_platform_add_devices(sh7780_early_devices, diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7785.c b/arch/sh/kernel/cpu/sh4a/setup-sh7785.c index b9f64c1..4aa6791 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7785.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7785.c @@ -22,7 +22,6 @@ static struct plat_sci_port scif0_platform_data = { .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE | SCSCR_CKE1, - .scbrr_algo_id = SCBRR_ALGO_1, .type = PORT_SCIF, .regtype = SCIx_SH4_SCIF_FIFODATA_REGTYPE, }; @@ -45,7 +44,6 @@ static struct platform_device scif0_device = { static struct plat_sci_port scif1_platform_data = { .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE | SCSCR_CKE1, - .scbrr_algo_id = SCBRR_ALGO_1, .type = PORT_SCIF, .regtype = SCIx_SH4_SCIF_FIFODATA_REGTYPE, }; @@ -68,7 +66,6 @@ static struct platform_device scif1_device = { static struct plat_sci_port scif2_platform_data = { .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE | SCSCR_CKE1, - .scbrr_algo_id = SCBRR_ALGO_1, .type = PORT_SCIF, .regtype = SCIx_SH4_SCIF_FIFODATA_REGTYPE, }; @@ -91,7 +88,6 @@ static struct platform_device scif2_device = { static struct plat_sci_port scif3_platform_data = { .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE | SCSCR_CKE1, - .scbrr_algo_id = SCBRR_ALGO_1, .type = PORT_SCIF, .regtype = SCIx_SH4_SCIF_FIFODATA_REGTYPE, }; @@ -114,7 +110,6 @@ static struct platform_device scif3_device = { static struct plat_sci_port scif4_platform_data = { .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE | SCSCR_CKE1, - .scbrr_algo_id = SCBRR_ALGO_1, .type = PORT_SCIF, .regtype = SCIx_SH4_SCIF_FIFODATA_REGTYPE, }; @@ -137,7 +132,6 @@ static struct platform_device scif4_device = { static struct plat_sci_port scif5_platform_data = { .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE | SCSCR_CKE1, - .scbrr_algo_id = SCBRR_ALGO_1, .type = PORT_SCIF, .regtype = SCIx_SH4_SCIF_FIFODATA_REGTYPE, }; diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7786.c b/arch/sh/kernel/cpu/sh4a/setup-sh7786.c index 92b95ce..5d619a5 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7786.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7786.c @@ -30,7 +30,6 @@ static struct plat_sci_port scif0_platform_data = { .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE | SCSCR_CKE1, - .scbrr_algo_id = SCBRR_ALGO_1, .type = PORT_SCIF, .regtype = SCIx_SH4_SCIF_FIFODATA_REGTYPE, }; @@ -59,7 +58,6 @@ static struct platform_device scif0_device = { static struct plat_sci_port scif1_platform_data = { .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE | SCSCR_CKE1, - .scbrr_algo_id = SCBRR_ALGO_1, .type = PORT_SCIF, .regtype = SCIx_SH4_SCIF_FIFODATA_REGTYPE, }; @@ -91,7 +89,6 @@ static struct platform_device scif1_device = { static struct plat_sci_port scif2_platform_data = { .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE | SCSCR_CKE1, - .scbrr_algo_id = SCBRR_ALGO_1, .type = PORT_SCIF, .regtype = SCIx_SH4_SCIF_FIFODATA_REGTYPE, }; @@ -114,7 +111,6 @@ static struct platform_device scif2_device = { static struct plat_sci_port scif3_platform_data = { .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE | SCSCR_CKE1, - .scbrr_algo_id = SCBRR_ALGO_1, .type = PORT_SCIF, .regtype = SCIx_SH4_SCIF_FIFODATA_REGTYPE, }; @@ -137,7 +133,6 @@ static struct platform_device scif3_device = { static struct plat_sci_port scif4_platform_data = { .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE | SCSCR_CKE1, - .scbrr_algo_id = SCBRR_ALGO_1, .type = PORT_SCIF, .regtype = SCIx_SH4_SCIF_FIFODATA_REGTYPE, }; @@ -160,7 +155,6 @@ static struct platform_device scif4_device = { static struct plat_sci_port scif5_platform_data = { .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE | SCSCR_CKE1, - .scbrr_algo_id = SCBRR_ALGO_1, .type = PORT_SCIF, .regtype = SCIx_SH4_SCIF_FIFODATA_REGTYPE, }; diff --git a/arch/sh/kernel/cpu/sh4a/setup-shx3.c b/arch/sh/kernel/cpu/sh4a/setup-shx3.c index 4d65be9..0856bcb 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-shx3.c +++ b/arch/sh/kernel/cpu/sh4a/setup-shx3.c @@ -30,7 +30,6 @@ static struct plat_sci_port scif0_platform_data = { .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE, - .scbrr_algo_id = SCBRR_ALGO_2, .type = PORT_SCIF, }; @@ -55,7 +54,6 @@ static struct platform_device scif0_device = { static struct plat_sci_port scif1_platform_data = { .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE, - .scbrr_algo_id = SCBRR_ALGO_2, .type = PORT_SCIF, }; @@ -80,7 +78,6 @@ static struct platform_device scif1_device = { static struct plat_sci_port scif2_platform_data = { .flags = UPF_BOOT_AUTOCONF, .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE, - .scbrr_algo_id = SCBRR_ALGO_2, .type = PORT_SCIF, }; diff --git a/arch/sh/kernel/cpu/sh5/setup-sh5.c b/arch/sh/kernel/cpu/sh5/setup-sh5.c index 64b0981..14d6821 100644 --- a/arch/sh/kernel/cpu/sh5/setup-sh5.c +++ b/arch/sh/kernel/cpu/sh5/setup-sh5.c @@ -19,7 +19,6 @@ static struct plat_sci_port scif0_platform_data = { .flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP, .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE, - .scbrr_algo_id = SCBRR_ALGO_2, .type = PORT_SCIF, }; -- 1.8.3.2 ^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 16/16] serial: sh-sci: Remove platform data scbrr_algo_id field 2013-11-28 21:43 [PATCH 00/16] sh-sci: Remove unnecessary fields from platform data Laurent Pinchart ` (14 preceding siblings ...) 2013-11-28 21:43 ` [PATCH 15/16] sh: Don't set plat_sci_port scbrr_algo_id field Laurent Pinchart @ 2013-11-28 21:43 ` Laurent Pinchart 2013-12-03 18:44 ` [PATCH 00/16] sh-sci: Remove unnecessary fields from platform data Greg KH 16 siblings, 0 replies; 18+ messages in thread From: Laurent Pinchart @ 2013-11-28 21:43 UTC (permalink / raw) To: linux-sh; +Cc: linux-serial The field isn't set by any board, remote it. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> --- drivers/tty/serial/sh-sci.c | 26 +++++--------------------- include/linux/serial_sci.h | 10 ---------- 2 files changed, 5 insertions(+), 31 deletions(-) diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c index c65d37b..0bdbde1 100644 --- a/drivers/tty/serial/sh-sci.c +++ b/drivers/tty/serial/sh-sci.c @@ -1770,17 +1770,6 @@ static unsigned int sci_scbrr_calc(struct sci_port *s, unsigned int bps, if (s->sampling_rate) return DIV_ROUND_CLOSEST(freq, s->sampling_rate * bps) - 1; - switch (s->cfg->scbrr_algo_id) { - case SCBRR_ALGO_1: - return freq / (16 * bps); - case SCBRR_ALGO_2: - return DIV_ROUND_CLOSEST(freq, 32 * bps) - 1; - case SCBRR_ALGO_3: - return freq / (8 * bps); - case SCBRR_ALGO_4: - return DIV_ROUND_CLOSEST(freq, 16 * bps) - 1; - } - /* Warn, but use a safe default */ WARN_ON(1); @@ -2180,17 +2169,12 @@ static int sci_init_single(struct platform_device *dev, break; } - /* Set the sampling rate if the baud rate calculation algorithm isn't - * specified. + /* SCIFA on sh7723 and sh7724 need a custom sampling rate that doesn't + * match the SoC datasheet, this should be investigated. Let platform + * data override the sampling rate for now. */ - if (p->scbrr_algo_id == SCBRR_ALGO_NONE) { - /* SCIFA on sh7723 and sh7724 need a custom sampling rate that - * doesn't match the SoC datasheet, this should be investigated. - * Let platform data override the sampling rate for now. - */ - sci_port->sampling_rate = p->sampling_rate ? p->sampling_rate - : sampling_rate; - } + sci_port->sampling_rate = p->sampling_rate ? p->sampling_rate + : sampling_rate; if (!early) { sci_port->iclk = clk_get(&dev->dev, "sci_ick"); diff --git a/include/linux/serial_sci.h b/include/linux/serial_sci.h index 06dc806..22b3640 100644 --- a/include/linux/serial_sci.h +++ b/include/linux/serial_sci.h @@ -10,15 +10,6 @@ #define SCIx_NOT_SUPPORTED (-1) -enum { - SCBRR_ALGO_NONE, /* Compute sampling rate in the driver */ - SCBRR_ALGO_1, /* clk / (16 * bps) */ - SCBRR_ALGO_2, /* DIV_ROUND_CLOSEST(clk, 32 * bps) - 1 */ - SCBRR_ALGO_3, /* clk / (8 * bps) */ - SCBRR_ALGO_4, /* DIV_ROUND_CLOSEST(clk, 16 * bps) - 1 */ - SCBRR_ALGO_6, /* HSCIF variable sample rate algorithm */ -}; - #define SCSCR_TIE (1 << 7) #define SCSCR_RIE (1 << 6) #define SCSCR_TE (1 << 5) @@ -110,7 +101,6 @@ struct plat_sci_port { unsigned long capabilities; /* Port features/capabilities */ unsigned int sampling_rate; - unsigned int scbrr_algo_id; /* SCBRR calculation algo */ unsigned int scscr; /* SCSCR initialization */ /* -- 1.8.3.2 ^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: [PATCH 00/16] sh-sci: Remove unnecessary fields from platform data 2013-11-28 21:43 [PATCH 00/16] sh-sci: Remove unnecessary fields from platform data Laurent Pinchart ` (15 preceding siblings ...) 2013-11-28 21:43 ` [PATCH 16/16] serial: sh-sci: Remove platform data " Laurent Pinchart @ 2013-12-03 18:44 ` Greg KH 16 siblings, 0 replies; 18+ messages in thread From: Greg KH @ 2013-12-03 18:44 UTC (permalink / raw) To: Laurent Pinchart; +Cc: linux-sh, linux-serial On Thu, Nov 28, 2013 at 10:43:14PM +0100, Laurent Pinchart wrote: > Hello, > > This patch set removes or replaces unneeded fields from the sh-sci platform > data structure. Fields are simply removed when unused (gpios), moved to the > sci_port structure when used by the driver but not by board code (overrun_bit > and error_mask), or replaced by a more explicit field with a default value > computed in the driver for most cases (scbrr_algo_id). > > The patches are based on top of the sh-sci DT patch series previously posted > to the mailing lists. For all serial patches: Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> ^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2013-12-03 18:43 UTC | newest] Thread overview: 18+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2013-11-28 21:43 [PATCH 00/16] sh-sci: Remove unnecessary fields from platform data Laurent Pinchart 2013-11-28 21:43 ` [PATCH 01/16] serial: sh-sci: Move overrun_bit and error_mask fields out of pdata Laurent Pinchart 2013-11-28 21:43 ` [PATCH 02/16] serial: sh-sci: Remove unused GPIO request code Laurent Pinchart 2013-11-28 21:43 ` [PATCH 03/16] serial: sh-sci: Compute overrun_bit without using baud rate algo Laurent Pinchart 2013-11-28 21:43 ` [PATCH 04/16] serial: sh-sci: Rework baud rate calculation Laurent Pinchart 2013-11-28 21:43 ` [PATCH 05/16] ARM: shmobile: sh7372: Don't set plat_sci_port scbrr_algo_id field Laurent Pinchart 2013-11-28 21:43 ` [PATCH 06/16] ARM: shmobile: sh73a0: " Laurent Pinchart 2013-11-28 21:43 ` [PATCH 07/16] ARM: shmobile: r7s72100: " Laurent Pinchart 2013-11-28 21:43 ` [PATCH 08/16] ARM: shmobile: r8a73a4: " Laurent Pinchart 2013-11-28 21:43 ` [PATCH 09/16] ARM: shmobile: r8a7740: " Laurent Pinchart 2013-11-28 21:43 ` [PATCH 10/16] ARM: shmobile: r8a7778: " Laurent Pinchart 2013-11-28 21:43 ` [PATCH 11/16] ARM: shmobile: r8a7779: " Laurent Pinchart 2013-11-28 21:43 ` [PATCH 12/16] ARM: shmobile: r8a7790: " Laurent Pinchart 2013-11-28 21:43 ` [PATCH 13/16] ARM: shmobile: r8a7791: " Laurent Pinchart 2013-11-28 21:43 ` [PATCH 14/16] sh: sh772[34]: Set serial port sampling rate to 8 for SCIFA ports Laurent Pinchart 2013-11-28 21:43 ` [PATCH 15/16] sh: Don't set plat_sci_port scbrr_algo_id field Laurent Pinchart 2013-11-28 21:43 ` [PATCH 16/16] serial: sh-sci: Remove platform data " Laurent Pinchart 2013-12-03 18:44 ` [PATCH 00/16] sh-sci: Remove unnecessary fields from platform data Greg KH
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).