From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Fri, 21 Sep 2012 14:39:42 +0200 Subject: [U-Boot] [U-Boot-DM] [PATCH 01/11] DM: add block device core In-Reply-To: <3761983.D40U8VYEil@bloomfield> References: <1348169867-2917-1-git-send-email-morpheus.ibis@gmail.com> <3761983.D40U8VYEil@bloomfield> Message-ID: <201209211439.42496.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, > Hi > > On Friday 21 of September 2012 02:19:00 Vikram Narayanan wrote: > > On Fri, Sep 21, 2012 at 1:07 AM, Pavel Herrmann > > wrote: > > > 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 > > > > > > > > > +struct blockdev_ops { > > > + lbaint_t (*read)(struct instance *inst, lbaint_t start, > > > + lbaint_t blkcnt, void *buffer); > > > + lbaint_t (*write)(struct instance *inst, lbaint_t start, > > > + lbaint_t blkcnt, void *buffer); > > > + lbaint_t (*erase)(struct instance *inst, lbaint_t start, > > > + lbaint_t blkcnt); > > > > lbaint_t is little "cryptic". Any better name suggestions? > > lbaint_t is an unsigned 32bit or 64bit number, depending on state of > CONFIG_LBA48. > > It was chosen because some parts of current block code use it as well, but > we can pretty much replace it with size_t (and assume CONFIG_LBA48 is > always on) lbaint_t seems ok indeed. > Pavel Herrmann Best regards, Marek Vasut