BEGIN:VCALENDAR
PRODID:-//Google Inc//Google Calendar 70.9054//EN
VERSION:2.0
CALSCALE:GREGORIAN
METHOD:REQUEST
BEGIN:VEVENT
DTSTART:20080712T020000Z
DTEND:20080712T030000Z
DTSTAMP:20080712T014736Z
ORGANIZER;CN=Kyungmin Park:mailto:[EMAIL PROTECTED]
UID:[EMAIL PROTECTED]
ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP=
 TRUE;X-NUM-GUESTS=0:mailto:[EMAIL PROTECTED]
ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP=
 TRUE;X-NUM-GUESTS=0:mailto:u-boot-users@lists.sourceforge.net
ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=ACCEPTED;RSVP=TRUE
 ;CN=Kyungmin Park;X-NUM-GUESTS=0:mailto:[EMAIL PROTECTED]
CLASS:PRIVATE
CREATED:20080712T014735Z
DESCRIPTION:\n\nOn Sat\, Jul 12\, 2008 at 6:43 AM\, Scott Wood <[EMAIL PROTECTED]
 reescale.com> wrote:\n> On Mon\, Jul 07\, 2008 at 11:22:56AM +0900\, Kyungm
 in Park wrote:\n>> +static int part_validate_onenand(struct mtdids *id\, st
 ruct part_info *part)\n>> +{\n>> +#if defined(CONFIG_CMD_ONENAND)\n>> +    
  /* info for OneNAND chips */\n>> +     struct mtd_info *mtd\;\n>> +\n>> + 
     mtd = &onenand_mtd\;\n>> +\n>> +     if ((unsigned long)(part->offset) 
 % mtd->erasesize) {\n>> +             printf("%s%d: partition (%s) start of
 fset"\n>> +                     "alignment incorrect\\n"\,\n>> +           
                   MTD_DEV_TYPE(id->type)\, id->num\, part->name)\;\n>> +   
           return 1\;\n>> +     }\n>> +\n>> +     if (part->size % mtd->eras
 esize) {\n>> +             printf("%s%d: partition (%s) size alignment inco
 rrect\\n"\,\n>> +                             MTD_DEV_TYPE(id->type)\, id->
 num\, part->name)\;\n>> +             return 1\;\n>> +     }\n>> +\n>> +   
   return 0\;\n>> +#else\n>> +     return 1\;\n>> +#endif\n>> +}\n>\n> This 
 looks like a duplicate of part_validate_nand (note that nand_info_t\n> is j
 ust an obfuscatory alias of struct mtd_info).\n>\n>> +static int read_onena
 nd_cached(u32 off\, u32 size\, u_char *buf)\n>> +{\n>> +     u32 bytes_read
  = 0\;\n>> +     size_t retlen\;\n>> +     int cpy_bytes\;\n>> +\n>> +     
 while (bytes_read < size) {\n>> +             if ((off + bytes_read < onena
 nd_cache_off) ||\n>> +                 (off + bytes_read >= onenand_cache_o
 ff + ONENAND_CACHE_SIZE)) {\n>> +                     onenand_cache_off = (
 off + bytes_read) & ONENAND_PAGE_MASK\;\n>> +                     if (!onen
 and_cache) {\n>> +                             /* This memory never gets fr
 eed but 'cause\n>> +                                it's a bootloader\, nob
 ody cares */\n>> +                             onenand_cache = malloc(ONENA
 ND_CACHE_SIZE)\;\n>> +                             if (!onenand_cache) {\n>
 > +                                     printf("read_onenand_cached: can't 
 alloc cache size %d bytes\\n"\,\n>> +                                      
       ONENAND_CACHE_SIZE)\;\n>> +                                     retur
 n -1\;\n>> +                             }\n>> +                     }\n>> 
 +\n>> +                     retlen = ONENAND_CACHE_SIZE\;\n>> +            
          if (onenand_read(&onenand_mtd\, onenand_cache_off\, retlen\,\n>> +
                                              &retlen\, onenand_cache) != 0 
 ||\n>> +                                     retlen != ONENAND_CACHE_SIZE) 
 {\n>> +                             printf("read_onenand_cached: error read
 ing nand off %#x size %d bytes\\n"\,\n>> +                                 
     onenand_cache_off\, ONENAND_CACHE_SIZE)\;\n>> +                        
      return -1\;\n>> +                     }\n>> +             }\n>> +     
         cpy_bytes = onenand_cache_off + ONENAND_CACHE_SIZE - (off + bytes_r
 ead)\;\n>> +             if (cpy_bytes > size - bytes_read)\n>> +          
            cpy_bytes = size - bytes_read\;\n>> +             memcpy(buf + b
 ytes_read\,\n>> +                    onenand_cache + off + bytes_read - one
 nand_cache_off\,\n>> +                    cpy_bytes)\;\n>> +             by
 tes_read += cpy_bytes\;\n>> +     }\n>> +     return bytes_read\;\n>> +}\n>
 \n> I really would rather not duplicate all of this\, which looks extremely
 \n> similar to regular NAND.  Is there reason why we don't use the mtd_info
 \n> function pointer interface?\n\nAgreed\, It's almost same as NAND code.\
 nNow nand code uses two modes\, legacy and mtd. Because I don't want to bre
 ak the NAND code \, I used the duplicated code.\nBasically it should be use
 d the common mtd style code except legacy.\n\nSo first it added the current
  code\, next time it tries to use the common interface and some code clean 
 up.\n\nThank you\,\nKyungmin Park\nView your event at http://www.google.com
 /calendar/event?action=VIEW&eid=NDlrY25wdnZubGJwdTRtdHJmcjdjZGV0aW8gdS1ib29
 0LXVzZXJzQGxpc3RzLnNvdXJjZWZvcmdlLm5ldA&tok=MjAja3l1bmdtaW43OEBnbWFpbC5jb20
 zZjU2NzIzMmFjMTNiYmFjNzI3MjcyYTNiM2IzYzM0ZjE5ZTE0ZWZl&ctz=Asia%2FSeoul&hl=e
 n.
LAST-MODIFIED:20080712T014735Z
SEQUENCE:0
STATUS:CONFIRMED
SUMMARY:
TRANSP:OPAQUE
END:VEVENT
END:VCALENDAR

Attachment: invite.ics
Description: application/ics

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users

Reply via email to