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-orion5x/mpp.c
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  3)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  4)  * MPP functions for Marvell Orion 5x SoCs
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  5)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  6)  * This file is licensed under the terms of the GNU General Public
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  7)  * License version 2.  This program is licensed "as is" without any
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  8)  * warranty of any kind, whether express or implied.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  9)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) #include <linux/kernel.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) #include <linux/init.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) #include <linux/io.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) #include <plat/mpp.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) #include "orion5x.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) #include "mpp.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) #include "common.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) static unsigned int __init orion5x_variant(void)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) 	u32 dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) 	u32 rev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) 	orion5x_pcie_id(&dev, &rev);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) 	if (dev == MV88F5181_DEV_ID)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) 		return MPP_F5181_MASK;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) 	if (dev == MV88F5182_DEV_ID)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) 		return MPP_F5182_MASK;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) 	if (dev == MV88F5281_DEV_ID)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) 		return MPP_F5281_MASK;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) 	printk(KERN_ERR "MPP setup: unknown orion5x variant "
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) 	       "(dev %#x rev %#x)\n", dev, rev);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) 	return 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) void __init orion5x_mpp_conf(unsigned int *mpp_list)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) 	orion_mpp_conf(mpp_list, orion5x_variant(),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) 		       MPP_MAX, ORION5X_DEV_BUS_VIRT_BASE);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) }