public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 01/14] gpio: bcm6345: switch to raw I/O functions
@ 2019-03-07 10:36 Philippe Reynes
  2019-03-07 10:36 ` [U-Boot] [PATCH 02/14] dt: bcm6838: add gpio controller Philippe Reynes
                   ` (14 more replies)
  0 siblings, 15 replies; 18+ messages in thread
From: Philippe Reynes @ 2019-03-07 10:36 UTC (permalink / raw)
  To: u-boot

This driver is used on several big endian mips board.
So we could use raw I/O function instead of forcing
big endian access.

Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
---
 drivers/gpio/bcm6345_gpio.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/gpio/bcm6345_gpio.c b/drivers/gpio/bcm6345_gpio.c
index d1f6cfa..71a978c 100644
--- a/drivers/gpio/bcm6345_gpio.c
+++ b/drivers/gpio/bcm6345_gpio.c
@@ -22,7 +22,7 @@ static int bcm6345_gpio_get_value(struct udevice *dev, unsigned offset)
 {
 	struct bcm6345_gpio_priv *priv = dev_get_priv(dev);
 
-	return !!(readl_be(priv->reg_data) & BIT(offset));
+	return !!(readl(priv->reg_data) & BIT(offset));
 }
 
 static int bcm6345_gpio_set_value(struct udevice *dev, unsigned offset,
@@ -31,9 +31,9 @@ static int bcm6345_gpio_set_value(struct udevice *dev, unsigned offset,
 	struct bcm6345_gpio_priv *priv = dev_get_priv(dev);
 
 	if (value)
-		setbits_be32(priv->reg_data, BIT(offset));
+		setbits_32(priv->reg_data, BIT(offset));
 	else
-		clrbits_be32(priv->reg_data, BIT(offset));
+		clrbits_32(priv->reg_data, BIT(offset));
 
 	return 0;
 }
@@ -42,9 +42,9 @@ static int bcm6345_gpio_set_direction(void __iomem *dirout, unsigned offset,
 				      bool input)
 {
 	if (input)
-		clrbits_be32(dirout, BIT(offset));
+		clrbits_32(dirout, BIT(offset));
 	else
-		setbits_be32(dirout, BIT(offset));
+		setbits_32(dirout, BIT(offset));
 
 	return 0;
 }
@@ -70,7 +70,7 @@ static int bcm6345_gpio_get_function(struct udevice *dev, unsigned offset)
 {
 	struct bcm6345_gpio_priv *priv = dev_get_priv(dev);
 
-	if (readl_be(priv->reg_dirout) & BIT(offset))
+	if (readl(priv->reg_dirout) & BIT(offset))
 		return GPIOF_OUTPUT;
 	else
 		return GPIOF_INPUT;
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2019-03-29 22:03 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-07 10:36 [U-Boot] [PATCH 01/14] gpio: bcm6345: switch to raw I/O functions Philippe Reynes
2019-03-07 10:36 ` [U-Boot] [PATCH 02/14] dt: bcm6838: add gpio controller Philippe Reynes
2019-03-08 12:25   ` Daniel Schwierzeck
2019-03-07 10:36 ` [U-Boot] [PATCH 03/14] dt: bcm968380gerg: enable " Philippe Reynes
2019-03-08 12:26   ` Daniel Schwierzeck
2019-03-07 10:36 ` [U-Boot] [PATCH 04/14] bcm968380gerg: enable gpio support Philippe Reynes
2019-03-07 10:36 ` [U-Boot] [PATCH 05/14] gpio: bcm6345: allow this driver on ARCH_BCM6858 Philippe Reynes
2019-03-07 10:36 ` [U-Boot] [PATCH 06/14] gpio: do not include <asm/arch/gpio.h> " Philippe Reynes
2019-03-07 10:36 ` [U-Boot] [PATCH 07/14] dt: bcm6858: add gpio controller Philippe Reynes
2019-03-07 10:36 ` [U-Boot] [PATCH 08/14] dt: bcm968580xref: enable " Philippe Reynes
2019-03-07 10:36 ` [U-Boot] [PATCH 09/14] bcm968580xref: enable gpio support Philippe Reynes
2019-03-07 10:36 ` [U-Boot] [PATCH 10/14] gpio: bcm6345: allow this driver on ARCH_BCM63158 Philippe Reynes
2019-03-07 10:36 ` [U-Boot] [PATCH 11/14] gpio: do not include <asm/arch/gpio.h> " Philippe Reynes
2019-03-07 10:36 ` [U-Boot] [PATCH 12/14] dt: bcm63158: add gpio controller Philippe Reynes
2019-03-07 10:36 ` [U-Boot] [PATCH 13/14] dt: bcm963158: enable " Philippe Reynes
2019-03-07 10:36 ` [U-Boot] [PATCH 14/14] bcm963158: enable gpio support Philippe Reynes
2019-03-08 12:25 ` [U-Boot] [PATCH 01/14] gpio: bcm6345: switch to raw I/O functions Daniel Schwierzeck
2019-03-29 22:03 ` Daniel Schwierzeck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox