From mboxrd@z Thu Jan 1 00:00:00 1970 From: Markus Niebel Date: Fri, 13 Mar 2015 17:52:03 +0100 Subject: [U-Boot] [PATCH 2/3] arm: mx6: tqma6: Update to optionally configure an alternative SPI setup In-Reply-To: <5502E545.5050209@denx.de> References: <1426163671-23297-1-git-send-email-sr@denx.de> <1426163671-23297-2-git-send-email-sr@denx.de> <5501A1CE.7090902@tqsc.de> <5501AE61.2060603@denx.de> <5502A86C.6010504@tqsc.de> <5502E545.5050209@denx.de> Message-ID: <550315B3.9020900@tqsc.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hello Stefan, Am 13.03.2015 um 14:25 schrieb Stefan Roese: > Hi Markus, > > On 13.03.2015 10:05, Markus Niebel wrote: >>> >>> Not sure if I understand this correctly. Could you give an example? Again, my current baseboard has no SPI at all. >>> >> >> tqma6_iomux_spi is for the SPI controller the serial nor is connected, >> so baseboard specific data are additional CS. >> >> You could solve the data duplication using >> >> #define TQMA6_BB_ECSPI1_CS_GPIO IMX_GPIO_NR(n, mm), >> #define TQMA6_BB_CS_PAD_CTRL NEW_PAD_CTRL(MX6_PAD_bla__GPIOn, IOmm, > >> and in the board file: >> >> if !defined(TQMA6_BB_ECSPI1_CS_GPIO) >> #define TQMA6_BB_ECSPI1_CS_GPIO >> #endif >> >> static unsigned const tqma6_ecspi1_cs[] = { >> TQMA6_SF_CS_GPIO, >> TQMA6_BB_ECSPI1_CS_GPIO >> }; >> >> But OK, this looks not very nice >> >> As I said, not completely ready, but would prevent some code duplication. > > With my current approach we have code duplication. I suggest we give this version a try and see if it scales for other, future baseboards as well. If not, we can always try a solution like you described above. > > Okay? Yes, Okay. you can add my Acked-by > > Thanks, > Stefan > Regards Markus