Staging: hv: mousevsc: Cleanup alloc_input_device()
[zen-stable.git] / arch / arm / mach-kirkwood / mpp.c
blobb0a7d979a8ed98e9fa35abed1d49577e0ec66b63
1 /*
2 * arch/arm/mach-kirkwood/mpp.c
4 * MPP functions for Marvell Kirkwood SoCs
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 */
11 #include <linux/kernel.h>
12 #include <linux/init.h>
13 #include <linux/mbus.h>
14 #include <linux/io.h>
15 #include <asm/gpio.h>
16 #include <mach/hardware.h>
17 #include <plat/mpp.h>
18 #include "common.h"
19 #include "mpp.h"
21 static unsigned int __init kirkwood_variant(void)
23 u32 dev, rev;
25 kirkwood_pcie_id(&dev, &rev);
27 if ((dev == MV88F6281_DEV_ID && rev >= MV88F6281_REV_A0) ||
28 (dev == MV88F6282_DEV_ID))
29 return MPP_F6281_MASK;
30 if (dev == MV88F6192_DEV_ID && rev >= MV88F6192_REV_A0)
31 return MPP_F6192_MASK;
32 if (dev == MV88F6180_DEV_ID)
33 return MPP_F6180_MASK;
35 printk(KERN_ERR "MPP setup: unknown kirkwood variant "
36 "(dev %#x rev %#x)\n", dev, rev);
37 return 0;
40 void __init kirkwood_mpp_conf(unsigned int *mpp_list)
42 orion_mpp_conf(mpp_list, kirkwood_variant(),
43 MPP_MAX, DEV_BUS_VIRT_BASE);