2 * Freescale SOC support functions
4 * Author: Scott Wood <scottwood@freescale.com>
6 * Copyright (c) 2007 Freescale Semiconductor, Inc.
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License version 2 as published
10 * by the Free Software Foundation.
18 static u32 prop_buf[MAX_PROP_LEN / 4];
20 u32 *fsl_get_immr(void)
23 unsigned long ret = 0;
25 soc = find_node_by_devtype(NULL, "soc");
30 size = getprop(soc, "#address-cells", prop_buf, MAX_PROP_LEN);
36 if (naddr != 1 && naddr != 2)
39 size = getprop(soc, "ranges", prop_buf, MAX_PROP_LEN);
45 if (naddr == 2 && prop_buf[1] != 0)
48 if (!dt_xlate_addr(soc, prop_buf + naddr, 8, &ret))
54 printf("fsl_get_immr: Failed to find immr base\r\n");