From: Silvio Fricke <silvio.fricke@gmail.com>
To: barebox@lists.infradead.org, Sascha Hauer <s.hauer@pengutronix.de>
Cc: Silvio Fricke <silvio.fricke@gmail.com>
Subject: [PATCH] ARM: i.MX: edmqmx6: free phy-reset gpio pin
Date: Wed, 17 Sep 2014 08:33:00 +0200 [thread overview]
Message-ID: <28681846d4cafdd034bcbb1b358b4e8c8501abb1.1410935206.git.silvio.fricke@gmail.com> (raw)
In-Reply-To: <cover.1410935206.git.silvio.fricke@gmail.com>
In-Reply-To: <cover.1410935206.git.silvio.fricke@gmail.com>
Since 93a6c6a808("dts: update to v3.17-rc2") we have a correct gpio
configuration. This results in a double gpio request what receipted in a
error message like this one:
gpiolib: _gpio_request: gpio-25 (phy-reset) status -16
Now with this patch the problem is gone.
Signed-off-by: Silvio Fricke <silvio.fricke@gmail.com>
---
arch/arm/boards/datamodul-edm-qmx6/board.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/arch/arm/boards/datamodul-edm-qmx6/board.c b/arch/arm/boards/datamodul-edm-qmx6/board.c
index e388e28..25f45df 100644
--- a/arch/arm/boards/datamodul-edm-qmx6/board.c
+++ b/arch/arm/boards/datamodul-edm-qmx6/board.c
@@ -49,6 +49,7 @@
#define RQ7_GPIO_ENET_MODE2 IMX_GPIO_NR(6, 28)
#define RQ7_GPIO_ENET_MODE3 IMX_GPIO_NR(6, 29)
#define RQ7_GPIO_ENET_EN_CLK125 IMX_GPIO_NR(6, 24)
+#define RQ7_GPIO_ENET_RESET IMX_GPIO_NR(1, 25)
static iomux_v3_cfg_t realq7_pads_gpio[] = {
MX6Q_PAD_RGMII_RXC__GPIO_6_30,
@@ -57,6 +58,7 @@ static iomux_v3_cfg_t realq7_pads_gpio[] = {
MX6Q_PAD_RGMII_RD2__GPIO_6_28,
MX6Q_PAD_RGMII_RD3__GPIO_6_29,
MX6Q_PAD_RGMII_RX_CTL__GPIO_6_24,
+ MX6Q_PAD_ENET_CRS_DV__GPIO_1_25,
};
static int ksz9031rn_phy_fixup(struct phy_device *dev)
@@ -85,12 +87,14 @@ static int realq7_enet_init(void)
gpio_direction_output(RQ7_GPIO_ENET_MODE3, 1);
gpio_direction_output(RQ7_GPIO_ENET_EN_CLK125, 1);
- gpio_direction_output(25, 0);
+ gpio_direction_output(RQ7_GPIO_ENET_RESET, 0);
mdelay(50);
- gpio_direction_output(25, 1);
+ gpio_direction_output(RQ7_GPIO_ENET_RESET, 1);
mdelay(50);
+ gpio_free(RQ7_GPIO_ENET_RESET);
+
phy_register_fixup_for_uid(PHY_ID_KSZ9031, MICREL_PHY_ID_MASK,
ksz9031rn_phy_fixup);
--
2.1.0
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2014-09-17 6:33 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-16 12:15 [PATCH] double requested gpio problem Silvio Fricke
2014-09-16 12:15 ` [PATCH] gpiolib: gpio_request: correct return code of a already requested gpio Silvio Fricke
2014-09-17 6:32 ` [PATCH] gpio phy-reset problem Silvio Fricke
2014-09-17 6:33 ` Silvio Fricke [this message]
2014-09-17 7:11 ` [PATCH] ARM: i.MX: edmqmx6: free phy-reset gpio pin Sascha Hauer
2014-09-17 7:17 ` Alexander Shiyan
2014-09-22 4:57 ` Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=28681846d4cafdd034bcbb1b358b4e8c8501abb1.1410935206.git.silvio.fricke@gmail.com \
--to=silvio.fricke@gmail.com \
--cc=barebox@lists.infradead.org \
--cc=s.hauer@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox