[flashrom] [PATCH 11/12] add support for Intel Hardware Sequencing

Stefan Tauner stefan.tauner at student.tuwien.ac.at
Mon Jun 20 22:26:16 CEST 2011


On Mon, 20 Jun 2011 11:54:45 -0700
David Hendricks <dhendrix at google.com> wrote:

> On Tue, Jun 7, 2011 at 7:55 PM, Stefan Tauner <
> stefan.tauner at student.tuwien.ac.at> wrote:
> 
> > +static uint32_t ich_hwseq_get_erase_block_size(unsigned int addr)
> > +{
> > +       REGWRITE32(ICH9_REG_FADDR, (addr & 0x00FFFFFF));
> > +       uint8_t enc_berase = (REGREAD16(ICH9_REG_HSFS) & HSFS_BERASE) >>
> > +                                  HSFS_BERASE_OFF;
> > +       const uint32_t dec_berase[4] = {
> > +               256,
> > +               4 * 1024,
> > +               8 * 1024,
> > +               64 * 1024
> > +       };
> >
> +       return dec_berase[enc_berase];
> >
> 
> Others might want to comment, but I think you should avoid doing all that
> work in the variable declaration area.

no need. you are correct, i have revamped it. thanks

> 
> > +}
> > +
> > +int ich_hwseq_probe(struct flashchip *flash)
> > +{
> > +       uint32_t total_size, boundary;
> > +       uint32_t erase_size_low, size_low, erase_size_high, size_high;
> > +       struct block_eraser eraser;
> >
> 
> This should be a pointer, right? I am assuming you intended to directly
> update the flash->block_erasers[0] member later in this function.

inderdaad! :)

thanks a lot, fixup! patch attached.

-- 
Kind regards/Mit freundlichen Grüßen, Stefan Tauner
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0008-fixup!-add-support-for-Intel-Hardware-Sequencing.patch
Type: text/x-patch
Size: 3475 bytes
Desc: not available
URL: <http://www.flashrom.org/pipermail/flashrom/attachments/20110620/8120be10/attachment.patch>


More information about the flashrom mailing list