Edward O'Callaghan has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/37904 )
Change subject: drivers/i2c: Add rtd2142 stub driver ......................................................................
drivers/i2c: Add rtd2142 stub driver
Currently this driver is a nop however forms the boilerplate for the required support.
BUG=b:142769041 BRANCH=none TEST=builds
Change-Id: I1716e6f186a097b309504762017b98747972547c Signed-off-by: Edward O'Callaghan quasisec@google.com --- A src/drivers/i2c/rtd2142/Kconfig A src/drivers/i2c/rtd2142/Makefile.inc A src/drivers/i2c/rtd2142/chip.h A src/drivers/i2c/rtd2142/rtd2142.c 4 files changed, 75 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/04/37904/1
diff --git a/src/drivers/i2c/rtd2142/Kconfig b/src/drivers/i2c/rtd2142/Kconfig new file mode 100644 index 0000000..614df35 --- /dev/null +++ b/src/drivers/i2c/rtd2142/Kconfig @@ -0,0 +1,5 @@ +config DRIVERS_I2C_RTD2142 + bool + default n + help + Enable support for Realtek RTD2142 DisplayPort MST bridge chip. diff --git a/src/drivers/i2c/rtd2142/Makefile.inc b/src/drivers/i2c/rtd2142/Makefile.inc new file mode 100644 index 0000000..df9edae --- /dev/null +++ b/src/drivers/i2c/rtd2142/Makefile.inc @@ -0,0 +1 @@ +ramstage-$(CONFIG_DRIVERS_I2C_RTD2142) += rtd2142.c diff --git a/src/drivers/i2c/rtd2142/chip.h b/src/drivers/i2c/rtd2142/chip.h new file mode 100644 index 0000000..182b1b7 --- /dev/null +++ b/src/drivers/i2c/rtd2142/chip.h @@ -0,0 +1,15 @@ +/* + * This file is part of the coreboot project. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +struct drivers_i2c_rtd2142_config { +}; diff --git a/src/drivers/i2c/rtd2142/rtd2142.c b/src/drivers/i2c/rtd2142/rtd2142.c new file mode 100644 index 0000000..580a6b8 --- /dev/null +++ b/src/drivers/i2c/rtd2142/rtd2142.c @@ -0,0 +1,54 @@ +/* + * This file is part of the coreboot project. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include <console/console.h> +#include <device/device.h> +#include <device/smbus.h> +#include <device/pci.h> + +#include "chip.h" + +static void rtd2142_setup(struct device *dev) +{ + struct drivers_i2c_rtd2142_config *config = dev->chip_info; + + if (!config) + return; + + /* nop */ +} + +static void rtd2142_init(struct device *dev) +{ + if (dev->enabled && dev->path.type == DEVICE_PATH_I2C && + ops_smbus_bus(get_pbus_smbus(dev))) { + rtd2142_setup(dev); + } +} + +static struct device_operations rtd2142_operations = { + .read_resources = DEVICE_NOOP, + .set_resources = DEVICE_NOOP, + .enable_resources = DEVICE_NOOP, + .init = rtd2142_init, +}; + +static void enable_dev(struct device *dev) +{ + dev->ops = &rtd2142_operations; +} + +struct chip_operations drivers_i2c_rtd2142_ops = { + CHIP_NAME("Realtek RTD2142 MST") + .enable_dev = enable_dev, +};
Hello Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/37904
to look at the new patch set (#2).
Change subject: drivers/i2c: Add rtd2142 stub driver ......................................................................
drivers/i2c: Add rtd2142 stub driver
Currently this driver is a nop however forms the boilerplate for the required support.
BUG=b:142769041 BRANCH=none TEST=builds
Change-Id: I1716e6f186a097b309504762017b98747972547c Signed-off-by: Edward O'Callaghan quasisec@google.com --- A src/drivers/i2c/rtd2142/Kconfig A src/drivers/i2c/rtd2142/Makefile.inc A src/drivers/i2c/rtd2142/chip.h A src/drivers/i2c/rtd2142/rtd2142.c 4 files changed, 75 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/04/37904/2
Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/37904 )
Change subject: drivers/i2c: Add rtd2142 stub driver ......................................................................
Patch Set 2:
Is this just a WIP patch? Or do you intend to push this in? As you mentioned in the commit message, this doesn't really do anything. Is there any benefit of pushing it in? I would prefer having a driver better fleshed out than pushing stub change in. Also, it is not very clear as to why drivers/i2c/generic is not a good choice for this device.
Edward O'Callaghan has abandoned this change. ( https://review.coreboot.org/c/coreboot/+/37904 )
Change subject: drivers/i2c: Add rtd2142 stub driver ......................................................................
Abandoned
not required.