From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754626AbdAaAKP (ORCPT ); Mon, 30 Jan 2017 19:10:15 -0500 Received: from mail.kernel.org ([198.145.29.136]:36798 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753363AbdAaAKN (ORCPT ); Mon, 30 Jan 2017 19:10:13 -0500 Date: Mon, 30 Jan 2017 18:09:14 -0600 From: Bjorn Helgaas To: "zhichang.yuan" Cc: catalin.marinas@arm.com, will.deacon@arm.com, robh+dt@kernel.org, frowand.list@gmail.com, bhelgaas@google.com, rafael@kernel.org, mark.rutland@arm.com, brian.starkey@arm.com, olof@lixom.net, arnd@arndb.de, linux-arm-kernel@lists.infradead.org, lorenzo.pieralisi@arm.com, benh@kernel.crashing.org, linux-kernel@vger.kernel.org, linuxarm@huawei.com, devicetree@vger.kernel.org, linux-pci@vger.kernel.org, linux-serial@vger.kernel.org, minyard@acm.org, liviu.dudau@arm.com, zourongrong@gmail.com, john.garry@huawei.com, gabriele.paoloni@huawei.com, zhichang.yuan02@gmail.com, kantyzc@163.com, xuwei5@hisilicon.com Subject: Re: [PATCH V6 1/5] LIB: Indirect ISA/LPC port IO introduced Message-ID: <20170131000914.GA11331@bhelgaas-glaptop.roam.corp.google.com> References: <1485241525-201782-1-git-send-email-yuanzhichang@hisilicon.com> <1485241525-201782-2-git-send-email-yuanzhichang@hisilicon.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1485241525-201782-2-git-send-email-yuanzhichang@hisilicon.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 24, 2017 at 03:05:21PM +0800, zhichang.yuan wrote: > Low-pin-count interface is integrated into some SoCs. The accesses to those > peripherals under LPC make use of I/O ports rather than the memory mapped I/O. > > To drive these devices, this patch introduces a method named indirect-IO. It's slightly confusing to call this "indirect I/O" and then use "extio" for the filename and function prefix. It'd be nice to use related names. > +struct extio_node { > + unsigned long bus_start; /* bus start address */ > + unsigned long io_start; /* io port token corresponding to bus_start */ > + size_t range_size; /* size of the extio node operating range */ > + struct fwnode_handle *fwnode; > + struct list_head list; > + struct extio_ops *ops; /* ops operating on this node */ > + void *devpara; /* private parameter of the host device */ > +}; I wish we didn't have both struct io_range and struct extio_node. It seems like they're both sort of trying to do the same thing. Maybe this is the same as what Alex is saying. Bjorn