From owner-p4-projects@FreeBSD.ORG Sun Jan 31 10:42:48 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 416BE1065670; Sun, 31 Jan 2010 10:42:48 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 061D01065679 for ; Sun, 31 Jan 2010 10:42:48 +0000 (UTC) (envelope-from raj@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id E83178FC14 for ; Sun, 31 Jan 2010 10:42:47 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o0VAglbr034806 for ; Sun, 31 Jan 2010 10:42:47 GMT (envelope-from raj@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o0VAglXp034804 for perforce@freebsd.org; Sun, 31 Jan 2010 10:42:47 GMT (envelope-from raj@freebsd.org) Date: Sun, 31 Jan 2010 10:42:47 GMT Message-Id: <201001311042.o0VAglXp034804@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to raj@freebsd.org using -f From: Rafal Jaworowski To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174006 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2010 10:42:48 -0000 http://p4web.freebsd.org/chv.cgi?CH=174006 Change 174006 by raj@raj_fdt on 2010/01/31 10:42:25 Convert Marvell SATA to FDT/simplebus convention. Affected files ... .. //depot/projects/fdt/sys/arm/mv/kirkwood/kirkwood.c#6 edit .. //depot/projects/fdt/sys/arm/mv/mv_sata.c#4 edit Differences ... ==== //depot/projects/fdt/sys/arm/mv/kirkwood/kirkwood.c#6 (text+ko) ==== @@ -79,11 +79,6 @@ { -1 }, CPU_PM_CTRL_XOR0 | CPU_PM_CTRL_XOR1 }, - { "sata", MV_SATAHC_BASE, MV_SATAHC_SIZE, - { MV_INT_SATA, -1 }, - { -1 }, - CPU_PM_CTRL_SATA0 | CPU_PM_CTRL_SATA1 - }, { NULL, 0, 0, { 0 }, { 0 }, 0 } }; ==== //depot/projects/fdt/sys/arm/mv/mv_sata.c#4 (text+ko) ==== @@ -48,6 +48,8 @@ #include #include +#include +#include #include "ata_if.h" @@ -173,7 +175,7 @@ devclass_t sata_devclass; -DRIVER_MODULE(sata, mbus, sata_driver, sata_devclass, 0, 0); +DRIVER_MODULE(sata, simplebus, sata_driver, sata_devclass, 0, 0); MODULE_VERSION(sata, 1); MODULE_DEPEND(sata, ata, 1, 1, 1); @@ -183,13 +185,12 @@ struct sata_softc *sc; uint32_t d, r; + if (!ofw_bus_is_compatible(dev, "mrvl,sata")) + return (ENXIO); + soc_id(&d, &r); sc = device_get_softc(dev); - /* No SATA controller on the 88F5281 SoC */ - if (d == MV_DEV_88F5281) - return (ENXIO); - switch(d) { case MV_DEV_88F5182: sc->sc_version = 1;