From 7e600cadda94fff4f984ffa6fff7b5438e518c05 Mon Sep 17 00:00:00 2001 From: Aaro Koskinen Date: Mon, 2 Jan 2017 22:57:03 +0200 Subject: [PATCH 1/4] ARM: OMAP1: USB: tidy up logging output KERN_CONT/pr_cont is now required to continue log messages, use that. Signed-off-by: Aaro Koskinen Signed-off-by: Tony Lindgren --- arch/arm/mach-omap1/usb.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/arch/arm/mach-omap1/usb.c b/arch/arm/mach-omap1/usb.c index 2506e598a067..d4aa118f4ed6 100644 --- a/arch/arm/mach-omap1/usb.c +++ b/arch/arm/mach-omap1/usb.c @@ -95,17 +95,17 @@ omap_otg_init(struct omap_usb_config *config) printk("USB: hmc %d", config->hmc_mode); if (!alt_pingroup) - printk(", usb2 alt %d wires", config->pins[2]); + pr_cont(", usb2 alt %d wires", config->pins[2]); else if (config->pins[0]) - printk(", usb0 %d wires%s", config->pins[0], + pr_cont(", usb0 %d wires%s", config->pins[0], is_usb0_device(config) ? " (dev)" : ""); if (config->pins[1]) - printk(", usb1 %d wires", config->pins[1]); + pr_cont(", usb1 %d wires", config->pins[1]); if (!alt_pingroup && config->pins[2]) - printk(", usb2 %d wires", config->pins[2]); + pr_cont(", usb2 %d wires", config->pins[2]); if (config->otg) - printk(", Mini-AB on usb%d", config->otg - 1); - printk("\n"); + pr_cont(", Mini-AB on usb%d", config->otg - 1); + pr_cont("\n"); if (cpu_class_is_omap1()) { u16 w; @@ -573,13 +573,13 @@ static void __init omap_1510_usb_init(struct omap_usb_config *config) printk("USB: hmc %d", config->hmc_mode); if (config->pins[0]) - printk(", usb0 %d wires%s", config->pins[0], + pr_cont(", usb0 %d wires%s", config->pins[0], is_usb0_device(config) ? " (dev)" : ""); if (config->pins[1]) - printk(", usb1 %d wires", config->pins[1]); + pr_cont(", usb1 %d wires", config->pins[1]); if (config->pins[2]) - printk(", usb2 %d wires", config->pins[2]); - printk("\n"); + pr_cont(", usb2 %d wires", config->pins[2]); + pr_cont("\n"); /* use DPLL for 48 MHz function clock */ pr_debug("APLL %04x DPLL %04x REQ %04x\n", omap_readw(ULPD_APLL_CTRL), From bde49e5928c5135047749363f40387dad5aa51bf Mon Sep 17 00:00:00 2001 From: Aaro Koskinen Date: Mon, 2 Jan 2017 22:57:04 +0200 Subject: [PATCH 2/4] ARM: OMAP1: USB: make omap_otg_init() static Make omap_otg_init() static. Signed-off-by: Aaro Koskinen Signed-off-by: Tony Lindgren --- arch/arm/mach-omap1/include/mach/usb.h | 2 -- arch/arm/mach-omap1/usb.c | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/arch/arm/mach-omap1/include/mach/usb.h b/arch/arm/mach-omap1/include/mach/usb.h index a7c5559caef2..eb76628ff843 100644 --- a/arch/arm/mach-omap1/include/mach/usb.h +++ b/arch/arm/mach-omap1/include/mach/usb.h @@ -10,8 +10,6 @@ #include -void omap_otg_init(struct omap_usb_config *config); - #if IS_ENABLED(CONFIG_USB) void omap1_usb_init(struct omap_usb_config *pdata); #else diff --git a/arch/arm/mach-omap1/usb.c b/arch/arm/mach-omap1/usb.c index d4aa118f4ed6..0b4ed94c7b99 100644 --- a/arch/arm/mach-omap1/usb.c +++ b/arch/arm/mach-omap1/usb.c @@ -58,7 +58,7 @@ #ifdef CONFIG_ARCH_OMAP_OTG -void __init +static void __init omap_otg_init(struct omap_usb_config *config) { u32 syscon; @@ -166,7 +166,7 @@ omap_otg_init(struct omap_usb_config *config) } #else -void omap_otg_init(struct omap_usb_config *config) {} +static void omap_otg_init(struct omap_usb_config *config) {} #endif #if IS_ENABLED(CONFIG_USB_OMAP) From 4d94b4a239eec860701f0d2e07123a0ed5283a22 Mon Sep 17 00:00:00 2001 From: Aaro Koskinen Date: Mon, 2 Jan 2017 22:57:05 +0200 Subject: [PATCH 3/4] ARM: OMAP1: USB: delete redundant CPU class checks Delete redundant CPU class checks. This code is only used on OMAP1 nowadays. Signed-off-by: Aaro Koskinen Signed-off-by: Tony Lindgren --- arch/arm/mach-omap1/usb.c | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/arch/arm/mach-omap1/usb.c b/arch/arm/mach-omap1/usb.c index 0b4ed94c7b99..455e2cf2866d 100644 --- a/arch/arm/mach-omap1/usb.c +++ b/arch/arm/mach-omap1/usb.c @@ -1,5 +1,5 @@ /* - * Platform level USB initialization for FS USB OTG controller on omap1 and 24xx + * Platform level USB initialization for FS USB OTG controller on omap1 * * Copyright (C) 2004 Texas Instruments, Inc. * @@ -63,6 +63,7 @@ omap_otg_init(struct omap_usb_config *config) { u32 syscon; int alt_pingroup = 0; + u16 w; /* NOTE: no bus or clock setup (yet?) */ @@ -87,9 +88,8 @@ omap_otg_init(struct omap_usb_config *config) if (config->otg) syscon |= OTG_EN; #endif - if (cpu_class_is_omap1()) - pr_debug("USB_TRANSCEIVER_CTRL = %03x\n", - omap_readl(USB_TRANSCEIVER_CTRL)); + pr_debug("USB_TRANSCEIVER_CTRL = %03x\n", + omap_readl(USB_TRANSCEIVER_CTRL)); pr_debug("OTG_SYSCON_2 = %08x\n", omap_readl(OTG_SYSCON_2)); omap_writel(syscon, OTG_SYSCON_2); @@ -107,19 +107,16 @@ omap_otg_init(struct omap_usb_config *config) pr_cont(", Mini-AB on usb%d", config->otg - 1); pr_cont("\n"); - if (cpu_class_is_omap1()) { - u16 w; + /* leave USB clocks/controllers off until needed */ + w = omap_readw(ULPD_SOFT_REQ); + w &= ~SOFT_USB_CLK_REQ; + omap_writew(w, ULPD_SOFT_REQ); - /* leave USB clocks/controllers off until needed */ - w = omap_readw(ULPD_SOFT_REQ); - w &= ~SOFT_USB_CLK_REQ; - omap_writew(w, ULPD_SOFT_REQ); + w = omap_readw(ULPD_CLOCK_CTRL); + w &= ~USB_MCLK_EN; + w |= DIS_USB_PVCI_CLK; + omap_writew(w, ULPD_CLOCK_CTRL); - w = omap_readw(ULPD_CLOCK_CTRL); - w &= ~USB_MCLK_EN; - w |= DIS_USB_PVCI_CLK; - omap_writew(w, ULPD_CLOCK_CTRL); - } syscon = omap_readl(OTG_SYSCON_1); syscon |= HST_IDLE_EN|DEV_IDLE_EN|OTG_IDLE_EN; From 57b6bfcf66d197003d7b72f3f85207a3dd7ade04 Mon Sep 17 00:00:00 2001 From: Tony Lindgren Date: Thu, 5 Jan 2017 13:41:01 -0800 Subject: [PATCH 4/4] MAINTAINERS: Add Aaro Koskinen as TI omap1 SoC co-maintainer Aaro has been doing a great job making sure mach-omap1 stays working with the mainline kernel. So let's add Aaro as omap1 co-maintainer to the MAINTAINERS file. Acked-by: Aaro Koskinen Signed-off-by: Tony Lindgren --- MAINTAINERS | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index cfff2c9e3d94..51f5d6de4584 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -8909,7 +8909,20 @@ M: Josh Poimboeuf S: Supported F: tools/objtool/ -OMAP SUPPORT +OMAP1 SUPPORT +M: Aaro Koskinen +M: Tony Lindgren +L: linux-omap@vger.kernel.org +Q: http://patchwork.kernel.org/project/linux-omap/list/ +T: git git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap.git +S: Maintained +F: arch/arm/mach-omap1/ +F: arch/arm/plat-omap/ +F: arch/arm/configs/omap1_defconfig +F: drivers/i2c/busses/i2c-omap.c +F: include/linux/i2c-omap.h + +OMAP2+ SUPPORT M: Tony Lindgren L: linux-omap@vger.kernel.org W: http://www.muru.com/linux/omap/ @@ -8917,8 +8930,8 @@ W: http://linux.omap.com/ Q: http://patchwork.kernel.org/project/linux-omap/list/ T: git git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap.git S: Maintained -F: arch/arm/*omap*/ -F: arch/arm/configs/omap1_defconfig +F: arch/arm/mach-omap2/ +F: arch/arm/plat-omap/ F: arch/arm/configs/omap2plus_defconfig F: drivers/i2c/busses/i2c-omap.c F: drivers/irqchip/irq-omap-intc.c