From c20d561a23383b3c1fcac0a1c8d50cda378e3b24 Mon Sep 17 00:00:00 2001 From: lhh Date: Thu, 23 Dec 2010 16:34:14 +0800 Subject: [PATCH] add ak8975 i2c address and up rk29_sdmmc speed --- arch/arm/mach-rk29/board-rk29-winaccord.c | 29 ++++++++++---------- arch/arm/mach-rk29/board-rk29sdk.c | 33 +++++++++++------------ drivers/mmc/host/rk29_sdmmc.c | 2 +- 3 files changed, 31 insertions(+), 33 deletions(-) diff --git a/arch/arm/mach-rk29/board-rk29-winaccord.c b/arch/arm/mach-rk29/board-rk29-winaccord.c index cac997885d22..0b2f97c447c9 100644 --- a/arch/arm/mach-rk29/board-rk29-winaccord.c +++ b/arch/arm/mach-rk29/board-rk29-winaccord.c @@ -492,23 +492,10 @@ static struct i2c_board_info __initdata board_i2c0_devices[] = { .platform_data = &mma8452_info, }, #endif - -}; -#endif - -#ifdef CONFIG_I2C1_RK29 -static struct i2c_board_info __initdata board_i2c1_devices[] = { -#if defined (CONFIG_RK1000_CONTROL1) - { - .type = "rk1000_control", - .addr = 0x40, - .flags = 0, - }, -#endif #if defined (CONFIG_SENSORS_AK8973) { .type = "ak8973", - .addr = 0x1c, + .addr = 0x1d, .flags = 0, .irq = RK29_PIN4_PA1, }, @@ -516,7 +503,7 @@ static struct i2c_board_info __initdata board_i2c1_devices[] = { #if defined (CONFIG_SENSORS_AK8975) { .type = "ak8975", - .addr = 0x1c, + .addr = 0x1d, .flags = 0, .irq = RK29_PIN4_PA1, }, @@ -524,6 +511,18 @@ static struct i2c_board_info __initdata board_i2c1_devices[] = { }; #endif +#ifdef CONFIG_I2C1_RK29 +static struct i2c_board_info __initdata board_i2c1_devices[] = { +#if defined (CONFIG_RK1000_CONTROL1) + { + .type = "rk1000_control", + .addr = 0x40, + .flags = 0, + }, +#endif +}; +#endif + #ifdef CONFIG_I2C2_RK29 static struct i2c_board_info __initdata board_i2c2_devices[] = { #if defined (CONFIG_HANNSTAR_P1003) diff --git a/arch/arm/mach-rk29/board-rk29sdk.c b/arch/arm/mach-rk29/board-rk29sdk.c index d6357231e3c3..8d47f5289456 100755 --- a/arch/arm/mach-rk29/board-rk29sdk.c +++ b/arch/arm/mach-rk29/board-rk29sdk.c @@ -494,33 +494,32 @@ static struct i2c_board_info __initdata board_i2c0_devices[] = { .platform_data = &mma8452_info, }, #endif - -}; -#endif - -#ifdef CONFIG_I2C1_RK29 -static struct i2c_board_info __initdata board_i2c1_devices[] = { -#if defined (CONFIG_RK1000_CONTROL1) - { - .type = "rk1000_control", - .addr = 0x40, - .flags = 0, - }, -#endif #if defined (CONFIG_SENSORS_AK8973) { .type = "ak8973", - .addr = 0x1c, + .addr = 0x1d, .flags = 0, - .irq = RK29_PIN4_PA1, + .irq = RK29_PIN0_PA4, }, #endif #if defined (CONFIG_SENSORS_AK8975) { .type = "ak8975", - .addr = 0x1c, + .addr = 0x1d, + .flags = 0, + .irq = RK29_PIN0_PA4, + }, +#endif +}; +#endif + +#ifdef CONFIG_I2C1_RK29 +static struct i2c_board_info __initdata board_i2c1_devices[] = { +#if defined (CONFIG_RK1000_CONTROL1) + { + .type = "rk1000_control", + .addr = 0x40, .flags = 0, - .irq = RK29_PIN4_PA1, }, #endif #if defined (CONFIG_ANX7150) diff --git a/drivers/mmc/host/rk29_sdmmc.c b/drivers/mmc/host/rk29_sdmmc.c index 33c64b1aa41f..627a15d0668f 100755 --- a/drivers/mmc/host/rk29_sdmmc.c +++ b/drivers/mmc/host/rk29_sdmmc.c @@ -1447,7 +1447,7 @@ static int rk29_sdmmc_probe(struct platform_device *pdev) platform_set_drvdata(pdev, host); mmc->ops = &rk29_sdmmc_ops[pdev->id]; mmc->f_min = host->bus_hz/510; - mmc->f_max = host->bus_hz/20; //2; ///20; //max f is clock to mmc_clk/2 + mmc->f_max = host->bus_hz/2; //2; ///20; //max f is clock to mmc_clk/2 mmc->ocr_avail = pdata->host_ocr_avail; mmc->caps = pdata->host_caps; mmc->max_phys_segs = 64; -- 2.34.1