imx_machdep.c (257660) | imx_machdep.c (257669) |
---|---|
1/*- 2 * Copyright (c) 2013 Ian Lepore <ian@freebsd.org> 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 --- 13 unchanged lines hidden (view full) --- 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 "opt_platform.h" 28 29#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2013 Ian Lepore <ian@freebsd.org> 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 --- 13 unchanged lines hidden (view full) --- 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 "opt_platform.h" 28 29#include <sys/cdefs.h> |
30__FBSDID("$FreeBSD: head/sys/arm/freescale/imx/imx_machdep.c 257660 2013-11-04 22:45:26Z ian $"); | 30__FBSDID("$FreeBSD: head/sys/arm/freescale/imx/imx_machdep.c 257669 2013-11-05 02:57:34Z ian $"); |
31 32#define _ARM32_BUS_DMA_PRIVATE 33#include <sys/param.h> 34#include <sys/systm.h> 35#include <sys/reboot.h> 36 37#include <vm/vm.h> 38#include <vm/pmap.h> --- 44 unchanged lines hidden (view full) --- 83 m->pd_prot = VM_PROT_READ | VM_PROT_WRITE; 84 m->pd_cache = PTE_DEVICE; 85} 86 87vm_offset_t 88initarm_lastaddr(void) 89{ 90 | 31 32#define _ARM32_BUS_DMA_PRIVATE 33#include <sys/param.h> 34#include <sys/systm.h> 35#include <sys/reboot.h> 36 37#include <vm/vm.h> 38#include <vm/pmap.h> --- 44 unchanged lines hidden (view full) --- 83 m->pd_prot = VM_PROT_READ | VM_PROT_WRITE; 84 m->pd_cache = PTE_DEVICE; 85} 86 87vm_offset_t 88initarm_lastaddr(void) 89{ 90 |
91 return (devmap_vaddr); 92} 93 94void 95initarm_early_init(void) 96{ 97 |
|
91 /* XXX - Get rid of this stuff soon. */ 92 boothowto |= RB_VERBOSE|RB_MULTIPLE; 93 bootverbose = 1; | 98 /* XXX - Get rid of this stuff soon. */ 99 boothowto |= RB_VERBOSE|RB_MULTIPLE; 100 bootverbose = 1; |
94 95 /* 96 * Normally initarm() calls platform_devmap_init() much later in the 97 * init process to set up static device mappings. To calculate the 98 * highest available kva address we have to do that setup first. It 99 * maps downwards from ARM_VECTORS_HIGH and the last usable kva address 100 * is the point right before the virtual address of the first static 101 * mapping. So go set up the static mapping table now, then we can 102 * return the lowest static devmap vaddr as the end of usable kva. 103 */ 104 imx_devmap_init(); 105 106 arm_devmap_register_table(devmap_entries); 107 108 return (devmap_vaddr); | |
109} 110 111int | 101} 102 103int |
112platform_devmap_init(void) | 104initarm_devmap_init(void) |
113{ 114 | 105{ 106 |
115 /* On imx this work is done during initarm_lastaddr(). */ | 107 imx_devmap_init(); 108 arm_devmap_register_table(devmap_entries); |
116 return (0); 117} 118 119/* 120 * Set initial values of GPIO output ports 121 */ 122void 123initarm_gpio_init(void) --- 73 unchanged lines hidden --- | 109 return (0); 110} 111 112/* 113 * Set initial values of GPIO output ports 114 */ 115void 116initarm_gpio_init(void) --- 73 unchanged lines hidden --- |