From owner-svn-src-head@FreeBSD.ORG Thu Feb 26 02:05:46 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ECCEE8A2; Thu, 26 Feb 2015 02:05:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BE04933A; Thu, 26 Feb 2015 02:05:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1Q25kQC073945; Thu, 26 Feb 2015 02:05:46 GMT (envelope-from jchandra@FreeBSD.org) Received: (from jchandra@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1Q25ktg073943; Thu, 26 Feb 2015 02:05:46 GMT (envelope-from jchandra@FreeBSD.org) Message-Id: <201502260205.t1Q25ktg073943@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jchandra set sender to jchandra@FreeBSD.org using -f From: "Jayachandran C." Date: Thu, 26 Feb 2015 02:05:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r279305 - in head/sys: boot/fdt/dts/mips mips/nlm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Feb 2015 02:05:47 -0000 Author: jchandra Date: Thu Feb 26 02:05:45 2015 New Revision: 279305 URL: https://svnweb.freebsd.org/changeset/base/279305 Log: Add netlogic,xlp-pic as interrupt controller for XLP Add an empty driver for netlogic,xlp-pic to ensure that the device tree is correct and has an interrupt controller. Modified: head/sys/boot/fdt/dts/mips/xlp-basic.dts head/sys/mips/nlm/intr_machdep.c Modified: head/sys/boot/fdt/dts/mips/xlp-basic.dts ============================================================================== --- head/sys/boot/fdt/dts/mips/xlp-basic.dts Thu Feb 26 01:53:24 2015 (r279304) +++ head/sys/boot/fdt/dts/mips/xlp-basic.dts Thu Feb 26 02:05:45 2015 (r279305) @@ -47,12 +47,21 @@ ranges = <0x0 0x18000000 0x04000000>; bus-frequency = <0>; + pic: pic@4000 { + compatible = "netlogic,xlp-pic"; + interrupt-controller; + #address-cells = <0>; + #interrupt-cells = <1>; + reg = <0x4000 0x200>; + }; + serial0: serial@30100 { compatible = "ns16550"; reg = <0x30100 0x200>; reg-shift = <2>; current-speed = <115200>; clock-frequency = <133000000>; + interrupt-parent = <&pic>; interrupts = <9>; }; Modified: head/sys/mips/nlm/intr_machdep.c ============================================================================== --- head/sys/mips/nlm/intr_machdep.c Thu Feb 26 01:53:24 2015 (r279304) +++ head/sys/mips/nlm/intr_machdep.c Thu Feb 26 02:05:45 2015 (r279305) @@ -35,6 +35,10 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include + +#include +#include #include #include @@ -251,3 +255,39 @@ cpu_init_interrupts() mips_intr_counters[i] = mips_intrcnt_create(name); } } + +static int xlp_pic_probe(device_t); +static int xlp_pic_attach(device_t); + +static int +xlp_pic_probe(device_t dev) +{ + + if (!ofw_bus_is_compatible(dev, "netlogic,xlp-pic")) + return (ENXIO); + device_set_desc(dev, "XLP PIC"); + return (0); +} + +static int +xlp_pic_attach(device_t dev) +{ + + return (0); +} + +static device_method_t xlp_pic_methods[] = { + DEVMETHOD(device_probe, xlp_pic_probe), + DEVMETHOD(device_attach, xlp_pic_attach), + + DEVMETHOD_END +}; + +static driver_t xlp_pic_driver = { + "xlp_pic", + xlp_pic_methods, + 1, /* no softc */ +}; + +static devclass_t xlp_pic_devclass; +DRIVER_MODULE(xlp_pic, simplebus, xlp_pic_driver, xlp_pic_devclass, 0, 0);