i2c: designware: Support use in SPL
authorSimon Glass <sjg@chromium.org>
Sat, 7 Dec 2019 04:41:42 +0000 (21:41 -0700)
committerBin Meng <bmeng.cn@gmail.com>
Sun, 15 Dec 2019 03:44:08 +0000 (11:44 +0800)
commitfa11fe1b03a57e00073986b74813a74aa5b89290
treebb85d22dbbe04d704a6bf4ecc7d6464ee067ff34
parent8d72d5bf08488ff28a8ed27389dae8a169c39190
i2c: designware: Support use in SPL

Allow this driver to set up an IO address in SPL using an 'early-regs'
property. This allows SPL to use the I2C driver without having to enable
the full PCI stack.

Also split out ofdata_to_platdata in designware driver since this is more
correct, and more convenient for the new logic.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
drivers/i2c/designware_i2c_pci.c