Commit 7e571668 authored by Benoit Rat's avatar Benoit Rat

userspace: hack to enable v3.3 lx240t scb on v3.2 miniBP.

undocumented hack to enable v3.3 lx240t scb on v3.2 miniBP only by
creating an empty file named /wr/etc/lx240t.conf. This is only
needed for v3.2 miniBP because they do not have the i2c chip and its
DIP switch to setup version.
parent b08fbb30
......@@ -136,13 +136,17 @@ uint8_t shw_get_fpga_type()
{
struct i2c_bus *bus= &i2c_io_bus;
if(bus && bus->scan(bus,I2C_SCB_VER_ADDR))
{
//The 0b00000001 bit is used for FPGA type
if(wrswhw_pca9554_get_input(bus,I2C_SCB_VER_ADDR) & 0x1)
return SHW_FPGA_LX240T;
}
return SHW_FPGA_LX130T;
if(bus && bus->scan(bus,I2C_SCB_VER_ADDR))
{
//The 0b00000001 bit is used for FPGA type
if(wrswhw_pca9554_get_input(bus,I2C_SCB_VER_ADDR) & 0x1)
return SHW_FPGA_LX240T;
else
return SHW_FPGA_LX130T;
}
//HACK: Check if file exists. This enable v3.2 miniBP and v3.3 SCB with LX240T
if(access("/wr/etc/lx240t.conf", F_OK) == 0) return SHW_FPGA_LX240T;
return SHW_FPGA_LX130T;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment