Sebastien Requiem | ee40cea | 2010-02-23 14:38:14 +0100 | [diff] [blame] | 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 | */ |
Russell King | 2f8163b | 2011-07-26 10:53:52 +0100 | [diff] [blame] | 10 | #include <linux/gpio.h> |
Sebastien Requiem | ee40cea | 2010-02-23 14:38:14 +0100 | [diff] [blame] | 11 | #include <linux/kernel.h> |
| 12 | #include <linux/init.h> |
Sebastien Requiem | ee40cea | 2010-02-23 14:38:14 +0100 | [diff] [blame] | 13 | #include <linux/io.h> |
Andrew Lunn | b2f427a | 2011-05-15 13:32:52 +0200 | [diff] [blame] | 14 | #include <plat/mpp.h> |
Sebastien Requiem | ee40cea | 2010-02-23 14:38:14 +0100 | [diff] [blame] | 15 | #include <mach/hardware.h> |
| 16 | #include "common.h" |
| 17 | #include "mpp.h" |
| 18 | |
| 19 | static unsigned int __init mv78xx0_variant(void) |
| 20 | { |
| 21 | u32 dev, rev; |
| 22 | |
| 23 | mv78xx0_pcie_id(&dev, &rev); |
| 24 | |
| 25 | if (dev == MV78100_DEV_ID && rev >= MV78100_REV_A0) |
| 26 | return MPP_78100_A0_MASK; |
| 27 | |
| 28 | printk(KERN_ERR "MPP setup: unknown mv78x00 variant " |
| 29 | "(dev %#x rev %#x)\n", dev, rev); |
| 30 | return 0; |
| 31 | } |
| 32 | |
Sebastien Requiem | ee40cea | 2010-02-23 14:38:14 +0100 | [diff] [blame] | 33 | void __init mv78xx0_mpp_conf(unsigned int *mpp_list) |
| 34 | { |
Andrew Lunn | b2f427a | 2011-05-15 13:32:52 +0200 | [diff] [blame] | 35 | orion_mpp_conf(mpp_list, mv78xx0_variant(), |
| 36 | MPP_MAX, DEV_BUS_VIRT_BASE); |
Sebastien Requiem | ee40cea | 2010-02-23 14:38:14 +0100 | [diff] [blame] | 37 | } |