]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
Patch by Guillaume Alexandre,, 04 Nov 2002:
authorwdenk <wdenk>
Mon, 4 Nov 2002 16:02:40 +0000 (16:02 +0000)
committerwdenk <wdenk>
Mon, 4 Nov 2002 16:02:40 +0000 (16:02 +0000)
Improve PCI access on 32-bits Compact PCI bus

Adjust VFD initialization on TRAB

Cleanup RRvision video code

CHANGELOG
board/pcippc2/pcippc2.c
board/pcippc2/pcippc2.h
board/pcippc2/pcippc2_fpga.h
board/trab/trab.c
common/cmd_vfd.c
cpu/mpc8xx/video.c
include/configs/trab.h

index 8cf309db18fc5dd05ce11d898929c7c955e4e382..d6055f32d56bf4da609baa5895f320277050d0e7 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -2,6 +2,9 @@
 Changes since for U-Boot 0.1.0:
 ======================================================================
 
 Changes since for U-Boot 0.1.0:
 ======================================================================
 
+* Patch by Guillaume Alexandre,, 04 Nov 2002:
+  Improve PCI access on 32-bits Compact PCI bus
+
 * Fix mdelay() on TRAB - this was still the debugging version with
   seconds instead of ms.
 
 * Fix mdelay() on TRAB - this was still the debugging version with
   seconds instead of ms.
 
index e1b065b0cedbd21795d223f2a60dab67b2ea7804..80ca40250c27f4b7fcc0cb554f88c0901553270e 100644 (file)
@@ -117,6 +117,8 @@ int misc_init_r (void)
 {
        pcippc2_fpga_init ();
 
 {
        pcippc2_fpga_init ();
 
+       pcippc2_cpci3264_init ();
+
 #if defined(CONFIG_WATCHDOG)
        pcippc2_wdt_init ();
 #endif
 #if defined(CONFIG_WATCHDOG)
        pcippc2_wdt_init ();
 #endif
@@ -147,6 +149,25 @@ void doc_init (void)
        doc_probe (pcippc2_fpga1_phys + HW_FPGA1_DOC);
 }
 
        doc_probe (pcippc2_fpga1_phys + HW_FPGA1_DOC);
 }
 
+void pcippc2_cpci3264_init (void)
+{
+  pci_dev_t            bdf = pci_find_device(FPGA_VENDOR_ID, FPGA_DEVICE_ID, 0);
+
+  if (bdf == -1)
+  {
+    puts("Unable to find FPGA !\n");
+    hang();
+  }
+
+       if((in32(pcippc2_fpga0_phys + HW_FPGA0_BOARD) & 0x01000000) == 0x01000000)
+       /* 32-bits Compact PCI bus - LSB bit */
+       {
+               iobarrier_rw();
+               out32(BRIDGE(CPCI, PCIDG), 0x40000000); /* 32-bits bridge, Pipeline */
+               iobarrier_rw();
+       }
+}
+
 #if defined(CONFIG_WATCHDOG)
 
 void pcippc2_wdt_init (void)
 #if defined(CONFIG_WATCHDOG)
 
 void pcippc2_wdt_init (void)
index 6e9e2ff05e79cccd4fdbec048570cbda66b847b2..3820bbec61851d61918fdca968e96929db2f9c4c 100644 (file)
@@ -40,6 +40,8 @@ extern u32    pcippc2_sdram_size              (void);
 
 extern void    pcippc2_fpga_init               (void);
 
 
 extern void    pcippc2_fpga_init               (void);
 
+extern void    pcippc2_cpci3264_init   (void);
+
 extern void    cpc710_pci_init                 (void);
 extern void    cpc710_pci_enable_timeout       (void);
 
 extern void    cpc710_pci_init                 (void);
 extern void    cpc710_pci_enable_timeout       (void);
 
index b6206a451e400bcd75da7c6bd43a62606179b194..850c33197314a45b5947ee21ad56e6730e409b29 100644 (file)
@@ -28,6 +28,7 @@
 #define FPGA_DEVICE_ID                 0x000d
 
 #define HW_FPGA0_INT                   0x0000
 #define FPGA_DEVICE_ID                 0x000d
 
 #define HW_FPGA0_INT                   0x0000
+#define HW_FPGA0_BOARD         0x0060
 #define HW_FPGA0_UART1                 0x0080
 #define HW_FPGA0_UART2                 0x0100
 #define HW_FPGA0_RTC                   0x2000
 #define HW_FPGA0_UART1                 0x0080
 #define HW_FPGA0_UART2                 0x0100
 #define HW_FPGA0_RTC                   0x2000
index b4ab32936798313b4fb0cc0c21591ceff90aa6df..6a758b2398d0930732a9b7f1749a34271eb05385 100644 (file)
@@ -42,13 +42,13 @@ extern int do_mdm_init; /* defined in common/main.c */
  * is that timers are not available yet, so we use a manually timed
  * loop.
  */
  * is that timers are not available yet, so we use a manually timed
  * loop.
  */
-#define KBD_MDELAY     1000
-static void mdelay_no_timer (int msec)
+#define KBD_MDELAY     5000
+static void udelay_no_timer (int usec)
 {
        DECLARE_GLOBAL_DATA_PTR;
 
        int i;
 {
        DECLARE_GLOBAL_DATA_PTR;
 
        int i;
-       int delay = msec * 3;
+       int delay = usec * 3;
 
        for (i = 0; i < delay; i ++) gd->bd->bi_arch_number = 145;
 }
 
        for (i = 0; i < delay; i ++) gd->bd->bi_arch_number = 145;
 }
@@ -102,12 +102,12 @@ int board_init ()
        gd->bd->bi_boot_params = 0x0c000100;
 
 #ifdef CONFIG_MODEM_SUPPORT
        gd->bd->bi_boot_params = 0x0c000100;
 
 #ifdef CONFIG_MODEM_SUPPORT
-       /* This stuff is needed to get interrupts on stop-position
-        * contact events.
+       /* This stuff is needed by the CPLD to read keyboard data.
         * (Copied from the LCD initialization routine.)
         */
         * (Copied from the LCD initialization routine.)
         */
-       if (rLCDCON1 == 0)
-       {
+       if (rLCDCON1 == 0) {
+               extern void init_grid_ctrl(void);
+
                rPCCON = (rPCCON & 0xFFFFFF00)| 0x000000AA;
                rPDCON = (rPDCON & 0xFFFFFF03)| 0x000000A8;
 #if 0
                rPCCON = (rPCCON & 0xFFFFFF00)| 0x000000AA;
                rPDCON = (rPDCON & 0xFFFFFF03)| 0x000000A8;
 #if 0
@@ -118,9 +118,11 @@ int board_init ()
                rLCDCON4 = 0x00000001;
                rLCDCON5 = 0x00000440;
                rLCDCON1 = 0x00000B75;
                rLCDCON4 = 0x00000001;
                rLCDCON5 = 0x00000440;
                rLCDCON1 = 0x00000B75;
+
+               init_grid_ctrl();
        }
 
        }
 
-       mdelay_no_timer (KBD_MDELAY);
+       udelay_no_timer (KBD_MDELAY);
 
        if (key_pressed()) {
                disable_putc(); /* modem doesn't understand banner etc */
 
        if (key_pressed()) {
                disable_putc(); /* modem doesn't understand banner etc */
index d2c63d6e9cd36327d514a549debde50639ebb218..49df56c9f04875befbfc88c7d415a0ff4f78a9cd 100644 (file)
@@ -72,7 +72,7 @@ int trab_vfd (ulong bitmap)
                        return 0;
                case VFD_REMOTE_LOGO_BMPNR:
                        transfer_pic(1, &vfd_remote_logo_bitmap[0],
                        return 0;
                case VFD_REMOTE_LOGO_BMPNR:
                        transfer_pic(1, &vfd_remote_logo_bitmap[0],
-                               VFD_TEST_LOGO_HEIGHT, VFD_TEST_LOGO_WIDTH);
+                               VFD_REMOTE_LOGO_HEIGHT, VFD_REMOTE_LOGO_WIDTH);
                        return 0;
 #endif
                default:
                        return 0;
 #endif
                default:
index 10ec6f779d84c45a48d262d5d825ad47f7ef5f95..9db69e1e195c450b1c312382f18b4f818d989ad1 100644 (file)
@@ -835,14 +835,6 @@ static void video_ctrl_init (void *memptr)
        {
                volatile immap_t *immr = (immap_t *) CFG_IMMR;
 
        {
                volatile immap_t *immr = (immap_t *) CFG_IMMR;
 
-               debug ("[RRvision] PD3 -> clk output: ");
-               immr->im_ioport.iop_pdpar |=   0x1000 ;
-#if 0  /* This is supposed to be an output XXX XXX */
-               immr->im_ioport.iop_pddir |=   0x1000 ;
-#else
-               immr->im_ioport.iop_pddir &= ~(0x1000);
-#endif
-               udelay (1000);
                debug ("PDPAR=%04X PDDIR=%04X PDDAT=%04X\n",
                        immr->im_ioport.iop_pdpar,
                        immr->im_ioport.iop_pddir,
                debug ("PDPAR=%04X PDDIR=%04X PDDAT=%04X\n",
                        immr->im_ioport.iop_pdpar,
                        immr->im_ioport.iop_pddir,
index 4472087e10a5e8f7c99d1e34cc59070e8fc909c2..b7a27c692313ee0006771afd80fc483ac1b48811 100644 (file)
                "ip=$(ipaddr):$(serverip):$(gatewayip):$(netmask):$(hostname)::off\0" \
        "add_misc=setenv bootargs $(bootargs) console=ttyS0 panic=1\0" \
        "load=tftp 0xC100000 /tftpboot/TRAB/u-boot.bin\0" \
                "ip=$(ipaddr):$(serverip):$(gatewayip):$(netmask):$(hostname)::off\0" \
        "add_misc=setenv bootargs $(bootargs) console=ttyS0 panic=1\0" \
        "load=tftp 0xC100000 /tftpboot/TRAB/u-boot.bin\0" \
-       "update=protect off 1:0-7;era 1:0-7;cp.b 0xc100000 0 $(filesize);" \
+       "update=protect off 1:0-8;era 1:0-8;cp.b 0xc100000 0 $(filesize);" \
                "setenv filesize;saveenv\0" \
        "loadfile=/tftpboot/TRAB/pImage\0" \
        "loadaddr=c400000\0" \
                "setenv filesize;saveenv\0" \
        "loadfile=/tftpboot/TRAB/pImage\0" \
        "loadaddr=c400000\0" \