Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0-only
0002 /*
0003  * arch/arm/mach-tegra/io.c
0004  *
0005  * Copyright (C) 2010 Google, Inc.
0006  *
0007  * Author:
0008  *  Colin Cross <ccross@google.com>
0009  *  Erik Gilling <konkers@google.com>
0010  */
0011 
0012 #include <linux/init.h>
0013 #include <linux/io.h>
0014 #include <linux/kernel.h>
0015 #include <linux/mm.h>
0016 #include <linux/module.h>
0017 
0018 #include <asm/mach/map.h>
0019 #include <asm/page.h>
0020 
0021 #include "board.h"
0022 #include "iomap.h"
0023 
0024 static struct map_desc tegra_io_desc[] __initdata = {
0025     {
0026         .virtual = (unsigned long)IO_PPSB_VIRT,
0027         .pfn = __phys_to_pfn(IO_PPSB_PHYS),
0028         .length = IO_PPSB_SIZE,
0029         .type = MT_DEVICE,
0030     },
0031     {
0032         .virtual = (unsigned long)IO_APB_VIRT,
0033         .pfn = __phys_to_pfn(IO_APB_PHYS),
0034         .length = IO_APB_SIZE,
0035         .type = MT_DEVICE,
0036     },
0037     {
0038         .virtual = (unsigned long)IO_CPU_VIRT,
0039         .pfn = __phys_to_pfn(IO_CPU_PHYS),
0040         .length = IO_CPU_SIZE,
0041         .type = MT_DEVICE,
0042     },
0043     {
0044         .virtual = (unsigned long)IO_IRAM_VIRT,
0045         .pfn = __phys_to_pfn(IO_IRAM_PHYS),
0046         .length = IO_IRAM_SIZE,
0047         .type = MT_DEVICE,
0048     },
0049 };
0050 
0051 void __init tegra_map_common_io(void)
0052 {
0053     debug_ll_io_init();
0054     iotable_init(tegra_io_desc, ARRAY_SIZE(tegra_io_desc));
0055 }