public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] [PATCH] i.MX31: Enable SPI and MC13783/RTC support for the Litekit board
@ 2008-04-20  8:38 Magnus Lilja
  2008-04-25  7:16 ` Wolfgang Denk
  2008-04-25 22:27 ` Wolfgang Denk
  0 siblings, 2 replies; 4+ messages in thread
From: Magnus Lilja @ 2008-04-20  8:38 UTC (permalink / raw)
  To: u-boot

This patch enables SPI and MC13783/RTC support for the Litekit board.

Signed-off-by: Magnus Lilja <lilja.magnus@gmail.com>
---

 board/imx31_litekit/imx31_litekit.c |   12 ++++++++++++
 include/configs/imx31_litekit.h     |    8 ++++++++
 2 files changed, 20 insertions(+), 0 deletions(-)


diff --git a/board/imx31_litekit/imx31_litekit.c b/board/imx31_litekit/imx31_litekit.c
index e0fbf25..263dd9f 100644
--- a/board/imx31_litekit/imx31_litekit.c
+++ b/board/imx31_litekit/imx31_litekit.c
@@ -52,6 +52,18 @@ int board_init (void)
 	mx31_gpio_mux(MUX_RTS1__UART1_RTS_B);
 	mx31_gpio_mux(MUX_RTS1__UART1_CTS_B);
 
+	/* SPI2 */
+	mx31_gpio_mux((MUX_CTL_FUNC << 8) | MUX_CTL_CSPI2_SS2);
+	mx31_gpio_mux((MUX_CTL_FUNC << 8) | MUX_CTL_CSPI2_SCLK);
+	mx31_gpio_mux((MUX_CTL_FUNC << 8) | MUX_CTL_CSPI2_SPI_RDY);
+	mx31_gpio_mux((MUX_CTL_FUNC << 8) | MUX_CTL_CSPI2_MOSI);
+	mx31_gpio_mux((MUX_CTL_FUNC << 8) | MUX_CTL_CSPI2_MISO);
+	mx31_gpio_mux((MUX_CTL_FUNC << 8) | MUX_CTL_CSPI2_SS0);
+	mx31_gpio_mux((MUX_CTL_FUNC << 8) | MUX_CTL_CSPI2_SS1);
+
+	/* start SPI2 clock */
+	__REG(CCM_CGR2) = __REG(CCM_CGR2) | (3 << 4);
+
 	gd->bd->bi_arch_number = MACH_TYPE_MX31LITE; /* board id for linux */
 	gd->bd->bi_boot_params = (0x80000100);	/* adress of boot parameters */
 
diff --git a/include/configs/imx31_litekit.h b/include/configs/imx31_litekit.h
index 5e97cfa..4281d73 100644
--- a/include/configs/imx31_litekit.h
+++ b/include/configs/imx31_litekit.h
@@ -63,6 +63,12 @@
 #define CONFIG_MX31_UART	1
 #define CFG_MX31_UART1		1
 
+#define CONFIG_HARD_SPI		1
+#define CONFIG_MXC_SPI		1
+#define CONFIG_MXC_SPI_IFACE	1
+
+#define CONFIG_RTC_MC13783	1
+
 /* allow to overwrite serial and ethaddr */
 #define CONFIG_ENV_OVERWRITE
 #define CONFIG_CONS_INDEX	1
@@ -77,6 +83,8 @@
 
 #define CONFIG_CMD_MII
 #define CONFIG_CMD_PING
+#define CONFIG_CMD_SPI
+#define CONFIG_CMD_DATE
 
 #define CONFIG_BOOTDELAY	3
 

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [U-Boot-Users] [PATCH] i.MX31: Enable SPI and MC13783/RTC support for the Litekit board
  2008-04-20  8:38 [U-Boot-Users] [PATCH] i.MX31: Enable SPI and MC13783/RTC support for the Litekit board Magnus Lilja
@ 2008-04-25  7:16 ` Wolfgang Denk
  2008-04-25 15:35   ` Magnus Lilja
  2008-04-25 22:27 ` Wolfgang Denk
  1 sibling, 1 reply; 4+ messages in thread
From: Wolfgang Denk @ 2008-04-25  7:16 UTC (permalink / raw)
  To: u-boot

In message <480B00F4.6030406@gmail.com> you wrote:
> This patch enables SPI and MC13783/RTC support for the Litekit board.
> 
> Signed-off-by: Magnus Lilja <lilja.magnus@gmail.com>
> ---
> 
>  board/imx31_litekit/imx31_litekit.c |   12 ++++++++++++
>  include/configs/imx31_litekit.h     |    8 ++++++++
>  2 files changed, 20 insertions(+), 0 deletions(-)

Does not apply:

Applying i.MX31: Enable SPI and MC13783/RTC support for the Litekit board
error: patch failed: board/imx31_litekit/imx31_litekit.c:52
error: board/imx31_litekit/imx31_litekit.c: patch does not apply
fatal: sha1 information is lacking or useless
(board/imx31_litekit/imx31_litekit.c).
Repository lacks necessary blobs to fall back on 3-way merge.
Cannot fall back to three-way merge.
Patch failed at 0001.


Please rebase and resubmit.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The face of war has never changed.  Surely it is more logical to heal
than to kill.
	-- Surak of Vulcan, "The Savage Curtain", stardate 5906.5

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot-Users] [PATCH] i.MX31: Enable SPI and MC13783/RTC support for the Litekit board
  2008-04-25  7:16 ` Wolfgang Denk
@ 2008-04-25 15:35   ` Magnus Lilja
  0 siblings, 0 replies; 4+ messages in thread
From: Magnus Lilja @ 2008-04-25 15:35 UTC (permalink / raw)
  To: u-boot

On Fri, Apr 25, 2008 at 9:16 AM, Wolfgang Denk <wd@denx.de> wrote:
> In message <480B00F4.6030406@gmail.com> you wrote:
>  > This patch enables SPI and MC13783/RTC support for the Litekit board.
>  >
>  > Signed-off-by: Magnus Lilja <lilja.magnus@gmail.com>
>  > ---
>  >
>  >  board/imx31_litekit/imx31_litekit.c |   12 ++++++++++++
>  >  include/configs/imx31_litekit.h     |    8 ++++++++
>  >  2 files changed, 20 insertions(+), 0 deletions(-)
>
>  Does not apply:
>
>  Applying i.MX31: Enable SPI and MC13783/RTC support for the Litekit board
>  error: patch failed: board/imx31_litekit/imx31_litekit.c:52
>  error: board/imx31_litekit/imx31_litekit.c: patch does not apply
>  fatal: sha1 information is lacking or useless
>  (board/imx31_litekit/imx31_litekit.c).
>  Repository lacks necessary blobs to fall back on 3-way merge.
>  Cannot fall back to three-way merge.
>  Patch failed at 0001.
>
>
>  Please rebase and resubmit.

Wolfgang,


It applies nicely to your currently published U-Boot-tree (after the
refresh you did earlier today). So perhaps you could try again.


It was my fault it didn't apply earlier (the patch required that one
of my other patches had been applied), I'm still learning my way
around git/stgit and how things are merged.


Thanks, Magnus Lilja

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot-Users] [PATCH] i.MX31: Enable SPI and MC13783/RTC support for the Litekit board
  2008-04-20  8:38 [U-Boot-Users] [PATCH] i.MX31: Enable SPI and MC13783/RTC support for the Litekit board Magnus Lilja
  2008-04-25  7:16 ` Wolfgang Denk
@ 2008-04-25 22:27 ` Wolfgang Denk
  1 sibling, 0 replies; 4+ messages in thread
From: Wolfgang Denk @ 2008-04-25 22:27 UTC (permalink / raw)
  To: u-boot

In message <480B00F4.6030406@gmail.com> you wrote:
> This patch enables SPI and MC13783/RTC support for the Litekit board.
> 
> Signed-off-by: Magnus Lilja <lilja.magnus@gmail.com>
> ---
> 
>  board/imx31_litekit/imx31_litekit.c |   12 ++++++++++++
>  include/configs/imx31_litekit.h     |    8 ++++++++
>  2 files changed, 20 insertions(+), 0 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
God made machine language; all the rest is the work of man.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-04-25 22:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-20  8:38 [U-Boot-Users] [PATCH] i.MX31: Enable SPI and MC13783/RTC support for the Litekit board Magnus Lilja
2008-04-25  7:16 ` Wolfgang Denk
2008-04-25 15:35   ` Magnus Lilja
2008-04-25 22:27 ` Wolfgang Denk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox