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)  * This file is subject to the terms and conditions of the GNU General Public
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  3)  * License.  See the file "COPYING" in the main directory of this archive
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  4)  * for more details.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  5)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  6)  * Copyright (C) 2008 Florian Fainelli <florian@openwrt.org>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  7)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  8) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  9) #include <linux/init.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) #include <linux/kernel.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) #include <linux/platform_device.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) #include <bcm63xx_cpu.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) static struct resource wdt_resources[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) 	{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) 		.start		= -1, /* filled at runtime */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) 		.end		= -1, /* filled at runtime */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) 		.flags		= IORESOURCE_MEM,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) 	},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) static struct platform_device bcm63xx_wdt_device = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) 	.name		= "bcm63xx-wdt",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) 	.id		= -1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) 	.num_resources	= ARRAY_SIZE(wdt_resources),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) 	.resource	= wdt_resources,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) int __init bcm63xx_wdt_register(void)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) 	wdt_resources[0].start = bcm63xx_regset_address(RSET_WDT);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) 	wdt_resources[0].end = wdt_resources[0].start;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) 	wdt_resources[0].end += RSET_WDT_SIZE - 1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) 	return platform_device_register(&bcm63xx_wdt_device);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) arch_initcall(bcm63xx_wdt_register);