Hello Carlos,
Thank you it really helped me.
One and last thing now.
static int proc_phy_registers_show(struct seq_file *seq, void *offset){
struct mv88e6131_port_proc_data *proc_data;
struct dsa_switch *ds;
u8 port;
int i;
u16 reg;
JBXSW_TRC("proc_phy_registers_show\n");
proc_data = seq->private;
ds = proc_data->ds;
port = proc_data->port;
JBXSW_DBG("Dumping Phy Registers for port %d\n", port);
REG_WRITE(REG_GLOBAL, 0x04, 0x0000);
if(port < 8){
for(i=0; i<0x1f; i++){
reg = REG_READ(port, i);
seq_printf(seq, "Reg %2.2x: %4.4x\n", i, reg);
}
}else{
int j;
for(j=0; j < 3; j++){
REG_WRITE(port, 22, j);
reg = REG_READ(port, 22);
seq_printf(seq, "Page: %d\n", reg);
for(i=0; i<0x10; i++){
reg = REG_READ(port, i);
seq_printf(seq, "\tReg %2.2x: %4.4x\n", i, reg);
if(j == 1 && i == 8)
break;
if(j == 2 && i == 0)
break;
}
}
REG_WRITE(port, 22, 2);
reg = REG_READ(port, 22);
seq_printf(seq, "Page: %d\n", reg);
reg = REG_READ(port, 16);
seq_printf(seq, "\tReg %2.2x: %4.4x\n", 22, reg);
}
REG_WRITE(REG_GLOBAL, 0x04, 0x4400);
return 0;
}
This the part i need to change.
Port 22 is in decimal, if you convert to hexadecimal it is 0x16.
Thats is the phy register i need to modify.
Instead of page 2 i need to access page 3 and write 0x80ff to register 16.
Would you be able to help me here.
Regards,
Aditya.