2
* SPDX-License-Identifier: GPL-2.0+
8
#include <asm/processor.h>
11
#define PCI_M66EN 0x10
13
static uchar buf_33[] =
15
0xb5, /* 0x00:hce =1, bss = 0, pae=1, ppdv= 0b10,spe = 1,ebw=0b01*/
16
0x80, /* 0x01~0x03:ptm1ms =0x80000001 */
19
0x00, /* 0x04~0x06:ptm1la = 0x00000000 */
22
0x00, /* 0x07~0x09:ptm2ma = 0x00000000 */
25
0x00, /* 0x0a~0x0c:ptm2la = 0x00000000 */
28
0x10, /* 0x0d~0x0e:vendor id 0x1014*/
30
0x00, /* 0x0f~0x10:device id 0x0000*/
32
0x00, /* 0x11:revision 0x00 */
33
0x00, /* 0x12~0x14:class 0x000000 */
36
0x10, /* 0x15~0x16:subsystem vendor id */
38
0x00, /* 0x17~0x18:subsystem device id */
40
0x61, /* 0x19: opdv=0b01,cbdv=0b10,ccdv=0b00,ptm2ms_ena=0, ptm1ms_ena=1 */
41
0x68, /* 0x1a: rpci=1,fbmul=0b1010,epdv=0b00 */
42
0x2d, /* 0x1b: fwdvb=0b101,fwdva=0b101 */
43
0x82, /* 0x1c: pllr=1,sscs=0,mpdv=0b00,tun[22-23]=0b10 */
44
0xbe, /* 0x1d: tun[24-31]=0xbe */
49
static uchar buf_66[] =
51
0xb5, /* 0x00:hce =1, bss = 0, pae=1, ppdv= 0b10,spe = 1,ebw=0b01*/
52
0x80, /* 0x01~0x03:ptm1ms =0x80000001 */
55
0x00, /* 0x04~0x06:ptm1la = 0x00000000 */
58
0x00, /* 0x07~0x09:ptm2ma = 0x00000000 */
61
0x00, /* 0x0a~0x0c:ptm2la = 0x00000000 */
64
0x10, /* 0x0d~0x0e:vendor id 0x1014*/
66
0x00, /* 0x0f~0x10:device id 0x0000*/
68
0x00, /* 0x11:revision 0x00 */
69
0x00, /* 0x12~0x14:class 0x000000 */
72
0x10, /* 0x15~0x16:subsystem vendor id */
74
0x00, /* 0x17~0x18:subsystem device id */
76
0x61, /* 0x19: opdv=0b01,cbdv=0b10,ccdv=0b00,ptm2ms_ena=0, ptm1ms_ena=1 */
77
0x68, /* 0x1a: rpci=1,fbmul=0b1010,epdv=0b00 */
78
0x2d, /* 0x1b: fwdvb=0b101,fwdva=0b101 */
79
0x82, /* 0x1c: pllr=1,sscs=0,mpdv=0b00,tun[22-23]=0b10 */
80
0xbe, /* 0x1d: tun[24-31]=0xbe */
85
static int update_boot_eeprom(cmd_tbl_t* cmdtp, int flag, int argc, char * const argv[])
88
uchar chip = CONFIG_SYS_I2C_EEPROM_ADDR;
93
if ((*(volatile char*)CPLD_REG0_ADDR & PCI_M66EN) != PCI_M66EN) {
101
for (i = 0; i< len; i++, base++) {
102
if (i2c_write(chip, base, 1, &pbuf[i],1)!= 0) {
103
printf("i2c_write fail\n");
113
update_boot_eeprom, 1, 1, update_boot_eeprom,
114
"update boot eeprom content",