drv_video_init(): simplify logic
[oweals/u-boot.git] / drivers / video / ati_radeon_fb.c
index 351bed0b172ea00fda6df2eee6efad4808d8bc1d..9ebb0b0c965ac388a4adc0d61c06804cd5089404 100644 (file)
@@ -35,8 +35,6 @@
 
 #include <common.h>
 
-#ifdef CONFIG_ATI_RADEON_FB
-
 #include <command.h>
 #include <pci.h>
 #include <asm/processor.h>
@@ -86,6 +84,7 @@
 #define PCI_CHIP_RV280_5961            0x5961
 #define PCI_CHIP_RV280_5962            0x5962
 #define PCI_CHIP_RV280_5964            0x5964
+#define PCI_CHIP_RV280_5C63            0x5C63
 #define PCI_CHIP_RV370_5B60            0x5B60
 #define PCI_CHIP_RV380_5657            0x5657
 #define PCI_CHIP_R420_554d             0x554d
@@ -95,6 +94,7 @@ static struct pci_device_id ati_radeon_pci_ids[] = {
        {PCI_VENDOR_ID_ATI, PCI_CHIP_RV280_5961},
        {PCI_VENDOR_ID_ATI, PCI_CHIP_RV280_5962},
        {PCI_VENDOR_ID_ATI, PCI_CHIP_RV280_5964},
+       {PCI_VENDOR_ID_ATI, PCI_CHIP_RV280_5C63},
        {PCI_VENDOR_ID_ATI, PCI_CHIP_RV370_5B60},
        {PCI_VENDOR_ID_ATI, PCI_CHIP_RV380_5657},
        {PCI_VENDOR_ID_ATI, PCI_CHIP_R420_554d},
@@ -106,6 +106,7 @@ static u16 ati_radeon_id_family_table[][2] = {
        {PCI_CHIP_RV280_5961, CHIP_FAMILY_RV280},
        {PCI_CHIP_RV280_5962, CHIP_FAMILY_RV280},
        {PCI_CHIP_RV280_5964, CHIP_FAMILY_RV280},
+       {PCI_CHIP_RV280_5C63, CHIP_FAMILY_RV280},
        {PCI_CHIP_RV370_5B60, CHIP_FAMILY_RV380},
        {PCI_CHIP_RV380_5657, CHIP_FAMILY_RV380},
        {PCI_CHIP_R420_554d,  CHIP_FAMILY_R420},
@@ -652,7 +653,7 @@ void *video_hw_init(void)
 
        tmp = 0;
 
-       videomode = CFG_DEFAULT_VIDEO_MODE;
+       videomode = CONFIG_SYS_DEFAULT_VIDEO_MODE;
        /* get video mode via environment */
        if ((penv = getenv ("videomode")) != NULL) {
                /* deceide if it is a string */
@@ -671,7 +672,7 @@ void *video_hw_init(void)
                                break;
                }
                if (i == VESA_MODES_COUNT) {
-                       printf ("no VESA Mode found, switching to mode 0x%x ", CFG_DEFAULT_VIDEO_MODE);
+                       printf ("no VESA Mode found, switching to mode 0x%x ", CONFIG_SYS_DEFAULT_VIDEO_MODE);
                        i = 0;
                }
                res_mode = (struct ctfb_res_modes *) &res_mode_init[vesa_modes[i].resindex];
@@ -731,7 +732,7 @@ void *video_hw_init(void)
                break;
        }
 
-       pGD->isaBase = CFG_ISA_IO_BASE_ADDRESS;
+       pGD->isaBase = CONFIG_SYS_ISA_IO_BASE_ADDRESS;
        pGD->pciBase = rinfo->fb_base_phys;
        pGD->frameAdrs = rinfo->fb_base_phys;
        pGD->memSize = 64 * 1024 * 1024;
@@ -774,4 +775,3 @@ void video_set_lut (unsigned int index,     /* color number */
        OUTREG(PALETTE_INDEX, index);
        OUTREG(PALETTE_DATA, (r << 16) | (g << 8) | b);
 }
-#endif