9
0
Fork 0

MIPS: netgear-wg102: add pbl support

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Oleksij Rempel 2013-06-19 11:11:30 +02:00 committed by Sascha Hauer
parent ed61198836
commit b8a6290e03
2 changed files with 71 additions and 0 deletions

View File

@ -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

View File

@ -9,6 +9,8 @@ choice
config BOARD_NETGEAR_WG102
bool "Netgear WG102"
select HAVE_PBL_IMAGE
select HAVE_IMAGE_COMPRESSION
endchoice