mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Oleksij Rempel <linux@rempel-privat.de>
To: barebox@lists.infradead.org
Subject: [PATCH 5/8] MIPS: netgear-wg102: add pbl support
Date: Wed, 19 Jun 2013 11:11:30 +0200	[thread overview]
Message-ID: <1371633093-23179-6-git-send-email-linux@rempel-privat.de> (raw)
In-Reply-To: <1371633093-23179-1-git-send-email-linux@rempel-privat.de>

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
---
 .../netgear-wg102/include/board/board_pbl_start.h  | 69 ++++++++++++++++++++++
 arch/mips/mach-ar231x/Kconfig                      |  2 +
 2 files changed, 71 insertions(+)
 create mode 100644 arch/mips/boards/netgear-wg102/include/board/board_pbl_start.h

diff --git a/arch/mips/boards/netgear-wg102/include/board/board_pbl_start.h b/arch/mips/boards/netgear-wg102/include/board/board_pbl_start.h
new file mode 100644
index 0000000..4deae06
--- /dev/null
+++ b/arch/mips/boards/netgear-wg102/include/board/board_pbl_start.h
@@ -0,0 +1,69 @@
+/*
+ * Copyright (C) 2013 Antony Pavlov <antonynpavlov@gmail.com>
+ * Copyright (C) 2013 Oleksij Rempel <linux@rempel-privat.de>
+ *
+ * This file is part of barebox.
+ * 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 version 2
+ * as published by the Free Software Foundation.
+ *
+ * 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.
+ *
+ */
+
+#include <asm/pbl_macros.h>
+#include <mach/pbl_macros.h>
+
+#include <mach/debug_ll.h>
+
+	.macro	board_pbl_start
+	.set	push
+	.set	noreorder
+
+	mips_barebox_10h
+
+	mips_disable_interrupts
+
+	pbl_ar2312_pll
+
+	pbl_ar2312_rst_uart0
+	debug_ll_ns16550_init
+
+	debug_ll_ns16550_outc 'a'
+	debug_ll_ns16550_outnl
+
+	/* check if SDRAM is already configured,
+	 * if yes, we are probably starting
+	 * as second stage loader and can skip configuration */
+	pbl_probe_mem t0, t1, KSEG1
+	beq t0, t1, sdram_configured
+	 nop
+
+	/* start SDRAM configuration */
+	pbl_ar2312_x16_sdram
+
+	/* check one more time. if some thing wrong,
+	 * we don't need to continue */
+	pbl_probe_mem t0, t1, KSEG1
+	beq t0, t1, sdram_configured
+	 nop
+	debug_ll_ns16550_outc '#'
+	debug_ll_ns16550_outnl
+
+1:
+	b	1b /* dead end */
+	 nop
+
+sdram_configured:
+	debug_ll_ns16550_outc 'b'
+	debug_ll_ns16550_outnl
+
+	copy_to_link_location	pbl_start
+
+	.set	pop
+	.endm
diff --git a/arch/mips/mach-ar231x/Kconfig b/arch/mips/mach-ar231x/Kconfig
index 1c6a12f..3f338ea 100644
--- a/arch/mips/mach-ar231x/Kconfig
+++ b/arch/mips/mach-ar231x/Kconfig
@@ -9,6 +9,8 @@ choice
 
 config BOARD_NETGEAR_WG102
 	bool "Netgear WG102"
+	select HAVE_PBL_IMAGE
+	select HAVE_IMAGE_COMPRESSION
 
 endchoice
 
-- 
1.8.1.2


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2013-06-19  9:12 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-19  9:11 [PATCH 0/8] low level initialisation for ar2313 Oleksij Rempel
2013-06-19  9:11 ` [PATCH 1/8] MIPS: pbl: add mips_barebox_10h asm macro Oleksij Rempel
2013-06-19  9:11 ` [PATCH 2/8] MIPS: pbl: add pbl_sleep macro Oleksij Rempel
2013-06-21  6:44   ` [PATCH 2/8 v2] " Oleksij Rempel
2013-06-19  9:11 ` [PATCH 3/8] MIPS: pbl: add pbl_probe_mem macro Oleksij Rempel
2013-06-19  9:11 ` [PATCH 4/8] MIPS: mach-ar231x: add lowlevel init pbl macros Oleksij Rempel
2013-06-19  9:11 ` Oleksij Rempel [this message]
2013-06-19  9:11 ` [PATCH 6/8] MIPS: netgear-wg102: add debug_ll Oleksij Rempel
2013-06-19  9:11 ` [PATCH 7/8] MIPS: mach-ar231x: enable DEBUG_LL Oleksij Rempel
2013-06-19  9:11 ` [PATCH 8/8] netgear-wg102: pbl, add extra check for mem config Oleksij Rempel
2013-06-21  5:30 ` [PATCH 0/8] low level initialisation for ar2313 Sascha Hauer
2013-06-21  6:25   ` antonynpavlov
2013-06-21  7:23     ` Sascha Hauer
2013-06-21  7:34       ` antonynpavlov
2013-06-21 15:48 ` Sascha Hauer
2013-06-21 16:37   ` antonynpavlov
2013-06-23 18:42     ` Sascha Hauer
2013-06-23 19:16       ` antonynpavlov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1371633093-23179-6-git-send-email-linux@rempel-privat.de \
    --to=linux@rempel-privat.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox