From owner-freebsd-mips@FreeBSD.ORG Fri Feb 19 15:07:22 2010 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E52781065679 for ; Fri, 19 Feb 2010 15:07:22 +0000 (UTC) (envelope-from c.jayachandran@gmail.com) Received: from mail-px0-f180.google.com (mail-px0-f180.google.com [209.85.216.180]) by mx1.freebsd.org (Postfix) with ESMTP id C00E18FC1A for ; Fri, 19 Feb 2010 15:07:22 +0000 (UTC) Received: by pxi10 with SMTP id 10so91226pxi.13 for ; Fri, 19 Feb 2010 07:07:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:cc:content-type; bh=q5rlR1HvN5z58TtrMXYDqPbD6hVje+CP6FNDlkFponk=; b=WoXLn+k3OaoJjtPVuoNUtl+FcmWkTKXp3uNNxrhsYJIWmF/SqvPa7SiEDrETatYtLP zr+QBEAWC8HbderEUOjMi2VkrSPIM8Z5eWiM0x03eiG2697MMIjk1EKxfdD9pouTD9E5 25kogH0U5URfKYj+4j6EiaVN6c11xcDROrQl4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:cc:content-type; b=VVknBtjRwXyVxlsxwijlUwTXCRHQ5xyiPjn7UhLHRpGEzaK/crueNx42LKNUkFIsgP QVOfTYpY1l6ubePkMrDUt2AiPSABWFW15qIbM0SbIXS9vdWP3oF7lBG4px7bO4M0aWJ+ BIpsbN1dbpsZemPq5JyUq/ChTMH1o36x9hT3U= MIME-Version: 1.0 Received: by 10.141.89.6 with SMTP id r6mr7480635rvl.52.1266592042167; Fri, 19 Feb 2010 07:07:22 -0800 (PST) Date: Fri, 19 Feb 2010 20:37:22 +0530 Message-ID: <98a59be81002190707y54f8965au98aa47e8c45db3e1@mail.gmail.com> From: "C. Jayachandran" To: Randall Stewart Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-mips@freebsd.org Subject: Patches for PCI support on RMI XLR/XLS. X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2010 15:07:23 -0000 Hi Randall, I've a few updates to add PCI support for XLR boards and PCIe support for XLS boards. The patches are: http://sites.google.com/site/cjayachandran/files/intr-fixes.patch Some fixes to the current RMI interrupt handling, changes in this patch are: - (cleanup) remove rmi specific 'struct mips_intrhand' - this is no longer needed since 'struct intr_event' have all the required hooks - add xlr_cpu_establish_hardintr, which has args for pre/post ithread and filter hooks, so that the PCI code can add the PCI controller interrupt ack code here - make 'cpu_establish_hardintr' use the above function. - (fix) change type of eirr/eimr from register_t to uint64_t. These have to be 64bit otherwise we cannot handle interrupts from 32. - (fix) use eimr to mask eirr before checking interrupts, so that we will not handle masked interrupts. http://sites.google.com/site/cjayachandran/files/bus_space_rmi.cleanup.patch Cleanups for sys/mips/rmi/bus_space_rmi.c - remove pci related code from bus_space_rmi.c, we will have another file for PCI bus space functions which will do byte-swapping. - remove local SWAP implementation - added TODO stub for unimplemented functions http://sites.google.com/site/cjayachandran/files/pci-update.patch Changes for pci and pci-e support - add bus_space_rmi_pci.c for PCI bus space - files.xlr update for changes in files - pcibus.c merged into xlr_pci.c (they were small files with inter-dependencies) - xlr_pci.c - lot of changes here with few fixes, formatting cleanup http://sites.google.com/site/cjayachandran/files/rge.patch Fix for the rge driver for boards without rge6 and rge7. - changes to avoid adding theses instances on specific chips This brings the PCI support to the functionality we had in the 6 release. I have tested with the rl driver on XLR, and the msk driver on XLS for PCIe and both work. (although msk needs a trivial patch for big-endian support). Please review and apply if there are no issues. I have some patches for MSI support against 6.4. Moving that to 9 that probably needs changes to the common interrupt handling code, my current idea is to have something like 'struct intsrc' in i386 to handle this. Thanks, JC.