From: Grzegorz Bernacki Date: Fri, 12 Jun 2009 11:33:53 +0200 Subject: [U-Boot] [PATCH v3 2/4] digsy MTC: Add SPI support. In-Reply-To: <1244799235-39707-1-git-send-email-gjb@semihalf.com> References: <1244799235-39707-1-git-send-email-gjb@semihalf.com> Message-ID: <1244799235-39707-2-git-send-email-gjb@semihalf.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Signed-off-by: Grzegorz Bernacki --- v2: - use accessor macros v3: - remove unnecessary GPIO initialization board/digsy_mtc/digsy_mtc.c | 10 ++++++++++ include/configs/digsy_mtc.h | 7 +++++++ 2 files changed, 17 insertions(+), 0 deletions(-) diff --git a/board/digsy_mtc/digsy_mtc.c b/board/digsy_mtc/digsy_mtc.c index 83d5864..cc6087b 100644 --- a/board/digsy_mtc/digsy_mtc.c +++ b/board/digsy_mtc/digsy_mtc.c @@ -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); } diff --git a/include/configs/digsy_mtc.h b/include/configs/digsy_mtc.h index 66badd7..0cc2a8d 100644 --- a/include/configs/digsy_mtc.h +++ b/include/configs/digsy_mtc.h @@ -100,6 +100,7 @@ #define CONFIG_CMD_PING #define CONFIG_CMD_REGINFO #define CONFIG_CMD_SAVES +#define CONFIG_CMD_SPI #define CONFIG_CMD_USB #if (TEXT_BASE == 0xFF000000) @@ -137,6 +138,12 @@ "" /* + * SPI configuration + */ +#define CONFIG_HARD_SPI 1 +#define CONFIG_MPC52XX_SPI 1 + +/* * I2C configuration */ #define CONFIG_HARD_I2C 1 -- 1.6.0.6