This supply is shared by the USB PHY and the audio codec,
so it needs to be reference counted to allow them to be
powered up & down independently (and not just leave the
1V8 regulator enabled all the time).
Change-Id: Ib99b41c2a94b9f0c378153b33c6f91b4370ee998
This allows targets to select full speed operation instead
of the default high-speed mode, which is mainly interesting
for debugging USB communication.
Change-Id: I405ff63c6660ca03ea04282a12b59dac06ca46f5
If the PHY doesn't correctly report the ID pin state,
then the DWC2 core may operate in host mode by default.
Defining USB_DW_FORCE_DEVICE_MODE in the target config
will set the FDMOD bit in the GUSBCFG register to force
the core into device mode regardless of what the PHY
reports.
Change-Id: If2391aaa4a7c65ba6c90dd56074faeb3ed1ac2ca
Two cache discards for targets with POST_DMA_FLUSH were
not properly guarded by USB_DW_ARCH_SLAVE, which causes
data loss when DMA is disabled.
Change-Id: If14ffdc5662f77b3ff57a04c5b9f94d4cac7e514
Buffer contents are only moved after the callback
returns, so we need to log the path before it has
been updated to prevent reading garbage.
Change-Id: I187fbd56484249c456155ffcbdde9e44e766dde8
This commit does the following changes:
- Fix mkdir implementation not reporting EEXIST error.
- Fix database build feature.
- Small speed-up when parsing directories and files.
- Fix buffering thread hogging cpu and preventing other threads to run.
- Fix sdl plugins not compiling by re-adding ctru specific cflags in sdl.make.
Change-Id: I507c0dcc85cdbcc607ab9c9c6d0b42e6a80caa5a
The ARM assembly versions of memcpy and memmove try to
directly modify the PC based on the number of bytes to
be copied as an "optimization"; but this only works if
instructions are guaranteed to be 4 bytes wide.
This trick is completely broken on Cortex-M, since an
instruction can be 2-4 bytes wide: for example a memcpy
of 4 bytes ends up storing 32 bytes worth of garbage to
the target address!
Use the C memcpy/memmove implementations for Cortex-M
instead; fixing the ASM version is more trouble than
it's worth.
Change-Id: I695587fd585ec25ef276f2dbc61e2290b7015e13
asm.make replaces source files listed in asm/SOURCES with
a corresponding .c or .S file under firmware/asm/${ARCH}.
This makes it difficult to handle differences within one
architecture, eg. different instruction sets or versions
of the architecture.
Get rid of asm.make, and instead use the preprocessor to
select the architecture-specific sources directly from
asm/SOURCES. This is slightly more verbose but is more
flexible.
Change-Id: Id2a484794d5d951b7ba7b54a552de6960414fa45
All non-simulator and non-hostfs targets are required to implement storage_get_info() since 04dc052a
Change-Id: I87febd12e101797d9cbbffc0e2e46efc2dace9da
Define HAVE_LC_OPEN_FROM_MEM if the target implements
lc_open_from_mem(). Make HAVE_CODEC_BUFFERING depend
on this feature.
Change-Id: If5f70db58963dcdc33848b860c028841ac380ab2
Move HAVE_CODEC_BUFFERING to config.h, and disable all
related code on targets that don't support the feature,
ie. hosted targets that can't implement lc_open_from_mem().
Change-Id: I0d2a43900cd05b1a80c3cee519f8ad7b26e39fe7
Add CONFIG_BINFMT to select the binary format used for
plugins/codecs and define two options for the existing
implementations (native ".rock" format or dlopen-based).
Split the load_code.h header into two separate headers
to make it look less messy.
Change-Id: Ibd66773160df35a8c6f29a617d12c961bdabf317
Enable pullups on SDMMC CMD/DATx lines and set output
speed to medium. Using HIGH and VERYHIGH speeds seems
to cause data corruption, with frequent CRC failures.
Change-Id: I732d19e03a2a857453755b68b6749497eafaef70
sdmmc_host is a portable driver for targets with SD/MMC
storage. It handles all the logic needed to initialize
and access SD/MMC devices which is common to all targets.
Targets only need to implement functions to issue SD/MMC
commands, manage clocks & power, and managing the insert
state of the card (if it is hotswappable). This vastly
reduces the work needed to get a new SD/MMC based target
up & running.
At present it's only written for and tested with SD cards,
as I don't have access to an MMC-based target to test on.
Change-Id: I6a0d7747113c11a3697ae20cbb551bef8bfd1292
- existing class drivers are placed to config 1
- drivers_connected==true is replaced with usb_config!=0
- supports config transition between nonzero configs
- STALL if request set_config was invalid
Change-Id: Ia775ae2dcb7d0cc08d2f3ee5ca41683837b04259
this commit has following changes:
- introduce `usb_drv_ep_spec` table to udc drivers, which represents
endpoint characteristics.
- introduce 'ep_allocs' table to class drivers, which represents what
endpoint type does the class driver want.
- implement endpoint matching logic to usb core.
this is a required step to implement usb config switching, because we
need to create config descriptors without actually initializing endpoints.
Change-Id: I11c324cd35189ab636744488f6259d0cdb2179f0
Use the optimized version based on __buitlin_ctz() which GCC
will compile to two instructions (rbit, ctz) on Cortex-M4/M7;
faster and smaller than the handcoded assembly version.
Change-Id: I33f69ff829b048f1e53fc7ead1bd6ac3c5bd7a4c
Given the myriad of clocking options the STM32H7 family
provides, it is easiest to let targets simply implement
what they need.
Change-Id: I9cceed40a2d638998e8b583651f73557d2ffbd46
Supporting large transfers (>64k) isn't really needed;
the main use case right now is interfacing with an LCD
controller.
Change-Id: I901e5ddb1b4efa9aa650b3e5074537ba785c6d41
Add an optional sequence in the startup code to disable clock
gating when the CPU goes to sleep. Normally the D1 and D3 domain
clocks can be automatically gated when the CPU is asleep, and
because the debug infrastructure is clocked from these domains,
the debugger cannot attach when those clocks are stopped.
Setting some bits in DBGMCU_CR prevents this problem, but will
increase power consumption, hence it isn't enabled by default.
Change-Id: Iba87750371a493adf72655aab86a908ef2702cef
This commit does the following changes:
- Replace buffered io implementation with a simpler, lighter, slightly faster version.
- Turn off both screens when backlight goes off.
- Small change to enable plugins in the folling commit (s).
Change-Id: I45df30be037c3a1686bd85c16c87bcd248db456f
The ZEN V target is the only one which has volume buttons,
but lacks the menu and shortcut buttons.
IMO an independant keymap will make maintenance easier.
Change-Id: Ide79fab629b13eae94946561d99052e570c0e4f2
The layout of 'struct regs' is a bit different on Cortex-M
and start_thread() wasn't updated to match; it was loading
'sp' from the wrong offset.
Change-Id: I57dbef26809821d411dc86e2066a2f53e78a3f2d