Re: [PATCH V3 2/4] ARM64 LPC: LPC driver implementation on Hip06

2016-10-06 Thread John Garry
On 06/10/2016 01:18, Benjamin Herrenschmidt wrote: On Tue, 2016-10-04 at 13:02 +0100, John Garry wrote: Right, so I think Zhichang can make the necessary generic changes to 8250 OF driver to support IO port as well as MMIO-based. However an LPC-based earlycon driver is still required. A note o

Re: [PATCH V3 2/4] ARM64 LPC: LPC driver implementation on Hip06

2016-10-05 Thread Benjamin Herrenschmidt
On Tue, 2016-10-04 at 13:02 +0100, John Garry wrote: > Right, so I think Zhichang can make the necessary generic changes to  > 8250 OF driver to support IO port as well as MMIO-based. > > However an LPC-based earlycon driver is still required. > > A note on hip07-based D05 (for those unaware): th

Re: [PATCH V3 2/4] ARM64 LPC: LPC driver implementation on Hip06

2016-10-04 Thread John Garry
On 02/10/2016 23:03, Jon Masters wrote: On 09/14/2016 02:32 PM, Arnd Bergmann wrote: On Wednesday, September 14, 2016 10:50:44 PM CEST zhichang.yuan wrote: And there are probably multiple child devices under LPC, the global arm64_extio_ops only can cover one PIO range. It is fortunate only i

Re: [PATCH V3 2/4] ARM64 LPC: LPC driver implementation on Hip06

2016-10-02 Thread Jon Masters
On 09/14/2016 02:32 PM, Arnd Bergmann wrote: > On Wednesday, September 14, 2016 10:50:44 PM CEST zhichang.yuan wrote: >> And there are probably multiple child devices under LPC, the global >> arm64_extio_ops only can cover one PIO range. It is fortunate only ipmi >> driver can not support I/O >>

RE: [PATCH V3 2/4] ARM64 LPC: LPC driver implementation on Hip06

2016-09-26 Thread Gabriele Paoloni
rg; John Garry; > > > will.dea...@arm.com; linux-kernel@vger.kernel.org; Yuanzhichang; > > > Linuxarm; xuwei (O); linux-ser...@vger.kernel.org; > > > b...@kernel.crashing.org; zourongr...@gmail.com; > liviu.du...@arm.com; > > > kant...@163.com > > > Subject: Re

Re: [PATCH V3 2/4] ARM64 LPC: LPC driver implementation on Hip06

2016-09-24 Thread Arnd Bergmann
On Saturday, September 24, 2016 4:14:15 PM CEST zhichang wrote: > > In V3, the outb is : > > void outb(u8 value, unsigned long addr) > { > if (!arm64_extio_ops || arm64_extio_ops->start > addr || > arm64_extio_ops->end < addr) > writeb(value, PCI_IO

Re: [PATCH V3 2/4] ARM64 LPC: LPC driver implementation on Hip06

2016-09-24 Thread zhichang
Hi, Arnd, On 2016年09月23日 23:55, Arnd Bergmann wrote: > On Friday, September 23, 2016 2:59:55 PM CEST Gabriele Paoloni wrote: >> From the perspective of the indirect IO function the input parameter is an unsigned long addr that (now) can be either: 1) an IO token coming from a legacy

Re: [PATCH V3 2/4] ARM64 LPC: LPC driver implementation on Hip06

2016-09-24 Thread zhichang
Hi, Arnd, On 2016年09月23日 17:51, Arnd Bergmann wrote: > On Friday, September 23, 2016 12:27:17 AM CEST zhichang.yuan wrote: >> For this patch sketch, I have a question. >> Do we call pci_address_to_pio in arch_of_address_to_pio to get the >> corresponding logical IO port >> for LPC?? > > > No,

Re: [PATCH V3 2/4] ARM64 LPC: LPC driver implementation on Hip06

2016-09-23 Thread Arnd Bergmann
On Friday, September 23, 2016 2:59:55 PM CEST Gabriele Paoloni wrote: > > > > From the perspective of the indirect IO function the input parameter > > > is an unsigned long addr that (now) can be either: > > > 1) an IO token coming from a legacy pci device > > > 2) a phys address that lives on the

RE: [PATCH V3 2/4] ARM64 LPC: LPC driver implementation on Hip06

2016-09-23 Thread Gabriele Paoloni
rg; John Garry; > > > will.dea...@arm.com; linux-kernel@vger.kernel.org; Yuanzhichang; > > > Linuxarm; xuwei (O); linux-ser...@vger.kernel.org; > > > b...@kernel.crashing.org; zourongr...@gmail.com; > liviu.du...@arm.com; > > > kant...@163.com > > > Subject: Re

Re: [PATCH V3 2/4] ARM64 LPC: LPC driver implementation on Hip06

2016-09-23 Thread Arnd Bergmann
r...@vger.kernel.org; > > b...@kernel.crashing.org; zourongr...@gmail.com; liviu.du...@arm.com; > > kant...@163.com > > Subject: Re: [PATCH V3 2/4] ARM64 LPC: LPC driver implementation on > > Hip06 > > > > On Friday, September 23, 2016 12:27:17 AM CEST zhichang.yu

RE: [PATCH V3 2/4] ARM64 LPC: LPC driver implementation on Hip06

2016-09-23 Thread Gabriele Paoloni
x-...@vger.kernel.org; gre...@linuxfoundation.org; John Garry; > will.dea...@arm.com; linux-kernel@vger.kernel.org; Yuanzhichang; > Linuxarm; xuwei (O); linux-ser...@vger.kernel.org; > b...@kernel.crashing.org; zourongr...@gmail.com; liviu.du...@arm.com; > kant...@163.com > Subjec

Re: [PATCH V3 2/4] ARM64 LPC: LPC driver implementation on Hip06

2016-09-23 Thread Arnd Bergmann
On Friday, September 23, 2016 12:27:17 AM CEST zhichang.yuan wrote: > For this patch sketch, I have a question. > Do we call pci_address_to_pio in arch_of_address_to_pio to get the > corresponding logical IO port > for LPC?? No, of course not, that would be silly: The argument to pci_address_to

Re: [PATCH V3 2/4] ARM64 LPC: LPC driver implementation on Hip06

2016-09-22 Thread zhichang.yuan
On 09/22/2016 08:14 PM, Arnd Bergmann wrote: On Thursday, September 22, 2016 11:55:45 AM CEST Gabriele Paoloni wrote: I think extending of_empty_ranges_quirk() may be a reasonable solution. What do you think Arnd? I don't really like that idea, that quirk is meant to work around broken DTs,

Re: [PATCH V3 2/4] ARM64 LPC: LPC driver implementation on Hip06

2016-09-22 Thread zhichang.yuan
] ARM64 LPC: LPC driver implementation on Hip06 On Thursday, September 22, 2016 2:47:14 PM CEST Gabriele Paoloni wrote: static int of_empty_ranges_quirk(struct device_node *np) { if (IS_ENABLED(CONFIG_PPC)) { @@ -503,7 +512,7 @@ static int of_translate_one(struct device_node *parent

RE: [PATCH V3 2/4] ARM64 LPC: LPC driver implementation on Hip06

2016-09-22 Thread Gabriele Paoloni
@vger.kernel.org; gre...@linuxfoundation.org; John Garry; > will.dea...@arm.com; linux-kernel@vger.kernel.org; Yuanzhichang; > Linuxarm; xuwei (O); linux-ser...@vger.kernel.org; > b...@kernel.crashing.org; zourongr...@gmail.com; liviu.du...@arm.com; > kant...@163.com > Subject: Re:

Re: [PATCH V3 2/4] ARM64 LPC: LPC driver implementation on Hip06

2016-09-22 Thread Arnd Bergmann
On Thursday, September 22, 2016 2:47:14 PM CEST Gabriele Paoloni wrote: > > > static int of_empty_ranges_quirk(struct device_node *np) > > > { > > > if (IS_ENABLED(CONFIG_PPC)) { > > > @@ -503,7 +512,7 @@ static int of_translate_one(struct device_node > > *parent, struct of_bus *bus, > >

RE: [PATCH V3 2/4] ARM64 LPC: LPC driver implementation on Hip06

2016-09-22 Thread Gabriele Paoloni
@vger.kernel.org; gre...@linuxfoundation.org; John Garry; > will.dea...@arm.com; linux-kernel@vger.kernel.org; Yuanzhichang; > Linuxarm; xuwei (O); linux-ser...@vger.kernel.org; > b...@kernel.crashing.org; zourongr...@gmail.com; liviu.du...@arm.com; > kant...@163.com > Subject: Re:

Re: [PATCH V3 2/4] ARM64 LPC: LPC driver implementation on Hip06

2016-09-22 Thread Arnd Bergmann
On Thursday, September 22, 2016 11:55:45 AM CEST Gabriele Paoloni wrote: > > > I think extending of_empty_ranges_quirk() may be a reasonable > > solution. > > > What do you think Arnd? > > > > I don't really like that idea, that quirk is meant to work around > > broken DTs, but we can just make th

RE: [PATCH V3 2/4] ARM64 LPC: LPC driver implementation on Hip06

2016-09-22 Thread Gabriele Paoloni
@vger.kernel.org; gre...@linuxfoundation.org; John Garry; > will.dea...@arm.com; linux-kernel@vger.kernel.org; Yuanzhichang; > Linuxarm; xuwei (O); linux-ser...@vger.kernel.org; > b...@kernel.crashing.org; zourongr...@gmail.com; liviu.du...@arm.com; > kant...@163.com > Subject: Re:

Re: [PATCH V3 2/4] ARM64 LPC: LPC driver implementation on Hip06

2016-09-21 Thread Arnd Bergmann
On Wednesday, September 21, 2016 4:20:55 PM CEST Gabriele Paoloni wrote: > > -Original Message- > > From: zhichang [mailto:zhichang.yua...@gmail.com] > > On 2016年09月15日 20:24, Arnd Bergmann wrote: > > > On Thursday, September 15, 2016 12:05:51 PM CEST Gabriele Paoloni > > wrote: > > >>> ---

RE: [PATCH V3 2/4] ARM64 LPC: LPC driver implementation on Hip06

2016-09-21 Thread Gabriele Paoloni
...@acm.org; linux-...@vger.kernel.org; > gre...@linuxfoundation.org; John Garry; will.dea...@arm.com; linux- > ker...@vger.kernel.org; Yuanzhichang; Linuxarm; xuwei (O); linux- > ser...@vger.kernel.org; b...@kernel.crashing.org; > zourongr...@gmail.com; liviu.du...@arm.com; kant...@163.com >

Re: [PATCH V3 2/4] ARM64 LPC: LPC driver implementation on Hip06

2016-09-21 Thread zhichang
Hi, Arnd, On 2016年09月15日 20:24, Arnd Bergmann wrote: > On Thursday, September 15, 2016 12:05:51 PM CEST Gabriele Paoloni wrote: >>> -Original Message- >>> On Thursday, September 15, 2016 8:02:27 AM CEST Gabriele Paoloni wrote: From <<3.1.1. Open Firmware Properties for Bus Node

RE: [PATCH V3 2/4] ARM64 LPC: LPC driver implementation on Hip06

2016-09-15 Thread Gabriele Paoloni
.kernel.org; > gre...@linuxfoundation.org; John Garry; will.dea...@arm.com; linux- > ker...@vger.kernel.org; Yuanzhichang; Linuxarm; xuwei (O); linux- > ser...@vger.kernel.org; b...@kernel.crashing.org; > zourongr...@gmail.com; liviu.du...@arm.com; kant...@163.com; > zhichang.yua...@gmail.com > S

Re: [PATCH V3 2/4] ARM64 LPC: LPC driver implementation on Hip06

2016-09-15 Thread Arnd Bergmann
On Thursday, September 15, 2016 12:05:51 PM CEST Gabriele Paoloni wrote: > > -Original Message- > > On Thursday, September 15, 2016 8:02:27 AM CEST Gabriele Paoloni wrote: > > > > > > From <<3.1.1. Open Firmware Properties for Bus Nodes>> in > > > http://www.firmware.org/1275/bindings/isa/i

RE: [PATCH V3 2/4] ARM64 LPC: LPC driver implementation on Hip06

2016-09-15 Thread Gabriele Paoloni
.@linuxfoundation.org; b...@kernel.crashing.org; John Garry; > will.dea...@arm.com; linux-kernel@vger.kernel.org; xuwei (O); Linuxarm; > linux-ser...@vger.kernel.org; linux-...@vger.kernel.org; > zourongr...@gmail.com; liviu.du...@arm.com; kant...@163.com; > zhichang.yua...@gmail.com &g

Re: [PATCH V3 2/4] ARM64 LPC: LPC driver implementation on Hip06

2016-09-15 Thread Arnd Bergmann
On Thursday, September 15, 2016 8:02:27 AM CEST Gabriele Paoloni wrote: > > From <<3.1.1. Open Firmware Properties for Bus Nodes>> in > http://www.firmware.org/1275/bindings/isa/isa0_4d.ps > > I quote: > "There shall be an entry in the "ranges" property for each > of the Memory and/or I/O spaces

RE: [PATCH V3 2/4] ARM64 LPC: LPC driver implementation on Hip06

2016-09-15 Thread Gabriele Paoloni
.@linuxfoundation.org; b...@kernel.crashing.org; John Garry; > will.dea...@arm.com; linux-kernel@vger.kernel.org; xuwei (O); Linuxarm; > linux-ser...@vger.kernel.org; linux-...@vger.kernel.org; > zourongr...@gmail.com; liviu.du...@arm.com; kant...@163.com; > zhichang.yua...@gmail.com &g

Re: [PATCH V3 2/4] ARM64 LPC: LPC driver implementation on Hip06

2016-09-14 Thread Arnd Bergmann
On Wednesday, September 14, 2016 10:50:44 PM CEST zhichang.yuan wrote: > > On 2016/9/14 20:33, Arnd Bergmann wrote: > > On Wednesday, September 14, 2016 8:15:52 PM CEST Zhichang Yuan wrote: > > > >> +Required properties: > >> +- compatible: should be "hisilicon,low-pin-count" > >> +- #address-cel

Re: [PATCH V3 2/4] ARM64 LPC: LPC driver implementation on Hip06

2016-09-14 Thread zhichang.yuan
On 2016/9/14 20:33, Arnd Bergmann wrote: > On Wednesday, September 14, 2016 8:15:52 PM CEST Zhichang Yuan wrote: > >> +Required properties: >> +- compatible: should be "hisilicon,low-pin-count" >> +- #address-cells: must be 2 which stick to the ISA/EISA binding doc. >> +- #size-cells: must be 1

Re: [PATCH V3 2/4] ARM64 LPC: LPC driver implementation on Hip06

2016-09-14 Thread kbuild test robot
Hi zhichang.yuan, [auto build test ERROR on linus/master] [also build test ERROR on v4.8-rc6 next-20160914] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] [Suggest to use git(>=2.9.0) format-patch --base= (or --base=auto for convenience) to rec

Re: [PATCH V3 2/4] ARM64 LPC: LPC driver implementation on Hip06

2016-09-14 Thread Arnd Bergmann
On Wednesday, September 14, 2016 8:15:52 PM CEST Zhichang Yuan wrote: > +Required properties: > +- compatible: should be "hisilicon,low-pin-count" > +- #address-cells: must be 2 which stick to the ISA/EISA binding doc. > +- #size-cells: must be 1 which stick to the ISA/EISA binding doc. > +- reg:

[PATCH V3 2/4] ARM64 LPC: LPC driver implementation on Hip06

2016-09-14 Thread Zhichang Yuan
From: "zhichang.yuan" On Hip06, the accesses to LPC peripherals work in an indirect way. A corresponding LPC driver configure some registers in LPC master at first, then the real accesses on LPC slave devices are finished by the LPC master, which is transparent to LPC driver. This patch implement