Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  1) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  2)  * arch/arm/mach-spear13xx/spear1310.c
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  3)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  4)  * SPEAr1310 machine source file
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  5)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  6)  * Copyright (C) 2012 ST Microelectronics
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  7)  * Viresh Kumar <vireshk@kernel.org>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  8)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  9)  * This file is licensed under the terms of the GNU General Public
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10)  * License version 2. This program is licensed "as is" without any
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11)  * warranty of any kind, whether express or implied.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) #define pr_fmt(fmt) "SPEAr1310: " fmt
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) #include <linux/amba/pl022.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) #include <linux/pata_arasan_cf_data.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) #include <asm/mach/arch.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) #include <asm/mach/map.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) #include "generic.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) #include <mach/spear.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) /* Base addresses */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) #define SPEAR1310_RAS_GRP1_BASE			UL(0xD8000000)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) #define VA_SPEAR1310_RAS_GRP1_BASE		UL(0xFA000000)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) static void __init spear1310_dt_init(void)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) 	platform_device_register_simple("spear-cpufreq", -1, NULL, 0);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) static const char * const spear1310_dt_board_compat[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) 	"st,spear1310",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) 	"st,spear1310-evb",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) 	NULL,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39)  * Following will create 16MB static virtual/physical mappings
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40)  * PHYSICAL		VIRTUAL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41)  * 0xD8000000		0xFA000000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) static struct map_desc spear1310_io_desc[] __initdata = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) 	{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) 		.virtual	= VA_SPEAR1310_RAS_GRP1_BASE,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) 		.pfn		= __phys_to_pfn(SPEAR1310_RAS_GRP1_BASE),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) 		.length		= SZ_16M,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) 		.type		= MT_DEVICE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) 	},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) static void __init spear1310_map_io(void)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) 	iotable_init(spear1310_io_desc, ARRAY_SIZE(spear1310_io_desc));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) 	spear13xx_map_io();
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58) DT_MACHINE_START(SPEAR1310_DT, "ST SPEAr1310 SoC with Flattened Device Tree")
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59) 	.smp		=	smp_ops(spear13xx_smp_ops),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60) 	.map_io		=	spear1310_map_io,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61) 	.init_time	=	spear13xx_timer_init,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62) 	.init_machine	=	spear1310_dt_init,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63) 	.restart	=	spear_restart,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64) 	.dt_compat	=	spear1310_dt_board_compat,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65) MACHINE_END