Hi Greg, We will re-make PCH_PHUB with sysfs I/F.
Thanks, Ohtake. ----- Original Message ----- From: "Greg KH" <[email protected]> To: "Development for the MeeGo Project (discussion list)" <[email protected]> Cc: "Khor, Andrew Chih Howe" <[email protected]> Sent: Wednesday, August 04, 2010 11:52 PM Subject: Re: [MeeGo-dev] [MeeGo-Dev][PATCH] Topcliff: Update PCH_PHUB driverto 2.6.35 > On Wed, Aug 04, 2010 at 01:25:26PM +0900, Masayuki Ohtake wrote: > > ----- Original Message ----- > > From: "Greg KH" <[email protected]> > > To: "Development for the MeeGo Project (discussion list)" > > <[email protected]> > > Cc: "Khor, Andrew Chih Howe" <[email protected]> > > Sent: Tuesday, August 03, 2010 11:47 PM > > Subject: Re: [MeeGo-dev] [MeeGo-Dev][PATCH] Topcliff: Update PCH_PHUB > > driver to 2.6.35 > > > > > > > On Tue, Aug 03, 2010 at 07:48:48PM +0900, Masayuki Ohtake wrote: > > > > Hi Greg KH, > > > > > > > > I have added my answer below. > > > > Please find '<MASA>'. > > > > > > > > Thanks, Ohtake > > > > > > > > ----- Original Message ----- > > > > From: "Greg KH" <[email protected]> > > > > To: "Development for the MeeGo Project (discussion list)" > > > > <[email protected]> > > > > Cc: "Khor, Andrew Chih Howe" <[email protected]> > > > > Sent: Tuesday, August 03, 2010 12:57 PM > > > > Subject: Re: [MeeGo-dev] [MeeGo-Dev][PATCH] Topcliff: Update PCH_PHUB > > > > driver to 2.6.35 > > > > > > > > > > > > > On Tue, Aug 03, 2010 at 11:34:32AM +0800, Wang, Qi wrote: > > > > > > 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. > > > > > > The driver creates a character device /dev/pch_phub. That device > > > > > > file > > > > > > supports the following operations: > > > > > > > > > > > > read() :Read Option ROM data of SROM > > > > > > write():Write Option ROM data of SROM > > > > > > > > > > Shouldn't that just be done with a standard sysfs binary file instead > > > > > of > > > > > a character device node? > > > > <MASA>This driver also sets Phub hw configuration. > > > > > > It does? From userspace? I didn't see that code, care to point it out? > > > > <MASA> > > Phub hw configuration is in probe processing like below. > > > > + /* set the prefech value */ > > + iowrite32(0x000ffffa, pch_phub_reg.pch_phub_base_address + 0x14); > > + /* set the interrupt delay value */ > > + iowrite32(0x25, pch_phub_reg.pch_phub_base_address + 0x44); > > > > Can you agree that phub is integrated as character device ? > > That's fine for the probe, but what does that have to do with the > character device interface? > > And if you really need to set/read those values from userspace, then > just provide simple sysfs files to read/write to them, that is exactly > what sysfs is for. Don't rely on magic offsets within a character > device. > > thanks, > > greg k-h > _______________________________________________ > MeeGo-dev mailing list > [email protected] > http://lists.meego.com/listinfo/meego-dev > _______________________________________________ MeeGo-dev mailing list [email protected] http://lists.meego.com/listinfo/meego-dev
