From patchwork Wed Jun 19 03:52:40 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 252476 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 2F8E12C0349 for ; Wed, 19 Jun 2013 13:55:49 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 75AE14A08F; Wed, 19 Jun 2013 05:55:23 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Xf6g8zldbkJg; Wed, 19 Jun 2013 05:55:23 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id CA88E4A090; Wed, 19 Jun 2013 05:53:49 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 583F64A027 for ; Wed, 19 Jun 2013 05:53:42 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id r5n-OApfSMy3 for ; Wed, 19 Jun 2013 05:53:36 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-ye0-f202.google.com (mail-ye0-f202.google.com [209.85.213.202]) by theia.denx.de (Postfix) with ESMTPS id 761C94A029 for ; Wed, 19 Jun 2013 05:53:05 +0200 (CEST) Received: by mail-ye0-f202.google.com with SMTP id r11so550547yen.1 for ; Tue, 18 Jun 2013 20:53:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=UTbHd2+DTSS4r7cjGjwqdiiXaN1pg7ToyEL2ap6YrKA=; b=arEfzasHvqSmb2HO+kTVlAj80EyjvhkfJvMDur2FfxcEPhkbMb3XJlKf/ziRtVM9V9 Ii0Q53bGkgHPsClYlSH3lA880SOZTtHT4DBH/dBbM0f1FchC+cQVrbnpb/kxrQftsHWP Q+O91554y48Zl/R4sytEvS5cTdUT30O9AtaP5x5zqDWJwCCxoudE22fjlrV5Pdt8Rkvr 4+KK8L2yWfrmi0F2aOGL3SJMudHh3Uwy0w43kbCfabJML+pjo3NBdZ280o6HmwImuSQJ kDoCDtUqYJALJyj8X0BMKvVybHYIY/ifvEJ2wqxIoHtpXjoiYYYP2zkldIvmtWNKP977 3JGg== X-Received: by 10.236.91.4 with SMTP id g4mr563130yhf.30.1371613984670; Tue, 18 Jun 2013 20:53:04 -0700 (PDT) Received: from corp2gmr1-1.hot.corp.google.com (corp2gmr1-1.hot.corp.google.com [172.24.189.92]) by gmr-mx.google.com with ESMTPS id t25si183990yhg.6.2013.06.18.20.53.04 for (version=TLSv1.1 cipher=AES128-SHA bits=128/128); Tue, 18 Jun 2013 20:53:04 -0700 (PDT) Received: from kaka.mtv.corp.google.com (kaka.mtv.corp.google.com [172.22.83.1]) by corp2gmr1-1.hot.corp.google.com (Postfix) with ESMTP id 7034531C016; Tue, 18 Jun 2013 20:53:04 -0700 (PDT) Received: by kaka.mtv.corp.google.com (Postfix, from userid 121222) id 4C80816099F; Tue, 18 Jun 2013 20:53:04 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Tue, 18 Jun 2013 20:52:40 -0700 Message-Id: <1371613960-28678-17-git-send-email-sjg@chromium.org> X-Mailer: git-send-email 1.8.3 In-Reply-To: <1371613960-28678-1-git-send-email-sjg@chromium.org> References: <1371613960-28678-1-git-send-email-sjg@chromium.org> X-Gm-Message-State: ALoCoQmjKQopp+s04trbFHM6G+KiscKqZUJF8YON84Z65nluadtNa3pq5BuNcm1Zsd99tq/ahhJTkEE2x0167tmROTHUYzPN0QA9kk07uc88sDnGCtAWoA3IgMb6/aWHAgj0u3N8ZD/SiQp35vf0Bha8lPyTaeMftr+CeXZsOvVHvG5oJmGRt8EqqEMj8B5ZjFZMOizjn5B0 Cc: Tom Rini , u-boot-review@google.com Subject: [U-Boot] [PATCH v3 16/16] dm: Move old driver model documentation into an 'old-docs' directory X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de 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 --- 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 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