Merge branch 'org.openembedded.dev' of git://git.openembedded.net/openembedded into...
[vuplus_openembedded] / packages / linux / linux-dm8000 / linux-2.6.12-dream-temp.patch
1 Index: stblinux-2.6.12/arch/mips/kernel/vmlinux.lds.S
2 ===================================================================
3 --- stblinux-2.6.12.orig/arch/mips/kernel/vmlinux.lds.S 2008-01-16 23:52:20.000000000 +0100
4 +++ stblinux-2.6.12/arch/mips/kernel/vmlinux.lds.S      2008-01-16 23:52:22.000000000 +0100
5 @@ -145,8 +145,8 @@
6      . = ALIGN(4096);
7    __initramfs_start = .;
8    .init.ramfs : { *(.init.ramfs) }
9 -    . = ALIGN(4096);
10    __initramfs_end = .;
11 +    . = ALIGN(4096);
12  
13    __bss_start = .;             /* BSS */
14    .sbss      : {
15 Index: stblinux-2.6.12/drivers/net/brcmint7038/bcmemac.c
16 ===================================================================
17 --- stblinux-2.6.12.orig/drivers/net/brcmint7038/bcmemac.c      2008-01-16 23:52:20.000000000 +0100
18 +++ stblinux-2.6.12/drivers/net/brcmint7038/bcmemac.c   2008-01-16 23:52:13.000000000 +0100
19 @@ -2978,99 +2978,10 @@
20  
21  static void bcmemac_getMacAddr(struct net_device* dev)
22  {
23 -       uint8 flash_eaddr[ETH_ALEN];
24 -       void *virtAddr;
25 -       uint16 word;
26 -       int i;
27 -
28 -#if !defined( CONFIG_BRCM_PCI_SLAVE) && !defined( CONFIG_MTD_BRCMNAND )
29 -#if 1
30 -       virtAddr = (void*)FLASH_MACADDR_ADDR;
31 -#else
32 -       //virtAddr = (void*) 0xBDFFF824; /* BCM97110 in-flash Ethernet MAC address */
33 -       virtAddr = (void*) KSEG1ADDR(getPhysFlashBase() + FLASH_MACADDR_OFFSET); 
34 -#endif
35 -
36 -          /* It is a common problem that the flash and/or Chip Select are
37 -        * not initialized properly, so leave this printk on
38 -        */
39 -       printk("%s: Reading MAC address from %08lX, FLASH_BASE=%08lx\n", 
40 -               dev->name,(uint32) virtAddr, (unsigned long) 0xA0000000L|getPhysFlashBase());
41 -
42 -       word=0;
43 -       word=readw(virtAddr);
44 -       flash_eaddr[0]=(uint8) (word & 0x00FF);
45 -       flash_eaddr[1]=(uint8) ((word & 0xFF00) >> 8);
46 -       word=readw(virtAddr+2);
47 -       flash_eaddr[2]=(uint8) (word & 0x00FF);
48 -       flash_eaddr[3]=(uint8) ((word & 0xFF00) >> 8);
49 -       word=readw(virtAddr+4);
50 -       flash_eaddr[4]=(uint8) (word & 0x00FF);
51 -       flash_eaddr[5]=(uint8) ((word & 0xFF00) >> 8);
52 -
53 -       printk("%s: MAC address %02X:%02X:%02X:%02X:%02X:%02X fetched from addr %lX\n",
54 -               dev->name,
55 -               flash_eaddr[0],flash_eaddr[1],flash_eaddr[2],
56 -               flash_eaddr[3],flash_eaddr[4],flash_eaddr[5],
57 -               (uint32) virtAddr);
58 -
59 -#elif defined( CONFIG_MTD_BRCMNAND )
60 -{
61 -       extern int gNumHwAddrs;
62 -       extern unsigned char* gHwAddrs[];
63 -       
64 -       if (gNumHwAddrs >= 1) {
65 -               for (i=0; i < 6; i++) {
66 -                       flash_eaddr[i] = (uint8) gHwAddrs[0][i];
67 -               }
68 -
69 -               printk("%s: MAC address %02X:%02X:%02X:%02X:%02X:%02X fetched from bootloader\n",
70 -                       dev->name,
71 -                       flash_eaddr[0],flash_eaddr[1],flash_eaddr[2],
72 -                       flash_eaddr[3],flash_eaddr[4],flash_eaddr[5]
73 -                       );
74 -       }
75 -       else {
76 -               printk(KERN_ERR "%s: No MAC addresses defined\n", __FUNCTION__);
77 -       }
78 -}
79 +               /* we rip the address set by the bootloader */
80 +       unsigned long addr[2] = { be32_to_cpu(*(unsigned int*)0xB008005C), be32_to_cpu(*(unsigned int*)0xB0080058)};
81  
82 -#else 
83 -/* PCI slave cannot access the EBI bus, 
84 - * and for now, same for NAND flash, until CFE supports it
85 - */
86 -/* Use hard coded value if Flash not properly initialized */
87 -       //if ((*flash_eaddr & 0xff) == 0xff)
88 -       {
89 -//#ifdef USE_HARDCODED_MACADDR
90 -               flash_eaddr[0] = 0x00;
91 -               flash_eaddr[1] = 0xc0;
92 -               flash_eaddr[2] = 0xa8;
93 -               flash_eaddr[3] = 0x74;
94 -               flash_eaddr[4] = 0x3b;
95 -               flash_eaddr[5] = 0x51;
96 -               printk("%s: Default MAC address %02X:%02X:%02X:%02X:%02X:%02X used\n",
97 -                       dev->name,
98 -                       flash_eaddr[0],flash_eaddr[1],flash_eaddr[2],
99 -                       flash_eaddr[3],flash_eaddr[4],flash_eaddr[5]);
100 -//#else
101 -//                     printk("%s: Cannot read EMAC address from flash.  Please run EVAL codes\n", CARDNAME);
102 -//                     return -ENODEV;
103 -//#endif
104 -       }
105 -#endif
106 -
107 -        /* fill in the MAC address */
108 -        for (i = 0; i < 6; i++) {
109 -            dev->dev_addr[i] = flash_eaddr[i];
110 -        }
111 -
112 -        /* print the Ethenet address */
113 -        printk("%s: MAC Address: ", dev->name);
114 -        for (i = 0; i < 5; i++) {
115 -            printk("%2.2X:", dev->dev_addr[i]);
116 -        }
117 -        printk("%2.2X\n", dev->dev_addr[i]);
118 +       memcpy(dev->dev_addr, ((unsigned char*)addr)+2, 6);
119  }
120  
121  
122 Index: stblinux-2.6.12/arch/mips/brcmstb/common/setup.c
123 ===================================================================
124 --- stblinux-2.6.12.orig/arch/mips/brcmstb/common/setup.c       2008-01-16 23:53:24.000000000 +0100
125 +++ stblinux-2.6.12/arch/mips/brcmstb/common/setup.c    2008-01-16 23:54:06.000000000 +0100
126 @@ -136,13 +136,13 @@
127  
128  static void brcm_machine_halt(void)
129  {
130 -       printk("Broadcom eval board halted.\n");
131 +       printk("Halted.\n");
132         while (1);
133  }
134  
135  static void brcm_machine_power_off(void)
136  {
137 -       printk("Broadcom eval board halted. Please turn off power.\n");
138 +       printk("Halted. Please turn off power.\n");
139         while (1);
140  }
141