Skip to contentSkip to conversation

Topcliff: Update PCH_PHUB driver to 2.6.35

PATCH Applied Masayuki Ohtak 4 participants 17 messages Sep 1, 2010 – Sep 3, 2010 Char and misc drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Topcliff: Update PCH_PHUB driver to 2.6.35

Hi Greg,

Sorry, we have modified again, for a bug(illegal return code) and WARNING for building with the latest kernel.

Please check below.

Best Regards, Ohtake(OKISEMI).

---
Packet hub driver of Topcliff PCH

Topcliff PCH is the platform controller hub that is going to be used in Intel's upcoming general embedded platform. All IO peripherals in Topcliff PCH are actually devices sitting on AMBA bus. Packet hub is a special converter device in Topcliff PCH that translate AMBA transactions to PCI Express transactions and vice versa. Thus packet hub helps present all IO peripherals in Topcliff PCH as PCIE devices to IA system. Topcliff PCH has MAC address and Option ROM data.
These data are in SROM which is connected to PCIE bus.
Packet hub driver of Topcliff PCH can access MAC address and Option ROM data in SROM via sysfs interface.

---
 Documentation/ABI/testing/sysfs-module |   12 +
 drivers/misc/Kconfig                   |   12 +
 drivers/misc/Makefile                  |    1 +
 drivers/misc/pch_phub.c                |  717 ++++++++++++++++++++++++++++++++
 4 files changed, 742 insertions(+), 0 deletions(-)
 create mode 100644 Documentation/ABI/testing/sysfs-module
 create mode 100755 drivers/misc/pch_phub.c
Documentation/ABI/testing/sysfs-module new file +12 -0
new file mode 100644
index 0000000..cfcec3b
@@ -0,0 +1,12 @@
+What:		/sys/module/pch_phub/drivers/.../pch_mac
+Date:		August 2010
+KernelVersion:	2.6.35
+Contact:	[email protected]
+Description:	Write/read GbE MAC address.
+
+What:		/sys/module/pch_phub/drivers/.../pch_firmware
+Date:		August 2010
+KernelVersion:	2.6.35
+Contact:	[email protected]
+Description:	Write/read Option ROM data.
+
drivers/misc/Kconfig +12 -0
index 26386a9..d5280da 100644
@@ -353,6 +353,18 @@ config VMWARE_BALLOON
 	  To compile this driver as a module, choose M here: the
 	  module will be called vmware_balloon.
 
+config PCH_PHUB
+	tristate "PCH Packet Hub of Intel Topcliff"
+	depends on PCI
+	help
+	  This driver is for PCH(Platform controller Hub) PHUB(Packet Hub) of
+	  Intel Topcliff which is an IOH(Input/Output Hub) for x86 embedded
+	  processor. The Topcliff has MAC address and Option ROM data in SROM.
+	  This driver can access MAC address and Option ROM data in SROM.
+
+	  To compile this driver as a module, choose M here: the module will
+	  be called pch_phub.
+
 source "drivers/misc/c2port/Kconfig"
 source "drivers/misc/eeprom/Kconfig"
 source "drivers/misc/cb710/Kconfig"
drivers/misc/Makefile +1 -0
index 6ed06a1..6389eb3 100644
@@ -31,3 +31,4 @@ obj-$(CONFIG_IWMC3200TOP)      += iwmc3200top/
 obj-y				+= eeprom/
 obj-y				+= cb710/
 obj-$(CONFIG_VMWARE_BALLOON)	+= vmware_balloon.o
+obj-$(CONFIG_PCH_PHUB)		+= pch_phub.o
drivers/misc/pch_phub.c new file +717 -0

717 lines not on this page · raw message

Signature · 1 line
1.6.0.6
#1 lore raw
Quoted 6 lines · Masayuki Ohtak

Hi Greg,

Sorry, we have modified again, for a bug(illegal return code) and WARNING for building with the latest kernel.

Please check below.

Looks good. Do you want me to queue it up for the .37 kernel merge through my tree, or through someone elses?

thanks,

greg k-h

#2 lore raw

Hi Greg,

Thank you for your checking.

Quoted 2 lines

Do you want me to queue it up for the .37 kernel merge through my tree, or through someone elses?

I want you to queue our phub patch through your tree.

Thanks, Ohtake(OKISemi)
----- Original Message -----
From: "Greg KH" <[email protected]>
To: "Masayuki Ohtak" <[email protected]>
Cc: <[email protected]>; "LKML" <[email protected]>; <[email protected]>; <[email protected]>; <[email protected]>; <[email protected]>; <[email protected]>; <[email protected]>; "Tomoya MORINAGA" <[email protected]>
Sent: Thursday, September 02, 2010 8:09 AM
Subject: Re: [MeeGo-Dev][PATCH] Topcliff: Update PCH_PHUB driver to 2.6.35

Quoted 15 lines · Masayuki Ohtak
Quoted 6 lines

Hi Greg,

Sorry, we have modified again, for a bug(illegal return code) and WARNING for building with the latest kernel.

Please check below.

Looks good. Do you want me to queue it up for the .37 kernel merge through my tree, or through someone elses?

thanks,

greg k-h

#3 lore raw
Quoted 8 lines · Masayuki Ohtake

Hi Greg,

Thank you for your checking.

Quoted 2 lines

Do you want me to queue it up for the .37 kernel merge through my tree, or through someone elses?

I want you to queue our phub patch through your tree.

Ok, will do.

thanks,

greg k-h

#4 lore raw
In reply to Masayuki Ohtak
Quoted 4 lines · Masayuki Ohtak

Hi Greg,

Sorry, we have modified again, for a bug(illegal return code) and WARNING for building with the latest kernel.

Nope, I still get a warning with this patch, but I'll go fix it up:
CC [M] drivers/misc/pch_phub.o
drivers/misc/pch_phub.c: In function ‘pch_phub_probe’:
drivers/misc/pch_phub.c:582:334: warning: cast from pointer to integer of different size drivers/misc/pch_phub.c:585:2: warning: passing argument 2 of ‘pci_map_rom’ from incompatible pointer type include/linux/pci.h:803:43: note: expected ‘size_t *’ but argument is of type ‘unsigned int *’ drivers/misc/pch_phub.c:592:346: warning: cast from pointer to integer of different size

thanks,

greg k-h

#5 lore raw

Hi Greg,

Quoted 1 line

Nope, I still get a warning with this patch, but I'll go fix it up:

Sorry for our warning.
We tested with kernel-2.6.35.3.
We will modify so that warning becomes to disappear soon.

Thanks, Ohtake(OKISemi)
----- Original Message -----
From: "Greg KH" <[email protected]>
To: "Masayuki Ohtak" <[email protected]>
Cc: <[email protected]>; "LKML" <[email protected]>; <[email protected]>; <[email protected]>; <[email protected]>; <[email protected]>; <[email protected]>; <[email protected]>; <[email protected]>; "Tomoya MORINAGA" <[email protected]>
Sent: Thursday, September 02, 2010 10:02 AM
Subject: Re: [MeeGo-Dev][PATCH] Topcliff: Update PCH_PHUB driver to 2.6.35

Quoted 18 lines · Masayuki Ohtak
Quoted 4 lines

Hi Greg,

Sorry, we have modified again, for a bug(illegal return code) and WARNING for building with the latest kernel.

Nope, I still get a warning with this patch, but I'll go fix it up:
CC [M] drivers/misc/pch_phub.o
drivers/misc/pch_phub.c: In function $B!F(Bpch_phub_probe$B!G(B:
drivers/misc/pch_phub.c:582:334: warning: cast from pointer to integer of different size drivers/misc/pch_phub.c:585:2: warning: passing argument 2 of $B!F(Bpci_map_rom$B!G(B from incompatible pointer type include/linux/pci.h:803:43: note: expected $B!F(Bsize_t *$B!G(B but argument is of type $B!F(Bunsigned int *$B!G(B drivers/misc/pch_phub.c:592:346: warning: cast from pointer to integer of different size

thanks,

greg k-h

#6 lore raw
Quoted 6 lines · Masayuki Ohtake

Hi Greg,

Quoted 1 line

Nope, I still get a warning with this patch, but I'll go fix it up:

Sorry for our warning.
We tested with kernel-2.6.35.3.
We will modify so that warning becomes to disappear soon.

I already fixed this up now. The issue was that you were not using %p to print out a pointer and you were trying to use an int instead of a ssize_t for the pci rom stuff. All of that shows up when building on x86-64.

I've commited the fix to my tree, you should have been copied on it already.

thanks,

greg k-h

#7 lore raw

Hi Ohtake-san,

Would you please sync this patch with our source-forge also?

Hi Greg,

Thank you for your help.

Best Regards,
Qi.

Quoted 22 lines

-----Original Message-----
From: Greg KH [mailto:[email protected]]
Sent: Thursday, September 02, 2010 11:22 AM
To: Masayuki Ohtake
Cc: Greg KH; [email protected]; LKML; Wang, Yong Y; Wang, Qi; Khor, Andrew Chih Howe; [email protected]; [email protected]; Foster, Margie; Tomoya MORINAGA
Subject: Re: [MeeGo-Dev][PATCH] Topcliff: Update PCH_PHUB driver to 2.6.35

Quoted 6 lines · Masayuki Ohtake

Hi Greg,

Quoted 1 line

Nope, I still get a warning with this patch, but I'll go fix it up:

Sorry for our warning.
We tested with kernel-2.6.35.3.
We will modify so that warning becomes to disappear soon.

I already fixed this up now. The issue was that you were not using %p to print out a pointer and you were trying to use an int instead of a ssize_t for the pci rom stuff. All of that shows up when building on x86-64.

Quoted 6 lines

I've commited the fix to my tree, you should have been copied on it already.

thanks,

greg k-h

���{.n�+�������+%�����ݶ��w��{.n�+����{��G�����{ay�ʇڙ�,j��f���h��������z_�(�階�ݢj"���m������G������?����&���~��iO��z��v�^�m���� ������?�I�

#8 lore raw

Hi Qi-san

I will sync this phub patch to source-forge by today.

Thanks, Ohtake(OKISemi)
----- Original Message -----
From: "Wang, Qi" <[email protected]>
To: "Masayuki Ohtake" <[email protected]>; "Greg KH" <[email protected]>
Cc: <[email protected]>; "LKML" <[email protected]>; "Wang, Yong Y" <[email protected]>; "Khor, Andrew Chih Howe" <[email protected]>; <[email protected]>; <[email protected]>; "Foster, Margie" <[email protected]>; "Tomoya MORINAGA" <[email protected]>; "Greg KH" <[email protected]>
Sent: Thursday, September 02, 2010 12:29 PM
Subject: RE: [MeeGo-Dev][PATCH] Topcliff: Update PCH_PHUB driver to 2.6.35

Quoted 40 lines

Hi Ohtake-san,

Would you please sync this patch with our source-forge also?

Hi Greg,

Thank you for your help.

Best Regards,
Qi.

Quoted 28 lines

-----Original Message-----
From: Greg KH [mailto:[email protected]]
Sent: Thursday, September 02, 2010 11:22 AM
To: Masayuki Ohtake
Cc: Greg KH; [email protected]; LKML; Wang, Yong Y; Wang, Qi; Khor, Andrew Chih Howe; [email protected]; [email protected]; Foster, Margie; Tomoya MORINAGA
Subject: Re: [MeeGo-Dev][PATCH] Topcliff: Update PCH_PHUB driver to 2.6.35

Quoted 6 lines · Masayuki Ohtake

Hi Greg,

Quoted 1 line

Nope, I still get a warning with this patch, but I'll go fix it up:

Sorry for our warning.
We tested with kernel-2.6.35.3.
We will modify so that warning becomes to disappear soon.

I already fixed this up now. The issue was that you were not using %p to print out a pointer and you were trying to use an int instead of a ssize_t for the pci rom stuff. All of that shows up when building on x86-64.

I've commited the fix to my tree, you should have been copied on it already.

thanks,

greg k-h

#9 lore raw
Quoted 3 lines · Masayuki Ohtake

Hi Qi-san

I will sync this phub patch to source-forge by today.

You are going to delete this version when the driver is merged into the kernel tree, right? Please don't try to maintain the code external to the kernel, that never works properly.

thanks,

greg k-h

#10 lore raw

Hi Greg,

We are going to maintain our patch using kernel-tree's after merging kernel-tree.

Thanks, Ohtake(OKISemi)
----- Original Message -----
From: "Greg KH" <[email protected]>
To: "Masayuki Ohtake" <[email protected]>
Cc: "Wang, Qi" <[email protected]>; "Greg KH" <[email protected]>; <[email protected]>; "LKML" <[email protected]>; "Wang, Yong Y" <[email protected]>; "Khor, Andrew Chih Howe" <[email protected]>; <[email protected]>; <[email protected]>; "Foster, Margie" <[email protected]>; "Tomoya MORINAGA" <[email protected]>
Sent: Thursday, September 02, 2010 10:19 PM
Subject: Re: [MeeGo-Dev][PATCH] Topcliff: Update PCH_PHUB driver to 2.6.35

Quoted 13 lines · Masayuki Ohtake
Quoted 3 lines

Hi Qi-san

I will sync this phub patch to source-forge by today.

You are going to delete this version when the driver is merged into the kernel tree, right? Please don't try to maintain the code external to the kernel, that never works properly.

thanks,

greg k-h

#11 lore raw
Quoted 4 lines · Masayuki Ohtake

Hi Greg,

We are going to maintain our patch using kernel-tree's after merging kernel-tree.

The driver is now merged into the linux-next tree, so you should be fine. Please send any follow-on patches to me against that tree.

thanks,

greg k-h

#12 lore raw
In reply to Greg KH

Hi Greg KH,

When all the drivers are accepted by the upstream, our source-forge is useless. Currently it's a temporary site for us to smoke test the driver quality.

Best Regards,
Qi.

Quoted 14 lines

-----Original Message-----
From: Greg KH [mailto:[email protected]]
Sent: Thursday, September 02, 2010 9:19 PM
To: Masayuki Ohtake
Cc: Wang, Qi; Greg KH; [email protected]; LKML; Wang, Yong Y; Khor, Andrew Chih Howe; [email protected]; [email protected]; Foster, Margie; Tomoya MORINAGA
Subject: Re: [MeeGo-Dev][PATCH] Topcliff: Update PCH_PHUB driver to 2.6.35

Quoted 3 lines · Masayuki Ohtake

Hi Qi-san

I will sync this phub patch to source-forge by today.

Quoted 7 lines

You are going to delete this version when the driver is merged into the kernel tree, right? Please don't try to maintain the code external to the kernel, that never works properly.

thanks,

greg k-h

���{.n�+�������+%�����ݶ��w��{.n�+����{��G�����{ay�ʇڙ�,j��f���h��������z_�(�階�ݢj"���m������G������?����&���~��iO��z��v�^�m���� ������?�I�

#13 lore raw
In reply to Greg KH

Hi Greg,

Quoted 1 line

Nope, I still get a warning with this patch, but I'll go fix it up:

To see your indicated warning information,
I have tried to build the following(latest) version with our phub patch.
- linux-2.6.35.4
- linux-2.6.35.y

But we can't see the warning(No warning No error). How can we see the warning ?

Thanks, Ohtake(OKISemi)
----- Original Message -----
From: "Greg KH" <[email protected]>
To: "Masayuki Ohtake" <[email protected]>
Cc: "Greg KH" <[email protected]>; <[email protected]>; "LKML" <[email protected]>; <[email protected]>; <[email protected]>; <[email protected]>; <[email protected]>; <[email protected]>; <[email protected]>; "Tomoya MORINAGA" <[email protected]>
Sent: Thursday, September 02, 2010 12:22 PM
Subject: Re: [MeeGo-Dev][PATCH] Topcliff: Update PCH_PHUB driver to 2.6.35

Quoted 20 lines · Masayuki Ohtake
Quoted 6 lines

Hi Greg,

Quoted 1 line

Nope, I still get a warning with this patch, but I'll go fix it up:

Sorry for our warning.
We tested with kernel-2.6.35.3.
We will modify so that warning becomes to disappear soon.

I already fixed this up now. The issue was that you were not using %p to print out a pointer and you were trying to use an int instead of a ssize_t for the pci rom stuff. All of that shows up when building on x86-64.

I've commited the fix to my tree, you should have been copied on it already.

thanks,

greg k-h

#14 lore raw
Quoted 11 lines · Masayuki Ohtake

Hi Greg,

Quoted 1 line

Nope, I still get a warning with this patch, but I'll go fix it up:

To see your indicated warning information,
I have tried to build the following(latest) version with our phub patch.
- linux-2.6.35.4
- linux-2.6.35.y

But we can't see the warning(No warning No error). How can we see the warning ?

Build it on a x86-64 kernel. The issue was the 64bit size of a pointer and the ssize_t variable. My fix solved these issues for both the 32 and 64bit kernels.

thanks,

greg k-h

#15 lore raw

Hi Greg,

I understand.
Since we have only 32-bit kernel, we couldn't see the WARNINGs.

Thanks, Ohtake(OKISemi)

----- Original Message -----
From: "Greg KH" <[email protected]>
To: "Masayuki Ohtake" <[email protected]>
Cc: "Greg KH" <[email protected]>; <[email protected]>; "LKML" <[email protected]>; <[email protected]>; <[email protected]>; <[email protected]>; <[email protected]>; <[email protected]>; <[email protected]>; "Tomoya MORINAGA" <[email protected]>
Sent: Thursday, September 02, 2010 10:18 PM
Subject: Re: [MeeGo-Dev][PATCH] Topcliff: Update PCH_PHUB driver to 2.6.35

Quoted 21 lines · Masayuki Ohtake
Quoted 11 lines

Hi Greg,

Quoted 1 line

Nope, I still get a warning with this patch, but I'll go fix it up:

To see your indicated warning information,
I have tried to build the following(latest) version with our phub patch.
- linux-2.6.35.4
- linux-2.6.35.y

But we can't see the warning(No warning No error). How can we see the warning ?

Build it on a x86-64 kernel. The issue was the 64bit size of a pointer and the ssize_t variable. My fix solved these issues for both the 32 and 64bit kernels.

thanks,

greg k-h

#16 lore raw

patch "add Packet hub driver for Topcliff Platform controller hub" added to gregkh-2.6 tree

In reply to Masayuki Ohtak

This is a note to let you know that I've just added the patch titled

add Packet hub driver for Topcliff Platform controller hub

to my gregkh-2.6 tree which can be found in directory form at:
http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/patches/
and in git form at:
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/patches.git

The filename of this patch is:
add-packet-hub-driver-for-topcliff-platform-controller-hub.patch

The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.)

If this patch meets the merge guidelines for a bugfix, it should be merged into Linus's tree before the next major kernel release. If not, it will be merged into Linus's tree during the next merge window.

Either way, you will probably be copied on the patch when it gets sent to Linus for merging so that others can see what is happening in kernel development.

If you have any questions about this process, please let me know.

Quoted 1 line

From [email protected] Wed Sep 1 17:59:25 2010

Message-ID: <[email protected]>
Date: Wed, 01 Sep 2010 21:16:30 +0900
From: Masayuki Ohtak <[email protected]>
To: [email protected], LKML <[email protected]>,
[email protected]
Cc: [email protected], [email protected],
[email protected], [email protected], [email protected], [email protected], Tomoya MORINAGA <[email protected]>
Subject: add Packet hub driver for Topcliff Platform controller hub

Packet hub driver of Topcliff PCH

Topcliff PCH is the platform controller hub that is going to be used in Intel's upcoming general embedded platform. All IO peripherals in Topcliff PCH are actually devices sitting on AMBA bus. Packet hub is a special converter device in Topcliff PCH that translate AMBA transactions to PCI Express transactions and vice versa. Thus packet hub helps present all IO peripherals in Topcliff PCH as PCIE devices to IA system. Topcliff PCH has MAC address and Option ROM data.
These data are in SROM which is connected to PCIE bus.
Packet hub driver of Topcliff PCH can access MAC address and Option ROM data in SROM via sysfs interface.

---
 Documentation/ABI/testing/sysfs-module |   12 
 drivers/misc/Kconfig                   |   12 
 drivers/misc/Makefile                  |    1 
 drivers/misc/pch_phub.c                |  717 +++++++++++++++++++++++++++++++++
 4 files changed, 742 insertions(+)
Documentation/ABI/testing/sysfs-module new file +12 -0
@@ -0,0 +1,12 @@
+What:		/sys/module/pch_phub/drivers/.../pch_mac
+Date:		August 2010
+KernelVersion:	2.6.35
+Contact:	[email protected]
+Description:	Write/read GbE MAC address.
+
+What:		/sys/module/pch_phub/drivers/.../pch_firmware
+Date:		August 2010
+KernelVersion:	2.6.35
+Contact:	[email protected]
+Description:	Write/read Option ROM data.
+
drivers/misc/Kconfig +12 -0
@@ -390,6 +390,18 @@ config BMP085
 	  To compile this driver as a module, choose M here: the
 	  module will be called bmp085.
 
+config PCH_PHUB
+	tristate "PCH Packet Hub of Intel Topcliff"
+	depends on PCI
+	help
+	  This driver is for PCH(Platform controller Hub) PHUB(Packet Hub) of
+	  Intel Topcliff which is an IOH(Input/Output Hub) for x86 embedded
+	  processor. The Topcliff has MAC address and Option ROM data in SROM.
+	  This driver can access MAC address and Option ROM data in SROM.
+
+	  To compile this driver as a module, choose M here: the module will
+	  be called pch_phub.
+
 source "drivers/misc/c2port/Kconfig"
 source "drivers/misc/eeprom/Kconfig"
 source "drivers/misc/cb710/Kconfig"
drivers/misc/Makefile +1 -0
@@ -35,3 +35,4 @@ obj-y				+= eeprom/
 obj-y				+= cb710/
 obj-$(CONFIG_VMWARE_BALLOON)	+= vmware_balloon.o
 obj-$(CONFIG_ARM_CHARLCD)	+= arm-charlcd.o
+obj-$(CONFIG_PCH_PHUB)		+= pch_phub.o
drivers/misc/pch_phub.c new file +717 -0

717 lines not on this page · raw message