@@ -50,6 +50,15 @@ static struct ast_i2c_driver_data ast_i2c_data_1M = {
50
50
.get_i2c_clock = ast_get_pclk ,
51
51
};
52
52
53
+ static struct ast_i2c_driver_data ast_i2c_data_400K = {
54
+ .bus_clk = 400000 , //bus clock 400KHz
55
+ .master_dma = MASTER_XFER_MODE ,
56
+ .slave_dma = SLAVE_XFER_MODE ,
57
+ .request_pool_buff_page = request_pool_buff_page ,
58
+ .free_pool_buff_page = free_pool_buff_page ,
59
+ .get_i2c_clock = ast_get_pclk ,
60
+ };
61
+
53
62
static u64 ast_i2c_dma_mask = 0xffffffffUL ;
54
63
static struct resource ast_i2c_dev0_resources [] = {
55
64
[0 ] = {
@@ -72,6 +81,8 @@ static struct platform_device ast_i2c_dev0_device = {
72
81
.coherent_dma_mask = 0xffffffff ,
73
82
#if defined(CONFIG_AST_I2C_0_1M )
74
83
.platform_data = & ast_i2c_data_1M ,
84
+ #elif defined(CONFIG_AST_I2C_0_400K )
85
+ .platform_data = & ast_i2c_data_400K ,
75
86
#else
76
87
.platform_data = & ast_i2c_data ,
77
88
#endif
@@ -437,6 +448,8 @@ void __init ast_add_device_i2c_common(void)
437
448
}
438
449
#if defined(CONFIG_AST_I2C_0_1M )
439
450
ast_i2c_data_1M .reg_gr = ast_i2c_data .reg_gr ;// 1MHz reg_gr setting
451
+ #elif defined(CONFIG_AST_I2C_0_400K )
452
+ ast_i2c_data_400K .reg_gr = ast_i2c_data .reg_gr ;// 400KHz reg_gr setting
440
453
#endif
441
454
platform_device_register (& ast_i2c_dev0_device );
442
455
platform_device_register (& ast_i2c_dev1_device );
0 commit comments