From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Fri, 21 Sep 2012 17:34:27 +0200 Subject: [U-Boot] [PATCH 01/11] DM: add block device core In-Reply-To: <56183164.uZ3HcVocPu@bloomfield> References: <1348169867-2917-1-git-send-email-morpheus.ibis@gmail.com> <201209211553.26375.marex@denx.de> <56183164.uZ3HcVocPu@bloomfield> Message-ID: <201209211734.27842.marex@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 Dear Pavel Herrmann, [...] > > > blockctrl = AHCI, PIIX... whichever chip you have between SATA and PCI > > > (or generally disk-bus and board-bus) > > > > So this is for sata ? Or will it also by used for SD/USB flash discs? > > no, blockctrl will be used for SATA, PATA, SCSI, and anything of the sort > (device with several ports, block devices on said ports, ability to send > read/write/query commands to devices on ports - definitely not USB, > possibly also SD, but you probably want more operations from SD) Why not USB flash ? Why not SD, what other stuff do you need for that? Is the API not misdesigned then? > > > blockdev = disk, partition, SD card > > > > Uh, let's say I understand (even if I don't see the correlation between > > partition and SD card) > > they are an ordered bunch of blocks with a "conventional" filesystem on > them You might want to do RAW reads, so why do you put filesystem into this context? > > > - something that does basic checks > > > (range, possibility of operation) and submits operations to correct > > > parent (blockctrl, MMC controller, whatnot). > > > > Ascii art might help here greatly (how these pieces fall together). I > > think I do understand it though. > > current code > user -> FS -> offset calculation from partition info -> drivers/disk > > new code > user -> FS -> blockdev -> blockctrl (or USB or SD controller) So your "blockctrl" should do the USB/SD/whatever muxing. > partition blockdev does all the offset calculation and range check that FSs > do now, and then submits the operation to the parent blockdev, which in > turn submits it to blockctrl (or an SD controller in case of a SD card, or > USB controller in case of a USB flash) Make sure you document this in the next series. > Pavel Herrmann Best regards, Marek Vasut