kernel: allow building kmod-rtc-marvell for mvebu target
[openwrt.git] / package / kernel / modules / i2c.mk
index 6c65989683362a1cd5528ee063eed9f5d999e430..e1adafdb0c52965c585c4eb1b4c9189a637186c5 100644 (file)
@@ -27,7 +27,6 @@ I2C_CORE_MODULES:= \
 define KernelPackage/i2c-core
   $(call i2c_defaults,$(I2C_CORE_MODULES),51)
   TITLE:=I2C support
-  DEPENDS:=@!TARGET_etrax
 endef
 
 define KernelPackage/i2c-core/description
@@ -108,7 +107,7 @@ OF_I2C_MODULES:=\
 define KernelPackage/of-i2c
   $(call i2c_defaults,$(OF_I2C_MODULES),58)
   TITLE:=OpenFirmware I2C accessors
-  DEPENDS:=@TARGET_ppc40x||TARGET_ppc4xx||TARGET_mpc52xx||TARGET_mpc83xx||TARGET_mpc85xx \
+  DEPENDS:=@TARGET_ppc40x||TARGET_ppc4xx||TARGET_mpc52xx||TARGET_mpc83xx||TARGET_mpc85xx||TARGET_mvebu \
           kmod-i2c-core
 endef
 
@@ -155,11 +154,12 @@ I2C_MV64XXX_MODULES:=\
 define KernelPackage/i2c-mv64xxx
   $(call i2c_defaults,$(I2C_MV64XXX_MODULES),59)
   TITLE:=Orion Platform I2C interface support
-  DEPENDS:=@TARGET_kirkwood||TARGET_orion +kmod-i2c-core
+  DEPENDS:=@TARGET_kirkwood||TARGET_orion||TARGET_mvebu (TARGET_kirkwood||TARGET_orion):kmod-i2c-core \
+         TARGET_mvebu:kmod-of-i2c
 endef
 
 define KernelPackage/i2c-mv64xxx/description
- Kernel module for I2C interface on the Kirkwood and Orion
+ Kernel module for I2C interface on the Kirkwood, Orion and Armada XP/370
  family processors.
 endef
 
@@ -197,8 +197,13 @@ endef
 
 $(eval $(call KernelPackage,i2c-mux))
 
+ifeq ($(strip $(call CompareKernelPatchVer,$(KERNEL_PATCHVER),ge,3.6.0)),1)
+I2C_MUX_GPIO_MODULES:= \
+  CONFIG_I2C_MUX_GPIO:drivers/i2c/muxes/i2c-mux-gpio
+else
 I2C_MUX_GPIO_MODULES:= \
   CONFIG_I2C_MUX_GPIO:drivers/i2c/muxes/gpio-i2cmux
+endif
 
 define KernelPackage/i2c-mux-gpio
   $(call i2c_defaults,$(I2C_MUX_GPIO_MODULES),51)