| From f5bab7a10bbcea5818692b9d3703550f58edf714 Mon Sep 17 00:00:00 2001 |
| From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> |
| Date: Wed, 11 Jan 2017 16:43:29 +0200 |
| Subject: [PATCH 223/255] sh: Don't set sh-sci port_reg |
| |
| The driver considers all negative or zero values of the port_reg field |
| as invalid. The four platforms that set the field to a register address |
| all use an address higher than 0x7fffffff, which is thus considered by |
| the driver as invalid. The feature is thus never used, remove it. |
| |
| The feature could be implemented properly in the future using the |
| pinctrl and GPIO APIs if desired. |
| |
| While at it, don't set the field to SCIx_NOT_SUPPORTED (-1) either, |
| leaving it unset leads to the same result. This will allow removing the |
| SCIx_NOT_SUPPORTED macro. |
| |
| Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> |
| Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> |
| Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
| (cherry picked from commit bcce9daa87cd0ad44bf9bdd433eae0474f51e1e2) |
| Signed-off-by: Simon Horman <horms+renesas@verge.net.au> |
| |
| Conflicts: |
| arch/sh/kernel/cpu/sh3/setup-sh770x.c |
| arch/sh/kernel/cpu/sh4/setup-sh7750.c |
| arch/sh/kernel/cpu/sh4a/setup-sh7366.c |
| arch/sh/kernel/cpu/sh4a/setup-sh7723.c |
| arch/sh/kernel/cpu/sh4a/setup-sh7724.c |
| --- |
| arch/sh/kernel/cpu/sh3/setup-sh770x.c | 2 -- |
| arch/sh/kernel/cpu/sh4/setup-sh7750.c | 1 - |
| arch/sh/kernel/cpu/sh4a/setup-sh7366.c | 1 - |
| arch/sh/kernel/cpu/sh4a/setup-sh7723.c | 6 ------ |
| arch/sh/kernel/cpu/sh4a/setup-sh7724.c | 9 --------- |
| 5 files changed, 19 deletions(-) |
| |
| --- a/arch/sh/kernel/cpu/sh3/setup-sh770x.c |
| +++ b/arch/sh/kernel/cpu/sh3/setup-sh770x.c |
| @@ -109,7 +109,6 @@ static struct platform_device rtc_device |
| }; |
| |
| static struct plat_sci_port scif0_platform_data = { |
| - .port_reg = 0xa4000136, |
| .flags = UPF_BOOT_AUTOCONF, |
| .scscr = SCSCR_TE | SCSCR_RE, |
| .type = PORT_SCI, |
| @@ -160,7 +159,6 @@ static struct platform_device scif1_devi |
| #if defined(CONFIG_CPU_SUBTYPE_SH7707) || \ |
| defined(CONFIG_CPU_SUBTYPE_SH7709) |
| static struct plat_sci_port scif2_platform_data = { |
| - .port_reg = SCIx_NOT_SUPPORTED, |
| .flags = UPF_BOOT_AUTOCONF, |
| .scscr = SCSCR_TE | SCSCR_RE, |
| .type = PORT_IRDA, |
| --- a/arch/sh/kernel/cpu/sh4/setup-sh7750.c |
| +++ b/arch/sh/kernel/cpu/sh4/setup-sh7750.c |
| @@ -38,7 +38,6 @@ static struct platform_device rtc_device |
| }; |
| |
| static struct plat_sci_port sci_platform_data = { |
| - .port_reg = 0xffe0001C, |
| .flags = UPF_BOOT_AUTOCONF, |
| .scscr = SCSCR_TE | SCSCR_RE, |
| .type = PORT_SCI, |
| --- a/arch/sh/kernel/cpu/sh4a/setup-sh7366.c |
| +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7366.c |
| @@ -20,7 +20,6 @@ |
| #include <asm/clock.h> |
| |
| static struct plat_sci_port scif0_platform_data = { |
| - .port_reg = 0xa405013e, |
| .flags = UPF_BOOT_AUTOCONF, |
| .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE, |
| .type = PORT_SCIF, |
| --- a/arch/sh/kernel/cpu/sh4a/setup-sh7723.c |
| +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7723.c |
| @@ -23,7 +23,6 @@ |
| |
| /* Serial */ |
| static struct plat_sci_port scif0_platform_data = { |
| - .port_reg = 0xa4050160, |
| .flags = UPF_BOOT_AUTOCONF, |
| .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE, |
| .type = PORT_SCIF, |
| @@ -46,7 +45,6 @@ static struct platform_device scif0_devi |
| }; |
| |
| static struct plat_sci_port scif1_platform_data = { |
| - .port_reg = SCIx_NOT_SUPPORTED, |
| .flags = UPF_BOOT_AUTOCONF, |
| .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE, |
| .type = PORT_SCIF, |
| @@ -69,7 +67,6 @@ static struct platform_device scif1_devi |
| }; |
| |
| static struct plat_sci_port scif2_platform_data = { |
| - .port_reg = SCIx_NOT_SUPPORTED, |
| .flags = UPF_BOOT_AUTOCONF, |
| .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE, |
| .type = PORT_SCIF, |
| @@ -93,7 +90,6 @@ static struct platform_device scif2_devi |
| |
| static struct plat_sci_port scif3_platform_data = { |
| .flags = UPF_BOOT_AUTOCONF, |
| - .port_reg = SCIx_NOT_SUPPORTED, |
| .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE, |
| .sampling_rate = 8, |
| .type = PORT_SCIFA, |
| @@ -115,7 +111,6 @@ static struct platform_device scif3_devi |
| }; |
| |
| static struct plat_sci_port scif4_platform_data = { |
| - .port_reg = SCIx_NOT_SUPPORTED, |
| .flags = UPF_BOOT_AUTOCONF, |
| .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE, |
| .sampling_rate = 8, |
| @@ -138,7 +133,6 @@ static struct platform_device scif4_devi |
| }; |
| |
| static struct plat_sci_port scif5_platform_data = { |
| - .port_reg = SCIx_NOT_SUPPORTED, |
| .flags = UPF_BOOT_AUTOCONF, |
| .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE, |
| .sampling_rate = 8, |
| --- a/arch/sh/kernel/cpu/sh4a/setup-sh7724.c |
| +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7724.c |
| @@ -290,7 +290,6 @@ static struct platform_device dma1_devic |
| |
| /* Serial */ |
| static struct plat_sci_port scif0_platform_data = { |
| - .port_reg = SCIx_NOT_SUPPORTED, |
| .flags = UPF_BOOT_AUTOCONF, |
| .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE, |
| .type = PORT_SCIF, |
| @@ -313,7 +312,6 @@ static struct platform_device scif0_devi |
| }; |
| |
| static struct plat_sci_port scif1_platform_data = { |
| - .port_reg = SCIx_NOT_SUPPORTED, |
| .flags = UPF_BOOT_AUTOCONF, |
| .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE, |
| .type = PORT_SCIF, |
| @@ -336,7 +334,6 @@ static struct platform_device scif1_devi |
| }; |
| |
| static struct plat_sci_port scif2_platform_data = { |
| - .port_reg = SCIx_NOT_SUPPORTED, |
| .flags = UPF_BOOT_AUTOCONF, |
| .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE, |
| .type = PORT_SCIF, |
| @@ -359,10 +356,8 @@ static struct platform_device scif2_devi |
| }; |
| |
| static struct plat_sci_port scif3_platform_data = { |
| - .port_reg = SCIx_NOT_SUPPORTED, |
| .flags = UPF_BOOT_AUTOCONF, |
| .scscr = SCSCR_RE | SCSCR_TE, |
| - .sampling_rate = 8, |
| .type = PORT_SCIFA, |
| }; |
| |
| @@ -382,10 +377,8 @@ static struct platform_device scif3_devi |
| }; |
| |
| static struct plat_sci_port scif4_platform_data = { |
| - .port_reg = SCIx_NOT_SUPPORTED, |
| .flags = UPF_BOOT_AUTOCONF, |
| .scscr = SCSCR_RE | SCSCR_TE, |
| - .sampling_rate = 8, |
| .type = PORT_SCIFA, |
| }; |
| |
| @@ -405,10 +398,8 @@ static struct platform_device scif4_devi |
| }; |
| |
| static struct plat_sci_port scif5_platform_data = { |
| - .port_reg = SCIx_NOT_SUPPORTED, |
| .flags = UPF_BOOT_AUTOCONF, |
| .scscr = SCSCR_RE | SCSCR_TE, |
| - .sampling_rate = 8, |
| .type = PORT_SCIFA, |
| }; |
| |