]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - arch/arm/cpu/pxa/usb.c
sunxi: add sun7i dram setup support
[karo-tx-uboot.git] / arch / arm / cpu / pxa / usb.c
index 83022e2e563aa64b4fde2e0074c07f048cb06f46..c31c2d73390eef5fefa6d135c649fce04db888d7 100644 (file)
@@ -2,23 +2,7 @@
  * (C) Copyright 2006
  * Markus Klotzbuecher, DENX Software Engineering <mk@denx.de>
  *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * 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.
- *
- * 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.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
+ * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
@@ -48,14 +32,14 @@ int usb_cpu_init(void)
 #endif
 
        writel(readl(UHCHR) | UHCHR_FHR, UHCHR);
-       wait_ms(11);
+       mdelay(11);
        writel(readl(UHCHR) & ~UHCHR_FHR, UHCHR);
 
        writel(readl(UHCHR) | UHCHR_FSBIR, UHCHR);
        while (readl(UHCHR) & UHCHR_FSBIR)
                udelay(1);
 
-#if defined(CONFIG_CPU_MONAHANS)
+#if defined(CONFIG_CPU_MONAHANS) || defined(CONFIG_PXA27X)
        writel(readl(UHCHR) & ~UHCHR_SSEP0, UHCHR);
 #endif
 #if defined(CONFIG_CPU_PXA27X)
@@ -72,10 +56,10 @@ int usb_cpu_stop(void)
        udelay(11);
        writel(readl(UHCHR) & ~UHCHR_FHR, UHCHR);
 
-       writel(readl(UHCCOMS) | UHCHR_FHR, UHCCOMS);
+       writel(readl(UHCCOMS) | UHCCOMS_HCR, UHCCOMS);
        udelay(10);
 
-#if defined(CONFIG_CPU_MONAHANS)
+#if defined(CONFIG_CPU_MONAHANS) || defined(CONFIG_PXA27X)
        writel(readl(UHCHR) | UHCHR_SSEP0, UHCHR);
 #endif
 #if defined(CONFIG_CPU_PXA27X)