Subversion Repositories freemyipod

Rev

Rev 138 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 138 Rev 154
Line 106... Line 106...
106
                norflsh[0x5555] = 0xaa;
106
                norflsh[0x5555] = 0xaa;
107
                norflsh[0x2aaa] = 0x55;
107
                norflsh[0x2aaa] = 0x55;
108
                norflsh[(offset & ~0xfff) >> 1] = 0x30;
108
                norflsh[(offset & ~0xfff) >> 1] = 0x30;
109
                while (norflsh[(offset & ~0xfff) >> 1] != 0xffff);
109
                while (norflsh[(offset & ~0xfff) >> 1] != 0xffff);
110
            }
110
            }
-
 
111
            for (i = 0; i < remainder; i += 2)
-
 
112
                if (norflsh[(offset + i) >> 1] != ((uint16_t*)addr)[i >> 1])
-
 
113
                {
111
            norflsh[0x5555] = 0xaa;
114
                    norflsh[0x5555] = 0xaa;
112
            norflsh[0x2aaa] = 0x55;
115
                    norflsh[0x2aaa] = 0x55;
113
            norflsh[0x5555] = 0xa0;
116
                    norflsh[0x5555] = 0xa0;
114
            norflsh[offset >> 1] = ((uint16_t*)addr)[offset >> 1];
117
                    norflsh[(offset + i) >> 1] = ((uint16_t*)addr)[i >> 1];
115
            while (norflsh[offset >> 1] != ((uint16_t*)addr)[offset >> 1]);
118
                    while (norflsh[(offset + i) >> 1] != ((uint16_t*)addr)[i >> 1]);
-
 
119
                }
116
        }
120
        }
117
        addr = (void*)(((uint32_t)addr) + remainder);
121
        addr = (void*)(((uint32_t)addr) + remainder);
118
        offset += remainder;
122
        offset += remainder;
119
        size -= remainder;
123
        size -= remainder;
120
    }
124
    }