Patchwork [U-Boot,v3,16/16] dm: Move old driver model documentation into an 'old-docs' directory

login
register
mail settings
Submitter Simon Glass
Date June 19, 2013, 3:52 a.m.
Message ID <1371613960-28678-17-git-send-email-sjg@chromium.org>
Download mbox | patch
Permalink /patch/252476/
State Superseded
Delegated to: Tom Rini
Headers show

Comments

Simon Glass - June 19, 2013, 3:52 a.m.
This documentation is still useful but is not fully correct with the API
changes since the original driver model implementation. So move it into
a separate directory, and create a README to describe what is going on.

This documentation pertains to the planned implementation of driver model
in U-Boot for each subsystem. It is probably better to have this
documentation in the source code for each subsystem where possible, so
that docbook will pick it up. Where this does not make sense, new
documentation can be placed in some suitable file in doc/driver-model.

Signed-off-by: Simon Glass <sjg@chromium.org>
---
Changes in v3:
- Add new patch to move driver model documentation

Changes in v2: None

 doc/driver-model/old-docs/README                 | 29 ++++++++++++++++++++++++
 doc/driver-model/{ => old-docs}/UDM-block.txt    |  0
 doc/driver-model/{ => old-docs}/UDM-cores.txt    |  0
 doc/driver-model/{ => old-docs}/UDM-design.txt   |  0
 doc/driver-model/{ => old-docs}/UDM-fpga.txt     |  0
 doc/driver-model/{ => old-docs}/UDM-gpio.txt     |  0
 doc/driver-model/{ => old-docs}/UDM-hwmon.txt    |  0
 doc/driver-model/{ => old-docs}/UDM-keyboard.txt |  0
 doc/driver-model/{ => old-docs}/UDM-mmc.txt      |  0
 doc/driver-model/{ => old-docs}/UDM-net.txt      |  0
 doc/driver-model/{ => old-docs}/UDM-pci.txt      |  0
 doc/driver-model/{ => old-docs}/UDM-pcmcia.txt   |  0
 doc/driver-model/{ => old-docs}/UDM-power.txt    |  0
 doc/driver-model/{ => old-docs}/UDM-rtc.txt      |  0
 doc/driver-model/{ => old-docs}/UDM-serial.txt   |  0
 doc/driver-model/{ => old-docs}/UDM-spi.txt      |  0
 doc/driver-model/{ => old-docs}/UDM-stdio.txt    |  0
 doc/driver-model/{ => old-docs}/UDM-tpm.txt      |  0
 doc/driver-model/{ => old-docs}/UDM-twserial.txt |  0
 doc/driver-model/{ => old-docs}/UDM-usb.txt      |  0
 doc/driver-model/{ => old-docs}/UDM-video.txt    |  0
 doc/driver-model/{ => old-docs}/UDM-watchdog.txt |  0
 22 files changed, 29 insertions(+)
 create mode 100644 doc/driver-model/old-docs/README
 rename doc/driver-model/{ => old-docs}/UDM-block.txt (100%)
 rename doc/driver-model/{ => old-docs}/UDM-cores.txt (100%)
 rename doc/driver-model/{ => old-docs}/UDM-design.txt (100%)
 rename doc/driver-model/{ => old-docs}/UDM-fpga.txt (100%)
 rename doc/driver-model/{ => old-docs}/UDM-gpio.txt (100%)
 rename doc/driver-model/{ => old-docs}/UDM-hwmon.txt (100%)
 rename doc/driver-model/{ => old-docs}/UDM-keyboard.txt (100%)
 rename doc/driver-model/{ => old-docs}/UDM-mmc.txt (100%)
 rename doc/driver-model/{ => old-docs}/UDM-net.txt (100%)
 rename doc/driver-model/{ => old-docs}/UDM-pci.txt (100%)
 rename doc/driver-model/{ => old-docs}/UDM-pcmcia.txt (100%)
 rename doc/driver-model/{ => old-docs}/UDM-power.txt (100%)
 rename doc/driver-model/{ => old-docs}/UDM-rtc.txt (100%)
 rename doc/driver-model/{ => old-docs}/UDM-serial.txt (100%)
 rename doc/driver-model/{ => old-docs}/UDM-spi.txt (100%)
 rename doc/driver-model/{ => old-docs}/UDM-stdio.txt (100%)
 rename doc/driver-model/{ => old-docs}/UDM-tpm.txt (100%)
 rename doc/driver-model/{ => old-docs}/UDM-twserial.txt (100%)
 rename doc/driver-model/{ => old-docs}/UDM-usb.txt (100%)
 rename doc/driver-model/{ => old-docs}/UDM-video.txt (100%)
 rename doc/driver-model/{ => old-docs}/UDM-watchdog.txt (100%)

diff --git a/doc/driver-model/UDM-block.txt b/doc/driver-model/old-docs/UDM-block.txt
similarity index 100%
rename from doc/driver-model/UDM-block.txt
rename to doc/driver-model/old-docs/UDM-block.txt
diff --git a/doc/driver-model/UDM-cores.txt b/doc/driver-model/old-docs/UDM-cores.txt
similarity index 100%
rename from doc/driver-model/UDM-cores.txt
rename to doc/driver-model/old-docs/UDM-cores.txt
diff --git a/doc/driver-model/UDM-design.txt b/doc/driver-model/old-docs/UDM-design.txt
similarity index 100%
rename from doc/driver-model/UDM-design.txt
rename to doc/driver-model/old-docs/UDM-design.txt
diff --git a/doc/driver-model/UDM-fpga.txt b/doc/driver-model/old-docs/UDM-fpga.txt
similarity index 100%
rename from doc/driver-model/UDM-fpga.txt
rename to doc/driver-model/old-docs/UDM-fpga.txt
diff --git a/doc/driver-model/UDM-gpio.txt b/doc/driver-model/old-docs/UDM-gpio.txt
similarity index 100%
rename from doc/driver-model/UDM-gpio.txt
rename to doc/driver-model/old-docs/UDM-gpio.txt
diff --git a/doc/driver-model/UDM-hwmon.txt b/doc/driver-model/old-docs/UDM-hwmon.txt
similarity index 100%
rename from doc/driver-model/UDM-hwmon.txt
rename to doc/driver-model/old-docs/UDM-hwmon.txt
diff --git a/doc/driver-model/UDM-keyboard.txt b/doc/driver-model/old-docs/UDM-keyboard.txt
similarity index 100%
rename from doc/driver-model/UDM-keyboard.txt
rename to doc/driver-model/old-docs/UDM-keyboard.txt
diff --git a/doc/driver-model/UDM-mmc.txt b/doc/driver-model/old-docs/UDM-mmc.txt
similarity index 100%
rename from doc/driver-model/UDM-mmc.txt
rename to doc/driver-model/old-docs/UDM-mmc.txt
diff --git a/doc/driver-model/UDM-net.txt b/doc/driver-model/old-docs/UDM-net.txt
similarity index 100%
rename from doc/driver-model/UDM-net.txt
rename to doc/driver-model/old-docs/UDM-net.txt
diff --git a/doc/driver-model/UDM-pci.txt b/doc/driver-model/old-docs/UDM-pci.txt
similarity index 100%
rename from doc/driver-model/UDM-pci.txt
rename to doc/driver-model/old-docs/UDM-pci.txt
diff --git a/doc/driver-model/UDM-pcmcia.txt b/doc/driver-model/old-docs/UDM-pcmcia.txt
similarity index 100%
rename from doc/driver-model/UDM-pcmcia.txt
rename to doc/driver-model/old-docs/UDM-pcmcia.txt
diff --git a/doc/driver-model/UDM-power.txt b/doc/driver-model/old-docs/UDM-power.txt
similarity index 100%
rename from doc/driver-model/UDM-power.txt
rename to doc/driver-model/old-docs/UDM-power.txt
diff --git a/doc/driver-model/UDM-rtc.txt b/doc/driver-model/old-docs/UDM-rtc.txt
similarity index 100%
rename from doc/driver-model/UDM-rtc.txt
rename to doc/driver-model/old-docs/UDM-rtc.txt
diff --git a/doc/driver-model/UDM-serial.txt b/doc/driver-model/old-docs/UDM-serial.txt
similarity index 100%
rename from doc/driver-model/UDM-serial.txt
rename to doc/driver-model/old-docs/UDM-serial.txt
diff --git a/doc/driver-model/UDM-spi.txt b/doc/driver-model/old-docs/UDM-spi.txt
similarity index 100%
rename from doc/driver-model/UDM-spi.txt
rename to doc/driver-model/old-docs/UDM-spi.txt
diff --git a/doc/driver-model/UDM-stdio.txt b/doc/driver-model/old-docs/UDM-stdio.txt
similarity index 100%
rename from doc/driver-model/UDM-stdio.txt
rename to doc/driver-model/old-docs/UDM-stdio.txt
diff --git a/doc/driver-model/UDM-tpm.txt b/doc/driver-model/old-docs/UDM-tpm.txt
similarity index 100%
rename from doc/driver-model/UDM-tpm.txt
rename to doc/driver-model/old-docs/UDM-tpm.txt
diff --git a/doc/driver-model/UDM-twserial.txt b/doc/driver-model/old-docs/UDM-twserial.txt
similarity index 100%
rename from doc/driver-model/UDM-twserial.txt
rename to doc/driver-model/old-docs/UDM-twserial.txt
diff --git a/doc/driver-model/UDM-usb.txt b/doc/driver-model/old-docs/UDM-usb.txt
similarity index 100%
rename from doc/driver-model/UDM-usb.txt
rename to doc/driver-model/old-docs/UDM-usb.txt
diff --git a/doc/driver-model/UDM-video.txt b/doc/driver-model/old-docs/UDM-video.txt
similarity index 100%
rename from doc/driver-model/UDM-video.txt
rename to doc/driver-model/old-docs/UDM-video.txt
diff --git a/doc/driver-model/UDM-watchdog.txt b/doc/driver-model/old-docs/UDM-watchdog.txt
similarity index 100%
rename from doc/driver-model/UDM-watchdog.txt
rename to doc/driver-model/old-docs/UDM-watchdog.txt

Patch

diff --git a/doc/driver-model/old-docs/README b/doc/driver-model/old-docs/README
new file mode 100644
index 0000000..0de03bf
--- /dev/null
+++ b/doc/driver-model/old-docs/README
@@ -0,0 +1,29 @@ 
+The U-Boot Driver Model Project
+===============================
+
+This directory contains the original driver model documents. The documents
+are still useful and relevant, but some of the terminology has changed,
+and some of the APIs are a little different.
+
+The changes (which are not reflected in the docs in this directory) are:
+
+- Tried to agressively remove boilerplate, so that for most drivers there
+is little or no 'driver model' code to write.
+- Moved some data from code into data structure - e.g. store a pointer to
+the driver operations structure in the driver, rather than passing it
+to the driver bind function.
+- Rename some structures to make them more similar to Linux (struct device
+instead of struct instance, struct platform_data, etc.)
+- Change the name 'core' to 'uclass', meaning U-Boot class. It seems that
+this concept relates to a class of drivers (or a subsystem). We shouldn't
+use 'class' since it is a C++ reserved word, so U-Boot class (uclass) seems
+better than 'core'.
+- Remove 'struct driver_instance' and just use a single 'struct device'.
+This removes a level of indirection that doesn't seem necessary.
+- Built in device tree support, to avoid the need for platform_data
+- Removed the concept of driver relocation, and just make it possible for
+the new driver (created after relocation) to access the old driver data.
+I feel that relocation is a very special case and will only apply to a few
+drivers, many of which can/will just re-init anyway. So the overhead of
+dealing with this might not be worth it.
+- Implemented a GPIO system, trying to keep it simple