Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0+
0002 #include <linux/device.h>
0003 #include <linux/regmap.h>
0004 #include <linux/mfd/syscon.h>
0005 #include <linux/bitops.h>
0006 #include <linux/module.h>
0007 #include "pl111_nomadik.h"
0008 
0009 #define PMU_CTRL_OFFSET 0x0000
0010 #define PMU_CTRL_LCDNDIF BIT(26)
0011 
0012 void pl111_nomadik_init(struct device *dev)
0013 {
0014     struct regmap *pmu_regmap;
0015 
0016     /*
0017      * Just bail out of this is not found, we could be running
0018      * multiplatform on something else than Nomadik.
0019      */
0020     pmu_regmap =
0021         syscon_regmap_lookup_by_compatible("stericsson,nomadik-pmu");
0022     if (IS_ERR(pmu_regmap))
0023         return;
0024 
0025     /*
0026      * This bit in the PMU controller multiplexes the two graphics
0027      * blocks found in the Nomadik STn8815. The other one is called
0028      * MDIF (Master Display Interface) and gets muxed out here.
0029      */
0030     regmap_update_bits(pmu_regmap,
0031                PMU_CTRL_OFFSET,
0032                PMU_CTRL_LCDNDIF,
0033                0);
0034     dev_info(dev, "set Nomadik PMU mux to CLCD mode\n");
0035 }
0036 EXPORT_SYMBOL_GPL(pl111_nomadik_init);