mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Alexander Shiyan <shc_work@mail.ru>
To: barebox@lists.infradead.org
Subject: [PATCH 5/6] Completely migrate option ISP1504 to ULPI
Date: Sat, 24 Mar 2012 18:00:39 +0400	[thread overview]
Message-ID: <1332597640-31268-5-git-send-email-shc_work@mail.ru> (raw)
In-Reply-To: <1332597640-31268-1-git-send-email-shc_work@mail.ru>

Since we do not have ISP1504-related functions, we migrated to ULPI.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
---
 arch/arm/boards/guf-neso/board.c        |    4 ++--
 arch/arm/boards/pcm037/pcm037.c         |    6 +++---
 arch/arm/boards/pcm038/pcm038.c         |    4 ++--
 arch/arm/boards/phycard-i.MX27/pca100.c |    6 +++---
 arch/arm/configs/neso_defconfig         |    2 +-
 arch/arm/configs/pca100_defconfig       |    2 +-
 arch/arm/configs/pcm038_defconfig       |    2 +-
 arch/arm/mach-imx/Kconfig               |    2 +-
 drivers/usb/otg/Kconfig                 |    8 +++-----
 drivers/usb/otg/Makefile                |    1 -
 drivers/usb/otg/isp1504.c               |   10 ----------
 drivers/usb/otg/ulpi.c                  |   11 +++++++++--
 include/usb/isp1504.h                   |    6 ------
 include/usb/ulpi.h                      |    3 +--
 14 files changed, 27 insertions(+), 40 deletions(-)
 delete mode 100644 drivers/usb/otg/isp1504.c
 delete mode 100644 include/usb/isp1504.h

diff --git a/arch/arm/boards/guf-neso/board.c b/arch/arm/boards/guf-neso/board.c
index 62d82f2..84ef225 100644
--- a/arch/arm/boards/guf-neso/board.c
+++ b/arch/arm/boards/guf-neso/board.c
@@ -30,7 +30,7 @@
 #include <nand.h>
 #include <command.h>
 #include <spi/spi.h>
-#include <usb/isp1504.h>
+#include <usb/ulpi.h>
 
 #include <io.h>
 #include <asm/mmu.h>
@@ -133,7 +133,7 @@ static void neso_usbh_init(void)
 
 	gpio_set_value(USBH2_PHY_CS_GPIO, 0);
 	mdelay(10);
-	isp1504_set_vbus_power((void *)(IMX_OTG_BASE + 0x570), 1);
+	ulpi_setup((void *)(IMX_OTG_BASE + 0x570), 1);
 }
 #endif
 
diff --git a/arch/arm/boards/pcm037/pcm037.c b/arch/arm/boards/pcm037/pcm037.c
index d59612f..46f2ce9 100644
--- a/arch/arm/boards/pcm037/pcm037.c
+++ b/arch/arm/boards/pcm037/pcm037.c
@@ -27,7 +27,7 @@
 #include <driver.h>
 #include <fs.h>
 #include <environment.h>
-#include <usb/isp1504.h>
+#include <usb/ulpi.h>
 #include <mach/imx-regs.h>
 #include <mach/iomux-mx31.h>
 #include <asm/armlinux.h>
@@ -93,7 +93,7 @@ static void pcm037_usb_init(void)
 	imx_iomux_mode(MX31_PIN_USBOTG_STP__USBOTG_STP);
 
 	mdelay(50);
-	isp1504_set_vbus_power((void *)(IMX_OTG_BASE + 0x170), 1);
+	ulpi_setup((void *)(IMX_OTG_BASE + 0x170), 1);
 
 	/* Host 2 */
 	tmp = readl(IOMUXC_BASE + 0x8);
@@ -138,7 +138,7 @@ static void pcm037_usb_init(void)
 	writel(tmp, IMX_OTG_BASE + 0x584);
 
 	mdelay(50);
-	isp1504_set_vbus_power((void *)(IMX_OTG_BASE + 0x570), 1);
+	ulpi_setup((void *)(IMX_OTG_BASE + 0x570), 1);
 
 	/* Set to Host mode */
 	tmp = readl(IMX_OTG_BASE + 0x1a8);
diff --git a/arch/arm/boards/pcm038/pcm038.c b/arch/arm/boards/pcm038/pcm038.c
index 8dd6521..3bf0e31 100644
--- a/arch/arm/boards/pcm038/pcm038.c
+++ b/arch/arm/boards/pcm038/pcm038.c
@@ -41,7 +41,7 @@
 #include <mach/imxfb.h>
 #include <asm/mmu.h>
 #include <i2c/i2c.h>
-#include <usb/isp1504.h>
+#include <usb/ulpi.h>
 #include <mach/spi.h>
 #include <mach/iomux-mx27.h>
 #include <mach/devices-imx27.h>
@@ -127,7 +127,7 @@ static void pcm038_usbh_init(void)
 
 	mdelay(10);
 
-	isp1504_set_vbus_power((void *)(IMX_OTG_BASE + 0x570), 1);
+	ulpi_setup((void *)(IMX_OTG_BASE + 0x570), 1);
 }
 #endif
 
diff --git a/arch/arm/boards/phycard-i.MX27/pca100.c b/arch/arm/boards/phycard-i.MX27/pca100.c
index cfbddcf..a0a9911 100644
--- a/arch/arm/boards/phycard-i.MX27/pca100.c
+++ b/arch/arm/boards/phycard-i.MX27/pca100.c
@@ -39,7 +39,7 @@
 #include <mach/imxfb.h>
 #include <gpio.h>
 #include <asm/mmu.h>
-#include <usb/isp1504.h>
+#include <usb/ulpi.h>
 #include <mach/iomux-mx27.h>
 #include <mach/devices-imx27.h>
 
@@ -140,9 +140,9 @@ static void pca100_usb_register(void)
 
 	mdelay(10);
 
-	isp1504_set_vbus_power((void *)(IMX_OTG_BASE + 0x170), 1);
+	ulpi_setup((void *)(IMX_OTG_BASE + 0x170), 1);
 	add_generic_usb_ehci_device(-1, IMX_OTG_BASE, NULL);
-	isp1504_set_vbus_power((void *)(IMX_OTG_BASE + 0x570), 1);
+	ulpi_setup((void *)(IMX_OTG_BASE + 0x570), 1);
 	add_generic_usb_ehci_device(-1, IMX_OTG_BASE + 0x400, NULL);
 }
 #endif
diff --git a/arch/arm/configs/neso_defconfig b/arch/arm/configs/neso_defconfig
index 45ffe30..fe5110f 100644
--- a/arch/arm/configs/neso_defconfig
+++ b/arch/arm/configs/neso_defconfig
@@ -68,7 +68,7 @@ CONFIG_NAND_IMX=y
 CONFIG_UBI=y
 CONFIG_USB=y
 CONFIG_USB_EHCI=y
-CONFIG_USB_ISP1504=y
+CONFIG_USB_ULPI=y
 CONFIG_VIDEO=y
 CONFIG_DRIVER_VIDEO_IMX=y
 CONFIG_IMXFB_DRIVER_VIDEO_IMX_OVERLAY=y
diff --git a/arch/arm/configs/pca100_defconfig b/arch/arm/configs/pca100_defconfig
index 2df7e34..76039e2 100644
--- a/arch/arm/configs/pca100_defconfig
+++ b/arch/arm/configs/pca100_defconfig
@@ -65,6 +65,6 @@ CONFIG_NAND_IMX=y
 CONFIG_UBI=y
 CONFIG_USB=y
 CONFIG_USB_EHCI=y
-CONFIG_USB_ISP1504=y
+CONFIG_USB_ULPI=y
 CONFIG_ZLIB=y
 CONFIG_LZO_DECOMPRESS=y
diff --git a/arch/arm/configs/pcm038_defconfig b/arch/arm/configs/pcm038_defconfig
index b63337e..17a5e14 100644
--- a/arch/arm/configs/pcm038_defconfig
+++ b/arch/arm/configs/pcm038_defconfig
@@ -70,7 +70,7 @@ CONFIG_NAND_IMX=y
 CONFIG_UBI=y
 CONFIG_USB=y
 CONFIG_USB_EHCI=y
-CONFIG_USB_ISP1504=y
+CONFIG_USB_ULPI=y
 CONFIG_VIDEO=y
 CONFIG_DRIVER_VIDEO_IMX=y
 CONFIG_IMXFB_DRIVER_VIDEO_IMX_OVERLAY=y
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig
index 853757b..75e87fe 100644
--- a/arch/arm/mach-imx/Kconfig
+++ b/arch/arm/mach-imx/Kconfig
@@ -307,7 +307,7 @@ choice
 config MACH_PCM037
 	bool "phyCORE-i.MX31"
 	select MACH_HAS_LOWLEVEL_INIT
-	select USB_ISP1504 if USB
+	select USB_ULPI if USB
 	select ARCH_HAS_L2X0
 	help
 	  Say Y here if you are using Phytec's phyCORE-i.MX31 (pcm037) equipped
diff --git a/drivers/usb/otg/Kconfig b/drivers/usb/otg/Kconfig
index de09cf3..2c5b789 100644
--- a/drivers/usb/otg/Kconfig
+++ b/drivers/usb/otg/Kconfig
@@ -1,9 +1,7 @@
 config USB_ULPI
-	bool
-
-config USB_ISP1504
-	select USB_ULPI
-	bool "ISP1504 Tranceiver support"
+	bool "ULPI Tranceiver support"
+	help
+	  Support for tranceivers that conforms ULPI specification.
 
 config USB_TWL4030
 	bool "TWL4030 Tranceiver support"
diff --git a/drivers/usb/otg/Makefile b/drivers/usb/otg/Makefile
index aa95cc9..465a7f0 100644
--- a/drivers/usb/otg/Makefile
+++ b/drivers/usb/otg/Makefile
@@ -1,4 +1,3 @@
 obj-$(CONFIG_USB_ULPI)		+= ulpi.o
-obj-$(CONFIG_USB_ISP1504)	+= isp1504.o
 obj-$(CONFIG_USB_TWL4030)	+= twl4030.o
 
diff --git a/drivers/usb/otg/isp1504.c b/drivers/usb/otg/isp1504.c
deleted file mode 100644
index 568ba72..0000000
--- a/drivers/usb/otg/isp1504.c
+++ /dev/null
@@ -1,10 +0,0 @@
-#include <common.h>
-#include <usb/ulpi.h>
-
-int isp1504_set_vbus_power(void __iomem *view, int on)
-{
-	if (ulpi_init(view))
-		return -1;
-
-	return ulpi_set_vbus(view, on);
-}
diff --git a/drivers/usb/otg/ulpi.c b/drivers/usb/otg/ulpi.c
index 6d00ff0..662f78b 100644
--- a/drivers/usb/otg/ulpi.c
+++ b/drivers/usb/otg/ulpi.c
@@ -160,7 +160,6 @@ int ulpi_probe(void __iomem *view)
 
 	return -1;
 }
-EXPORT_SYMBOL(ulpi_probe);
 
 int ulpi_set_vbus(void __iomem *view, int on)
 {
@@ -184,4 +183,12 @@ int ulpi_set_vbus(void __iomem *view, int on)
 
 	return ret;
 }
-EXPORT_SYMBOL(ulpi_set_vbus);
+
+int ulpi_setup(void __iomem *view, int on)
+{
+	if (ulpi_probe(view))
+		return -1;
+
+	return ulpi_set_vbus(view, on);
+}
+EXPORT_SYMBOL(ulpi_setup);
diff --git a/include/usb/isp1504.h b/include/usb/isp1504.h
deleted file mode 100644
index 2eb7665..0000000
--- a/include/usb/isp1504.h
+++ /dev/null
@@ -1,6 +0,0 @@
-#ifndef __INCLUDE_USB_ISP1504_H
-#define __INCLUDE_USB_ISP1504_H
-
-int isp1504_set_vbus_power(void __iomem *view, int on);
-
-#endif /* __INCLUDE_USB_ISP1504_H */
diff --git a/include/usb/ulpi.h b/include/usb/ulpi.h
index 235d006..542993c 100644
--- a/include/usb/ulpi.h
+++ b/include/usb/ulpi.h
@@ -4,8 +4,7 @@
 int ulpi_set(u8 bits, int reg, void __iomem *view);
 int ulpi_clear(u8 bits, int reg, void __iomem *view);
 int ulpi_read(int reg, void __iomem *view);
-int ulpi_probe(void __iomem *view);
-int ulpi_set_vbus(void __iomem *view, int on);
+int ulpi_setup(void __iomem *view, int on);
 
 /* ULPI register addresses */
 #define ULPI_VID_LOW		0x00	/* Vendor ID low */
-- 
1.7.3.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2012-03-24 14:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-24 14:00 [PATCH 1/6] Rename definitions for ULPI registers Alexander Shiyan
2012-03-24 14:00 ` [PATCH 2/6] Add ULPI detection function Alexander Shiyan
2012-03-24 14:00 ` [PATCH 3/6] Move set_vbus_power code to ULPI driver Alexander Shiyan
2012-03-24 14:00 ` [PATCH 4/6] Rename function ulpi_init to ulpi_detect Alexander Shiyan
2012-03-24 14:00 ` Alexander Shiyan [this message]
2012-03-24 14:00 ` [PATCH 6/6] Cosmetic change name ISP1504 -> ISP150x Alexander Shiyan
2012-04-02  7:35 ` [PATCH 1/6] Rename definitions for ULPI registers Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1332597640-31268-5-git-send-email-shc_work@mail.ru \
    --to=shc_work@mail.ru \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox