serial: sh-sci: Remove platform data scbrr_algo_id field
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Fri, 6 Dec 2013 09:59:51 +0000 (10:59 +0100)
committerSimon Horman <horms+renesas@verge.net.au>
Tue, 24 Dec 2013 12:50:54 +0000 (21:50 +0900)
The field isn't set by any board, remote it.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
drivers/tty/serial/sh-sci.c
include/linux/serial_sci.h

index e4bf0e435af6dffd470c5484a5e0f277aa3243cf..96d26d7f803130e07d5361ec7c7d6103c9a2d0a9 100644 (file)
@@ -1757,17 +1757,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);
 
@@ -2176,17 +2165,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");
index af414e1895a5f245945fe8c3f2d88cc079144899..fd7f9daa92ccf36415631adcb3a329c2f913f680 100644 (file)
 
 #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)
@@ -136,7 +127,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 */
 
        /*