public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Artturi Alm <artturi.alm@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] sunxi: broken sun4i_emacs, all boards?
Date: Sat, 4 Nov 2017 04:26:14 +0200	[thread overview]
Message-ID: <20171104022614.GA95903@gmail.com> (raw)
In-Reply-To: <20171103084556.mxsconh4gwcvd7ua@flea>

On Fri, Nov 03, 2017 at 09:45:56AM +0100, Maxime Ripard wrote:
> Hi Artturi,
> 
> On Thu, Nov 02, 2017 at 10:57:05PM +0200, Artturi Alm wrote:
> > On Sun, Oct 22, 2017 at 11:08:43PM +0300, Artturi Alm wrote:
> > > Hi,
> > > 
> > > this has been 'blocking' my attempts to revive the A10-boards i have
> > > since early june, or so.
> > > 
> > > now i found this commit abc3e4df59f54cf3dda42a35a75d617fe861f5fe, which
> > > left the drivers/net/Makefile untouched, essentially breaking sunxi_emac.
> > > 
> > > the diff below didn't fix it however, i can see how it does arp who-has,
> > > and the remote replying, but u-boot does act as if nothing is received back?
> > > 
> > > -Artturi
> > > 
> > 
> > ping? apparently i forgot to cc anyone at first try.
> 
> The patch sounds about right, can you send it please?
> 

Not sure what you mean, but if you mean proper [PATCH] w/signed-off etc.,
then no - i'm sorry but i don't even know how, and kind of wish i could
get by w/o learning how.

> I guess the select PHYLIB should be properly indented, and split into
> a separate commit.
> 

Yep, the whitespace error got copypasted from config SUN8I_EMAC, which
is pretty broken w/regards spaces vs tab. left untouched in diff below
w/o copypasting spaces, which you're of course free to split in as many
commits you want. :)

-Artturi

> Thanks!
> Maxime
> 
> -- 
> Maxime Ripard, Free Electrons
> Embedded Linux and Kernel engineering
> http://free-electrons.com


sunxi: sun4i emac fixes.

fixes CONFIG_SUNXI_EMAC references from drivers/net/Makefile and
include/configs/sunxi-common.h forgotten(?) in commit:
	sunxi: Convert SUNXI_EMAC to Kconfig
	abc3e4df59f54cf3dda42a35a75d617fe861f5fe

i have only three different kinds of A10 boards, but they all have
realtek phy, so i chose to combine the #ifdef in sunxi-common.h with
CONFIG_SUN7I_GMAC. admittedly it felt horrible place to default on such,
but if sun7i_gmac can, why sun4i_emac could not?

because of misnaming above, i think the need for "select PHYLIB" under
config SUN4I_EMAC was missed in commit:
	Move PHYLIB to Kconfig
	3146f0c017df2231d03dff09cee31f7bd63db3e5

diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index c1ce54ecbb..52555da4b3 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -247,6 +247,7 @@ config SUN7I_GMAC
 config SUN4I_EMAC
 	bool "Allwinner Sun4i Ethernet MAC support"
 	depends on DM_ETH
+	select PHYLIB
 	help
 	  This driver supports the Allwinner based SUN4I Ethernet MAC.
 
diff --git a/drivers/net/Makefile b/drivers/net/Makefile
index 94a4fd8701..ac5443c752 100644
--- a/drivers/net/Makefile
+++ b/drivers/net/Makefile
@@ -21,7 +21,7 @@ obj-$(CONFIG_DNET) += dnet.o
 obj-$(CONFIG_E1000) += e1000.o
 obj-$(CONFIG_E1000_SPI) += e1000_spi.o
 obj-$(CONFIG_EEPRO100) += eepro100.o
-obj-$(CONFIG_SUNXI_EMAC) += sunxi_emac.o
+obj-$(CONFIG_SUN4I_EMAC) += sunxi_emac.o
 obj-$(CONFIG_SUN8I_EMAC) += sun8i_emac.o
 obj-$(CONFIG_ENC28J60) += enc28j60.o
 obj-$(CONFIG_EP93XX) += ep93xx_eth.o
diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
index 4207398eb9..1354f15947 100644
--- a/include/configs/sunxi-common.h
+++ b/include/configs/sunxi-common.h
@@ -286,12 +286,7 @@ extern int soft_i2c_gpio_scl;
 #endif /* CONFIG_VIDEO_SUNXI */
 
 /* Ethernet support */
-#ifdef CONFIG_SUNXI_EMAC
-#define CONFIG_PHY_ADDR		1
-#define CONFIG_MII			/* MII PHY management		*/
-#endif
-
-#ifdef CONFIG_SUN7I_GMAC
+#if defined CONFIG_SUN4I_EMAC || defined CONFIG_SUN7I_GMAC
 #define CONFIG_PHY_ADDR		1
 #define CONFIG_MII			/* MII PHY management		*/
 #define CONFIG_PHY_REALTEK

  reply	other threads:[~2017-11-04  2:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-22 20:08 [U-Boot] sunxi: broken sun4i_emacs, all boards? Artturi Alm
2017-11-02 20:57 ` Artturi Alm
2017-11-03  8:45   ` Maxime Ripard
2017-11-04  2:26     ` Artturi Alm [this message]
2017-11-06  9:00       ` Maxime Ripard

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=20171104022614.GA95903@gmail.com \
    --to=artturi.alm@gmail.com \
    --cc=u-boot@lists.denx.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