diff for duplicates of <20140213172620.76e760ba@skate> diff --git a/a/1.txt b/N1/1.txt index 71bee9a..c22be1b 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -74,45 +74,3 @@ Thomas Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com --------------- next part -------------- -A non-text attachment was scrubbed... -Name: 0001-pinctrl-mvebu-armada-375-provide-generic-mpp-callbac.patch -Type: text/x-patch -Size: 1659 bytes -Desc: not available -URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140213/9f210261/attachment.bin> --------------- next part -------------- -A non-text attachment was scrubbed... -Name: 0002-pinctrl-mvebu-armada-38x-provide-generic-mpp-callbac.patch -Type: text/x-patch -Size: 1604 bytes -Desc: not available -URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140213/9f210261/attachment-0001.bin> --------------- next part -------------- -A non-text attachment was scrubbed... -Name: 0003-fixup-pinctrl-mvebu-move-resource-allocation-to-SoC-.patch -Type: text/x-patch -Size: 2639 bytes -Desc: not available -URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140213/9f210261/attachment-0002.bin> --------------- next part -------------- -A non-text attachment was scrubbed... -Name: 0004-fixup-pinctrl-mvebu-move-resource-allocation-to-SoC-.patch -Type: text/x-patch -Size: 1255 bytes -Desc: not available -URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140213/9f210261/attachment-0003.bin> --------------- next part -------------- -A non-text attachment was scrubbed... -Name: 0005-pinctrl-mvebu-remove-MPP_REG_CTRL-macro.patch -Type: text/x-patch -Size: 1299 bytes -Desc: not available -URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140213/9f210261/attachment-0004.bin> --------------- next part -------------- -A non-text attachment was scrubbed... -Name: 0006-pinctrl-mvebu-update-comment-about-mvebu_mpp_ctrl.patch -Type: text/x-patch -Size: 1293 bytes -Desc: not available -URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140213/9f210261/attachment-0005.bin> diff --git a/N1/2.hdr b/N1/2.hdr new file mode 100644 index 0000000..024bb33 --- /dev/null +++ b/N1/2.hdr @@ -0,0 +1,4 @@ +Content-Type: text/x-patch +Content-Transfer-Encoding: 7bit +Content-Disposition: attachment; + filename=0001-pinctrl-mvebu-armada-375-provide-generic-mpp-callbac.patch diff --git a/N1/2.txt b/N1/2.txt new file mode 100644 index 0000000..c11aedb --- /dev/null +++ b/N1/2.txt @@ -0,0 +1,51 @@ +>From 681072596a94a293bbd7683f38fb2ef125003fcc Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> +Date: Thu, 13 Feb 2014 17:08:35 +0100 +Subject: [PATCH 1/6] pinctrl: mvebu: armada-375: provide generic mpp callbacks + +We want to get rid of passing register addresses to common pinctrl +driver, so provide set/get callbacks for generic mpp pins that will +be used later. + +Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> +--- + drivers/pinctrl/mvebu/pinctrl-armada-375.c | 24 ++++++++++++++++++++++++ + 1 file changed, 24 insertions(+) + +diff --git a/drivers/pinctrl/mvebu/pinctrl-armada-375.c b/drivers/pinctrl/mvebu/pinctrl-armada-375.c +index c741a34..459ca5d 100644 +--- a/drivers/pinctrl/mvebu/pinctrl-armada-375.c ++++ b/drivers/pinctrl/mvebu/pinctrl-armada-375.c +@@ -23,6 +23,30 @@ + + #include "pinctrl-mvebu.h" + ++static void __iomem *mpp_base; ++ ++static int armada_375_mpp_ctrl_get(unsigned pid, unsigned long *config) ++{ ++ unsigned off = (pid / MVEBU_MPPS_PER_REG) * MVEBU_MPP_BITS; ++ unsigned shift = (pid % MVEBU_MPPS_PER_REG) * MVEBU_MPP_BITS; ++ ++ *config = (readl(mpp_base + off) >> shift) & MVEBU_MPP_MASK; ++ ++ return 0; ++} ++ ++static int armada_375_mpp_ctrl_set(unsigned pid, unsigned long config) ++{ ++ unsigned off = (pid / MVEBU_MPPS_PER_REG) * MVEBU_MPP_BITS; ++ unsigned shift = (pid % MVEBU_MPPS_PER_REG) * MVEBU_MPP_BITS; ++ unsigned long reg; ++ ++ reg = readl(mpp_base + off) & ~(MVEBU_MPP_MASK << shift); ++ writel(reg | (config << shift), mpp_base + off); ++ ++ return 0; ++} ++ + static struct mvebu_mpp_mode mv88f6720_mpp_modes[] = { + MPP_MODE(0, + MPP_FUNCTION(0x0, "gpio", NULL), +-- +1.8.3.2 diff --git a/N1/3.hdr b/N1/3.hdr new file mode 100644 index 0000000..8716269 --- /dev/null +++ b/N1/3.hdr @@ -0,0 +1,4 @@ +Content-Type: text/x-patch +Content-Transfer-Encoding: 7bit +Content-Disposition: attachment; + filename=0002-pinctrl-mvebu-armada-38x-provide-generic-mpp-callbac.patch diff --git a/N1/3.txt b/N1/3.txt new file mode 100644 index 0000000..e2dc0d8 --- /dev/null +++ b/N1/3.txt @@ -0,0 +1,51 @@ +>From 869c02cb4040424b3817fcb0ef22780bdb8c8671 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> +Date: Thu, 13 Feb 2014 17:09:12 +0100 +Subject: [PATCH 2/6] pinctrl: mvebu: armada-38x: provide generic mpp callbacks + +We want to get rid of passing register addresses to common pinctrl +driver, so provide set/get callbacks for generic mpp pins that will +be used later. + +Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> +--- + drivers/pinctrl/mvebu/pinctrl-armada-38x.c | 24 ++++++++++++++++++++++++ + 1 file changed, 24 insertions(+) + +diff --git a/drivers/pinctrl/mvebu/pinctrl-armada-38x.c b/drivers/pinctrl/mvebu/pinctrl-armada-38x.c +index b3aa85e..9265f17 100644 +--- a/drivers/pinctrl/mvebu/pinctrl-armada-38x.c ++++ b/drivers/pinctrl/mvebu/pinctrl-armada-38x.c +@@ -22,6 +22,30 @@ + + #include "pinctrl-mvebu.h" + ++static void __iomem *mpp_base; ++ ++static int armada_38x_mpp_ctrl_get(unsigned pid, unsigned long *config) ++{ ++ unsigned off = (pid / MVEBU_MPPS_PER_REG) * MVEBU_MPP_BITS; ++ unsigned shift = (pid % MVEBU_MPPS_PER_REG) * MVEBU_MPP_BITS; ++ ++ *config = (readl(mpp_base + off) >> shift) & MVEBU_MPP_MASK; ++ ++ return 0; ++} ++ ++static int armada_38x_mpp_ctrl_set(unsigned pid, unsigned long config) ++{ ++ unsigned off = (pid / MVEBU_MPPS_PER_REG) * MVEBU_MPP_BITS; ++ unsigned shift = (pid % MVEBU_MPPS_PER_REG) * MVEBU_MPP_BITS; ++ unsigned long reg; ++ ++ reg = readl(mpp_base + off) & ~(MVEBU_MPP_MASK << shift); ++ writel(reg | (config << shift), mpp_base + off); ++ ++ return 0; ++} ++ + enum { + V_88F6810 = BIT(0), + V_88F6820 = BIT(1), +-- +1.8.3.2 diff --git a/N1/4.hdr b/N1/4.hdr new file mode 100644 index 0000000..a3f9b33 --- /dev/null +++ b/N1/4.hdr @@ -0,0 +1,4 @@ +Content-Type: text/x-patch +Content-Transfer-Encoding: 7bit +Content-Disposition: attachment; + filename=0003-fixup-pinctrl-mvebu-move-resource-allocation-to-SoC-.patch diff --git a/N1/4.txt b/N1/4.txt new file mode 100644 index 0000000..72d1117 --- /dev/null +++ b/N1/4.txt @@ -0,0 +1,70 @@ +>From 9357d576557727ff9f2d6c214690f61dc1e578b5 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> +Date: Thu, 13 Feb 2014 17:09:49 +0100 +Subject: [PATCH 3/6] fixup! pinctrl: mvebu: move resource allocation to SoC + specific drivers + +Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> +--- + drivers/pinctrl/mvebu/pinctrl-armada-375.c | 8 +++++++- + drivers/pinctrl/mvebu/pinctrl-armada-38x.c | 8 +++++++- + 2 files changed, 14 insertions(+), 2 deletions(-) + +diff --git a/drivers/pinctrl/mvebu/pinctrl-armada-375.c b/drivers/pinctrl/mvebu/pinctrl-armada-375.c +index 459ca5d..50d0df05 100644 +--- a/drivers/pinctrl/mvebu/pinctrl-armada-375.c ++++ b/drivers/pinctrl/mvebu/pinctrl-armada-375.c +@@ -417,7 +417,7 @@ static struct of_device_id armada_375_pinctrl_of_match[] = { + }; + + static struct mvebu_mpp_ctrl mv88f6720_mpp_controls[] = { +- MPP_REG_CTRL(0, 69), ++ MPP_FUNC_CTRL(0, 69, NULL, armada_375_mpp_ctrl), + }; + + static struct pinctrl_gpio_range mv88f6720_mpp_gpio_ranges[] = { +@@ -429,6 +429,12 @@ static struct pinctrl_gpio_range mv88f6720_mpp_gpio_ranges[] = { + static int armada_375_pinctrl_probe(struct platform_device *pdev) + { + struct mvebu_pinctrl_soc_info *soc = &armada_375_pinctrl_info; ++ struct resource *res; ++ ++ res = platform_get_resource(pdev, IORESOURCE_MEM, 0); ++ mpp_base = devm_ioremap_resource(&pdev->dev, res); ++ if (IS_ERR(mpp_base)) ++ return PTR_ERR(mpp_base); + + soc->variant = 0; /* no variants for Armada 375 */ + soc->controls = mv88f6720_mpp_controls; +diff --git a/drivers/pinctrl/mvebu/pinctrl-armada-38x.c b/drivers/pinctrl/mvebu/pinctrl-armada-38x.c +index 9265f17..b9e2b11 100644 +--- a/drivers/pinctrl/mvebu/pinctrl-armada-38x.c ++++ b/drivers/pinctrl/mvebu/pinctrl-armada-38x.c +@@ -416,7 +416,7 @@ static struct of_device_id armada_38x_pinctrl_of_match[] = { + }; + + static struct mvebu_mpp_ctrl armada_38x_mpp_controls[] = { +- MPP_REG_CTRL(0, 59), ++ MPP_FUNC_CTRL(0, 59, NULL, armada_38x_mpp_ctrl), + }; + + static struct pinctrl_gpio_range armada_38x_mpp_gpio_ranges[] = { +@@ -429,10 +429,16 @@ static int armada_38x_pinctrl_probe(struct platform_device *pdev) + struct mvebu_pinctrl_soc_info *soc = &armada_38x_pinctrl_info; + const struct of_device_id *match = + of_match_device(armada_38x_pinctrl_of_match, &pdev->dev); ++ struct resource *res; + + if (!match) + return -ENODEV; + ++ res = platform_get_resource(pdev, IORESOURCE_MEM, 0); ++ mpp_base = devm_ioremap_resource(&pdev->dev, res); ++ if (IS_ERR(mpp_base)) ++ return PTR_ERR(mpp_base); ++ + soc->variant = (unsigned) match->data & 0xff; + + soc->controls = armada_38x_mpp_controls; +-- +1.8.3.2 diff --git a/N1/5.hdr b/N1/5.hdr new file mode 100644 index 0000000..06006ef --- /dev/null +++ b/N1/5.hdr @@ -0,0 +1,4 @@ +Content-Type: text/x-patch +Content-Transfer-Encoding: 7bit +Content-Disposition: attachment; + filename=0004-fixup-pinctrl-mvebu-move-resource-allocation-to-SoC-.patch diff --git a/N1/5.txt b/N1/5.txt new file mode 100644 index 0000000..ab7e67e --- /dev/null +++ b/N1/5.txt @@ -0,0 +1,35 @@ +>From 25052721133e44582462618015ea4594fdb90858 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> +Date: Thu, 13 Feb 2014 17:11:07 +0100 +Subject: [PATCH 4/6] fixup! pinctrl: mvebu: move resource allocation to SoC + specific drivers + +Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> +--- + drivers/pinctrl/mvebu/pinctrl-armada-xp.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/drivers/pinctrl/mvebu/pinctrl-armada-xp.c b/drivers/pinctrl/mvebu/pinctrl-armada-xp.c +index 6acea00..be3b913 100644 +--- a/drivers/pinctrl/mvebu/pinctrl-armada-xp.c ++++ b/drivers/pinctrl/mvebu/pinctrl-armada-xp.c +@@ -390,7 +390,7 @@ static struct of_device_id armada_xp_pinctrl_of_match[] = { + }; + + static struct mvebu_mpp_ctrl mv78230_mpp_controls[] = { +- MPP_REG_CTRL(0, 48), ++ MPP_FUNC_CTRL(0, 48, NULL, armada_xp_mpp_ctrl), + }; + + static struct pinctrl_gpio_range mv78230_mpp_gpio_ranges[] = { +@@ -399,7 +399,7 @@ static struct pinctrl_gpio_range mv78230_mpp_gpio_ranges[] = { + }; + + static struct mvebu_mpp_ctrl mv78260_mpp_controls[] = { +- MPP_REG_CTRL(0, 66), ++ MPP_FUNC_CTRL(0, 66, NULL, armada_xp_mpp_ctrl), + }; + + static struct pinctrl_gpio_range mv78260_mpp_gpio_ranges[] = { +-- +1.8.3.2 diff --git a/N1/6.hdr b/N1/6.hdr new file mode 100644 index 0000000..d71584f --- /dev/null +++ b/N1/6.hdr @@ -0,0 +1,4 @@ +Content-Type: text/x-patch +Content-Transfer-Encoding: 7bit +Content-Disposition: attachment; + filename=0005-pinctrl-mvebu-remove-MPP_REG_CTRL-macro.patch diff --git a/N1/6.txt b/N1/6.txt new file mode 100644 index 0000000..462a30c --- /dev/null +++ b/N1/6.txt @@ -0,0 +1,40 @@ +>From 9b3c22a3de0fb8a61ec48a7d762ba2492233d5f5 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> +Date: Thu, 13 Feb 2014 17:11:27 +0100 +Subject: [PATCH 5/6] pinctrl: mvebu: remove MPP_REG_CTRL macro + +Now that each per-SoC pinctrl driver must implement its own get/set +functions, there is no point in keeping the MPP_REG_CTRL macro, whose +purpose was to let the core pinctrl mvebu driver use default get/set +functions. + +Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> +--- + drivers/pinctrl/mvebu/pinctrl-mvebu.h | 12 ------------ + 1 file changed, 12 deletions(-) + +diff --git a/drivers/pinctrl/mvebu/pinctrl-mvebu.h b/drivers/pinctrl/mvebu/pinctrl-mvebu.h +index 41feceb..f8dc035 100644 +--- a/drivers/pinctrl/mvebu/pinctrl-mvebu.h ++++ b/drivers/pinctrl/mvebu/pinctrl-mvebu.h +@@ -114,18 +114,6 @@ struct mvebu_pinctrl_soc_info { + int ngpioranges; + }; + +-#define MPP_REG_CTRL(_idl, _idh) \ +- { \ +- .name = NULL, \ +- .pid = _idl, \ +- .npins = _idh - _idl + 1, \ +- .pins = (unsigned[_idh - _idl + 1]) { }, \ +- .mpp_get = NULL, \ +- .mpp_set = NULL, \ +- .mpp_gpio_req = NULL, \ +- .mpp_gpio_dir = NULL, \ +- } +- + #define MPP_FUNC_CTRL(_idl, _idh, _name, _func) \ + { \ + .name = _name, \ +-- +1.8.3.2 diff --git a/N1/7.hdr b/N1/7.hdr new file mode 100644 index 0000000..2e1dbdb --- /dev/null +++ b/N1/7.hdr @@ -0,0 +1,4 @@ +Content-Type: text/x-patch +Content-Transfer-Encoding: 7bit +Content-Disposition: attachment; + filename=0006-pinctrl-mvebu-update-comment-about-mvebu_mpp_ctrl.patch diff --git a/N1/7.txt b/N1/7.txt new file mode 100644 index 0000000..dbb05a4 --- /dev/null +++ b/N1/7.txt @@ -0,0 +1,30 @@ +>From cb3c50109c1553070843029a256052667c32136f Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> +Date: Thu, 13 Feb 2014 17:23:49 +0100 +Subject: [PATCH 6/6] pinctrl: mvebu: update comment about mvebu_mpp_ctrl + +Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> +--- + drivers/pinctrl/mvebu/pinctrl-mvebu.h | 7 +++---- + 1 file changed, 3 insertions(+), 4 deletions(-) + +diff --git a/drivers/pinctrl/mvebu/pinctrl-mvebu.h b/drivers/pinctrl/mvebu/pinctrl-mvebu.h +index f8dc035..58e973e 100644 +--- a/drivers/pinctrl/mvebu/pinctrl-mvebu.h ++++ b/drivers/pinctrl/mvebu/pinctrl-mvebu.h +@@ -28,10 +28,9 @@ + * between two or more different settings, e.g. assign mpp pin 13 to + * uart1 or sata. + * +- * If optional mpp_get/_set functions are set these are used to get/set +- * a specific mode. Otherwise it is assumed that the mpp control is based +- * on 4-bit groups in subsequent registers. The optional mpp_gpio_req/_dir +- * functions can be used to allow pin settings with varying gpio pins. ++ * The mpp_get/_set functions are mandatory and are used to get/set a ++ * specific mode. The optional mpp_gpio_req/_dir functions can be used ++ * to allow pin settings with varying gpio pins. + */ + struct mvebu_mpp_ctrl { + const char *name; +-- +1.8.3.2 diff --git a/a/content_digest b/N1/content_digest index 3a712fe..1e2e316 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -1,10 +1,17 @@ "ref\01390869573-27624-1-git-send-email-sebastian.hesselbarth@gmail.com\0" "ref\01392220776-30851-1-git-send-email-sebastian.hesselbarth@gmail.com\0" - "From\0thomas.petazzoni@free-electrons.com (Thomas Petazzoni)\0" - "Subject\0[PATCH v3 00/13] pinctrl: mvebu: restructure resource allocation\0" + "From\0Thomas Petazzoni <thomas.petazzoni@free-electrons.com>\0" + "Subject\0Re: [PATCH v3 00/13] pinctrl: mvebu: restructure resource allocation\0" "Date\0Thu, 13 Feb 2014 17:26:20 +0100\0" - "To\0linux-arm-kernel@lists.infradead.org\0" - "\00:1\0" + "To\0Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>\0" + "Cc\0Linus Walleij <linus.walleij@linaro.org>" + Jason Cooper <jason@lakedaemon.net> + Andrew Lunn <andrew@lunn.ch> + Gregory Clement <gregory.clement@free-electrons.com> + Ezequiel Garcia <ezequiel.garcia@free-electrons.com> + linux-arm-kernel@lists.infradead.org + " linux-kernel@vger.kernel.org\0" + "\01:1\0" "b\0" "Dear Sebastian Hesselbarth,\n" "\n" @@ -81,48 +88,301 @@ "-- \n" "Thomas Petazzoni, CTO, Free Electrons\n" "Embedded Linux, Kernel and Android engineering\n" - "http://free-electrons.com\n" - "-------------- next part --------------\n" - "A non-text attachment was scrubbed...\n" - "Name: 0001-pinctrl-mvebu-armada-375-provide-generic-mpp-callbac.patch\n" - "Type: text/x-patch\n" - "Size: 1659 bytes\n" - "Desc: not available\n" - "URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140213/9f210261/attachment.bin>\n" - "-------------- next part --------------\n" - "A non-text attachment was scrubbed...\n" - "Name: 0002-pinctrl-mvebu-armada-38x-provide-generic-mpp-callbac.patch\n" - "Type: text/x-patch\n" - "Size: 1604 bytes\n" - "Desc: not available\n" - "URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140213/9f210261/attachment-0001.bin>\n" - "-------------- next part --------------\n" - "A non-text attachment was scrubbed...\n" - "Name: 0003-fixup-pinctrl-mvebu-move-resource-allocation-to-SoC-.patch\n" - "Type: text/x-patch\n" - "Size: 2639 bytes\n" - "Desc: not available\n" - "URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140213/9f210261/attachment-0002.bin>\n" - "-------------- next part --------------\n" - "A non-text attachment was scrubbed...\n" - "Name: 0004-fixup-pinctrl-mvebu-move-resource-allocation-to-SoC-.patch\n" - "Type: text/x-patch\n" - "Size: 1255 bytes\n" - "Desc: not available\n" - "URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140213/9f210261/attachment-0003.bin>\n" - "-------------- next part --------------\n" - "A non-text attachment was scrubbed...\n" - "Name: 0005-pinctrl-mvebu-remove-MPP_REG_CTRL-macro.patch\n" - "Type: text/x-patch\n" - "Size: 1299 bytes\n" - "Desc: not available\n" - "URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140213/9f210261/attachment-0004.bin>\n" - "-------------- next part --------------\n" - "A non-text attachment was scrubbed...\n" - "Name: 0006-pinctrl-mvebu-update-comment-about-mvebu_mpp_ctrl.patch\n" - "Type: text/x-patch\n" - "Size: 1293 bytes\n" - "Desc: not available\n" - URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140213/9f210261/attachment-0005.bin> + http://free-electrons.com + "\01:2\0" + "fn\00001-pinctrl-mvebu-armada-375-provide-generic-mpp-callbac.patch\0" + "b\0" + ">From 681072596a94a293bbd7683f38fb2ef125003fcc Mon Sep 17 00:00:00 2001\n" + "From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>\n" + "Date: Thu, 13 Feb 2014 17:08:35 +0100\n" + "Subject: [PATCH 1/6] pinctrl: mvebu: armada-375: provide generic mpp callbacks\n" + "\n" + "We want to get rid of passing register addresses to common pinctrl\n" + "driver, so provide set/get callbacks for generic mpp pins that will\n" + "be used later.\n" + "\n" + "Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>\n" + "---\n" + " drivers/pinctrl/mvebu/pinctrl-armada-375.c | 24 ++++++++++++++++++++++++\n" + " 1 file changed, 24 insertions(+)\n" + "\n" + "diff --git a/drivers/pinctrl/mvebu/pinctrl-armada-375.c b/drivers/pinctrl/mvebu/pinctrl-armada-375.c\n" + "index c741a34..459ca5d 100644\n" + "--- a/drivers/pinctrl/mvebu/pinctrl-armada-375.c\n" + "+++ b/drivers/pinctrl/mvebu/pinctrl-armada-375.c\n" + "@@ -23,6 +23,30 @@\n" + " \n" + " #include \"pinctrl-mvebu.h\"\n" + " \n" + "+static void __iomem *mpp_base;\n" + "+\n" + "+static int armada_375_mpp_ctrl_get(unsigned pid, unsigned long *config)\n" + "+{\n" + "+\tunsigned off = (pid / MVEBU_MPPS_PER_REG) * MVEBU_MPP_BITS;\n" + "+\tunsigned shift = (pid % MVEBU_MPPS_PER_REG) * MVEBU_MPP_BITS;\n" + "+\n" + "+\t*config = (readl(mpp_base + off) >> shift) & MVEBU_MPP_MASK;\n" + "+\n" + "+\treturn 0;\n" + "+}\n" + "+\n" + "+static int armada_375_mpp_ctrl_set(unsigned pid, unsigned long config)\n" + "+{\n" + "+\tunsigned off = (pid / MVEBU_MPPS_PER_REG) * MVEBU_MPP_BITS;\n" + "+\tunsigned shift = (pid % MVEBU_MPPS_PER_REG) * MVEBU_MPP_BITS;\n" + "+\tunsigned long reg;\n" + "+\n" + "+\treg = readl(mpp_base + off) & ~(MVEBU_MPP_MASK << shift);\n" + "+\twritel(reg | (config << shift), mpp_base + off);\n" + "+\n" + "+\treturn 0;\n" + "+}\n" + "+\n" + " static struct mvebu_mpp_mode mv88f6720_mpp_modes[] = {\n" + " \tMPP_MODE(0,\n" + " \t\t MPP_FUNCTION(0x0, \"gpio\", NULL),\n" + "-- \n" + 1.8.3.2 + "\01:3\0" + "fn\00002-pinctrl-mvebu-armada-38x-provide-generic-mpp-callbac.patch\0" + "b\0" + ">From 869c02cb4040424b3817fcb0ef22780bdb8c8671 Mon Sep 17 00:00:00 2001\n" + "From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>\n" + "Date: Thu, 13 Feb 2014 17:09:12 +0100\n" + "Subject: [PATCH 2/6] pinctrl: mvebu: armada-38x: provide generic mpp callbacks\n" + "\n" + "We want to get rid of passing register addresses to common pinctrl\n" + "driver, so provide set/get callbacks for generic mpp pins that will\n" + "be used later.\n" + "\n" + "Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>\n" + "---\n" + " drivers/pinctrl/mvebu/pinctrl-armada-38x.c | 24 ++++++++++++++++++++++++\n" + " 1 file changed, 24 insertions(+)\n" + "\n" + "diff --git a/drivers/pinctrl/mvebu/pinctrl-armada-38x.c b/drivers/pinctrl/mvebu/pinctrl-armada-38x.c\n" + "index b3aa85e..9265f17 100644\n" + "--- a/drivers/pinctrl/mvebu/pinctrl-armada-38x.c\n" + "+++ b/drivers/pinctrl/mvebu/pinctrl-armada-38x.c\n" + "@@ -22,6 +22,30 @@\n" + " \n" + " #include \"pinctrl-mvebu.h\"\n" + " \n" + "+static void __iomem *mpp_base;\n" + "+\n" + "+static int armada_38x_mpp_ctrl_get(unsigned pid, unsigned long *config)\n" + "+{\n" + "+\tunsigned off = (pid / MVEBU_MPPS_PER_REG) * MVEBU_MPP_BITS;\n" + "+\tunsigned shift = (pid % MVEBU_MPPS_PER_REG) * MVEBU_MPP_BITS;\n" + "+\n" + "+\t*config = (readl(mpp_base + off) >> shift) & MVEBU_MPP_MASK;\n" + "+\n" + "+\treturn 0;\n" + "+}\n" + "+\n" + "+static int armada_38x_mpp_ctrl_set(unsigned pid, unsigned long config)\n" + "+{\n" + "+\tunsigned off = (pid / MVEBU_MPPS_PER_REG) * MVEBU_MPP_BITS;\n" + "+\tunsigned shift = (pid % MVEBU_MPPS_PER_REG) * MVEBU_MPP_BITS;\n" + "+\tunsigned long reg;\n" + "+\n" + "+\treg = readl(mpp_base + off) & ~(MVEBU_MPP_MASK << shift);\n" + "+\twritel(reg | (config << shift), mpp_base + off);\n" + "+\n" + "+\treturn 0;\n" + "+}\n" + "+\n" + " enum {\n" + " \tV_88F6810 = BIT(0),\n" + " \tV_88F6820 = BIT(1),\n" + "-- \n" + 1.8.3.2 + "\01:4\0" + "fn\00003-fixup-pinctrl-mvebu-move-resource-allocation-to-SoC-.patch\0" + "b\0" + ">From 9357d576557727ff9f2d6c214690f61dc1e578b5 Mon Sep 17 00:00:00 2001\n" + "From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>\n" + "Date: Thu, 13 Feb 2014 17:09:49 +0100\n" + "Subject: [PATCH 3/6] fixup! pinctrl: mvebu: move resource allocation to SoC\n" + " specific drivers\n" + "\n" + "Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>\n" + "---\n" + " drivers/pinctrl/mvebu/pinctrl-armada-375.c | 8 +++++++-\n" + " drivers/pinctrl/mvebu/pinctrl-armada-38x.c | 8 +++++++-\n" + " 2 files changed, 14 insertions(+), 2 deletions(-)\n" + "\n" + "diff --git a/drivers/pinctrl/mvebu/pinctrl-armada-375.c b/drivers/pinctrl/mvebu/pinctrl-armada-375.c\n" + "index 459ca5d..50d0df05 100644\n" + "--- a/drivers/pinctrl/mvebu/pinctrl-armada-375.c\n" + "+++ b/drivers/pinctrl/mvebu/pinctrl-armada-375.c\n" + "@@ -417,7 +417,7 @@ static struct of_device_id armada_375_pinctrl_of_match[] = {\n" + " };\n" + " \n" + " static struct mvebu_mpp_ctrl mv88f6720_mpp_controls[] = {\n" + "-\tMPP_REG_CTRL(0, 69),\n" + "+\tMPP_FUNC_CTRL(0, 69, NULL, armada_375_mpp_ctrl),\n" + " };\n" + " \n" + " static struct pinctrl_gpio_range mv88f6720_mpp_gpio_ranges[] = {\n" + "@@ -429,6 +429,12 @@ static struct pinctrl_gpio_range mv88f6720_mpp_gpio_ranges[] = {\n" + " static int armada_375_pinctrl_probe(struct platform_device *pdev)\n" + " {\n" + " \tstruct mvebu_pinctrl_soc_info *soc = &armada_375_pinctrl_info;\n" + "+\tstruct resource *res;\n" + "+\n" + "+\tres = platform_get_resource(pdev, IORESOURCE_MEM, 0);\n" + "+\tmpp_base = devm_ioremap_resource(&pdev->dev, res);\n" + "+\tif (IS_ERR(mpp_base))\n" + "+\t\treturn PTR_ERR(mpp_base);\n" + " \n" + " \tsoc->variant = 0; /* no variants for Armada 375 */\n" + " \tsoc->controls = mv88f6720_mpp_controls;\n" + "diff --git a/drivers/pinctrl/mvebu/pinctrl-armada-38x.c b/drivers/pinctrl/mvebu/pinctrl-armada-38x.c\n" + "index 9265f17..b9e2b11 100644\n" + "--- a/drivers/pinctrl/mvebu/pinctrl-armada-38x.c\n" + "+++ b/drivers/pinctrl/mvebu/pinctrl-armada-38x.c\n" + "@@ -416,7 +416,7 @@ static struct of_device_id armada_38x_pinctrl_of_match[] = {\n" + " };\n" + " \n" + " static struct mvebu_mpp_ctrl armada_38x_mpp_controls[] = {\n" + "-\tMPP_REG_CTRL(0, 59),\n" + "+\tMPP_FUNC_CTRL(0, 59, NULL, armada_38x_mpp_ctrl),\n" + " };\n" + " \n" + " static struct pinctrl_gpio_range armada_38x_mpp_gpio_ranges[] = {\n" + "@@ -429,10 +429,16 @@ static int armada_38x_pinctrl_probe(struct platform_device *pdev)\n" + " \tstruct mvebu_pinctrl_soc_info *soc = &armada_38x_pinctrl_info;\n" + " \tconst struct of_device_id *match =\n" + " \t\tof_match_device(armada_38x_pinctrl_of_match, &pdev->dev);\n" + "+\tstruct resource *res;\n" + " \n" + " \tif (!match)\n" + " \t\treturn -ENODEV;\n" + " \n" + "+\tres = platform_get_resource(pdev, IORESOURCE_MEM, 0);\n" + "+\tmpp_base = devm_ioremap_resource(&pdev->dev, res);\n" + "+\tif (IS_ERR(mpp_base))\n" + "+\t\treturn PTR_ERR(mpp_base);\n" + "+\n" + " \tsoc->variant = (unsigned) match->data & 0xff;\n" + " \n" + " \tsoc->controls = armada_38x_mpp_controls;\n" + "-- \n" + 1.8.3.2 + "\01:5\0" + "fn\00004-fixup-pinctrl-mvebu-move-resource-allocation-to-SoC-.patch\0" + "b\0" + ">From 25052721133e44582462618015ea4594fdb90858 Mon Sep 17 00:00:00 2001\n" + "From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>\n" + "Date: Thu, 13 Feb 2014 17:11:07 +0100\n" + "Subject: [PATCH 4/6] fixup! pinctrl: mvebu: move resource allocation to SoC\n" + " specific drivers\n" + "\n" + "Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>\n" + "---\n" + " drivers/pinctrl/mvebu/pinctrl-armada-xp.c | 4 ++--\n" + " 1 file changed, 2 insertions(+), 2 deletions(-)\n" + "\n" + "diff --git a/drivers/pinctrl/mvebu/pinctrl-armada-xp.c b/drivers/pinctrl/mvebu/pinctrl-armada-xp.c\n" + "index 6acea00..be3b913 100644\n" + "--- a/drivers/pinctrl/mvebu/pinctrl-armada-xp.c\n" + "+++ b/drivers/pinctrl/mvebu/pinctrl-armada-xp.c\n" + "@@ -390,7 +390,7 @@ static struct of_device_id armada_xp_pinctrl_of_match[] = {\n" + " };\n" + " \n" + " static struct mvebu_mpp_ctrl mv78230_mpp_controls[] = {\n" + "-\tMPP_REG_CTRL(0, 48),\n" + "+\tMPP_FUNC_CTRL(0, 48, NULL, armada_xp_mpp_ctrl),\n" + " };\n" + " \n" + " static struct pinctrl_gpio_range mv78230_mpp_gpio_ranges[] = {\n" + "@@ -399,7 +399,7 @@ static struct pinctrl_gpio_range mv78230_mpp_gpio_ranges[] = {\n" + " };\n" + " \n" + " static struct mvebu_mpp_ctrl mv78260_mpp_controls[] = {\n" + "-\tMPP_REG_CTRL(0, 66),\n" + "+\tMPP_FUNC_CTRL(0, 66, NULL, armada_xp_mpp_ctrl),\n" + " };\n" + " \n" + " static struct pinctrl_gpio_range mv78260_mpp_gpio_ranges[] = {\n" + "-- \n" + 1.8.3.2 + "\01:6\0" + "fn\00005-pinctrl-mvebu-remove-MPP_REG_CTRL-macro.patch\0" + "b\0" + ">From 9b3c22a3de0fb8a61ec48a7d762ba2492233d5f5 Mon Sep 17 00:00:00 2001\n" + "From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>\n" + "Date: Thu, 13 Feb 2014 17:11:27 +0100\n" + "Subject: [PATCH 5/6] pinctrl: mvebu: remove MPP_REG_CTRL macro\n" + "\n" + "Now that each per-SoC pinctrl driver must implement its own get/set\n" + "functions, there is no point in keeping the MPP_REG_CTRL macro, whose\n" + "purpose was to let the core pinctrl mvebu driver use default get/set\n" + "functions.\n" + "\n" + "Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>\n" + "---\n" + " drivers/pinctrl/mvebu/pinctrl-mvebu.h | 12 ------------\n" + " 1 file changed, 12 deletions(-)\n" + "\n" + "diff --git a/drivers/pinctrl/mvebu/pinctrl-mvebu.h b/drivers/pinctrl/mvebu/pinctrl-mvebu.h\n" + "index 41feceb..f8dc035 100644\n" + "--- a/drivers/pinctrl/mvebu/pinctrl-mvebu.h\n" + "+++ b/drivers/pinctrl/mvebu/pinctrl-mvebu.h\n" + "@@ -114,18 +114,6 @@ struct mvebu_pinctrl_soc_info {\n" + " \tint ngpioranges;\n" + " };\n" + " \n" + "-#define MPP_REG_CTRL(_idl, _idh)\t\t\t\t\\\n" + "-\t{\t\t\t\t\t\t\t\\\n" + "-\t\t.name = NULL,\t\t\t\t\t\\\n" + "-\t\t.pid = _idl,\t\t\t\t\t\\\n" + "-\t\t.npins = _idh - _idl + 1,\t\t\t\\\n" + "-\t\t.pins = (unsigned[_idh - _idl + 1]) { },\t\\\n" + "-\t\t.mpp_get = NULL,\t\t\t\t\\\n" + "-\t\t.mpp_set = NULL,\t\t\t\t\\\n" + "-\t\t.mpp_gpio_req = NULL,\t\t\t\t\\\n" + "-\t\t.mpp_gpio_dir = NULL,\t\t\t\t\\\n" + "-\t}\n" + "-\n" + " #define MPP_FUNC_CTRL(_idl, _idh, _name, _func)\t\t\t\\\n" + " \t{\t\t\t\t\t\t\t\\\n" + " \t\t.name = _name,\t\t\t\t\t\\\n" + "-- \n" + 1.8.3.2 + "\01:7\0" + "fn\00006-pinctrl-mvebu-update-comment-about-mvebu_mpp_ctrl.patch\0" + "b\0" + ">From cb3c50109c1553070843029a256052667c32136f Mon Sep 17 00:00:00 2001\n" + "From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>\n" + "Date: Thu, 13 Feb 2014 17:23:49 +0100\n" + "Subject: [PATCH 6/6] pinctrl: mvebu: update comment about mvebu_mpp_ctrl\n" + "\n" + "Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>\n" + "---\n" + " drivers/pinctrl/mvebu/pinctrl-mvebu.h | 7 +++----\n" + " 1 file changed, 3 insertions(+), 4 deletions(-)\n" + "\n" + "diff --git a/drivers/pinctrl/mvebu/pinctrl-mvebu.h b/drivers/pinctrl/mvebu/pinctrl-mvebu.h\n" + "index f8dc035..58e973e 100644\n" + "--- a/drivers/pinctrl/mvebu/pinctrl-mvebu.h\n" + "+++ b/drivers/pinctrl/mvebu/pinctrl-mvebu.h\n" + "@@ -28,10 +28,9 @@\n" + " * between two or more different settings, e.g. assign mpp pin 13 to\n" + " * uart1 or sata.\n" + " *\n" + "- * If optional mpp_get/_set functions are set these are used to get/set\n" + "- * a specific mode. Otherwise it is assumed that the mpp control is based\n" + "- * on 4-bit groups in subsequent registers. The optional mpp_gpio_req/_dir\n" + "- * functions can be used to allow pin settings with varying gpio pins.\n" + "+ * The mpp_get/_set functions are mandatory and are used to get/set a\n" + "+ * specific mode. The optional mpp_gpio_req/_dir functions can be used\n" + "+ * to allow pin settings with varying gpio pins.\n" + " */\n" + " struct mvebu_mpp_ctrl {\n" + " \tconst char *name;\n" + "-- \n" + 1.8.3.2 -7cfad6e50a1a81ec40dcec6fecca882d195b32dcd09f81f17d79daa2324fcef4 +fbf8f76e91137271e7daf49c2b1f67d48fcc7094c00659eb832f3920d6a2b4a7
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.