These changes are the raw update to linux-4.4.6-rt14. Kernel sources
[kvmfornfv.git] / kernel / drivers / pinctrl / berlin / berlin-bg2.c
index b71a6ff..fabe728 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (C) 2014 Marvell Technology Group Ltd.
  *
- * Antoine TÃ\83©nart <antoine.tenart@free-electrons.com>
+ * Antoine Ténart <antoine.tenart@free-electrons.com>
  *
  * This file is licensed under the terms of the GNU General Public
  * License version 2. This program is licensed "as is" without any
 static const struct berlin_desc_group berlin2_soc_pinctrl_groups[] = {
        /* G */
        BERLIN_PINCTRL_GROUP("G0", 0x00, 0x1, 0x00,
-               BERLIN_PINCTRL_FUNCTION(0x0, "spi1"),
+               BERLIN_PINCTRL_FUNCTION(0x0, "spi1"), /* SS0n */
                BERLIN_PINCTRL_FUNCTION(0x1, "gpio")),
        BERLIN_PINCTRL_GROUP("G1", 0x00, 0x2, 0x01,
-               BERLIN_PINCTRL_FUNCTION(0x0, "spi1"),
+               BERLIN_PINCTRL_FUNCTION(0x0, "spi1"), /* SS1n */
                BERLIN_PINCTRL_FUNCTION(0x1, "gpio"),
                BERLIN_PINCTRL_FUNCTION(0x2, "usb1")),
        BERLIN_PINCTRL_GROUP("G2", 0x00, 0x2, 0x02,
                BERLIN_PINCTRL_FUNCTION(0x0, "gpio"),
-               BERLIN_PINCTRL_FUNCTION(0x1, "spi1"),
+               BERLIN_PINCTRL_FUNCTION(0x1, "spi1"), /* SS2n */
                BERLIN_PINCTRL_FUNCTION(0x2, "pwm"),
                BERLIN_PINCTRL_FUNCTION(0x3, "i2s0")),
        BERLIN_PINCTRL_GROUP("G3", 0x00, 0x2, 0x04,
                BERLIN_PINCTRL_FUNCTION(0x0, "soc"),
-               BERLIN_PINCTRL_FUNCTION(0x1, "spi1"),
+               BERLIN_PINCTRL_FUNCTION(0x1, "spi1"), /* SS3n */
                BERLIN_PINCTRL_FUNCTION(0x2, "gpio"),
                BERLIN_PINCTRL_FUNCTION(0x3, "i2s1")),
        BERLIN_PINCTRL_GROUP("G4", 0x00, 0x2, 0x06,
-               BERLIN_PINCTRL_FUNCTION(0x0, "spi1"),
+               BERLIN_PINCTRL_FUNCTION(0x0, "spi1"), /* CLK/SDI/SDO */
                BERLIN_PINCTRL_FUNCTION(0x1, "gpio"),
                BERLIN_PINCTRL_FUNCTION(0x2, "pwm")),
        BERLIN_PINCTRL_GROUP("G5", 0x00, 0x3, 0x08,
@@ -163,15 +163,15 @@ static const struct berlin_desc_group berlin2_sysmgr_pinctrl_groups[] = {
        /* GSM */
        BERLIN_PINCTRL_GROUP("GSM0", 0x40, 0x2, 0x00,
                BERLIN_PINCTRL_FUNCTION(0x0, "gpio"),
-               BERLIN_PINCTRL_FUNCTION(0x1, "spi2"),
+               BERLIN_PINCTRL_FUNCTION(0x1, "spi2"), /* SS0n */
                BERLIN_PINCTRL_FUNCTION(0x2, "eth1")),
        BERLIN_PINCTRL_GROUP("GSM1", 0x40, 0x2, 0x02,
                BERLIN_PINCTRL_FUNCTION(0x0, "gpio"),
-               BERLIN_PINCTRL_FUNCTION(0x1, "spi2"),
+               BERLIN_PINCTRL_FUNCTION(0x1, "spi2"), /* SS1n */
                BERLIN_PINCTRL_FUNCTION(0x2, "eth1")),
        BERLIN_PINCTRL_GROUP("GSM2", 0x40, 0x2, 0x04,
                BERLIN_PINCTRL_FUNCTION(0x0, "twsi2"),
-               BERLIN_PINCTRL_FUNCTION(0x1, "spi2")),
+               BERLIN_PINCTRL_FUNCTION(0x1, "spi2")), /* SS2n/SS3n */
        BERLIN_PINCTRL_GROUP("GSM3", 0x40, 0x2, 0x06,
                BERLIN_PINCTRL_FUNCTION(0x0, "gpio"),
                BERLIN_PINCTRL_FUNCTION(0x1, "uart0"),  /* CTS/RTS */
@@ -187,7 +187,7 @@ static const struct berlin_desc_group berlin2_sysmgr_pinctrl_groups[] = {
                BERLIN_PINCTRL_FUNCTION(0x3, "twsi3")),
        BERLIN_PINCTRL_GROUP("GSM6", 0x40, 0x2, 0x0c,
                BERLIN_PINCTRL_FUNCTION(0x0, "gpio"),
-               BERLIN_PINCTRL_FUNCTION(0x1, "spi2"),
+               BERLIN_PINCTRL_FUNCTION(0x1, "spi2"), /* CLK/SDO */
                BERLIN_PINCTRL_FUNCTION(0x1, "clki")),
        BERLIN_PINCTRL_GROUP("GSM7", 0x40, 0x1, 0x0e,
                BERLIN_PINCTRL_FUNCTION(0x0, "gpio"),
@@ -218,11 +218,11 @@ static const struct berlin_pinctrl_desc berlin2_sysmgr_pinctrl_data = {
 
 static const struct of_device_id berlin2_pinctrl_match[] = {
        {
-               .compatible = "marvell,berlin2-chip-ctrl",
+               .compatible = "marvell,berlin2-soc-pinctrl",
                .data = &berlin2_soc_pinctrl_data
        },
        {
-               .compatible = "marvell,berlin2-system-ctrl",
+               .compatible = "marvell,berlin2-system-pinctrl",
                .data = &berlin2_sysmgr_pinctrl_data
        },
        {}
@@ -233,28 +233,6 @@ static int berlin2_pinctrl_probe(struct platform_device *pdev)
 {
        const struct of_device_id *match =
                of_match_device(berlin2_pinctrl_match, &pdev->dev);
-       struct regmap_config *rmconfig;
-       struct regmap *regmap;
-       struct resource *res;
-       void __iomem *base;
-
-       rmconfig = devm_kzalloc(&pdev->dev, sizeof(*rmconfig), GFP_KERNEL);
-       if (!rmconfig)
-               return -ENOMEM;
-
-       res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-       base = devm_ioremap_resource(&pdev->dev, res);
-       if (IS_ERR(base))
-               return PTR_ERR(base);
-
-       rmconfig->reg_bits = 32,
-       rmconfig->val_bits = 32,
-       rmconfig->reg_stride = 4,
-       rmconfig->max_register = resource_size(res);
-
-       regmap = devm_regmap_init_mmio(&pdev->dev, base, rmconfig);
-       if (IS_ERR(regmap))
-               return PTR_ERR(regmap);
 
        return berlin_pinctrl_probe(pdev, match->data);
 }
@@ -268,6 +246,6 @@ static struct platform_driver berlin2_pinctrl_driver = {
 };
 module_platform_driver(berlin2_pinctrl_driver);
 
-MODULE_AUTHOR("Antoine TÃ\83©nart <antoine.tenart@free-electrons.com>");
+MODULE_AUTHOR("Antoine Ténart <antoine.tenart@free-electrons.com>");
 MODULE_DESCRIPTION("Marvell Berlin BG2 pinctrl driver");
 MODULE_LICENSE("GPL");