| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * PS3 platform setup routines. |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Copyright (C) 2006 Sony Computer Entertainment Inc. |
|---|
| 5 | 6 | * Copyright 2006 Sony Corp. |
|---|
| 6 | | - * |
|---|
| 7 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 8 | | - * it under the terms of the GNU General Public License as published by |
|---|
| 9 | | - * the Free Software Foundation; version 2 of the License. |
|---|
| 10 | | - * |
|---|
| 11 | | - * This program is distributed in the hope that it will be useful, |
|---|
| 12 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 13 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 14 | | - * GNU General Public License for more details. |
|---|
| 15 | | - * |
|---|
| 16 | | - * You should have received a copy of the GNU General Public License |
|---|
| 17 | | - * along with this program; if not, write to the Free Software |
|---|
| 18 | | - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|---|
| 19 | 7 | */ |
|---|
| 20 | 8 | |
|---|
| 21 | 9 | #include <linux/kernel.h> |
|---|
| .. | .. |
|---|
| 24 | 12 | #include <linux/root_dev.h> |
|---|
| 25 | 13 | #include <linux/console.h> |
|---|
| 26 | 14 | #include <linux/export.h> |
|---|
| 27 | | -#include <linux/bootmem.h> |
|---|
| 15 | +#include <linux/memblock.h> |
|---|
| 28 | 16 | |
|---|
| 29 | 17 | #include <asm/machdep.h> |
|---|
| 30 | 18 | #include <asm/firmware.h> |
|---|
| .. | .. |
|---|
| 126 | 114 | if (!p->size) |
|---|
| 127 | 115 | return; |
|---|
| 128 | 116 | |
|---|
| 129 | | - p->address = memblock_virt_alloc(p->size, p->align); |
|---|
| 117 | + p->address = memblock_alloc(p->size, p->align); |
|---|
| 118 | + if (!p->address) |
|---|
| 119 | + panic("%s: Failed to allocate %lu bytes align=0x%lx\n", |
|---|
| 120 | + __func__, p->size, p->align); |
|---|
| 130 | 121 | |
|---|
| 131 | 122 | printk(KERN_INFO "%s: %lu bytes at %p\n", p->name, p->size, |
|---|
| 132 | 123 | p->address); |
|---|
| .. | .. |
|---|
| 147 | 138 | if (!p) |
|---|
| 148 | 139 | return 1; |
|---|
| 149 | 140 | |
|---|
| 150 | | - ps3fb_videomemory.size = _ALIGN_UP(memparse(p, &p), |
|---|
| 141 | + ps3fb_videomemory.size = ALIGN(memparse(p, &p), |
|---|
| 151 | 142 | ps3fb_videomemory.align); |
|---|
| 152 | 143 | return 0; |
|---|
| 153 | 144 | } |
|---|
| .. | .. |
|---|
| 207 | 198 | |
|---|
| 208 | 199 | #ifdef CONFIG_SMP |
|---|
| 209 | 200 | smp_init_ps3(); |
|---|
| 210 | | -#endif |
|---|
| 211 | | - |
|---|
| 212 | | -#ifdef CONFIG_DUMMY_CONSOLE |
|---|
| 213 | | - conswitchp = &dummy_con; |
|---|
| 214 | 201 | #endif |
|---|
| 215 | 202 | |
|---|
| 216 | 203 | prealloc_ps3fb_videomemory(); |
|---|