From: Hong Xu Date: Mon, 28 Jul 2008 16:59:13 +0800 Subject: [U-Boot-Users] [PATCH 1/1] Add support for ATMELAT91SAM9G20EKboard In-Reply-To: <20080728102957.5e58c7e5@hskinnemo-gx745.norway.atmel.com> References: <8130D65399114AF5A2B07FED30A676C2@aeglos> <20080726113654.GC26611@game.jcrosoft.org> <1516faed0807271845r82f3ca8v3f957638ef7f7b8@mail.gmail.com> <20080728102957.5e58c7e5@hskinnemo-gx745.norway.atmel.com> Message-ID: <1516faed0807280159w7166c1adw1c03b61e38400801@mail.gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Mon, Jul 28, 2008 at 16:29, Haavard Skinnemoen wrote: > "Hong Xu" wrote: >> > maybe we can use config related to the functionnality or the sub-class >> > CPU >> > ex : >> > CONFIG_MACB_INCLK >> >> Agree. >> >> We can use "#if defined(CONFIG_AT91) && defined(CONFIG_MACB)" in >> net/eth.c and "#ifdef CONFIG_MACB_INCLK" in drivers/net/macb.c to >> simplify the previous *big* #ifdef. >> If everyone feels comfortable, I'll rewrite these parts and re-submit the patch. > > What does CONFIG_MACB_INCLK mean? Per J's suggestion, use CONFIG_MACB_INCLK or some other thing to simplify the *big* ifdef in driver/net/macb.c From the existing code, it seems that some boards (AT91CAP9, AT91SAM926[0,3]) need the CLKEN bit of EMAC_USRIO to be set, but others(if exist) do not need to. So in all boards that need this bit to be set, use a new CONFIG_MACB_XXX to denote this. > > Haavard >