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) // SPDX-License-Identifier: GPL-2.0-or-later
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  2) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  3)  *  Lemote Fuloong platform support
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  4)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  5)  *  Copyright(c) 2010 Arnaud Patard <apatard@mandriva.com>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  6)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  7) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  8) #include <linux/init.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  9) #include <linux/kernel.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) #include <linux/platform_device.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) #include <linux/mc146818rtc.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) static struct resource loongson_rtc_resources[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) 	{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) 		.start	= RTC_PORT(0),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) 		.end	= RTC_PORT(1),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) 		.flags	= IORESOURCE_IO,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) 	}, {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) 		.start	= RTC_IRQ,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) 		.end	= RTC_IRQ,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) 		.flags	= IORESOURCE_IRQ,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) static struct platform_device loongson_rtc_device = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) 	.name		= "rtc_cmos",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) 	.id		= -1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) 	.resource	= loongson_rtc_resources,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) 	.num_resources	= ARRAY_SIZE(loongson_rtc_resources),
^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) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) static int __init loongson_rtc_platform_init(void)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) 	platform_device_register(&loongson_rtc_device);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) 	return 0;
^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) device_initcall(loongson_rtc_platform_init);