From nobody Fri Jun 16 15:59:54 2023 X-Original-To: freebsd-arm@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QjP4m5QBLz4dJg7 for ; Fri, 16 Jun 2023 16:00:08 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [IPv6:2a00:1450:4864:20::52a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QjP4m2lwsz4M50 for ; Fri, 16 Jun 2023 16:00:08 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ed1-x52a.google.com with SMTP id 4fb4d7f45d1cf-51a20138617so1152016a12.2 for ; Fri, 16 Jun 2023 09:00:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20221208.gappssmtp.com; s=20221208; t=1686931206; x=1689523206; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=OBJOOjoOPlGJKHNDksIFpFD8HIzQev6zH52yptiwWVA=; b=ZlqS5TAjVlNFCsJwvlbnctNw6cPHz+4+dSOqf1kNX+MgkCrc4OApAZmXxv6+I+op/O CGn/JSBysbvdIhkMaff1gSUZQvHOyptXiSuAK4k7q0E+w48vLdbwpitB9wxF6xDhpOOE js1Z9ZlnDU159BT3CZHOCJtpYesWMglKzSDfPfmwgLD9qcefxdEaPbcv8HtTWCpwmC3I /y//77oU7DtRebibih4fC84hGAlVu+edGKHCejhOcpUJ2TGsCZihdr5Q3syduvoHfRkW nS7Q3zCCRAhyAr2OZ+GtnVf1JIi7lp/9XbR5B7lYsm/QYc9GyC6rHXLdzrFyu6lHwq92 NtLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686931206; x=1689523206; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=OBJOOjoOPlGJKHNDksIFpFD8HIzQev6zH52yptiwWVA=; b=PqOSwxrkoXBuI6GfkDYvRSF2l900jL7TXbk38K7JUShhQuxN0vMjxBHnE1tM6s3jfP MzqM0hJSAGGaDsoa7bhlRHhqOJUuOau+YWE8bBd76eheeUPGOrSB/PoB+0j6GGSG1PdC OPgcJ4bmjrZ3xZ/hj0X1T62z+f6d1drSY5eTeyJxZEaTKsTajve77Uv4sdqx7qs55ugQ lk/jVr/IXultMkJ4stl1Hqg2MWF2sPW6PtnS4yTUw95ubohsMrBTlhuPS+5WlhCdcJ8a 0ojV1AXnH7xIh5Oz9ZcfMjpCr8VHeo+wv4Ehwc3WfqNerXPwfWvmcuUBsPqfGAVKCnHH TVBA== X-Gm-Message-State: AC+VfDxMZk8PcXXyC4YswuawF/axcDHu8RJkRONa3JPKhI0fSVGmvMiC JOYKxFIoG5/+DodEM9Z4fu1ppxINwazbsxwKgzg0RkLxUba5Fbqv X-Google-Smtp-Source: ACHHUZ4zyVRdyFF798rfpYcrHx4NyCAHTUdtaf2431dxwlnIGaDsfBzNaE2pNpjTM0GeYWAB2g9+/DQbI42KghGPKZ0= X-Received: by 2002:a05:6402:395:b0:514:960e:6 with SMTP id o21-20020a056402039500b00514960e0006mr1599531edv.10.1686931206326; Fri, 16 Jun 2023 09:00:06 -0700 (PDT) List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@freebsd.org MIME-Version: 1.0 References: <8E9A4B08-EFD7-4872-B789-698B77A0DACB@edc.ro> In-Reply-To: <8E9A4B08-EFD7-4872-B789-698B77A0DACB@edc.ro> From: Warner Losh Date: Fri, 16 Jun 2023 09:59:54 -0600 Message-ID: Subject: Re: driver loading order To: titus Cc: "freebsd-arm@freebsd.org" Content-Type: multipart/alternative; boundary="00000000000050749e05fe4147fc" X-Rspamd-Queue-Id: 4QjP4m2lwsz4M50 X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N --00000000000050749e05fe4147fc Content-Type: text/plain; charset="UTF-8" On Fri, Jun 16, 2023, 9:55 AM titus wrote: > what is the correct method for loading drivers in a specific order > I hacked a driver for pwm-regulator so i can have cpufreq_dt > so rk_pwm/pwm needs to be loaded before the pwm-regulator driver and after > the clock > driver > i changed the pass arg for EARLY_DRIVER_MODULE and in the end it worked > but im not sure this is the best way > That's generally the best way for things like clocks and regulators. Those item enable other devices to work, so should be attached in an earlier pass. Warner thanks > --00000000000050749e05fe4147fc Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Fri, Jun 16, 2023, 9:55 AM titus <titus@edc.ro> wrote:
what is the correct method for loading drivers in a specific ord= er
I hacked a driver for pwm-regulator so i can have cpufreq_dt
so rk_pwm/pwm needs to be loaded before the pwm-regulator driver and after = the clock
driver
i changed the pass arg for EARLY_DRIVER_MODULE and in the end it worked but= im not sure this is the best way

That's generally the best way for thin= gs like clocks and regulators. Those item enable other devices to work, so = should be attached in an earlier pass.

Warner=C2=A0

thanks
--00000000000050749e05fe4147fc--