Skip to contentSkip to conversation

mach-types: Re-add apf9328

PATCH New Gwenhael Goavec-Merou 6 participants 16 messages Oct 8, 2011 – Oct 26, 2011

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 mach-types: Re-add apf9328

---
 arch/arm/tools/mach-types |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
arch/arm/tools/mach-types +1 -0
index fff68d0..07811a7 100644
@@ -188,6 +188,7 @@ omap_2430sdp		MACH_OMAP_2430SDP	OMAP_2430SDP		900
 davinci_evm		MACH_DAVINCI_EVM	DAVINCI_EVM		901
 palmz72			MACH_PALMZ72		PALMZ72			904
 nxdb500			MACH_NXDB500		NXDB500			905
+apf9328			MACH_APF9328		APF9328			906
 palmt5			MACH_PALMT5		PALMT5			917
 palmtc			MACH_PALMTC		PALMTC			918
 omap_apollon		MACH_OMAP_APOLLON	OMAP_APOLLON		919
Signature · 1 line
1.7.3.4
#1 lore raw

PATCH 2/2 MX1:apf9328: Add i2c support

---
 arch/arm/mach-imx/Kconfig        |    1 +
 arch/arm/mach-imx/mach-apf9328.c |   10 ++++++++++
 2 files changed, 11 insertions(+), 0 deletions(-)
arch/arm/mach-imx/Kconfig +1 -0
index 4792fd5..0e89395 100644
@@ -99,6 +99,7 @@ config MACH_SCB9328
 config MACH_APF9328
 	bool "APF9328"
 	select SOC_IMX1
+	select IMX_HAVE_PLATFORM_IMX_I2C
 	select IMX_HAVE_PLATFORM_IMX_UART
 	help
 	  Say Yes here if you are using the Armadeus APF9328 development board
arch/arm/mach-imx/mach-apf9328.c +10 -0
index a404c89..f60e2b4 100644
@@ -18,6 +18,7 @@
 #include <linux/platform_device.h>
 #include <linux/mtd/physmap.h>
 #include <linux/dm9000.h>
+#include <linux/i2c.h>
 
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
@@ -41,6 +42,9 @@ static const int apf9328_pins[] __initconst = {
 	PB29_PF_UART2_RTS,
 	PB30_PF_UART2_TXD,
 	PB31_PF_UART2_RXD,
+	/* I2C */
+	PA15_PF_I2C_SDA,
+	PA16_PF_I2C_SCL,
 };
 
 /*
@@ -103,6 +107,10 @@ static const struct imxuart_platform_data uart1_pdata __initconst = {
 	.flags = IMXUART_HAVE_RTSCTS,
 };
 
+static const struct imxi2c_platform_data apf9328_i2c_data __initconst = {
+	.bitrate = 100000,
+};
+
 static struct platform_device *devices[] __initdata = {
 	&apf9328_flash_device,
 	&dm9000x_device,
@@ -119,6 +127,8 @@ static void __init apf9328_init(void)
 	imx1_add_imx_uart0(NULL);
 	imx1_add_imx_uart1(&uart1_pdata);
 
+	imx1_add_imx_i2c(&apf9328_i2c_data);
+
 	platform_add_devices(devices, ARRAY_SIZE(devices));
 }
 
Signature · 1 line
1.7.3.4
#2 lore raw

PATCH 2/2 MX1:apf9328: Add i2c support

Quoted 2 lines · Gwenhael Goavec-Merou

Out of curiosity, no devices on the bus?

Other than that, looks OK to me:

Quoted 67 lines
---
 arch/arm/mach-imx/Kconfig        |    1 +
 arch/arm/mach-imx/mach-apf9328.c |   10 ++++++++++
 2 files changed, 11 insertions(+), 0 deletions(-)
arch/arm/mach-imx/Kconfig +1 -0
index 4792fd5..0e89395 100644
@@ -99,6 +99,7 @@ config MACH_SCB9328
 config MACH_APF9328
 	bool "APF9328"
 	select SOC_IMX1
+	select IMX_HAVE_PLATFORM_IMX_I2C
 	select IMX_HAVE_PLATFORM_IMX_UART
 	help
 	  Say Yes here if you are using the Armadeus APF9328 development board
arch/arm/mach-imx/mach-apf9328.c +10 -0
index a404c89..f60e2b4 100644
@@ -18,6 +18,7 @@
 #include <linux/platform_device.h>
 #include <linux/mtd/physmap.h>
 #include <linux/dm9000.h>
+#include <linux/i2c.h>
 
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
@@ -41,6 +42,9 @@ static const int apf9328_pins[] __initconst = {
 	PB29_PF_UART2_RTS,
 	PB30_PF_UART2_TXD,
 	PB31_PF_UART2_RXD,
+	/* I2C */
+	PA15_PF_I2C_SDA,
+	PA16_PF_I2C_SCL,
 };
 
 /*
@@ -103,6 +107,10 @@ static const struct imxuart_platform_data uart1_pdata __initconst = {
 	.flags = IMXUART_HAVE_RTSCTS,
 };
 
+static const struct imxi2c_platform_data apf9328_i2c_data __initconst = {
+	.bitrate = 100000,
+};
+
 static struct platform_device *devices[] __initdata = {
 	&apf9328_flash_device,
 	&dm9000x_device,
@@ -119,6 +127,8 @@ static void __init apf9328_init(void)
 	imx1_add_imx_uart0(NULL);
 	imx1_add_imx_uart1(&uart1_pdata);
 
+	imx1_add_imx_i2c(&apf9328_i2c_data);
+
 	platform_add_devices(devices, ARRAY_SIZE(devices));
 }
 
Signature · 7 lines
1.7.3.4


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Signature · 9 lines
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20111008/4d5fd193/attachment.sig>
#3 lore raw

PATCH 2/2 MX1:apf9328: Add i2c support

Hi,

Quoted 6 lines · On Sat, 8 Oct 2011 21:27:30 +0200 Wolfram Sang <[email protected]> wrote:
Quoted 2 lines · Gwenhael Goavec-Merou

Out of curiosity, no devices on the bus?

Devices present on this modules's I2C bus don't have mailined kernel drivers or don't need one (in that case /dev/i2c-xx is used). This module can be plugged on a baseboard adding some stuff on I2C but this will be part of another patch adding the baseboard description.

Gwenhael

Quoted 76 lines

Other than that, looks OK to me:

Quoted 67 lines
---
 arch/arm/mach-imx/Kconfig        |    1 +
 arch/arm/mach-imx/mach-apf9328.c |   10 ++++++++++
 2 files changed, 11 insertions(+), 0 deletions(-)
arch/arm/mach-imx/Kconfig +1 -0
index 4792fd5..0e89395 100644
@@ -99,6 +99,7 @@ config MACH_SCB9328
 config MACH_APF9328
 	bool "APF9328"
 	select SOC_IMX1
+	select IMX_HAVE_PLATFORM_IMX_I2C
 	select IMX_HAVE_PLATFORM_IMX_UART
 	help
 	  Say Yes here if you are using the Armadeus APF9328 development board
arch/arm/mach-imx/mach-apf9328.c +10 -0
index a404c89..f60e2b4 100644
@@ -18,6 +18,7 @@
 #include <linux/platform_device.h>
 #include <linux/mtd/physmap.h>
 #include <linux/dm9000.h>
+#include <linux/i2c.h>
 
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
@@ -41,6 +42,9 @@ static const int apf9328_pins[] __initconst = {
 	PB29_PF_UART2_RTS,
 	PB30_PF_UART2_TXD,
 	PB31_PF_UART2_RXD,
+	/* I2C */
+	PA15_PF_I2C_SDA,
+	PA16_PF_I2C_SCL,
 };
 
 /*
@@ -103,6 +107,10 @@ static const struct imxuart_platform_data uart1_pdata __initconst = {
 	.flags = IMXUART_HAVE_RTSCTS,
 };
 
+static const struct imxi2c_platform_data apf9328_i2c_data __initconst = {
+	.bitrate = 100000,
+};
+
 static struct platform_device *devices[] __initdata = {
 	&apf9328_flash_device,
 	&dm9000x_device,
@@ -119,6 +127,8 @@ static void __init apf9328_init(void)
 	imx1_add_imx_uart0(NULL);
 	imx1_add_imx_uart1(&uart1_pdata);
 
+	imx1_add_imx_i2c(&apf9328_i2c_data);
+
 	platform_add_devices(devices, ARRAY_SIZE(devices));
 }
 
Signature · 7 lines
1.7.3.4


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Signature · 2 lines
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
#5 lore raw

PATCH 2/2 MX1:apf9328: Add i2c support

Quoted 1 line · gwenhael.goavec

ping

This is what your email headers are saying:

From: "gwenhael.goavec" <[email protected]>
Cc: "gwenhael.goavec" <[email protected]>,
linux-arm-kernel at lists.infradead.org, Sascha Hauer <[email protected]>,
Uwe Kleine-K_nig <[email protected]>, Russell King - ARM Linux <[email protected]>

There is no to: header, so I've no idea _who_ you're expecting to respond in a meaningful way to your ping. As this is an imx patch, I assume Sascha.

maintainer
#6 lore raw

PATCH 2/2 MX1:apf9328: Add i2c support

In reply to gwenhael.goavec
Quoted 1 line · gwenhael.goavec

ping

Ok, scheduled this patch.

Sascha

Signature · 4 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
#7 lore raw

PATCH 1/2 mach-types: Re-add apf9328

In reply to Gwenhael Goavec-Merou
Quoted 2 lines · Gwenhael Goavec-Merou

I think this file is maintained by Russell, yet I want to ack that the entry below is missing for building mx1_defconfig. Found that, too.

Regards,

Wolfram

Quoted 24 lines
---
 arch/arm/tools/mach-types |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
arch/arm/tools/mach-types +1 -0
index fff68d0..07811a7 100644
@@ -188,6 +188,7 @@ omap_2430sdp		MACH_OMAP_2430SDP	OMAP_2430SDP		900
 davinci_evm		MACH_DAVINCI_EVM	DAVINCI_EVM		901
 palmz72			MACH_PALMZ72		PALMZ72			904
 nxdb500			MACH_NXDB500		NXDB500			905
+apf9328			MACH_APF9328		APF9328			906
 palmt5			MACH_PALMT5		PALMT5			917
 palmtc			MACH_PALMTC		PALMTC			918
 omap_apollon		MACH_OMAP_APOLLON	OMAP_APOLLON		919
Signature · 7 lines
1.7.3.4


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Signature · 9 lines
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20111008/616e92ce/attachment.sig>
#8 lore raw

PATCH 1/2 mach-types: Re-add apf9328

Quoted 6 lines · Wolfram Sang
Quoted 2 lines · Gwenhael Goavec-Merou

I think this file is maintained by Russell, yet I want to ack that the entry below is missing for building mx1_defconfig. Found that, too.

The thing is - read the comments at the top of the file. There's hints there as to what will happen if you patch the file. The hint is 'automatically generated'. So when I next update the file, any patches done to the file will be wiped out.

#9 lore raw

PATCH 1/2 mach-types: Re-add apf9328

Quoted 5 lines · Russell King - ARM Linux
Quoted 4 lines · Wolfram Sang
Quoted 2 lines · Gwenhael Goavec-Merou
Quoted 7 lines
Quoted 2 lines

I think this file is maintained by Russell, yet I want to ack that the entry below is missing for building mx1_defconfig. Found that, too.

The thing is - read the comments at the top of the file. There's hints there as to what will happen if you patch the file. The hint is 'automatically generated'. So when I next update the file, any patches done to the file will be wiped out.

Currently the id is still missing in your for-next branch and it is marked as "mainlined" on http://www.arm.linux.org.uk/developer/machines/
(906).

That means that the next update should include the id, right? Maybe it's worth to add it already earlier with the patch Gwenhael proposed as without it mx1_defconfig is broken. After f32609c5a035 it even breaks imx_v4_v5_defconfig.

BTW is there a way to see the mach-types file as it would land in linux.git if it were updated now?

Best regards
Uwe

Signature · 2 lines
Pengutronix e.K.                           | Uwe Kleine-K?nig            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
#10 lore raw

PATCH 1/2 mach-types: Re-add apf9328

Quoted 13 lines · Uwe Kleine-K?nig
Quoted 5 lines · Russell King - ARM Linux
Quoted 4 lines · Wolfram Sang
Quoted 2 lines · Gwenhael Goavec-Merou
Quoted 7 lines
Quoted 2 lines

I think this file is maintained by Russell, yet I want to ack that the entry below is missing for building mx1_defconfig. Found that, too.

The thing is - read the comments at the top of the file. There's hints there as to what will happen if you patch the file. The hint is 'automatically generated'. So when I next update the file, any patches done to the file will be wiped out.

Quoted 5 lines

Currently the id is still missing in your for-next branch and it is marked as "mainlined" on http://www.arm.linux.org.uk/developer/machines/
(906).

That means that the next update should include the id, right?

Not if it's a buggered entry - which it doesn't appear to be. The problem is that now that I've stopped manually editing out the buggered entries, favouring doing it automatically, any update to the file ends up breaking the damned thing for someone.

It's rather too late in the cycle for me to commit an update now - I suspect doing so will upset a lot of people.

#11 lore raw

PATCH 1/2 mach-types: Re-add apf9328

In reply to Uwe Kleine-König
Quoted 17 lines · Uwe Kleine-K?nig
Quoted 5 lines · Russell King - ARM Linux
Quoted 4 lines · Wolfram Sang
Quoted 2 lines · Gwenhael Goavec-Merou
Quoted 7 lines
Quoted 2 lines

I think this file is maintained by Russell, yet I want to ack that the entry below is missing for building mx1_defconfig. Found that, too.

The thing is - read the comments at the top of the file. There's hints there as to what will happen if you patch the file. The hint is 'automatically generated'. So when I next update the file, any patches done to the file will be wiped out.

Currently the id is still missing in your for-next branch and it is marked as "mainlined" on http://www.arm.linux.org.uk/developer/machines/
(906).

Quoted 7 lines

That means that the next update should include the id, right? Maybe it's worth to add it already earlier with the patch Gwenhael proposed as without it mx1_defconfig is broken. After f32609c5a035 it even breaks imx_v4_v5_defconfig.

BTW is there a way to see the mach-types file as it would land in linux.git if it were updated now?

http://www.arm.linux.org.uk/developer/machines/download.php?q=1

will be the exact file if I were to update it right now (that's the URL it's retrieved from.)

One of the problems we now have is that I no longer have visibility of platforms going into mainline (I only find out after they've been merged into mainline), so I've no way to update the database with that information before I do an update - my information will be up to three months out of date. This in turn means that the 12 month grace period can expire and the entries deleted from the merged file _after_ they've been merged and queued up elsewhere.

As I've already said, this has now become one very big unmanagable problem. It needs someone to spend a lot of time at each update manually verifying every addition and removal (and kicking those people who botch their entries up - which given my interpretation of the data protection act means it can only be me).

I haven't committed an update since August, and at this point in the cycle, I'm not going to before this merge window - the risks of breaking something already merged or queued up are just too great to consider doing so now.

Longer term, I don't have an answer to this problem - I don't think there is a workable answer to a distributed development model with a centralized ID database with a grace period on 'unused' entries.

#12 lore raw

PATCH 1/2 mach-types: Re-add apf9328

Quoted 19 lines · Russell King - ARM Linux

http://www.arm.linux.org.uk/developer/machines/download.php?q=1

will be the exact file if I were to update it right now (that's the URL it's retrieved from.)

One of the problems we now have is that I no longer have visibility of platforms going into mainline (I only find out after they've been merged into mainline), so I've no way to update the database with that information before I do an update - my information will be up to three months out of date. This in turn means that the 12 month grace period can expire and the entries deleted from the merged file _after_ they've been merged and queued up elsewhere.

As I've already said, this has now become one very big unmanagable problem. It needs someone to spend a lot of time at each update manually verifying every addition and removal (and kicking those people who botch their entries up - which given my interpretation of the data protection act means it can only be me).

Quoted 8 lines

I haven't committed an update since August, and at this point in the cycle, I'm not going to before this merge window - the risks of breaking something already merged or queued up are just too great to consider doing so now.

Longer term, I don't have an answer to this problem - I don't think there is a workable answer to a distributed development model with a centralized ID database with a grace period on 'unused' entries.

And while we're discussing this issue...

+v7pxa_dt               MACH_V7PXA_DT           V7PXA_DT                3794
+v7mmp_dt               MACH_V7MMP_DT           V7MMP_DT                3795

Why do we have DT-based IDs being registered? DT does not use machine IDs in any shape or form. For DT platforms, machine_is_xxx() must not be used because it's meaningless.

#define DT_MACHINE_START(_name, _namestr)               \
static const struct machine_desc __mach_desc_##_name    \
 __used                                                 \
 __attribute__((__section__(".arch.info.init"))) = {    \
        .nr             = ~0,                           \

.name = _namestr,

Note the .nr = ~0 there.

#13 lore raw

PATCH 1/2 mach-types: Re-add apf9328

In reply to Russell King - ARM Linux

Hi Russell,

Quoted 10 lines

-----Original Message-----
From: linux-arm-kernel-bounces at lists.infradead.org [mailto:linux- arm-kernel-bounces at lists.infradead.org] On Behalf Of Russell King - ARM Linux
Sent: Monday, October 17, 2011 2:14 PM
To: Uwe Kleine-K?nig
Cc: Sascha Hauer; Wolfram Sang; linux-arm-
kernel at lists.infradead.org; Gwenhael Goavec-Merou
Subject: Re: [PATCH 1/2] [ARM] mach-types: Re-add apf9328

[...]

Quoted 9 lines
Quoted 3 lines

BTW is there a way to see the mach-types file as it would land in linux.git if it were updated now?

http://www.arm.linux.org.uk/developer/machines/download.php?q=1

will be the exact file if I were to update it right now (that's the URL it's retrieved from.)

I had registered a new mach-id for Texas Instruments' AM335X processor
http://www.arm.linux.org.uk/developer/machines/list.php?id=3589

I had given the machine name as " TI AM335 EVM", the machine type as "am335xevm" and the directory suffix as "omap".

The type macro (machine_is_am335xevm()) and the Kconfig macro (CONFIG_MACH_AM335XEVM) are correct. But the machine type variable for this is showing up as incorrect.
Instead of MACH_TYPE_AM335XEVM it is shown as MACH_TYPE_AM355XEVM.
^^ ^^
Since the machine type variable is auto-generated can you please tell me what could have gone wrong and how to fix it?

Regards,
Vaibhav

#14 lore raw

PATCH 1/2 mach-types: Re-add apf9328

Quoted 11 lines · Vaibhav

I had registered a new mach-id for Texas Instruments' AM335X processor
http://www.arm.linux.org.uk/developer/machines/list.php?id=3589

I had given the machine name as " TI AM335 EVM", the machine type as "am335xevm" and the directory suffix as "omap".

The type macro (machine_is_am335xevm()) and the Kconfig macro (CONFIG_MACH_AM335XEVM) are correct. But the machine type variable for this is showing up as incorrect.
Instead of MACH_TYPE_AM335XEVM it is shown as MACH_TYPE_AM355XEVM.
^^ ^^

No idea - it is generated by a script and I'd be very surprised if the script knew enough about this stuff to perturb it in that way.

Quoted 2 lines

Since the machine type variable is auto-generated can you please tell me what could have gone wrong and how to fix it?

I've just fixed it.

#15 lore raw

PATCH 1/2 mach-types: Re-add apf9328

Quoted 9 lines

-----Original Message-----
From: Russell King - ARM Linux [mailto:linux at arm.linux.org.uk]
Sent: Friday, October 21, 2011 11:34 PM
To: Bedia, Vaibhav
Cc: linux-arm-kernel at lists.infradead.org
Subject: Re: [PATCH 1/2] [ARM] mach-types: Re-add apf9328

I've just fixed it.

Thanks Russell.

Regards,
Vaibhav