adds support to build uboot for arv452
[openwrt/openwrt.git] / package / uboot-ifxmips / patches / 130-a800.patch
1 Index: u-boot-1.1.5/drivers/ifx_sw.c
2 ===================================================================
3 --- u-boot-1.1.5.orig/drivers/ifx_sw.c 2010-03-24 19:21:19.000000000 +0100
4 +++ u-boot-1.1.5/drivers/ifx_sw.c 2010-03-24 19:23:09.000000000 +0100
5 @@ -118,7 +118,7 @@
6 {
7 struct eth_device *dev;
8 unsigned short chipid;
9 -
10 + int i;
11 #if 0
12 printf("Entered danube_switch_initialize()\n");
13 #endif
14 @@ -130,6 +130,19 @@
15 }
16 memset(dev, 0, sizeof(*dev));
17
18 +#ifdef A800_SWITCH
19 + printf ("bring up a800 switch and leds\n");
20 + *EBU_CON_1 = 0x1e7ff;
21 + *EBU_ADDR_SEL_1 = 0x14000001;
22 +
23 + *((volatile u16*)0xb4000000) = 0x0;
24 + for(i = 0; i < 1000; i++)
25 + udelay(1000);
26 + *((volatile u16*)0xb4000000) = (1 << 10);
27 + *EBU_CON_1 = 0x8001e7ff;
28 +#define CLK_OUT2_25MHZ
29 +#endif
30 +
31 danube_dma_init();
32 danube_init_switch_chip(REV_MII_MODE);
33