blob: 59b7686b92097f30f36175ccfeb8ead5f12d42c3 [file] [log] [blame]
Sebastien Requiemee40cea2010-02-23 14:38:14 +01001/*
2 * arch/arm/mach-mv78x00/mpp.c
3 *
4 * MPP functions for Marvell MV78x00 SoCs
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10
11#include <linux/kernel.h>
12#include <linux/init.h>
13#include <linux/mbus.h>
14#include <linux/io.h>
Andrew Lunnb2f427a2011-05-15 13:32:52 +020015#include <plat/mpp.h>
Sebastien Requiemee40cea2010-02-23 14:38:14 +010016#include <asm/gpio.h>
17#include <mach/hardware.h>
18#include "common.h"
19#include "mpp.h"
20
21static unsigned int __init mv78xx0_variant(void)
22{
23 u32 dev, rev;
24
25 mv78xx0_pcie_id(&dev, &rev);
26
27 if (dev == MV78100_DEV_ID && rev >= MV78100_REV_A0)
28 return MPP_78100_A0_MASK;
29
30 printk(KERN_ERR "MPP setup: unknown mv78x00 variant "
31 "(dev %#x rev %#x)\n", dev, rev);
32 return 0;
33}
34
Sebastien Requiemee40cea2010-02-23 14:38:14 +010035void __init mv78xx0_mpp_conf(unsigned int *mpp_list)
36{
Andrew Lunnb2f427a2011-05-15 13:32:52 +020037 orion_mpp_conf(mpp_list, mv78xx0_variant(),
38 MPP_MAX, DEV_BUS_VIRT_BASE);
Sebastien Requiemee40cea2010-02-23 14:38:14 +010039}