18c2ecf20Sopenharmony_ci/* 28c2ecf20Sopenharmony_ci * arch/arm/mach-mv78x00/mpp.c 38c2ecf20Sopenharmony_ci * 48c2ecf20Sopenharmony_ci * MPP functions for Marvell MV78x00 SoCs 58c2ecf20Sopenharmony_ci * 68c2ecf20Sopenharmony_ci * This file is licensed under the terms of the GNU General Public 78c2ecf20Sopenharmony_ci * License version 2. This program is licensed "as is" without any 88c2ecf20Sopenharmony_ci * warranty of any kind, whether express or implied. 98c2ecf20Sopenharmony_ci */ 108c2ecf20Sopenharmony_ci#include <linux/gpio.h> 118c2ecf20Sopenharmony_ci#include <linux/kernel.h> 128c2ecf20Sopenharmony_ci#include <linux/init.h> 138c2ecf20Sopenharmony_ci#include <linux/io.h> 148c2ecf20Sopenharmony_ci#include <plat/mpp.h> 158c2ecf20Sopenharmony_ci#include "mv78xx0.h" 168c2ecf20Sopenharmony_ci#include "common.h" 178c2ecf20Sopenharmony_ci#include "mpp.h" 188c2ecf20Sopenharmony_ci 198c2ecf20Sopenharmony_cistatic unsigned int __init mv78xx0_variant(void) 208c2ecf20Sopenharmony_ci{ 218c2ecf20Sopenharmony_ci u32 dev, rev; 228c2ecf20Sopenharmony_ci 238c2ecf20Sopenharmony_ci mv78xx0_pcie_id(&dev, &rev); 248c2ecf20Sopenharmony_ci 258c2ecf20Sopenharmony_ci if (dev == MV78100_DEV_ID && rev >= MV78100_REV_A0) 268c2ecf20Sopenharmony_ci return MPP_78100_A0_MASK; 278c2ecf20Sopenharmony_ci 288c2ecf20Sopenharmony_ci printk(KERN_ERR "MPP setup: unknown mv78x00 variant " 298c2ecf20Sopenharmony_ci "(dev %#x rev %#x)\n", dev, rev); 308c2ecf20Sopenharmony_ci return 0; 318c2ecf20Sopenharmony_ci} 328c2ecf20Sopenharmony_ci 338c2ecf20Sopenharmony_civoid __init mv78xx0_mpp_conf(unsigned int *mpp_list) 348c2ecf20Sopenharmony_ci{ 358c2ecf20Sopenharmony_ci orion_mpp_conf(mpp_list, mv78xx0_variant(), 368c2ecf20Sopenharmony_ci MPP_MAX, DEV_BUS_VIRT_BASE); 378c2ecf20Sopenharmony_ci} 38