From patchwork Wed Oct 26 12:39:02 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Bailon X-Patchwork-Id: 79405 Delivered-To: patch@linaro.org Received: by 10.140.97.247 with SMTP id m110csp40087qge; Wed, 26 Oct 2016 05:40:43 -0700 (PDT) X-Received: by 10.99.172.26 with SMTP id v26mr3257551pge.164.1477485643183; Wed, 26 Oct 2016 05:40:43 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h64si2469978pfh.83.2016.10.26.05.40.41; Wed, 26 Oct 2016 05:40:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S967062AbcJZMkc (ORCPT + 27 others); Wed, 26 Oct 2016 08:40:32 -0400 Received: from mail-wm0-f47.google.com ([74.125.82.47]:35010 "EHLO mail-wm0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S967012AbcJZMjo (ORCPT ); Wed, 26 Oct 2016 08:39:44 -0400 Received: by mail-wm0-f47.google.com with SMTP id e69so27336650wmg.0 for ; Wed, 26 Oct 2016 05:39:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=eVUvqYNJyIUKAoex0yHEFYZUNgSVuyBbUkQP4w01OBw=; b=Mu90s5ipXoXLfqY8KfHs9kyy9QOw+rx6BCZCap/mOrTbDG0QQ7nuWqgvs3jxjNz9u6 R18IJezK6tWDWBeuqhKB6A9YMxS3V2apUdzQ5jBgDSSdlZEQXnF5RN85+cimohO1jLTN QCBAyVsEdf67uFyCpbD4ltpDr0i5EclpXIW+L/WxzXyvTWq+YTpGxqJThHaRulX66+xY HOqxvtwqVXHJw64x9LUh4WEDtnpUDv8FboySgFUlM5X9yYo402Mqg5P7yjxJOJ1DlWE2 jjXpVZoqk8ExWITNOPJ+7o+DTyo4SfugTsNijBv1J+RkDX7v37wLGaDm/4GxAAVAQnYu 3N2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=eVUvqYNJyIUKAoex0yHEFYZUNgSVuyBbUkQP4w01OBw=; b=BRIJ9I36Ygvw4BJf28koj3rZSs+Vcsgn1v45AGVKyDNjfFOpEpiFX0dpjUCa/QNUT/ Upzg4wZngQm+rYuBPnH612Yd4EuIL/5PaTwkBxsgepMFb0AREpJBLlEGxmBeE7/kWLL1 reSt0Xk+6gCfIN20reVhxiJ96v/yrdPBV3dO3i9eNxfuDT8qu4gVCoHaQKR2ZuCNlYdo 7a7I/NlQcMgeV8BHbcNjs/sRKuXYT+TsozICGIkVbyuBNU8AXgv+CyukBbzejmVDX4iB K10Y4cjB5xhAfi6MjifmwGGooNCovyBwL4MrDt1wclswYRhMc1uiORU9jb5wW0mAPEAq +T2A== X-Gm-Message-State: ABUngvfvEuyjM2Qe0dlqHQJziob4gwWgAzVVWjK/yh31XUq7PSvvPQfZHz6Pz9h9Q0Zn+CQX X-Received: by 10.194.88.131 with SMTP id bg3mr2489967wjb.32.1477485547807; Wed, 26 Oct 2016 05:39:07 -0700 (PDT) Received: from localhost.localdomain ([90.63.244.31]) by smtp.gmail.com with ESMTPSA id 194sm10367010wmj.0.2016.10.26.05.39.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 26 Oct 2016 05:39:07 -0700 (PDT) From: Alexandre Bailon To: gregkh@linuxfoundation.org, khilman@baylibre.com, nsekhar@ti.com Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Alexandre Bailon Subject: [PATCH v3] ARM: davinci: da8xx: Fix some redefined symbol warnings Date: Wed, 26 Oct 2016 14:39:02 +0200 Message-Id: <1477485542-10555-2-git-send-email-abailon@baylibre.com> X-Mailer: git-send-email 2.7.3 In-Reply-To: <1477485542-10555-1-git-send-email-abailon@baylibre.com> References: <1477485542-10555-1-git-send-email-abailon@baylibre.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Some macro for DA8xx CFGCHIP are defined in usb-davinci.h, but da8xx-cfgchip.h intend to replace them. The usb-da8xx.c is using both headers, causing redefined symbol warnings. Remove the macro and update the board files to use da8xx-cfgchip.h Signed-off-by: Alexandre Bailon --- arch/arm/mach-davinci/board-da830-evm.c | 5 +++-- arch/arm/mach-davinci/board-omapl138-hawk.c | 3 ++- include/linux/platform_data/usb-davinci.h | 23 ----------------------- 3 files changed, 5 insertions(+), 26 deletions(-) -- 2.7.3 diff --git a/arch/arm/mach-davinci/board-da830-evm.c b/arch/arm/mach-davinci/board-da830-evm.c index 3d8cf8c..32ee227 100644 --- a/arch/arm/mach-davinci/board-da830-evm.c +++ b/arch/arm/mach-davinci/board-da830-evm.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include @@ -116,7 +117,7 @@ static __init void da830_evm_usb_init(void) cfgchip2 = __raw_readl(DA8XX_SYSCFG0_VIRT(DA8XX_CFGCHIP2_REG)); /* USB2.0 PHY reference clock is 24 MHz */ - cfgchip2 &= ~CFGCHIP2_REFFREQ; + cfgchip2 &= ~CFGCHIP2_REFFREQ_MASK; cfgchip2 |= CFGCHIP2_REFFREQ_24MHZ; /* @@ -133,7 +134,7 @@ static __init void da830_evm_usb_init(void) * controller won't be able to drive VBUS thinking that it's a B-device. * Otherwise, we want to use the OTG mode and enable VBUS comparators. */ - cfgchip2 &= ~CFGCHIP2_OTGMODE; + cfgchip2 &= ~CFGCHIP2_OTGMODE_MASK; #ifdef CONFIG_USB_MUSB_HOST cfgchip2 |= CFGCHIP2_FORCE_HOST; #else diff --git a/arch/arm/mach-davinci/board-omapl138-hawk.c b/arch/arm/mach-davinci/board-omapl138-hawk.c index ee62486..5774742 100644 --- a/arch/arm/mach-davinci/board-omapl138-hawk.c +++ b/arch/arm/mach-davinci/board-omapl138-hawk.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include @@ -254,7 +255,7 @@ static __init void omapl138_hawk_usb_init(void) /* Setup the Ref. clock frequency for the HAWK at 24 MHz. */ cfgchip2 = __raw_readl(DA8XX_SYSCFG0_VIRT(DA8XX_CFGCHIP2_REG)); - cfgchip2 &= ~CFGCHIP2_REFFREQ; + cfgchip2 &= ~CFGCHIP2_REFFREQ_MASK; cfgchip2 |= CFGCHIP2_REFFREQ_24MHZ; __raw_writel(cfgchip2, DA8XX_SYSCFG0_VIRT(DA8XX_CFGCHIP2_REG)); diff --git a/include/linux/platform_data/usb-davinci.h b/include/linux/platform_data/usb-davinci.h index e0bc4ab..0926e99 100644 --- a/include/linux/platform_data/usb-davinci.h +++ b/include/linux/platform_data/usb-davinci.h @@ -11,29 +11,6 @@ #ifndef __ASM_ARCH_USB_H #define __ASM_ARCH_USB_H -/* DA8xx CFGCHIP2 (USB 2.0 PHY Control) register bits */ -#define CFGCHIP2_PHYCLKGD (1 << 17) -#define CFGCHIP2_VBUSSENSE (1 << 16) -#define CFGCHIP2_RESET (1 << 15) -#define CFGCHIP2_OTGMODE (3 << 13) -#define CFGCHIP2_NO_OVERRIDE (0 << 13) -#define CFGCHIP2_FORCE_HOST (1 << 13) -#define CFGCHIP2_FORCE_DEVICE (2 << 13) -#define CFGCHIP2_FORCE_HOST_VBUS_LOW (3 << 13) -#define CFGCHIP2_USB1PHYCLKMUX (1 << 12) -#define CFGCHIP2_USB2PHYCLKMUX (1 << 11) -#define CFGCHIP2_PHYPWRDN (1 << 10) -#define CFGCHIP2_OTGPWRDN (1 << 9) -#define CFGCHIP2_DATPOL (1 << 8) -#define CFGCHIP2_USB1SUSPENDM (1 << 7) -#define CFGCHIP2_PHY_PLLON (1 << 6) /* override PLL suspend */ -#define CFGCHIP2_SESENDEN (1 << 5) /* Vsess_end comparator */ -#define CFGCHIP2_VBDTCTEN (1 << 4) /* Vbus comparator */ -#define CFGCHIP2_REFFREQ (0xf << 0) -#define CFGCHIP2_REFFREQ_12MHZ (1 << 0) -#define CFGCHIP2_REFFREQ_24MHZ (2 << 0) -#define CFGCHIP2_REFFREQ_48MHZ (3 << 0) - struct da8xx_ohci_root_hub; typedef void (*da8xx_ocic_handler_t)(struct da8xx_ohci_root_hub *hub,