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.
{
pcippc2_fpga_init ();
+ pcippc2_cpci3264_init ();
+
#if defined(CONFIG_WATCHDOG)
pcippc2_wdt_init ();
#endif
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)
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);
#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
* 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;
- int delay = msec * 3;
+ int delay = usec * 3;
for (i = 0; i < delay; i ++) gd->bd->bi_arch_number = 145;
}
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.)
*/
- if (rLCDCON1 == 0)
- {
+ if (rLCDCON1 == 0) {
+ extern void init_grid_ctrl(void);
+
rPCCON = (rPCCON & 0xFFFFFF00)| 0x000000AA;
rPDCON = (rPDCON & 0xFFFFFF03)| 0x000000A8;
#if 0
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 */
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:
{
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,
"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" \