summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOleksij Rempel <linux@rempel-privat.de>2017-12-12 18:55:56 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2018-01-05 09:31:00 +0100
commit6d82245b00d35de260d3473283480e451d8a198e (patch)
treef98ac5487562961debb6f2d9efbb095f9d81f67b
parentc552c154fef0ac149815c8aff75ef5744150536b (diff)
downloadbarebox-6d82245b00d35de260d3473283480e451d8a198e.tar.gz
barebox-6d82245b00d35de260d3473283480e451d8a198e.tar.xz
MIPS: ath79: ar9331: add ar9331_pbl_generic_start macro
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> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--arch/mips/mach-ath79/include/mach/pbl_macros.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/arch/mips/mach-ath79/include/mach/pbl_macros.h b/arch/mips/mach-ath79/include/mach/pbl_macros.h
index 9e4859b19f..906d73e8c7 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 */