From patchwork Mon Dec 10 20:43:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 10722409 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8290591E for ; Mon, 10 Dec 2018 20:44:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0AD422998F for ; Mon, 10 Dec 2018 20:44:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F23CD29DDF; Mon, 10 Dec 2018 20:44:01 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 847EF2998F for ; Mon, 10 Dec 2018 20:44:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=WczHbAlKD/PKM8NP0VdwR97LCD2F6LTT0q1C6+Vakhk=; b=twnukIheitTo53 neRDvSj07+/Tm2sV+C0GWviO2Vb2L8ioY8lhfW60aVZOXuAG0WO9Pg6rmLnLxlOdPaXMQC+M49VEa GAmcDPlhSboh5dVub0/DPcpynmkRdd8HY2JhU14CLQC2YSSgoaMe1XZwLX0hEFCoiAj+9PCbmPIT2 7vlOZ9D94K2dFl3g9VTF/OtHQzqvN0sszvRWp0irwXBDKX1hussbSAc6tDxsqPMIc7+LGnqznHbgu A9ZgN9i6443rIh0KvSrq5U79t5W01M45Cbn021ZIkrr1jjAA1Ok8aRxfRHxWBCXnC4vTnkCQ/kf9J DA70esxpgEMLD7JXBu9A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gWSPH-0006vU-KV; Mon, 10 Dec 2018 20:43:59 +0000 Received: from mout.kundenserver.de ([217.72.192.74]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gWSPE-0006uX-EK for linux-arm-kernel@lists.infradead.org; Mon, 10 Dec 2018 20:43:58 +0000 Received: from wuerfel.lan ([109.192.41.194]) by mrelayeu.kundenserver.de (mreue107 [212.227.15.145]) with ESMTPA (Nemesis) id 1MdNLi-1h5W6X4C1o-00ZS5E; Mon, 10 Dec 2018 21:43:42 +0100 From: Arnd Bergmann To: arm@kernel.org, Lubomir Rintel Subject: [PATCH 1/2] ARM: mmp: fix timer_init calls Date: Mon, 10 Dec 2018 21:43:01 +0100 Message-Id: <20181210204340.2269622-1-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 MIME-Version: 1.0 X-Provags-ID: V03:K1:p4KIKsdMkroejDb6VC93k97xs9//yUmHuhfFoJCeiMAQlbuCsIy S6jtk4rYpwv1xnRbYm+dBLsUsNq35C20kqAJZG4Bt5sWZZkImV6hvOibu1B01Ep83CFsUi7 /Qo8KJ3R087aa2UswogSGWIJH6IwPExXplLIEhoC0KpQjH6xI5hBgd21EXv/bqE0fcLMThV 0FI3BHHT8tr94EZ67RsYw== X-UI-Out-Filterresults: notjunk:1;V03:K0:bPzUQHTr9Gs=:y6iZ2wrVmt64qDoEn2HE7I Km/DQy/dwZnx3yB8MAqd3t2YTmGY1iaQmK/kNtBtIwF37kDnywl6M+oVfNJpuXWkHHjJE1mFZ dZQfxhbu1VwPnEN9NULCviJcHEsXc8ikI1SXJnlxIgxkk/7Y85jn1d1jw/VmcGNDyJN5OaTmr ODWaVJEic+21u1y64DZ6Ox92gsgRZOa/wOrSyEzbi56RgAxKevLYUqxvzk8Bk9LHd3PTc+cjw GQjjLYFdom4kU67IOJimhOUAneFToWhGw/QIyw4kX7NxNvyKDvHg849qxIan1OCVKvONBTt3a 58XIz4xC90ApFpiJMFI7cMlB5iDFv5f/jWi1jaRjOk15mGKhR7FZIQXrMZDuXDzyb6ANwSL3C fRpmUqb//g+GAffwK5Y0SK8kLRo/yaj7zryyaBO7pkg84z9TdpN/4avTeaRt4aBv61tbIFViO SBYcgmbVmAYW3ACWws5ZeQU0gQsVRc9xQJKKElQS96JQMnLJzBG185L9Fk6mBiuYEeVXLHqIk uel2QmDoEOzevqRzdsmhhoD7OswN0cccJvOB/nly9nye8M56qyIjwr2A7yQFxnu3Bx+UE04Di kgrmihLJD/WeIkmWjdZjkpkKL9gHR4w3mq6bW2ArKnmTbX3vNdwQUburh4qq7GAKVYXnvuuql yie8edyQHEdxSsL6ZliWx0oumDWbuh6qA29J1dcogxy6Q8cRgpodh6f+sI2t5gB+/oRWpl27C CWbDUmhp85H2UTNtdAjO5QesLiiE5vLrmD/z2g== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181210_124356_787746_EF63BBCA X-CRM114-Status: GOOD ( 13.23 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-kernel@lists.infradead.org, Arnd Bergmann , linux-kernel@vger.kernel.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The change to passing the timer frequency as a function argument was a good idea, but caused a build failure for one user that was missed in the update: arch/arm/mach-mmp/time.c: In function 'mmp_dt_init_timer': arch/arm/mach-mmp/time.c:242:2: error: implicit declaration of function 'timer_init'; did you mean 'hrtimer_init'? [-Werror=implicit-function-declaration] Change that as well to fix the build error, and rename the function to put it into a proper namespace and make it clearer what is actually going on. I saw that the high 6500000 HZ frequency was previously only set with CONFIG_MMP2, but is now also used with MMP (pxa910), so I'm changing that back here. Please make sure that the frequencies are all correct now. Fixes: f36797ee4380 ("ARM: mmp/mmp2: dt: enable the clock") Signed-off-by: Arnd Bergmann --- arch/arm/mach-mmp/common.h | 2 +- arch/arm/mach-mmp/mmp2.c | 2 +- arch/arm/mach-mmp/pxa168.c | 2 +- arch/arm/mach-mmp/pxa910.c | 2 +- arch/arm/mach-mmp/time.c | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/arm/mach-mmp/common.h b/arch/arm/mach-mmp/common.h index 5ac2851ef5d3..483b8b6d3005 100644 --- a/arch/arm/mach-mmp/common.h +++ b/arch/arm/mach-mmp/common.h @@ -2,7 +2,7 @@ #include #define ARRAY_AND_SIZE(x) (x), ARRAY_SIZE(x) -extern void timer_init(int irq, unsigned long rate); +extern void mmp_timer_init(int irq, unsigned long rate); extern void __init mmp_map_io(void); extern void mmp_restart(enum reboot_mode, const char *); diff --git a/arch/arm/mach-mmp/mmp2.c b/arch/arm/mach-mmp/mmp2.c index fb3e7e32c882..726c1a642dea 100644 --- a/arch/arm/mach-mmp/mmp2.c +++ b/arch/arm/mach-mmp/mmp2.c @@ -134,7 +134,7 @@ void __init mmp2_timer_init(void) clk_rst = APBC_APBCLK | APBC_FNCLK | APBC_FNCLKSEL(1); __raw_writel(clk_rst, APBC_TIMERS); - timer_init(IRQ_MMP2_TIMER1, 6500000); + mmp_timer_init(IRQ_MMP2_TIMER1, 6500000); } /* on-chip devices */ diff --git a/arch/arm/mach-mmp/pxa168.c b/arch/arm/mach-mmp/pxa168.c index 77a358165a56..cdcf65ace3f9 100644 --- a/arch/arm/mach-mmp/pxa168.c +++ b/arch/arm/mach-mmp/pxa168.c @@ -79,7 +79,7 @@ void __init pxa168_timer_init(void) /* 3.25MHz, bus/functional clock enabled, release reset */ __raw_writel(TIMER_CLK_RST, APBC_TIMERS); - timer_init(IRQ_PXA168_TIMER1, 6500000); + mmp_timer_init(IRQ_PXA168_TIMER1, 3250000); } void pxa168_clear_keypad_wakeup(void) diff --git a/arch/arm/mach-mmp/pxa910.c b/arch/arm/mach-mmp/pxa910.c index 1ccbba9ac495..d30a7d12bc98 100644 --- a/arch/arm/mach-mmp/pxa910.c +++ b/arch/arm/mach-mmp/pxa910.c @@ -116,7 +116,7 @@ void __init pxa910_timer_init(void) __raw_writel(APBC_APBCLK | APBC_RST, APBC_TIMERS); __raw_writel(TIMER_CLK_RST, APBC_TIMERS); - timer_init(IRQ_PXA910_AP1_TIMER1); + mmp_timer_init(IRQ_PXA910_AP1_TIMER1, 3250000); } /* on-chip devices */ diff --git a/arch/arm/mach-mmp/time.c b/arch/arm/mach-mmp/time.c index eab0fd8a7343..f9c295154b94 100644 --- a/arch/arm/mach-mmp/time.c +++ b/arch/arm/mach-mmp/time.c @@ -184,7 +184,7 @@ static struct irqaction timer_irq = { .dev_id = &ckevt, }; -void __init timer_init(int irq, unsigned long rate) +void __init mmp_timer_init(int irq, unsigned long rate) { timer_config(); @@ -239,7 +239,7 @@ void __init mmp_dt_init_timer(void) ret = -ENOMEM; goto out; } - timer_init(irq, rate); + mmp_timer_init(irq, rate); return; out: pr_err("Failed to get timer from device tree with error:%d\n", ret); From patchwork Mon Dec 10 20:43:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 10722417 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 757F491E for ; Mon, 10 Dec 2018 20:44:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 633C029A61 for ; Mon, 10 Dec 2018 20:44:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 573C52A75B; Mon, 10 Dec 2018 20:44:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E13B929A61 for ; Mon, 10 Dec 2018 20:44:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=cAItDysPTnP1EdMT8w4wiB5Bko/sbUOkEGW1qHDj404=; b=YgSM6evT5Bl9hd H8hTLfIzjtqdtEhXgRsL9i4Z48ikoaw2DqiWCxDi1oZyRZQ+gczKPe9WCUNU1S6N5bBcgGw+OVFyo vrlnKgOhtLGwx18LraStQyWl0sJXuAv35B3W4ElwduKf41MeQ4nimR8w8qeTaJT++00EyOZwr3dxq bntqITkEHRA+fSARGswiuwp0MlT0bMMXY0sjbL8T5ppISseuGqBXZG+n8p3hSq7IBR2uNL8KieA7T tQhKncURSQuhUjxut73Nr9kt2ZxMHkcukiDIvwW+wjTbdr/XqtS7WLydrEWYDBD5bXtVTZuhQrMT/ oA5NOgP1XhDBm2zsjUDw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gWSPf-0007LN-1e; Mon, 10 Dec 2018 20:44:23 +0000 Received: from mout.kundenserver.de ([217.72.192.74]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gWSPX-000710-Pd for linux-arm-kernel@lists.infradead.org; Mon, 10 Dec 2018 20:44:18 +0000 Received: from wuerfel.lan ([109.192.41.194]) by mrelayeu.kundenserver.de (mreue107 [212.227.15.145]) with ESMTPA (Nemesis) id 1Mz9EL-1hR9vT0bkR-00wE1f; Mon, 10 Dec 2018 21:44:04 +0100 From: Arnd Bergmann To: arm@kernel.org, Lubomir Rintel Subject: [PATCH 2/2] ARM: mmp: fix pxa168_device_usb_phy use on aspenite Date: Mon, 10 Dec 2018 21:43:02 +0100 Message-Id: <20181210204340.2269622-2-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20181210204340.2269622-1-arnd@arndb.de> References: <20181210204340.2269622-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:066X8609S8rRazQMCxM0FQnLP8YBYE3tBO/JFQU/o9qGK62sZEZ qnkHhV6WydiLmZjK6EPxbr7ntdTB1Hjf2f+DRGjcZ29jjc4BbT2kLtOiYiOKR1WEdO53qVD BD5c+EyteTSOTmrfUA1RcosJq+JwInpv7Nxp9SlKAIjQ8cgUjIauG7s8oDiuyx2ArM5OKmD /3SwebMridHGZxB4OmrwQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:Al2IwXHE/Ao=:OWxv5MAfZta7Ray7LT/eCZ DWOeYtzaektrlbfMIsguch7FKeGQeBBSrQQg+GUmYuGmoy85WzZKmsdR2RSYiZ0orgV1YynkS kFMXBH0OcI0mlexGgcHWsArbQuubbvwtTuZMxgk0A6yF9aY5kAS7fcbrHcQRhBhbH6SQd6xSg I4GWBul94I5vhz4zFIUHyQHBhAMg7xQ/MBSnbRN3r44x6W8rv5+C0ziUPcp/UaOFrH8suJ7AQ OmTFFZXiqy7fTvMYEmOP9qcHrOkRRrUy1jPfgxyPH4+6jg9aLP4Y2Pb8e8tnbZUGe6+C6fk2H vGK4dxbff4AgLesJgLnEQEg8dClRQXmeYENMisCiYVPOkrXP7AS3GWiFnl9WAi27AJ7XiHSJ1 XWDOqBnfX69fNKPtYedDnwOHCgXYUm9bt4QeuNKELBaRZfWM1pwoJEmwKt/e3TCxksvUYrT+Y BNAJJb6SEvy2767vciVaLaUrd/AeNngECLzFRMdqh2cbg8WRStpKWBtU6m8Q1RKCmJzULSU8H X0emm/aZQfmgt1dbtuNA9dB3m5BWLqtFquEms6iIQs8yBp8Cw98lLFci/DNb5tP0i/9n2s/ju W2i1c4TkjI2E02eKaMj1MUfmkvGBRw/6K2YAUyAiy8wLoko7dgD5THSCIQzYbkrQzAsTS/iL/ TXUHTcnT46CvemYhMdVv0A0RCMHKiA2iTxbJ86B0KrZM3Gnyi1SMvKWwq3+FDQ+6cevGsDli8 CAsolcFHCXWDjb781orIRecfTpbbtY9FJ+SrTQ== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181210_124416_136521_ACC6F699 X-CRM114-Status: GOOD ( 11.95 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-kernel@lists.infradead.org, Arnd Bergmann , linux-kernel@vger.kernel.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This one ended up in the wrong header file, causing a build failure on at least one platform: arch/arm/mach-mmp/aspenite.c: In function 'common_init': arch/arm/mach-mmp/aspenite.c:260:28: error: 'pxa168_device_usb_phy' undeclared (first use in this function); did you mean 'pxa168_device_ssp5'? We can just include both the pxa168.h and pxa910.h headers to make that work, which gets us to the next failure: arch/arm/mach-mmp/aspenite.o: In function `common_init': aspenite.c:(.init.text+0x1c0): undefined reference to `pxa168_device_usb_phy' This is solved by using the matching ifdef check around the USB device registration, enabling them only when either USB host or gadget mode are enabled. Fixes: a225daf72ee7 ("ARM: mmp: add a pxa-usb-phy device") Signed-off-by: Arnd Bergmann --- arch/arm/mach-mmp/aspenite.c | 3 +++ arch/arm/mach-mmp/ttc_dkb.c | 2 ++ 2 files changed, 5 insertions(+) diff --git a/arch/arm/mach-mmp/aspenite.c b/arch/arm/mach-mmp/aspenite.c index 23f99976b5f5..75b2d7db643e 100644 --- a/arch/arm/mach-mmp/aspenite.c +++ b/arch/arm/mach-mmp/aspenite.c @@ -29,6 +29,7 @@ #include "addr-map.h" #include "mfp-pxa168.h" #include "pxa168.h" +#include "pxa910.h" #include "irqs.h" #include "common.h" @@ -256,6 +257,7 @@ static void __init common_init(void) /* off-chip devices */ platform_device_register(&smc91x_device); +#if IS_ENABLED(CONFIG_USB_SUPPORT) #if IS_ENABLED(CONFIG_PHY_PXA_USB) platform_device_register(&pxa168_device_usb_phy); #endif @@ -263,6 +265,7 @@ static void __init common_init(void) #if IS_ENABLED(CONFIG_USB_EHCI_MV) pxa168_add_usb_host(&pxa168_sph_pdata); #endif +#endif } MACHINE_START(ASPENITE, "PXA168-based Aspenite Development Platform") diff --git a/arch/arm/mach-mmp/ttc_dkb.c b/arch/arm/mach-mmp/ttc_dkb.c index 767dcb23ee1c..09b53ace08ac 100644 --- a/arch/arm/mach-mmp/ttc_dkb.c +++ b/arch/arm/mach-mmp/ttc_dkb.c @@ -282,6 +282,7 @@ static void __init ttc_dkb_init(void) sizeof(struct pxa_gpio_platform_data)); platform_add_devices(ARRAY_AND_SIZE(ttc_dkb_devices)); +#if IS_ENABLED(CONFIG_USB_SUPPORT) #if IS_ENABLED(CONFIG_PHY_PXA_USB) platform_device_register(&pxa168_device_usb_phy); #endif @@ -300,6 +301,7 @@ static void __init ttc_dkb_init(void) pxa168_device_u2ootg.dev.platform_data = &ttc_usb_pdata; platform_device_register(&pxa168_device_u2ootg); #endif +#endif #if IS_ENABLED(CONFIG_MMP_DISP) add_disp();