Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0-only
0002 /*
0003  *  Atheros AR71XX/AR724X/AR913X specific prom routines
0004  *
0005  *  Copyright (C) 2015 Laurent Fasnacht <l@libres.ch>
0006  *  Copyright (C) 2008-2010 Gabor Juhos <juhosg@openwrt.org>
0007  *  Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org>
0008  */
0009 
0010 #include <linux/kernel.h>
0011 #include <linux/init.h>
0012 #include <linux/io.h>
0013 #include <linux/string.h>
0014 #include <linux/initrd.h>
0015 
0016 #include <asm/bootinfo.h>
0017 #include <asm/addrspace.h>
0018 #include <asm/fw/fw.h>
0019 
0020 #include "common.h"
0021 
0022 void __init prom_init(void)
0023 {
0024     fw_init_cmdline();
0025 
0026 #ifdef CONFIG_BLK_DEV_INITRD
0027     /* Read the initrd address from the firmware environment */
0028     initrd_start = fw_getenvl("initrd_start");
0029     if (initrd_start) {
0030         initrd_start = KSEG0ADDR(initrd_start);
0031         initrd_end = initrd_start + fw_getenvl("initrd_size");
0032     }
0033 #endif
0034 }