[PATCH 00/10] usb: phy: cleanups to Kconfig and directories

2013-03-07 Thread Felipe Balbi
Hi folks,

inspired by Paul's DWC2 patchset which added usb_otg_state_string()
(a copy of otg_state_string()) I have now renamed otg_state_string()
to usb_otg_state_string(), moved it to usb-common, then moved all
phy drivers to drivers/usb/phy/ and completely deleted the otg directory.

We're also removing CONFIG_USB_OTG_UTILS since that has lots its
meaning long ago.

I have compiled all patches with allyes, allno and allmod configs,
but please make sure to test on your platforms to make sure we're
not leaking any more problems to mainline.

Felipe Balbi (10):
  usb: otg: prefix otg_state_string with usb_
  usb: otg: move usb_otg_state_string to usb-common.c
  usb: phy: convert EXPORT_SYMBOL to EXPORT_SYMBOL_GPL
  usb: phy: move all PHY drivers to drivers/usb/phy/
  usb: phy: make it a menuconfig
  usb: power: pda_power: check against CONFIG_USB_PHY
  usb: gadget: mv_udc_core: check against CONFIG_USB_PHY
  usb: ehci: marvel: check against CONFIG_USB_PHY
  usb: ehci: tegra: check against CONFIG_USB_PHY
  usb: phy: remove CONFIG_USB_OTG_UTILS

 drivers/Makefile |   2 +-
 drivers/power/pda_power.c|  14 +--
 drivers/usb/Kconfig  |   2 -
 drivers/usb/Makefile |   2 -
 drivers/usb/gadget/mv_udc_core.c |   2 +-
 drivers/usb/host/ehci-mv.c   |   4 +-
 drivers/usb/host/ehci-tegra.c|   6 +-
 drivers/usb/musb/am35x.c |   8 +-
 drivers/usb/musb/blackfin.c  |   6 +-
 drivers/usb/musb/da8xx.c |   8 +-
 drivers/usb/musb/davinci.c   |   4 +-
 drivers/usb/musb/musb_core.c |  39 
 drivers/usb/musb/musb_dsps.c |   8 +-
 drivers/usb/musb/musb_gadget.c   |   8 +-
 drivers/usb/musb/musb_host.c |   2 +-
 drivers/usb/musb/musb_virthub.c  |   4 +-
 drivers/usb/musb/omap2430.c  |   6 +-
 drivers/usb/musb/tusb6010.c  |  14 +--
 drivers/usb/otg/Kconfig  | 141 --
 drivers/usb/otg/Makefile |  24 -
 drivers/usb/otg/otg.c|  47 -
 drivers/usb/phy/Kconfig  | 166 ++-
 drivers/usb/phy/Makefile |  26 -
 drivers/usb/{otg = phy}/ab8500-usb.c|   0
 drivers/usb/{otg = phy}/fsl_otg.c   |   2 +-
 drivers/usb/{otg = phy}/fsl_otg.h   |   0
 drivers/usb/{otg = phy}/gpio_vbus.c |   0
 drivers/usb/{otg = phy}/isp1301_omap.c  |   6 +-
 drivers/usb/{otg = phy}/msm_otg.c   |   0
 drivers/usb/{otg = phy}/mv_otg.c|   0
 drivers/usb/{otg = phy}/mv_otg.h|   0
 drivers/usb/{otg = phy}/mxs-phy.c   |   0
 drivers/usb/{otg = phy}/nop-usb-xceiv.c |   0
 drivers/usb/{otg = phy}/otg_fsm.c   |   2 +-
 drivers/usb/{otg = phy}/otg_fsm.h   |   0
 drivers/usb/phy/phy.c|  20 ++--
 drivers/usb/{otg = phy}/twl4030-usb.c   |   0
 drivers/usb/{otg = phy}/twl6030-usb.c   |   0
 drivers/usb/{otg = phy}/ulpi.c  |   0
 drivers/usb/{otg = phy}/ulpi_viewport.c |   0
 drivers/usb/usb-common.c |  26 +
 include/linux/usb/otg.h  |   9 +-
 include/linux/usb/phy.h  |   2 +-
 43 files changed, 274 insertions(+), 336 deletions(-)
 delete mode 100644 drivers/usb/otg/Kconfig
 delete mode 100644 drivers/usb/otg/Makefile
 delete mode 100644 drivers/usb/otg/otg.c
 rename drivers/usb/{otg = phy}/ab8500-usb.c (100%)
 rename drivers/usb/{otg = phy}/fsl_otg.c (99%)
 rename drivers/usb/{otg = phy}/fsl_otg.h (100%)
 rename drivers/usb/{otg = phy}/gpio_vbus.c (100%)
 rename drivers/usb/{otg = phy}/isp1301_omap.c (99%)
 rename drivers/usb/{otg = phy}/msm_otg.c (100%)
 rename drivers/usb/{otg = phy}/mv_otg.c (100%)
 rename drivers/usb/{otg = phy}/mv_otg.h (100%)
 rename drivers/usb/{otg = phy}/mxs-phy.c (100%)
 rename drivers/usb/{otg = phy}/nop-usb-xceiv.c (100%)
 rename drivers/usb/{otg = phy}/otg_fsm.c (99%)
 rename drivers/usb/{otg = phy}/otg_fsm.h (100%)
 rename drivers/usb/{otg = phy}/twl4030-usb.c (100%)
 rename drivers/usb/{otg = phy}/twl6030-usb.c (100%)
 rename drivers/usb/{otg = phy}/ulpi.c (100%)
 rename drivers/usb/{otg = phy}/ulpi_viewport.c (100%)

-- 
1.8.1.rc1.5.g7e0651a

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 06/10] usb: power: pda_power: check against CONFIG_USB_PHY

2013-03-07 Thread Felipe Balbi
CONFIG_USB_OTG_UTILS will be removed very
soon, so we should check CONFIG_USB_PHY
instead.

Signed-off-by: Felipe Balbi ba...@ti.com
---
 drivers/power/pda_power.c | 14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/power/pda_power.c b/drivers/power/pda_power.c
index 7df7c5f..0c52e2a 100644
--- a/drivers/power/pda_power.c
+++ b/drivers/power/pda_power.c
@@ -35,7 +35,7 @@ static struct timer_list supply_timer;
 static struct timer_list polling_timer;
 static int polling;
 
-#ifdef CONFIG_USB_OTG_UTILS
+#if IS_ENABLED(CONFIG_USB_PHY)
 static struct usb_phy *transceiver;
 static struct notifier_block otg_nb;
 #endif
@@ -218,7 +218,7 @@ static void polling_timer_func(unsigned long unused)
  jiffies + msecs_to_jiffies(pdata-polling_interval));
 }
 
-#ifdef CONFIG_USB_OTG_UTILS
+#if IS_ENABLED(CONFIG_USB_PHY)
 static int otg_is_usb_online(void)
 {
return (transceiver-last_event == USB_EVENT_VBUS ||
@@ -315,7 +315,7 @@ static int pda_power_probe(struct platform_device *pdev)
pda_psy_usb.num_supplicants = pdata-num_supplicants;
}
 
-#ifdef CONFIG_USB_OTG_UTILS
+#if IS_ENABLED(CONFIG_USB_PHY)
transceiver = usb_get_phy(USB_PHY_TYPE_USB2);
if (!IS_ERR_OR_NULL(transceiver)) {
if (!pdata-is_usb_online)
@@ -367,7 +367,7 @@ static int pda_power_probe(struct platform_device *pdev)
}
}
 
-#ifdef CONFIG_USB_OTG_UTILS
+#if IS_ENABLED(CONFIG_USB_PHY)
if (!IS_ERR_OR_NULL(transceiver)  pdata-use_otg_notifier) {
otg_nb.notifier_call = otg_handle_notification;
ret = usb_register_notifier(transceiver, otg_nb);
@@ -391,7 +391,7 @@ static int pda_power_probe(struct platform_device *pdev)
 
return 0;
 
-#ifdef CONFIG_USB_OTG_UTILS
+#if IS_ENABLED(CONFIG_USB_PHY)
 otg_reg_notifier_failed:
if (pdata-is_usb_online  usb_irq)
free_irq(usb_irq-start, pda_psy_usb);
@@ -402,7 +402,7 @@ usb_irq_failed:
 usb_supply_failed:
if (pdata-is_ac_online  ac_irq)
free_irq(ac_irq-start, pda_psy_ac);
-#ifdef CONFIG_USB_OTG_UTILS
+#if IS_ENABLED(CONFIG_USB_PHY)
if (!IS_ERR_OR_NULL(transceiver))
usb_put_phy(transceiver);
 #endif
@@ -437,7 +437,7 @@ static int pda_power_remove(struct platform_device *pdev)
power_supply_unregister(pda_psy_usb);
if (pdata-is_ac_online)
power_supply_unregister(pda_psy_ac);
-#ifdef CONFIG_USB_OTG_UTILS
+#if IS_ENABLED(CONFIG_USB_PHY)
if (!IS_ERR_OR_NULL(transceiver))
usb_put_phy(transceiver);
 #endif
-- 
1.8.1.rc1.5.g7e0651a

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 02/10] usb: otg: move usb_otg_state_string to usb-common.c

2013-03-07 Thread Felipe Balbi
otg.c only had a single function definition
which might make more sense to be placed in
usb-common.c. While doing that, we also delete
otg.c since it's now empty.

Signed-off-by: Felipe Balbi ba...@ti.com
---
 drivers/usb/otg/Makefile |  3 ---
 drivers/usb/otg/otg.c| 47 ---
 drivers/usb/usb-common.c | 26 ++
 include/linux/usb/otg.h  |  7 ---
 4 files changed, 26 insertions(+), 57 deletions(-)
 delete mode 100644 drivers/usb/otg/otg.c

diff --git a/drivers/usb/otg/Makefile b/drivers/usb/otg/Makefile
index a844b8d..6abc453 100644
--- a/drivers/usb/otg/Makefile
+++ b/drivers/usb/otg/Makefile
@@ -5,9 +5,6 @@
 ccflags-$(CONFIG_USB_DEBUG):= -DDEBUG
 ccflags-$(CONFIG_USB_GADGET_DEBUG) += -DDEBUG
 
-# infrastructure
-obj-$(CONFIG_USB_OTG_UTILS)+= otg.o
-
 # transceiver drivers
 obj-$(CONFIG_USB_GPIO_VBUS)+= gpio_vbus.o
 obj-$(CONFIG_ISP1301_OMAP) += isp1301_omap.o
diff --git a/drivers/usb/otg/otg.c b/drivers/usb/otg/otg.c
deleted file mode 100644
index fd9a4b7..000
--- a/drivers/usb/otg/otg.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * otg.c -- USB OTG utility code
- *
- * Copyright (C) 2004 Texas Instruments
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- */
-#include linux/export.h
-#include linux/usb/otg.h
-
-const char *usb_otg_state_string(enum usb_otg_state state)
-{
-   switch (state) {
-   case OTG_STATE_A_IDLE:
-   return a_idle;
-   case OTG_STATE_A_WAIT_VRISE:
-   return a_wait_vrise;
-   case OTG_STATE_A_WAIT_BCON:
-   return a_wait_bcon;
-   case OTG_STATE_A_HOST:
-   return a_host;
-   case OTG_STATE_A_SUSPEND:
-   return a_suspend;
-   case OTG_STATE_A_PERIPHERAL:
-   return a_peripheral;
-   case OTG_STATE_A_WAIT_VFALL:
-   return a_wait_vfall;
-   case OTG_STATE_A_VBUS_ERR:
-   return a_vbus_err;
-   case OTG_STATE_B_IDLE:
-   return b_idle;
-   case OTG_STATE_B_SRP_INIT:
-   return b_srp_init;
-   case OTG_STATE_B_PERIPHERAL:
-   return b_peripheral;
-   case OTG_STATE_B_WAIT_ACON:
-   return b_wait_acon;
-   case OTG_STATE_B_HOST:
-   return b_host;
-   default:
-   return UNDEFINED;
-   }
-}
-EXPORT_SYMBOL(usb_otg_state_string);
diff --git a/drivers/usb/usb-common.c b/drivers/usb/usb-common.c
index 070b681..0db0a91 100644
--- a/drivers/usb/usb-common.c
+++ b/drivers/usb/usb-common.c
@@ -14,6 +14,32 @@
 #include linux/kernel.h
 #include linux/module.h
 #include linux/usb/ch9.h
+#include linux/usb/otg.h
+
+const char *usb_otg_state_string(enum usb_otg_state state)
+{
+   static const char *const names[] = {
+   [OTG_STATE_A_IDLE] = a_idle,
+   [OTG_STATE_A_WAIT_VRISE] = a_wait_vrise,
+   [OTG_STATE_A_WAIT_BCON] = a_wait_bcon,
+   [OTG_STATE_A_HOST] = a_host,
+   [OTG_STATE_A_SUSPEND] = a_suspend,
+   [OTG_STATE_A_PERIPHERAL] = a_peripheral,
+   [OTG_STATE_A_WAIT_VFALL] = a_wait_vfall,
+   [OTG_STATE_A_VBUS_ERR] = a_vbus_err,
+   [OTG_STATE_B_IDLE] = b_idle,
+   [OTG_STATE_B_SRP_INIT] = b_srp_init,
+   [OTG_STATE_B_PERIPHERAL] = b_peripheral,
+   [OTG_STATE_B_WAIT_ACON] = b_wait_acon,
+   [OTG_STATE_B_HOST] = b_host,
+   };
+
+   if (state  0 || state = ARRAY_SIZE(names))
+   return UNDEFINED;
+
+   return names[state];
+}
+EXPORT_SYMBOL_GPL(usb_otg_state_string);
 
 const char *usb_speed_string(enum usb_device_speed speed)
 {
diff --git a/include/linux/usb/otg.h b/include/linux/usb/otg.h
index 9f9fb39..291e01b 100644
--- a/include/linux/usb/otg.h
+++ b/include/linux/usb/otg.h
@@ -36,14 +36,7 @@ struct usb_otg {
 
 };
 
-#ifdef CONFIG_USB_OTG_UTILS
 extern const char *usb_otg_state_string(enum usb_otg_state state);
-#else
-static inline const char *usb_otg_state_string(enum usb_otg_state state)
-{
-   return NULL;
-}
-#endif
 
 /* Context: can sleep */
 static inline int
-- 
1.8.1.rc1.5.g7e0651a

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 05/10] usb: phy: make it a menuconfig

2013-03-07 Thread Felipe Balbi
We already have a considerable amount of USB
PHY drivers, making it a menuconfig just
prevents us from adding too much churn to
USB's menuconfig.

While at that, also select USB_OTG_UTILS from
this new menuconfig just to keep backwards
compatibility until we manage to remove
that symbol.

Signed-off-by: Felipe Balbi ba...@ti.com
---
 drivers/Makefile |  2 +-
 drivers/usb/phy/Kconfig  | 17 -
 drivers/usb/phy/Makefile |  2 +-
 include/linux/usb/phy.h  |  2 +-
 4 files changed, 15 insertions(+), 8 deletions(-)

diff --git a/drivers/Makefile b/drivers/Makefile
index dce39a9..3c200a2 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -79,7 +79,7 @@ obj-$(CONFIG_ATA_OVER_ETH)+= block/aoe/
 obj-$(CONFIG_PARIDE)   += block/paride/
 obj-$(CONFIG_TC)   += tc/
 obj-$(CONFIG_UWB)  += uwb/
-obj-$(CONFIG_USB_OTG_UTILS)+= usb/
+obj-$(CONFIG_USB_PHY)  += usb/
 obj-$(CONFIG_USB)  += usb/
 obj-$(CONFIG_PCI)  += usb/
 obj-$(CONFIG_USB_GADGET)   += usb/
diff --git a/drivers/usb/phy/Kconfig b/drivers/usb/phy/Kconfig
index 32ce740..832cd69 100644
--- a/drivers/usb/phy/Kconfig
+++ b/drivers/usb/phy/Kconfig
@@ -1,8 +1,17 @@
 #
 # Physical Layer USB driver configuration
 #
-comment USB Physical Layer drivers
-   depends on USB || USB_GADGET
+menuconfig USB_PHY
+   tristate USB Physical Layer drivers
+   select USB_OTG_UTILS
+   help
+ USB controllers (those which are host, device or DRD) need a
+ device to handle the physical layer signalling, commonly called
+ a PHY.
+
+ The following drivers add support for such PHY devices.
+
+if USB_PHY
 
 config USB_OTG_UTILS
bool
@@ -10,8 +19,6 @@ config USB_OTG_UTILS
  Select this to make sure the build includes objects from
  the OTG infrastructure directory.
 
-if USB || USB_GADGET
-
 #
 # USB Transceiver Drivers
 #
@@ -206,4 +213,4 @@ config USB_ULPI_VIEWPORT
  Provides read/write operations to the ULPI phy register set for
  controllers with a viewport register (e.g. Chipidea/ARC controllers).
 
-endif # USB || OTG
+endif # USB_PHY
diff --git a/drivers/usb/phy/Makefile b/drivers/usb/phy/Makefile
index 34488ce..d10a8b3 100644
--- a/drivers/usb/phy/Makefile
+++ b/drivers/usb/phy/Makefile
@@ -4,7 +4,7 @@
 
 ccflags-$(CONFIG_USB_DEBUG) := -DDEBUG
 
-obj-$(CONFIG_USB_OTG_UTILS)+= phy.o
+obj-$(CONFIG_USB_PHY)  += phy.o
 
 # transceiver drivers, keep the list sorted
 
diff --git a/include/linux/usb/phy.h b/include/linux/usb/phy.h
index 15847cb..b001dc3 100644
--- a/include/linux/usb/phy.h
+++ b/include/linux/usb/phy.h
@@ -161,7 +161,7 @@ usb_phy_shutdown(struct usb_phy *x)
 }
 
 /* for usb host and peripheral controller drivers */
-#ifdef CONFIG_USB_OTG_UTILS
+#if IS_ENABLED(CONFIG_USB_PHY)
 extern struct usb_phy *usb_get_phy(enum usb_phy_type type);
 extern struct usb_phy *devm_usb_get_phy(struct device *dev,
enum usb_phy_type type);
-- 
1.8.1.rc1.5.g7e0651a

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 09/10] usb: ehci: tegra: check against CONFIG_USB_PHY

2013-03-07 Thread Felipe Balbi
CONFIG_USB_OTG_UTILS will be removed very
soon, so we should check CONFIG_USB_PHY
instead.

Signed-off-by: Felipe Balbi ba...@ti.com
---
 drivers/usb/host/ehci-tegra.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/usb/host/ehci-tegra.c b/drivers/usb/host/ehci-tegra.c
index 568aecc..fafbc81 100644
--- a/drivers/usb/host/ehci-tegra.c
+++ b/drivers/usb/host/ehci-tegra.c
@@ -768,7 +768,7 @@ static int tegra_ehci_probe(struct platform_device *pdev)
goto fail;
}
 
-#ifdef CONFIG_USB_OTG_UTILS
+#if IS_ENABLED(CONFIG_USB_PHY)
if (pdata-operating_mode == TEGRA_USB_OTG) {
tegra-transceiver =
devm_usb_get_phy(pdev-dev, USB_PHY_TYPE_USB2);
@@ -794,7 +794,7 @@ static int tegra_ehci_probe(struct platform_device *pdev)
return err;
 
 fail:
-#ifdef CONFIG_USB_OTG_UTILS
+#if IS_ENABLED(CONFIG_USB_PHY)
if (!IS_ERR_OR_NULL(tegra-transceiver))
otg_set_host(tegra-transceiver-otg, NULL);
 #endif
@@ -815,7 +815,7 @@ static int tegra_ehci_remove(struct platform_device *pdev)
pm_runtime_disable(pdev-dev);
pm_runtime_put_noidle(pdev-dev);
 
-#ifdef CONFIG_USB_OTG_UTILS
+#if IS_ENABLED(CONFIG_USB_PHY)
if (!IS_ERR_OR_NULL(tegra-transceiver))
otg_set_host(tegra-transceiver-otg, NULL);
 #endif
-- 
1.8.1.rc1.5.g7e0651a

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 10/10] usb: phy: remove CONFIG_USB_OTG_UTILS

2013-03-07 Thread Felipe Balbi
there are no more users of CONFIG_USB_OTG_UTILS
left in tree, we can remove it just fine.

Signed-off-by: Felipe Balbi ba...@ti.com
---
 drivers/usb/phy/Kconfig | 23 ---
 1 file changed, 23 deletions(-)

diff --git a/drivers/usb/phy/Kconfig b/drivers/usb/phy/Kconfig
index 832cd69..97de6de 100644
--- a/drivers/usb/phy/Kconfig
+++ b/drivers/usb/phy/Kconfig
@@ -3,7 +3,6 @@
 #
 menuconfig USB_PHY
tristate USB Physical Layer drivers
-   select USB_OTG_UTILS
help
  USB controllers (those which are host, device or DRD) need a
  device to handle the physical layer signalling, commonly called
@@ -13,19 +12,12 @@ menuconfig USB_PHY
 
 if USB_PHY
 
-config USB_OTG_UTILS
-   bool
-   help
- Select this to make sure the build includes objects from
- the OTG infrastructure directory.
-
 #
 # USB Transceiver Drivers
 #
 config AB8500_USB
tristate AB8500 USB Transceiver Driver
depends on AB8500_CORE
-   select USB_OTG_UTILS
help
  Enable this to support the USB OTG transceiver in AB8500 chip.
  This transceiver supports high and full speed devices plus,
@@ -35,14 +27,12 @@ config FSL_USB2_OTG
bool Freescale USB OTG Transceiver Driver
depends on USB_EHCI_FSL  USB_FSL_USB2  USB_SUSPEND
select USB_OTG
-   select USB_OTG_UTILS
help
  Enable this to support Freescale USB OTG transceiver.
 
 config ISP1301_OMAP
tristate Philips ISP1301 with OMAP OTG
depends on I2C  ARCH_OMAP_OTG
-   select USB_OTG_UTILS
help
  If you say yes here you get support for the Philips ISP1301
  USB-On-The-Go transceiver working with the OMAP OTG controller.
@@ -56,14 +46,12 @@ config ISP1301_OMAP
 config MV_U3D_PHY
bool Marvell USB 3.0 PHY controller Driver
depends on USB_MV_U3D
-   select USB_OTG_UTILS
help
  Enable this to support Marvell USB 3.0 phy controller for Marvell
  SoC.
 
 config NOP_USB_XCEIV
tristate NOP USB Transceiver Driver
-   select USB_OTG_UTILS
help
  This driver is to be used by all the usb transceiver which are either
  built-in with usb ip or which are autonomous and doesn't require any
@@ -81,7 +69,6 @@ config OMAP_CONTROL_USB
 config OMAP_USB2
tristate OMAP USB2 PHY Driver
depends on ARCH_OMAP2PLUS
-   select USB_OTG_UTILS
select OMAP_CONTROL_USB
help
  Enable this to support the transceiver that is part of SOC. This
@@ -91,7 +78,6 @@ config OMAP_USB2
 
 config OMAP_USB3
tristate OMAP USB3 PHY Driver
-   select USB_OTG_UTILS
select OMAP_CONTROL_USB
help
  Enable this to support the USB3 PHY that is part of SOC. This
@@ -102,7 +88,6 @@ config OMAP_USB3
 config SAMSUNG_USBPHY
bool Samsung USB PHY controller Driver
depends on USB_S3C_HSOTG || USB_EHCI_S5P || USB_OHCI_EXYNOS
-   select USB_OTG_UTILS
help
  Enable this to support Samsung USB phy controller for samsung
  SoCs.
@@ -110,7 +95,6 @@ config SAMSUNG_USBPHY
 config TWL4030_USB
tristate TWL4030 USB Transceiver Driver
depends on TWL4030_CORE  REGULATOR_TWL4030  USB_MUSB_OMAP2PLUS
-   select USB_OTG_UTILS
help
  Enable this to support the USB OTG transceiver on TWL4030
  family chips (including the TWL5030 and TPS659x0 devices).
@@ -120,7 +104,6 @@ config TWL4030_USB
 config TWL6030_USB
tristate TWL6030 USB Transceiver Driver
depends on TWL4030_CORE  OMAP_USB2  USB_MUSB_OMAP2PLUS
-   select USB_OTG_UTILS
help
  Enable this to support the USB OTG transceiver on TWL6030
  family chips. This TWL6030 transceiver has the VBUS and ID GND
@@ -132,7 +115,6 @@ config TWL6030_USB
 config USB_GPIO_VBUS
tristate GPIO based peripheral-only VBUS sensing 'transceiver'
depends on GENERIC_GPIO
-   select USB_OTG_UTILS
help
  Provides simple GPIO VBUS sensing for controllers with an
  internal transceiver via the usb_phy interface, and
@@ -154,7 +136,6 @@ config USB_ISP1301
 config USB_MSM_OTG
tristate OTG support for Qualcomm on-chip USB controller
depends on (USB || USB_GADGET)  ARCH_MSM
-   select USB_OTG_UTILS
help
  Enable this to support the USB OTG transceiver on MSM chips. It
  handles PHY initialization, clock management, and workarounds
@@ -168,7 +149,6 @@ config USB_MV_OTG
tristate Marvell USB OTG support
depends on USB_EHCI_MV  USB_MV_UDC  USB_SUSPEND
select USB_OTG
-   select USB_OTG_UTILS
help
  Say Y here if you want to build Marvell USB OTG transciever
  driver in kernel (including PXA and MMP series). This driver
@@ -180,7 +160,6 @@ config USB_MXS_PHY
tristate Freescale MXS USB PHY support
depends on ARCH_MXC || ARCH_MXS
   

[PATCH 04/10] usb: phy: move all PHY drivers to drivers/usb/phy/

2013-03-07 Thread Felipe Balbi
that's a much more reasonable location for
those drivers. It helps us saving drivers/usb/otg/
for when we actually start adding generic OTG
code.

Also completely delete drivers/usb/otg/ as there's
nothing left there.

Signed-off-by: Felipe Balbi ba...@ti.com
---
 drivers/usb/Kconfig  |   2 -
 drivers/usb/Makefile |   2 -
 drivers/usb/otg/Kconfig  | 141 --
 drivers/usb/otg/Makefile |  21 
 drivers/usb/phy/Kconfig  | 168 +++
 drivers/usb/phy/Makefile |  24 -
 drivers/usb/{otg = phy}/ab8500-usb.c|   0
 drivers/usb/{otg = phy}/fsl_otg.c   |   0
 drivers/usb/{otg = phy}/fsl_otg.h   |   0
 drivers/usb/{otg = phy}/gpio_vbus.c |   0
 drivers/usb/{otg = phy}/isp1301_omap.c  |   0
 drivers/usb/{otg = phy}/msm_otg.c   |   0
 drivers/usb/{otg = phy}/mv_otg.c|   0
 drivers/usb/{otg = phy}/mv_otg.h|   0
 drivers/usb/{otg = phy}/mxs-phy.c   |   0
 drivers/usb/{otg = phy}/nop-usb-xceiv.c |   0
 drivers/usb/{otg = phy}/otg_fsm.c   |   0
 drivers/usb/{otg = phy}/otg_fsm.h   |   0
 drivers/usb/{otg = phy}/twl4030-usb.c   |   0
 drivers/usb/{otg = phy}/twl6030-usb.c   |   0
 drivers/usb/{otg = phy}/ulpi.c  |   0
 drivers/usb/{otg = phy}/ulpi_viewport.c |   0
 22 files changed, 171 insertions(+), 187 deletions(-)
 delete mode 100644 drivers/usb/otg/Kconfig
 delete mode 100644 drivers/usb/otg/Makefile
 rename drivers/usb/{otg = phy}/ab8500-usb.c (100%)
 rename drivers/usb/{otg = phy}/fsl_otg.c (100%)
 rename drivers/usb/{otg = phy}/fsl_otg.h (100%)
 rename drivers/usb/{otg = phy}/gpio_vbus.c (100%)
 rename drivers/usb/{otg = phy}/isp1301_omap.c (100%)
 rename drivers/usb/{otg = phy}/msm_otg.c (100%)
 rename drivers/usb/{otg = phy}/mv_otg.c (100%)
 rename drivers/usb/{otg = phy}/mv_otg.h (100%)
 rename drivers/usb/{otg = phy}/mxs-phy.c (100%)
 rename drivers/usb/{otg = phy}/nop-usb-xceiv.c (100%)
 rename drivers/usb/{otg = phy}/otg_fsm.c (100%)
 rename drivers/usb/{otg = phy}/otg_fsm.h (100%)
 rename drivers/usb/{otg = phy}/twl4030-usb.c (100%)
 rename drivers/usb/{otg = phy}/twl6030-usb.c (100%)
 rename drivers/usb/{otg = phy}/ulpi.c (100%)
 rename drivers/usb/{otg = phy}/ulpi_viewport.c (100%)

diff --git a/drivers/usb/Kconfig b/drivers/usb/Kconfig
index 640ae6c..2c481b8 100644
--- a/drivers/usb/Kconfig
+++ b/drivers/usb/Kconfig
@@ -186,6 +186,4 @@ source drivers/usb/atm/Kconfig
 
 source drivers/usb/gadget/Kconfig
 
-source drivers/usb/otg/Kconfig
-
 endif # USB_SUPPORT
diff --git a/drivers/usb/Makefile b/drivers/usb/Makefile
index f5ed3d7..5aa98f0 100644
--- a/drivers/usb/Makefile
+++ b/drivers/usb/Makefile
@@ -6,8 +6,6 @@
 
 obj-$(CONFIG_USB)  += core/
 
-obj-$(CONFIG_USB_OTG_UTILS)+= otg/
-
 obj-$(CONFIG_USB_DWC3) += dwc3/
 
 obj-$(CONFIG_USB_MON)  += mon/
diff --git a/drivers/usb/otg/Kconfig b/drivers/usb/otg/Kconfig
deleted file mode 100644
index 37962c9..000
--- a/drivers/usb/otg/Kconfig
+++ /dev/null
@@ -1,141 +0,0 @@
-#
-# USB OTG infrastructure may be needed for peripheral-only, host-only,
-# or OTG-capable configurations when OTG transceivers or controllers
-# are used.
-#
-
-comment OTG and related infrastructure
-
-config USB_OTG_UTILS
-   bool
-   help
- Select this to make sure the build includes objects from
- the OTG infrastructure directory.
-
-if USB || USB_GADGET
-
-#
-# USB Transceiver Drivers
-#
-config USB_GPIO_VBUS
-   tristate GPIO based peripheral-only VBUS sensing 'transceiver'
-   depends on GENERIC_GPIO
-   select USB_OTG_UTILS
-   help
- Provides simple GPIO VBUS sensing for controllers with an
- internal transceiver via the usb_phy interface, and
- optionally control of a D+ pullup GPIO as well as a VBUS
- current limit regulator.
-
-config ISP1301_OMAP
-   tristate Philips ISP1301 with OMAP OTG
-   depends on I2C  ARCH_OMAP_OTG
-   select USB_OTG_UTILS
-   help
- If you say yes here you get support for the Philips ISP1301
- USB-On-The-Go transceiver working with the OMAP OTG controller.
- The ISP1301 is a full speed USB  transceiver which is used in
- products including H2, H3, and H4 development boards for Texas
- Instruments OMAP processors.
-
- This driver can also be built as a module.  If so, the module
- will be called isp1301_omap.
-
-config USB_ULPI
-   bool Generic ULPI Transceiver Driver
-   depends on ARM
-   select USB_OTG_UTILS
-   help
- Enable this to support ULPI connected USB OTG transceivers which
- are likely found on embedded boards.
-
-config USB_ULPI_VIEWPORT
-   bool
-   depends on USB_ULPI
-   help
- Provides read/write operations to the ULPI phy register set for
- controllers with a viewport register (e.g. 

[PATCH 07/10] usb: gadget: mv_udc_core: check against CONFIG_USB_PHY

2013-03-07 Thread Felipe Balbi
CONFIG_USB_OTG_UTILS will be removed very
soon, so we should check CONFIG_USB_PHY
instead.

Signed-off-by: Felipe Balbi ba...@ti.com
---
 drivers/usb/gadget/mv_udc_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/gadget/mv_udc_core.c b/drivers/usb/gadget/mv_udc_core.c
index d278e8f..d550b21 100644
--- a/drivers/usb/gadget/mv_udc_core.c
+++ b/drivers/usb/gadget/mv_udc_core.c
@@ -2127,7 +2127,7 @@ static int mv_udc_probe(struct platform_device *pdev)
 
udc-dev = pdev;
 
-#ifdef CONFIG_USB_OTG_UTILS
+#if IS_ENABLED(CONFIG_USB_PHY)
if (pdata-mode == MV_USB_MODE_OTG) {
udc-transceiver = devm_usb_get_phy(pdev-dev,
USB_PHY_TYPE_USB2);
-- 
1.8.1.rc1.5.g7e0651a

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 03/10] usb: phy: convert EXPORT_SYMBOL to EXPORT_SYMBOL_GPL

2013-03-07 Thread Felipe Balbi
we only want GPL users for our generic functions,
so let's switch over to EXPORT_SYMBOL_GPL.

Signed-off-by: Felipe Balbi ba...@ti.com
---
 drivers/usb/phy/phy.c | 20 ++--
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/usb/phy/phy.c b/drivers/usb/phy/phy.c
index bc1970c..f52c006 100644
--- a/drivers/usb/phy/phy.c
+++ b/drivers/usb/phy/phy.c
@@ -109,7 +109,7 @@ struct usb_phy *devm_usb_get_phy(struct device *dev, enum 
usb_phy_type type)
 
return phy;
 }
-EXPORT_SYMBOL(devm_usb_get_phy);
+EXPORT_SYMBOL_GPL(devm_usb_get_phy);
 
 /**
  * usb_get_phy - find the USB PHY
@@ -142,7 +142,7 @@ err0:
 
return phy;
 }
-EXPORT_SYMBOL(usb_get_phy);
+EXPORT_SYMBOL_GPL(usb_get_phy);
 
  /**
  * devm_usb_get_phy_by_phandle - find the USB PHY by phandle
@@ -206,7 +206,7 @@ err0:
 
return phy;
 }
-EXPORT_SYMBOL(devm_usb_get_phy_by_phandle);
+EXPORT_SYMBOL_GPL(devm_usb_get_phy_by_phandle);
 
 /**
  * usb_get_phy_dev - find the USB PHY
@@ -239,7 +239,7 @@ err0:
 
return phy;
 }
-EXPORT_SYMBOL(usb_get_phy_dev);
+EXPORT_SYMBOL_GPL(usb_get_phy_dev);
 
 /**
  * devm_usb_get_phy_dev - find the USB PHY using device ptr and index
@@ -269,7 +269,7 @@ struct usb_phy *devm_usb_get_phy_dev(struct device *dev, u8 
index)
 
return phy;
 }
-EXPORT_SYMBOL(devm_usb_get_phy_dev);
+EXPORT_SYMBOL_GPL(devm_usb_get_phy_dev);
 
 /**
  * devm_usb_put_phy - release the USB PHY
@@ -288,7 +288,7 @@ void devm_usb_put_phy(struct device *dev, struct usb_phy 
*phy)
r = devres_destroy(dev, devm_usb_phy_release, devm_usb_phy_match, phy);
dev_WARN_ONCE(dev, r, couldn't find PHY resource\n);
 }
-EXPORT_SYMBOL(devm_usb_put_phy);
+EXPORT_SYMBOL_GPL(devm_usb_put_phy);
 
 /**
  * usb_put_phy - release the USB PHY
@@ -307,7 +307,7 @@ void usb_put_phy(struct usb_phy *x)
module_put(owner);
}
 }
-EXPORT_SYMBOL(usb_put_phy);
+EXPORT_SYMBOL_GPL(usb_put_phy);
 
 /**
  * usb_add_phy - declare the USB PHY
@@ -347,7 +347,7 @@ out:
spin_unlock_irqrestore(phy_lock, flags);
return ret;
 }
-EXPORT_SYMBOL(usb_add_phy);
+EXPORT_SYMBOL_GPL(usb_add_phy);
 
 /**
  * usb_add_phy_dev - declare the USB PHY
@@ -377,7 +377,7 @@ int usb_add_phy_dev(struct usb_phy *x)
spin_unlock_irqrestore(phy_lock, flags);
return 0;
 }
-EXPORT_SYMBOL(usb_add_phy_dev);
+EXPORT_SYMBOL_GPL(usb_add_phy_dev);
 
 /**
  * usb_remove_phy - remove the OTG PHY
@@ -399,7 +399,7 @@ void usb_remove_phy(struct usb_phy *x)
}
spin_unlock_irqrestore(phy_lock, flags);
 }
-EXPORT_SYMBOL(usb_remove_phy);
+EXPORT_SYMBOL_GPL(usb_remove_phy);
 
 /**
  * usb_bind_phy - bind the phy and the controller that uses the phy
-- 
1.8.1.rc1.5.g7e0651a

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 01/10] usb: otg: prefix otg_state_string with usb_

2013-03-07 Thread Felipe Balbi
all other functions under drivers/usb/ start
with usb_, let's do the same thing.

This patch is in preparation for moving otg_state_string
to usb-common.c and deleting otg.c completely.

Signed-off-by: Felipe Balbi ba...@ti.com
---
 drivers/usb/musb/am35x.c|  8 
 drivers/usb/musb/blackfin.c |  6 +++---
 drivers/usb/musb/da8xx.c|  8 
 drivers/usb/musb/davinci.c  |  4 ++--
 drivers/usb/musb/musb_core.c| 39 ---
 drivers/usb/musb/musb_dsps.c|  8 
 drivers/usb/musb/musb_gadget.c  |  8 
 drivers/usb/musb/musb_host.c|  2 +-
 drivers/usb/musb/musb_virthub.c |  4 ++--
 drivers/usb/musb/omap2430.c |  6 +++---
 drivers/usb/musb/tusb6010.c | 14 +++---
 drivers/usb/otg/fsl_otg.c   |  2 +-
 drivers/usb/otg/isp1301_omap.c  |  6 +++---
 drivers/usb/otg/otg.c   |  4 ++--
 drivers/usb/otg/otg_fsm.c   |  2 +-
 include/linux/usb/otg.h |  4 ++--
 16 files changed, 63 insertions(+), 62 deletions(-)

diff --git a/drivers/usb/musb/am35x.c b/drivers/usb/musb/am35x.c
index 59eea21..2231850 100644
--- a/drivers/usb/musb/am35x.c
+++ b/drivers/usb/musb/am35x.c
@@ -149,7 +149,7 @@ static void otg_timer(unsigned long _musb)
 */
devctl = musb_readb(mregs, MUSB_DEVCTL);
dev_dbg(musb-controller, Poll devctl %02x (%s)\n, devctl,
-   otg_state_string(musb-xceiv-state));
+   usb_otg_state_string(musb-xceiv-state));
 
spin_lock_irqsave(musb-lock, flags);
switch (musb-xceiv-state) {
@@ -195,7 +195,7 @@ static void am35x_musb_try_idle(struct musb *musb, unsigned 
long timeout)
if (musb-is_active || (musb-a_wait_bcon == 0 
musb-xceiv-state == OTG_STATE_A_WAIT_BCON)) {
dev_dbg(musb-controller, %s active, deleting timer\n,
-   otg_state_string(musb-xceiv-state));
+   usb_otg_state_string(musb-xceiv-state));
del_timer(otg_workaround);
last_timer = jiffies;
return;
@@ -208,7 +208,7 @@ static void am35x_musb_try_idle(struct musb *musb, unsigned 
long timeout)
last_timer = timeout;
 
dev_dbg(musb-controller, %s inactive, starting idle timer for %u 
ms\n,
-   otg_state_string(musb-xceiv-state),
+   usb_otg_state_string(musb-xceiv-state),
jiffies_to_msecs(timeout - jiffies));
mod_timer(otg_workaround, timeout);
 }
@@ -298,7 +298,7 @@ static irqreturn_t am35x_musb_interrupt(int irq, void *hci)
/* NOTE: this must complete power-on within 100 ms. */
dev_dbg(musb-controller, VBUS %s (%s)%s, devctl %02x\n,
drvvbus ? on : off,
-   otg_state_string(musb-xceiv-state),
+   usb_otg_state_string(musb-xceiv-state),
err ?  ERROR : ,
devctl);
ret = IRQ_HANDLED;
diff --git a/drivers/usb/musb/blackfin.c b/drivers/usb/musb/blackfin.c
index dbb31b3..5e63b16 100644
--- a/drivers/usb/musb/blackfin.c
+++ b/drivers/usb/musb/blackfin.c
@@ -280,13 +280,13 @@ static void musb_conn_timer_handler(unsigned long _musb)
break;
default:
dev_dbg(musb-controller, %s state not handled\n,
-   otg_state_string(musb-xceiv-state));
+   usb_otg_state_string(musb-xceiv-state));
break;
}
spin_unlock_irqrestore(musb-lock, flags);
 
dev_dbg(musb-controller, state is %s\n,
-   otg_state_string(musb-xceiv-state));
+   usb_otg_state_string(musb-xceiv-state));
 }
 
 static void bfin_musb_enable(struct musb *musb)
@@ -307,7 +307,7 @@ static void bfin_musb_set_vbus(struct musb *musb, int is_on)
 
dev_dbg(musb-controller, VBUS %s, devctl %02x 
/* otg %3x conf %08x prcm %08x */ \n,
-   otg_state_string(musb-xceiv-state),
+   usb_otg_state_string(musb-xceiv-state),
musb_readb(musb-mregs, MUSB_DEVCTL));
 }
 
diff --git a/drivers/usb/musb/da8xx.c b/drivers/usb/musb/da8xx.c
index 7c71769d..ea7e591 100644
--- a/drivers/usb/musb/da8xx.c
+++ b/drivers/usb/musb/da8xx.c
@@ -198,7 +198,7 @@ static void otg_timer(unsigned long _musb)
 */
devctl = musb_readb(mregs, MUSB_DEVCTL);
dev_dbg(musb-controller, Poll devctl %02x (%s)\n, devctl,
-   otg_state_string(musb-xceiv-state));
+   usb_otg_state_string(musb-xceiv-state));
 
spin_lock_irqsave(musb-lock, flags);
switch (musb-xceiv-state) {
@@ -267,7 +267,7 @@ static void da8xx_musb_try_idle(struct musb *musb, unsigned 
long timeout)
if (musb-is_active || (musb-a_wait_bcon == 0 
musb-xceiv-state == OTG_STATE_A_WAIT_BCON)) {

[PATCH 08/10] usb: ehci: marvel: check against CONFIG_USB_PHY

2013-03-07 Thread Felipe Balbi
CONFIG_USB_OTG_UTILS will be removed very
soon, so we should check CONFIG_USB_PHY
instead.

Signed-off-by: Felipe Balbi ba...@ti.com
---
 drivers/usb/host/ehci-mv.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/host/ehci-mv.c b/drivers/usb/host/ehci-mv.c
index 3065809..9751823 100644
--- a/drivers/usb/host/ehci-mv.c
+++ b/drivers/usb/host/ehci-mv.c
@@ -240,7 +240,7 @@ static int mv_ehci_probe(struct platform_device *pdev)
 
ehci_mv-mode = pdata-mode;
if (ehci_mv-mode == MV_USB_MODE_OTG) {
-#ifdef CONFIG_USB_OTG_UTILS
+#if IS_ENABLED(CONFIG_USB_PHY)
ehci_mv-otg = devm_usb_get_phy(pdev-dev, USB_PHY_TYPE_USB2);
if (IS_ERR_OR_NULL(ehci_mv-otg)) {
dev_err(pdev-dev,
@@ -260,7 +260,7 @@ static int mv_ehci_probe(struct platform_device *pdev)
mv_ehci_disable(ehci_mv);
 #else
dev_info(pdev-dev, MV_USB_MODE_OTG 
-must have CONFIG_USB_OTG_UTILS enabled\n);
+must have CONFIG_USB_PHY enabled\n);
goto err_disable_clk;
 #endif
} else {
-- 
1.8.1.rc1.5.g7e0651a

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 3/3] driver: net: ethernet: cpsw: implement interrupt pacing via ethtool

2013-03-07 Thread Mugunthan V N
This patch implements support for interrupt pacing block of CPSW via ethtool

Signed-off-by: Mugunthan V N mugunthan...@ti.com
---
 drivers/net/ethernet/ti/cpsw.c |   95 
 1 file changed, 95 insertions(+)

diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
index fa91eec..da7276d 100644
--- a/drivers/net/ethernet/ti/cpsw.c
+++ b/drivers/net/ethernet/ti/cpsw.c
@@ -126,6 +126,13 @@ do {   
\
 #define CPSW_FIFO_DUAL_MAC_MODE(1  15)
 #define CPSW_FIFO_RATE_LIMIT_MODE  (2  15)
 
+#define CPSW_INTPACEEN (0x3f  16)
+#define CPSW_INTPRESCALE_MASK  (0x7FF  0)
+#define CPSW_CMINTMAX_CNT  63
+#define CPSW_CMINTMIN_CNT  2
+#define CPSW_CMINTMAX_INTVL(1000 / CPSW_CMINTMIN_CNT)
+#define CPSW_CMINTMIN_INTVL((1000 / CPSW_CMINTMAX_CNT) + 1)
+
 #define cpsw_enable_irq(priv)  \
do {\
u32 i;  \
@@ -160,6 +167,15 @@ struct cpsw_wr_regs {
u32 rx_en;
u32 tx_en;
u32 misc_en;
+   u32 mem_allign1[8];
+   u32 rx_thresh_stat;
+   u32 rx_stat;
+   u32 tx_stat;
+   u32 misc_stat;
+   u32 mem_allign2[8];
+   u32 rx_imax;
+   u32 tx_imax;
+
 };
 
 struct cpsw_ss_regs {
@@ -314,6 +330,8 @@ struct cpsw_priv {
struct cpsw_host_regs __iomem   *host_port_regs;
u32 msg_enable;
u32 version;
+   u32 coal_intvl;
+   u32 bus_freq_mhz;
struct net_device_stats stats;
int rx_packet_max;
int host_port;
@@ -612,6 +630,68 @@ static void cpsw_adjust_link(struct net_device *ndev)
}
 }
 
+static int cpsw_get_coalesce(struct net_device *ndev,
+   struct ethtool_coalesce *coal)
+{
+   struct cpsw_priv *priv = netdev_priv(ndev);
+
+   coal-rx_coalesce_usecs = priv-coal_intvl;
+   return 0;
+}
+
+static int cpsw_set_coalesce(struct net_device *ndev,
+   struct ethtool_coalesce *coal)
+{
+   struct cpsw_priv *priv = netdev_priv(ndev);
+   u32 int_ctrl;
+   u32 num_interrupts = 0;
+   u32 prescale = 0;
+   u32 addnl_dvdr = 1;
+   u32 coal_intvl = 0;
+
+   if (!coal-rx_coalesce_usecs)
+   return -EINVAL;
+
+   coal_intvl = coal-rx_coalesce_usecs;
+
+   int_ctrl =  readl(priv-wr_regs-int_control);
+   prescale = priv-bus_freq_mhz * 4;
+
+   if (coal_intvl  CPSW_CMINTMIN_INTVL)
+   coal_intvl = CPSW_CMINTMIN_INTVL;
+
+   if (coal_intvl  CPSW_CMINTMAX_INTVL) {
+   /* Interrupt pacer works with 4us Pulse, we can
+* throttle further by dilating the 4us pulse.
+*/
+   addnl_dvdr = CPSW_INTPRESCALE_MASK / prescale;
+
+   if (addnl_dvdr  1) {
+   prescale *= addnl_dvdr;
+   if (coal_intvl  (CPSW_CMINTMAX_INTVL * addnl_dvdr))
+   coal_intvl = (CPSW_CMINTMAX_INTVL
+   * addnl_dvdr);
+   } else {
+   addnl_dvdr = 1;
+   coal_intvl = CPSW_CMINTMAX_INTVL;
+   }
+   }
+
+   num_interrupts = (1000 * addnl_dvdr) / coal_intvl;
+   writel(num_interrupts, priv-wr_regs-rx_imax);
+   writel(num_interrupts, priv-wr_regs-tx_imax);
+
+   int_ctrl |= CPSW_INTPACEEN;
+   int_ctrl = (~CPSW_INTPRESCALE_MASK);
+   int_ctrl |= (prescale  CPSW_INTPRESCALE_MASK);
+   writel(int_ctrl, priv-wr_regs-int_control);
+
+   cpsw_notice(priv, timer, Set coalesce to %d usecs.\n, coal_intvl);
+   priv-coal_intvl = coal_intvl;
+
+   return 0;
+}
+
 static inline int __show_stat(char *buf, int maxlen, const char *name, u32 val)
 {
static char *leader = ;
@@ -834,6 +914,14 @@ static int cpsw_ndo_open(struct net_device *ndev)
cpsw_info(priv, ifup, submitted %d rx descriptors\n, i);
}
 
+   /* Enable Interrupt pacing if configured */
+   if (priv-coal_intvl != 0) {
+   struct ethtool_coalesce coal;
+
+   coal.rx_coalesce_usecs = (priv-coal_intvl  4);
+   cpsw_set_coalesce(ndev, coal);
+   }
+
cpdma_ctlr_start(priv-dma);
cpsw_intr_enable(priv);
napi_enable(priv-napi);
@@ -1279,6 +1367,8 @@ static const struct ethtool_ops cpsw_ethtool_ops = {
.get_ts_info= cpsw_get_ts_info,
.get_settings   = cpsw_get_settings,
.set_settings   = cpsw_set_settings,
+   .get_coalesce   = cpsw_get_coalesce,
+   .set_coalesce   = cpsw_set_coalesce,
 };
 
 static void 

[PATCH 0/3] cpsw interrupt pacing and get/set phy setting implementation

2013-03-07 Thread Mugunthan V N
This patch serires implements the following features in CPSW driver
* get/set phy link settings
* interrupt pacing

Mugunthan V N (3):
  driver: net: ethernet: cpsw: implement ethtool get/set phy setting
  arm: dts: am33xx: add default ethtool slave to cpsw node
  driver: net: ethernet: cpsw: implement interrupt pacing via ethtool

 Documentation/devicetree/bindings/net/cpsw.txt |3 +
 arch/arm/boot/dts/am33xx.dtsi  |1 +
 drivers/net/ethernet/ti/cpsw.c |  127 
 include/linux/platform_data/cpsw.h |1 +
 4 files changed, 132 insertions(+)

-- 
1.7.9.5

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 2/3] arm: dts: am33xx: add default ethtool slave to cpsw node

2013-03-07 Thread Mugunthan V N
Signed-off-by: Mugunthan V N mugunthan...@ti.com
---
 arch/arm/boot/dts/am33xx.dtsi |1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
index 0957645..f8c83a1 100644
--- a/arch/arm/boot/dts/am33xx.dtsi
+++ b/arch/arm/boot/dts/am33xx.dtsi
@@ -352,6 +352,7 @@
cpts_active_slave = 0;
cpts_clock_mult = 0x8000;
cpts_clock_shift = 29;
+   ethtool-active-slave = 0;
reg = 0x4a10 0x800
   0x4a101200 0x100;
#address-cells = 1;
-- 
1.7.9.5

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 1/3] driver: net: ethernet: cpsw: implement ethtool get/set phy setting

2013-03-07 Thread Mugunthan V N
This patch implements get/set of the phy settings via ethtool apis

Signed-off-by: Mugunthan V N mugunthan...@ti.com
---
 Documentation/devicetree/bindings/net/cpsw.txt |3 +++
 drivers/net/ethernet/ti/cpsw.c |   32 
 include/linux/platform_data/cpsw.h |1 +
 3 files changed, 36 insertions(+)

diff --git a/Documentation/devicetree/bindings/net/cpsw.txt 
b/Documentation/devicetree/bindings/net/cpsw.txt
index ecfdf75..8d61300 100644
--- a/Documentation/devicetree/bindings/net/cpsw.txt
+++ b/Documentation/devicetree/bindings/net/cpsw.txt
@@ -20,6 +20,7 @@ Required properties:
 - cpts_clock_shift : Denominator to convert input clock ticks into 
nanoseconds
 - phy_id   : Specifies slave phy id
 - mac-address  : Specifies slave MAC address
+- ethtool-active-slave : Specifies the slave to use for ethtool command
 
 Optional properties:
 - ti,hwmods: Must be cpgmac0
@@ -50,6 +51,7 @@ Examples:
cpts_active_slave = 0;
cpts_clock_mult = 0x8000;
cpts_clock_shift = 29;
+   ethtool-active-slave = 0;
cpsw_emac0: slave@0 {
phy_id = davinci_mdio, 0;
/* Filled in by U-Boot */
@@ -76,6 +78,7 @@ Examples:
cpts_active_slave = 0;
cpts_clock_mult = 0x8000;
cpts_clock_shift = 29;
+   ethtool-active-slave = 0;
cpsw_emac0: slave@0 {
phy_id = davinci_mdio, 0;
/* Filled in by U-Boot */
diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
index 01ffbc4..fa91eec 100644
--- a/drivers/net/ethernet/ti/cpsw.c
+++ b/drivers/net/ethernet/ti/cpsw.c
@@ -1244,12 +1244,41 @@ static int cpsw_get_ts_info(struct net_device *ndev,
return 0;
 }
 
+#define cpsw_slave_phy_index(priv) \
+   ((priv-data.dual_emac) ? priv-emac_port : \
+   priv-data.ethtool_active_slave)
+
+static int cpsw_get_settings(struct net_device *ndev,
+struct ethtool_cmd *ecmd)
+{
+   struct cpsw_priv *priv = netdev_priv(ndev);
+   int slave_no = cpsw_slave_phy_index(priv);
+
+   if (priv-slaves[slave_no].phy)
+   return phy_ethtool_gset(priv-slaves[slave_no].phy, ecmd);
+   else
+   return -EOPNOTSUPP;
+}
+
+static int cpsw_set_settings(struct net_device *ndev, struct ethtool_cmd *ecmd)
+{
+   struct cpsw_priv *priv = netdev_priv(ndev);
+   int slave_no = cpsw_slave_phy_index(priv);
+
+   if (priv-slaves[slave_no].phy)
+   return phy_ethtool_sset(priv-slaves[slave_no].phy, ecmd);
+   else
+   return -EOPNOTSUPP;
+}
+
 static const struct ethtool_ops cpsw_ethtool_ops = {
.get_drvinfo= cpsw_get_drvinfo,
.get_msglevel   = cpsw_get_msglevel,
.set_msglevel   = cpsw_set_msglevel,
.get_link   = ethtool_op_get_link,
.get_ts_info= cpsw_get_ts_info,
+   .get_settings   = cpsw_get_settings,
+   .set_settings   = cpsw_set_settings,
 };
 
 static void cpsw_slave_init(struct cpsw_slave *slave, struct cpsw_priv *priv,
@@ -1346,6 +1375,9 @@ static int cpsw_probe_dt(struct cpsw_platform_data *data,
if (!of_property_read_u32(node, dual_emac, prop))
data-dual_emac = prop;
 
+   if (!of_property_read_u32(node, ethtool-active-slave, prop))
+   data-ethtool_active_slave = prop;
+
/*
 * Populate all the child nodes here...
 */
diff --git a/include/linux/platform_data/cpsw.h 
b/include/linux/platform_data/cpsw.h
index 798fb80..e87e5cb 100644
--- a/include/linux/platform_data/cpsw.h
+++ b/include/linux/platform_data/cpsw.h
@@ -39,6 +39,7 @@ struct cpsw_platform_data {
u32 mac_control;/* Mac control register */
u16 default_vlan;   /* Def VLAN for ALE lookup in VLAN aware mode*/
booldual_emac;  /* Enable Dual EMAC mode */
+   u32 ethtool_active_slave; /* ethtool slave */
 };
 
 #endif /* __CPSW_H__ */
-- 
1.7.9.5

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 0/5] ASoC: OMAP2+: Update Audio IP with sDMA binding for DT boot

2013-03-07 Thread Sebastien Guiriec
This patch serie is converting OMAP Audio IPs in order to use OMAP sDMA DT
binding in case of DT boot on OMAP2+ platforms.

It is depending on the next patches:

[1] http://www.spinics.net/lists/arm-kernel/msg227836.html
[2] http://www.mail-archive.com/linux-omap@vger.kernel.org/msg84668.html

It has been tested on:
- OMAP5 (sEVM/panda)in DT boot (McPDM/DMIC).
- OMAP4 (SDP4430/Panda) in both DT/non DT boot (McPDM/DMIC)
- OMAP3 (Beagle XM) in both DT/non DT boot (McBSP)

Sebastien Guiriec (5):
  ASoC: omap-pcm: Move to generic DMA for DT binding
  ASoC: omap-dmic: Update driver for DMA DT binding.
  ASoC: omap-mcpdm: Update driver for DMA DT binding.
  ASoC: omap-mcbsp:Update driver for DMA DT binding.
  ARM: dts: OMAP2+: Add SDMA Audio IPs bindings

 arch/arm/boot/dts/omap2420.dtsi |6 ++
 arch/arm/boot/dts/omap2430.dtsi |   15 +++
 arch/arm/boot/dts/omap3.dtsi|   15 +++
 arch/arm/boot/dts/omap4.dtsi|   17 +
 arch/arm/boot/dts/omap5.dtsi|   14 ++
 sound/soc/omap/mcbsp.c  |   26 --
 sound/soc/omap/omap-dmic.c  |   15 +--
 sound/soc/omap/omap-mcpdm.c |   22 ++
 sound/soc/omap/omap-pcm.c   |   12 ++--
 sound/soc/omap/omap-pcm.h   |1 +
 10 files changed, 117 insertions(+), 26 deletions(-)

-- 
1.7.10.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 1/5] ASoC: omap-pcm: Move to generic DMA for DT binding

2013-03-07 Thread Sebastien Guiriec
Update in order to use OMAP DMA DT binding for OMAP2+. In case
of DT boot snd_dmaengine_generic_pcm_open function is used.

Signed-off-by: Sebastien Guiriec s-guir...@ti.com
---
 sound/soc/omap/omap-pcm.c |   12 ++--
 sound/soc/omap/omap-pcm.h |1 +
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/sound/soc/omap/omap-pcm.c b/sound/soc/omap/omap-pcm.c
index c722c2e..df01a95 100644
--- a/sound/soc/omap/omap-pcm.c
+++ b/sound/soc/omap/omap-pcm.c
@@ -176,13 +176,21 @@ static int omap_pcm_open(struct snd_pcm_substream 
*substream)
 {
struct snd_soc_pcm_runtime *rtd = substream-private_data;
struct omap_pcm_dma_data *dma_data;
+   int ret;
 
snd_soc_set_runtime_hwparams(substream, omap_pcm_hardware);
 
dma_data = snd_soc_dai_get_dma_data(rtd-cpu_dai, substream);
 
-   return snd_dmaengine_pcm_open(substream, omap_dma_filter_fn,
- dma_data-dma_req);
+   if (rtd-cpu_dai-dev-of_node)
+   ret = snd_dmaengine_generic_pcm_open(substream,
+rtd-cpu_dai-dev,
+dma_data-dma_name);
+   else
+   ret = snd_dmaengine_pcm_open(substream, omap_dma_filter_fn,
+dma_data-dma_req);
+
+   return ret;
 }
 
 static int omap_pcm_close(struct snd_pcm_substream *substream)
diff --git a/sound/soc/omap/omap-pcm.h b/sound/soc/omap/omap-pcm.h
index cabe74c..06faa38 100644
--- a/sound/soc/omap/omap-pcm.h
+++ b/sound/soc/omap/omap-pcm.h
@@ -29,6 +29,7 @@ struct snd_pcm_substream;
 
 struct omap_pcm_dma_data {
char*name;  /* stream identifier */
+   char*dma_name;  /* DMA request name */
int dma_req;/* DMA request line */
unsigned long   port_addr;  /* transmit/receive register */
void (*set_threshold)(struct snd_pcm_substream *substream);
-- 
1.7.10.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 3/5] ASoC: omap-mcpdm: Update driver for DMA DT binding.

2013-03-07 Thread Sebastien Guiriec
Update the driver in order to use OMAP DMA DT binding instead of
hwmod data for DT boot.

Signed-off-by: Sebastien Guiriec s-guir...@ti.com
---
 sound/soc/omap/omap-mcpdm.c |   22 ++
 1 file changed, 14 insertions(+), 8 deletions(-)

diff --git a/sound/soc/omap/omap-mcpdm.c b/sound/soc/omap/omap-mcpdm.c
index 5ca11bd..f41bac8 100644
--- a/sound/soc/omap/omap-mcpdm.c
+++ b/sound/soc/omap/omap-mcpdm.c
@@ -71,9 +71,11 @@ struct omap_mcpdm {
 static struct omap_pcm_dma_data omap_mcpdm_dai_dma_params[] = {
{
.name = Audio playback,
+   .dma_name = dn_link,
},
{
.name = Audio capture,
+   .dma_name = up_link,
},
 };
 
@@ -449,17 +451,21 @@ static int asoc_mcpdm_probe(struct platform_device *pdev)
omap_mcpdm_dai_dma_params[0].port_addr = res-start + MCPDM_REG_DN_DATA;
omap_mcpdm_dai_dma_params[1].port_addr = res-start + MCPDM_REG_UP_DATA;
 
-   res = platform_get_resource_byname(pdev, IORESOURCE_DMA, dn_link);
-   if (!res)
-   return -ENODEV;
+   if (!pdev-dev.of_node) {
+   res = platform_get_resource_byname(pdev, IORESOURCE_DMA,
+  dn_link);
+   if (!res)
+   return -ENODEV;
 
-   omap_mcpdm_dai_dma_params[0].dma_req = res-start;
+   omap_mcpdm_dai_dma_params[0].dma_req = res-start;
 
-   res = platform_get_resource_byname(pdev, IORESOURCE_DMA, up_link);
-   if (!res)
-   return -ENODEV;
+   res = platform_get_resource_byname(pdev, IORESOURCE_DMA,
+  up_link);
+   if (!res)
+   return -ENODEV;
 
-   omap_mcpdm_dai_dma_params[1].dma_req = res-start;
+   omap_mcpdm_dai_dma_params[1].dma_req = res-start;
+   }
 
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, mpu);
if (res == NULL)
-- 
1.7.10.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 2/5] ASoC: omap-dmic: Update driver for DMA DT binding.

2013-03-07 Thread Sebastien Guiriec
Update the driver in order to use OMAP DMA DT binding instead of
hwmod data for DT boot.

Signed-off-by: Sebastien Guiriec s-guir...@ti.com
---
 sound/soc/omap/omap-dmic.c |   15 +--
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/sound/soc/omap/omap-dmic.c b/sound/soc/omap/omap-dmic.c
index ba49ccd..8695b32 100644
--- a/sound/soc/omap/omap-dmic.c
+++ b/sound/soc/omap/omap-dmic.c
@@ -62,6 +62,7 @@ struct omap_dmic {
  */
 static struct omap_pcm_dma_data omap_dmic_dai_dma_params = {
.name   = DMIC capture,
+   .dma_name   = up_link,
 };
 
 static inline void omap_dmic_write(struct omap_dmic *dmic, u16 reg, u32 val)
@@ -478,13 +479,15 @@ static int asoc_dmic_probe(struct platform_device *pdev)
}
omap_dmic_dai_dma_params.port_addr = res-start + OMAP_DMIC_DATA_REG;
 
-   res = platform_get_resource(pdev, IORESOURCE_DMA, 0);
-   if (!res) {
-   dev_err(dmic-dev, invalid dma resource\n);
-   ret = -ENODEV;
-   goto err_put_clk;
+   if (!pdev-dev.of_node) {
+   res = platform_get_resource(pdev, IORESOURCE_DMA, 0);
+   if (!res) {
+   dev_err(dmic-dev, invalid dma resource\n);
+   ret = -ENODEV;
+   goto err_put_clk;
+   }
+   omap_dmic_dai_dma_params.dma_req = res-start;
}
-   omap_dmic_dai_dma_params.dma_req = res-start;
 
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, mpu);
if (!res) {
-- 
1.7.10.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 4/5] ASoC: omap-mcbsp:Update driver for DMA DT binding.

2013-03-07 Thread Sebastien Guiriec
Update the driver in order to use OMAP DMA DT binding instead of
hwmod data for DT boot.

Signed-off-by: Sebastien Guiriec s-guir...@ti.com
---
 sound/soc/omap/mcbsp.c |   26 --
 1 file changed, 16 insertions(+), 10 deletions(-)

diff --git a/sound/soc/omap/mcbsp.c b/sound/soc/omap/mcbsp.c
index 285c836..16936493 100644
--- a/sound/soc/omap/mcbsp.c
+++ b/sound/soc/omap/mcbsp.c
@@ -1012,24 +1012,30 @@ int omap_mcbsp_init(struct platform_device *pdev)
}
}
 
-   res = platform_get_resource_byname(pdev, IORESOURCE_DMA, rx);
-   if (!res) {
-   dev_err(pdev-dev, invalid rx DMA channel\n);
-   return -ENODEV;
+   if (!pdev-dev.of_node) {
+   res = platform_get_resource_byname(pdev, IORESOURCE_DMA, rx);
+   if (!res) {
+   dev_err(pdev-dev, invalid rx DMA channel\n);
+   return -ENODEV;
+   }
+   mcbsp-dma_data[1].dma_req = res-start;
}
/* RX DMA request number, and port address configuration */
mcbsp-dma_data[1].name = Audio Capture;
-   mcbsp-dma_data[1].dma_req = res-start;
+   mcbsp-dma_data[1].dma_name = rx;
mcbsp-dma_data[1].port_addr = omap_mcbsp_dma_reg_params(mcbsp, 1);
 
-   res = platform_get_resource_byname(pdev, IORESOURCE_DMA, tx);
-   if (!res) {
-   dev_err(pdev-dev, invalid tx DMA channel\n);
-   return -ENODEV;
+   if (!pdev-dev.of_node) {
+   res = platform_get_resource_byname(pdev, IORESOURCE_DMA, tx);
+   if (!res) {
+   dev_err(pdev-dev, invalid tx DMA channel\n);
+   return -ENODEV;
+   }
+   mcbsp-dma_data[0].dma_req = res-start;
}
/* TX DMA request number, and port address configuration */
mcbsp-dma_data[0].name = Audio Playback;
-   mcbsp-dma_data[0].dma_req = res-start;
+   mcbsp-dma_data[0].dma_name = tx;
mcbsp-dma_data[0].port_addr = omap_mcbsp_dma_reg_params(mcbsp, 0);
 
mcbsp-fclk = clk_get(pdev-dev, fck);
-- 
1.7.10.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 5/5] ARM: dts: OMAP2+: Add SDMA Audio IPs bindings

2013-03-07 Thread Sebastien Guiriec
Populate DMA client information for McBSP DMIC and McPDM periperhal on
OMAP2+ devices.

Signed-off-by: Sebastien Guiriec s-guir...@ti.com
---
 arch/arm/boot/dts/omap2420.dtsi |6 ++
 arch/arm/boot/dts/omap2430.dtsi |   15 +++
 arch/arm/boot/dts/omap3.dtsi|   15 +++
 arch/arm/boot/dts/omap4.dtsi|   17 +
 arch/arm/boot/dts/omap5.dtsi|   14 ++
 5 files changed, 67 insertions(+)

diff --git a/arch/arm/boot/dts/omap2420.dtsi b/arch/arm/boot/dts/omap2420.dtsi
index af65609..45930f2 100644
--- a/arch/arm/boot/dts/omap2420.dtsi
+++ b/arch/arm/boot/dts/omap2420.dtsi
@@ -37,6 +37,9 @@
 60; /* RX interrupt */
interrupt-names = tx, rx;
ti,hwmods = mcbsp1;
+   dmas = sdma 31,
+  sdma 32;
+   dma-names = tx, rx;
};
 
mcbsp2: mcbsp@48076000 {
@@ -47,6 +50,9 @@
 63; /* RX interrupt */
interrupt-names = tx, rx;
ti,hwmods = mcbsp2;
+   dmas = sdma 33,
+  sdma 34;
+   dma-names = tx, rx;
};
 
timer1: timer@48028000 {
diff --git a/arch/arm/boot/dts/omap2430.dtsi b/arch/arm/boot/dts/omap2430.dtsi
index c392445..cfe7ed9 100644
--- a/arch/arm/boot/dts/omap2430.dtsi
+++ b/arch/arm/boot/dts/omap2430.dtsi
@@ -40,6 +40,9 @@
interrupt-names = common, tx, rx, rx_overflow;
ti,buffer-size = 128;
ti,hwmods = mcbsp1;
+   dmas = sdma 31,
+  sdma 32;
+   dma-names = tx, rx;
};
 
mcbsp2: mcbsp@48076000 {
@@ -52,6 +55,9 @@
interrupt-names = common, tx, rx;
ti,buffer-size = 128;
ti,hwmods = mcbsp2;
+   dmas = sdma 33,
+  sdma 34;
+   dma-names = tx, rx;
};
 
mcbsp3: mcbsp@4808c000 {
@@ -64,6 +70,9 @@
interrupt-names = common, tx, rx;
ti,buffer-size = 128;
ti,hwmods = mcbsp3;
+   dmas = sdma 17,
+  sdma 18;
+   dma-names = tx, rx;
};
 
mcbsp4: mcbsp@4808e000 {
@@ -76,6 +85,9 @@
interrupt-names = common, tx, rx;
ti,buffer-size = 128;
ti,hwmods = mcbsp4;
+   dmas = sdma 19,
+  sdma 20;
+   dma-names = tx, rx;
};
 
mcbsp5: mcbsp@48096000 {
@@ -88,6 +100,9 @@
interrupt-names = common, tx, rx;
ti,buffer-size = 128;
ti,hwmods = mcbsp5;
+   dmas = sdma 21,
+  sdma 22;
+   dma-names = tx, rx;
};
 
timer1: timer@49018000 {
diff --git a/arch/arm/boot/dts/omap3.dtsi b/arch/arm/boot/dts/omap3.dtsi
index 4e7acb6..f901404 100644
--- a/arch/arm/boot/dts/omap3.dtsi
+++ b/arch/arm/boot/dts/omap3.dtsi
@@ -289,6 +289,9 @@
interrupt-names = common, tx, rx;
ti,buffer-size = 128;
ti,hwmods = mcbsp1;
+   dmas = sdma 31,
+  sdma 32;
+   dma-names = tx, rx;
};
 
mcbsp2: mcbsp@49022000 {
@@ -303,6 +306,9 @@
interrupt-names = common, tx, rx, sidetone;
ti,buffer-size = 1280;
ti,hwmods = mcbsp2, mcbsp2_sidetone;
+   dmas = sdma 33,
+  sdma 34;
+   dma-names = tx, rx;
};
 
mcbsp3: mcbsp@49024000 {
@@ -317,6 +323,9 @@
interrupt-names = common, tx, rx, sidetone;
ti,buffer-size = 128;
ti,hwmods = mcbsp3, mcbsp3_sidetone;
+   dmas = sdma 17,
+  sdma 18;
+   dma-names = tx, rx;
};
 
mcbsp4: mcbsp@49026000 {
@@ -329,6 +338,9 @@
interrupt-names = common, tx, rx;
ti,buffer-size = 128;
ti,hwmods = mcbsp4;
+   dmas = sdma 19,
+  sdma 20;
+   dma-names = tx, rx;
};
 
mcbsp5: mcbsp@48096000 {
@@ -341,6 +353,9 @@

Re: [PATCH 0/5] usb: musb: am335x support

2013-03-07 Thread Daniel Mack
On 04.03.2013 00:53, Daniel Mack wrote:
 Hi Peter,
 
 On 03.03.2013 23:24, Peter Korsgaard wrote:
 Daniel == Daniel Mack zon...@gmail.com writes:

 Hi,

  Daniel On my board, the USB is purely used as host interface, with a
  Daniel type B plug soldered. In the DT, I'm using the following
  Daniel sniplet in accordance to the documentation of the bindings:

  Daniel usb_otg_hs: usb@4740 {
  Daniel compatible = ti,musb-am33xx;
  Daniel reg = 0x4740 0x1000/* usbss */
  Daniel0x47401000 0x800 /* musb instance 0 */
  Daniel0x47401800 0x800;   /* musb instance 1 */
  Daniel interrupt-parent = intc;
  Daniel interrupts = 17/* usbss */
  Daniel   18/* musb instance 0 */
  19 ;   /* musb instance 1 */
  Daniel multipoint = 1;
  Daniel num-eps = 16;
  Daniel ram-bits = 12;
  Daniel port0-mode = 3;
  Daniel port1-mode = 3;
  Daniel power = 250;
  Daniel ti,hwmods = usb_otg_hs;
  Daniel };

  Daniel The relevant config options are

  Daniel CONFIG_USB_MUSB_HDRC=y
  Daniel # CONFIG_USB_MUSB_TUSB6010 is not set
  Daniel # CONFIG_USB_MUSB_OMAP2PLUS is not set
  Daniel # CONFIG_USB_MUSB_AM35X is not set
  Daniel CONFIG_USB_MUSB_DSPS=y
  Daniel CONFIG_MUSB_PIO_ONLY=y
  Daniel CONFIG_USB_GADGET=y
  Daniel CONFIG_USB_GADGET_DEBUG=y
  Daniel CONFIG_USB_GADGET_DEBUG_FILES=y
  Daniel CONFIG_USB_GADGET_DEBUG_FS=y
  Daniel CONFIG_USB_GADGET_VBUS_DRAW=2
  Daniel CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS=2
  Daniel CONFIG_USB_GADGET_MUSB_HDRC=y

 Ehh, I'm confused here. You talk about host mode, a single 'B' (gadget)
 connector
 
 I'm sorry for the confusion caused. This is a stupid mistake - I'm in
 fact talking about an 'A' type plug of course (host mode).
 
 and your device tree mentions 2 OTG ports.
 
 That's what I said in a follow up - the same happens for mode '1'.
 
 What is the configuration exactly?
 
 Again to summarize: host-only mode, type 'A' plug.
 
 The gadget driver is is enabled in the config because the only
 occurrence of usb_add_hcd() in the musb driver is in the gagdget part,
 so supposedly, there has to be a gadget driver loaded in order to make
 the host interface going.

Just be clear: I'd happily help and dig for the reason of this, I'd just
need to know how things are _supposed_ to work ...


Daniel

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 11/14] ARM: OMAP2+: Add device-tree support for NOR flash

2013-03-07 Thread Ezequiel Garcia
On Wed, Mar 6, 2013 at 1:54 PM, Ezequiel Garcia elezegar...@gmail.com wrote:
 On Wed, Mar 6, 2013 at 1:46 PM, Jon Hunter jon-hun...@ti.com wrote:

 On 03/06/2013 05:58 AM, Ezequiel Garcia wrote:
 I'll submit this driver by the end of this week, in case you want
 to take a look at it.

 Ok, but this is not for omap right?


 No, this is a new driver for a memory controller that's available on
 some Marvell SoC. It will be located in drivers/memory/.


Slightly OT: if anyone wants to see the memory-controller driver
for mvebu platforms, I just posted in lakml.

It's this patchset:

[PATCH 0/5] Device Bus support for Marvell EBU SoC

-- 
Ezequiel
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 0/5] ASoC: OMAP2+: Update Audio IP with sDMA binding for DT boot

2013-03-07 Thread Peter Ujfalusi
Hi Sebastien,

On 03/07/2013 01:43 PM, Sebastien Guiriec wrote:
 This patch serie is converting OMAP Audio IPs in order to use OMAP sDMA DT
 binding in case of DT boot on OMAP2+ platforms.

The content of the patches looks about right for me, however I would squash
together the IP and platform driver patches so we avoid breakage within the
series. Also I would put the patch for the .dtsi files as first one.

-- 
Péter

 It is depending on the next patches:
 
 [1] http://www.spinics.net/lists/arm-kernel/msg227836.html
 [2] http://www.mail-archive.com/linux-omap@vger.kernel.org/msg84668.html
 
 It has been tested on:
 - OMAP5 (sEVM/panda)in DT boot (McPDM/DMIC).
 - OMAP4 (SDP4430/Panda) in both DT/non DT boot (McPDM/DMIC)
 - OMAP3 (Beagle XM) in both DT/non DT boot (McBSP)
 
 Sebastien Guiriec (5):
   ASoC: omap-pcm: Move to generic DMA for DT binding
   ASoC: omap-dmic: Update driver for DMA DT binding.
   ASoC: omap-mcpdm: Update driver for DMA DT binding.
   ASoC: omap-mcbsp:Update driver for DMA DT binding.
   ARM: dts: OMAP2+: Add SDMA Audio IPs bindings
 
  arch/arm/boot/dts/omap2420.dtsi |6 ++
  arch/arm/boot/dts/omap2430.dtsi |   15 +++
  arch/arm/boot/dts/omap3.dtsi|   15 +++
  arch/arm/boot/dts/omap4.dtsi|   17 +
  arch/arm/boot/dts/omap5.dtsi|   14 ++
  sound/soc/omap/mcbsp.c  |   26 --
  sound/soc/omap/omap-dmic.c  |   15 +--
  sound/soc/omap/omap-mcpdm.c |   22 ++
  sound/soc/omap/omap-pcm.c   |   12 ++--
  sound/soc/omap/omap-pcm.h   |1 +
  10 files changed, 117 insertions(+), 26 deletions(-)
 


--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] ARM: OMAP2+: am33xx: preserve JTAG clock aka debugss_ick.

2013-03-07 Thread Andreas Fenkart
This fixes JTAG support on am33xx.

Signed-off-by: Andreas Fenkart andreas.fenk...@streamunlimited.com
---
 arch/arm/Kconfig.debug|6 ++
 arch/arm/mach-omap2/cclock33xx_data.c |   11 ---
 2 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
index aca..8120940 100644
--- a/arch/arm/Kconfig.debug
+++ b/arch/arm/Kconfig.debug
@@ -632,4 +632,10 @@ config PID_IN_CONTEXTIDR
  additional instructions during context switch. Say Y here only if you
  are planning to use hardware trace tools with this kernel.
 
+config JTAG
+   bool Enable JTAG clock
+   depends on SOC_AM33XX
+   help
+ Enable or keep JTAG clock enabled
+
 endmenu
diff --git a/arch/arm/mach-omap2/cclock33xx_data.c 
b/arch/arm/mach-omap2/cclock33xx_data.c
index 476b820..b7470de 100644
--- a/arch/arm/mach-omap2/cclock33xx_data.c
+++ b/arch/arm/mach-omap2/cclock33xx_data.c
@@ -429,9 +429,14 @@ DEFINE_STRUCT_CLK(smartreflex1_fck, dpll_core_ck_parents, 
clk_ops_null);
  * - usbotg_fck (its additional clock and not really a modulemode)
  * - ieee5000
  */
-DEFINE_CLK_GATE(debugss_ick, dpll_core_m4_ck, dpll_core_m4_ck, 0x0,
-   AM33XX_CM_WKUP_DEBUGSS_CLKCTRL, AM33XX_MODULEMODE_SWCTRL_SHIFT,
-   0x0, NULL);
+#ifdef CONFIG_JTAG
+#define DEBUGSS_FLAGS CLK_IGNORE_UNUSED
+#else
+#define DEBUGSS_FLAGS 0x0
+#endif
+DEFINE_CLK_GATE(debugss_ick, dpll_core_m4_ck, dpll_core_m4_ck,
+   DEBUGSS_FLAGS, AM33XX_CM_WKUP_DEBUGSS_CLKCTRL,
+   AM33XX_MODULEMODE_SWCTRL_SHIFT, 0x0, NULL);
 
 DEFINE_CLK_GATE(mmu_fck, dpll_core_m4_ck, dpll_core_m4_ck, 0x0,
AM33XX_CM_GFX_MMUDATA_CLKCTRL, AM33XX_MODULEMODE_SWCTRL_SHIFT,
-- 
1.7.10.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: [PATCH] ARM: OMAP2+: am33xx: preserve JTAG clock aka debugss_ick.

2013-03-07 Thread Bedia, Vaibhav
On Thu, Mar 07, 2013 at 18:43:27, Andreas Fenkart wrote:
 This fixes JTAG support on am33xx.
 

Please refer to http://www.spinics.net/lists/linux-omap/msg87476.html

Regards,
Vaibhav
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2 1/4] usb: dwc3: set dma_mask for dwc3_omap device

2013-03-07 Thread Kishon Vijay Abraham I
*dma_mask* is not set for devices created from dt data. So filled dma_mask
for dwc3_omap device here. And dwc3 core will copy the dma_mask from its
parent.

Signed-off-by: Kishon Vijay Abraham I kis...@ti.com
---
 drivers/usb/dwc3/core.c  |4 
 drivers/usb/dwc3/dwc3-omap.c |3 +++
 2 files changed, 7 insertions(+)

diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
index 66c0572..c845e70 100644
--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -454,6 +454,10 @@ static int dwc3_probe(struct platform_device *pdev)
dwc-regs_size  = resource_size(res);
dwc-dev= dev;
 
+   dev-dma_mask   = dev-parent-dma_mask;
+   dev-dma_parms  = dev-parent-dma_parms;
+   dma_set_coherent_mask(dev, dev-parent-coherent_dma_mask);
+
if (!strncmp(super, maximum_speed, 5))
dwc-maximum_speed = DWC3_DCFG_SUPERSPEED;
else if (!strncmp(high, maximum_speed, 4))
diff --git a/drivers/usb/dwc3/dwc3-omap.c b/drivers/usb/dwc3/dwc3-omap.c
index 35b9673..546f1fd 100644
--- a/drivers/usb/dwc3/dwc3-omap.c
+++ b/drivers/usb/dwc3/dwc3-omap.c
@@ -277,6 +277,8 @@ static void dwc3_omap_disable_irqs(struct dwc3_omap *omap)
dwc3_omap_writel(omap-base, USBOTGSS_IRQENABLE_SET_0, 0x00);
 }
 
+static u64 dwc3_omap_dma_mask = DMA_BIT_MASK(32);
+
 static int dwc3_omap_probe(struct platform_device *pdev)
 {
struct device_node  *node = pdev-dev.of_node;
@@ -330,6 +332,7 @@ static int dwc3_omap_probe(struct platform_device *pdev)
omap-dev   = dev;
omap-irq   = irq;
omap-base  = base;
+   dev-dma_mask   = dwc3_omap_dma_mask;
 
/*
 * REVISIT if we ever have two instances of the wrapper, we will be
-- 
1.7.10.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2 0/4] usb: added palmas-usb driver and a few misc fixes

2013-03-07 Thread Kishon Vijay Abraham I
Added palmas-usb driver which is mainly used as comparator driver to
detect vbus/id events when a USB cable is connected and passes on the
event information to omap glue (dwc3-omap.c)

The other fixes include setting dma_mask for dwc3 device since device
tree doesn't fill dma_mask, returning EPROBE_DEFER if probe has not yet
called and replace *_* with *-* in property names in musb glue since
that is the usual convention followed.

Developed this patches on
git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git testing

Changes from v1:
* set the dma_mask for dwc3_omap (instead of setting dma_mask for dwc3
core from dwc3-omap.c)
* return '0' from dwc3_omap_mailbox on success (instead of hacky IRQ_HANDLED)
It is now handled using mailboxstat member in palmas_usb.
* Made compatible in palmas-usb to include *ti,twl6035-usb*

Graeme Gregory (1):
  USB: Palmas OTG Transceiver Driver

Kishon Vijay Abraham I (3):
  usb: dwc3: set dma_mask for dwc3_omap device
  usb: dwc3: dwc3-omap: return -EPROBE_DEFER if probe has not yet
executed
  usb: musb: omap2430: replace *_* with *-* in property names

 Documentation/devicetree/bindings/usb/omap-usb.txt |   12 +-
 .../devicetree/bindings/usb/twl-usb.txt|   15 +
 drivers/usb/dwc3/core.c|4 +
 drivers/usb/dwc3/dwc3-omap.c   |   10 +-
 drivers/usb/musb/omap2430.c|6 +-
 drivers/usb/otg/Kconfig|6 +
 drivers/usb/otg/Makefile   |1 +
 drivers/usb/otg/palmas-usb.c   |  396 
 include/linux/mfd/palmas.h |7 +-
 include/linux/usb/dwc3-omap.h  |6 +-
 10 files changed, 448 insertions(+), 15 deletions(-)
 create mode 100644 drivers/usb/otg/palmas-usb.c

-- 
1.7.10.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2 2/4] usb: dwc3: dwc3-omap: return -EPROBE_DEFER if probe has not yet executed

2013-03-07 Thread Kishon Vijay Abraham I
return -EPROBE_DEFER from dwc3_omap_mailbox in dwc3-omap.c, if the probe of
dwc3-omap has not yet been executed or failed.

Signed-off-by: Kishon Vijay Abraham I kis...@ti.com
---
 drivers/usb/dwc3/dwc3-omap.c  |7 +--
 include/linux/usb/dwc3-omap.h |6 +++---
 2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/drivers/usb/dwc3/dwc3-omap.c b/drivers/usb/dwc3/dwc3-omap.c
index 546f1fd..2fe9723f 100644
--- a/drivers/usb/dwc3/dwc3-omap.c
+++ b/drivers/usb/dwc3/dwc3-omap.c
@@ -138,11 +138,14 @@ static inline void dwc3_omap_writel(void __iomem *base, 
u32 offset, u32 value)
writel(value, base + offset);
 }
 
-void dwc3_omap_mailbox(enum omap_dwc3_vbus_id_status status)
+int dwc3_omap_mailbox(enum omap_dwc3_vbus_id_status status)
 {
u32 val;
struct dwc3_omap*omap = _omap;
 
+   if (!omap)
+   return -EPROBE_DEFER;
+
switch (status) {
case OMAP_DWC3_ID_GROUND:
dev_dbg(omap-dev, ID GND\n);
@@ -185,7 +188,7 @@ void dwc3_omap_mailbox(enum omap_dwc3_vbus_id_status status)
dev_dbg(omap-dev, ID float\n);
}
 
-   return;
+   return 0;
 }
 EXPORT_SYMBOL_GPL(dwc3_omap_mailbox);
 
diff --git a/include/linux/usb/dwc3-omap.h b/include/linux/usb/dwc3-omap.h
index 51eae14..5615f4d 100644
--- a/include/linux/usb/dwc3-omap.h
+++ b/include/linux/usb/dwc3-omap.h
@@ -19,11 +19,11 @@ enum omap_dwc3_vbus_id_status {
 };
 
 #if (defined(CONFIG_USB_DWC3) || defined(CONFIG_USB_DWC3_MODULE))
-extern void dwc3_omap_mailbox(enum omap_dwc3_vbus_id_status status);
+extern int dwc3_omap_mailbox(enum omap_dwc3_vbus_id_status status);
 #else
-static inline void dwc3_omap_mailbox(enum omap_dwc3_vbus_id_status status)
+static inline int dwc3_omap_mailbox(enum omap_dwc3_vbus_id_status status)
 {
-   return;
+   return -ENODEV;
 }
 #endif
 
-- 
1.7.10.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2 4/4] usb: musb: omap2430: replace *_* with *-* in property names

2013-03-07 Thread Kishon Vijay Abraham I
No functional change. Replace *_* with *-* in property names of otg to
follow the general convention.

Signed-off-by: Kishon Vijay Abraham I kis...@ti.com
---
 Documentation/devicetree/bindings/usb/omap-usb.txt |   12 ++--
 drivers/usb/musb/omap2430.c|6 +++---
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/Documentation/devicetree/bindings/usb/omap-usb.txt 
b/Documentation/devicetree/bindings/usb/omap-usb.txt
index 1b9f55f..662f0f1 100644
--- a/Documentation/devicetree/bindings/usb/omap-usb.txt
+++ b/Documentation/devicetree/bindings/usb/omap-usb.txt
@@ -8,10 +8,10 @@ OMAP MUSB GLUE
and disconnect.
  - multipoint : Should be 1 indicating the musb controller supports
multipoint. This is a MUSB configuration-specific setting.
- - num_eps : Specifies the number of endpoints. This is also a
+ - num-eps : Specifies the number of endpoints. This is also a
MUSB configuration-specific setting. Should be set to 16
- - ram_bits : Specifies the ram address size. Should be set to 12
- - interface_type : This is a board specific setting to describe the type of
+ - ram-bits : Specifies the ram address size. Should be set to 12
+ - interface-type : This is a board specific setting to describe the type of
interface between the controller and the phy. It should be 0 or 1
specifying ULPI and UTMI respectively.
  - mode : Should be 3 to represent OTG. 1 signifies HOST and 2
@@ -29,14 +29,14 @@ usb_otg_hs: usb_otg_hs@4a0ab000 {
ti,hwmods = usb_otg_hs;
ti,has-mailbox;
multipoint = 1;
-   num_eps = 16;
-   ram_bits = 12;
+   num-eps = 16;
+   ram-bits = 12;
ctrl-module = omap_control_usb;
 };
 
 Board specific device node entry
 usb_otg_hs {
-   interface_type = 1;
+   interface-type = 1;
mode = 3;
power = 50;
 };
diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
index 1762354..dde2802 100644
--- a/drivers/usb/musb/omap2430.c
+++ b/drivers/usb/musb/omap2430.c
@@ -522,10 +522,10 @@ static int omap2430_probe(struct platform_device *pdev)
}
 
of_property_read_u32(np, mode, (u32 *)pdata-mode);
-   of_property_read_u32(np, interface_type,
+   of_property_read_u32(np, interface-type,
(u32 *)data-interface_type);
-   of_property_read_u32(np, num_eps, (u32 *)config-num_eps);
-   of_property_read_u32(np, ram_bits, (u32 *)config-ram_bits);
+   of_property_read_u32(np, num-eps, (u32 *)config-num_eps);
+   of_property_read_u32(np, ram-bits, (u32 *)config-ram_bits);
of_property_read_u32(np, power, (u32 *)pdata-power);
config-multipoint = of_property_read_bool(np, multipoint);
pdata-has_mailbox = of_property_read_bool(np,
-- 
1.7.10.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2 3/4] USB: Palmas OTG Transceiver Driver

2013-03-07 Thread Kishon Vijay Abraham I
From: Graeme Gregory g...@slimlogic.co.uk

This is the driver for the OTG transceiver built into the Palmas chip. It
handles the various USB OTG events that can be generated by cable
insertion/removal.

Signed-off-by: Graeme Gregory g...@slimlogic.co.uk
Signed-off-by: Moiz Sonasath m-sonas...@ti.com
Signed-off-by: Ruchika Kharwar ruch...@ti.com
Signed-off-by: Kishon Vijay Abraham I kis...@ti.com
Signed-off-by: Sebastien Guiriec s-guir...@ti.com
---
 .../devicetree/bindings/usb/twl-usb.txt|   15 +
 drivers/usb/otg/Kconfig|6 +
 drivers/usb/otg/Makefile   |1 +
 drivers/usb/otg/palmas-usb.c   |  396 
 include/linux/mfd/palmas.h |7 +-
 5 files changed, 424 insertions(+), 1 deletion(-)
 create mode 100644 drivers/usb/otg/palmas-usb.c

diff --git a/Documentation/devicetree/bindings/usb/twl-usb.txt 
b/Documentation/devicetree/bindings/usb/twl-usb.txt
index 36b9aed..17a9194 100644
--- a/Documentation/devicetree/bindings/usb/twl-usb.txt
+++ b/Documentation/devicetree/bindings/usb/twl-usb.txt
@@ -38,3 +38,18 @@ twl4030-usb {
usb3v1-supply = vusb3v1;
usb_mode = 1;
 };
+
+PALMAS USB COMPARATOR
+Required Properties:
+ - compatible : Should be ti,palmas-usb or ti,twl6035-usb
+ - vbus-supply : phandle to the regulator device tree node.
+
+Optional Properties:
+ - ti,wakeup : To enable the wakeup comparator in probe
+ - ti,no_control_vbus: if the platform wishes its own vbus control
+
+palmas-usb {
+   compatible = ti,twl6035-usb, ti,palmas-usb;
+   vbus-supply = smps10_reg;
+   ti,wakeup;
+};
diff --git a/drivers/usb/otg/Kconfig b/drivers/usb/otg/Kconfig
index 37962c9..5b40e04 100644
--- a/drivers/usb/otg/Kconfig
+++ b/drivers/usb/otg/Kconfig
@@ -138,4 +138,10 @@ config USB_MV_OTG
 
  To compile this driver as a module, choose M here.
 
+config PALMAS_USB
+   tristate Palmas USB Transceiver Driver
+   depends on MFD_PALMAS
+   help
+ Enable this to support the Palmas OTG transceiver
+
 endif # USB || OTG
diff --git a/drivers/usb/otg/Makefile b/drivers/usb/otg/Makefile
index a844b8d..7ae90ba 100644
--- a/drivers/usb/otg/Makefile
+++ b/drivers/usb/otg/Makefile
@@ -22,3 +22,4 @@ fsl_usb2_otg-objs := fsl_otg.o otg_fsm.o
 obj-$(CONFIG_FSL_USB2_OTG) += fsl_usb2_otg.o
 obj-$(CONFIG_USB_MXS_PHY)  += mxs-phy.o
 obj-$(CONFIG_USB_MV_OTG)   += mv_otg.o
+obj-$(CONFIG_PALMAS_USB)   += palmas-usb.o
diff --git a/drivers/usb/otg/palmas-usb.c b/drivers/usb/otg/palmas-usb.c
new file mode 100644
index 000..8bdffe3
--- /dev/null
+++ b/drivers/usb/otg/palmas-usb.c
@@ -0,0 +1,396 @@
+/*
+ * Palmas USB transceiver driver
+ *
+ * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * Author: Graeme Gregory g...@slimlogic.co.uk
+ * Author: Kishon Vijay Abraham I kis...@ti.com
+ *
+ * Based on twl6030_usb.c
+ *
+ * Author: Hema HK hem...@ti.com
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#include linux/module.h
+#include linux/init.h
+#include linux/interrupt.h
+#include linux/platform_device.h
+#include linux/io.h
+#include linux/usb/otg.h
+#include linux/usb/phy_companion.h
+#include linux/usb/omap_usb.h
+#include linux/usb/dwc3-omap.h
+#include linux/regulator/consumer.h
+#include linux/err.h
+#include linux/notifier.h
+#include linux/slab.h
+#include linux/delay.h
+#include linux/mfd/palmas.h
+#include linux/of.h
+#include linux/of_platform.h
+
+static int palmas_usb_read(struct palmas *palmas, unsigned int reg,
+   unsigned int *dest)
+{
+   unsigned int addr;
+   int slave;
+
+   slave = PALMAS_BASE_TO_SLAVE(PALMAS_USB_OTG_BASE);
+   addr = PALMAS_BASE_TO_REG(PALMAS_USB_OTG_BASE, reg);
+
+   return regmap_read(palmas-regmap[slave], addr, dest);
+}
+
+static int palmas_usb_write(struct palmas *palmas, unsigned int reg,
+   unsigned int data)
+{
+   unsigned int addr;
+   int slave;
+
+   slave = PALMAS_BASE_TO_SLAVE(PALMAS_USB_OTG_BASE);
+   addr = PALMAS_BASE_TO_REG(PALMAS_USB_OTG_BASE, reg);
+
+   return regmap_write(palmas-regmap[slave], addr, data);
+}
+
+static void palmas_usb_wakeup(struct palmas *palmas, int enable)
+{
+   if (enable)
+   palmas_usb_write(palmas, PALMAS_USB_WAKEUP,
+   PALMAS_USB_WAKEUP_ID_WK_UP_COMP);
+   else
+   palmas_usb_write(palmas, PALMAS_USB_WAKEUP, 0);
+}
+

Re: [PATCH 1/3] driver: net: ethernet: cpsw: implement ethtool get/set phy setting

2013-03-07 Thread Peter Korsgaard
 M == Mugunthan V N mugunthan...@ti.com writes:

 M This patch implements get/set of the phy settings via ethtool apis
 M Signed-off-by: Mugunthan V N mugunthan...@ti.com
 M ---
 M  Documentation/devicetree/bindings/net/cpsw.txt |3 +++
 M  drivers/net/ethernet/ti/cpsw.c |   32 

 M  include/linux/platform_data/cpsw.h |1 +
 M  3 files changed, 36 insertions(+)

 M diff --git a/Documentation/devicetree/bindings/net/cpsw.txt 
b/Documentation/devicetree/bindings/net/cpsw.txt
 M index ecfdf75..8d61300 100644
 M --- a/Documentation/devicetree/bindings/net/cpsw.txt
 M +++ b/Documentation/devicetree/bindings/net/cpsw.txt
 M @@ -20,6 +20,7 @@ Required properties:
 M  - cpts_clock_shift : Denominator to convert input clock ticks into 
nanoseconds
 M  - phy_id   : Specifies slave phy id
 M  - mac-address  : Specifies slave MAC address
 M +- ethtool-active-slave : Specifies the slave to use for ethtool command

That again sounds like something Linux specific rather than a hardware
property.

It would be good if all these special things (dual emac mode, vlan
handling, switching) could be handled using the existing kernel
(bridging/vlan) infrastructure, and the driver always just exposing 2
network interfaces instead of these configuration properties.

-- 
Bye, Peter Korsgaard
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2] ARM: OMAP1: fix omap_udc registration

2013-03-07 Thread Aaro Koskinen
omap_udc platform device is not registered properly anymore:
CONFIG_USB_GADGET_OMAP was deleted by 193ab2a6 (usb: gadget: allow
multiple gadgets to be built) already in v3.1.

Fix by using CONFIG_USB_OMAP instead. Tested on Nokia 770 by checking
that omap_udc is probed  working properly when built as a module.

Signed-off-by: Aaro Koskinen aaro.koski...@iki.fi
---

Patch history:

v2: use IS_ENABLED()

v1: http://marc.info/?t=13626088666r=1w=2

 arch/arm/mach-omap1/include/mach/usb.h |2 +-
 arch/arm/mach-omap1/usb.c  |6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-omap1/include/mach/usb.h 
b/arch/arm/mach-omap1/include/mach/usb.h
index 753cd5c..45e5ac7 100644
--- a/arch/arm/mach-omap1/include/mach/usb.h
+++ b/arch/arm/mach-omap1/include/mach/usb.h
@@ -2,7 +2,7 @@
  * FIXME correct answer depends on hmc_mode,
  * as does (on omap1) any nonzero value for config-otg port number
  */
-#ifdef CONFIG_USB_GADGET_OMAP
+#if IS_ENABLED(CONFIG_USB_OMAP)
 #defineis_usb0_device(config)  1
 #else
 #defineis_usb0_device(config)  0
diff --git a/arch/arm/mach-omap1/usb.c b/arch/arm/mach-omap1/usb.c
index 1a1db59..4118db5 100644
--- a/arch/arm/mach-omap1/usb.c
+++ b/arch/arm/mach-omap1/usb.c
@@ -123,7 +123,7 @@ omap_otg_init(struct omap_usb_config *config)
syscon = omap_readl(OTG_SYSCON_1);
syscon |= HST_IDLE_EN|DEV_IDLE_EN|OTG_IDLE_EN;
 
-#ifdef CONFIG_USB_GADGET_OMAP
+#if IS_ENABLED(CONFIG_USB_OMAP)
if (config-otg || config-register_dev) {
struct platform_device *udc_device = config-udc_device;
int status;
@@ -169,7 +169,7 @@ omap_otg_init(struct omap_usb_config *config)
 void omap_otg_init(struct omap_usb_config *config) {}
 #endif
 
-#ifdef CONFIG_USB_GADGET_OMAP
+#if IS_ENABLED(CONFIG_USB_OMAP)
 
 static struct resource udc_resources[] = {
/* order is significant! */
@@ -600,7 +600,7 @@ static void __init omap_1510_usb_init(struct 
omap_usb_config *config)
while (!(omap_readw(ULPD_DPLL_CTRL)  DPLL_LOCK))
cpu_relax();
 
-#ifdef CONFIG_USB_GADGET_OMAP
+#if IS_ENABLED(CONFIG_USB_OMAP)
if (config-register_dev) {
int status;
 
-- 
1.7.10.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v3 5/7] ARM: dts: omap5: Add ocp2scp data

2013-03-07 Thread Kishon Vijay Abraham I
Add ocp2scp data node in omap5 device tree file. The information for
the node added here can be found @
Documentation/devicetree/bindings/bus/omap-ocp2scp.txt

Signed-off-by: Kishon Vijay Abraham I kis...@ti.com
---
 arch/arm/boot/dts/omap5.dtsi |8 
 1 file changed, 8 insertions(+)

diff --git a/arch/arm/boot/dts/omap5.dtsi b/arch/arm/boot/dts/omap5.dtsi
index c937500..230b779 100644
--- a/arch/arm/boot/dts/omap5.dtsi
+++ b/arch/arm/boot/dts/omap5.dtsi
@@ -504,5 +504,13 @@
reg-names = control_dev_conf, phy_power_usb;
ti,type = 2;
};
+
+   ocp2scp {
+   compatible = ti,omap-ocp2scp;
+   #address-cells = 1;
+   #size-cells = 1;
+   ranges;
+   ti,hwmods = ocp2scp1;
+   };
};
 };
-- 
1.7.10.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v3 7/7] ARM: dts: omap5: add dwc3 omap and dwc3 core dt data

2013-03-07 Thread Kishon Vijay Abraham I
Add dwc3 omap glue data to the omap5 dt data file. The information about
the dt node added here is available @
Documentation/devicetree/bindings/usb/omap-usb.txt.

Also added dwc3 core dt data as a subnode to dwc3 omap glue data in omap5 dt
data file. The information for the entered data node is available @
Documentation/devicetree/bindings/usb/dwc3.txt

Signed-off-by: Kishon Vijay Abraham I kis...@ti.com
---
 arch/arm/boot/dts/omap5.dtsi |   18 ++
 1 file changed, 18 insertions(+)

diff --git a/arch/arm/boot/dts/omap5.dtsi b/arch/arm/boot/dts/omap5.dtsi
index bd73257..24dd69f 100644
--- a/arch/arm/boot/dts/omap5.dtsi
+++ b/arch/arm/boot/dts/omap5.dtsi
@@ -505,6 +505,24 @@
ti,type = 2;
};
 
+   omap_dwc3@4a02 {
+   compatible = ti,dwc3;
+   ti,hwmods = usb_otg_ss;
+   reg = 0x4a02 0x1000;
+   interrupts = 0 93 4;
+   #address-cells = 1;
+   #size-cells = 1;
+   utmi-mode = 2;
+   ranges;
+   dwc3@4a03 {
+   compatible = synopsys,dwc3;
+   reg = 0x4a03 0x1000;
+   interrupts = 0 92 4;
+   usb-phy = usb2_phy, usb3_phy;
+   tx-fifo-resize;
+   };
+   };
+
ocp2scp {
compatible = ti,omap-ocp2scp;
#address-cells = 1;
-- 
1.7.10.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v3 3/7] ARM: dts: omap: Add usb_otg and glue data

2013-03-07 Thread Kishon Vijay Abraham I
Add usb otg data node in omap4/omap3 device tree file. Also update
the node with board specific setting in omapx-board.dts file.
The dt data specifies among others the interface type (ULPI or UTMI), mode
which is mostly OTG, power that specifies the amount of power this can supply
when in host mode.
The information about usb otg node is available @
Documentation/devicetree/bindings/usb/omap-usb.txt

Acked-by: Felipe Balbi ba...@ti.com
Signed-off-by: Kishon Vijay Abraham I kis...@ti.com
---
 Documentation/devicetree/bindings/usb/omap-usb.txt |1 +
 arch/arm/boot/dts/omap3-beagle-xm.dts  |6 ++
 arch/arm/boot/dts/omap3-evm.dts|6 ++
 arch/arm/boot/dts/omap3-overo.dtsi |6 ++
 arch/arm/boot/dts/omap3.dtsi   |   12 
 arch/arm/boot/dts/omap4-panda.dts  |6 ++
 arch/arm/boot/dts/omap4-sdp.dts|6 ++
 arch/arm/boot/dts/omap4.dtsi   |   13 +
 arch/arm/boot/dts/twl4030.dtsi |2 +-
 9 files changed, 57 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/usb/omap-usb.txt 
b/Documentation/devicetree/bindings/usb/omap-usb.txt
index 1ef0ce7..abce256 100644
--- a/Documentation/devicetree/bindings/usb/omap-usb.txt
+++ b/Documentation/devicetree/bindings/usb/omap-usb.txt
@@ -18,6 +18,7 @@ OMAP MUSB GLUE
represents PERIPHERAL.
  - power : Should be 50. This signifies the controller can supply upto
100mA when operating in host mode.
+ - usb-phy : the phandle for the PHY device
 
 Optional properties:
  - ctrl-module : phandle of the control module this glue uses to write to
diff --git a/arch/arm/boot/dts/omap3-beagle-xm.dts 
b/arch/arm/boot/dts/omap3-beagle-xm.dts
index 3705a81..5f8226a 100644
--- a/arch/arm/boot/dts/omap3-beagle-xm.dts
+++ b/arch/arm/boot/dts/omap3-beagle-xm.dts
@@ -107,3 +107,9 @@
 */
ti,pulldowns = 0x03a1c4;
 };
+
+usb_otg_hs {
+   interface-type = 0;
+   mode = 3;
+   power = 50;
+};
diff --git a/arch/arm/boot/dts/omap3-evm.dts b/arch/arm/boot/dts/omap3-evm.dts
index e8ba1c2..6e6f80d 100644
--- a/arch/arm/boot/dts/omap3-evm.dts
+++ b/arch/arm/boot/dts/omap3-evm.dts
@@ -59,3 +59,9 @@
 twl_gpio {
ti,use-leds;
 };
+
+usb_otg_hs {
+   interface-type = 0;
+   mode = 3;
+   power = 50;
+};
diff --git a/arch/arm/boot/dts/omap3-overo.dtsi 
b/arch/arm/boot/dts/omap3-overo.dtsi
index 89808ce..e3979b1 100644
--- a/arch/arm/boot/dts/omap3-overo.dtsi
+++ b/arch/arm/boot/dts/omap3-overo.dtsi
@@ -55,3 +55,9 @@
 twl_gpio {
ti,use-leds;
 };
+
+usb_otg_hs {
+   interface-type = 0;
+   mode = 3;
+   power = 50;
+};
diff --git a/arch/arm/boot/dts/omap3.dtsi b/arch/arm/boot/dts/omap3.dtsi
index 1acc261..1e21565 100644
--- a/arch/arm/boot/dts/omap3.dtsi
+++ b/arch/arm/boot/dts/omap3.dtsi
@@ -397,5 +397,17 @@
ti,timer-alwon;
ti,timer-secure;
};
+
+   usb_otg_hs: usb_otg_hs@480ab000 {
+   compatible = ti,omap3-musb;
+   reg = 0x480ab000 0x1000;
+   interrupts = 0 92 0x4, 0 93 0x4;
+   interrupt-names = mc, dma;
+   ti,hwmods = usb_otg_hs;
+   usb-phy = usb2_phy;
+   multipoint = 1;
+   num-eps = 16;
+   ram-bits = 12;
+   };
};
 };
diff --git a/arch/arm/boot/dts/omap4-panda.dts 
b/arch/arm/boot/dts/omap4-panda.dts
index 4122efe..6531f75 100644
--- a/arch/arm/boot/dts/omap4-panda.dts
+++ b/arch/arm/boot/dts/omap4-panda.dts
@@ -206,3 +206,9 @@
 twl_usb_comparator {
usb-supply = vusb;
 };
+
+usb_otg_hs {
+   interface-type = 1;
+   mode = 3;
+   power = 50;
+};
diff --git a/arch/arm/boot/dts/omap4-sdp.dts b/arch/arm/boot/dts/omap4-sdp.dts
index 43e5258..f3adbf51 100644
--- a/arch/arm/boot/dts/omap4-sdp.dts
+++ b/arch/arm/boot/dts/omap4-sdp.dts
@@ -428,3 +428,9 @@
 twl_usb_comparator {
usb-supply = vusb;
 };
+
+usb_otg_hs {
+   interface-type = 1;
+   mode = 3;
+   power = 50;
+};
diff --git a/arch/arm/boot/dts/omap4.dtsi b/arch/arm/boot/dts/omap4.dtsi
index c829d7e..06d044e 100644
--- a/arch/arm/boot/dts/omap4.dtsi
+++ b/arch/arm/boot/dts/omap4.dtsi
@@ -542,5 +542,18 @@
reg-names = control_dev_conf, otghs_control;
ti,type = 1;
};
+
+   usb_otg_hs: usb_otg_hs@4a0ab000 {
+   compatible = ti,omap4-musb;
+   reg = 0x4a0ab000 0x7ff;
+   interrupts = 0 92 0x4, 0 93 0x4;
+   interrupt-names = mc, dma;
+   ti,hwmods = usb_otg_hs;
+   usb-phy = usb2_phy;
+   multipoint = 1;
+   num-eps = 16;
+  

[PATCH v3 2/7] ARM: dts: omap: Add omap-usb2 dt data

2013-03-07 Thread Kishon Vijay Abraham I
Add omap-usb2 data node in omap4 device tree file. Since omap-usb2 is
connected to ocp2scp, omap-usb2 dt data is added as a child node
of ocp2scp. The information about this data node is availabe @
Documentation/devicetree/bindings/usb/usb-phy.txt

Acked-by: Felipe Balbi ba...@ti.com
Signed-off-by: Kishon Vijay Abraham I kis...@ti.com
---
 arch/arm/boot/dts/omap4.dtsi |5 +
 1 file changed, 5 insertions(+)

diff --git a/arch/arm/boot/dts/omap4.dtsi b/arch/arm/boot/dts/omap4.dtsi
index ffc7352..c829d7e 100644
--- a/arch/arm/boot/dts/omap4.dtsi
+++ b/arch/arm/boot/dts/omap4.dtsi
@@ -438,6 +438,11 @@
#size-cells = 1;
ranges;
ti,hwmods = ocp2scp_usb_phy;
+   usb2_phy: usb2phy@4a0ad080 {
+   compatible = ti,omap-usb2;
+   reg = 0x4a0ad080 0x58;
+   ctrl-module = omap_control_usb;
+   };
};
 
timer1: timer@4a318000 {
-- 
1.7.10.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v3 1/7] ARM: dts: omap: Add omap control usb data

2013-03-07 Thread Kishon Vijay Abraham I
Add omap control usb data in omap4 device tree file. This will have the
register address of registers to power on the PHY and to write to
mailbox. The information about this data node is available @
Documentation/devicetree/bindings/usb/omap-usb.txt

Signed-off-by: Kishon Vijay Abraham I kis...@ti.com
---
 arch/arm/boot/dts/omap4.dtsi |8 
 1 file changed, 8 insertions(+)

diff --git a/arch/arm/boot/dts/omap4.dtsi b/arch/arm/boot/dts/omap4.dtsi
index 739bb79..ffc7352 100644
--- a/arch/arm/boot/dts/omap4.dtsi
+++ b/arch/arm/boot/dts/omap4.dtsi
@@ -529,5 +529,13 @@
ti,hwmods = timer11;
ti,timer-pwm;
};
+
+   omap_control_usb: omap-control-usb@4a002300 {
+   compatible = ti,omap-control-usb;
+   reg = 0x4a002300 0x4,
+ 0x4a00233c 0x4;
+   reg-names = control_dev_conf, otghs_control;
+   ti,type = 1;
+   };
};
 };
-- 
1.7.10.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v3 6/7] ARM: dts: omap5: Add omap-usb3 and omap-usb2 dt data

2013-03-07 Thread Kishon Vijay Abraham I
Add omap-usb3 and omap-usb2 data node in omap5 device tree file.
The information for the node added here is available @
Documentation/devicetree/bindings/usb/usb-phy.txt

Signed-off-by: Kishon Vijay Abraham I kis...@ti.com
---
 arch/arm/boot/dts/omap5.dtsi |   14 ++
 1 file changed, 14 insertions(+)

diff --git a/arch/arm/boot/dts/omap5.dtsi b/arch/arm/boot/dts/omap5.dtsi
index 230b779..bd73257 100644
--- a/arch/arm/boot/dts/omap5.dtsi
+++ b/arch/arm/boot/dts/omap5.dtsi
@@ -511,6 +511,20 @@
#size-cells = 1;
ranges;
ti,hwmods = ocp2scp1;
+   usb2_phy: usb2phy@4a084000 {
+   compatible = ti,omap-usb2;
+   reg = 0x4a084000 0x7c;
+   ctrl-module = omap_control_usb;
+   };
+
+   usb3_phy: usb3phy@4a084400 {
+   compatible = ti,omap-usb3;
+   reg = 0x4a084400 0x80,
+ 0x4a084800 0x64,
+ 0x4a084c00 0x40;
+   reg-names = phy_rx, phy_tx, pll_ctrl;
+   ctrl-module = omap_control_usb;
+   };
};
};
 };
-- 
1.7.10.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v3 4/7] ARM: dts: omap5: Add omap control usb data

2013-03-07 Thread Kishon Vijay Abraham I
Add omap control usb data in omap5 device tree file. This will have the
register address of registers to power on the USB2 PHY and USB3 PHY. The
information for the node added here is available in
Documentation/devicetree/bindings/usb/omap-usb.txt

Signed-off-by: Kishon Vijay Abraham I kis...@ti.com
---
 arch/arm/boot/dts/omap5.dtsi |8 
 1 file changed, 8 insertions(+)

diff --git a/arch/arm/boot/dts/omap5.dtsi b/arch/arm/boot/dts/omap5.dtsi
index 790bb2a..c937500 100644
--- a/arch/arm/boot/dts/omap5.dtsi
+++ b/arch/arm/boot/dts/omap5.dtsi
@@ -496,5 +496,13 @@
hw-caps-ll-interface;
hw-caps-temp-alert;
};
+
+   omap_control_usb: omap-control-usb@4a002300 {
+   compatible = ti,omap-control-usb;
+   reg = 0x4a002300 0x4,
+ 0x4a002370 0x4;
+   reg-names = control_dev_conf, phy_power_usb;
+   ti,type = 2;
+   };
};
 };
-- 
1.7.10.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v3 0/7] ARM: dts: omap: Add dts data for USB

2013-03-07 Thread Kishon Vijay Abraham I
Hi Benoit,

Here are the dt data patches to get usb device functional in OMAP platforms.

All the patches deal with modifying arch/arm/boot except one which modifies
Documentation/../usb/omap-usb.txt

Changes from v2:
* squashed the dt data for dwc3-omap with dwc3 core into a single patch.

Changes from v1:
Patch *ARM: dts: omap: Add usb_otg and glue data* has some properties with
names that has _. It's replaced with a - here.

This patch is developed on Linux 3.9-rc1.

Kishon Vijay Abraham I (7):
  ARM: dts: omap: Add omap control usb data
  ARM: dts: omap: Add omap-usb2 dt data
  ARM: dts: omap: Add usb_otg and glue data
  ARM: dts: omap5: Add omap control usb data
  ARM: dts: omap5: Add ocp2scp data
  ARM: dts: omap5: Add omap-usb3 and omap-usb2 dt data
  ARM: dts: omap5: add dwc3 omap and dwc3 core dt data

 Documentation/devicetree/bindings/usb/omap-usb.txt |1 +
 arch/arm/boot/dts/omap3-beagle-xm.dts  |6 +++
 arch/arm/boot/dts/omap3-evm.dts|6 +++
 arch/arm/boot/dts/omap3-overo.dtsi |6 +++
 arch/arm/boot/dts/omap3.dtsi   |   12 +
 arch/arm/boot/dts/omap4-panda.dts  |6 +++
 arch/arm/boot/dts/omap4-sdp.dts|6 +++
 arch/arm/boot/dts/omap4.dtsi   |   26 +++
 arch/arm/boot/dts/omap5.dtsi   |   48 
 arch/arm/boot/dts/twl4030.dtsi |2 +-
 10 files changed, 118 insertions(+), 1 deletion(-)

-- 
1.7.10.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2] ARM: OMAP1: fix omap_udc registration

2013-03-07 Thread Felipe Balbi
Hi,

On Thu, Mar 07, 2013 at 03:30:12PM +0200, Aaro Koskinen wrote:
 omap_udc platform device is not registered properly anymore:
 CONFIG_USB_GADGET_OMAP was deleted by 193ab2a6 (usb: gadget: allow
 multiple gadgets to be built) already in v3.1.
 
 Fix by using CONFIG_USB_OMAP instead. Tested on Nokia 770 by checking
 that omap_udc is probed  working properly when built as a module.
 
 Signed-off-by: Aaro Koskinen aaro.koski...@iki.fi

Acked-by: Felipe Balbi ba...@ti.com

 ---
 
   Patch history:
 
   v2: use IS_ENABLED()
 
   v1: http://marc.info/?t=13626088666r=1w=2
 
  arch/arm/mach-omap1/include/mach/usb.h |2 +-
  arch/arm/mach-omap1/usb.c  |6 +++---
  2 files changed, 4 insertions(+), 4 deletions(-)
 
 diff --git a/arch/arm/mach-omap1/include/mach/usb.h 
 b/arch/arm/mach-omap1/include/mach/usb.h
 index 753cd5c..45e5ac7 100644
 --- a/arch/arm/mach-omap1/include/mach/usb.h
 +++ b/arch/arm/mach-omap1/include/mach/usb.h
 @@ -2,7 +2,7 @@
   * FIXME correct answer depends on hmc_mode,
   * as does (on omap1) any nonzero value for config-otg port number
   */
 -#ifdef   CONFIG_USB_GADGET_OMAP
 +#if IS_ENABLED(CONFIG_USB_OMAP)
  #define  is_usb0_device(config)  1
  #else
  #define  is_usb0_device(config)  0
 diff --git a/arch/arm/mach-omap1/usb.c b/arch/arm/mach-omap1/usb.c
 index 1a1db59..4118db5 100644
 --- a/arch/arm/mach-omap1/usb.c
 +++ b/arch/arm/mach-omap1/usb.c
 @@ -123,7 +123,7 @@ omap_otg_init(struct omap_usb_config *config)
   syscon = omap_readl(OTG_SYSCON_1);
   syscon |= HST_IDLE_EN|DEV_IDLE_EN|OTG_IDLE_EN;
  
 -#ifdef   CONFIG_USB_GADGET_OMAP
 +#if IS_ENABLED(CONFIG_USB_OMAP)
   if (config-otg || config-register_dev) {
   struct platform_device *udc_device = config-udc_device;
   int status;
 @@ -169,7 +169,7 @@ omap_otg_init(struct omap_usb_config *config)
  void omap_otg_init(struct omap_usb_config *config) {}
  #endif
  
 -#ifdef   CONFIG_USB_GADGET_OMAP
 +#if IS_ENABLED(CONFIG_USB_OMAP)
  
  static struct resource udc_resources[] = {
   /* order is significant! */
 @@ -600,7 +600,7 @@ static void __init omap_1510_usb_init(struct 
 omap_usb_config *config)
   while (!(omap_readw(ULPD_DPLL_CTRL)  DPLL_LOCK))
   cpu_relax();
  
 -#ifdef   CONFIG_USB_GADGET_OMAP
 +#if IS_ENABLED(CONFIG_USB_OMAP)
   if (config-register_dev) {
   int status;
  
 -- 
 1.7.10.4
 

-- 
balbi


signature.asc
Description: Digital signature


Re: [PATCH 2/2] ARM: dts: add AM33XX MMC support

2013-03-07 Thread Matt Porter
On Thu, Mar 07, 2013 at 05:29:24AM +, Vaibhav Hiremath wrote:
  -Original Message-
  From: linux-omap-ow...@vger.kernel.org [mailto:linux-omap-
  ow...@vger.kernel.org] On Behalf Of Porter, Matt
  Sent: Thursday, March 07, 2013 9:47 AM
  To: Krishnamoorthy, Balaji T; Chris Ball; Cousson, Benoit; Tony
  Lindgren; Russell King
  Cc: Devicetree Discuss; Linux ARM Kernel List; Linux OMAP List; Linux
  Kernel Mailing List; Linux MMC List
  Subject: [PATCH 2/2] ARM: dts: add AM33XX MMC support
  
  Adds AM33XX MMC support for am335x-bone, am335x-evm, and
  am335x-evmsk.
  
  Signed-off-by: Matt Porter mpor...@ti.com
  Acked-by: Tony Lindgren t...@atomide.com
  ---
   arch/arm/boot/dts/am335x-bone.dts  |7 +++
   arch/arm/boot/dts/am335x-evm.dts   |7 +++
   arch/arm/boot/dts/am335x-evmsk.dts |7 +++
   arch/arm/boot/dts/am33xx.dtsi  |   28 
   4 files changed, 49 insertions(+)
  
  diff --git a/arch/arm/boot/dts/am335x-bone.dts
  b/arch/arm/boot/dts/am335x-bone.dts
  index 11b240c..a154ce0 100644
  --- a/arch/arm/boot/dts/am335x-bone.dts
  +++ b/arch/arm/boot/dts/am335x-bone.dts
  @@ -120,6 +120,8 @@
  };
  
  ldo3_reg: regulator@5 {
  +   regulator-min-microvolt = 180;
  +   regulator-max-microvolt = 330;
  regulator-always-on;
  };
  
  @@ -136,3 +138,8 @@
   cpsw_emac1 {
  phy_id = davinci_mdio, 1;
   };
  +
  +mmc1 {
  +   status = okay;
  +   vmmc-supply = ldo3_reg;
  +};
  diff --git a/arch/arm/boot/dts/am335x-evm.dts
  b/arch/arm/boot/dts/am335x-evm.dts
  index d649644..2907da6 100644
  --- a/arch/arm/boot/dts/am335x-evm.dts
  +++ b/arch/arm/boot/dts/am335x-evm.dts
  @@ -232,6 +232,8 @@
  };
  
  vmmc_reg: regulator@12 {
  +   regulator-min-microvolt = 180;
  +   regulator-max-microvolt = 330;
  regulator-always-on;
  };
  };
  @@ -244,3 +246,8 @@
   cpsw_emac1 {
  phy_id = davinci_mdio, 1;
   };
  +
  +mmc1 {
  +   status = okay;
  +   vmmc-supply = vmmc_reg;
  +};
  diff --git a/arch/arm/boot/dts/am335x-evmsk.dts
  b/arch/arm/boot/dts/am335x-evmsk.dts
  index f5a6162..f050c46 100644
  --- a/arch/arm/boot/dts/am335x-evmsk.dts
  +++ b/arch/arm/boot/dts/am335x-evmsk.dts
  @@ -244,7 +244,14 @@
  };
  
  vmmc_reg: regulator@12 {
  +   regulator-min-microvolt = 180;
  +   regulator-max-microvolt = 330;
  regulator-always-on;
  };
  };
   };
  +
  +mmc1 {
  +   status = okay;
  +   vmmc-supply = vmmc_reg;
  +};
  diff --git a/arch/arm/boot/dts/am33xx.dtsi
  b/arch/arm/boot/dts/am33xx.dtsi
  index c3c781a..e029eea 100644
  --- a/arch/arm/boot/dts/am33xx.dtsi
  +++ b/arch/arm/boot/dts/am33xx.dtsi
  @@ -234,6 +234,34 @@
  status = disabled;
  };
  
  +   mmc1: mmc@4806 {
  +   compatible = ti,omap3-hsmmc;
  +   ti,hwmods = mmc1;
  +   ti,dual-volt;
  +   ti,needs-special-reset;
  +   dmas = edma 24
  +   edma 25;
  +   dma-names = tx, rx;
  +   status = disabled;
  +   };
  +
  +   mmc2: mmc@481d8000 {
  +   compatible = ti,omap3-hsmmc;
  +   ti,hwmods = mmc2;
  +   ti,needs-special-reset;
  +   dmas = edma 2
  +   edma 3;
  +   dma-names = tx, rx;
  +   status = disabled;
  +   };
  +
  +   mmc3: mmc@4781 {
  +   compatible = ti,omap3-hsmmc;
  +   ti,hwmods = mmc3;
  +   ti,needs-special-reset;
  +   status = disabled;
  +   };
 Any specific reason why you did not add edma entry here as well?

Yes, I've answered this one before and I think this illustrates a need
for a comment in the .dtsi. mmc3 edma event are on the crossbar and so
the event that will be mapped is system-specific. Since Luca is still
working on DT support for WiLink, there's no way to show an example of
how this is used upstream as that's the only in-kernel user.

I have a test driver I've cited in the postings that shows how the
crossbar is configured via the board .dts. It doesn't belong in the
.dtsi, however, in this case. When WiLink DT support is ready we can
have an entry in the am335x-evmsk.dts that shows this case.

 Also, I wonder why interrupt property is not coming here, I understand
 That hwmod is filling the gap here; but I would still recommend you to 
 complete
 The DT node, as we only support DT boot.

Yeah, I only added needed properties so as to not confuse people as to
where the interrupt resources are coming from. If you feel strongly
about this I don't have a 

RE: [PATCH 2/2] ARM: dts: add AM33XX MMC support

2013-03-07 Thread Hiremath, Vaibhav

 -Original Message-
 From: Matt Porter [mailto:ohio...@gmail.com] On Behalf Of Porter, Matt
 Sent: Thursday, March 07, 2013 7:43 PM
 To: Hiremath, Vaibhav
 Cc: Krishnamoorthy, Balaji T; Chris Ball; Cousson, Benoit; Tony
 Lindgren; Russell King; Devicetree Discuss; Linux ARM Kernel List;
 Linux OMAP List; Linux Kernel Mailing List; Linux MMC List
 Subject: Re: [PATCH 2/2] ARM: dts: add AM33XX MMC support
 
 On Thu, Mar 07, 2013 at 05:29:24AM +, Vaibhav Hiremath wrote:
   -Original Message-
   From: linux-omap-ow...@vger.kernel.org [mailto:linux-omap-
   ow...@vger.kernel.org] On Behalf Of Porter, Matt
   Sent: Thursday, March 07, 2013 9:47 AM
   To: Krishnamoorthy, Balaji T; Chris Ball; Cousson, Benoit; Tony
   Lindgren; Russell King
   Cc: Devicetree Discuss; Linux ARM Kernel List; Linux OMAP List;
 Linux
   Kernel Mailing List; Linux MMC List
   Subject: [PATCH 2/2] ARM: dts: add AM33XX MMC support
  
   Adds AM33XX MMC support for am335x-bone, am335x-evm, and
   am335x-evmsk.
  
   Signed-off-by: Matt Porter mpor...@ti.com
   Acked-by: Tony Lindgren t...@atomide.com
   ---
arch/arm/boot/dts/am335x-bone.dts  |7 +++
arch/arm/boot/dts/am335x-evm.dts   |7 +++
arch/arm/boot/dts/am335x-evmsk.dts |7 +++
arch/arm/boot/dts/am33xx.dtsi  |   28
 
4 files changed, 49 insertions(+)
  
   diff --git a/arch/arm/boot/dts/am335x-bone.dts
   b/arch/arm/boot/dts/am335x-bone.dts
   index 11b240c..a154ce0 100644
   --- a/arch/arm/boot/dts/am335x-bone.dts
   +++ b/arch/arm/boot/dts/am335x-bone.dts
   @@ -120,6 +120,8 @@
 };
  
 ldo3_reg: regulator@5 {
   + regulator-min-microvolt = 180;
   + regulator-max-microvolt = 330;
 regulator-always-on;
 };
  
   @@ -136,3 +138,8 @@
cpsw_emac1 {
 phy_id = davinci_mdio, 1;
};
   +
   +mmc1 {
   + status = okay;
   + vmmc-supply = ldo3_reg;
   +};
   diff --git a/arch/arm/boot/dts/am335x-evm.dts
   b/arch/arm/boot/dts/am335x-evm.dts
   index d649644..2907da6 100644
   --- a/arch/arm/boot/dts/am335x-evm.dts
   +++ b/arch/arm/boot/dts/am335x-evm.dts
   @@ -232,6 +232,8 @@
 };
  
 vmmc_reg: regulator@12 {
   + regulator-min-microvolt = 180;
   + regulator-max-microvolt = 330;
 regulator-always-on;
 };
 };
   @@ -244,3 +246,8 @@
cpsw_emac1 {
 phy_id = davinci_mdio, 1;
};
   +
   +mmc1 {
   + status = okay;
   + vmmc-supply = vmmc_reg;
   +};
   diff --git a/arch/arm/boot/dts/am335x-evmsk.dts
   b/arch/arm/boot/dts/am335x-evmsk.dts
   index f5a6162..f050c46 100644
   --- a/arch/arm/boot/dts/am335x-evmsk.dts
   +++ b/arch/arm/boot/dts/am335x-evmsk.dts
   @@ -244,7 +244,14 @@
 };
  
 vmmc_reg: regulator@12 {
   + regulator-min-microvolt = 180;
   + regulator-max-microvolt = 330;
 regulator-always-on;
 };
 };
};
   +
   +mmc1 {
   + status = okay;
   + vmmc-supply = vmmc_reg;
   +};
   diff --git a/arch/arm/boot/dts/am33xx.dtsi
   b/arch/arm/boot/dts/am33xx.dtsi
   index c3c781a..e029eea 100644
   --- a/arch/arm/boot/dts/am33xx.dtsi
   +++ b/arch/arm/boot/dts/am33xx.dtsi
   @@ -234,6 +234,34 @@
 status = disabled;
 };
  
   + mmc1: mmc@4806 {
   + compatible = ti,omap3-hsmmc;
   + ti,hwmods = mmc1;
   + ti,dual-volt;
   + ti,needs-special-reset;
   + dmas = edma 24
   + edma 25;
   + dma-names = tx, rx;
   + status = disabled;
   + };
   +
   + mmc2: mmc@481d8000 {
   + compatible = ti,omap3-hsmmc;
   + ti,hwmods = mmc2;
   + ti,needs-special-reset;
   + dmas = edma 2
   + edma 3;
   + dma-names = tx, rx;
   + status = disabled;
   + };
   +
   + mmc3: mmc@4781 {
   + compatible = ti,omap3-hsmmc;
   + ti,hwmods = mmc3;
   + ti,needs-special-reset;
   + status = disabled;
   + };
  Any specific reason why you did not add edma entry here as well?
 
 Yes, I've answered this one before and I think this illustrates a need
 for a comment in the .dtsi. mmc3 edma event are on the crossbar and so
 the event that will be mapped is system-specific. Since Luca is still
 working on DT support for WiLink, there's no way to show an example of
 how this is used upstream as that's the only in-kernel user.
 
 I have a test driver I've cited in the postings that shows how the
 crossbar is configured via the board .dts. It doesn't belong in the
 .dtsi, however, in this case. When WiLink DT support is 

[RFC PATCH 0/4] USB: OMAP: Tahvo USB support for 770

2013-03-07 Thread Aaro Koskinen
Hi,

These patches add support for Tahvo USB transceiver and allow use both
host and peripheral modes on Nokia 770.

Patches work with 3.9-rc1, but the following fixes must be also applied:

ARM: OMAP1: fix USB host on 1710
http://marc.info/?l=linux-omapm=135906630828618w=2

usb: gadget: fix omap_udc build errors
http://marc.info/?l=linux-arm-kernelm=136252187712475w=2

ARM: OMAP1: fix omap_udc registration
http://marc.info/?l=linux-omapm=136266305725974w=2

Test cases were roughly following:

- CONFIG_USB_OTG, CONFIG_TAHVO_USB_HOST_BY_DEFAULT
- ohci-hcd, omap_udc, g_ether loaded as modules during boot
- check host mode functionality after boot with USB keyboard
- switch to peripheral mode and check functionality with ssh
- switch back to host mode

- CONFIG_USB_OTG, !CONFIG_TAHVO_USB_HOST_BY_DEFAULT
- ohci-hcd, omap_udc, g_ether loaded as modules during boot
- check peripheral mode after boot with ssh
- switch to host mode and check with USB keyboard
- switch back to peripheral mode

- !CONFIG_USB_OTG, CONFIG_USB_OMAP
- check peripheral mode after boot by logging with ssh

- !CONFIG_USB_OTG, !CONFIG_USB_OMAP
- (not currently supported by ohci-hcd)

- other
- check USB cable on/off detection (Tahvo vbus interrupt)

Please review and comment. Thanks,

A.

Aaro Koskinen (4):
  retu-mfd: support also Tahvo
  ARM: OMAP1: nokia770: enable Tahvo
  USB: OMAP: move omap-otg out from isp1301_omap
  USB: OMAP: Tahvo USB transceiver driver

 arch/arm/mach-omap1/board-nokia770.c |   10 +
 drivers/mfd/Kconfig  |6 +-
 drivers/mfd/retu-mfd.c   |   95 -
 drivers/usb/otg/Kconfig  |   21 ++
 drivers/usb/otg/Makefile |2 +
 drivers/usb/otg/isp1301_omap.c   |   78 +
 drivers/usb/otg/omap-otg.c   |   99 ++
 drivers/usb/otg/tahvo-usb.c  |  643 ++
 include/linux/mfd/retu.h |8 +-
 include/linux/usb/omap-otg.h |   30 ++
 10 files changed, 900 insertions(+), 92 deletions(-)
 create mode 100644 drivers/usb/otg/omap-otg.c
 create mode 100644 drivers/usb/otg/tahvo-usb.c
 create mode 100644 include/linux/usb/omap-otg.h

-- 
1.7.10.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[RFC PATCH 2/4] ARM: OMAP1: nokia770: enable Tahvo

2013-03-07 Thread Aaro Koskinen
Add platform data for Tahvo.

Signed-off-by: Aaro Koskinen aaro.koski...@iki.fi
---
 arch/arm/mach-omap1/board-nokia770.c |   10 ++
 1 file changed, 10 insertions(+)

diff --git a/arch/arm/mach-omap1/board-nokia770.c 
b/arch/arm/mach-omap1/board-nokia770.c
index 62a15e2..91449c5 100644
--- a/arch/arm/mach-omap1/board-nokia770.c
+++ b/arch/arm/mach-omap1/board-nokia770.c
@@ -234,16 +234,26 @@ static struct i2c_board_info nokia770_i2c_board_info_2[] 
__initdata = {
{
I2C_BOARD_INFO(retu-mfd, 0x01),
},
+   {
+   I2C_BOARD_INFO(tahvo-mfd, 0x02),
+   },
 };
 
 static void __init nokia770_cbus_init(void)
 {
const int retu_irq_gpio = 62;
+   const int tahvo_irq_gpio = 40;
 
if (gpio_request_one(retu_irq_gpio, GPIOF_IN, Retu IRQ))
return;
+   if (gpio_request_one(tahvo_irq_gpio, GPIOF_IN, Tahvo IRQ)) {
+   gpio_free(retu_irq_gpio);
+   return;
+   }
irq_set_irq_type(gpio_to_irq(retu_irq_gpio), IRQ_TYPE_EDGE_RISING);
+   irq_set_irq_type(gpio_to_irq(tahvo_irq_gpio), IRQ_TYPE_EDGE_RISING);
nokia770_i2c_board_info_2[0].irq = gpio_to_irq(retu_irq_gpio);
+   nokia770_i2c_board_info_2[1].irq = gpio_to_irq(tahvo_irq_gpio);
i2c_register_board_info(2, nokia770_i2c_board_info_2,
ARRAY_SIZE(nokia770_i2c_board_info_2));
platform_device_register(nokia770_cbus_device);
-- 
1.7.10.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[RFC PATCH 4/4] USB: OMAP: Tahvo USB transceiver driver

2013-03-07 Thread Aaro Koskinen
Add Tahvo USB transceiver driver.

Based on old code from linux-omap tree. The original driver was written
by Juha Yrjölä, Tony Lindgren, and Timo Teräs.

Signed-off-by: Aaro Koskinen aaro.koski...@iki.fi
---
 drivers/usb/otg/Kconfig |   16 ++
 drivers/usb/otg/Makefile|1 +
 drivers/usb/otg/tahvo-usb.c |  643 +++
 3 files changed, 660 insertions(+)
 create mode 100644 drivers/usb/otg/tahvo-usb.c

diff --git a/drivers/usb/otg/Kconfig b/drivers/usb/otg/Kconfig
index 12af870..86b5ebe 100644
--- a/drivers/usb/otg/Kconfig
+++ b/drivers/usb/otg/Kconfig
@@ -61,6 +61,22 @@ config USB_ULPI_VIEWPORT
  Provides read/write operations to the ULPI phy register set for
  controllers with a viewport register (e.g. Chipidea/ARC controllers).
 
+config TAHVO_USB
+   tristate Tahvo USB transceiver driver
+   depends on MFD_RETU  ARCH_OMAP_OTG
+   select OMAP_OTG
+   select USB_OTG_UTILS
+   help
+ Enable this to support USB transceiver on Tahvo. This is used
+ at least on Nokia 770.
+
+config TAHVO_USB_HOST_BY_DEFAULT
+   depends on TAHVO_USB  USB_OTG
+   boolean Device in USB host mode by default
+   ---help---
+ Say Y here, if you want the device to enter USB host mode
+ by default on bootup.
+
 config TWL4030_USB
tristate TWL4030 USB Transceiver Driver
depends on TWL4030_CORE  REGULATOR_TWL4030  USB_MUSB_OMAP2PLUS
diff --git a/drivers/usb/otg/Makefile b/drivers/usb/otg/Makefile
index 4e05c6a..31e28ef 100644
--- a/drivers/usb/otg/Makefile
+++ b/drivers/usb/otg/Makefile
@@ -12,6 +12,7 @@ obj-$(CONFIG_USB_OTG_UTILS)   += otg.o
 obj-$(CONFIG_USB_GPIO_VBUS)+= gpio_vbus.o
 obj-$(CONFIG_OMAP_OTG) += omap-otg.o
 obj-$(CONFIG_ISP1301_OMAP) += isp1301_omap.o
+obj-$(CONFIG_TAHVO_USB)+= tahvo-usb.o
 obj-$(CONFIG_TWL4030_USB)  += twl4030-usb.o
 obj-$(CONFIG_TWL6030_USB)  += twl6030-usb.o
 obj-$(CONFIG_NOP_USB_XCEIV)+= nop-usb-xceiv.o
diff --git a/drivers/usb/otg/tahvo-usb.c b/drivers/usb/otg/tahvo-usb.c
new file mode 100644
index 000..3286457
--- /dev/null
+++ b/drivers/usb/otg/tahvo-usb.c
@@ -0,0 +1,643 @@
+/*
+ * Tahvo USB transceiver driver
+ *
+ * Copyright (C) 2005-2006 Nokia Corporation
+ *
+ * Parts copied from drivers/i2c/chips/isp1301_omap.c
+ * Copyright (C) 2004 Texas Instruments
+ * Copyright (C) 2004 David Brownell
+ *
+ * Original driver written by Juha Yrjölä, Tony Lindgren and Timo Teräs.
+ * Modified for Retu/Tahvo MFD by Aaro Koskinen.
+ *
+ * This file is subject to the terms and conditions of the GNU General
+ * Public License. See the file COPYING in the main directory of this
+ * archive for more details.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#include linux/io.h
+#include linux/clk.h
+#include linux/usb.h
+#include linux/kernel.h
+#include linux/module.h
+#include linux/usb/otg.h
+#include linux/mfd/retu.h
+#include linux/usb/gadget.h
+#include linux/usb/omap-otg.h
+#include linux/platform_device.h
+
+#include mach/usb.h
+
+#define DRIVER_NAME tahvo-usb
+
+#define TAHVO_REG_IDSR 0x02
+#define TAHVO_REG_USBR 0x06
+
+#define USBR_SLAVE_CONTROL (1  8)
+#define USBR_VPPVIO_SW (1  7)
+#define USBR_SPEED (1  6)
+#define USBR_REGOUT(1  5)
+#define USBR_MASTER_SW2(1  4)
+#define USBR_MASTER_SW1(1  3)
+#define USBR_SLAVE_SW  (1  2)
+#define USBR_NSUSPEND  (1  1)
+#define USBR_SEMODE(1  0)
+
+#define TAHVO_MODE_HOST0
+#define TAHVO_MODE_PERIPHERAL  1
+
+#ifdef CONFIG_USB_OTG
+#define TAHVO_MODE(tu) ((tu)-tahvo_mode)
+#elif IS_ENABLED(CONFIG_USB_OMAP)
+#define TAHVO_MODE(tu) TAHVO_MODE_PERIPHERAL
+#else
+#define TAHVO_MODE(tu) TAHVO_MODE_HOST
+#endif
+
+struct tahvo_usb {
+   struct platform_device  *pt_dev;
+   struct usb_phy  phy;
+   int vbus_state;
+   struct mutexserialize;
+   struct clk  *ick;
+   int irq;
+#ifdef CONFIG_USB_OTG
+   int tahvo_mode;
+#endif
+};
+
+/*
+ * ---
+ * OTG related functions
+ *
+ * These should be separated into omap-otg.c driver module, as they are used
+ * by various transceivers. These functions are needed in the UDC-only case
+ * as well. These functions are copied from GPL isp1301_omap.c
+ * ---
+ */
+static irqreturn_t omap_otg_irq(int irq, void *arg)
+{
+   struct tahvo_usb *tu = arg;
+   struct usb_otg *otg = tu-phy.otg;
+   u16 otg_irq;
+
+   otg_irq = 

[RFC PATCH 3/4] USB: OMAP: move omap-otg out from isp1301_omap

2013-03-07 Thread Aaro Koskinen
omap-otg platform device will be needed also by other transceivers.
It's not possible to have multiple instances of the driver, so it needs
to be moved into a separate file so that other drivers can hook into it.

Start this change with a very simplest implementation, much of the
OMAP OTG code in isp1301 is tightly coupled with isp1301 and cannot be
trivially moved out, but still this provides a way for other drivers to
register to OTG interrupt.

Signed-off-by: Aaro Koskinen aaro.koski...@iki.fi
---
 drivers/usb/otg/Kconfig|5 ++
 drivers/usb/otg/Makefile   |1 +
 drivers/usb/otg/isp1301_omap.c |   78 ++-
 drivers/usb/otg/omap-otg.c |   99 
 include/linux/usb/omap-otg.h   |   30 
 5 files changed, 138 insertions(+), 75 deletions(-)
 create mode 100644 drivers/usb/otg/omap-otg.c
 create mode 100644 include/linux/usb/omap-otg.h

diff --git a/drivers/usb/otg/Kconfig b/drivers/usb/otg/Kconfig
index 37962c9..12af870 100644
--- a/drivers/usb/otg/Kconfig
+++ b/drivers/usb/otg/Kconfig
@@ -27,9 +27,14 @@ config USB_GPIO_VBUS
  optionally control of a D+ pullup GPIO as well as a VBUS
  current limit regulator.
 
+config OMAP_OTG
+   tristate
+   depends on ARCH_OMAP_OTG
+
 config ISP1301_OMAP
tristate Philips ISP1301 with OMAP OTG
depends on I2C  ARCH_OMAP_OTG
+   select OMAP_OTG if USB_OTG
select USB_OTG_UTILS
help
  If you say yes here you get support for the Philips ISP1301
diff --git a/drivers/usb/otg/Makefile b/drivers/usb/otg/Makefile
index a844b8d..4e05c6a 100644
--- a/drivers/usb/otg/Makefile
+++ b/drivers/usb/otg/Makefile
@@ -10,6 +10,7 @@ obj-$(CONFIG_USB_OTG_UTILS)   += otg.o
 
 # transceiver drivers
 obj-$(CONFIG_USB_GPIO_VBUS)+= gpio_vbus.o
+obj-$(CONFIG_OMAP_OTG) += omap-otg.o
 obj-$(CONFIG_ISP1301_OMAP) += isp1301_omap.o
 obj-$(CONFIG_TWL4030_USB)  += twl4030-usb.o
 obj-$(CONFIG_TWL6030_USB)  += twl6030-usb.o
diff --git a/drivers/usb/otg/isp1301_omap.c b/drivers/usb/otg/isp1301_omap.c
index af9cb11..5217b7e 100644
--- a/drivers/usb/otg/isp1301_omap.c
+++ b/drivers/usb/otg/isp1301_omap.c
@@ -28,6 +28,7 @@
 #include linux/gpio.h
 #include linux/usb/ch9.h
 #include linux/usb/gadget.h
+#include linux/usb/omap-otg.h
 #include linux/usb.h
 #include linux/usb/otg.h
 #include linux/i2c.h
@@ -74,22 +75,6 @@ struct isp1301 {
 #  define WORK_STOP7   /* don't resubmit */
 };
 
-
-/* bits in OTG_CTRL */
-
-#defineOTG_XCEIV_OUTPUTS \
-   (OTG_ASESSVLD|OTG_BSESSEND|OTG_BSESSVLD|OTG_VBUSVLD|OTG_ID)
-#defineOTG_XCEIV_INPUTS \
-   (OTG_PULLDOWN|OTG_PULLUP|OTG_DRV_VBUS|OTG_PD_VBUS|OTG_PU_VBUS|OTG_PU_ID)
-#defineOTG_CTRL_BITS \
-   (OTG_A_BUSREQ|OTG_A_SETB_HNPEN|OTG_B_BUSREQ|OTG_B_HNPEN|OTG_BUSDROP)
-   /* and OTG_PULLUP is sometimes written */
-
-#defineOTG_CTRL_MASK   (OTG_DRIVER_SEL| \
-   OTG_XCEIV_OUTPUTS|OTG_XCEIV_INPUTS| \
-   OTG_CTRL_BITS)
-
-
 /*-*/
 
 /* board-specific PM hooks */
@@ -822,15 +807,10 @@ static irqreturn_t omap_otg_irq(int irq, void *_isp)
return ret;
 }
 
-static struct platform_device *otg_dev;
-
 static int isp1301_otg_init(struct isp1301 *isp)
 {
u32 l;
 
-   if (!otg_dev)
-   return -ENODEV;
-
dump_regs(isp, __func__);
/* some of these values are board-specific... */
l = omap_readl(OTG_SYSCON_2);
@@ -864,58 +844,6 @@ static int isp1301_otg_init(struct isp1301 *isp)
return 0;
 }
 
-static int otg_probe(struct platform_device *dev)
-{
-   // struct omap_usb_config *config = dev-platform_data;
-
-   otg_dev = dev;
-   return 0;
-}
-
-static int otg_remove(struct platform_device *dev)
-{
-   otg_dev = NULL;
-   return 0;
-}
-
-static struct platform_driver omap_otg_driver = {
-   .probe  = otg_probe,
-   .remove = otg_remove,
-   .driver = {
-   .owner  = THIS_MODULE,
-   .name   = omap_otg,
-   },
-};
-
-static int otg_bind(struct isp1301 *isp)
-{
-   int status;
-
-   if (otg_dev)
-   return -EBUSY;
-
-   status = platform_driver_register(omap_otg_driver);
-   if (status  0)
-   return status;
-
-   if (otg_dev)
-   status = request_irq(otg_dev-resource[1].start, omap_otg_irq,
-   0, DRIVER_NAME, isp);
-   else
-   status = -ENODEV;
-
-   if (status  0)
-   platform_driver_unregister(omap_otg_driver);
-   return status;
-}
-
-static void otg_unbind(struct isp1301 *isp)
-{
-   if (!otg_dev)
-   return;
-   free_irq(otg_dev-resource[1].start, isp);
-}
-
 #else
 
 /* OTG controller isn't clocked */
@@ -1222,7 +1150,7 @@ static int __exit isp1301_remove(struct 

[RFC PATCH 1/4] retu-mfd: support also Tahvo

2013-03-07 Thread Aaro Koskinen
Tahvo is a multi-function device on Nokia 770, implementing USB
transceiver and charge/battery control.

It's so close to Retu that a single driver can support both.

Signed-off-by: Aaro Koskinen aaro.koski...@iki.fi
Cc: Samuel Ortiz sa...@linux.intel.com
---
 drivers/mfd/Kconfig  |6 +--
 drivers/mfd/retu-mfd.c   |   95 +++---
 include/linux/mfd/retu.h |8 +++-
 3 files changed, 92 insertions(+), 17 deletions(-)

diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
index 671f5b1..0c3bdae 100644
--- a/drivers/mfd/Kconfig
+++ b/drivers/mfd/Kconfig
@@ -1101,13 +1101,13 @@ config MFD_VIPERBOARD
  The drivers do not support all features the board exposes.
 
 config MFD_RETU
-   tristate Support for Retu multi-function device
+   tristate Support for Retu and Tahvo multi-function devices
select MFD_CORE
depends on I2C  GENERIC_HARDIRQS
select REGMAP_IRQ
help
- Retu is a multi-function device found on Nokia Internet Tablets
- (770, N800 and N810).
+ Retu and Tahvo are multi-function devices found on Nokia
+ Internet Tablets (770, N800 and N810).
 
 config MFD_AS3711
bool Support for AS3711
diff --git a/drivers/mfd/retu-mfd.c b/drivers/mfd/retu-mfd.c
index 3ba0486..fa0204b 100644
--- a/drivers/mfd/retu-mfd.c
+++ b/drivers/mfd/retu-mfd.c
@@ -1,5 +1,5 @@
 /*
- * Retu MFD driver
+ * Retu/Tahvo MFD driver
  *
  * Copyright (C) 2004, 2005 Nokia Corporation
  *
@@ -29,11 +29,15 @@
 #include linux/interrupt.h
 #include linux/moduleparam.h
 
+#define RETU_ID0
+#define TAHVO_ID   1
+
 /* Registers */
 #define RETU_REG_ASICR 0x00/* ASIC ID and revision */
 #define RETU_REG_ASICR_VILMA   (1  7)/* Bit indicating Vilma */
 #define RETU_REG_IDR   0x01/* Interrupt ID */
-#define RETU_REG_IMR   0x02/* Interrupt mask */
+#define RETU_REG_IMR   0x02/* Interrupt mask (Retu) */
+#define TAHVO_REG_IMR  0x03/* Interrupt mask (Tahvo) */
 
 /* Interrupt sources */
 #define RETU_INT_PWR   0   /* Power button */
@@ -84,6 +88,62 @@ static struct regmap_irq_chip retu_irq_chip = {
 /* Retu device registered for the power off. */
 static struct retu_dev *retu_pm_power_off;
 
+static struct resource tahvo_usb_res[] = {
+   {
+   .name   = tahvo-usb,
+   .start  = TAHVO_INT_VBUS,
+   .end= TAHVO_INT_VBUS,
+   .flags  = IORESOURCE_IRQ,
+   },
+};
+
+static struct mfd_cell tahvo_devs[] = {
+   {
+   .name   = tahvo-usb,
+   .resources  = tahvo_usb_res,
+   .num_resources  = ARRAY_SIZE(tahvo_usb_res),
+   },
+};
+
+static struct regmap_irq tahvo_irqs[] = {
+   [TAHVO_INT_VBUS] = {
+   .mask = 1  TAHVO_INT_VBUS,
+   }
+};
+
+static struct regmap_irq_chip tahvo_irq_chip = {
+   .name   = TAHVO,
+   .irqs   = tahvo_irqs,
+   .num_irqs   = ARRAY_SIZE(tahvo_irqs),
+   .num_regs   = 1,
+   .status_base= RETU_REG_IDR,
+   .mask_base  = TAHVO_REG_IMR,
+   .ack_base   = RETU_REG_IDR,
+};
+
+static const struct {
+   char*chip_name;
+   char*companion_name;
+   struct regmap_irq_chip  *irq_chip;
+   struct mfd_cell *children;
+   int nchildren;
+} retu_data[] = {
+   [RETU_ID] = {
+   .chip_name  = Retu,
+   .companion_name = Vilma,
+   .irq_chip   = retu_irq_chip,
+   .children   = retu_devs,
+   .nchildren  = ARRAY_SIZE(retu_devs),
+   },
+   [TAHVO_ID] = {
+   .chip_name  = Tahvo,
+   .companion_name = Betty,
+   .irq_chip   = tahvo_irq_chip,
+   .children   = tahvo_devs,
+   .nchildren  = ARRAY_SIZE(tahvo_devs),
+   }
+};
+
 int retu_read(struct retu_dev *rdev, u8 reg)
 {
int ret;
@@ -173,9 +233,13 @@ static struct regmap_config retu_config = {
 
 static int retu_probe(struct i2c_client *i2c, const struct i2c_device_id *id)
 {
+   int chip = id-driver_data;
struct retu_dev *rdev;
int ret;
 
+   if (chip = ARRAY_SIZE(retu_data))
+   return -EINVAL;
+
rdev = devm_kzalloc(i2c-dev, sizeof(*rdev), GFP_KERNEL);
if (rdev == NULL)
return -ENOMEM;
@@ -190,33 +254,37 @@ static int retu_probe(struct i2c_client *i2c, const 
struct i2c_device_id *id)
 
ret = retu_read(rdev, RETU_REG_ASICR);
if (ret  0) {
-   dev_err(rdev-dev, could not read Retu revision: %d\n, ret);
+   dev_err(rdev-dev, could not read %s revision: %d\n,
+   retu_data[chip].chip_name, ret);
return ret;
 

[PATCH v2] usb: phy: remove CONFIG_USB_OTG_UTILS

2013-03-07 Thread Felipe Balbi
there are no more users of CONFIG_USB_OTG_UTILS
left in tree, we can remove it just fine.

Signed-off-by: Felipe Balbi ba...@ti.com
---

v1 - v2:
. removed a few extra instances which my original (and stupid)
grep didn't find

 drivers/power/Kconfig  |  2 +-
 drivers/usb/dwc3/Kconfig   |  1 -
 drivers/usb/gadget/Kconfig |  3 ---
 drivers/usb/host/Kconfig   |  1 -
 drivers/usb/musb/Kconfig   |  1 -
 drivers/usb/phy/Kconfig| 23 ---
 6 files changed, 1 insertion(+), 30 deletions(-)

diff --git a/drivers/power/Kconfig b/drivers/power/Kconfig
index 9e00c38..ffe02fb 100644
--- a/drivers/power/Kconfig
+++ b/drivers/power/Kconfig
@@ -254,7 +254,7 @@ config BATTERY_RX51
 
 config CHARGER_ISP1704
tristate ISP1704 USB Charger Detection
-   depends on USB_OTG_UTILS
+   depends on USB_PHY
help
  Say Y to enable support for USB Charger Detection with
  ISP1707/ISP1704 USB transceivers.
diff --git a/drivers/usb/dwc3/Kconfig b/drivers/usb/dwc3/Kconfig
index 68e9a2c..ea5ee9c 100644
--- a/drivers/usb/dwc3/Kconfig
+++ b/drivers/usb/dwc3/Kconfig
@@ -1,7 +1,6 @@
 config USB_DWC3
tristate DesignWare USB3 DRD Core Support
depends on (USB || USB_GADGET)  GENERIC_HARDIRQS
-   select USB_OTG_UTILS
select USB_XHCI_PLATFORM if USB_SUPPORT  USB_XHCI_HCD
help
  Say Y or M here if your system has a Dual Role SuperSpeed
diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig
index 50586ff..7ad108a 100644
--- a/drivers/usb/gadget/Kconfig
+++ b/drivers/usb/gadget/Kconfig
@@ -195,7 +195,6 @@ config USB_OMAP
tristate OMAP USB Device Controller
depends on ARCH_OMAP1
select ISP1301_OMAP if MACH_OMAP_H2 || MACH_OMAP_H3 || MACH_OMAP_H4_OTG
-   select USB_OTG_UTILS if ARCH_OMAP
help
   Many Texas Instruments OMAP processors have flexible full
   speed USB device controllers, with support for up to 30
@@ -210,7 +209,6 @@ config USB_OMAP
 config USB_PXA25X
tristate PXA 25x or IXP 4xx
depends on (ARCH_PXA  PXA25x) || ARCH_IXP4XX
-   select USB_OTG_UTILS
help
   Intel's PXA 25x series XScale ARM-5TE processors include
   an integrated full speed USB 1.1 device controller.  The
@@ -258,7 +256,6 @@ config USB_RENESAS_USBHS_UDC
 
 config USB_PXA27X
tristate PXA 27x
-   select USB_OTG_UTILS
help
   Intel's PXA 27x series XScale ARM v5TE processors include
   an integrated full speed USB 1.1 device controller.
diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
index c59a112..ba1347c 100644
--- a/drivers/usb/host/Kconfig
+++ b/drivers/usb/host/Kconfig
@@ -300,7 +300,6 @@ config USB_OHCI_HCD
tristate OHCI HCD support
depends on USB  USB_ARCH_HAS_OHCI
select ISP1301_OMAP if MACH_OMAP_H2 || MACH_OMAP_H3
-   select USB_OTG_UTILS if ARCH_OMAP
depends on USB_ISP1301 || !ARCH_LPC32XX
---help---
  The Open Host Controller Interface (OHCI) is a standard for accessing
diff --git a/drivers/usb/musb/Kconfig b/drivers/usb/musb/Kconfig
index b387431..079330b 100644
--- a/drivers/usb/musb/Kconfig
+++ b/drivers/usb/musb/Kconfig
@@ -10,7 +10,6 @@ config USB_MUSB_HDRC
select NOP_USB_XCEIV if (ARCH_DAVINCI || MACH_OMAP3EVM || BLACKFIN)
select NOP_USB_XCEIV if (SOC_TI81XX || SOC_AM33XX)
select OMAP_CONTROL_USB if MACH_OMAP_4430SDP || MACH_OMAP4_PANDA
-   select USB_OTG_UTILS
help
  Say Y here if your system has a dual role high speed USB
  controller based on the Mentor Graphics silicon IP.  Then
diff --git a/drivers/usb/phy/Kconfig b/drivers/usb/phy/Kconfig
index 832cd69..97de6de 100644
--- a/drivers/usb/phy/Kconfig
+++ b/drivers/usb/phy/Kconfig
@@ -3,7 +3,6 @@
 #
 menuconfig USB_PHY
tristate USB Physical Layer drivers
-   select USB_OTG_UTILS
help
  USB controllers (those which are host, device or DRD) need a
  device to handle the physical layer signalling, commonly called
@@ -13,19 +12,12 @@ menuconfig USB_PHY
 
 if USB_PHY
 
-config USB_OTG_UTILS
-   bool
-   help
- Select this to make sure the build includes objects from
- the OTG infrastructure directory.
-
 #
 # USB Transceiver Drivers
 #
 config AB8500_USB
tristate AB8500 USB Transceiver Driver
depends on AB8500_CORE
-   select USB_OTG_UTILS
help
  Enable this to support the USB OTG transceiver in AB8500 chip.
  This transceiver supports high and full speed devices plus,
@@ -35,14 +27,12 @@ config FSL_USB2_OTG
bool Freescale USB OTG Transceiver Driver
depends on USB_EHCI_FSL  USB_FSL_USB2  USB_SUSPEND
select USB_OTG
-   select USB_OTG_UTILS
help
  Enable this to support Freescale USB OTG transceiver.
 
 config ISP1301_OMAP
tristate Philips ISP1301 with OMAP OTG

Re: [PATCH 2/2] ARM: dts: add AM33XX MMC support

2013-03-07 Thread Matt Porter
On Thu, Mar 07, 2013 at 02:39:55PM +, Vaibhav Hiremath wrote:
 
  -Original Message-
  From: Matt Porter [mailto:ohio...@gmail.com] On Behalf Of Porter, Matt
  Sent: Thursday, March 07, 2013 7:43 PM
  To: Hiremath, Vaibhav
  Cc: Krishnamoorthy, Balaji T; Chris Ball; Cousson, Benoit; Tony
  Lindgren; Russell King; Devicetree Discuss; Linux ARM Kernel List;
  Linux OMAP List; Linux Kernel Mailing List; Linux MMC List
  Subject: Re: [PATCH 2/2] ARM: dts: add AM33XX MMC support
  
  On Thu, Mar 07, 2013 at 05:29:24AM +, Vaibhav Hiremath wrote:
-Original Message-
From: linux-omap-ow...@vger.kernel.org [mailto:linux-omap-
ow...@vger.kernel.org] On Behalf Of Porter, Matt
Sent: Thursday, March 07, 2013 9:47 AM
To: Krishnamoorthy, Balaji T; Chris Ball; Cousson, Benoit; Tony
Lindgren; Russell King
Cc: Devicetree Discuss; Linux ARM Kernel List; Linux OMAP List;
  Linux
Kernel Mailing List; Linux MMC List
Subject: [PATCH 2/2] ARM: dts: add AM33XX MMC support
   
Adds AM33XX MMC support for am335x-bone, am335x-evm, and
am335x-evmsk.
   
Signed-off-by: Matt Porter mpor...@ti.com
Acked-by: Tony Lindgren t...@atomide.com
---
 arch/arm/boot/dts/am335x-bone.dts  |7 +++
 arch/arm/boot/dts/am335x-evm.dts   |7 +++
 arch/arm/boot/dts/am335x-evmsk.dts |7 +++
 arch/arm/boot/dts/am33xx.dtsi  |   28
  
 4 files changed, 49 insertions(+)
   
diff --git a/arch/arm/boot/dts/am335x-bone.dts
b/arch/arm/boot/dts/am335x-bone.dts
index 11b240c..a154ce0 100644
--- a/arch/arm/boot/dts/am335x-bone.dts
+++ b/arch/arm/boot/dts/am335x-bone.dts
@@ -120,6 +120,8 @@
};
   
ldo3_reg: regulator@5 {
+   regulator-min-microvolt = 180;
+   regulator-max-microvolt = 330;
regulator-always-on;
};
   
@@ -136,3 +138,8 @@
 cpsw_emac1 {
phy_id = davinci_mdio, 1;
 };
+
+mmc1 {
+   status = okay;
+   vmmc-supply = ldo3_reg;
+};
diff --git a/arch/arm/boot/dts/am335x-evm.dts
b/arch/arm/boot/dts/am335x-evm.dts
index d649644..2907da6 100644
--- a/arch/arm/boot/dts/am335x-evm.dts
+++ b/arch/arm/boot/dts/am335x-evm.dts
@@ -232,6 +232,8 @@
};
   
vmmc_reg: regulator@12 {
+   regulator-min-microvolt = 180;
+   regulator-max-microvolt = 330;
regulator-always-on;
};
};
@@ -244,3 +246,8 @@
 cpsw_emac1 {
phy_id = davinci_mdio, 1;
 };
+
+mmc1 {
+   status = okay;
+   vmmc-supply = vmmc_reg;
+};
diff --git a/arch/arm/boot/dts/am335x-evmsk.dts
b/arch/arm/boot/dts/am335x-evmsk.dts
index f5a6162..f050c46 100644
--- a/arch/arm/boot/dts/am335x-evmsk.dts
+++ b/arch/arm/boot/dts/am335x-evmsk.dts
@@ -244,7 +244,14 @@
};
   
vmmc_reg: regulator@12 {
+   regulator-min-microvolt = 180;
+   regulator-max-microvolt = 330;
regulator-always-on;
};
};
 };
+
+mmc1 {
+   status = okay;
+   vmmc-supply = vmmc_reg;
+};
diff --git a/arch/arm/boot/dts/am33xx.dtsi
b/arch/arm/boot/dts/am33xx.dtsi
index c3c781a..e029eea 100644
--- a/arch/arm/boot/dts/am33xx.dtsi
+++ b/arch/arm/boot/dts/am33xx.dtsi
@@ -234,6 +234,34 @@
status = disabled;
};
   
+   mmc1: mmc@4806 {
+   compatible = ti,omap3-hsmmc;
+   ti,hwmods = mmc1;
+   ti,dual-volt;
+   ti,needs-special-reset;
+   dmas = edma 24
+   edma 25;
+   dma-names = tx, rx;
+   status = disabled;
+   };
+
+   mmc2: mmc@481d8000 {
+   compatible = ti,omap3-hsmmc;
+   ti,hwmods = mmc2;
+   ti,needs-special-reset;
+   dmas = edma 2
+   edma 3;
+   dma-names = tx, rx;
+   status = disabled;
+   };
+
+   mmc3: mmc@4781 {
+   compatible = ti,omap3-hsmmc;
+   ti,hwmods = mmc3;
+   ti,needs-special-reset;
+   status = disabled;
+   };
   Any specific reason why you did not add edma entry here as well?
  
  Yes, 

Re: [RFC PATCH 1/4] retu-mfd: support also Tahvo

2013-03-07 Thread Felipe Balbi
Hi,

On Thu, Mar 07, 2013 at 04:40:18PM +0200, Aaro Koskinen wrote:
 Tahvo is a multi-function device on Nokia 770, implementing USB
 transceiver and charge/battery control.
 
 It's so close to Retu that a single driver can support both.
 
 Signed-off-by: Aaro Koskinen aaro.koski...@iki.fi
 Cc: Samuel Ortiz sa...@linux.intel.com
 ---
  drivers/mfd/Kconfig  |6 +--
  drivers/mfd/retu-mfd.c   |   95 
 +++---
  include/linux/mfd/retu.h |8 +++-
  3 files changed, 92 insertions(+), 17 deletions(-)
 
 diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
 index 671f5b1..0c3bdae 100644
 --- a/drivers/mfd/Kconfig
 +++ b/drivers/mfd/Kconfig
 @@ -1101,13 +1101,13 @@ config MFD_VIPERBOARD
 The drivers do not support all features the board exposes.
  
  config MFD_RETU
 - tristate Support for Retu multi-function device
 + tristate Support for Retu and Tahvo multi-function devices
   select MFD_CORE
   depends on I2C  GENERIC_HARDIRQS
   select REGMAP_IRQ
   help
 -   Retu is a multi-function device found on Nokia Internet Tablets
 -   (770, N800 and N810).
 +   Retu and Tahvo are multi-function devices found on Nokia
 +   Internet Tablets (770, N800 and N810).
  
  config MFD_AS3711
   bool Support for AS3711
 diff --git a/drivers/mfd/retu-mfd.c b/drivers/mfd/retu-mfd.c
 index 3ba0486..fa0204b 100644
 --- a/drivers/mfd/retu-mfd.c
 +++ b/drivers/mfd/retu-mfd.c
 @@ -1,5 +1,5 @@
  /*
 - * Retu MFD driver
 + * Retu/Tahvo MFD driver
   *
   * Copyright (C) 2004, 2005 Nokia Corporation
   *
 @@ -29,11 +29,15 @@
  #include linux/interrupt.h
  #include linux/moduleparam.h
  
 +#define RETU_ID  0
 +#define TAHVO_ID 1

do you really need this ? Why didn't you use the i2c address as the
device ID ?

 @@ -173,9 +233,13 @@ static struct regmap_config retu_config = {
  
  static int retu_probe(struct i2c_client *i2c, const struct i2c_device_id *id)
  {
 + int chip = id-driver_data;
   struct retu_dev *rdev;
   int ret;
  
 + if (chip = ARRAY_SIZE(retu_data))
 + return -EINVAL;

you can figure this out without using 'chip'. Just use the i2c address.

-- 
balbi


signature.asc
Description: Digital signature


Re: [PATCH 2/2] ARM: dts: add AM33XX MMC support

2013-03-07 Thread Matt Porter
On Thu, Mar 07, 2013 at 09:46:56AM -0500, Matt Porter wrote:
 On Thu, Mar 07, 2013 at 02:39:55PM +, Vaibhav Hiremath wrote:
  2. And MMC rootFS mount is __not__ working for me.
  
  3. I get following error message - 
  
  [2.118207] omap_hsmmc mmc.3: unable to obtain RX DMA engine channel 25
 
 See below, you don't have CONFIG_EDMA on most likely.

That's CONFIG_TI_EDMA, of course.

-Matt
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RFC PATCH 3/4] USB: OMAP: move omap-otg out from isp1301_omap

2013-03-07 Thread Felipe Balbi
On Thu, Mar 07, 2013 at 04:40:20PM +0200, Aaro Koskinen wrote:
 omap-otg platform device will be needed also by other transceivers.
 It's not possible to have multiple instances of the driver, so it needs
 to be moved into a separate file so that other drivers can hook into it.
 
 Start this change with a very simplest implementation, much of the
 OMAP OTG code in isp1301 is tightly coupled with isp1301 and cannot be
 trivially moved out, but still this provides a way for other drivers to
 register to OTG interrupt.
 
 Signed-off-by: Aaro Koskinen aaro.koski...@iki.fi
 ---
  drivers/usb/otg/Kconfig|5 ++
  drivers/usb/otg/Makefile   |1 +
  drivers/usb/otg/isp1301_omap.c |   78 ++-
  drivers/usb/otg/omap-otg.c |   99 
 

I'm getting rid of drivers/usb/otg/ directory, you'd have to rebase on
my -next branch as soon as I make that immutable.

  include/linux/usb/omap-otg.h   |   30 
  5 files changed, 138 insertions(+), 75 deletions(-)
  create mode 100644 drivers/usb/otg/omap-otg.c
  create mode 100644 include/linux/usb/omap-otg.h
 
 diff --git a/drivers/usb/otg/Kconfig b/drivers/usb/otg/Kconfig
 index 37962c9..12af870 100644
 --- a/drivers/usb/otg/Kconfig
 +++ b/drivers/usb/otg/Kconfig
 @@ -27,9 +27,14 @@ config USB_GPIO_VBUS
 optionally control of a D+ pullup GPIO as well as a VBUS
 current limit regulator.
  
 +config OMAP_OTG
 + tristate
 + depends on ARCH_OMAP_OTG
 +
  config ISP1301_OMAP
   tristate Philips ISP1301 with OMAP OTG
   depends on I2C  ARCH_OMAP_OTG
 + select OMAP_OTG if USB_OTG

no selects anymore, please :-s

 diff --git a/drivers/usb/otg/Makefile b/drivers/usb/otg/Makefile
 index a844b8d..4e05c6a 100644
 --- a/drivers/usb/otg/Makefile
 +++ b/drivers/usb/otg/Makefile
 @@ -10,6 +10,7 @@ obj-$(CONFIG_USB_OTG_UTILS) += otg.o
  
  # transceiver drivers
  obj-$(CONFIG_USB_GPIO_VBUS)  += gpio_vbus.o
 +obj-$(CONFIG_OMAP_OTG)   += omap-otg.o
  obj-$(CONFIG_ISP1301_OMAP)   += isp1301_omap.o
  obj-$(CONFIG_TWL4030_USB)+= twl4030-usb.o
  obj-$(CONFIG_TWL6030_USB)+= twl6030-usb.o
 diff --git a/drivers/usb/otg/isp1301_omap.c b/drivers/usb/otg/isp1301_omap.c
 index af9cb11..5217b7e 100644
 --- a/drivers/usb/otg/isp1301_omap.c
 +++ b/drivers/usb/otg/isp1301_omap.c

ideally isp1301_omap.c wouldn't even exist. isp1301 is a generic
transceiver which has nothing to do with OMAP at all. I'd much rather
see patches fixing up drivers/usb/phy/isp1301.c so that it can be reused
by anyone actually using this transceiver.

 @@ -28,6 +28,7 @@
  #include linux/gpio.h
  #include linux/usb/ch9.h
  #include linux/usb/gadget.h
 +#include linux/usb/omap-otg.h
  #include linux/usb.h
  #include linux/usb/otg.h
  #include linux/i2c.h
 @@ -74,22 +75,6 @@ struct isp1301 {
  #define WORK_STOP7   /* don't resubmit */
  };
  
 -
 -/* bits in OTG_CTRL */
 -
 -#define  OTG_XCEIV_OUTPUTS \
 - (OTG_ASESSVLD|OTG_BSESSEND|OTG_BSESSVLD|OTG_VBUSVLD|OTG_ID)
 -#define  OTG_XCEIV_INPUTS \
 - (OTG_PULLDOWN|OTG_PULLUP|OTG_DRV_VBUS|OTG_PD_VBUS|OTG_PU_VBUS|OTG_PU_ID)
 -#define  OTG_CTRL_BITS \
 - (OTG_A_BUSREQ|OTG_A_SETB_HNPEN|OTG_B_BUSREQ|OTG_B_HNPEN|OTG_BUSDROP)
 - /* and OTG_PULLUP is sometimes written */
 -
 -#define  OTG_CTRL_MASK   (OTG_DRIVER_SEL| \
 - OTG_XCEIV_OUTPUTS|OTG_XCEIV_INPUTS| \
 - OTG_CTRL_BITS)
 -
 -
  /*-*/
  
  /* board-specific PM hooks */
 @@ -822,15 +807,10 @@ static irqreturn_t omap_otg_irq(int irq, void *_isp)
   return ret;
  }
  
 -static struct platform_device *otg_dev;
 -
  static int isp1301_otg_init(struct isp1301 *isp)
  {
   u32 l;
  
 - if (!otg_dev)
 - return -ENODEV;
 -
   dump_regs(isp, __func__);
   /* some of these values are board-specific... */
   l = omap_readl(OTG_SYSCON_2);
 @@ -864,58 +844,6 @@ static int isp1301_otg_init(struct isp1301 *isp)
   return 0;
  }
  
 -static int otg_probe(struct platform_device *dev)
 -{
 - // struct omap_usb_config *config = dev-platform_data;
 -
 - otg_dev = dev;
 - return 0;
 -}

why is this otg_dev even needed ? Can you refresh my memory ?

-- 
balbi


signature.asc
Description: Digital signature


RE: [PATCH 2/2] ARM: dts: add AM33XX MMC support

2013-03-07 Thread Hiremath, Vaibhav
 -Original Message-
 From: Matt Porter [mailto:ohio...@gmail.com] On Behalf Of Porter, Matt
 Sent: Thursday, March 07, 2013 8:17 PM
 To: Hiremath, Vaibhav
 Cc: Linux OMAP List; Russell King; Krishnamoorthy, Balaji T; Devicetree
 Discuss; Linux MMC List; Linux Kernel Mailing List; Chris Ball; Linux
 ARM Kernel List
 Subject: Re: [PATCH 2/2] ARM: dts: add AM33XX MMC support
 
 On Thu, Mar 07, 2013 at 02:39:55PM +, Vaibhav Hiremath wrote:
 
   -Original Message-
   From: Matt Porter [mailto:ohio...@gmail.com] On Behalf Of Porter,
 Matt
   Sent: Thursday, March 07, 2013 7:43 PM
   To: Hiremath, Vaibhav
   Cc: Krishnamoorthy, Balaji T; Chris Ball; Cousson, Benoit; Tony
   Lindgren; Russell King; Devicetree Discuss; Linux ARM Kernel List;
   Linux OMAP List; Linux Kernel Mailing List; Linux MMC List
   Subject: Re: [PATCH 2/2] ARM: dts: add AM33XX MMC support
  
   On Thu, Mar 07, 2013 at 05:29:24AM +, Vaibhav Hiremath wrote:
 -Original Message-
 From: linux-omap-ow...@vger.kernel.org [mailto:linux-omap-
 ow...@vger.kernel.org] On Behalf Of Porter, Matt
 Sent: Thursday, March 07, 2013 9:47 AM
 To: Krishnamoorthy, Balaji T; Chris Ball; Cousson, Benoit; Tony
 Lindgren; Russell King
 Cc: Devicetree Discuss; Linux ARM Kernel List; Linux OMAP List;
   Linux
 Kernel Mailing List; Linux MMC List
 Subject: [PATCH 2/2] ARM: dts: add AM33XX MMC support

 Adds AM33XX MMC support for am335x-bone, am335x-evm, and
 am335x-evmsk.

 Signed-off-by: Matt Porter mpor...@ti.com
 Acked-by: Tony Lindgren t...@atomide.com
 ---
  arch/arm/boot/dts/am335x-bone.dts  |7 +++
  arch/arm/boot/dts/am335x-evm.dts   |7 +++
  arch/arm/boot/dts/am335x-evmsk.dts |7 +++
  arch/arm/boot/dts/am33xx.dtsi  |   28
   
  4 files changed, 49 insertions(+)

 diff --git a/arch/arm/boot/dts/am335x-bone.dts
 b/arch/arm/boot/dts/am335x-bone.dts
 index 11b240c..a154ce0 100644
 --- a/arch/arm/boot/dts/am335x-bone.dts
 +++ b/arch/arm/boot/dts/am335x-bone.dts
 @@ -120,6 +120,8 @@
   };

   ldo3_reg: regulator@5 {
 + regulator-min-microvolt = 180;
 + regulator-max-microvolt = 330;
   regulator-always-on;
   };

 @@ -136,3 +138,8 @@
  cpsw_emac1 {
   phy_id = davinci_mdio, 1;
  };
 +
 +mmc1 {
 + status = okay;
 + vmmc-supply = ldo3_reg;
 +};
 diff --git a/arch/arm/boot/dts/am335x-evm.dts
 b/arch/arm/boot/dts/am335x-evm.dts
 index d649644..2907da6 100644
 --- a/arch/arm/boot/dts/am335x-evm.dts
 +++ b/arch/arm/boot/dts/am335x-evm.dts
 @@ -232,6 +232,8 @@
   };

   vmmc_reg: regulator@12 {
 + regulator-min-microvolt = 180;
 + regulator-max-microvolt = 330;
   regulator-always-on;
   };
   };
 @@ -244,3 +246,8 @@
  cpsw_emac1 {
   phy_id = davinci_mdio, 1;
  };
 +
 +mmc1 {
 + status = okay;
 + vmmc-supply = vmmc_reg;
 +};
 diff --git a/arch/arm/boot/dts/am335x-evmsk.dts
 b/arch/arm/boot/dts/am335x-evmsk.dts
 index f5a6162..f050c46 100644
 --- a/arch/arm/boot/dts/am335x-evmsk.dts
 +++ b/arch/arm/boot/dts/am335x-evmsk.dts
 @@ -244,7 +244,14 @@
   };

   vmmc_reg: regulator@12 {
 + regulator-min-microvolt = 180;
 + regulator-max-microvolt = 330;
   regulator-always-on;
   };
   };
  };
 +
 +mmc1 {
 + status = okay;
 + vmmc-supply = vmmc_reg;
 +};
 diff --git a/arch/arm/boot/dts/am33xx.dtsi
 b/arch/arm/boot/dts/am33xx.dtsi
 index c3c781a..e029eea 100644
 --- a/arch/arm/boot/dts/am33xx.dtsi
 +++ b/arch/arm/boot/dts/am33xx.dtsi
 @@ -234,6 +234,34 @@
   status = disabled;
   };

 + mmc1: mmc@4806 {
 + compatible = ti,omap3-hsmmc;
 + ti,hwmods = mmc1;
 + ti,dual-volt;
 + ti,needs-special-reset;
 + dmas = edma 24
 + edma 25;
 + dma-names = tx, rx;
 + status = disabled;
 + };
 +
 + mmc2: mmc@481d8000 {
 + compatible = ti,omap3-hsmmc;
 + ti,hwmods = mmc2;
 + ti,needs-special-reset;
 + dmas = edma 2
 + edma 3;
 + dma-names = tx, rx;
 

Re: [RFC PATCH 4/4] USB: OMAP: Tahvo USB transceiver driver

2013-03-07 Thread Felipe Balbi
On Thu, Mar 07, 2013 at 04:40:21PM +0200, Aaro Koskinen wrote:
 Add Tahvo USB transceiver driver.
 
 Based on old code from linux-omap tree. The original driver was written
 by Juha Yrjölä, Tony Lindgren, and Timo Teräs.
 
 Signed-off-by: Aaro Koskinen aaro.koski...@iki.fi
 ---
  drivers/usb/otg/Kconfig |   16 ++
  drivers/usb/otg/Makefile|1 +
  drivers/usb/otg/tahvo-usb.c |  643 
 +++

let's call this:

drivers/usb/phy/phy-tahvo.c

I'll rename all phy drivers in a bit.

-- 
balbi


signature.asc
Description: Digital signature


RE: [PATCH 2/2] ARM: dts: add AM33XX MMC support

2013-03-07 Thread Hiremath, Vaibhav

 -Original Message-
 From: Hiremath, Vaibhav
 Sent: Thursday, March 07, 2013 8:24 PM
 To: Porter, Matt
 Cc: Linux OMAP List; Russell King; Krishnamoorthy, Balaji T; Devicetree
 Discuss; Linux MMC List; Linux Kernel Mailing List; Chris Ball; Linux
 ARM Kernel List
 Subject: RE: [PATCH 2/2] ARM: dts: add AM33XX MMC support
 
  -Original Message-
  From: Matt Porter [mailto:ohio...@gmail.com] On Behalf Of Porter,
 Matt
  Sent: Thursday, March 07, 2013 8:17 PM
  To: Hiremath, Vaibhav
  Cc: Linux OMAP List; Russell King; Krishnamoorthy, Balaji T;
 Devicetree
  Discuss; Linux MMC List; Linux Kernel Mailing List; Chris Ball; Linux
  ARM Kernel List
  Subject: Re: [PATCH 2/2] ARM: dts: add AM33XX MMC support
 
  On Thu, Mar 07, 2013 at 02:39:55PM +, Vaibhav Hiremath wrote:
  
-Original Message-
From: Matt Porter [mailto:ohio...@gmail.com] On Behalf Of Porter,
  Matt
Sent: Thursday, March 07, 2013 7:43 PM
To: Hiremath, Vaibhav
Cc: Krishnamoorthy, Balaji T; Chris Ball; Cousson, Benoit; Tony
Lindgren; Russell King; Devicetree Discuss; Linux ARM Kernel
 List;
Linux OMAP List; Linux Kernel Mailing List; Linux MMC List
Subject: Re: [PATCH 2/2] ARM: dts: add AM33XX MMC support
   
On Thu, Mar 07, 2013 at 05:29:24AM +, Vaibhav Hiremath wrote:
  -Original Message-
  From: linux-omap-ow...@vger.kernel.org [mailto:linux-omap-
  ow...@vger.kernel.org] On Behalf Of Porter, Matt
  Sent: Thursday, March 07, 2013 9:47 AM
  To: Krishnamoorthy, Balaji T; Chris Ball; Cousson, Benoit;
 Tony
  Lindgren; Russell King
  Cc: Devicetree Discuss; Linux ARM Kernel List; Linux OMAP
 List;
Linux
  Kernel Mailing List; Linux MMC List
  Subject: [PATCH 2/2] ARM: dts: add AM33XX MMC support
 
snip
 
 I believe you meant CONFIG_TI_EDMA right?
 
 Yes, I just enabled it and the result is still same.
 
 
 
 [root@arago /]# dmesg | grep -ir mmc
 [0.506844] vmmc: 1800 -- 3300 mV at 3300 mV
 [0.506970] vmmc: supplied by vbat
 [root@arago /]#
 [root@arago /]#
 [root@arago /]# dmesg | grep -ir dma
 [0.217063] DMA: preallocated 256 KiB pool for atomic coherent
 allocations
 [0.236321] platform 4900.edma: alias fck already exists
 [0.236360] platform 4900.edma: alias fck already exists
 [0.236381] platform 4900.edma: alias fck already exists
 [0.370705] edma-dma-engine edma-dma-engine.0: TI EDMA DMA engine
 driver
 [0.445156] omap-dma-engine omap-dma-engine: OMAP DMA engine driver
 [root@arago /]#
 [root@arago /]#
 
 
I have applied below patches from your recent post


[2/2] ARM: dts: add AM33XX MMC support  
[1/2] mmc: omap_hsmmc: set max_segs based on dma engine limits  
[v4,3/3] mmc: davinci: get SG segment limits with dma_get_slave_sg_limits()
[v4,2/3] dma: edma: add device_slave_sg_limits() support 
[v4,1/3] dmaengine: add dma_get_slave_sg_limits()
[v9,9/9] ARM: dts: add AM33XX SPI DMA support
[v9,8/9] spi: omap2-mcspi: add generic DMA request support to the DT binding
[v9,7/9] spi: omap2-mcspi: convert to dma_request_slave_channel_compat() 
[v9,6/9] ARM: dts: add AM33XX EDMA support 
[v9,5/9] dmaengine: edma: Add TI EDMA device tree binding
[v9,4/9] dmaengine: edma: enable build for AM33XX
[v9,3/9] ARM: edma: add AM33XX support to the private EDMA API
[v9,2/9] ARM: edma: remove unused transfer controller handlers
[v9,1/9] ARM: davinci: move private EDMA API to arm/common
[v3,2/2] mmc: omap_hsmmc: add generic DMA request support to the DT binding
[v3,1/2] mmc: omap_hsmmc: convert to dma_request_slave_channel_compat()



Am I missing anything here?

Thanks,
Vaibhav


N�r��yb�X��ǧv�^�)޺{.n�+{��f��{ay�ʇڙ�,j��f���h���z��w���
���j:+v���w�j�mzZ+�ݢj��!�i

Re: [PATCH 2/2] ARM: dts: add AM33XX MMC support

2013-03-07 Thread Matt Porter
On Thu, Mar 07, 2013 at 02:53:51PM +, Vaibhav Hiremath wrote:
  -Original Message-
  From: Matt Porter [mailto:ohio...@gmail.com] On Behalf Of Porter, Matt
  Sent: Thursday, March 07, 2013 8:17 PM
  To: Hiremath, Vaibhav
  Cc: Linux OMAP List; Russell King; Krishnamoorthy, Balaji T; Devicetree
  Discuss; Linux MMC List; Linux Kernel Mailing List; Chris Ball; Linux
  ARM Kernel List
  Subject: Re: [PATCH 2/2] ARM: dts: add AM33XX MMC support
  
  On Thu, Mar 07, 2013 at 02:39:55PM +, Vaibhav Hiremath wrote:
  
-Original Message-
From: Matt Porter [mailto:ohio...@gmail.com] On Behalf Of Porter,
  Matt
Sent: Thursday, March 07, 2013 7:43 PM
To: Hiremath, Vaibhav
Cc: Krishnamoorthy, Balaji T; Chris Ball; Cousson, Benoit; Tony
Lindgren; Russell King; Devicetree Discuss; Linux ARM Kernel List;
Linux OMAP List; Linux Kernel Mailing List; Linux MMC List
Subject: Re: [PATCH 2/2] ARM: dts: add AM33XX MMC support
   
On Thu, Mar 07, 2013 at 05:29:24AM +, Vaibhav Hiremath wrote:
  -Original Message-
  From: linux-omap-ow...@vger.kernel.org [mailto:linux-omap-
  ow...@vger.kernel.org] On Behalf Of Porter, Matt
  Sent: Thursday, March 07, 2013 9:47 AM
  To: Krishnamoorthy, Balaji T; Chris Ball; Cousson, Benoit; Tony
  Lindgren; Russell King
  Cc: Devicetree Discuss; Linux ARM Kernel List; Linux OMAP List;
Linux
  Kernel Mailing List; Linux MMC List
  Subject: [PATCH 2/2] ARM: dts: add AM33XX MMC support
 
  Adds AM33XX MMC support for am335x-bone, am335x-evm, and
  am335x-evmsk.
 
  Signed-off-by: Matt Porter mpor...@ti.com
  Acked-by: Tony Lindgren t...@atomide.com
  ---
   arch/arm/boot/dts/am335x-bone.dts  |7 +++
   arch/arm/boot/dts/am335x-evm.dts   |7 +++
   arch/arm/boot/dts/am335x-evmsk.dts |7 +++
   arch/arm/boot/dts/am33xx.dtsi  |   28

   4 files changed, 49 insertions(+)
 
  diff --git a/arch/arm/boot/dts/am335x-bone.dts
  b/arch/arm/boot/dts/am335x-bone.dts
  index 11b240c..a154ce0 100644
  --- a/arch/arm/boot/dts/am335x-bone.dts
  +++ b/arch/arm/boot/dts/am335x-bone.dts
  @@ -120,6 +120,8 @@
  };
 
  ldo3_reg: regulator@5 {
  +   regulator-min-microvolt = 180;
  +   regulator-max-microvolt = 330;
  regulator-always-on;
  };
 
  @@ -136,3 +138,8 @@
   cpsw_emac1 {
  phy_id = davinci_mdio, 1;
   };
  +
  +mmc1 {
  +   status = okay;
  +   vmmc-supply = ldo3_reg;
  +};
  diff --git a/arch/arm/boot/dts/am335x-evm.dts
  b/arch/arm/boot/dts/am335x-evm.dts
  index d649644..2907da6 100644
  --- a/arch/arm/boot/dts/am335x-evm.dts
  +++ b/arch/arm/boot/dts/am335x-evm.dts
  @@ -232,6 +232,8 @@
  };
 
  vmmc_reg: regulator@12 {
  +   regulator-min-microvolt = 180;
  +   regulator-max-microvolt = 330;
  regulator-always-on;
  };
  };
  @@ -244,3 +246,8 @@
   cpsw_emac1 {
  phy_id = davinci_mdio, 1;
   };
  +
  +mmc1 {
  +   status = okay;
  +   vmmc-supply = vmmc_reg;
  +};
  diff --git a/arch/arm/boot/dts/am335x-evmsk.dts
  b/arch/arm/boot/dts/am335x-evmsk.dts
  index f5a6162..f050c46 100644
  --- a/arch/arm/boot/dts/am335x-evmsk.dts
  +++ b/arch/arm/boot/dts/am335x-evmsk.dts
  @@ -244,7 +244,14 @@
  };
 
  vmmc_reg: regulator@12 {
  +   regulator-min-microvolt = 180;
  +   regulator-max-microvolt = 330;
  regulator-always-on;
  };
  };
   };
  +
  +mmc1 {
  +   status = okay;
  +   vmmc-supply = vmmc_reg;
  +};
  diff --git a/arch/arm/boot/dts/am33xx.dtsi
  b/arch/arm/boot/dts/am33xx.dtsi
  index c3c781a..e029eea 100644
  --- a/arch/arm/boot/dts/am33xx.dtsi
  +++ b/arch/arm/boot/dts/am33xx.dtsi
  @@ -234,6 +234,34 @@
  status = disabled;
  };
 
  +   mmc1: mmc@4806 {
  +   compatible = ti,omap3-hsmmc;
  +   ti,hwmods = mmc1;
  +   ti,dual-volt;
  +   ti,needs-special-reset;
  +   dmas = edma 24
  +   edma 25;
  +   dma-names = tx, rx;
  +   status = disabled;
  +   };
  +
  +   mmc2: mmc@481d8000 {
  +   compatible = ti,omap3-hsmmc;
  +   ti,hwmods = mmc2;
  +   ti,needs-special-reset;
  +   

RE: [PATCH 2/2] ARM: dts: add AM33XX MMC support

2013-03-07 Thread Hiremath, Vaibhav

 -Original Message-
 From: Matt Porter [mailto:ohio...@gmail.com] On Behalf Of Porter, Matt
 Sent: Thursday, March 07, 2013 8:31 PM
 To: Hiremath, Vaibhav
 Cc: Chris Ball; Russell King; Krishnamoorthy, Balaji T; Devicetree
 Discuss; Linux MMC List; Linux Kernel Mailing List; Linux OMAP List;
 Linux ARM Kernel List
 Subject: Re: [PATCH 2/2] ARM: dts: add AM33XX MMC support
 
 On Thu, Mar 07, 2013 at 02:53:51PM +, Vaibhav Hiremath wrote:
   -Original Message-
   From: Matt Porter [mailto:ohio...@gmail.com] On Behalf Of Porter,
 Matt
   Sent: Thursday, March 07, 2013 8:17 PM
   To: Hiremath, Vaibhav
   Cc: Linux OMAP List; Russell King; Krishnamoorthy, Balaji T;
 Devicetree
   Discuss; Linux MMC List; Linux Kernel Mailing List; Chris Ball;
 Linux
   ARM Kernel List
   Subject: Re: [PATCH 2/2] ARM: dts: add AM33XX MMC support
  
   On Thu, Mar 07, 2013 at 02:39:55PM +, Vaibhav Hiremath wrote:
   
 -Original Message-
 From: Matt Porter [mailto:ohio...@gmail.com] On Behalf Of
 Porter,
   Matt
 Sent: Thursday, March 07, 2013 7:43 PM
 To: Hiremath, Vaibhav
 Cc: Krishnamoorthy, Balaji T; Chris Ball; Cousson, Benoit; Tony
 Lindgren; Russell King; Devicetree Discuss; Linux ARM Kernel
 List;
 Linux OMAP List; Linux Kernel Mailing List; Linux MMC List
 Subject: Re: [PATCH 2/2] ARM: dts: add AM33XX MMC support

 On Thu, Mar 07, 2013 at 05:29:24AM +, Vaibhav Hiremath
 wrote:
   -Original Message-
   From: linux-omap-ow...@vger.kernel.org [mailto:linux-omap-
   ow...@vger.kernel.org] On Behalf Of Porter, Matt
   Sent: Thursday, March 07, 2013 9:47 AM
   To: Krishnamoorthy, Balaji T; Chris Ball; Cousson, Benoit;
 Tony
   Lindgren; Russell King
   Cc: Devicetree Discuss; Linux ARM Kernel List; Linux OMAP
 List;
 Linux
   Kernel Mailing List; Linux MMC List
   Subject: [PATCH 2/2] ARM: dts: add AM33XX MMC support
  
   Adds AM33XX MMC support for am335x-bone, am335x-evm, and
   am335x-evmsk.
  
snip
 
 What's the full log now? At least that fragment you show me is better,
 you now have the correct dmaengine driver active.
 

Here we go.


Boot Log:
==


U-Boot# mmc rescan 0
U-Boot# fatload mmc 0 8000 am335x-evm.dtb
reading am335x-evm.dtb
11419 bytes read in 10 ms (1.1 MiB/s)
U-Boot# fatload mmc 0 8100 uImage
reading uImage
4029168 bytes read in 441 ms (8.7 MiB/s)
U-Boot# fatload mmc 0 8200 ramdisk.ext2.gz
reading ramdisk.ext2.gz
3274441 bytes read in 363 ms (8.6 MiB/s)
U-Boot# setenv bootargs mem=256M console=ttyO0,115200n8 root=/dev/ram rw 
initrd=0x8200,16MB ramdisk_size=65536 earlyprintk=serial omap_debugss_en
U-Boot# bootm 8100 - 8000
## Booting kernel from Legacy Image at 8100 ...
   Image Name:   Linux-3.9.0-rc1-00124-g68f2d92-d
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:4029104 Bytes = 3.8 MiB
   Load Address: 80008000
   Entry Point:  80008000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 8000
   Booting using the fdt blob at 0x8000
   Loading Kernel Image ... OK
OK
   Using Device Tree in place at 8000, end 80005c9a

Starting kernel ...

[0.00] Booting Linux on physical CPU 0x0
[0.00] Linux version 3.9.0-rc1-00124-g68f2d92-dirty (XXX@psplinux064) 
(gcc version 4.5.3 20110311 (prerelease) (GCC) ) #5 SMP Thu Mar 7 20:19:23 IST 
2013
[0.00] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c53c7d
[0.00] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing 
instruction cache
[0.00] Machine: Generic AM33XX (Flattened Device Tree), model: TI 
AM335x EVM
[0.00] cma: CMA: reserved 16 MiB at 8e80
[0.00] Memory policy: ECC disabled, Data cache writeback
[0.00] CPU: All CPU(s) started in SVC mode.
[0.00] AM335X ES2.0 (neon )
[0.00] PERCPU: Embedded 9 pages/cpu @c0f75000 s13632 r8192 d15040 u36864
[0.00] Built 1 zonelists in Zone order, mobility grouping on.  Total 
pages: 64768
[0.00] Kernel command line: mem=256M console=ttyO0,115200n8 
root=/dev/ram rw initrdD hash table entries: 1024 (order: 0, 4096 bytes)
[0.00] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
[0.00] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
[0.00] __ex_table already sorted, skipping sort
[0.00] Memory: 255MB = 255MB total
[0.00] Memory: 212236k/212236k available, 49908k reserved, 0K highmem
[0.00] Virtual kernel memory layout:
[0.00] vector  : 0x - 0x1000   (   4 kB)
[0.00] fixmap  : 0xfff0 - 0xfffe   ( 896 kB)
[0.00] vmalloc : 0xd080 - 0xff00   ( 744 MB)
[0.00] lowmem  : 0xc000 - 0xd000   ( 256 MB)
[0.00] pkmap   : 0xbfe0 - 0xc000   (   2 MB)
[0.00] modules : 0xbf00 - 0xbfe0   (  14 MB)
[

Re: [PATCH 2/2] ARM: dts: add AM33XX MMC support

2013-03-07 Thread Matt Porter
On Thu, Mar 07, 2013 at 02:59:42PM +, Vaibhav Hiremath wrote:
 
  -Original Message-
  From: Hiremath, Vaibhav
  Sent: Thursday, March 07, 2013 8:24 PM
  To: Porter, Matt
  Cc: Linux OMAP List; Russell King; Krishnamoorthy, Balaji T; Devicetree
  Discuss; Linux MMC List; Linux Kernel Mailing List; Chris Ball; Linux
  ARM Kernel List
  Subject: RE: [PATCH 2/2] ARM: dts: add AM33XX MMC support
  
   -Original Message-
   From: Matt Porter [mailto:ohio...@gmail.com] On Behalf Of Porter,
  Matt
   Sent: Thursday, March 07, 2013 8:17 PM
   To: Hiremath, Vaibhav
   Cc: Linux OMAP List; Russell King; Krishnamoorthy, Balaji T;
  Devicetree
   Discuss; Linux MMC List; Linux Kernel Mailing List; Chris Ball; Linux
   ARM Kernel List
   Subject: Re: [PATCH 2/2] ARM: dts: add AM33XX MMC support
  
   On Thu, Mar 07, 2013 at 02:39:55PM +, Vaibhav Hiremath wrote:
   
 -Original Message-
 From: Matt Porter [mailto:ohio...@gmail.com] On Behalf Of Porter,
   Matt
 Sent: Thursday, March 07, 2013 7:43 PM
 To: Hiremath, Vaibhav
 Cc: Krishnamoorthy, Balaji T; Chris Ball; Cousson, Benoit; Tony
 Lindgren; Russell King; Devicetree Discuss; Linux ARM Kernel
  List;
 Linux OMAP List; Linux Kernel Mailing List; Linux MMC List
 Subject: Re: [PATCH 2/2] ARM: dts: add AM33XX MMC support

 On Thu, Mar 07, 2013 at 05:29:24AM +, Vaibhav Hiremath wrote:
   -Original Message-
   From: linux-omap-ow...@vger.kernel.org [mailto:linux-omap-
   ow...@vger.kernel.org] On Behalf Of Porter, Matt
   Sent: Thursday, March 07, 2013 9:47 AM
   To: Krishnamoorthy, Balaji T; Chris Ball; Cousson, Benoit;
  Tony
   Lindgren; Russell King
   Cc: Devicetree Discuss; Linux ARM Kernel List; Linux OMAP
  List;
 Linux
   Kernel Mailing List; Linux MMC List
   Subject: [PATCH 2/2] ARM: dts: add AM33XX MMC support
  
 snip
  
  I believe you meant CONFIG_TI_EDMA right?
  
  Yes, I just enabled it and the result is still same.
  
  
  
  [root@arago /]# dmesg | grep -ir mmc
  [0.506844] vmmc: 1800 -- 3300 mV at 3300 mV
  [0.506970] vmmc: supplied by vbat
  [root@arago /]#
  [root@arago /]#
  [root@arago /]# dmesg | grep -ir dma
  [0.217063] DMA: preallocated 256 KiB pool for atomic coherent
  allocations
  [0.236321] platform 4900.edma: alias fck already exists
  [0.236360] platform 4900.edma: alias fck already exists
  [0.236381] platform 4900.edma: alias fck already exists
  [0.370705] edma-dma-engine edma-dma-engine.0: TI EDMA DMA engine
  driver
  [0.445156] omap-dma-engine omap-dma-engine: OMAP DMA engine driver
  [root@arago /]#
  [root@arago /]#
  
  
 I have applied below patches from your recent post
 
 
 [2/2] ARM: dts: add AM33XX MMC support
 [1/2] mmc: omap_hsmmc: set max_segs based on dma engine limits
 [v4,3/3] mmc: davinci: get SG segment limits with dma_get_slave_sg_limits()
 [v4,2/3] dma: edma: add device_slave_sg_limits() support 
 [v4,1/3] dmaengine: add dma_get_slave_sg_limits()
 [v9,9/9] ARM: dts: add AM33XX SPI DMA support
 [v9,8/9] spi: omap2-mcspi: add generic DMA request support to the DT binding
 [v9,7/9] spi: omap2-mcspi: convert to dma_request_slave_channel_compat() 
 [v9,6/9] ARM: dts: add AM33XX EDMA support 
 [v9,5/9] dmaengine: edma: Add TI EDMA device tree binding
 [v9,4/9] dmaengine: edma: enable build for AM33XX
 [v9,3/9] ARM: edma: add AM33XX support to the private EDMA API
 [v9,2/9] ARM: edma: remove unused transfer controller handlers
 [v9,1/9] ARM: davinci: move private EDMA API to arm/common
 [v3,2/2] mmc: omap_hsmmc: add generic DMA request support to the DT binding
 [v3,1/2] mmc: omap_hsmmc: convert to dma_request_slave_channel_compat()
 
 
 
 Am I missing anything here?

Yes, you missed the
http://www.spinics.net/lists/arm-kernel/msg227886.html dependency
mentioned first in the cover letter.

-Matt
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: [PATCH 2/2] ARM: dts: add AM33XX MMC support

2013-03-07 Thread Hiremath, Vaibhav

 -Original Message-
 From: Matt Porter [mailto:ohio...@gmail.com] On Behalf Of Porter, Matt
 Sent: Thursday, March 07, 2013 8:34 PM
 To: Hiremath, Vaibhav
 Cc: Chris Ball; Russell King; Krishnamoorthy, Balaji T; Devicetree
 Discuss; Linux MMC List; Linux Kernel Mailing List; Linux OMAP List;
 Linux ARM Kernel List
 Subject: Re: [PATCH 2/2] ARM: dts: add AM33XX MMC support
 
 On Thu, Mar 07, 2013 at 02:59:42PM +, Vaibhav Hiremath wrote:
 
   -Original Message-
   From: Hiremath, Vaibhav
   Sent: Thursday, March 07, 2013 8:24 PM
   To: Porter, Matt
   Cc: Linux OMAP List; Russell King; Krishnamoorthy, Balaji T;
 Devicetree
   Discuss; Linux MMC List; Linux Kernel Mailing List; Chris Ball;
 Linux
   ARM Kernel List
   Subject: RE: [PATCH 2/2] ARM: dts: add AM33XX MMC support
  
-Original Message-
From: Matt Porter [mailto:ohio...@gmail.com] On Behalf Of Porter,
   Matt
Sent: Thursday, March 07, 2013 8:17 PM
To: Hiremath, Vaibhav
Cc: Linux OMAP List; Russell King; Krishnamoorthy, Balaji T;
   Devicetree
Discuss; Linux MMC List; Linux Kernel Mailing List; Chris Ball;
 Linux
ARM Kernel List
Subject: Re: [PATCH 2/2] ARM: dts: add AM33XX MMC support
   
On Thu, Mar 07, 2013 at 02:39:55PM +, Vaibhav Hiremath wrote:

  -Original Message-
  From: Matt Porter [mailto:ohio...@gmail.com] On Behalf Of
 Porter,
Matt
  Sent: Thursday, March 07, 2013 7:43 PM
  To: Hiremath, Vaibhav
  Cc: Krishnamoorthy, Balaji T; Chris Ball; Cousson, Benoit;
 Tony
  Lindgren; Russell King; Devicetree Discuss; Linux ARM Kernel
   List;
  Linux OMAP List; Linux Kernel Mailing List; Linux MMC List
  Subject: Re: [PATCH 2/2] ARM: dts: add AM33XX MMC support
 
  On Thu, Mar 07, 2013 at 05:29:24AM +, Vaibhav Hiremath
 wrote:
-Original Message-
From: linux-omap-ow...@vger.kernel.org [mailto:linux-
 omap-
ow...@vger.kernel.org] On Behalf Of Porter, Matt
Sent: Thursday, March 07, 2013 9:47 AM
To: Krishnamoorthy, Balaji T; Chris Ball; Cousson,
 Benoit;
   Tony
Lindgren; Russell King
Cc: Devicetree Discuss; Linux ARM Kernel List; Linux OMAP
   List;
  Linux
Kernel Mailing List; Linux MMC List
Subject: [PATCH 2/2] ARM: dts: add AM33XX MMC support
   
  snip
  
   I believe you meant CONFIG_TI_EDMA right?
  
   Yes, I just enabled it and the result is still same.
  
  
  
   [root@arago /]# dmesg | grep -ir mmc
   [0.506844] vmmc: 1800 -- 3300 mV at 3300 mV
   [0.506970] vmmc: supplied by vbat
   [root@arago /]#
   [root@arago /]#
   [root@arago /]# dmesg | grep -ir dma
   [0.217063] DMA: preallocated 256 KiB pool for atomic coherent
   allocations
   [0.236321] platform 4900.edma: alias fck already exists
   [0.236360] platform 4900.edma: alias fck already exists
   [0.236381] platform 4900.edma: alias fck already exists
   [0.370705] edma-dma-engine edma-dma-engine.0: TI EDMA DMA
 engine
   driver
   [0.445156] omap-dma-engine omap-dma-engine: OMAP DMA engine
 driver
   [root@arago /]#
   [root@arago /]#
  
  
  I have applied below patches from your recent post
 
 
  [2/2] ARM: dts: add AM33XX MMC support
  [1/2] mmc: omap_hsmmc: set max_segs based on dma engine limits
  [v4,3/3] mmc: davinci: get SG segment limits with
 dma_get_slave_sg_limits()
  [v4,2/3] dma: edma: add device_slave_sg_limits() support
  [v4,1/3] dmaengine: add dma_get_slave_sg_limits()
  [v9,9/9] ARM: dts: add AM33XX SPI DMA support
  [v9,8/9] spi: omap2-mcspi: add generic DMA request support to the DT
 binding
  [v9,7/9] spi: omap2-mcspi: convert to
 dma_request_slave_channel_compat()
  [v9,6/9] ARM: dts: add AM33XX EDMA support
  [v9,5/9] dmaengine: edma: Add TI EDMA device tree binding
  [v9,4/9] dmaengine: edma: enable build for AM33XX
  [v9,3/9] ARM: edma: add AM33XX support to the private EDMA API
  [v9,2/9] ARM: edma: remove unused transfer controller handlers
  [v9,1/9] ARM: davinci: move private EDMA API to arm/common
  [v3,2/2] mmc: omap_hsmmc: add generic DMA request support to the DT
 binding
  [v3,1/2] mmc: omap_hsmmc: convert to
 dma_request_slave_channel_compat()
 
 
 
  Am I missing anything here?
 
 Yes, you missed the
 http://www.spinics.net/lists/arm-kernel/msg227886.html dependency
 mentioned first in the cover letter.
 

Matt, I manually edited the file with above patch and result is still the same.
Can you point me to branch where you have tested MMC code?



diff --git a/arch/arm/common/edma.c b/arch/arm/common/edma.c
index 8c3b1fa..e68ac38 100644
--- a/arch/arm/common/edma.c
+++ b/arch/arm/common/edma.c
@@ -730,6 +730,9 @@ EXPORT_SYMBOL(edma_free_channel);
  */
 int edma_alloc_slot(unsigned ctlr, int slot)
 {
+   if (!edma_cc[ctlr])
+   return -EINVAL;
+
if (slot = 0)
slot = EDMA_CHAN_SLOT(slot);

Thanks,
Vaibhav
--
To unsubscribe from this list: send the line 

Re: [PATCH 00/10] usb: phy: cleanups to Kconfig and directories

2013-03-07 Thread Alan Stern
On Thu, 7 Mar 2013, Felipe Balbi wrote:

 Hi folks,
 
 inspired by Paul's DWC2 patchset which added usb_otg_state_string()
 (a copy of otg_state_string()) I have now renamed otg_state_string()
 to usb_otg_state_string(), moved it to usb-common, then moved all
 phy drivers to drivers/usb/phy/ and completely deleted the otg directory.
 
 We're also removing CONFIG_USB_OTG_UTILS since that has lots its
 meaning long ago.
 
 I have compiled all patches with allyes, allno and allmod configs,
 but please make sure to test on your platforms to make sure we're
 not leaking any more problems to mainline.

Acked-by: Alan Stern st...@rowland.harvard.edu

for the EHCI changes.

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 2/2] ARM: dts: add AM33XX MMC support

2013-03-07 Thread Matt Porter
On Thu, Mar 07, 2013 at 03:50:01PM +, Vaibhav Hiremath wrote:
 
  -Original Message-
  From: Matt Porter [mailto:ohio...@gmail.com] On Behalf Of Porter, Matt
  Sent: Thursday, March 07, 2013 8:34 PM
  To: Hiremath, Vaibhav
  Cc: Chris Ball; Russell King; Krishnamoorthy, Balaji T; Devicetree
  Discuss; Linux MMC List; Linux Kernel Mailing List; Linux OMAP List;
  Linux ARM Kernel List
  Subject: Re: [PATCH 2/2] ARM: dts: add AM33XX MMC support
  
  On Thu, Mar 07, 2013 at 02:59:42PM +, Vaibhav Hiremath wrote:
  
-Original Message-
From: Hiremath, Vaibhav
Sent: Thursday, March 07, 2013 8:24 PM
To: Porter, Matt
Cc: Linux OMAP List; Russell King; Krishnamoorthy, Balaji T;
  Devicetree
Discuss; Linux MMC List; Linux Kernel Mailing List; Chris Ball;
  Linux
ARM Kernel List
Subject: RE: [PATCH 2/2] ARM: dts: add AM33XX MMC support
   
 -Original Message-
 From: Matt Porter [mailto:ohio...@gmail.com] On Behalf Of Porter,
Matt
 Sent: Thursday, March 07, 2013 8:17 PM
 To: Hiremath, Vaibhav
 Cc: Linux OMAP List; Russell King; Krishnamoorthy, Balaji T;
Devicetree
 Discuss; Linux MMC List; Linux Kernel Mailing List; Chris Ball;
  Linux
 ARM Kernel List
 Subject: Re: [PATCH 2/2] ARM: dts: add AM33XX MMC support

 On Thu, Mar 07, 2013 at 02:39:55PM +, Vaibhav Hiremath wrote:
 
   -Original Message-
   From: Matt Porter [mailto:ohio...@gmail.com] On Behalf Of
  Porter,
 Matt
   Sent: Thursday, March 07, 2013 7:43 PM
   To: Hiremath, Vaibhav
   Cc: Krishnamoorthy, Balaji T; Chris Ball; Cousson, Benoit;
  Tony
   Lindgren; Russell King; Devicetree Discuss; Linux ARM Kernel
List;
   Linux OMAP List; Linux Kernel Mailing List; Linux MMC List
   Subject: Re: [PATCH 2/2] ARM: dts: add AM33XX MMC support
  
   On Thu, Mar 07, 2013 at 05:29:24AM +, Vaibhav Hiremath
  wrote:
 -Original Message-
 From: linux-omap-ow...@vger.kernel.org [mailto:linux-
  omap-
 ow...@vger.kernel.org] On Behalf Of Porter, Matt
 Sent: Thursday, March 07, 2013 9:47 AM
 To: Krishnamoorthy, Balaji T; Chris Ball; Cousson,
  Benoit;
Tony
 Lindgren; Russell King
 Cc: Devicetree Discuss; Linux ARM Kernel List; Linux OMAP
List;
   Linux
 Kernel Mailing List; Linux MMC List
 Subject: [PATCH 2/2] ARM: dts: add AM33XX MMC support

   snip
   
I believe you meant CONFIG_TI_EDMA right?
   
Yes, I just enabled it and the result is still same.
   
   
   
[root@arago /]# dmesg | grep -ir mmc
[0.506844] vmmc: 1800 -- 3300 mV at 3300 mV
[0.506970] vmmc: supplied by vbat
[root@arago /]#
[root@arago /]#
[root@arago /]# dmesg | grep -ir dma
[0.217063] DMA: preallocated 256 KiB pool for atomic coherent
allocations
[0.236321] platform 4900.edma: alias fck already exists
[0.236360] platform 4900.edma: alias fck already exists
[0.236381] platform 4900.edma: alias fck already exists
[0.370705] edma-dma-engine edma-dma-engine.0: TI EDMA DMA
  engine
driver
[0.445156] omap-dma-engine omap-dma-engine: OMAP DMA engine
  driver
[root@arago /]#
[root@arago /]#
   
   
   I have applied below patches from your recent post
  
  
   [2/2] ARM: dts: add AM33XX MMC support
   [1/2] mmc: omap_hsmmc: set max_segs based on dma engine limits
   [v4,3/3] mmc: davinci: get SG segment limits with
  dma_get_slave_sg_limits()
   [v4,2/3] dma: edma: add device_slave_sg_limits() support
   [v4,1/3] dmaengine: add dma_get_slave_sg_limits()
   [v9,9/9] ARM: dts: add AM33XX SPI DMA support
   [v9,8/9] spi: omap2-mcspi: add generic DMA request support to the DT
  binding
   [v9,7/9] spi: omap2-mcspi: convert to
  dma_request_slave_channel_compat()
   [v9,6/9] ARM: dts: add AM33XX EDMA support
   [v9,5/9] dmaengine: edma: Add TI EDMA device tree binding
   [v9,4/9] dmaengine: edma: enable build for AM33XX
   [v9,3/9] ARM: edma: add AM33XX support to the private EDMA API
   [v9,2/9] ARM: edma: remove unused transfer controller handlers
   [v9,1/9] ARM: davinci: move private EDMA API to arm/common
   [v3,2/2] mmc: omap_hsmmc: add generic DMA request support to the DT
  binding
   [v3,1/2] mmc: omap_hsmmc: convert to
  dma_request_slave_channel_compat()
  
  
  
   Am I missing anything here?
  
  Yes, you missed the
  http://www.spinics.net/lists/arm-kernel/msg227886.html dependency
  mentioned first in the cover letter.
  
 
 Matt, I manually edited the file with above patch and result is still the 
 same.
 Can you point me to branch where you have tested MMC code?

git://github.com/ohporter/linux.git edma-dmaengine-am33xx-mmc-v1

omap2plus_defconfig + CONFIG_TI_EDMA

I just doublechecked MMC rootfs on bone and evmsk as it's the standard
smoke test. My EVM is intermittent now so trying to coax it to power up
to 

Re: [PATCH 2/3] arm: dts: am33xx: add default ethtool slave to cpsw node

2013-03-07 Thread Tony Lindgren
* Mugunthan V N mugunthan...@ti.com [130307 04:35]:

Can you please add a description and send this separately
so Benoit can queue it.

Thanks,

Tony

 Signed-off-by: Mugunthan V N mugunthan...@ti.com
 ---
  arch/arm/boot/dts/am33xx.dtsi |1 +
  1 file changed, 1 insertion(+)
 
 diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
 index 0957645..f8c83a1 100644
 --- a/arch/arm/boot/dts/am33xx.dtsi
 +++ b/arch/arm/boot/dts/am33xx.dtsi
 @@ -352,6 +352,7 @@
   cpts_active_slave = 0;
   cpts_clock_mult = 0x8000;
   cpts_clock_shift = 29;
 + ethtool-active-slave = 0;
   reg = 0x4a10 0x800
  0x4a101200 0x100;
   #address-cells = 1;
 -- 
 1.7.9.5
 
 ___
 devicetree-discuss mailing list
 devicetree-disc...@lists.ozlabs.org
 https://lists.ozlabs.org/listinfo/devicetree-discuss
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 00/10] usb: phy: cleanups to Kconfig and directories

2013-03-07 Thread Felipe Balbi
On Thu, Mar 07, 2013 at 11:01:47AM -0500, Alan Stern wrote:
 On Thu, 7 Mar 2013, Felipe Balbi wrote:
 
  Hi folks,
  
  inspired by Paul's DWC2 patchset which added usb_otg_state_string()
  (a copy of otg_state_string()) I have now renamed otg_state_string()
  to usb_otg_state_string(), moved it to usb-common, then moved all
  phy drivers to drivers/usb/phy/ and completely deleted the otg directory.
  
  We're also removing CONFIG_USB_OTG_UTILS since that has lots its
  meaning long ago.
  
  I have compiled all patches with allyes, allno and allmod configs,
  but please make sure to test on your platforms to make sure we're
  not leaking any more problems to mainline.
 
 Acked-by: Alan Stern st...@rowland.harvard.edu
 
 for the EHCI changes.

thanks, added your ack to the patches.

-- 
balbi


signature.asc
Description: Digital signature


Re: [PATCH 1/3] driver: net: ethernet: cpsw: implement ethtool get/set phy setting

2013-03-07 Thread Mugunthan V N

On 3/7/2013 6:54 PM, Peter Korsgaard wrote:

M == Mugunthan V N mugunthan...@ti.com writes:

  M This patch implements get/set of the phy settings via ethtool apis
  M Signed-off-by: Mugunthan V N mugunthan...@ti.com
  M ---
  M  Documentation/devicetree/bindings/net/cpsw.txt |3 +++
  M  drivers/net/ethernet/ti/cpsw.c |   32 

  M  include/linux/platform_data/cpsw.h |1 +
  M  3 files changed, 36 insertions(+)

  M diff --git a/Documentation/devicetree/bindings/net/cpsw.txt 
b/Documentation/devicetree/bindings/net/cpsw.txt
  M index ecfdf75..8d61300 100644
  M --- a/Documentation/devicetree/bindings/net/cpsw.txt
  M +++ b/Documentation/devicetree/bindings/net/cpsw.txt
  M @@ -20,6 +20,7 @@ Required properties:
  M  - cpts_clock_shift : Denominator to convert input clock ticks into 
nanoseconds
  M  - phy_id   : Specifies slave phy id
  M  - mac-address  : Specifies slave MAC address
  M +- ethtool-active-slave : Specifies the slave to use for ethtool command

That again sounds like something Linux specific rather than a hardware
property.

It would be good if all these special things (dual emac mode, vlan
handling, switching) could be handled using the existing kernel
(bridging/vlan) infrastructure, and the driver always just exposing 2
network interfaces instead of these configuration properties.

Switch and Dual Emac modes of operation of CPSW are two different 
features of the
hardware and packet routing between the slaves in the hardware are 
different in

both the modes.

If by default it is brought up as Dual EMAC then hardware switching is 
blocked and

use-cases like IP phone etc cannot be achieved.

Since CPSW as a hardware Switch, it cannot not be handled in existing kernel
feature.

Regards
Mugunthan V N
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 2/3] arm: dts: am33xx: add default ethtool slave to cpsw node

2013-03-07 Thread Mugunthan V N

On 3/7/2013 9:43 PM, Tony Lindgren wrote:

* Mugunthan V N mugunthan...@ti.com [130307 04:35]:

Can you please add a description and send this separately
so Benoit can queue it.



Will send this patch separately after this patch series has been
reviewed and accepted by netdev maintainer.

Regards
Mugunthan V N
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH V4] ARM: dts: add minimal DT support for DevKit8000.

2013-03-07 Thread Tony Lindgren
* Benoit Cousson b-cous...@ti.com [130306 22:55]:
 
 Yep, sorry for having missed 3.9, I was a little bit sick at the wrong
 moment :-(

Well that just proves the .dts files can be merged totally independent
of the rest of the patches ;)

 I'm starting queuing the pending patches, and should have enough to push
 to you just after Linaro Connect.

OK sounds good.

Regards,

Tony
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RFC PATCH 4/4] USB: OMAP: Tahvo USB transceiver driver

2013-03-07 Thread Tony Lindgren
* Aaro Koskinen aaro.koski...@iki.fi [130307 06:44]:
 +#include mach/usb.h

We should be getting rid of the plat and mach includes for
drivers for omap1 also, so let's not make it harder by adding
more of it. We should have just the following:

include/linux/platform_data/usb-omap.h  this contains just minimal pdata
include/linux/usb/something.h   if needed and cannot be local to driver

Regards,

Tony
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RFC PATCH 3/4] USB: OMAP: move omap-otg out from isp1301_omap

2013-03-07 Thread Aaro Koskinen
Hi,

On Thu, Mar 07, 2013 at 04:51:59PM +0200, Felipe Balbi wrote:
 why is this otg_dev even needed ? Can you refresh my memory ?

If you want to handle OTG controller interrupt you need it... Though looks
like tahvo does not really need it, and it can be disabled.

A.
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/3] driver: net: ethernet: cpsw: implement ethtool get/set phy setting

2013-03-07 Thread Peter Korsgaard
 Mugunthan == Mugunthan V N mugunthan...@ti.com writes:

Hi,

 M +- ethtool-active-slave : Specifies the slave to use for ethtool command
  
  That again sounds like something Linux specific rather than a hardware
  property.
  
  It would be good if all these special things (dual emac mode, vlan
  handling, switching) could be handled using the existing kernel
  (bridging/vlan) infrastructure, and the driver always just exposing 2
  network interfaces instead of these configuration properties.

 Mugunthan Switch and Dual Emac modes of operation of CPSW are two
 Mugunthan different features of the hardware and packet routing
 Mugunthan between the slaves in the hardware are different in both the
 Mugunthan modes.

 Mugunthan If by default it is brought up as Dual EMAC then hardware
 Mugunthan switching is blocked and use-cases like IP phone etc cannot
 Mugunthan be achieved.

Well, you could use the (sw) bridge functionality of the kernel network
stack, but performance naturally wouldn't be as good.

 Mugunthan Since CPSW as a hardware Switch, it cannot not be handled in
 Mugunthan existing kernel feature.

Well, we do have net/dsa, which is conceptually quite similar (even
though it has never been extended to hook into the bridging stuff). I
agree that we don't have infrastructure to handle hw like cpsw in a
really good way today, but it would be very nice to move towards it.

-- 
Bye, Peter Korsgaard
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/3] driver: net: ethernet: cpsw: implement ethtool get/set phy setting

2013-03-07 Thread Ben Hutchings
On Thu, 2013-03-07 at 14:24 +0100, Peter Korsgaard wrote:
  M == Mugunthan V N mugunthan...@ti.com writes:
 
  M This patch implements get/set of the phy settings via ethtool apis
  M Signed-off-by: Mugunthan V N mugunthan...@ti.com
  M ---
  M  Documentation/devicetree/bindings/net/cpsw.txt |3 +++
  M  drivers/net/ethernet/ti/cpsw.c |   32 
 
  M  include/linux/platform_data/cpsw.h |1 +
  M  3 files changed, 36 insertions(+)
 
  M diff --git a/Documentation/devicetree/bindings/net/cpsw.txt 
 b/Documentation/devicetree/bindings/net/cpsw.txt
  M index ecfdf75..8d61300 100644
  M --- a/Documentation/devicetree/bindings/net/cpsw.txt
  M +++ b/Documentation/devicetree/bindings/net/cpsw.txt
  M @@ -20,6 +20,7 @@ Required properties:
  M  - cpts_clock_shift   : Denominator to convert input clock ticks into 
 nanoseconds
  M  - phy_id : Specifies slave phy id
  M  - mac-address: Specifies slave MAC address
  M +- ethtool-active-slave   : Specifies the slave to use for ethtool command
 
 That again sounds like something Linux specific rather than a hardware
 property.

Yes, indeed.  Isn't it redundant with the phy_id?

Ben.

 It would be good if all these special things (dual emac mode, vlan
 handling, switching) could be handled using the existing kernel
 (bridging/vlan) infrastructure, and the driver always just exposing 2
 network interfaces instead of these configuration properties.
 

-- 
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


omap4 pandaboard: clock input for TiWi module inactive

2013-03-07 Thread Levi Pearson
I recently upgraded from a 3.4 kernel to a 3.8 kernel and found that
the drivers for the functionality provided by the TiWi module on the
pandaboard (Bluetooth, WiFI, etc.) could no longer probe the device.
After some investigation, it turned out that the TiWi clock is
provided by the twl6030 PMIC chip.

The clock output of the twl6030 was first enabled via these commits:

https://patchwork.kernel.org/patch/546381/
https://patchwork.kernel.org/patch/546401/

Since most of the functionality of the TWL6030 is power regulation and
the clock is enabled via a similar mechanism to the power outputs, the
clock was added as a 'pseudo-regulator' to
drivers/regulator/twl-regulator.c.

Some time later, a series of commits removed the clock functionality
from twl-regulator.c, apparently due to being out-of-place in the
Device Tree listings or something.

The first of these is recorded here: https://lkml.org/lkml/2012/6/4/330
The next two just clean up the code that was orphaned by the previous:
 e76ab829 regulator: twl: Remove references to the twl4030 regulator
 029dd3ce regulator: twl: Remove another unused variable warning

Luciano Cuelho, who maintains the driver for the WiFi portion of the
TiWi modules, reported the resulting breakage some time later on the
LKML: https://lkml.org/lkml/2012/11/15/72

Despite the protestation of Mark Brown that his code removal wasn't
the cause of the problem, reverting his changes does indeed enable the
clock.  However, it also seems to be the case that there ought to be a
better home for the clock than twl-regulator.c.  At the time of the
previous discussion, it wasn't clear if the framework was in place to
support a clock driver for the twl6030's clock, but it seems like the
support exists now, since there's a clock driver for the twl6030's
companion, the twl6040 audio chip.

So: Is there any chance of simply reverting the 3 commits that broke
the clock?  I have done this locally, but I hate to see pandaboard
support in the mainstream kernel continue to be broken in this way.

If for whatever reason the commits cannot be reverted, would creating
a driver like drivers/clk/clk-twl6040.c that enabled the twl6030's
clock output be a suitable alternative?  I'd be willing to take a stab
at writing it if there's not something like that in the works already.

---
Levi Pearson
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 09/10] usb: ehci: tegra: check against CONFIG_USB_PHY

2013-03-07 Thread Stephen Warren
On 03/07/2013 02:36 AM, Felipe Balbi wrote:
 CONFIG_USB_OTG_UTILS will be removed very
 soon, so we should check CONFIG_USB_PHY
 instead.

The Tegra EHCI driver isn't very useful without the Tegra PHY driver.
Perhaps its Kconfig should simply select USB_PHY, and the ifdefs be
removed rather than modified?
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 00/10] usb: phy: cleanups to Kconfig and directories

2013-03-07 Thread Stephen Warren
On 03/07/2013 02:35 AM, Felipe Balbi wrote:
 Hi folks,
 
 inspired by Paul's DWC2 patchset which added usb_otg_state_string()
 (a copy of otg_state_string()) I have now renamed otg_state_string()
 to usb_otg_state_string(), moved it to usb-common, then moved all
 phy drivers to drivers/usb/phy/ and completely deleted the otg directory.
 
 We're also removing CONFIG_USB_OTG_UTILS since that has lots its
 meaning long ago.
 
 I have compiled all patches with allyes, allno and allmod configs,
 but please make sure to test on your platforms to make sure we're
 not leaking any more problems to mainline.

What branch do the patches apply to? They didn't git am for me on
either next-20130305, nor
git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git next.
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2] ADP1653 board code for Nokia RX-51

2013-03-07 Thread Sakari Ailus
Hi guys,

On Wed, Mar 06, 2013 at 10:44:41PM +0100, Sebastian Reichel wrote:
 On Wed, Mar 06, 2013 at 09:20:16PM +0100, Pali Rohár wrote:
  On Wednesday 06 March 2013 21:12:06 Pali Rohár wrote:
   On Sunday 17 February 2013 20:03:03 Aaro Koskinen wrote:
On Sun, Feb 17, 2013 at 04:16:49PM +0100, Pali Rohár wrote:
 +/*
 + * arch/arm/mach-omap2/board-rx51-camera.c
 + *
 + * Copyright (C) 2008 Nokia Corporation
 + *
 + * Contact: Sakari Ailus sakari.ai...@nokia.com
 + *  Tuukka Toivonen tuukka.o.toivo...@nokia.com

You should put these people to CC... Just to see if the
addresses are still valid (which I doubt).
   
   Ok, trying :-)
   
  
  I got Delivery Status Notification (Failure) for both addresses.

This is expected.

 Sakari Ailus hosts some code on github [0], which has the following
 email address: sakari.ailus+gitori...@retiisi.org.uk
 
 I added it to this mail's CC.
 
 [0] https://gitorious.org/~sailus

Nice to hear people are interested in this. ;-)

The primary reason I haven't tried submitting this to mainline is that ARM
board code has a bad reputation these days. The N900 does not have yet
support for device tree (AFAIK), which also would require a few bits and
pieces on the flash driver to work.

Also the sensor and lens drivers would need at least some work before being
ready for submission to mainline for camera to be usable. Unfortunately I
haven't had recently time to work on this. N9(50) support has higher
priority for myself. That, too, is pending the DT support for the device.

There's indeed more up-to-date code in my repository. Even if it's not too
close to mainline anymore it should be a better starting point than the old
kernel from MeeGo.

URL:https://gitorious.org/omap3camera/pages/Home

-- 
Kind regards,

Sakari Ailus
e-mail: sakari.ai...@iki.fi XMPP: sai...@retiisi.org.uk
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 3/5] gpio/omap: Add DT support to GPIO driver

2013-03-07 Thread Jon Hunter

On 03/02/2013 02:05 PM, Grant Likely wrote:
 On Tue, 26 Feb 2013 17:01:22 -0600, Jon Hunter jon-hun...@ti.com wrote:

 On 02/26/2013 04:44 PM, Stephen Warren wrote:
 On 02/26/2013 03:40 PM, Jon Hunter wrote:
 On 02/26/2013 04:01 AM, Javier Martinez Canillas wrote:
 Are you requesting the gpio anywhere? If not then this is not going to
 work as-is. This was discussed fairly recently [1] and the conclusion
 was that the gpio needs to be requested before we can use as an interrupt.

 That seems wrong; the GPIO/IRQ driver should handle this internally. The
 Ethernet driver shouldn't know/care whether the interrupt it's given is
 some form of dedicated interrupt or a GPIO-based interrupt, and even if
 it somehow did, there's no irq_to_gpio() any more, so the driver can't
 tell which GPIO ID it should request, unless it's given yet another
 property to represent this.

 I agree that ideally this should be handled internally. Did you read the
 discussion on the thread that I referenced [1]? If you have any thoughts
 we are open to ideas :-)
 
 I'm on an airplane right now, but I agree 100% with Stephen. I'll try to
 remember to go read that thread and respond, but this falls firmly in
 the its-a-bug category for me.  :-)

Grant, did you have chance to review the thread [1]?

I am trying to figure out if we should just take the original patch
proposed in the thread (although Linus had some objections) or look at
alternative solutions such as adding a irq_chip request as Stephen
suggested.

Cheers
Jon

[1] comments.gmane.org/gmane.linux.ports.arm.omap/92192
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: 3.8 - 3.9-rc1 upgrade: old configs broken

2013-03-07 Thread Rajendra Nayak
On Thursday 07 March 2013 02:03 AM, Tony Lindgren wrote:
 So basically what's going is that __clk_init() calls kzalloc() before
 kmem_cache_init() is done. This happens the first time for sys_clkin_ck
 where we do have clk-num_parents.
 
 With CONFIG_DEBUG_SLAB we actually get an error in __find_general_cachep()
 as generic caches are not yet initialized.
 
 It seems that in the omap case we need to statically allocate clk-parents
 to fix this. I believe we now are overwriting parent clocks..

Actually we are not. It was a known issue that the kzalloc() calls in
__clk_init() for OMAP would fail, since our clock inits happen quite
early. And hence I submitted this patch 'clk: Allow late cache allocation
 for clk-parent, commit 7975059d' to Mike, hoping to work this around in some 
way.
However I seem to have overlooked the fact that we have BUG() some places
with DEBUG turned on.
The right fix obviously is to move all the static clocks for OMAP over to
use dynamic registrations and do them much after the slab is available.
While we are at this, for now like you rightly said, we would need to have
static clk-parents sent over to __clk_init() to fix these crashes with 
SLAB_DEBUG
enabled.
I am in the middle of travel with no access to hardware. I will get to this on
monday and send a fix over.

regards,
Rajendra
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 09/10] usb: ehci: tegra: check against CONFIG_USB_PHY

2013-03-07 Thread Felipe Balbi
On Thu, Mar 07, 2013 at 01:54:53PM -0700, Stephen Warren wrote:
 On 03/07/2013 02:36 AM, Felipe Balbi wrote:
  CONFIG_USB_OTG_UTILS will be removed very
  soon, so we should check CONFIG_USB_PHY
  instead.
 
 The Tegra EHCI driver isn't very useful without the Tegra PHY driver.
 Perhaps its Kconfig should simply select USB_PHY, and the ifdefs be

no selects anymore.

 removed rather than modified?

One can still compile-test the driver without a PHY. Ideally, though, we
would teach EHCI-core about PHYs.

-- 
balbi


signature.asc
Description: Digital signature


Re: [PATCH 00/10] usb: phy: cleanups to Kconfig and directories

2013-03-07 Thread Felipe Balbi
Hi,

On Thu, Mar 07, 2013 at 02:20:36PM -0700, Stephen Warren wrote:
 On 03/07/2013 02:35 AM, Felipe Balbi wrote:
  Hi folks,
  
  inspired by Paul's DWC2 patchset which added usb_otg_state_string()
  (a copy of otg_state_string()) I have now renamed otg_state_string()
  to usb_otg_state_string(), moved it to usb-common, then moved all
  phy drivers to drivers/usb/phy/ and completely deleted the otg directory.
  
  We're also removing CONFIG_USB_OTG_UTILS since that has lots its
  meaning long ago.
  
  I have compiled all patches with allyes, allno and allmod configs,
  but please make sure to test on your platforms to make sure we're
  not leaking any more problems to mainline.
 
 What branch do the patches apply to? They didn't git am for me on
 either next-20130305, nor
 git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git next.

they're on top of my testing branch. There were a few other patches
touching drivers/phy which you need. Namely :

0e3b847 usb: phy: mxs: use readl(), writel() instead of the _relaxed() versions
35f0683 usb: phy: mxs-phy: register phy with framework
f6797d0 usb: phy: move bulk of otg/otg.c to phy/phy.c

It's easier to cherry-pick them all from my testing branch, or merge the
full branch which contains a bunch of other cleanups.

-- 
balbi


signature.asc
Description: Digital signature


Re: [PATCH 1/3] driver: net: ethernet: cpsw: implement ethtool get/set phy setting

2013-03-07 Thread Mugunthan V N

On 3/8/2013 1:29 AM, Ben Hutchings wrote:

On Thu, 2013-03-07 at 14:24 +0100, Peter Korsgaard wrote:

M == Mugunthan V N mugunthan...@ti.com writes:

  M This patch implements get/set of the phy settings via ethtool apis
  M Signed-off-by: Mugunthan V N mugunthan...@ti.com
  M ---
  M  Documentation/devicetree/bindings/net/cpsw.txt |3 +++
  M  drivers/net/ethernet/ti/cpsw.c |   32 

  M  include/linux/platform_data/cpsw.h |1 +
  M  3 files changed, 36 insertions(+)

  M diff --git a/Documentation/devicetree/bindings/net/cpsw.txt 
b/Documentation/devicetree/bindings/net/cpsw.txt
  M index ecfdf75..8d61300 100644
  M --- a/Documentation/devicetree/bindings/net/cpsw.txt
  M +++ b/Documentation/devicetree/bindings/net/cpsw.txt
  M @@ -20,6 +20,7 @@ Required properties:
  M  - cpts_clock_shift : Denominator to convert input clock ticks into 
nanoseconds
  M  - phy_id   : Specifies slave phy id
  M  - mac-address  : Specifies slave MAC address
  M +- ethtool-active-slave : Specifies the slave to use for ethtool command

That again sounds like something Linux specific rather than a hardware
property.

Yes, indeed.  Isn't it redundant with the phy_id?

Ben.

phy_id is part of slave data and will be present for both the slaves.
so phy_id cannot be used for get/set phy setting until phy framework
allows to change settings without going through eth interface.

Regards
Mugunthan V N
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 0/5] ASoC: OMAP2+: Update Audio IP with sDMA binding for DT boot

2013-03-07 Thread Jarkko Nikula
On Thu, 7 Mar 2013 14:03:31 +0100
Peter Ujfalusi peter.ujfal...@ti.com wrote:

 Hi Sebastien,
 
 On 03/07/2013 01:43 PM, Sebastien Guiriec wrote:
  This patch serie is converting OMAP Audio IPs in order to use OMAP sDMA DT
  binding in case of DT boot on OMAP2+ platforms.
 
 The content of the patches looks about right for me, however I would squash
 together the IP and platform driver patches so we avoid breakage within the
 series. Also I would put the patch for the .dtsi files as first one.
 
Looks ok to me too at quick look. Would it be possible to avoid possible 
breakage if first patch is divided to omap-pcm.h change which come before audio 
link driver changes and do omap-pcm.c change last?

-- 
Jarkko
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html