- unsigned int vfd_table[112][18][2][4][2];
- ulong adr;
- unsigned int x, y, color, display, entry, pixel, bit_nr;
-
- /*
- * Create translation table for Noritake-T119C-VFD-specific
- * organized frame-buffer.
- * Created is the number of the bit in the framebuffer (the
- * first transferred pixel of each frame is bit 0).
- */
- for(y=0;y<=17;y++) /* Zeile */
- {
- for(x=0;x<=111;x++) /* Spalten */
- {
- /*Display 0 blaue Pixel Eintrag 1 */
- vfd_table[x][y][0][0][0]=((x%4)*4+y*16+(x/4)*2048);
- /*Display 0 rote Pixel Eintrag 1 */
- vfd_table[x][y][1][0][0]=((x%4)*4+y*16+(x/4)*2048+512);
- if(x<=1)
- {
- /*Display 0 blaue Pixel Eintrag 2 */
- vfd_table[x][y][0][0][1]=(((x+112)%4)*4+y*16+((x+110)/4)*2048+1024);
- /*Display 0 rote Pixel Eintrag 2 */
- vfd_table[x][y][1][0][1]=(((x+112)%4)*4+y*16+((x+110)/4)*2048+512+1024);
- }
- else
- {
- /*Display 0 blaue Pixel Eintrag 2 */
- vfd_table[x][y][0][0][1]=((x%4)*4+y*16+((x-2)/4)*2048+1024);
- /*Display 0 rote Pixel Eintrag 2 */
- vfd_table[x][y][1][0][1]=((x%4)*4+y*16+((x-2)/4)*2048+512+1024);
- }
- /*Display 1 blaue Pixel Eintrag 1 */
- vfd_table[x][y][0][1][0]=((x%4)*4+y*16+(x/4)*2048+1);
- /*Display 1 rote Pixel Eintrag 1 */
- vfd_table[x][y][1][1][0]=((x%4)*4+y*16+(x/4)*2048+512+1);
- if(x<=1)
- {
- /*Display 1 blaue Pixel Eintrag 2 */
- vfd_table[x][y][0][1][1]=(((x+112)%4)*4+y*16+((x+110)/4)*2048+1+1024);
- /*Display 1 rote Pixel Eintrag 2 */
- vfd_table[x][y][1][1][1]=(((x+112)%4)*4+y*16+((x+110)/4)*2048+512+1+1024);
- }
- else
- {
- /*Display 1 blaue Pixel Eintrag 2 */
- vfd_table[x][y][0][1][1]=((x%4)*4+y*16+((x-2)/4)*2048+1+1024);
- /*Display 1 rote Pixel Eintrag 2 */
- vfd_table[x][y][1][1][1]=((x%4)*4+y*16+((x-2)/4)*2048+512+1+1024);
- }
- /*Display 2 blaue Pixel Eintrag 1 */
- vfd_table[x][y][0][2][0]=((x%4)*4+y*16+(x/4)*2048+2);
- /*Display 2 rote Pixel Eintrag 1 */
- vfd_table[x][y][1][2][0]=((x%4)*4+y*16+(x/4)*2048+512+2);
- if(x<=1)
- {
- /*Display 2 blaue Pixel Eintrag 2 */
- vfd_table[x][y][0][2][1]=(((x+112)%4)*4+y*16+((x+110)/4)*2048+2+1024);
- /*Display 2 rote Pixel Eintrag 2 */
- vfd_table[x][y][1][2][1]=(((x+112)%4)*4+y*16+((x+110)/4)*2048+512+2+1024);
- }
- else
- {
- /*Display 2 blaue Pixel Eintrag 2 */
- vfd_table[x][y][0][2][1]=((x%4)*4+y*16+((x-2)/4)*2048+2+1024);
- /*Display 2 rote Pixel Eintrag 2 */
- vfd_table[x][y][1][2][1]=((x%4)*4+y*16+((x-2)/4)*2048+512+2+1024);
- }
- /*Display 3 blaue Pixel Eintrag 1 */
- vfd_table[x][y][0][3][0]=((x%4)*4+y*16+(x/4)*2048+3);
- /*Display 3 rote Pixel Eintrag 1 */
- vfd_table[x][y][1][3][0]=((x%4)*4+y*16+(x/4)*2048+512+3);
- if(x<=1)
- {
- /*Display 3 blaue Pixel Eintrag 2 */
- vfd_table[x][y][0][3][1]=(((x+112)%4)*4+y*16+((x+110)/4)*2048+3+1024);
- /*Display 3 rote Pixel Eintrag 2 */
- vfd_table[x][y][1][3][1]=(((x+112)%4)*4+y*16+((x+110)/4)*2048+512+3+1024);
- }
- else
- {
- /*Display 3 blaue Pixel Eintrag 2 */
- vfd_table[x][y][0][3][1]=((x%4)*4+y*16+((x-2)/4)*2048+3+1024);
- /*Display 3 rote Pixel Eintrag 2 */
- vfd_table[x][y][1][3][1]=((x%4)*4+y*16+((x-2)/4)*2048+512+3+1024);
- }
+ DECLARE_GLOBAL_DATA_PTR;
+ unsigned long vfd_table[112][18][2][4][2];
+ unsigned int x, y, color, display, entry, pixel;
+ unsigned int x_abcdef = 0;
+
+ switch (gd->vfd_type) {
+ case VFD_TYPE_T119C:
+ for(y=0; y<=17; y++) { /* Line */
+ for(x=0; x<=111; x++) { /* Column */
+ for(display=0; display <=3; display++) {
+
+ /* Display 0 blue pixels */
+ vfd_table[x][y][0][display][0] =
+ (x==0) ? y*16+display
+ : (x%4)*4+y*16+((x-1)/2)*1024+display;
+ /* Display 0 red pixels */
+ vfd_table[x][y][1][display][0] =
+ (x==0) ? y*16+512+display
+ : (x%4)*4+y*16+((x-1)/2)*1024+512+display;
+ }