Commit 3ec77ba6 authored by Ben Collins's avatar Ben Collins Committed by Tim Gardner

UBUNTU: SAUCE: Fixup freescale usb phy driver to work on ppc64

Signed-off-by: default avatarBen Collins <ben.c@servergy.com>
parent b6f56aba
...@@ -75,7 +75,7 @@ static struct fsl_otg_config fsl_otg_initdata = { ...@@ -75,7 +75,7 @@ static struct fsl_otg_config fsl_otg_initdata = {
.otg_port = 1, .otg_port = 1,
}; };
#ifdef CONFIG_PPC32 #ifdef CONFIG_PPC
static u32 _fsl_readl_be(const unsigned __iomem *p) static u32 _fsl_readl_be(const unsigned __iomem *p)
{ {
return in_be32(p); return in_be32(p);
...@@ -105,7 +105,7 @@ static void (*_fsl_writel)(u32 v, unsigned __iomem *p); ...@@ -105,7 +105,7 @@ static void (*_fsl_writel)(u32 v, unsigned __iomem *p);
#else #else
#define fsl_readl(addr) readl(addr) #define fsl_readl(addr) readl(addr)
#define fsl_writel(val, addr) writel(val, addr) #define fsl_writel(val, addr) writel(val, addr)
#endif /* CONFIG_PPC32 */ #endif /* CONFIG_PPC */
int write_ulpi(u8 addr, u8 data) int write_ulpi(u8 addr, u8 data)
{ {
...@@ -879,6 +879,7 @@ int usb_otg_start(struct platform_device *pdev) ...@@ -879,6 +879,7 @@ int usb_otg_start(struct platform_device *pdev)
if (pdata->init && pdata->init(pdev) != 0) if (pdata->init && pdata->init(pdev) != 0)
return -EINVAL; return -EINVAL;
#ifdef CONFIG_PPC
if (pdata->big_endian_mmio) { if (pdata->big_endian_mmio) {
_fsl_readl = _fsl_readl_be; _fsl_readl = _fsl_readl_be;
_fsl_writel = _fsl_writel_be; _fsl_writel = _fsl_writel_be;
...@@ -886,6 +887,7 @@ int usb_otg_start(struct platform_device *pdev) ...@@ -886,6 +887,7 @@ int usb_otg_start(struct platform_device *pdev)
_fsl_readl = _fsl_readl_le; _fsl_readl = _fsl_readl_le;
_fsl_writel = _fsl_writel_le; _fsl_writel = _fsl_writel_le;
} }
#endif
/* request irq */ /* request irq */
p_otg->irq = platform_get_irq(pdev, 0); p_otg->irq = platform_get_irq(pdev, 0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment