mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2] Fix some potential warnings
@ 2016-10-25 12:11 Alexandre Bailon
  2016-10-25 12:11 ` [PATCH v2] ARM: davinci: da8xx: Fix some redefined symbol warnings Alexandre Bailon
  0 siblings, 1 reply; 4+ messages in thread
From: Alexandre Bailon @ 2016-10-25 12:11 UTC (permalink / raw)
  To: gregkh, khilman, nsekhar; +Cc: linux-kernel, linux-arm-kernel, Alexandre Bailon

Some changes I'm working on causes some warning because two included
headers defines the same macros.

Change in V2:
Update the d830 evm board file to use the da8xx-cfgchip.h
These changes are required as I'm sending this patch apart from
the series "[PATCH/RFT v2 00/17] Add DT support for ohci-da8xx"

Alexandre Bailon (1):
  ARM: davinci: da8xx: Fix some redefined symbol warnings

 arch/arm/mach-davinci/board-da830-evm.c   |  3 ++-
 include/linux/platform_data/usb-davinci.h | 23 -----------------------
 2 files changed, 2 insertions(+), 24 deletions(-)

-- 
2.7.3

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH v2] ARM: davinci: da8xx: Fix some redefined symbol warnings
  2016-10-25 12:11 [PATCH v2] Fix some potential warnings Alexandre Bailon
@ 2016-10-25 12:11 ` Alexandre Bailon
  2016-10-26 11:57   ` Sekhar Nori
  0 siblings, 1 reply; 4+ messages in thread
From: Alexandre Bailon @ 2016-10-25 12:11 UTC (permalink / raw)
  To: gregkh, khilman, nsekhar; +Cc: linux-kernel, linux-arm-kernel, Alexandre Bailon

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 da830-evm board file to use da8xx-cfgchip.h

Signed-off-by: Alexandre Bailon <abailon@baylibre.com>
---
 arch/arm/mach-davinci/board-da830-evm.c   |  3 ++-
 include/linux/platform_data/usb-davinci.h | 23 -----------------------
 2 files changed, 2 insertions(+), 24 deletions(-)

diff --git a/arch/arm/mach-davinci/board-da830-evm.c b/arch/arm/mach-davinci/board-da830-evm.c
index 3d8cf8c..9817316 100644
--- a/arch/arm/mach-davinci/board-da830-evm.c
+++ b/arch/arm/mach-davinci/board-da830-evm.c
@@ -27,6 +27,7 @@
 #include <linux/platform_data/mtd-davinci-aemif.h>
 #include <linux/platform_data/spi-davinci.h>
 #include <linux/platform_data/usb-davinci.h>
+#include <linux/mfd/da8xx-cfgchip.h>
 
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
@@ -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/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,
-- 
2.7.3

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] ARM: davinci: da8xx: Fix some redefined symbol warnings
  2016-10-25 12:11 ` [PATCH v2] ARM: davinci: da8xx: Fix some redefined symbol warnings Alexandre Bailon
@ 2016-10-26 11:57   ` Sekhar Nori
  2016-10-26 12:39     ` Alexandre Bailon
  0 siblings, 1 reply; 4+ messages in thread
From: Sekhar Nori @ 2016-10-26 11:57 UTC (permalink / raw)
  To: Alexandre Bailon, gregkh, khilman; +Cc: linux-kernel, linux-arm-kernel

On Tuesday 25 October 2016 05:41 PM, Alexandre Bailon wrote:
> 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 da830-evm board file to use da8xx-cfgchip.h
> 
> Signed-off-by: Alexandre Bailon <abailon@baylibre.com>

This leads to build error on v4.9-rc2:

arch/arm/mach-davinci/board-da830-evm.c: In function 'da830_evm_usb_init':
arch/arm/mach-davinci/board-da830-evm.c:120:15: error: 'CFGCHIP2_REFFREQ' undeclared (first use in this function)
  cfgchip2 &= ~CFGCHIP2_REFFREQ;

Thanks,
Sekhar

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] ARM: davinci: da8xx: Fix some redefined symbol warnings
  2016-10-26 11:57   ` Sekhar Nori
@ 2016-10-26 12:39     ` Alexandre Bailon
  0 siblings, 0 replies; 4+ messages in thread
From: Alexandre Bailon @ 2016-10-26 12:39 UTC (permalink / raw)
  To: Sekhar Nori, gregkh, khilman; +Cc: linux-kernel, linux-arm-kernel

On 10/26/2016 01:57 PM, Sekhar Nori wrote:
> On Tuesday 25 October 2016 05:41 PM, Alexandre Bailon wrote:
>> 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 da830-evm board file to use da8xx-cfgchip.h
>>
>> Signed-off-by: Alexandre Bailon <abailon@baylibre.com>
> 
> This leads to build error on v4.9-rc2:
Oops! Sorry for that. I will  fit it.
> 
> arch/arm/mach-davinci/board-da830-evm.c: In function 'da830_evm_usb_init':
> arch/arm/mach-davinci/board-da830-evm.c:120:15: error: 'CFGCHIP2_REFFREQ' undeclared (first use in this function)
>   cfgchip2 &= ~CFGCHIP2_REFFREQ;
> 
> Thanks,
> Sekhar
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-10-26 12:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-25 12:11 [PATCH v2] Fix some potential warnings Alexandre Bailon
2016-10-25 12:11 ` [PATCH v2] ARM: davinci: da8xx: Fix some redefined symbol warnings Alexandre Bailon
2016-10-26 11:57   ` Sekhar Nori
2016-10-26 12:39     ` Alexandre Bailon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®