From: David Jander Date: Wed, 2 Jun 2004 16:16:42 -0400 Subject: [U-Boot-Users] cpu/mpc8xx/spi.c broken? Message-ID: <200406021616.42483.david.jander@protonic.nl> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi all, I just wanted to try to make the spi driver for the MPC8xx work and use it together with the DS1306 RTC driver, when I came across the following inconsistency: The driver in cpu/mpc8xx/spi.c declares this function: ssize_t spi_xfer (size_t count) ... and the RTC driver includes include/spi.h, where this is declared: int spi_xfer(spi_chipsel_type chipsel, int bitlen, uchar *dout, uchar *din); What's the point? Since cpu/mpc8xx/spi.c doesn't include spi.h, the compilation will go all right, but it will (silently) never work! Note: if the function in cpu/mpc8xx/spi.c is not supposed to be visible from outside, then it should be declared static IMHO. It looks like spi.h declares a prototype about how spi is supposed to work in the rest of u-boot, but what about this cpu/mpc8xx/spi.c thing? Any advice on how to get this mess fixed? I'd like to see a common interface to SPI within u-boot, so you can either use a hardware driver, a software (bitbang-) driver or implement your own backend in board-support space. cpu/mpc8xx/spi.c looks relatively generic to me (otherwise it is at the wrong place anyway IMHO), so what about fixing it? Greetings, -- David Jander Protonic Holland.