[PATCH 1/9] GTA02/FreeRunner: Add machine definition

Nelson Castillo arhuaco at freaks-unidos.net
Fri Apr 3 00:50:17 CEST 2009


On Wed, Apr 1, 2009 at 12:17 PM, Mark Brown
<broonie at opensource.wolfsonmicro.com> wrote:
> On Tue, Mar 31, 2009 at 01:06:34PM -0500, Nelson Castillo wrote:
>> This patch introduces the Openmoko GTA02 machine definition.
>
> This should come after any other patches it depends on (the CPU support
> looks like the most obvious one).  A couple of comments, mostly about
> stuff that is relevant to me.

OK.

>> index b289d19..570cb81 100644
>> --- a/arch/arm/mach-s3c2442/Kconfig
>> +++ b/arch/arm/mach-s3c2442/Kconfig
>> @@ -11,6 +11,7 @@ config CPU_S3C2442
>>       select S3C2410_CLOCK
>>       select S3C2410_GPIO
>>       select S3C2410_PM if PM
>> +     select S3C2440_DMA if S3C2410_DMA
>>       select CPU_S3C244X
>>       select CPU_LLSERIAL_S3C2440
>>       help
>
> This looks like it's in the wrong patch (it perhaps wants to be a patch
> by itself)?

Yes.

> For future compatiblity you should change boot_on to always_on for
> regulators that have no consumers.  This tells the regulator core that
> the regulator can't be powered off.  There's no need to set zero
> consumers explicitly, either.
>
>> +static struct i2c_board_info gta02_i2c_devs[] __initdata = {
>> +     {
>> +             I2C_BOARD_INFO("pcf50633", 0x73),
>> +             .irq = GTA02_IRQ_PCF50633,
>> +             .platform_data = &gta02_pcf_pdata,
>> +     },
>> +};
>
> You should register the WM8753 here too, this is now required in
> mainline.

Last two changes tried and the kernel compiled and booted. The changes:

diff --git a/arch/arm/mach-s3c2442/mach-gta02.c
b/arch/arm/mach-s3c2442/mach-gta02.c
index f88dee5..0d4db38 100644
--- a/arch/arm/mach-s3c2442/mach-gta02.c
+++ b/arch/arm/mach-s3c2442/mach-gta02.c
@@ -274,23 +274,21 @@ struct pcf50633_platform_data gta02_pcf_pdata = {
 				.min_uV = 3300000,
 				.max_uV = 3300000,
 				.valid_modes_mask = REGULATOR_MODE_NORMAL,
-				.boot_on = 1,
+				.always_on = 1,
 				.apply_uV = 1,
 				.state_mem = {
 					.enabled = 1,
 				},
 			},
-			.num_consumer_supplies = 0,
 		},
 		[PCF50633_REGULATOR_DOWN1] = {
 			.constraints = {
 				.min_uV = 1300000,
 				.max_uV = 1600000,
 				.valid_modes_mask = REGULATOR_MODE_NORMAL,
-				.boot_on = 1,
+				.always_on = 1,
 				.apply_uV = 1,
 			},
-			.num_consumer_supplies = 0,
 		},
 		[PCF50633_REGULATOR_DOWN2] = {
 			.constraints = {
@@ -298,12 +296,11 @@ struct pcf50633_platform_data gta02_pcf_pdata = {
 				.max_uV = 1800000,
 				.valid_modes_mask = REGULATOR_MODE_NORMAL,
 				.apply_uV = 1,
-				.boot_on = 1,
+				.always_on = 1,
 				.state_mem = {
 					.enabled = 1,
 				},
 			},
-			.num_consumer_supplies = 0,
 		},
 		[PCF50633_REGULATOR_HCLDO] = {
 			.constraints = {
@@ -311,7 +308,7 @@ struct pcf50633_platform_data gta02_pcf_pdata = {
 				.max_uV = 3300000,
 				.valid_modes_mask = REGULATOR_MODE_NORMAL,
 				.valid_ops_mask = REGULATOR_CHANGE_VOLTAGE,
-				.boot_on = 1,
+				.always_on = 1,
 			},
 		},
 		[PCF50633_REGULATOR_LDO1] = {
@@ -324,7 +321,6 @@ struct pcf50633_platform_data gta02_pcf_pdata = {
 					.enabled = 0,
 				},
 			},
-			.num_consumer_supplies = 0,
 		},
 		[PCF50633_REGULATOR_LDO2] = {
 			.constraints = {
@@ -333,7 +329,6 @@ struct pcf50633_platform_data gta02_pcf_pdata = {
 				.valid_modes_mask = REGULATOR_MODE_NORMAL,
 				.apply_uV = 1,
 			},
-			.num_consumer_supplies = 0,
 		},
 		[PCF50633_REGULATOR_LDO3] = {
 			.constraints = {
@@ -342,7 +337,6 @@ struct pcf50633_platform_data gta02_pcf_pdata = {
 				.valid_modes_mask = REGULATOR_MODE_NORMAL,
 				.apply_uV = 1,
 			},
-			.num_consumer_supplies = 0,
 		},
 		[PCF50633_REGULATOR_LDO4] = {
 			.constraints = {
@@ -369,7 +363,6 @@ struct pcf50633_platform_data gta02_pcf_pdata = {
 				.max_uV = 3000000,
 				.valid_modes_mask = REGULATOR_MODE_NORMAL,
 			},
-			.num_consumer_supplies = 0,
 		},
 		[PCF50633_REGULATOR_MEMLDO] = {
 			.constraints = {
@@ -380,7 +373,6 @@ struct pcf50633_platform_data gta02_pcf_pdata = {
 					.enabled = 1,
 				},
 			},
-			.num_consumer_supplies = 0,
 		},

 	},
@@ -426,6 +418,9 @@ static struct i2c_board_info gta02_i2c_devs[] __initdata = {
 		.irq = GTA02_IRQ_PCF50633,
 		.platform_data = &gta02_pcf_pdata,
 	},
+	{
+		I2C_BOARD_INFO("wm8753", 0x1a),
+	},
 };



Thanks a lot.



More information about the openmoko-kernel mailing list