diff options
author | Tomáš Hlaváček <tmshlvck@gmail.com> | 2012-08-08 13:42:30 +0200 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2012-09-02 18:00:02 +0200 |
commit | bfae89abf10e3dc52504e7f7f91d5eaf8e320cd3 (patch) | |
tree | a813b08e8d7287e939d2408d5503db0805932633 /doc | |
parent | 0d9e59948a6694ac5f5bb08fd9537732b76bceb3 (diff) | |
download | u-boot-imx-bfae89abf10e3dc52504e7f7f91d5eaf8e320cd3.zip u-boot-imx-bfae89abf10e3dc52504e7f7f91d5eaf8e320cd3.tar.gz u-boot-imx-bfae89abf10e3dc52504e7f7f91d5eaf8e320cd3.tar.bz2 |
dm: Add twserial device document
Signed-off-by: Tomas Hlavacek<tmshlvck@gmail.com>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/driver-model/UDM-twserial.txt | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/doc/driver-model/UDM-twserial.txt b/doc/driver-model/UDM-twserial.txt new file mode 100644 index 0000000..289416a --- /dev/null +++ b/doc/driver-model/UDM-twserial.txt @@ -0,0 +1,47 @@ +================================== +TWserial device subsystem analysis +================================== + +Tomas Hlavacek<tmshlvck@gmail.com> +2012-03-21 + +I) Overview +----------- + +U-Boot currently implements one common API for TWSerial devices. The interface +is defined in include/tws.h and comprises of functions: + + int tws_read(uchar *buffer, int len); + int tws_write(uchar *buffer, int len); + +The functions are implemented by a proper device driver in drivers/twserial +directory and the driver to be compiled in is selected in a Makefile. There is +only one driver present now. + +The driver depends on ad-hoc code in board specific data, namely functions: + + void tws_ce(unsigned bit); + void tws_wr(unsigned bit); + void tws_clk(unsigned bit); + void tws_data(unsigned bit); + unsigned tws_data_read(void); + void tws_data_config_output(unsigned output); + +implemented in include/configs/inka4x0.h . + +II) Approach +------------ + + U-Boot TWserial drivers exports two simple functions and therefore the conversion + of the driver and creating a core for it is not needed. It should be consolidated + with include/configs/inka4x0.h and taken to the misc/ dir. + + +III) Analysis of in-tree drivers +-------------------------------- + + 1) drivers/twserial/soft_tws.c + ------------------------------ + The driver is the only TWserial driver. The ad-hoc part in + include/configs/inka4x0.h and the core soft_tws driver should be consolidated + to one compact driver and moved to misc/ . |