11 #include <linux/kernel.h>
16 #include <mach/hardware.h>
24 return dev_bus + (
i) * 4;
29 unsigned int mpp_max,
void __iomem *dev_bus)
31 unsigned int mpp_nr_regs = (1 + mpp_max/8);
32 u32 mpp_ctrl[mpp_nr_regs];
36 for (i = 0; i < mpp_nr_regs; i++) {
37 mpp_ctrl[
i] =
readl(mpp_ctrl_addr(i, dev_bus));
38 printk(
" %08x", mpp_ctrl[i]);
42 for ( ; *mpp_list; mpp_list++) {
49 "number (%u)\n", num);
52 if (variant_mask & !(*mpp_list & variant_mask)) {
54 "orion_mpp_conf: requested MPP%u config "
55 "unavailable on this hardware\n", num);
59 shift = (num & 7) << 2;
60 mpp_ctrl[num / 8] &= ~(0xf << shift);
61 mpp_ctrl[num / 8] |= sel << shift;
73 for (i = 0; i < mpp_nr_regs; i++) {
74 writel(mpp_ctrl[i], mpp_ctrl_addr(i, dev_bus));
75 printk(
" %08x", mpp_ctrl[i]);