Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0-only
0002 /*
0003  * arch/arm/mach-orion5x/mpp.c
0004  *
0005  * MPP functions for Marvell Orion 5x SoCs
0006  */
0007 
0008 #include <linux/kernel.h>
0009 #include <linux/init.h>
0010 #include <linux/io.h>
0011 #include <plat/mpp.h>
0012 #include "orion5x.h"
0013 #include "mpp.h"
0014 #include "common.h"
0015 
0016 static unsigned int __init orion5x_variant(void)
0017 {
0018     u32 dev;
0019     u32 rev;
0020 
0021     orion5x_pcie_id(&dev, &rev);
0022 
0023     if (dev == MV88F5181_DEV_ID)
0024         return MPP_F5181_MASK;
0025 
0026     if (dev == MV88F5182_DEV_ID)
0027         return MPP_F5182_MASK;
0028 
0029     if (dev == MV88F5281_DEV_ID)
0030         return MPP_F5281_MASK;
0031 
0032     printk(KERN_ERR "MPP setup: unknown orion5x variant "
0033            "(dev %#x rev %#x)\n", dev, rev);
0034     return 0;
0035 }
0036 
0037 void __init orion5x_mpp_conf(unsigned int *mpp_list)
0038 {
0039     orion_mpp_conf(mpp_list, orion5x_variant(),
0040                MPP_MAX, ORION5X_DEV_BUS_VIRT_BASE);
0041 }