mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Linus Torvalds <torvalds@linux-foundation.org>,
	Greg KH <gregkh@suse.de>, Mike Frysinger <vapier@gentoo.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: [origin tree build failure] [PATCH] Revert "USB: musb: make HAVE_CLK support optional"
Date: Mon, 12 Oct 2009 09:42:21 +0200	[thread overview]
Message-ID: <20091012074221.GA19198@elte.hu> (raw)
In-Reply-To: <alpine.LFD.2.01.0910111446410.3438@localhost.localdomain>


* Linus Torvalds <torvalds@linux-foundation.org> wrote:

> As usual, please test this for regressions, both new and old. 

>       USB: musb: make HAVE_CLK support optional

This USB/Blackfin commit broke the x86 build with these config options:

 CONFIG_USB_MUSB_HDRC=y
 CONFIG_USB_MUSB_HOST=y
 # CONFIG_USB_MUSB_PERIPHERAL is not set
 # CONFIG_USB_MUSB_OTG is not set
 # CONFIG_USB_GADGET_MUSB_HDRC is not set
 CONFIG_USB_MUSB_HDRC_HCD=y
 CONFIG_MUSB_PIO_ONLY=y
 CONFIG_USB_MUSB_DEBUG=y

Because a side-effect of the patch was that it enabled the driver on x86 
too which doesnt have HAVE_CLK. So this formerly embedded-only driver 
got exposed on the more widely tested x86 platform.

The changelog does not mention this side-effect so i suspect it was 
unintended - so below is the revert of the commit.

	Ingo

-------------------->
>From 64f59376a1259cbce3da07f7e7d4c9d5830b68e4 Mon Sep 17 00:00:00 2001
From: Ingo Molnar <mingo@elte.hu>
Date: Mon, 12 Oct 2009 09:31:32 +0200
Subject: [PATCH] Revert "USB: musb: make HAVE_CLK support optional"

This reverts commit b20cf90650badaa5e6ec1bdbe61a63528818e8ce.

It breaks the x86 build:

  drivers/built-in.o: In function `musb_stop':
  (.text+0x417427): undefined reference to `musb_platform_disable'
  drivers/built-in.o: In function `musb_shutdown':
  musb_core.c:(.text+0x4174c6): undefined reference to `musb_platform_disable'
  drivers/built-in.o: In function `musb_mode_store':
  musb_core.c:(.text+0x417729): undefined reference to `musb_platform_set_mode'
  drivers/built-in.o: In function `musb_free':
  musb_core.c:(.text+0x4177cc): undefined reference to `dma_controller_destroy'
  musb_core.c:(.text+0x4177e0): undefined reference to `musb_platform_exit'
  drivers/built-in.o: In function `musb_start':
  (.text+0x418097): undefined reference to `musb_platform_enable'
  drivers/built-in.o: In function `musb_probe':
  musb_core.c:(.init.text+0x18db5): undefined reference to `musb_platform_init'
  musb_core.c:(.init.text+0x18df3): undefined reference to `dma_controller_create'
  musb_core.c:(.init.text+0x18e21): undefined reference to `musb_platform_disable'
  musb_core.c:(.init.text+0x1970c): undefined reference to `musb_platform_exit'
  make: *** [.tmp_vmlinux1] Error 1

Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 drivers/usb/musb/Kconfig     |    2 +-
 drivers/usb/musb/blackfin.c  |    1 +
 drivers/usb/musb/musb_core.h |    7 -------
 drivers/usb/musb/musb_regs.h |    9 +++++++++
 4 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/drivers/usb/musb/Kconfig b/drivers/usb/musb/Kconfig
index 760e727..803adcb 100644
--- a/drivers/usb/musb/Kconfig
+++ b/drivers/usb/musb/Kconfig
@@ -8,7 +8,7 @@ comment "Enable Host or Gadget support to see Inventra options"
 
 # (M)HDRC = (Multipoint) Highspeed Dual-Role Controller
 config USB_MUSB_HDRC
-	depends on (USB || USB_GADGET)
+	depends on (USB || USB_GADGET) && HAVE_CLK
 	depends on !SUPERH
 	select NOP_USB_XCEIV if ARCH_DAVINCI
 	select TWL4030_USB if MACH_OMAP_3430SDP
diff --git a/drivers/usb/musb/blackfin.c b/drivers/usb/musb/blackfin.c
index fcec87e..f2f66eb 100644
--- a/drivers/usb/musb/blackfin.c
+++ b/drivers/usb/musb/blackfin.c
@@ -14,6 +14,7 @@
 #include <linux/slab.h>
 #include <linux/init.h>
 #include <linux/list.h>
+#include <linux/clk.h>
 #include <linux/gpio.h>
 #include <linux/io.h>
 
diff --git a/drivers/usb/musb/musb_core.h b/drivers/usb/musb/musb_core.h
index 6aa5f22..381d648 100644
--- a/drivers/usb/musb/musb_core.h
+++ b/drivers/usb/musb/musb_core.h
@@ -95,13 +95,6 @@ struct musb_ep;
 #endif
 #endif	/* need MUSB gadget selection */
 
-#ifndef CONFIG_HAVE_CLK
-/* Dummy stub for clk framework */
-#define clk_get(dev, id)	NULL
-#define clk_put(clock)		do {} while (0)
-#define clk_enable(clock)	do {} while (0)
-#define clk_disable(clock)	do {} while (0)
-#endif
 
 #ifdef CONFIG_PROC_FS
 #include <linux/fs.h>
diff --git a/drivers/usb/musb/musb_regs.h b/drivers/usb/musb/musb_regs.h
index cc1d71b..fbfd3fd 100644
--- a/drivers/usb/musb/musb_regs.h
+++ b/drivers/usb/musb/musb_regs.h
@@ -439,6 +439,15 @@ static inline void  musb_write_txhubport(void __iomem *mbase, u8 epnum,
 /* Not implemented - HW has seperate Tx/Rx FIFO */
 #define MUSB_TXCSR_MODE			0x0000
 
+/*
+ * Dummy stub for clk framework, it will be removed
+ * until Blackfin supports clk framework
+ */
+#define clk_get(dev, id)	NULL
+#define clk_put(clock)		do {} while (0)
+#define clk_enable(clock)	do {} while (0)
+#define clk_disable(clock)	do {} while (0)
+
 static inline void musb_write_txfifosz(void __iomem *mbase, u8 c_size)
 {
 }

  reply	other threads:[~2009-10-12  7:43 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-11 21:58 Linux 2.6.32-rc4 Linus Torvalds
2009-10-12  7:42 ` Ingo Molnar [this message]
2009-10-12 13:05   ` [origin tree build failure] [PATCH] Revert "USB: musb: make HAVE_CLK support optional" Mike Frysinger
2009-10-12 14:29     ` Greg KH
2009-10-12 14:39       ` Mike Frysinger
2009-10-12 15:00         ` Ingo Molnar
2009-10-12 15:09           ` Mike Frysinger
2009-10-12 13:49   ` [PATCH] USB: musb: invert arch depend string Mike Frysinger
2009-10-12 14:28     ` Greg KH
2009-10-12 15:02       ` Ingo Molnar
2009-10-12  8:05 ` [crash] NULL pointer dereference at IP: [<ffffffff812e9ccb>] uart_close+0x2a/0x1e4 Ingo Molnar
2009-10-12  9:19   ` Ingo Molnar
2009-10-12  9:27     ` Ingo Molnar
2009-10-12 11:25       ` Ingo Molnar
2009-10-12 11:45         ` Alan Cox
2009-10-12 11:55           ` Ingo Molnar
2009-10-12 12:22             ` Ingo Molnar
2009-10-12 13:06               ` Alan Cox
2009-10-12 14:23                 ` Ingo Molnar
2009-10-12 16:19   ` Linus Torvalds
2009-10-12 16:26     ` Ingo Molnar
2009-10-12 16:28     ` Ingo Molnar
2009-10-12 16:37     ` Linus Torvalds
2009-10-12 17:13       ` [PATCH] tty, serial: Fix race and NULL check in uart_close() Ingo Molnar
2009-10-12  8:29 ` Linux 2.6.32-rc4 Ingo Molnar
2009-10-12  8:30   ` [origin tree build failure] [PATCH] headers: Fix build in drivers/pci/hotplug/cpqphp.h Ingo Molnar
2009-10-12  8:32   ` [origin tree build failure] [PATCH] headers: Fix build in drivers/char/rtc.c Ingo Molnar
2009-10-12  8:40   ` [origin tree build failure] [PATCH] headers: Fix build in drivers/net/wan/pci200syn.c Ingo Molnar
2009-10-12  9:11   ` [origin tree build failure] [PATCH] headers: Fix build in drivers/net/wan/n2.c Ingo Molnar
2009-10-12  9:16   ` [origin tree build failure] [PATCH] headers: Fix build in drivers/net/wan/c101.c Ingo Molnar
2009-10-12 10:06   ` [origin tree build failure] [PATCH] headers: Fix build in drivers/char/genrtc.c Ingo Molnar
2009-10-12 13:29   ` Linux 2.6.32-rc4 Alexey Dobriyan
2009-10-12  9:43     ` Ingo Molnar
2009-10-12 13:34   ` Alexey Dobriyan
2009-10-12  9:48     ` Ingo Molnar
2009-10-12 14:22   ` [origin tree build failure] [PATCH] headers: Fix build in drivers/char/sonypi.c Ingo Molnar
2009-10-12 13:01 ` Linux 2.6.32-rc4 Thomas Meyer

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=20091012074221.GA19198@elte.hu \
    --to=mingo@elte.hu \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=vapier@gentoo.org \
    /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

all inboxes | Powered by JetHome®