18c2ecf20Sopenharmony_ci/* 28c2ecf20Sopenharmony_ci * arch/arm/mach-spear13xx/spear1310.c 38c2ecf20Sopenharmony_ci * 48c2ecf20Sopenharmony_ci * SPEAr1310 machine source file 58c2ecf20Sopenharmony_ci * 68c2ecf20Sopenharmony_ci * Copyright (C) 2012 ST Microelectronics 78c2ecf20Sopenharmony_ci * Viresh Kumar <vireshk@kernel.org> 88c2ecf20Sopenharmony_ci * 98c2ecf20Sopenharmony_ci * This file is licensed under the terms of the GNU General Public 108c2ecf20Sopenharmony_ci * License version 2. This program is licensed "as is" without any 118c2ecf20Sopenharmony_ci * warranty of any kind, whether express or implied. 128c2ecf20Sopenharmony_ci */ 138c2ecf20Sopenharmony_ci 148c2ecf20Sopenharmony_ci#define pr_fmt(fmt) "SPEAr1310: " fmt 158c2ecf20Sopenharmony_ci 168c2ecf20Sopenharmony_ci#include <linux/amba/pl022.h> 178c2ecf20Sopenharmony_ci#include <linux/pata_arasan_cf_data.h> 188c2ecf20Sopenharmony_ci#include <asm/mach/arch.h> 198c2ecf20Sopenharmony_ci#include <asm/mach/map.h> 208c2ecf20Sopenharmony_ci#include "generic.h" 218c2ecf20Sopenharmony_ci#include <mach/spear.h> 228c2ecf20Sopenharmony_ci 238c2ecf20Sopenharmony_ci/* Base addresses */ 248c2ecf20Sopenharmony_ci#define SPEAR1310_RAS_GRP1_BASE UL(0xD8000000) 258c2ecf20Sopenharmony_ci#define VA_SPEAR1310_RAS_GRP1_BASE UL(0xFA000000) 268c2ecf20Sopenharmony_ci 278c2ecf20Sopenharmony_cistatic void __init spear1310_dt_init(void) 288c2ecf20Sopenharmony_ci{ 298c2ecf20Sopenharmony_ci platform_device_register_simple("spear-cpufreq", -1, NULL, 0); 308c2ecf20Sopenharmony_ci} 318c2ecf20Sopenharmony_ci 328c2ecf20Sopenharmony_cistatic const char * const spear1310_dt_board_compat[] = { 338c2ecf20Sopenharmony_ci "st,spear1310", 348c2ecf20Sopenharmony_ci "st,spear1310-evb", 358c2ecf20Sopenharmony_ci NULL, 368c2ecf20Sopenharmony_ci}; 378c2ecf20Sopenharmony_ci 388c2ecf20Sopenharmony_ci/* 398c2ecf20Sopenharmony_ci * Following will create 16MB static virtual/physical mappings 408c2ecf20Sopenharmony_ci * PHYSICAL VIRTUAL 418c2ecf20Sopenharmony_ci * 0xD8000000 0xFA000000 428c2ecf20Sopenharmony_ci */ 438c2ecf20Sopenharmony_cistatic struct map_desc spear1310_io_desc[] __initdata = { 448c2ecf20Sopenharmony_ci { 458c2ecf20Sopenharmony_ci .virtual = VA_SPEAR1310_RAS_GRP1_BASE, 468c2ecf20Sopenharmony_ci .pfn = __phys_to_pfn(SPEAR1310_RAS_GRP1_BASE), 478c2ecf20Sopenharmony_ci .length = SZ_16M, 488c2ecf20Sopenharmony_ci .type = MT_DEVICE 498c2ecf20Sopenharmony_ci }, 508c2ecf20Sopenharmony_ci}; 518c2ecf20Sopenharmony_ci 528c2ecf20Sopenharmony_cistatic void __init spear1310_map_io(void) 538c2ecf20Sopenharmony_ci{ 548c2ecf20Sopenharmony_ci iotable_init(spear1310_io_desc, ARRAY_SIZE(spear1310_io_desc)); 558c2ecf20Sopenharmony_ci spear13xx_map_io(); 568c2ecf20Sopenharmony_ci} 578c2ecf20Sopenharmony_ci 588c2ecf20Sopenharmony_ciDT_MACHINE_START(SPEAR1310_DT, "ST SPEAr1310 SoC with Flattened Device Tree") 598c2ecf20Sopenharmony_ci .smp = smp_ops(spear13xx_smp_ops), 608c2ecf20Sopenharmony_ci .map_io = spear1310_map_io, 618c2ecf20Sopenharmony_ci .init_time = spear13xx_timer_init, 628c2ecf20Sopenharmony_ci .init_machine = spear1310_dt_init, 638c2ecf20Sopenharmony_ci .restart = spear_restart, 648c2ecf20Sopenharmony_ci .dt_compat = spear1310_dt_board_compat, 658c2ecf20Sopenharmony_ciMACHINE_END 66