From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Fri, 21 Sep 2012 15:53:26 +0200 Subject: [U-Boot] [PATCH 01/11] DM: add block device core In-Reply-To: <1702411.xH8Xcq3Rms@bloomfield> References: <1348169867-2917-1-git-send-email-morpheus.ibis@gmail.com> <201209211439.14753.marex@denx.de> <1702411.xH8Xcq3Rms@bloomfield> Message-ID: <201209211553.26375.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, > On Friday 21 of September 2012 14:39:14 Marek Vasut wrote: > > Dear Pavel Herrmann, > > > > > On Thursday 20 of September 2012 21:58:17 Marek Vasut wrote: > > > > Dear Pavel Herrmann, > > > > > > > > > This core will register all block devices (disk, cards, partitons) > > > > > and provide unfied access to them, instead of current method with > > > > > device + partition offset > > > > > > > > > > Signed-off-by: Pavel Herrmann > > > > > --- > > > > > > > > > > Makefile | 1 + > > > > > drivers/blockdev/Makefile | 42 ++++++++++++++++ > > > > > include/dm/blockdev.h | 121 > > > > > > > > > > ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 164 > > > > > insertions(+) > > > > > > > > > > create mode 100644 drivers/blockdev/Makefile > > > > > create mode 100644 include/dm/blockdev.h > > > > > > > > Why not use drivers/block/ ? > > > > > > Because the drivers in drivers/block have a different purpose than > > > blockdev. > > > > Different, ok. Can you elaborate how is it different? > > blockctrl is equivalent in purpose to drivers/block, just a new approach > > 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? > blockdev = disk, partition, SD card Uh, let's say I understand (even if I don't see the correlation between partition and SD card) > - 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. > Also this gets rid of all partition-related code in filesystems, because > the access to a partition and to the whole disk is the same, no need to > manually compute offsets every time (and you can support discontinuous > partitions, if you chose to do so) > > Pavel Herrmann Best regards, Marek Vasut