* @tx_fifo_depth: depth of the hardware tx fifo
  * @rx_fifo_depth: depth of the hardware rx fifo
  * @rx_outstanding: current master-rx elements in tx fifo
+ * @clk_freq: bus clock frequency
  * @ss_hcnt: standard speed HCNT value
  * @ss_lcnt: standard speed LCNT value
  * @fs_hcnt: fast speed HCNT value
        unsigned int            tx_fifo_depth;
        unsigned int            rx_fifo_depth;
        int                     rx_outstanding;
+       u32                     clk_freq;
        u32                     sda_hold_time;
        u32                     sda_falling_time;
        u32                     scl_falling_time;
 
        struct i2c_adapter *adap;
        struct resource *mem;
        int irq, r;
-       u32 clk_freq, ht = 0;
+       u32 ht = 0;
 
        irq = platform_get_irq(pdev, 0);
        if (irq < 0)
        platform_set_drvdata(pdev, dev);
 
        /* fast mode by default because of legacy reasons */
-       clk_freq = 400000;
+       dev->clk_freq = 400000;
 
        if (pdata) {
-               clk_freq = pdata->i2c_scl_freq;
+               dev->clk_freq = pdata->i2c_scl_freq;
        } else {
                device_property_read_u32(&pdev->dev, "i2c-sda-hold-time-ns",
                                         &ht);
                device_property_read_u32(&pdev->dev, "i2c-scl-falling-time-ns",
                                         &dev->scl_falling_time);
                device_property_read_u32(&pdev->dev, "clock-frequency",
-                                        &clk_freq);
+                                        &dev->clk_freq);
        }
 
        if (has_acpi_companion(&pdev->dev))
        /*
         * Only standard mode at 100kHz and fast mode at 400kHz are supported.
         */
-       if (clk_freq != 100000 && clk_freq != 400000) {
+       if (dev->clk_freq != 100000 && dev->clk_freq != 400000) {
                dev_err(&pdev->dev, "Only 100kHz and 400kHz supported");
                return -EINVAL;
        }
                I2C_FUNC_SMBUS_BYTE_DATA |
                I2C_FUNC_SMBUS_WORD_DATA |
                I2C_FUNC_SMBUS_I2C_BLOCK;
-       if (clk_freq == 100000)
+       if (dev->clk_freq == 100000)
                dev->master_cfg =  DW_IC_CON_MASTER | DW_IC_CON_SLAVE_DISABLE |
                        DW_IC_CON_RESTART_EN | DW_IC_CON_SPEED_STD;
        else