From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43243) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VwGnl-00073e-2i for qemu-devel@nongnu.org; Thu, 26 Dec 2013 14:41:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VwGng-0007R6-Qi for qemu-devel@nongnu.org; Thu, 26 Dec 2013 14:41:01 -0500 Received: from mx1.redhat.com ([209.132.183.28]:50522) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VwGng-0007R0-I4 for qemu-devel@nongnu.org; Thu, 26 Dec 2013 14:40:56 -0500 Message-ID: <52BC863F.5010600@redhat.com> Date: Thu, 26 Dec 2013 20:40:47 +0100 From: Hans de Goede MIME-Version: 1.0 References: <1387960503-11838-1-git-send-email-lig.fnst@cn.fujitsu.com> <52BB74E5.8010602@cn.fujitsu.com> <52BB7AC0.5080909@cn.fujitsu.com> <52BB7F36.6040101@cn.fujitsu.com> In-Reply-To: <52BB7F36.6040101@cn.fujitsu.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] allwinner-a10: add config script support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Li Guang , Peter Maydell Cc: Peter Crosthwaite , QEMU Developers Hi, On 12/26/2013 01:58 AM, Li Guang wrote: > Peter Maydell wrote: >> On 26 December 2013 00:39, Li Guang wrote: >>> Peter Maydell wrote: >>>> On 26 December 2013 00:14, Li Guang wrote: >>>>> it's the approach sunxi-linux kernel config hardware, >>>>> the binary is actually a transformed text script, >>>>> and context of script is like: >>>>> >>>>> [card0_boot_para] >>>>> card_ctrl = 0 >>>>> card_high_speed = 1 >>>>> card_line = 4 >>>>> sdc_d1 = port:PF00<2><1> >>>>> sdc_d0 = port:PF01<2><1> >>>>> sdc_clk = port:PF02<2><1> >>>>> sdc_cmd = port:PF03<2><1> >>>>> sdc_d3 = port:PF04<2><1> >>>>> sdc_d2 = port:PF05<2><1> >>>>> >>>> So what sets this up on real hardware? Is this part of >>>> a firmware blob? Is it in ROM or flash? >>> it's generally in /boot, bootloader will load it >>> into ram address 0x43000000, kernel will find it >>> at this fixed address, and parse it, learn the hardware >>> related configuration, mostly property of devices, and >>> GPIOes used. >> Weird. Why isn't this just using devicetree? > > don't know the exactly reason linux-sunxi community > do this(actually, the script parsing code mostly wrote > by engineer from Allwinner). I'm one of the linux-sunxi developers, the only reason we've this fex file abomination, is because we've inherited it from the android-allwinner sources. Currently most of the linux-sunxi developers are no longer focusing on the 3.4 android/allwinner derived sources we maintain. They are currently in a "good enough for everyday use" state. So now most of us are focusing on getting *proper* sunxi SoC support upstream. This is using device-tree. Currently we've working timers, interrupt-controller, uarts, mmc, sata, nic (both 100mbit and Gbit variants), ehci controller and builtin rtc support with upstream kernels. Which I believe likely covers everything the qemu emulation offers atm. For those interested, see: https://github.com/linux-sunxi/linux-sunxi/commits/sunxi-devel And the mailinglist reports about progress in that branch. From the linux-sunxi pov fex files are a legacy thing which will go away in the future. Regards, Hans