mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Oleksij Rempel <linux@rempel-privat.de>
To: barebox@lists.infradead.org
Cc: Oleksij Rempel <linux@rempel-privat.de>
Subject: [PATCH v1 3/4] MIPS: ath79: ar9331: add ar9331_pbl_generic_start macro
Date: Sat,  9 Dec 2017 10:59:37 +0100	[thread overview]
Message-ID: <20171209095938.30160-3-linux@rempel-privat.de> (raw)
In-Reply-To: <20171209095938.30160-1-linux@rempel-privat.de>

Most of ar9331 boards have identical PBL. So we can sync the code
to single macro.

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
---
 arch/mips/mach-ath79/include/mach/pbl_macros.h | 35 ++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/arch/mips/mach-ath79/include/mach/pbl_macros.h b/arch/mips/mach-ath79/include/mach/pbl_macros.h
index 9e4859b19..906d73e8c 100644
--- a/arch/mips/mach-ath79/include/mach/pbl_macros.h
+++ b/arch/mips/mach-ath79/include/mach/pbl_macros.h
@@ -368,4 +368,39 @@ normal_path:
 	.set	pop
 .endm
 
+	.macro	ar9331_pbl_generic_start
+	.set	push
+	.set	noreorder
+
+	mips_barebox_10h
+
+	pbl_blt 0xbf000000 skip_pll_ram_config t8
+
+	hornet_mips24k_cp0_setup
+
+	pbl_ar9331_wmac_enable
+
+	hornet_1_1_war
+
+	pbl_ar9331_pll
+	pbl_ar9331_ram_generic_config
+
+skip_pll_ram_config:
+	/* Initialize caches... */
+	mips_cache_reset
+
+	/* ... and enable them */
+	dcache_enable
+
+	pbl_ar9331_uart_enable
+	debug_ll_ar9331_init
+	mips_nmon
+
+	pbl_ar9331_mdio_gpio_enable
+
+	copy_to_link_location	pbl_start
+
+	.set	pop
+	.endm
+
 #endif /* __ASM_MACH_ATH79_PBL_MACROS_H */
-- 
2.14.1


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

  parent reply	other threads:[~2017-12-09 10:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-09  9:59 [PATCH v1 1/4] MIPS: ar9331: add watchdog support Oleksij Rempel
2017-12-09  9:59 ` [PATCH v1 2/4] MIPS: ath79: ar9331: add generic RAM macro Oleksij Rempel
2017-12-09  9:59 ` Oleksij Rempel [this message]
2017-12-09  9:59 ` [PATCH v1 4/4] MIPS: add support for DPTechnics DPT-Module v1 Oleksij Rempel
2017-12-09 16:54   ` Antony Pavlov
2017-12-11  5:53     ` Oleksij Rempel
2017-12-12  6:50       ` Sascha Hauer
2017-12-12  7:00         ` Oleksij Rempel

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=20171209095938.30160-3-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