2 * See file CREDITS for list of people who contributed to this
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License as
7 * published by the Free Software Foundation; either version 2 of
8 * the License, or (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
24 #include <asm/processor.h>
27 #define PCI_M66EN 0x10
29 static uchar buf_33[] =
31 0xb5, /* 0x00:hce =1, bss = 0, pae=1, ppdv= 0b10,spe = 1,ebw=0b01*/
32 0x80, /* 0x01~0x03:ptm1ms =0x80000001 */
35 0x00, /* 0x04~0x06:ptm1la = 0x00000000 */
38 0x00, /* 0x07~0x09:ptm2ma = 0x00000000 */
41 0x00, /* 0x0a~0x0c:ptm2la = 0x00000000 */
44 0x10, /* 0x0d~0x0e:vendor id 0x1014*/
46 0x00, /* 0x0f~0x10:device id 0x0000*/
48 0x00, /* 0x11:revision 0x00 */
49 0x00, /* 0x12~0x14:class 0x000000 */
52 0x10, /* 0x15~0x16:subsystem vendor id */
54 0x00, /* 0x17~0x18:subsystem device id */
56 0x61, /* 0x19: opdv=0b01,cbdv=0b10,ccdv=0b00,ptm2ms_ena=0, ptm1ms_ena=1 */
57 0x68, /* 0x1a: rpci=1,fbmul=0b1010,epdv=0b00 */
58 0x2d, /* 0x1b: fwdvb=0b101,fwdva=0b101 */
59 0x82, /* 0x1c: pllr=1,sscs=0,mpdv=0b00,tun[22-23]=0b10 */
60 0xbe, /* 0x1d: tun[24-31]=0xbe */
65 static uchar buf_66[] =
67 0xb5, /* 0x00:hce =1, bss = 0, pae=1, ppdv= 0b10,spe = 1,ebw=0b01*/
68 0x80, /* 0x01~0x03:ptm1ms =0x80000001 */
71 0x00, /* 0x04~0x06:ptm1la = 0x00000000 */
74 0x00, /* 0x07~0x09:ptm2ma = 0x00000000 */
77 0x00, /* 0x0a~0x0c:ptm2la = 0x00000000 */
80 0x10, /* 0x0d~0x0e:vendor id 0x1014*/
82 0x00, /* 0x0f~0x10:device id 0x0000*/
84 0x00, /* 0x11:revision 0x00 */
85 0x00, /* 0x12~0x14:class 0x000000 */
88 0x10, /* 0x15~0x16:subsystem vendor id */
90 0x00, /* 0x17~0x18:subsystem device id */
92 0x61, /* 0x19: opdv=0b01,cbdv=0b10,ccdv=0b00,ptm2ms_ena=0, ptm1ms_ena=1 */
93 0x68, /* 0x1a: rpci=1,fbmul=0b1010,epdv=0b00 */
94 0x2d, /* 0x1b: fwdvb=0b101,fwdva=0b101 */
95 0x82, /* 0x1c: pllr=1,sscs=0,mpdv=0b00,tun[22-23]=0b10 */
96 0xbe, /* 0x1d: tun[24-31]=0xbe */
101 static int update_boot_eeprom(cmd_tbl_t* cmdtp, int flag, int argc, char *argv[])
104 uchar chip = CFG_I2C_EEPROM_ADDR;
109 if ((*(volatile char*)CPLD_REG0_ADDR & PCI_M66EN) != PCI_M66EN) {
117 for (i = 0; i< len; i++, base++) {
118 if (i2c_write(chip, base, 1, &pbuf[i],1)!= 0) {
119 printf("i2c_write fail\n");
129 update_boot_eeprom, 1, 1, update_boot_eeprom,
130 "update_boot_eeprom - update boot eeprom content\n",