Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1509217 > unrolled thread
| Started by | Alexandre Bailon <abailon@baylibre.com> |
|---|---|
| First post | 2016-10-26 14:40 +0200 |
| Last post | 2016-10-27 16:50 +0200 |
| Articles | 5 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH v3] Fix some potential warnings Alexandre Bailon <abailon@baylibre.com> - 2016-10-26 14:40 +0200
[PATCH v3] ARM: davinci: da8xx: Fix some redefined symbol warnings Alexandre Bailon <abailon@baylibre.com> - 2016-10-26 14:50 +0200
Re: [PATCH v3] ARM: davinci: da8xx: Fix some redefined symbol warnings Sekhar Nori <nsekhar@ti.com> - 2016-10-27 16:00 +0200
Re: [PATCH v3] ARM: davinci: da8xx: Fix some redefined symbol warnings Alexandre Bailon <abailon@baylibre.com> - 2016-10-27 16:40 +0200
Re: [PATCH v3] ARM: davinci: da8xx: Fix some redefined symbol warnings Sekhar Nori <nsekhar@ti.com> - 2016-10-27 16:50 +0200
| From | Alexandre Bailon <abailon@baylibre.com> |
|---|---|
| Date | 2016-10-26 14:40 +0200 |
| Subject | [PATCH v3] Fix some potential warnings |
| Message-ID | <swvET-3Eq-81@gated-at.bofh.it> |
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" Change in v3: Fix build issues happening in omapl138 hawk and da830 evm board files. Alexandre Bailon (1): ARM: davinci: da8xx: Fix some redefined symbol warnings 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
[toc] | [next] | [standalone]
| From | Alexandre Bailon <abailon@baylibre.com> |
|---|---|
| Date | 2016-10-26 14:50 +0200 |
| Subject | [PATCH v3] ARM: davinci: da8xx: Fix some redefined symbol warnings |
| Message-ID | <swvOy-3Ml-47@gated-at.bofh.it> |
| In reply to | #1509217 |
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 <abailon@baylibre.com> --- 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(-) 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 <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> @@ -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 <linux/console.h> #include <linux/gpio.h> #include <linux/platform_data/gpio-davinci.h> +#include <linux/mfd/da8xx-cfgchip.h> #include <asm/mach-types.h> #include <asm/mach/arch.h> @@ -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, -- 2.7.3
[toc] | [prev] | [next] | [standalone]
| From | Sekhar Nori <nsekhar@ti.com> |
|---|---|
| Date | 2016-10-27 16:00 +0200 |
| Subject | Re: [PATCH v3] ARM: davinci: da8xx: Fix some redefined symbol warnings |
| Message-ID | <swTnR-2Bn-99@gated-at.bofh.it> |
| In reply to | #1509262 |
On Thursday 27 October 2016 05:13 PM, Sekhar Nori wrote: > On Wednesday 26 October 2016 06:09 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. > > Looks like this is not true for v4.9-rc2 and so I don't see any warnings Ah, just noticed that _this_ is the patch that introduces da8xx-cfgchip.h into usb-da8xx.c. So this is the patch that introduces the warnings (and fixes them). I can queue this for v4.10 (with Greg's ack) if you change the description to make it about cleaning up duplicated defines between da8xx-cfgchip.h and usb-davinci.h and not talk about "redefined symbol warnings". Also, when adding a header file, can you please keep it sorted in alphabetical order. Thanks, Sekhar
[toc] | [prev] | [next] | [standalone]
| From | Alexandre Bailon <abailon@baylibre.com> |
|---|---|
| Date | 2016-10-27 16:40 +0200 |
| Subject | Re: [PATCH v3] ARM: davinci: da8xx: Fix some redefined symbol warnings |
| Message-ID | <swU0z-38X-57@gated-at.bofh.it> |
| In reply to | #1510177 |
On 10/27/2016 01:54 PM, Sekhar Nori wrote: > On Thursday 27 October 2016 05:13 PM, Sekhar Nori wrote: >> On Wednesday 26 October 2016 06:09 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. >> >> Looks like this is not true for v4.9-rc2 and so I don't see any warnings > > Ah, just noticed that _this_ is the patch that introduces > da8xx-cfgchip.h into usb-da8xx.c. So this is the patch that introduces > the warnings (and fixes them). > > I can queue this for v4.10 (with Greg's ack) if you change the > description to make it about cleaning up duplicated defines between > da8xx-cfgchip.h and usb-davinci.h and not talk about "redefined symbol > warnings". I will do it. > > Also, when adding a header file, can you please keep it sorted in > alphabetical order. Ok. > > Thanks, > Sekhar > Thanks, Alexandre
[toc] | [prev] | [next] | [standalone]
| From | Sekhar Nori <nsekhar@ti.com> |
|---|---|
| Date | 2016-10-27 16:50 +0200 |
| Subject | Re: [PATCH v3] ARM: davinci: da8xx: Fix some redefined symbol warnings |
| Message-ID | <swTnR-2Bn-101@gated-at.bofh.it> |
| In reply to | #1509262 |
On Wednesday 26 October 2016 06:09 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. Looks like this is not true for v4.9-rc2 and so I don't see any warnings in v4.9-rc2. This is probably introduced due to some changes you are doing for v4.10 and so it is not a v4.9-rc candidate. > Remove the macro and update the board files to use da8xx-cfgchip.h This patch should probably be folded into the patch which actually introduces da8xx-cfgchip.h into usb-da8xx.c > Signed-off-by: Alexandre Bailon <abailon@baylibre.com> Thanks, Sekhar
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web