Re: [GIT PULL] DWC3 changes for v3.4 merge window

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Thu, Mar 01, 2012 at 08:30:59AM -0800, Greg KH wrote:
> On Wed, Feb 29, 2012 at 11:55:00AM +0200, Felipe Balbi wrote:
> > Hi Greg,
> > 
> > Here's an updated pull request. Please consider pulling. Let me know if
> > there are still any concerns.
> > 
> > The following changes since commit 62aa2b537c6f5957afd98e29f96897419ed5ebab:
> > 
> >   Linux 3.3-rc2 (2012-01-31 13:31:54 -0800)
> > 
> > are available in the git repository at:
> > 
> >   git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git tags/dwc3-for-v3.4
> > 
> > for you to fetch changes up to 87e3782faa9c5777f4054833f71f9203d2cde2a2:
> > 
> >   usb: dwc3: clear 'res_trans_idx' as soon as it becomes invalid (2012-02-27 16:30:52 +0200)
> > 
> > ----------------------------------------------------------------
> > Here are the changes for v3.4 merge window.
> > 
> > It includes a new glue layer for Samsung's Exynos platform, a simplification of
> > memory management on DWC3 driver by using dev_xxx functions, a few
> > optimizations to IRQ handling by dropping memcpy() and using bitshifts, a fix
> > for TI's OMAP5430 TX Fifo Allocation, two fixes to test mode implementation
> > (one on debugfs and one on ep0), and several minor changes such as whitespace
> > cleanups, simplification of a few parts of the code, decreasing a long delay to
> > something a bit saner, dropping a header which was included twice and so on.
> > 
> > The highlight on this merge is the support for Samsung's Exynos platform,
> > increasing the number of different users for this driver to three.
> 
> That would be wonderful to have support for that, if it would build
> properly:
> 
> ERROR: "clk_enable" [drivers/usb/dwc3/dwc3-exynos.ko] undefined!
> ERROR: "clk_get" [drivers/usb/dwc3/dwc3-exynos.ko] undefined!
> ERROR: "clk_put" [drivers/usb/dwc3/dwc3-exynos.ko] undefined!
> ERROR: "clk_disable" [drivers/usb/dwc3/dwc3-exynos.ko] undefined!
> 
> So I can't take this merge right now, as it really wouldn't be good to
> break the build...

Anton, can you send me a fixup patch ASAP ?

I guess I didn't see it because I'm building only the dwc3 directory
before merging:

$ make -j8 drivers/usb/dwc3
scripts/kconfig/conf --silentoldconfig Kconfig
  CHK     include/linux/version.h
  SYSHDR  arch/x86/syscalls/../include/generated/asm/unistd_32.h
  SYSTBL  arch/x86/syscalls/../include/generated/asm/syscalls_32.h
  SYSHDR  arch/x86/syscalls/../include/generated/asm/unistd_32_ia32.h
  SYSHDR  arch/x86/syscalls/../include/generated/asm/unistd_64.h
  SYSTBL  arch/x86/syscalls/../include/generated/asm/syscalls_64.h
  HOSTCC  scripts/recordmcount
  HOSTCC  scripts/genksyms/genksyms.o
  SHIPPED scripts/genksyms/lex.lex.c
  SHIPPED scripts/genksyms/parse.tab.h
  HOSTCC  scripts/genksyms/lex.lex.o
  SHIPPED scripts/genksyms/parse.tab.c
  HOSTCC  scripts/genksyms/parse.tab.o
  CC      scripts/mod/empty.o
  MKELF   scripts/mod/elfconfig.h
  HOSTCC  scripts/mod/file2alias.o
  HOSTCC  scripts/mod/modpost.o
  HOSTCC  scripts/mod/sumversion.o
  HOSTLD  scripts/genksyms/genksyms
  HOSTLD  scripts/mod/modpost
  CHK     include/generated/utsrelease.h
  UPD     include/generated/utsrelease.h
  CC      kernel/bounds.s
  GEN     include/generated/bounds.h
  CC      arch/x86/kernel/asm-offsets.s
  GEN     include/generated/asm-offsets.h
  CALL    scripts/checksyscalls.sh
  LD      drivers/usb/dwc3/built-in.o
  CC [M]  drivers/usb/dwc3/core.o
  CC [M]  drivers/usb/dwc3/host.o
  CC [M]  drivers/usb/dwc3/gadget.o
  CC [M]  drivers/usb/dwc3/ep0.o
  CC [M]  drivers/usb/dwc3/debugfs.o
  CC [M]  drivers/usb/dwc3/dwc3-omap.o
  CC [M]  drivers/usb/dwc3/dwc3-exynos.o
  CC [M]  drivers/usb/dwc3/dwc3-pci.o
  LD [M]  drivers/usb/dwc3/dwc3.o

Then it doesn't try to link. We have two options:

1) change Makefile to something like:

diff --git a/drivers/usb/dwc3/Makefile b/drivers/usb/dwc3/Makefile
index 4502648..7d03f4e 100644
--- a/drivers/usb/dwc3/Makefile
+++ b/drivers/usb/dwc3/Makefile
@@ -27,7 +27,10 @@ endif
 ##
 
 obj-$(CONFIG_USB_DWC3)		+= dwc3-omap.o
-obj-$(CONFIG_USB_DWC3)		+= dwc3-exynos.o
+
+ifneq ($(CONFIG_HAVE_CLK),)
+	obj-$(CONFIG_USB_DWC3)		+= dwc3-exynos.o
+endif
 
 ifneq ($(CONFIG_PCI),)
 	obj-$(CONFIG_USB_DWC3)		+= dwc3-pci.o

2) Make clk.h provide dummy implementations ifndef CONFIG_HAVE_CLK with
something like:

diff --git a/include/linux/clk.h b/include/linux/clk.h
index b9d46fa..33ad1a5 100644
--- a/include/linux/clk.h
+++ b/include/linux/clk.h
@@ -15,6 +15,7 @@
 
 struct device;
 
+#ifdef CONFIG_HAVE_CLK
 /*
  * The base API.
  */
@@ -219,5 +220,36 @@ struct clk *clk_get_sys(const char *dev_id, const char *con_id);
  */
 int clk_add_alias(const char *alias, const char *alias_dev_name, char *id,
 			struct device *dev);
+#else
+struct clk { /* empty */ };
+
+static inline int clk_prepare_enable(struct clk *clk)
+{ return 0; }
+static inline void clk_disable_unprepare(struct clk *clk)
+{  }
+static inline int clk_enable(struct clk *clk)
+{ return 0; }
+static inline void clk_disable(struct clk *clk)
+{ }
+static inline void clk_unprepare(struct clk *clk)
+{ }
+static inline unsigned long clk_get_rate(struct clk *clk)
+{ return 0; }
+static inline void clk_put(struct clk *clk)
+{ }
+static inline long clk_round_rate(struct clk *clk, unsigned long rate)
+{ return 0; }
+static inline int clk_set_rate(struct clk *clk, unsigned long rate)
+{ return 0; }
+static inline int clk_set_parent(struct clk *clk, struct clk *parent)
+{ return 0; }
+static inline struct clk *clk_get_parent(struct clk *clk)
+{ return 0; }
+static inline struct clk *clk_get_sys(const char *dev_id, const char *con_id)
+{ return NULL; }
+static inline int clk_add_alias(const char *alias, const char *alias_dev_name, char *id,
+			struct device *dev)
+{ return 0; }
+#endif
 
 #endif

-- 
balbi

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux