del i2c.h
author柯飞雄 <kfx@rock-chips.com>
Wed, 12 May 2010 09:51:53 +0000 (09:51 +0000)
committer黄涛 <huangtao@rock-chips.com>
Mon, 21 Jun 2010 05:34:51 +0000 (13:34 +0800)
arch/arm/mach-rk2818/include/mach/board.h
arch/arm/mach-rk2818/include/mach/i2c.h [deleted file]

index e21c023c7418bc10b5093ab21f2de3102500cdf2..5bf7f0c8da2ea7d41bbf9e1fe9de5861022ce187 100644 (file)
@@ -26,8 +26,16 @@ struct RK2818_mddi_platform_data
        unsigned has_vsync_irq:1;
 };
 
-/* common init routines for use by arch/arm/mach-msm/board-*.c */
+struct rk2818_i2c_platform_data {
+       int     bus_num;        
+       unsigned int    flags;     
+       unsigned int    slave_addr; 
+       unsigned long   scl_rate;   
+       char                    clk_id[16];
+       void    (*cfg_gpio)(struct platform_device *dev);
+};
 
+/* common init routines for use by arch/arm/mach-msm/board-*.c */
 void __init rk2818_add_devices(void);
 void __init rk2818_map_common_io(void);
 void __init rk2818_init_irq(void);
diff --git a/arch/arm/mach-rk2818/include/mach/i2c.h b/arch/arm/mach-rk2818/include/mach/i2c.h
deleted file mode 100755 (executable)
index 18ce171..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-/* arch/arm/mach-rk2818/include/mach/i2c.h
- *
- * Copyright (C) 2010 ROCKCHIP, Inc.
- *
- * This software is licensed under the terms of the GNU General Public
- * License version 2, as published by the Free Software Foundation, and
- * may be copied, distributed, and modified under those terms.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- */
-
-#ifndef __ASM_ARM_ARCH_I2C_H
-#define __ASM_ARM_ARCH_I2C_H
-
-/* master transmit */
-#define I2C_MTXR                (0x0000)
-/* master receive */
-#define I2C_MRXR                (0x0004)
-/* slave address */
-#define I2C_SADDR               (0x0010)
-/* interrupt enable control */
-#define I2C_IER                 (0x0014)
-#define I2C_IER_ARBITR_LOSE     (1<<7)
-#define I2C_IER_MRX_NEED_ACK    (1<<1)
-#define I2C_IER_MTX_RCVD_ACK    (1<<0)
-
-#define IRQ_MST_ENABLE         (I2C_IER_ARBITR_LOSE | \
-                                        I2C_IER_MRX_NEED_ACK | \
-                                        I2C_IER_MTX_RCVD_ACK)
-#define IRQ_ALL_DISABLE         (0x00)
-
-/* interrupt status, write 0 to clear */
-#define I2C_ISR                 (0x0018)
-#define I2C_ISR_ARBITR_LOSE     (1<<7)
-#define I2C_ISR_MRX_NEED_ACK    (1<<1)
-#define I2C_ISR_MTX_RCVD_ACK    (1<<0)
-
-/* stop/start/resume command, write 1 to set */
-#define I2C_LCMR                (0x001c)
-#define I2C_LCMR_RESUME         (1<<2)
-#define I2C_LCMR_STOP           (1<<1)
-#define I2C_LCMR_START          (1<<0)
-
-/* i2c core status */
-#define I2C_LSR                 (0x0020)
-#define I2C_LSR_RCV_NAK         (1<<1)
-#define I2C_LSR_RCV_ACK         (~(1<<1))
-#define I2C_LSR_BUSY            (1<<0)
-
-/* i2c config */
-#define I2C_CONR                (0x0024)
-#define I2C_CONR_NAK               (1<<4)
-#define I2C_CONR_ACK            (~(1<<4))
-#define I2C_CONR_MTX_MODE       (1<<3)
-#define I2C_CONR_MRX_MODE       (~(1<<3))
-#define I2C_CONR_MPORT_ENABLE   (1<<2)
-#define I2C_CONR_MPORT_DISABLE  (~(1<<2))
-
-/* i2c core config */
-#define I2C_OPR                 (0x0028)
-#define I2C_OPR_RESET_STATUS    (1<<7)
-#define I2C_OPR_CORE_ENABLE     (1<<6)
-
-#define I2CCDVR_REM_BITS        (0x03)
-#define I2CCDVR_REM_MAX         (1<<(I2CCDVR_REM_BITS))
-#define I2CCDVR_EXP_BITS        (0x03)
-#define I2CCDVR_EXP_MAX         (1<<(I2CCDVR_EXP_BITS))
-
-struct rk2818_i2c_platform_data {
-       int     bus_num;            /* i2c总线号 */
-       unsigned int    flags;      /* i2c总线标志 */
-       unsigned int    slave_addr; /* i2c从设备地址 */
-       unsigned long   scl_rate;    /* i2c总线频率,单位:hz */
-       char                    clk_id[16];  /* clk id */
-       /* gpio口配置 */
-       void    (*cfg_gpio)(struct platform_device *dev);
-};
-
-void rk2818_i2c_board_init(void);
-
-#endif