X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=doc%2Fdriver-model%2FUDM-spi.txt;h=9ba0f841efacf3cd4cf4d746e76c5362027eae7a;hb=d7dd4fffde5cbf6a047a904fe45a9b41b40054ea;hp=7442a32bd0282610f9173da7e0b3f1b99f7212f2;hpb=707a5e2226a3dac8aa56ac236aff5e03b7625b2c;p=oweals%2Fu-boot.git diff --git a/doc/driver-model/UDM-spi.txt b/doc/driver-model/UDM-spi.txt index 7442a32bd0..9ba0f841ef 100644 --- a/doc/driver-model/UDM-spi.txt +++ b/doc/driver-model/UDM-spi.txt @@ -15,12 +15,12 @@ I) Overview void spi_init(void); struct spi_slave *spi_setup_slave(unsigned int bus, unsigned int cs, - unsigned int max_hz, unsigned int mode); + unsigned int max_hz, unsigned int mode); void spi_free_slave(struct spi_slave *slave); int spi_claim_bus(struct spi_slave *slave); void spi_release_bus(struct spi_slave *slave); int spi_xfer(struct spi_slave *slave, unsigned int bitlen, - const void *dout, void *din, unsigned long flags); + const void *dout, void *din, unsigned long flags); int spi_cs_is_valid(unsigned int bus, unsigned int cs); void spi_cs_activate(struct spi_slave *slave); void spi_cs_deactivate(struct spi_slave *slave); @@ -69,13 +69,13 @@ II) Approach struct ops { int (*spi_request_bus)(struct instance *i, unsigned int bus, - unsigned int cs, unsigned int max_hz, - unsigned int mode); + unsigned int cs, unsigned int max_hz, + unsigned int mode); void (*spi_release_bus)(struct instance *i); int (*spi_xfer) (struct instance *i, unsigned int bitlen, - const void *dout, void *din, unsigned long flags); + const void *dout, void *din, unsigned long flags); int (*spi_cs_is_valid)(struct instance *i, unsigned int bus, - unsigned int cs); + unsigned int cs); void (*spi_cs_activate)(struct instance *i); void (*spi_cs_deactivate)(struct instance *i); void (*spi_set_speed)(struct instance *i, uint hz); @@ -103,98 +103,98 @@ II) Approach III) Analysis of in-tree drivers -------------------------------- - 1) altera_spi.c - --------------- + altera_spi.c + ------------ All methods have designated structure. Simple conversion possible. - 2) andes_spi.c - -------------- + andes_spi.c + ----------- All methods have designated structure. Simple conversion possible. - 3) andes_spi.h - -------------- + andes_spi.h + ----------- Support file for andes_spi.c. No conversion is needed. - 4) armada100_spi.c - ------------------ + armada100_spi.c + --------------- All methods have designated structure. Simple conversion possible. - 5) atmel_dataflash_spi.c - ------------------------ + atmel_dataflash_spi.c + --------------------- Wrong placement. Will be moved to another location. - 6) atmel_spi.c - -------------- + atmel_spi.c + ----------- Supports more than one bus. Need some minor change. - 7) atmel_spi.h - -------------- + atmel_spi.h + ----------- Support file for andes_spi.c. No conversion is needed. - 8) bfin_spi.c - ------------- + bfin_spi.c + ---------- Supports more than one bus. Need some minor change. - 9) cf_spi.c - ----------- + cf_spi.c + -------- Cooperate with some cpu specific methods from other files. Hard conversion. - 10) davinci_spi.c - ----------------- + davinci_spi.c + ------------- All methods have designated structure. Simple conversion possible. - 11) davinci_spi.h - ----------------- + davinci_spi.h + ------------- Support file for davinci_spi.h. No conversion is needed. - 12) fsl_espi.c - -------------- + fsl_espi.c + ---------- All methods have designated structure. Simple conversion possible. - 13) kirkwood_spi.c - ------------------ + kirkwood_spi.c + -------------- All methods have designated structure. Simple conversion possible. - 14) mpc8xxx_spi.c - ----------------- + mpc8xxx_spi.c + ------------- All methods have designated structure. Simple conversion possible. - 15) mpc52xx_spi.c - ----------------- + mpc52xx_spi.c + ------------- All methods have designated structure. Simple conversion possible. - 16) mxc_spi.c - ------------- + mxc_spi.c + --------- All methods have designated structure. Simple conversion possible. - 17) mxs_spi.c - ------------- + mxs_spi.c + --------- All methods have designated structure. Simple conversion possible. - 18) oc_tiny_spi.c - ----------------- + oc_tiny_spi.c + ------------- Supports more than one bus. Need some minor change. - 19) omap3_spi.c - --------------- + omap3_spi.c + ----------- Supports more than one bus. Need some minor change. - 20) omap3_spi.h - --------------- + omap3_spi.h + ----------- Support file for omap3_spi.c. No conversion is needed. - 21) sh_spi.c - ------------ + sh_spi.c + -------- All methods have designated structure. Simple conversion possible. - 22) sh_spi.h - ------------ + sh_spi.h + -------- Support file for sh_spi.h. No conversion is needed. - 23) soft_spi.c - -------------- + soft_spi.c + ---------- Use many board specific method linked from other files. Need careful debugging. - 24) tegra2_spi.c - ---------------- + tegra2_spi.c + ------------ Some hardware specific problem when releasing bus.