mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nicolas Ferre <nicolas.ferre@atmel.com>
To: Sudip Mukherjee <sudipm.mukherjee@gmail.com>,
	Felipe Balbi <balbi@ti.com>
Cc: Haavard Skinnemoen <hskinnemoen@gmail.com>,
	Hans-Christian Egtvedt <egtvedt@samfundet.no>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	<linux-kernel@vger.kernel.org>, <linux-usb@vger.kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH 2/3] usb: gadget: at91_udc: mention proper dependency
Date: Wed, 30 Sep 2015 18:34:28 +0200	[thread overview]
Message-ID: <560C0F14.30500@atmel.com> (raw)
In-Reply-To: <20150930162416.GA21569@sudip-pc>

Le 30/09/2015 18:24, Sudip Mukherjee a écrit :
> On Wed, Sep 30, 2015 at 11:04:54AM -0500, Felipe Balbi wrote:
>> On Wed, Sep 23, 2015 at 09:22:48PM +0530, Sudip Mukherjee wrote:
>>> On Mon, Sep 21, 2015 at 04:40:57PM +0530, Sudip Mukherjee wrote:
>>>> On Sun, Sep 20, 2015 at 11:15:28AM -0500, Felipe Balbi wrote:
>>>>> On Sat, Sep 19, 2015 at 10:42:58PM +0530, Sudip Mukherjee wrote:
>>>>>> While building allmodconfig on avr32 the build failed with the error:
>>>>>> "at91_pmc_base" [drivers/usb/gadget/udc/atmel_usba_udc.ko] undefined!
>>>>>>
>>>>>> On checking the code it turned out that if CONFIG_OF is defined then it
>>>>>> is using at91_pmc_read() which is using at91_pmc_base. And unless
>>>>>> COMMON_CLK_AT91 is defined we donot have at91_pmc_base. And
>>>>>> COMMON_CLK_AT91 is available with AT91 architecture.
>>>>>> Mention the dependency such that this driver builds with avr32 only if
>>>>>> OF is not enabled.
>>>>>>
>>>>>> Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
>>>>>> ---
>>>>>>
>>>>>> Tested build with at91_dt_defconfig and allmodconfig of avr32. Build log
>>>>>> at:
>>>>>> https://travis-ci.org/sudipm-mukherjee/parport/builds/81168845
>>>>>>
>>>>>>  drivers/usb/gadget/udc/Kconfig | 2 +-
>>>>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>>>>
>>>>>> diff --git a/drivers/usb/gadget/udc/Kconfig b/drivers/usb/gadget/udc/Kconfig
>>>>>> index 9a3a6b0..cdbff54 100644
>>>>>> --- a/drivers/usb/gadget/udc/Kconfig
>>>>>> +++ b/drivers/usb/gadget/udc/Kconfig
>>>>>> @@ -55,7 +55,7 @@ config USB_LPC32XX
>>>>>>  
>>>>>>  config USB_ATMEL_USBA
>>>>>>  	tristate "Atmel USBA"
>>>>>> -	depends on AVR32 || ARCH_AT91
>>>>>> +	depends on ((AVR32 && !OF) || ARCH_AT91)
>>>>>
>>>>> any chance you can add || COMPILE_TEST here ? I'd like to make
>>>>> sure this builds on my end too.
>>>> With "depends on ((AVR32 && !OF) || ARCH_AT91 || COMPILE_TEST)"
>>>> normal allmodconfig builiding for x86_64 failed with:
>>>>
>>>> drivers/usb/gadget/udc/atmel_usba_udc.c: In function ‘usba_start’:
>>>> drivers/usb/gadget/udc/atmel_usba_udc.c:1783:25: error: ‘USBA_ENABLE_MASK’ undeclared (first use in this function)
>>>>   usba_writel(udc, CTRL, USBA_ENABLE_MASK);
>>>>                          ^
>>>> drivers/usb/gadget/udc/atmel_usba_udc.c: In function ‘usba_stop’:
>>>> drivers/usb/gadget/udc/atmel_usba_udc.c:1800:25: error: ‘USBA_DISABLE_MASK’ undeclared (first use in this function)
>>>>   usba_writel(udc, CTRL, USBA_DISABLE_MASK);
>>>>                          ^
>>>>
>>>> Looks like USBA_DISABLE_MASK and USBA_ENABLE_MASK is defined under
>>>> #if defined(CONFIG_AVR32). :(
>>> Can i check anything else here? Like I said with COMPILE_TEST
>>> allmodconfig on x86_64 is failing.
>>
>> then keep it as is, but it would be nice to get that sorted out
>> so I can do compile tests on my end too.
> 
> Maybe Nicolas can give some idea. Adding Nicolas Ferre to CC.

Hi,

I'm thinking about something like this:

8<----------------------------------------------------------
--- a/drivers/usb/gadget/udc/atmel_usba_udc.h
+++ b/drivers/usb/gadget/udc/atmel_usba_udc.h
@@ -46,10 +46,10 @@
 #if defined(CONFIG_AVR32)
 #define USBA_ENABLE_MASK                       USBA_EN_USBA
 #define USBA_DISABLE_MASK                      0
-#elif defined(CONFIG_ARCH_AT91)
+#else
 #define USBA_ENABLE_MASK                       (USBA_EN_USBA | USBA_PULLD_DIS)
 #define USBA_DISABLE_MASK                      USBA_DETACH
-#endif /* CONFIG_ARCH_AT91 */
+#endif
 
 /* Bitfields in FNUM */
 #define USBA_MICRO_FRAME_NUM_OFFSET            0

it can be sensible and will all to compile with the COMPILE_TEST directive.

Bye,
-- 
Nicolas Ferre

  reply	other threads:[~2015-09-30 16:35 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-19 17:12 [PATCH 0/3] fix allmodconfig failure of avr32 Sudip Mukherjee
2015-09-19 17:12 ` [PATCH 1/3] avr32: fix build failure Sudip Mukherjee
2015-09-21  6:09   ` Hans-Christian Egtvedt
2015-09-21  6:39     ` Sudip Mukherjee
2015-09-21  7:33       ` Hans-Christian Egtvedt
2015-09-21  8:01         ` Sudip Mukherjee
2015-09-23 15:56           ` Sudip Mukherjee
2015-09-23 17:15             ` Hans-Christian Egtvedt
2015-09-24 10:23               ` Sudip Mukherjee
2015-09-19 17:12 ` [PATCH 2/3] usb: gadget: at91_udc: mention proper dependency Sudip Mukherjee
2015-09-20 16:15   ` Felipe Balbi
2015-09-21 11:10     ` Sudip Mukherjee
2015-09-23 15:52       ` Sudip Mukherjee
2015-09-30 16:04         ` Felipe Balbi
2015-09-30 16:24           ` Sudip Mukherjee
2015-09-30 16:34             ` Nicolas Ferre [this message]
2015-09-30 16:53               ` Sudip Mukherjee
2015-09-30 17:12                 ` Nicolas Ferre
2015-10-01 12:56                   ` Sudip Mukherjee
2015-10-01 16:12               ` Sudip Mukherjee
2015-09-19 17:12 ` [PATCH 3/3] page-flags: rectify forward declaration Sudip Mukherjee
2015-09-21 22:35   ` Andrew Morton
2015-09-22  8:56     ` Sudip Mukherjee
2015-09-24 15:27       ` Sudip Mukherjee
2015-09-24 14:50     ` [PATCH 00/16] Refreshed page-flags patchset Kirill A. Shutemov
2015-09-24 14:50       ` [PATCH 01/16] page-flags: trivial cleanup for PageTrans* helpers Kirill A. Shutemov
2015-09-24 15:44         ` Christoph Lameter
2015-09-24 14:50       ` [PATCH 02/16] page-flags: move code around Kirill A. Shutemov
2015-09-24 14:50       ` [PATCH 03/16] page-flags: introduce page flags policies wrt compound pages Kirill A. Shutemov
2015-09-25 12:29         ` Konstantin Khlebnikov
2015-09-25 19:13           ` Kirill A. Shutemov
2015-09-28 10:02             ` Konstantin Khlebnikov
2015-09-28 11:03               ` Kirill A. Shutemov
2015-09-28 11:48                 ` Konstantin Khlebnikov
2015-09-28 17:51                   ` Kirill A. Shutemov
2015-09-24 14:50       ` [PATCH 04/16] page-flags: define PG_locked behavior on " Kirill A. Shutemov
2015-09-24 16:08         ` Christoph Lameter
2015-09-24 20:26           ` Kirill A. Shutemov
2015-09-24 14:50       ` [PATCH 05/16] page-flags: define behavior of FS/IO-related flags " Kirill A. Shutemov
2015-09-24 14:50       ` [PATCH 06/16] page-flags: define behavior of LRU-related " Kirill A. Shutemov
2015-09-24 14:50       ` [PATCH 07/16] page-flags: define behavior SL*B-related " Kirill A. Shutemov
2015-09-24 14:50       ` [PATCH 08/16] page-flags: define behavior of Xen-related " Kirill A. Shutemov
2015-09-24 14:50       ` [PATCH 09/16] page-flags: define PG_reserved behavior " Kirill A. Shutemov
2015-09-24 14:50       ` [PATCH 10/16] page-flags: define PG_swapbacked " Kirill A. Shutemov
2015-09-24 14:50       ` [PATCH 11/16] page-flags: define PG_swapcache " Kirill A. Shutemov
2015-09-24 14:51       ` [PATCH 12/16] page-flags: define PG_mlocked " Kirill A. Shutemov
2016-04-18 19:44         ` Sasha Levin
2016-05-18 14:02           ` Kirill A. Shutemov
2015-09-24 14:51       ` [PATCH 13/16] page-flags: define PG_uncached " Kirill A. Shutemov
2015-09-24 14:51       ` [PATCH 14/16] page-flags: define PG_uptodate " Kirill A. Shutemov
2015-09-24 14:51       ` [PATCH 15/16] page-flags: look at head page if the flag is encoded in page->mapping Kirill A. Shutemov
2015-09-24 14:51       ` [PATCH 16/16] mm: sanitize page->mapping for tail pages Kirill A. Shutemov
2015-09-25  2:20         ` Jerome Glisse
2015-09-24 16:13       ` [PATCH 00/16] Refreshed page-flags patchset Christoph Lameter
2015-09-24 20:25         ` Kirill A. Shutemov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=560C0F14.30500@atmel.com \
    --to=nicolas.ferre@atmel.com \
    --cc=akpm@linux-foundation.org \
    --cc=balbi@ti.com \
    --cc=egtvedt@samfundet.no \
    --cc=gregkh@linuxfoundation.org \
    --cc=hskinnemoen@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=sudipm.mukherjee@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome