2006-03-12 01:12:27 +00:00
|
|
|
/*
|
2007-09-13 13:35:49 +00:00
|
|
|
* U-boot - blackfin_linux.c
|
2006-03-12 01:12:27 +00:00
|
|
|
*
|
|
|
|
* Copyright (c) 2005 blackfin.uclinux.org
|
|
|
|
*
|
|
|
|
* (C) Copyright 2000-2004
|
|
|
|
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
|
|
|
*
|
|
|
|
* 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 as
|
|
|
|
* published by the Free Software Foundation; either version 2 of
|
|
|
|
* the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
|
|
|
* MA 02111-1307 USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* Dummy functions, currently not in Use */
|
|
|
|
|
|
|
|
#include <common.h>
|
|
|
|
#include <command.h>
|
|
|
|
#include <image.h>
|
2007-09-13 13:35:49 +00:00
|
|
|
#include <environment.h>
|
2006-03-12 01:12:27 +00:00
|
|
|
#include <asm/byteorder.h>
|
2007-09-13 13:35:49 +00:00
|
|
|
#include <asm/cpu.h>
|
2006-03-12 01:12:27 +00:00
|
|
|
|
|
|
|
#define CMD_LINE_ADDR 0xFF900000 /* L1 scratchpad */
|
|
|
|
|
2007-09-13 13:35:49 +00:00
|
|
|
int do_bootm_linux(struct image_handle *os_handle, struct image_handle *initrd)
|
2006-03-12 01:12:27 +00:00
|
|
|
{
|
|
|
|
int (*appl)(char *cmdline);
|
2007-09-13 13:35:49 +00:00
|
|
|
const char *cmdline = getenv("bootargs");
|
|
|
|
char *cmdlinedest = (char *) CMD_LINE_ADDR;
|
|
|
|
image_header_t *os_header = &os_handle->header;
|
2006-03-12 01:12:27 +00:00
|
|
|
|
2007-09-13 13:35:49 +00:00
|
|
|
appl = (int (*)(char *))ntohl(os_header->ih_ep);
|
2006-03-12 01:12:27 +00:00
|
|
|
printf("Starting Kernel at = %x\n", appl);
|
2007-09-13 13:35:49 +00:00
|
|
|
|
|
|
|
strncpy(cmdlinedest, cmdline, 0x1000);
|
|
|
|
cmdlinedest[0xfff] = 0;
|
|
|
|
|
2006-03-12 01:12:27 +00:00
|
|
|
if(icache_status()){
|
|
|
|
flush_instruction_cache();
|
|
|
|
icache_disable();
|
2007-09-13 13:35:49 +00:00
|
|
|
}
|
|
|
|
|
2006-03-12 01:12:27 +00:00
|
|
|
if(dcache_status()){
|
|
|
|
flush_data_cache();
|
|
|
|
dcache_disable();
|
2007-09-13 13:35:49 +00:00
|
|
|
}
|
2006-03-12 01:12:27 +00:00
|
|
|
|
2007-09-13 13:35:49 +00:00
|
|
|
(*appl)(cmdlinedest);
|
2006-03-12 01:12:27 +00:00
|
|
|
|
2007-09-13 13:35:49 +00:00
|
|
|
return -1;
|
2006-03-12 01:12:27 +00:00
|
|
|
}
|
2007-09-13 13:35:49 +00:00
|
|
|
|