1,ddr阻抗匹配设置;2,FPGA IO引起锐合小板开机死机;3,gensor修改
author邓训金 <dxj@rock-chips.com>
Thu, 26 Aug 2010 12:00:57 +0000 (20:00 +0800)
committer邓训金 <dxj@rock-chips.com>
Thu, 26 Aug 2010 12:01:35 +0000 (20:01 +0800)
arch/arm/mach-rk2818/ddr.c
drivers/fpga/spi_gpio.c
drivers/input/gsensor/mma7660.c

index 1a81d88f76dbcdffc731b0ef50cf41905186023a..37c6179a3802eddf190d9a58529311f197c04992 100644 (file)
@@ -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; 
index 55675e9f2455069f1ad9ca5cd8350e7e09741872..3de99afff7ee2c7f93cb2b2a890f5e242afd3ff9 100755 (executable)
@@ -659,9 +659,9 @@ int spi_gpio_init_first(void)
        spi_gpio_set_pindirection(SPI_GPIO_P2_10, SPI_GPIO_IN);         //X-XL input\r
        spi_gpio_set_pindirection(SPI_GPIO_P2_11, SPI_GPIO_IN);         //X+XR input\r
        \r
-       spi_gpio_set_pinlevel(SPI_GPIO_P2_12, SPI_GPIO_LOW);            //LCD_RESET output//\r
+       spi_gpio_set_pinlevel(SPI_GPIO_P2_12, SPI_GPIO_HIGH);           //LCD_RESET output//\r
        spi_gpio_set_pindirection(SPI_GPIO_P2_12, SPI_GPIO_OUT);\r
-       spi_gpio_set_pinlevel(SPI_GPIO_P2_12, SPI_GPIO_HIGH);\r
+       //spi_gpio_set_pinlevel(SPI_GPIO_P2_12, SPI_GPIO_HIGH);\r
        spi_gpio_set_pinlevel(SPI_GPIO_P2_13, SPI_GPIO_HIGH);           //USB_PWR_EN output\r
        spi_gpio_set_pindirection(SPI_GPIO_P2_13, SPI_GPIO_OUT);\r
        spi_gpio_set_pinlevel(SPI_GPIO_P2_14, SPI_GPIO_LOW);            //WL_HOST_WAKE_B output\r
index 2ad179751f79b38119735d104d6e2baeb915471a..d475f4023be69ab4f240ecf2b850b1318422f2be 100755 (executable)
@@ -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: