mv_localbus.c (266160) | mv_localbus.c (266386) |
---|---|
1/*- 2 * Copyright (c) 2012 Semihalf. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2012 Semihalf. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> |
28__FBSDID("$FreeBSD: stable/10/sys/arm/mv/mv_localbus.c 266160 2014-05-15 17:30:16Z ian $"); | 28__FBSDID("$FreeBSD: stable/10/sys/arm/mv/mv_localbus.c 266386 2014-05-18 00:32:35Z ian $"); |
29 30#include "opt_platform.h" 31#include <sys/param.h> 32#include <sys/systm.h> 33#include <sys/ktr.h> 34#include <sys/kernel.h> 35#include <sys/module.h> 36#include <sys/bus.h> --- 435 unchanged lines hidden (view full) --- 472 /* Not enough space reserved in virtual memory map */ 473 continue; 474 } 475 476 fdt_devmap[j].pd_va = localbus_virtmap[va_index].va; 477 fdt_devmap[j].pd_pa = offset; 478 fdt_devmap[j].pd_size = size; 479 fdt_devmap[j].pd_prot = VM_PROT_READ | VM_PROT_WRITE; | 29 30#include "opt_platform.h" 31#include <sys/param.h> 32#include <sys/systm.h> 33#include <sys/ktr.h> 34#include <sys/kernel.h> 35#include <sys/module.h> 36#include <sys/bus.h> --- 435 unchanged lines hidden (view full) --- 472 /* Not enough space reserved in virtual memory map */ 473 continue; 474 } 475 476 fdt_devmap[j].pd_va = localbus_virtmap[va_index].va; 477 fdt_devmap[j].pd_pa = offset; 478 fdt_devmap[j].pd_size = size; 479 fdt_devmap[j].pd_prot = VM_PROT_READ | VM_PROT_WRITE; |
480 fdt_devmap[j].pd_cache = PTE_NOCACHE; | 480 fdt_devmap[j].pd_cache = PTE_DEVICE; |
481 482 /* Copy data to structure used by localbus driver */ 483 localbus_banks[bank].va = fdt_devmap[j].pd_va; 484 localbus_banks[bank].pa = fdt_devmap[j].pd_pa; 485 localbus_banks[bank].size = fdt_devmap[j].pd_size; 486 localbus_banks[bank].mapped = 1; 487 488 j++; 489 } 490 491 *banks_added = j; 492 return (0); 493} | 481 482 /* Copy data to structure used by localbus driver */ 483 localbus_banks[bank].va = fdt_devmap[j].pd_va; 484 localbus_banks[bank].pa = fdt_devmap[j].pd_pa; 485 localbus_banks[bank].size = fdt_devmap[j].pd_size; 486 localbus_banks[bank].mapped = 1; 487 488 j++; 489 } 490 491 *banks_added = j; 492 return (0); 493} |