From owner-svn-src-head@FreeBSD.ORG Sun Feb 9 21:02:46 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DE7AF9F1; Sun, 9 Feb 2014 21:02: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C756E175F; Sun, 9 Feb 2014 21:02:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s19L2kLd025066; Sun, 9 Feb 2014 21:02:46 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s19L2k2f025065; Sun, 9 Feb 2014 21:02:46 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201402092102.s19L2k2f025065@svn.freebsd.org> From: Warner Losh Date: Sun, 9 Feb 2014 21:02:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261689 - head/sys/arm/at91 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.17 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: Sun, 09 Feb 2014 21:02:46 -0000 Author: imp Date: Sun Feb 9 21:02:46 2014 New Revision: 261689 URL: http://svnweb.freebsd.org/changeset/base/261689 Log: Add FDT attachment. Modified: head/sys/arm/at91/if_ate.c Modified: head/sys/arm/at91/if_ate.c ============================================================================== --- head/sys/arm/at91/if_ate.c Sun Feb 9 21:01:53 2014 (r261688) +++ head/sys/arm/at91/if_ate.c Sun Feb 9 21:02:46 2014 (r261689) @@ -30,6 +30,8 @@ * 2) GPIO initializtion in board setup code. */ +#include "opt_platform.h" + #include __FBSDID("$FreeBSD$"); @@ -74,6 +76,12 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef FDT +#include +#include +#include +#endif + #include "miibus_if.h" /* @@ -229,7 +237,10 @@ static int ate_miibus_writereg(device_t static int ate_probe(device_t dev) { - +#ifdef FDT + if (!ofw_bus_is_compatible(dev, "cdns,at32ap7000-macb")) + return (ENXIO); +#endif device_set_desc(dev, "EMAC"); return (0); } @@ -1458,7 +1469,11 @@ static driver_t ate_driver = { sizeof(struct ate_softc), }; +#ifdef FDT +DRIVER_MODULE(ate, simplebus, ate_driver, ate_devclass, NULL, NULL); +#else DRIVER_MODULE(ate, atmelarm, ate_driver, ate_devclass, NULL, NULL); +#endif DRIVER_MODULE(miibus, ate, miibus_driver, miibus_devclass, NULL, NULL); MODULE_DEPEND(ate, miibus, 1, 1, 1); MODULE_DEPEND(ate, ether, 1, 1, 1);