Completely migrate option ISP1504 to ULPI
Since we do not have ISP1504-related functions, we migrated to ULPI. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
parent
a2623f1712
commit
9d9724e178
|
@ -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
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
obj-$(CONFIG_USB_ULPI) += ulpi.o
|
||||
obj-$(CONFIG_USB_ISP1504) += isp1504.o
|
||||
obj-$(CONFIG_USB_TWL4030) += twl4030.o
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
|
@ -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);
|
||||
|
|
|
@ -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 */
|
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue