aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2022-07-08 17:57:39 -0400
committerTom Rini <trini@konsulko.com>2022-07-08 18:03:08 -0400
commit05a4859637567b13219efd6f1707fb236648b1b7 (patch)
tree0faeab15539fb5b57dcd4ee82294ae8bab74fc1c /drivers
parent52686b87390791945eb05deaedac3c47f193a80f (diff)
parent07ef80cd9d735d7e2ee9c07bcc74e3786107e780 (diff)
Merge branch '2022-07-08-Kconfig-migrations' into next
- Another small round of CONFIG migrations to Kconfig
Diffstat (limited to 'drivers')
-rw-r--r--drivers/i2c/Kconfig4
-rw-r--r--drivers/i2c/davinci_i2c.c97
-rw-r--r--drivers/usb/gadget/ether.c15
-rw-r--r--drivers/usb/gadget/gadget_chips.h9
4 files changed, 2 insertions, 123 deletions
diff --git a/drivers/i2c/Kconfig b/drivers/i2c/Kconfig
index d25c5736ef..72d06e4972 100644
--- a/drivers/i2c/Kconfig
+++ b/drivers/i2c/Kconfig
@@ -687,9 +687,9 @@ config SYS_I2C_SPEED
config SYS_I2C_BUS_MAX
int "Max I2C busses"
- depends on ARCH_KEYSTONE || ARCH_OMAP2PLUS || ARCH_SOCFPGA
+ depends on ARCH_OMAP2PLUS || ARCH_SOCFPGA
default 2 if TI816X
- default 3 if OMAP34XX || AM33XX || AM43XX || ARCH_KEYSTONE
+ default 3 if OMAP34XX || AM33XX || AM43XX
default 4 if ARCH_SOCFPGA || OMAP44XX || TI814X
default 5 if OMAP54XX
help
diff --git a/drivers/i2c/davinci_i2c.c b/drivers/i2c/davinci_i2c.c
index a4abd25c39..ae177227de 100644
--- a/drivers/i2c/davinci_i2c.c
+++ b/drivers/i2c/davinci_i2c.c
@@ -21,14 +21,12 @@
#include <linux/delay.h>
#include "davinci_i2c.h"
-#if CONFIG_IS_ENABLED(DM_I2C)
/* Information about i2c controller */
struct i2c_bus {
int id;
uint speed;
struct i2c_regs *regs;
};
-#endif
#define CHECK_NACK() \
do {\
@@ -340,99 +338,6 @@ static int _davinci_i2c_probe_chip(struct i2c_regs *i2c_base, uint8_t chip)
return rc;
}
-#if !CONFIG_IS_ENABLED(DM_I2C)
-static struct i2c_regs *davinci_get_base(struct i2c_adapter *adap)
-{
- switch (adap->hwadapnr) {
-#if CONFIG_SYS_I2C_BUS_MAX >= 3
- case 2:
- return (struct i2c_regs *)I2C2_BASE;
-#endif
-#if CONFIG_SYS_I2C_BUS_MAX >= 2
- case 1:
- return (struct i2c_regs *)I2C1_BASE;
-#endif
- case 0:
- return (struct i2c_regs *)I2C_BASE;
-
- default:
- printf("wrong hwadapnr: %d\n", adap->hwadapnr);
- }
-
- return NULL;
-}
-
-static uint davinci_i2c_setspeed(struct i2c_adapter *adap, uint speed)
-{
- struct i2c_regs *i2c_base = davinci_get_base(adap);
- uint ret;
-
- adap->speed = speed;
- ret = _davinci_i2c_setspeed(i2c_base, speed);
-
- return ret;
-}
-
-static void davinci_i2c_init(struct i2c_adapter *adap, int speed,
- int slaveadd)
-{
- struct i2c_regs *i2c_base = davinci_get_base(adap);
-
- adap->speed = speed;
- _davinci_i2c_init(i2c_base, speed, slaveadd);
-
- return;
-}
-
-static int davinci_i2c_read(struct i2c_adapter *adap, uint8_t chip,
- uint32_t addr, int alen, uint8_t *buf, int len)
-{
- struct i2c_regs *i2c_base = davinci_get_base(adap);
- return _davinci_i2c_read(i2c_base, chip, addr, alen, buf, len);
-}
-
-static int davinci_i2c_write(struct i2c_adapter *adap, uint8_t chip,
- uint32_t addr, int alen, uint8_t *buf, int len)
-{
- struct i2c_regs *i2c_base = davinci_get_base(adap);
-
- return _davinci_i2c_write(i2c_base, chip, addr, alen, buf, len);
-}
-
-static int davinci_i2c_probe_chip(struct i2c_adapter *adap, uint8_t chip)
-{
- struct i2c_regs *i2c_base = davinci_get_base(adap);
-
- return _davinci_i2c_probe_chip(i2c_base, chip);
-}
-
-U_BOOT_I2C_ADAP_COMPLETE(davinci_0, davinci_i2c_init, davinci_i2c_probe_chip,
- davinci_i2c_read, davinci_i2c_write,
- davinci_i2c_setspeed,
- CONFIG_SYS_DAVINCI_I2C_SPEED,
- CONFIG_SYS_DAVINCI_I2C_SLAVE,
- 0)
-
-#if CONFIG_SYS_I2C_BUS_MAX >= 2
-U_BOOT_I2C_ADAP_COMPLETE(davinci_1, davinci_i2c_init, davinci_i2c_probe_chip,
- davinci_i2c_read, davinci_i2c_write,
- davinci_i2c_setspeed,
- CONFIG_SYS_DAVINCI_I2C_SPEED1,
- CONFIG_SYS_DAVINCI_I2C_SLAVE1,
- 1)
-#endif
-
-#if CONFIG_SYS_I2C_BUS_MAX >= 3
-U_BOOT_I2C_ADAP_COMPLETE(davinci_2, davinci_i2c_init, davinci_i2c_probe_chip,
- davinci_i2c_read, davinci_i2c_write,
- davinci_i2c_setspeed,
- CONFIG_SYS_DAVINCI_I2C_SPEED2,
- CONFIG_SYS_DAVINCI_I2C_SLAVE2,
- 2)
-#endif
-
-#else /* CONFIG_DM_I2C */
-
static int davinci_i2c_xfer(struct udevice *bus, struct i2c_msg *msg,
int nmsgs)
{
@@ -507,5 +412,3 @@ U_BOOT_DRIVER(i2c_davinci) = {
.priv_auto = sizeof(struct i2c_bus),
.ops = &davinci_i2c_ops,
};
-
-#endif /* CONFIG_DM_I2C */
diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c
index 72b4f7f306..abb5332f13 100644
--- a/drivers/usb/gadget/ether.c
+++ b/drivers/usb/gadget/ether.c
@@ -1048,13 +1048,6 @@ static int eth_set_config(struct eth_dev *dev, unsigned number,
int result = 0;
struct usb_gadget *gadget = dev->gadget;
- if (gadget_is_sa1100(gadget)
- && dev->config
- && dev->tx_qlen != 0) {
- /* tx fifo is full, but we can't clear it...*/
- pr_err("can't change configurations");
- return -ESPIPE;
- }
eth_reset_config(dev);
switch (number) {
@@ -2019,14 +2012,6 @@ static int eth_bind(struct usb_gadget *gadget)
/* sh doesn't support multiple interfaces or configs */
cdc = 0;
rndis = 0;
- } else if (gadget_is_sa1100(gadget)) {
- /* hardware can't write zlps */
- zlp = 0;
- /*
- * sa1100 CAN do CDC, without status endpoint ... we use
- * non-CDC to be compatible with ARM Linux-2.4 "usb-eth".
- */
- cdc = 0;
}
gcnum = usb_gadget_controller_number(gadget);
diff --git a/drivers/usb/gadget/gadget_chips.h b/drivers/usb/gadget/gadget_chips.h
index 66ccd05417..abc6dc7f89 100644
--- a/drivers/usb/gadget/gadget_chips.h
+++ b/drivers/usb/gadget/gadget_chips.h
@@ -45,13 +45,6 @@
#define gadget_is_sh(g) 0
#endif
-/* not yet stable on 2.6 (would help "original Zaurus") */
-#ifdef CONFIG_USB_GADGET_SA1100
-#define gadget_is_sa1100(g) (!strcmp("sa1100_udc", (g)->name))
-#else
-#define gadget_is_sa1100(g) 0
-#endif
-
/* handhelds.org tree (?) */
#ifdef CONFIG_USB_GADGET_MQ11XX
#define gadget_is_mq11xx(g) (!strcmp("mq11xx_udc", (g)->name))
@@ -183,8 +176,6 @@ static inline int usb_gadget_controller_number(struct usb_gadget *gadget)
return 0x02;
else if (gadget_is_sh(gadget))
return 0x04;
- else if (gadget_is_sa1100(gadget))
- return 0x05;
else if (gadget_is_goku(gadget))
return 0x06;
else if (gadget_is_mq11xx(gadget))