Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753376Ab3IWRKr (ORCPT ); Mon, 23 Sep 2013 13:10:47 -0400 Received: from quartz.orcorp.ca ([184.70.90.242]:42008 "EHLO quartz.orcorp.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752448Ab3IWRKp (ORCPT ); Mon, 23 Sep 2013 13:10:45 -0400 Date: Mon, 23 Sep 2013 11:10:29 -0600 From: Jason Gunthorpe To: Michal Simek Cc: Yves Vandervennet , Alan Tull , Jason Cooper , Michal Simek , linux-kernel@vger.kernel.org, Pavel Machek , Greg Kroah-Hartman , Dinh Nguyen , Philip Balister , Alessandro Rubini , Mauro Carvalho Chehab , Andrew Morton , Cesar Eduardo Barros , Joe Perches , "David S. Miller" , Stephen Warren , Arnd Bergmann , David Brown , Dom Cobley Subject: Re: [RFC PATCH] fpga: Introduce new fpga subsystem Message-ID: <20130923171029.GA29429@obsidianresearch.com> References: <20130918191517.GQ19937@titan.lakedaemon.net> <20130918203247.GA11181@obsidianresearch.com> <1379539063.31417.23.camel@atx-linux-37> <523AD814.1060406@monstr.eu> <20130919172814.GA3855@obsidianresearch.com> <52403DB3.1080902@monstr.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <52403DB3.1080902@monstr.eu> User-Agent: Mutt/1.5.21 (2010-09-15) X-Broken-Reverse-DNS: no host name found for IP address 10.0.0.161 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1666 Lines: 42 On Mon, Sep 23, 2013 at 03:10:11PM +0200, Michal Simek wrote: > > 1) The driver doesn't know what firmware to request. It just knows > > how to send it to a FPGA. > > But dts property in the manager driver which uses this as end driver > can know that. I think the device tree maintainers would push back on this since it is not "describing the hardware" > > 2) Telling the kernel a filename via sysfs and then having it go > > around the long way via request_firwmare to get the data is silly. > > Just give the kernel the actual data instead of a file name > > Firmware interface is valid way how to pass bitstream to the kernel. > If you don't like just don't use it. For example you can add > firmware blob directly to the kernel and load this at bootup phase > without user-space access. I'm not against using request firmware for what it is ment for: having the kernel autonomously load firmware. I am against the sysfs API in the core code where userspace writes a file name that is then used to request_firwmare. That is a goofy API for the reasons I outlined. It is appropriate to use request firmware at the driver level where the driver somehow knows what FPGA to request. > and there will be this option. But don't try to restrict others > if they want to do it just in the kernel in early phase. Doing the load in kernel early phase doesn't involve the user space sysfs interface. Jason -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/