From: Lucas Stach Date: Fri, 25 Jan 2013 23:11:37 +0100 Subject: [U-Boot] [PATCH 04/11] tegra20: switch over tamonten platform to use tablebased pinmux In-Reply-To: <5103015F.6080508@nvidia.com> References: <1359046100-19385-1-git-send-email-dev@lynxeye.de> <1359046100-19385-5-git-send-email-dev@lynxeye.de> <5103015F.6080508@nvidia.com> Message-ID: <1359151897.1540.94.camel@tellur> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Am Freitag, den 25.01.2013, 14:04 -0800 schrieb Stephen Warren: > On 01/24/2013 08:48 AM, Lucas Stach wrote: > > Init pinmux in one shot, in order to avoid any conflicts. > > > diff --git a/board/avionic-design/common/tamonten.c b/board/avionic-design/common/tamonten.c > > > +static struct pingroup_config tamonten_pinmux[] = { > > + PINMUX_ENTRY(ATA, IDE, NORMAL, NORMAL), /* GPIO */ > > + PINMUX_ENTRY(ATB, SDIO4, NORMAL, NORMAL), /* MMC */ > ... > > I believe this initializes every single pingroup on the SoC to > something. In order to prevent any behavior changes, wouldn't it be > better to first fill in this table only with entries that achieve the > same pinmux programming that used to be performed by the C code you're > removing? Then, a separate later patch could fill in missing items in > the pinmux table. I think that'd end up being much safer and easier to > validate. > As I wrote in the cover letter this initializes the pinmux to the same values the Linux kernel uses. I don't consider it a safer approach to pull out the old pinmux from the C Code and then later building a conflict free full muxtable out of this. However I made sure to go through the C Code to see which pads need to be un-tristated. At that time I cross-checked the table with the functions used by the C Code. But as a human I'm not safe from mistakes. Regards, Lucas