Merge branch 'omap_clock_fixes_3.2' of git://git.pwsan.com/linux-2.6 into fixes
[linux-2.6-block.git] / arch / arm / mach-mv78xx0 / mpp.c
CommitLineData
ee40ceab
SR
1/*
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 */
2f8163ba 10#include <linux/gpio.h>
ee40ceab
SR
11#include <linux/kernel.h>
12#include <linux/init.h>
13#include <linux/mbus.h>
14#include <linux/io.h>
b2f427a1 15#include <plat/mpp.h>
ee40ceab
SR
16#include <mach/hardware.h>
17#include "common.h"
18#include "mpp.h"
19
20static unsigned int __init mv78xx0_variant(void)
21{
22 u32 dev, rev;
23
24 mv78xx0_pcie_id(&dev, &rev);
25
26 if (dev == MV78100_DEV_ID && rev >= MV78100_REV_A0)
27 return MPP_78100_A0_MASK;
28
29 printk(KERN_ERR "MPP setup: unknown mv78x00 variant "
30 "(dev %#x rev %#x)\n", dev, rev);
31 return 0;
32}
33
ee40ceab
SR
34void __init mv78xx0_mpp_conf(unsigned int *mpp_list)
35{
b2f427a1
AL
36 orion_mpp_conf(mpp_list, mv78xx0_variant(),
37 MPP_MAX, DEV_BUS_VIRT_BASE);
ee40ceab 38}