[MIPS] u-boot.lds: Cleanup __u_boot_cmd_{start,end}
[oweals/u-boot.git] / drivers / smiLynxEM.c
index 26469e2a38aa5c3b0281aa435e41de54ee37ef7a..20f9beb0172ad6809d471201a7077f0165bec864 100644 (file)
@@ -129,7 +129,7 @@ static char SMI_SCR[] = {
 };
 static char SMI_EXT_CRT[] = {
        0x31, 0x00, 0x32, 0x00, 0x33, 0x00, 0x34, 0x00, 0x35, 0x00,
-       0x36, 0x00, 0x3b, 0x00, 0x3c, 0x00, 0x3d, 0x00, 0x3e, 0x00, 0x3f, 0x00
+       0x36, 0x00, 0x3b, 0x00, 0x3c, 0x00, 0x3d, 0x00, 0x3e, 0x00, 0x3f, 0x00,
 };
 static char SMI_ATTR [] = {
        0x00, 0x00, 0x01, 0x01, 0x02, 0x02, 0x03, 0x03, 0x04, 0x04, 0x05, 0x05,
@@ -139,21 +139,24 @@ static char SMI_ATTR [] = {
 };
 static char SMI_GCR[18] = {
        0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x03, 0x00, 0x04, 0x00, 0x05, 0x40,
-       0x06, 0x05, 0x07, 0x0f, 0x08, 0xff
+       0x06, 0x05, 0x07, 0x0f, 0x08, 0xff,
 };
 static char SMI_SEQR[] = {
-       0x00, 0x00, 0x01, 0x01, 0x02, 0x0f, 0x03, 0x03, 0x04, 0x0e, 0x00, 0x03
+       0x00, 0x00, 0x01, 0x01, 0x02, 0x0f, 0x03, 0x03, 0x04, 0x0e, 0x00, 0x03,
 };
 static char SMI_PCR [] = {
-       0x20, 0x04, 0x21, 0x30, 0x22, 0x00, 0x23, 0x00, 0x24, 0x00
+       0x20, 0x04, 0x21, 0x30, 0x22, 0x00, 0x23, 0x00, 0x24, 0x00,
 };
 static char SMI_MCR[] = {
        0x60, 0x01, 0x61, 0x00,
+#ifdef CONFIG_HMI1001
+       0x62, 0x74, /* Memory type is not configured by pins on HMI1001 */
+#endif
 };
 
 static char SMI_HCR[] = {
        0x80, 0xff, 0x81, 0x07, 0x82, 0x00, 0x83, 0xff, 0x84, 0xff, 0x88, 0x00,
-       0x89, 0x02, 0x8a, 0x80, 0x8b, 0x01, 0x8c, 0xff, 0x8d, 0x00
+       0x89, 0x02, 0x8a, 0x80, 0x8b, 0x01, 0x8c, 0xff, 0x8d, 0x00,
 };
 
 
@@ -522,7 +525,8 @@ static unsigned int FindPQ (unsigned int freq, unsigned int *pp, unsigned int *p
 /*****************************************************************************/
 static void smiLoadCcr (struct ctfb_res_modes *var, unsigned short device_id)
 {
-       unsigned int p, q;
+       unsigned int p = 0;
+       unsigned int q = 0;
        long long freq;
        register GraphicDevice *pGD  = (GraphicDevice *)&smi;
 
@@ -550,7 +554,7 @@ static void smiLoadCcr (struct ctfb_res_modes *var, unsigned short device_id)
        smiWrite (SMI_INDX_C4, 0x6b, 0x15);
 
        /* VCLK */
-       freq = 1000000000000L / var -> pixclock;
+       freq = 1000000000000LL / var -> pixclock;
 
        FindPQ ((unsigned int)freq, &p, &q);