From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Roese Date: Wed, 29 Oct 2014 17:16:25 +0100 Subject: [U-Boot] [PATCH v4 05/29] dm: spi: Add a uclass for SPI In-Reply-To: References: <1413265336-9571-1-git-send-email-sjg@chromium.org> <1413265336-9571-6-git-send-email-sjg@chromium.org> <5450E573.50705@denx.de> Message-ID: <545112D9.2050108@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Jagan! On 29.10.2014 16:39, Jagan Teki wrote: >>> diff --git a/drivers/spi/spi-uclass.c b/drivers/spi/spi-uclass.c >> >> >> >>> +int spi_post_bind(struct udevice *dev) >>> +{ >>> + /* Scan the bus for devices */ >>> + return dm_scan_fdt_node(dev, gd->fdt_blob, dev->of_offset, false); >>> +} >> >> >> SoCFPGA currently does not support CONFIG_OF_CONTROL (no dtb supplied). So >> I'm planning to use platform_data to instantiate the device. Something like >> this in the board file: >> >> static const struct dw_spi_platdata spi_platdata = { >> .base = SOCFPGA_SPIM0_ADDRESS, >> }; >> >> U_BOOT_DEVICE(dw_spi) = { >> .name = "dw_spi", >> .platdata = &spi_platdata, >> }; >> >> What would the non-fdt method have to be to bind the device in >> spi_post_bind() above? > > At present dm-spi support mostly devicetree driven Yes, I noticed this. > Will update you soon for non-devicetree base. So you are working on this too? Do you have a schedule when you have something ready for testing? If this is soon I might wait for you here. If not, I'll have to dig deeper here myself. Just checking. Thanks, Stefan