From: Seung-Woo Kim Date: Tue, 6 Sep 2016 01:35:49 +0000 (+0900) Subject: i2c: rename sc9630 i2c files without special whitespace character X-Git-Tag: submit/tizen/20160912.020407^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fb28f066b01b8d5ca66251fce1415611ee23279c;p=profile%2Fmobile%2Fplatform%2Fkernel%2Fu-boot-tm1.git i2c: rename sc9630 i2c files without special whitespace character sc9630 i2c driver is not really built from Makefile and it has special whitespace character in the file name. So this patch just renames the files. Change-Id: I092f3351125f88fc6be1dbf20679946f374f2208 Signed-off-by: Seung-Woo Kim --- diff --git a/drivers/i2c/sc9630_i2c_cfg .c b/drivers/i2c/sc9630_i2c_cfg .c deleted file mode 100644 index 068e4f9..0000000 --- a/drivers/i2c/sc9630_i2c_cfg .c +++ /dev/null @@ -1,90 +0,0 @@ -/****************************************************************************** - ** File Name: sc8810_i2c_cfg.c * - ** Author: liuhao * - ** DATE: 06/28/2010 * - ** Copyright: 2010 Spreatrum, Incoporated. All Rights Reserved. * - ** Description: This file define the hal layer of I2C device. * - ****************************************************************************** - - ****************************************************************************** - ** Edit History * - ** ------------------------------------------------------------------------- * - ** DATE NAME DESCRIPTION * - ** 06/28/2010 liuhao Create. * - ******************************************************************************/ - -/**---------------------------------------------------------------------------* - ** Dependencies * - **---------------------------------------------------------------------------*/ -//#include "v0/i2c_reg_v0.h" -#include "sc9630_i2c_cfg.h" -#include "asm/arch/sci_types.h" - -/**---------------------------------------------------------------------------* - ** Compiler Flag * - **---------------------------------------------------------------------------*/ -#ifdef __cplusplus -extern "C" -{ -#endif - -/**---------------------------------------------------------------------------* - ** Macro Define - **---------------------------------------------------------------------------*/ - -/**---------------------------------------------------------------------------* - ** Local Variables - **---------------------------------------------------------------------------*/ - -/**---------------------------------------------------------------------------* - ** Global Variables - **---------------------------------------------------------------------------*/ -extern I2C_PHY_FUN phy_fun_v0; -//extern I2C_PHY_FUN phy_fun_v1; - -const I2C_PHY_CFG __i2c_phy_cfg[I2C_ID_MAX] = -{ - /*Note: Only port 1 is pulled up internal, other port should be pulled up external*/ - /*logic id, controller id, port id, method*/ - {0, 0, 1, &phy_fun_v0}, /*hw i2c controller0*/ - {1, 1, 1, &phy_fun_v0}, /*hw i2c controller1*/ - {2, 2, 1, &phy_fun_v0}, /*hw i2c controller2*/ - {3, 3, 1, &phy_fun_v0}, /*hw i2c controller3*/ - {4, 4, 1, &phy_fun_v0}, /*hw i2c controller4*/ - {5, 5, 1, &phy_fun_v0}, /*hw i2c controller5*/ - //{4, 1, 1, &phy_fun_v1} /*sw simulation i2c controller1, port 1*/ -}; - -const I2C_BASE_INFO __i2c_base_info[I2C_BUS_MAX] = -{ - /*hw controller id, base address*/ - {0, 0x70500000},/*hw i2c controller0, register base*/ - {1, 0x70600000},/*hw i2c controller1, register base*/ - {2, 0x70700000},/*hw i2c controller2, register base*/ - {3, 0x70800000},/*hw i2c controller3, register base*/ - {4, 0x70900000},/*hw i2c controller4, register base*/ - {5, 0x40080000},/*hw i2c controller5, register base*/ - - //{1, 0} /*sw i2c controller1, no register base*/ -}; - -//const I2C_GPIO_INFO __i2c_gpio_info[I2C_BUS_MAX] = -//{ - /*sw controller id, sda pin, scl pin*/ - //{0, 0, 0},/*hw i2c controller1, no gpio pin*/ - //{1, 1, 2} /*sw simulation i2c controller1, gpio pin, should be update*/ -//}; - -/**---------------------------------------------------------------------------* - ** Function Definitions - **---------------------------------------------------------------------------*/ - - -/**---------------------------------------------------------------------------* - ** Compiler Flag * - **---------------------------------------------------------------------------*/ -#ifdef __cplusplus -} -#endif - -/* End Of File */ diff --git a/drivers/i2c/sc9630_i2c_cfg .h b/drivers/i2c/sc9630_i2c_cfg .h deleted file mode 100644 index 6abe505..0000000 --- a/drivers/i2c/sc9630_i2c_cfg .h +++ /dev/null @@ -1,92 +0,0 @@ -/****************************************************************************** - ** File Name: sc8810_i2c_cfg.h * - ** Author: liuhao * - ** DATE: 06/28/2010 * - ** Copyright: 2010 Spreatrum, Incoporated. All Rights Reserved. * - ** Description: This file define the basic hw interfaces of I2C device. * - ****************************************************************************** - - ****************************************************************************** - ** Edit History * - ** ------------------------------------------------------------------------- * - ** DATE NAME DESCRIPTION * - ** 06/28/2010 liuhao Create. * - ******************************************************************************/ - -#ifndef _SC8810_I2C_CFG_H_ -#define _SC8810_I2C_CFG_H_ -/*----------------------------------------------------------------------------* - ** Dependencies * - **------------------------------------------------------------------------- */ -#include "asm/arch/sci_types.h" - -#include "i2c_phy.h" - -/**---------------------------------------------------------------------------* - ** Compiler Flag * - **--------------------------------------------------------------------------*/ -#ifdef __cplusplus -extern "C" -{ -#endif - -/**---------------------------------------------------------------------------* - ** Debugging Flag * - **---------------------------------------------------------------------------*/ -//#define DEBUG_IIC -//#ifdef DEBUG_IIC -//#define IIC_PRINT SCI_TRACE_LOW -//#else -#define IIC_PRINT -//#endif - -/**---------------------------------------------------------------------------* -** Micro Define ** -**---------------------------------------------------------------------------*/ -#ifndef I2C_DEV_MAX -#define I2C_DEV_MAX 8 -#endif - -#define I2C_BUS_MAX 6 -#define I2C_ID_MAX 6 - -#define I2C_PORT_NUM 0 - -typedef struct -{ - uint32 phy_id; - uint32 base_addr; -} I2C_BASE_INFO; - -typedef struct -{ - uint32 phy_id; - uint32 sda_pin; - uint32 scl_pin; -} I2C_GPIO_INFO; - -typedef struct -{ - uint32 logic_id; - uint32 phy_id; - uint32 port_id; - I2C_PHY_FUN *phy_fun; -} I2C_PHY_CFG; -/**----------------------------------------------------------------------------* -** Local Function Prototype ** -**----------------------------------------------------------------------------*/ - - -/**----------------------------------------------------------------------------* -** Function Prototype ** -**----------------------------------------------------------------------------*/ - -/**----------------------------------------------------------------------------* -** Compiler Flag ** -**----------------------------------------------------------------------------*/ -#ifdef __cplusplus -} -#endif -/**---------------------------------------------------------------------------*/ -#endif -// End diff --git a/drivers/i2c/sc9630_i2c_cfg.c b/drivers/i2c/sc9630_i2c_cfg.c new file mode 100644 index 0000000..068e4f9 --- /dev/null +++ b/drivers/i2c/sc9630_i2c_cfg.c @@ -0,0 +1,90 @@ +/****************************************************************************** + ** File Name: sc8810_i2c_cfg.c * + ** Author: liuhao * + ** DATE: 06/28/2010 * + ** Copyright: 2010 Spreatrum, Incoporated. All Rights Reserved. * + ** Description: This file define the hal layer of I2C device. * + ****************************************************************************** + + ****************************************************************************** + ** Edit History * + ** ------------------------------------------------------------------------- * + ** DATE NAME DESCRIPTION * + ** 06/28/2010 liuhao Create. * + ******************************************************************************/ + +/**---------------------------------------------------------------------------* + ** Dependencies * + **---------------------------------------------------------------------------*/ +//#include "v0/i2c_reg_v0.h" +#include "sc9630_i2c_cfg.h" +#include "asm/arch/sci_types.h" + +/**---------------------------------------------------------------------------* + ** Compiler Flag * + **---------------------------------------------------------------------------*/ +#ifdef __cplusplus +extern "C" +{ +#endif + +/**---------------------------------------------------------------------------* + ** Macro Define + **---------------------------------------------------------------------------*/ + +/**---------------------------------------------------------------------------* + ** Local Variables + **---------------------------------------------------------------------------*/ + +/**---------------------------------------------------------------------------* + ** Global Variables + **---------------------------------------------------------------------------*/ +extern I2C_PHY_FUN phy_fun_v0; +//extern I2C_PHY_FUN phy_fun_v1; + +const I2C_PHY_CFG __i2c_phy_cfg[I2C_ID_MAX] = +{ + /*Note: Only port 1 is pulled up internal, other port should be pulled up external*/ + /*logic id, controller id, port id, method*/ + {0, 0, 1, &phy_fun_v0}, /*hw i2c controller0*/ + {1, 1, 1, &phy_fun_v0}, /*hw i2c controller1*/ + {2, 2, 1, &phy_fun_v0}, /*hw i2c controller2*/ + {3, 3, 1, &phy_fun_v0}, /*hw i2c controller3*/ + {4, 4, 1, &phy_fun_v0}, /*hw i2c controller4*/ + {5, 5, 1, &phy_fun_v0}, /*hw i2c controller5*/ + //{4, 1, 1, &phy_fun_v1} /*sw simulation i2c controller1, port 1*/ +}; + +const I2C_BASE_INFO __i2c_base_info[I2C_BUS_MAX] = +{ + /*hw controller id, base address*/ + {0, 0x70500000},/*hw i2c controller0, register base*/ + {1, 0x70600000},/*hw i2c controller1, register base*/ + {2, 0x70700000},/*hw i2c controller2, register base*/ + {3, 0x70800000},/*hw i2c controller3, register base*/ + {4, 0x70900000},/*hw i2c controller4, register base*/ + {5, 0x40080000},/*hw i2c controller5, register base*/ + + //{1, 0} /*sw i2c controller1, no register base*/ +}; + +//const I2C_GPIO_INFO __i2c_gpio_info[I2C_BUS_MAX] = +//{ + /*sw controller id, sda pin, scl pin*/ + //{0, 0, 0},/*hw i2c controller1, no gpio pin*/ + //{1, 1, 2} /*sw simulation i2c controller1, gpio pin, should be update*/ +//}; + +/**---------------------------------------------------------------------------* + ** Function Definitions + **---------------------------------------------------------------------------*/ + + +/**---------------------------------------------------------------------------* + ** Compiler Flag * + **---------------------------------------------------------------------------*/ +#ifdef __cplusplus +} +#endif + +/* End Of File */ diff --git a/drivers/i2c/sc9630_i2c_cfg.h b/drivers/i2c/sc9630_i2c_cfg.h new file mode 100644 index 0000000..6abe505 --- /dev/null +++ b/drivers/i2c/sc9630_i2c_cfg.h @@ -0,0 +1,92 @@ +/****************************************************************************** + ** File Name: sc8810_i2c_cfg.h * + ** Author: liuhao * + ** DATE: 06/28/2010 * + ** Copyright: 2010 Spreatrum, Incoporated. All Rights Reserved. * + ** Description: This file define the basic hw interfaces of I2C device. * + ****************************************************************************** + + ****************************************************************************** + ** Edit History * + ** ------------------------------------------------------------------------- * + ** DATE NAME DESCRIPTION * + ** 06/28/2010 liuhao Create. * + ******************************************************************************/ + +#ifndef _SC8810_I2C_CFG_H_ +#define _SC8810_I2C_CFG_H_ +/*----------------------------------------------------------------------------* + ** Dependencies * + **------------------------------------------------------------------------- */ +#include "asm/arch/sci_types.h" + +#include "i2c_phy.h" + +/**---------------------------------------------------------------------------* + ** Compiler Flag * + **--------------------------------------------------------------------------*/ +#ifdef __cplusplus +extern "C" +{ +#endif + +/**---------------------------------------------------------------------------* + ** Debugging Flag * + **---------------------------------------------------------------------------*/ +//#define DEBUG_IIC +//#ifdef DEBUG_IIC +//#define IIC_PRINT SCI_TRACE_LOW +//#else +#define IIC_PRINT +//#endif + +/**---------------------------------------------------------------------------* +** Micro Define ** +**---------------------------------------------------------------------------*/ +#ifndef I2C_DEV_MAX +#define I2C_DEV_MAX 8 +#endif + +#define I2C_BUS_MAX 6 +#define I2C_ID_MAX 6 + +#define I2C_PORT_NUM 0 + +typedef struct +{ + uint32 phy_id; + uint32 base_addr; +} I2C_BASE_INFO; + +typedef struct +{ + uint32 phy_id; + uint32 sda_pin; + uint32 scl_pin; +} I2C_GPIO_INFO; + +typedef struct +{ + uint32 logic_id; + uint32 phy_id; + uint32 port_id; + I2C_PHY_FUN *phy_fun; +} I2C_PHY_CFG; +/**----------------------------------------------------------------------------* +** Local Function Prototype ** +**----------------------------------------------------------------------------*/ + + +/**----------------------------------------------------------------------------* +** Function Prototype ** +**----------------------------------------------------------------------------*/ + +/**----------------------------------------------------------------------------* +** Compiler Flag ** +**----------------------------------------------------------------------------*/ +#ifdef __cplusplus +} +#endif +/**---------------------------------------------------------------------------*/ +#endif +// End