exynos5_machdep.c revision 257669
1252391Sray/*- 2252391Sray * Copyright (c) 2013 Ruslan Bukin <br@bsdpad.com> 3252391Sray * All rights reserved. 4252391Sray * 5252391Sray * Redistribution and use in source and binary forms, with or without 6252391Sray * modification, are permitted provided that the following conditions 7252391Sray * are met: 8252391Sray * 1. Redistributions of source code must retain the above copyright 9252391Sray * notice, this list of conditions and the following disclaimer. 10252391Sray * 2. Redistributions in binary form must reproduce the above copyright 11252391Sray * notice, this list of conditions and the following disclaimer in the 12252391Sray * documentation and/or other materials provided with the distribution. 13252391Sray * 14252391Sray * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15252391Sray * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16252391Sray * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17252391Sray * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18252391Sray * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19252391Sray * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20252391Sray * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21252391Sray * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22252391Sray * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23252391Sray * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24252391Sray * SUCH DAMAGE. 25252391Sray */ 26252391Sray 27252391Sray#include "opt_ddb.h" 28252391Sray#include "opt_platform.h" 29252391Sray 30252391Sray#include <sys/cdefs.h> 31252391Sray__FBSDID("$FreeBSD: head/sys/arm/samsung/exynos/exynos5_machdep.c 257669 2013-11-05 02:57:34Z ian $"); 32252391Sray 33252391Sray#define _ARM32_BUS_DMA_PRIVATE 34252391Sray#include <sys/param.h> 35252391Sray#include <sys/systm.h> 36252391Sray#include <sys/bus.h> 37252391Sray 38252391Sray#include <vm/vm.h> 39252391Sray#include <vm/pmap.h> 40252391Sray 41252391Sray#include <machine/bus.h> 42257660Sian#include <machine/devmap.h> 43252391Sray#include <machine/machdep.h> 44252391Sray 45252391Sray#include <dev/fdt/fdt_common.h> 46252391Sray 47254495Scognet#define DEVMAP_BOOTSTRAP_MAP_START 0xF0000000 48252391Sray 49252391Srayvm_offset_t 50252391Srayinitarm_lastaddr(void) 51252391Sray{ 52252391Sray 53257201Sian return (DEVMAP_BOOTSTRAP_MAP_START); 54252391Sray} 55252391Sray 56252391Srayvoid 57257669Sianinitarm_early_init(void) 58257669Sian{ 59257669Sian 60257669Sian} 61257669Sian 62257669Sianvoid 63252391Srayinitarm_gpio_init(void) 64252391Sray{ 65252391Sray} 66252391Sray 67252391Srayvoid 68252391Srayinitarm_late_init(void) 69252391Sray{ 70252391Sray} 71252391Sray 72252391Sray#define FDT_DEVMAP_MAX (1 + 2 + 1 + 1) /* FIXME */ 73257660Sianstatic struct arm_devmap_entry fdt_devmap[FDT_DEVMAP_MAX] = { 74252391Sray { 0, 0, 0, 0, 0, } 75252391Sray}; 76252391Sray 77252391Sray/* 78252391Sray * Construct pmap_devmap[] with DT-derived config data. 79252391Sray */ 80252391Srayint 81257669Sianinitarm_devmap_init(void) 82252391Sray{ 83252391Sray int i; 84252391Sray 85252391Sray i = 0; 86254495Scognet fdt_devmap[i].pd_va = 0xf2C00000; 87252391Sray fdt_devmap[i].pd_pa = 0x12C00000; 88252391Sray fdt_devmap[i].pd_size = 0x100000; 89252391Sray fdt_devmap[i].pd_prot = VM_PROT_READ | VM_PROT_WRITE; 90252391Sray fdt_devmap[i].pd_cache = PTE_NOCACHE; 91252391Sray i++; 92252391Sray 93257660Sian arm_devmap_register_table(&fdt_devmap[0]); 94252391Sray return (0); 95252391Sray} 96252391Sray 97252391Sraystruct arm32_dma_range * 98252391Sraybus_dma_get_range(void) 99252391Sray{ 100252391Sray 101252391Sray return (NULL); 102252391Sray} 103252391Sray 104252391Srayint 105252391Sraybus_dma_get_range_nb(void) 106252391Sray{ 107252391Sray 108252391Sray return (0); 109252391Sray} 110