]> git.sur5r.net Git - u-boot/commitdiff
arm: Kirkwood: arch specific updated for ehci-Kirkwood driver support
authorPrafulla Wadaskar <prafulla@marvell.com>
Mon, 29 Jun 2009 15:25:54 +0000 (20:55 +0530)
committerJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Mon, 6 Jul 2009 19:53:15 +0000 (21:53 +0200)
This patch abstracts Kirkwood arch specific changes to support ehci-kirkwood driver

Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com>
cpu/arm926ejs/kirkwood/cpu.c
include/asm-arm/arch-kirkwood/cpu.h
include/asm-arm/arch-kirkwood/kirkwood.h

index 194ba1c85df18a325e870a3f28fe2bc8fc65ae5e..795a739023db5ed298e3f1e4e3248ee2baa19e37 100644 (file)
@@ -74,7 +74,7 @@ unsigned char get_random_hex(void)
  * 64 KByte granularity (e.g., a value of 0x00FF specifies 256 = 16 MByte).
  * NOTE: A value of 0x0 specifies 64-KByte size.
  */
-static unsigned int kw_winctrl_calcsize(unsigned int sizeval)
+unsigned int kw_winctrl_calcsize(unsigned int sizeval)
 {
        int i;
        unsigned int j = 0;
@@ -87,10 +87,6 @@ static unsigned int kw_winctrl_calcsize(unsigned int sizeval)
        return (0x0000ffff & j);
 }
 
-/* prepares data to be loaded in win_Ctrl register */
-#define KWCPU_WIN_CTRL_DATA(size, target, attr, en) (en | (target << 4) \
-                       | (attr << 8) | (kw_winctrl_calcsize(size) << 16))
-
 /*
  * kw_config_adr_windows - Configure address Windows
  *
index 36064ae0c63cff1bd19ab4f1c9b5f69d8b4a17a5..d1440af4b7849b2a2d3fa0552cb8382d8b6b3dc3 100644 (file)
@@ -29,6 +29,9 @@
 
 #ifndef __ASSEMBLY__
 
+#define KWCPU_WIN_CTRL_DATA(size, target, attr, en) (en | (target << 4) \
+                       | (attr << 8) | (kw_winctrl_calcsize(size) << 16))
+
 #define KWGBE_PORT_SERIAL_CONTROL1_REG(_x)     \
                ((_x ? KW_EGIGA0_BASE : KW_EGIGA1_BASE) + 0x44c)
 
@@ -57,6 +60,10 @@ enum kwcpu_target {
 
 enum kwcpu_attrib {
        KWCPU_ATTR_SASRAM = 0x01,
+       KWCPU_ATTR_DRAM_CS0 = 0x0e,
+       KWCPU_ATTR_DRAM_CS1 = 0x0d,
+       KWCPU_ATTR_DRAM_CS2 = 0x0b,
+       KWCPU_ATTR_DRAM_CS3 = 0x07,
        KWCPU_ATTR_NANDFLASH = 0x2f,
        KWCPU_ATTR_SPIFLASH = 0x1e,
        KWCPU_ATTR_BOOTROM = 0x1d,
@@ -155,5 +162,6 @@ int kw_config_mpp(unsigned int mpp0_7, unsigned int mpp8_15,
                unsigned int mpp16_23, unsigned int mpp24_31,
                unsigned int mpp32_39, unsigned int mpp40_47,
                unsigned int mpp48_55);
+unsigned int kw_winctrl_calcsize(unsigned int sizeval);
 #endif /* __ASSEMBLY__ */
 #endif /* _KWCPU_H */
index d5f25f9e5a0d8544b97674ed6cc9cdd6881152d1..52dafc22cc66ab73348d2255e84c6017d4dc9aaf 100644 (file)
@@ -55,6 +55,7 @@
 #define KW_CPU_REG_BASE                        (KW_REGISTER(0x20100))
 #define KW_TIMER_BASE                  (KW_REGISTER(0x20300))
 #define KW_REG_PCIE_BASE               (KW_REGISTER(0x40000))
+#define KW_USB20_BASE                  (KW_REGISTER(0x50000))
 #define KW_EGIGA0_BASE                 (KW_REGISTER(0x72000))
 #define KW_EGIGA1_BASE                 (KW_REGISTER(0x76000))