This is an automated email from the ASF dual-hosted git repository.

vipulrahane pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git


The following commit(s) were added to refs/heads/master by this push:
     new 1050faeac hw/usb/tinyusb: Fix sysinit levels so that tinyusb gets 
initialized before console uses it
     new f0152ae64 Merge pull request #3090 from 
vrahane/vipul/tinyusb_sysinit_fixes_
1050faeac is described below

commit 1050faeac70e58f26441247996d07e401e602092
Author: Vipul Rahane <vipul.rah...@juul.com>
AuthorDate: Thu Oct 5 16:00:09 2023 -0700

    hw/usb/tinyusb: Fix sysinit levels so that tinyusb gets initialized
    before console uses it
    
    - Changing cdc_console sysinit to 502 adding a new syscfg
      CONSOLE_USB_CDC_SYSINIT_STAGE for CDC USB console
      and use that instead
    - Also add restrictions so that usbd is never inited after
      cdc_console
---
 hw/usb/tinyusb/cdc_console/pkg.yml    | 2 +-
 hw/usb/tinyusb/cdc_console/syscfg.yml | 7 +++++++
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/hw/usb/tinyusb/cdc_console/pkg.yml 
b/hw/usb/tinyusb/cdc_console/pkg.yml
index c1a3374df..13ab96fac 100755
--- a/hw/usb/tinyusb/cdc_console/pkg.yml
+++ b/hw/usb/tinyusb/cdc_console/pkg.yml
@@ -32,4 +32,4 @@ pkg.deps:
     - "@apache-mynewt-core/hw/usb/tinyusb/cdc"
 
 pkg.init:
-    usb_cdc_console_pkg_init: 'MYNEWT_VAL(CONSOLE_SYSINIT_STAGE)'
+    usb_cdc_console_pkg_init: 'MYNEWT_VAL(CONSOLE_USB_CDC_SYSINIT_STAGE)'
diff --git a/hw/usb/tinyusb/cdc_console/syscfg.yml 
b/hw/usb/tinyusb/cdc_console/syscfg.yml
index 7c64373bd..b04d0a2ce 100755
--- a/hw/usb/tinyusb/cdc_console/syscfg.yml
+++ b/hw/usb/tinyusb/cdc_console/syscfg.yml
@@ -25,5 +25,12 @@ syscfg.defs:
 syscfg.vals:
     USBD_CDC_CONSOLE: 1
 
+syscfg.defs:
+    CONSOLE_USB_CDC_SYSINIT_STAGE:
+        description: >
+          Initialize USB CDC Console at the specified sysinit level
+        value: 502
+
 syscfg.restrictions:
     - "USBD_CDC_CONSOLE"
+    - CONSOLE_USB_CDC_SYSINIT_STAGE > USBD_SYSINIT_STAGE

Reply via email to