From owner-freebsd-drivers@freebsd.org Fri Jul 13 09:10:01 2018 Return-Path: Delivered-To: freebsd-drivers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3E9A11030384 for ; Fri, 13 Jul 2018 09:10:01 +0000 (UTC) (envelope-from gurenchan@gmail.com) Received: from mail-io0-x232.google.com (mail-io0-x232.google.com [IPv6:2607:f8b0:4001:c06::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C1F487C4B4 for ; Fri, 13 Jul 2018 09:10:00 +0000 (UTC) (envelope-from gurenchan@gmail.com) Received: by mail-io0-x232.google.com with SMTP id l7-v6so30737122ioj.1 for ; Fri, 13 Jul 2018 02:10:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=WpKfkvI8+S2e2hu3lpiBaMh6uwcuC0PrmH91HphuvjE=; b=Kzhg7TmxAITJsJSFWrRfW8xCNvWpgiFmr56zCNbnVMGYc/nOfA2XJyO0nMkvuKkwPU Uz5UIL3bDavCZrNBxG6/R1rlHMzX7sBjxniGWvpN/RWTdU7OJZu1zBJACHyOo4szeVPt 2CauJ+6CdxYIxEweJq5dFqG1AXZ5fn4NXkHBoKh/hZj5twLBBkWV5Qx+pDhafSK6uJRf 29xVnPVqpwGY8qjVBoH2x5R4QO79+jiVfs44xPnDQZCzK63kxWnY5lLUcIObCloiN1c6 duqwCw9UY1AZZQL5MUL8dd4vybEppWOhN4Lqn4WWIwSR40DFBP4sqLrikHDlFJkO9OJ1 x1eA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=WpKfkvI8+S2e2hu3lpiBaMh6uwcuC0PrmH91HphuvjE=; b=ZUTygs2NzY11kyHHhk3eWdInmqFplwudklpmSkF26fudVgHNXjcIKLFUis37sfgXzF 7agGYggVqcY4TRmiSrQU6gBT9u6HDCrBLTbda5xkwubko+sTjznNFqin2V50LSgJxm1j QnvAiAHTgJfSINfz7Dg8d24+yafg/VSiemsyHXwYTZfTX70M0Tk9bEn6W3HlKPDa28vb A5T3MdXx4kEuzwVVoRH92kSPR3UDS4I3l4nKf5cSTpRzzMdgKW/zA70pYmYnBzeV2GQY /0i70K3d855ib9ggGWmaqmKppimcJO7iVG0YqTVKTl0NfRf3nZOBfgbniuRDAhITDKgd f8vg== X-Gm-Message-State: APt69E25nJh/yJ1/IB3Ufuw9ebh3qg7PI+gs+mk8BQcNFOX2740r+bll COWjCD2jjhgmZ7MLEq4t9cTsbVnYGPLgTWtcSF4= X-Google-Smtp-Source: AAOMgpfZ6oUXD56ujYddtPnp5EplM6vrcKkjQ0cTgaaz/3bflUHxEYUjAT4C0Jf01Znt/oewjaDMsA+kXf/swzzbFD8= X-Received: by 2002:a6b:1bd5:: with SMTP id b204-v6mr31493369iob.240.1531473000160; Fri, 13 Jul 2018 02:10:00 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: blubee blubeeme Date: Fri, 13 Jul 2018 17:10:19 +0800 Message-ID: Subject: Re: Any read materials to understand uart device driver architecture in FreeBSD. To: Rajesh Kumar Cc: freebsd-drivers@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.27 X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jul 2018 09:10:01 -0000 On Fri, Jul 13, 2018, 16:57 Rajesh Kumar wrote: > Hi, > > I am trying to understand the uart device drivers architecture in FreeBSD. > I see the following set of file in sys/dev/uart. > > a) uart_bus_xxxx -> one file each for acpi, pci, isa bus etc., > b) uart_core - uart common routines > c) uart_cpu_xxxx -> one file each for x86, powerpc etc., > d) uart_dev_xxxx -> I assume this is one file each for seperate uart IP's. > e) some other files. > > Questions : > a) Is there any good read materials to understand the uart driver > architecutre (from code perspective) in FreeBSD? > b) If I need to write a new uart driver for a uart IP, what are the things > to do? I assume i need to have a seperate uart_dev_* file and need to add > that device ID in appropriate uart_bus_* file? what other things I need to > take care? > c) In uart_bus_acpi.c and uart_bus_isa.c, I see the definitions of > acpi_ns8250_ids and isa_ns8250_ids list. Where are those ID's derived > from? I understand PNP ID, ACPI ID and PCI Vendor and Device ID, but not > sure about those above mentioned IDs? > > Thanks, > Rajesh. > _______________________________________________ > freebsd-drivers@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-drivers > To unsubscribe, send any mail to "freebsd-drivers-unsubscribe@freebsd.org" > Writing drivers: https://nostarch.com/bsddrivers.htm FreeBSD architecture: https://www.amazon.com/Design-Implementation-FreeBSD-Operating-System/dp/0321968972 >