mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-10 12:57:06 +09:00
1,ddr阻抗匹配设置;2,FPGA IO引起锐合小板开机死机;3,gensor修改
This commit is contained in:
@@ -1208,28 +1208,6 @@ static void __tcmfunc SDRAM_BeforeUpdateFreq(uint32 SDRAMnewKHz, uint32 DDRnewKH
|
||||
//WAIT_ME();
|
||||
while(!(pDDR_Reg->CTRL_REG_03 & 0x100));
|
||||
pDDR_Reg->CTRL_REG_10 &= ~(0x1);
|
||||
if(memType == DDRII)
|
||||
{
|
||||
if(333000 < KHz)
|
||||
{
|
||||
pDDR_Reg->CTRL_REG_82 = 0x00885555;
|
||||
}
|
||||
else
|
||||
{
|
||||
pDDR_Reg->CTRL_REG_82 = 0x00685555;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(133000 < KHz)
|
||||
{
|
||||
pDDR_Reg->CTRL_REG_82 = 0x00840000;
|
||||
}
|
||||
else
|
||||
{
|
||||
pDDR_Reg->CTRL_REG_82 = 0x00640000;
|
||||
}
|
||||
}
|
||||
if(110000 > KHz)
|
||||
{
|
||||
DLLBypass(KHz);
|
||||
@@ -1506,14 +1484,12 @@ static void SDRAM_DDR_Init(void)
|
||||
telement = 0;
|
||||
if(memType == DDRII)
|
||||
{
|
||||
pDDR_Reg->CTRL_REG_82 = 0x00685555;
|
||||
//tXSR = tXSRD = 200 tCK
|
||||
//tXSR = tXSRD = 200 tCK
|
||||
pDDR_Reg->CTRL_REG_67 = TXSR(200);
|
||||
}
|
||||
else
|
||||
{
|
||||
pDDR_Reg->CTRL_REG_11 = 0x101;
|
||||
pDDR_Reg->CTRL_REG_82 = 0x00640000;
|
||||
}
|
||||
/* 20100609,HSL@RK,disable ddr interrupt .*/
|
||||
pDDR_Reg->CTRL_REG_45 = 0x07ff03ff;
|
||||
|
||||
@@ -659,9 +659,9 @@ int spi_gpio_init_first(void)
|
||||
spi_gpio_set_pindirection(SPI_GPIO_P2_10, SPI_GPIO_IN); //X-XL input
|
||||
spi_gpio_set_pindirection(SPI_GPIO_P2_11, SPI_GPIO_IN); //X+XR input
|
||||
|
||||
spi_gpio_set_pinlevel(SPI_GPIO_P2_12, SPI_GPIO_LOW); //LCD_RESET output//
|
||||
spi_gpio_set_pinlevel(SPI_GPIO_P2_12, SPI_GPIO_HIGH); //LCD_RESET output//
|
||||
spi_gpio_set_pindirection(SPI_GPIO_P2_12, SPI_GPIO_OUT);
|
||||
spi_gpio_set_pinlevel(SPI_GPIO_P2_12, SPI_GPIO_HIGH);
|
||||
//spi_gpio_set_pinlevel(SPI_GPIO_P2_12, SPI_GPIO_HIGH);
|
||||
spi_gpio_set_pinlevel(SPI_GPIO_P2_13, SPI_GPIO_HIGH); //USB_PWR_EN output
|
||||
spi_gpio_set_pindirection(SPI_GPIO_P2_13, SPI_GPIO_OUT);
|
||||
spi_gpio_set_pinlevel(SPI_GPIO_P2_14, SPI_GPIO_LOW); //WL_HOST_WAKE_B output
|
||||
|
||||
@@ -247,8 +247,8 @@ static int mma7660_get_data(void)
|
||||
axis.y = -mma7660_convert_to_int(buffer[MMA7660_REG_Y_OUT]);
|
||||
axis.z = -mma7660_convert_to_int(buffer[MMA7660_REG_Z_OUT]);
|
||||
|
||||
rk28printk( "%s: -------------------------------------------mma7660_GetData axis = %d %d %d-----------------------------------------------\n",
|
||||
__func__, axis.x, axis.y, axis.z);
|
||||
//rk28printk( "%s: ------------------mma7660_GetData axis = %d %d %d--------------\n",
|
||||
// __func__, axis.x, axis.y, axis.z);
|
||||
|
||||
memcpy(sense_data, &axis, sizeof(axis));
|
||||
mma7660_report_value(sense_data);
|
||||
@@ -354,7 +354,7 @@ static void mma7660_delaywork_func(struct work_struct *work)
|
||||
if (mma7660_get_data() < 0)
|
||||
rk28printk(KERN_ERR "MMA7660 mma_work_func: Get data failed\n");
|
||||
enable_irq(this_client->irq);
|
||||
rk28printk("---------------------------------------mma7660_delaywork_func------------------------------\n");
|
||||
//rk28printk("---------------------------------------mma7660_delaywork_func------------------------------\n");
|
||||
|
||||
}
|
||||
|
||||
@@ -363,7 +363,7 @@ static irqreturn_t mma7660_interrupt(int irq, void *dev_id)
|
||||
struct mma7660_data *data = dev_id;
|
||||
disable_irq_nosync(this_client->irq);
|
||||
schedule_delayed_work(&data->delaywork,msecs_to_jiffies(30));
|
||||
rk28printk("--------------------------------------mma7660_interrupt---------------------------------------\n");
|
||||
//rk28printk("--------------------------------------mma7660_interrupt---------------------------------------\n");
|
||||
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
@@ -377,7 +377,7 @@ static struct file_operations mma7660_fops = {
|
||||
|
||||
static struct miscdevice mma7660_device = {
|
||||
.minor = MISC_DYNAMIC_MINOR,
|
||||
.name = "mma7660_daemon",
|
||||
.name = "gsensor",//"mma7660_daemon",
|
||||
.fops = &mma7660_fops,
|
||||
};
|
||||
|
||||
@@ -549,7 +549,7 @@ static int mma7660_probe(struct i2c_client *client, const struct i2c_device_id
|
||||
#endif
|
||||
rk28printk(KERN_INFO "mma7660 probe ok\n");
|
||||
mma->status = -1;
|
||||
mma7660_start(MMA7660_RATE_32);
|
||||
//mma7660_start(MMA7660_RATE_32);
|
||||
return 0;
|
||||
|
||||
exit_gsensor_sysfs_init_failed:
|
||||
|
||||
Reference in New Issue
Block a user