i2c: pxa: enable high speed mode for i2c bus

To enter high speed mode, following steps should be done:
1. When running in high speed mode, i2c clock rate is different
from standard mode. Clock rate must be set according to
specification first.
2. When i2c controller sends a master code and wins arbitration,
high speed mode is entered.

If you want to enable high speed mode, the following members of
platform data should be set to proper value:
1. "high_mode" should be set to "1".
2. "master_code" should be set to "8'b 0000_1xxx"(x is 0 or 1).
   If no master_code is set, set to default value 0xe.
3. "rate" should be set according to specification.

Signed-off-by: Leilei Shang <shangll@marvell.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
This commit is contained in:
Leilei Shang 2013-06-07 14:38:17 +08:00 committed by Wolfram Sang
parent f480adaf1b
commit 9d3dda5c0d
2 changed files with 66 additions and 1 deletions

View file

@ -67,6 +67,9 @@ struct i2c_pxa_platform_data {
unsigned int class;
unsigned int use_pio :1;
unsigned int fast_mode :1;
unsigned int high_mode:1;
unsigned char master_code;
unsigned long rate;
};
extern void pxa_set_i2c_info(struct i2c_pxa_platform_data *info);