HAVE_CLK (for <linux/clk.h> support)

From: David Brownell
Date: Tue May 27 2008 - 19:15:17 EST


On Tuesday 27 May 2008, Felipe Balbi wrote:
> This patch adds support for MUSB and TUSB controllers
> integrated into omap2430 and davinci. It also adds support
> for external tusb6010 controller.

The most significant issue I know of with this patch [0] is actually
an arch issue. On ones like x86, with no support for the clock API,
this driver will build but not link:

ERROR: "clk_enable" [drivers/usb/musb/musb_hdrc.ko] undefined!
ERROR: "clk_disable" [drivers/usb/musb/musb_hdrc.ko] undefined!
ERROR: "clk_put" [drivers/usb/musb/musb_hdrc.ko] undefined!
ERROR: "clk_get" [drivers/usb/musb/musb_hdrc.ko] undefined!

I don't know of any other drivers with this particular issue,
but nonetheless ... I think the following is an appropriate
resolution.

Comments from anyone else?

- Dave

[0] Posted this AM on linux-usb but evidently too big for any
of the archives I know about ... 450 KB, which includes
host, gadget, and OTG functionality. Previous versions
are archived, in the one-file-added-per-patch style.


--- g26.orig/drivers/usb/musb/Kconfig 2008-05-27 16:02:41.000000000 -0700
+++ g26/drivers/usb/musb/Kconfig 2008-05-27 16:01:09.000000000 -0700
@@ -8,7 +8,7 @@ comment "Enable Host or Gadget support t

# (M)HDRC = (Multipoint) Highspeed Dual-Role Controller
config USB_MUSB_HDRC
- depends on USB || USB_GADGET
+ depends on HAVE_CLK && (USB || USB_GADGET)
select TWL4030_USB if MACH_OMAP_3430SDP
tristate 'Inventra Highspeed Dual Role Controller (TI, ...)'
help
--- g26.orig/arch/Kconfig 2008-05-27 16:00:14.000000000 -0700
+++ g26/arch/Kconfig 2008-05-27 16:00:41.000000000 -0700
@@ -39,3 +39,6 @@ config HAVE_KRETPROBES

config HAVE_DMA_ATTRS
def_bool n
+
+config HAVE_CLK
+ def_bool n
--- g26.orig/arch/arm/Kconfig 2008-05-27 16:01:15.000000000 -0700
+++ g26/arch/arm/Kconfig 2008-05-27 16:02:33.000000000 -0700
@@ -458,12 +458,14 @@ config ARCH_DAVINCI
select GENERIC_TIME
select GENERIC_CLOCKEVENTS
select GENERIC_GPIO
+ select HAVE_CLK
help
Support for TI's DaVinci platform.

config ARCH_OMAP
bool "TI OMAP"
select GENERIC_GPIO
+ select HAVE_CLK
select HAVE_GPIO_LIB
select GENERIC_TIME
select GENERIC_CLOCKEVENTS
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/