]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
digsy MTC: Add SPI support.
authorGrzegorz Bernacki <gjb@semihalf.com>
Fri, 12 Jun 2009 09:33:53 +0000 (11:33 +0200)
committerWolfgang Denk <wd@denx.de>
Sun, 14 Jun 2009 21:03:57 +0000 (23:03 +0200)
Signed-off-by: Grzegorz Bernacki <gjb@semihalf.com>
board/digsy_mtc/digsy_mtc.c
include/configs/digsy_mtc.h

index 83d58645e9b0c855dcb17f267e6cdee509e5acf6..cc6087b339598d916dfd378f6daf8760f6d15fd4 100644 (file)
@@ -186,6 +186,9 @@ int checkboard(void)
 
 int board_early_init_r(void)
 {
+#ifdef CONFIG_MPC52XX_SPI
+       struct mpc5xxx_gpt *gpt = (struct mpc5xxx_gpt*)MPC5XXX_GPT;
+#endif
        /*
         * Now, when we are in RAM, enable flash write access for detection
         * process.  Note that CS_BOOT cannot be cleared when executing in
@@ -202,6 +205,13 @@ int board_early_init_r(void)
        /* Low level USB init, required for proper kernel operation */
        usb_cpu_init();
 #endif
+#ifdef CONFIG_MPC52XX_SPI
+       /* GPT 6 Output Enable */
+       out_be32(&gpt[6].emsr, 0x00000034);
+       /* GPT 7 Output Enable */
+       out_be32(&gpt[7].emsr, 0x00000034);
+#endif
+
        return (0);
 }
 
index 66badd70243da8f47e526dae26e73285eb7a142a..0cc2a8d992fffd12b285810db72013422d12905c 100644 (file)
 #define CONFIG_CMD_PING
 #define CONFIG_CMD_REGINFO
 #define CONFIG_CMD_SAVES
+#define CONFIG_CMD_SPI
 #define CONFIG_CMD_USB
 
 #if (TEXT_BASE == 0xFF000000)
                "protect on FFF00000 +${filesize}\0"    \
        ""
 
+/*
+ * SPI configuration
+ */
+#define CONFIG_HARD_SPI                1
+#define CONFIG_MPC52XX_SPI     1
+
 /*
  * I2C configuration
  */