summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorTom Rini <[email protected]>2023-01-17 17:10:50 -0500
committerTom Rini <[email protected]>2023-01-20 12:27:06 -0500
commit5bbf9c927a14d24e782bd5fdbbbb3fcaa0594679 (patch)
treecfed8dd628be015e0e594c524925d5ab0aaffe00 /common
parentae8a922bd2061beee7524bfc826baba01fb3944f (diff)
dm: ns16550: Restore how we define UART_REG
Prior to commit 9591b63531fa ("Convert CONFIG_SYS_NS16550_MEM32 et al to Kconfig") we had defined CONFIG_SYS_NS16550_REG_SIZE to -1 with DM_SERIAL such that we would then have a size 0 character array. This resulted in functionally no padding. The confusion on my part came from dealing with the constraints around platforms that do not use DM_SERIAL in SPL/TPL. After Andre Przywara reported that sunxi was broken, I've re-read the code and comments again and thought on this harder. What we want I believe is what this patch does now. If DM_SERIAL is defined for this stage, regardless of CONFIG_SYS_NS16550_REG_SIZE then we will dynamically handle reg shifts and 'struct ns16550' needs no padding (which is functionally what unsigned char foo[0] provides). This is the same case as NS16550_DYNAMIC and DEBUG_UART. Expand the existing comment here slightly. Otherwise, we will have CONFIG_SYS_NS16550_REG_SIZE set to a non-zero value, and handle padding within the struct. Cc: Simon Glass <[email protected]> Cc: Sergei Antonov <[email protected]> Cc: Quentin Schulz <[email protected]> Cc: Andre Przywara <[email protected]> Fixes: 9591b63531fa ("Convert CONFIG_SYS_NS16550_MEM32 et al to Kconfig") Signed-off-by: Tom Rini <[email protected]> Reviewed-by: Andre Przywara <[email protected]> Tested-by: Andre Przywara <[email protected]> Tested-by: Quentin Schulz <[email protected]>
Diffstat (limited to 'common')
0 files changed, 0 insertions, 0 deletions