Drop digital thermometer and thermostat (DTT) drivers
authorSimon Glass <sjg@chromium.org>
Wed, 17 May 2017 09:25:05 +0000 (03:25 -0600)
committerTom Rini <trini@konsulko.com>
Mon, 22 May 2017 12:37:11 +0000 (08:37 -0400)
This subsystem is quite old. It has been replaced with a driver-model
version (UCLASS_THERMAL). Boards are free to convert to that if required,
but here is a removal patch that could be applied in the meantime.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
56 files changed:
README
board/gdsys/405ep/dlvision-10g.c
board/gdsys/405ep/io.c
board/gdsys/405ep/neo.c
board/gdsys/405ex/io64.c
cmd/Makefile
cmd/dtt.c [deleted file]
drivers/Kconfig
drivers/Makefile
drivers/hwmon/Kconfig [deleted file]
drivers/hwmon/Makefile [deleted file]
drivers/hwmon/adm1021.c [deleted file]
drivers/hwmon/adt7460.c [deleted file]
drivers/hwmon/ds1621.c [deleted file]
drivers/hwmon/ds1722.c [deleted file]
drivers/hwmon/ds1775.c [deleted file]
drivers/hwmon/ds620.c [deleted file]
drivers/hwmon/lm63.c [deleted file]
drivers/hwmon/lm73.c [deleted file]
drivers/hwmon/lm75.c [deleted file]
drivers/hwmon/lm81.c [deleted file]
include/config_cmd_all.h
include/configs/PMC440.h
include/configs/TQM834x.h
include/configs/UCP1020.h
include/configs/acadia.h
include/configs/canyonlands.h
include/configs/dlvision-10g.h
include/configs/dlvision.h
include/configs/exynos5-common.h
include/configs/intip.h
include/configs/io.h
include/configs/io64.h
include/configs/katmai.h
include/configs/kilauea.h
include/configs/km/km-powerpc.h
include/configs/km/km83xx-common.h
include/configs/km82xx.h
include/configs/makalu.h
include/configs/motionpro.h
include/configs/neo.h
include/configs/odroid_xu3.h
include/configs/sequoia.h
include/configs/socrates.h
include/configs/tqma6.h
include/configs/tqma6_mba6.h
include/configs/tqma6_wru4.h
include/configs/work_92105.h
include/configs/xilinx-ppc.h
include/configs/xpedite517x.h
include/configs/xpedite537x.h
include/configs/xpedite550x.h
include/configs/yosemite.h
include/dtt.h [deleted file]
include/i2c.h
scripts/config_whitelist.txt

diff --git a/README b/README
index a31065b..b6bce6f 100644 (file)
--- a/README
+++ b/README
@@ -830,7 +830,6 @@ The following options need to be configured:
                CONFIG_CMD_CRC32        * crc32
                CONFIG_CMD_DHCP         * DHCP support
                CONFIG_CMD_DIAG         * Diagnostics
-               CONFIG_CMD_DTT          * Digital Therm and Thermostat
                CONFIG_CMD_ECHO           echo arguments
                CONFIG_CMD_EDITENV        edit env variable
                CONFIG_CMD_EEPROM       * EEPROM read/write support
@@ -2324,11 +2323,6 @@ The following options need to be configured:
                If defined, then this indicates the I2C bus number for the RTC.
                If not defined, then U-Boot assumes that RTC is on I2C bus 0.
 
-               CONFIG_SYS_DTT_BUS_NUM
-
-               If defined, then this indicates the I2C bus number for the DTT.
-               If not defined, then U-Boot assumes that DTT is on I2C bus 0.
-
                CONFIG_SOFT_I2C_READ_REPEATED_START
 
                defining this will force the i2c_read() function in
index e400d19..b531786 100644 (file)
@@ -10,7 +10,6 @@
 #include <asm/processor.h>
 #include <asm/io.h>
 #include <asm/ppc4xx-gpio.h>
-#include <dtt.h>
 
 #include "405ep.h"
 #include <gdsys_fpga.h>
@@ -61,8 +60,13 @@ struct ihs_fpga *fpga_ptr[] = CONFIG_SYS_FPGA_PTR;
 
 int misc_init_r(void)
 {
-       /* startup fans */
-       dtt_init();
+       /*
+        * Note: DTT has been removed. Please use UCLASS_THERMAL.
+        *
+        * startup fans
+        *
+        * dtt_init();
+        */
 
        return 0;
 }
index 81b4965..1484469 100644 (file)
@@ -11,7 +11,6 @@
 #include <asm/io.h>
 #include <asm/ppc4xx-gpio.h>
 
-#include <dtt.h>
 #include <miiphy.h>
 
 #include "405ep.h"
@@ -41,8 +40,13 @@ struct ihs_fpga *fpga_ptr[] = CONFIG_SYS_FPGA_PTR;
 
 int misc_init_r(void)
 {
-       /* startup fans */
-       dtt_init();
+       /*
+        * Note: DTT has been removed. Please use UCLASS_THERMAL.
+        *
+        * startup fans
+        *
+        * dtt_init();
+        */
 
        return 0;
 }
index ff0edb2..ad88af2 100644 (file)
@@ -10,7 +10,6 @@
 #include <asm/processor.h>
 #include <asm/io.h>
 #include <asm/ppc4xx-gpio.h>
-#include <dtt.h>
 
 #include "405ep.h"
 #include <gdsys_fpga.h>
@@ -32,8 +31,13 @@ struct ihs_fpga *fpga_ptr[] = CONFIG_SYS_FPGA_PTR;
 
 int misc_init_r(void)
 {
-       /* startup fans */
-       dtt_init();
+       /*
+        * Note: DTT has been removed. Please use UCLASS_THERMAL.
+        *
+        * startup fans
+        *
+        * dtt_init();
+        */
 
        return 0;
 }
index 0a7baaa..9ef965b 100644 (file)
@@ -26,7 +26,6 @@
 
 #include <miiphy.h>
 #include <i2c.h>
-#include <dtt.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -70,8 +69,13 @@ static inline void blank_string(int size)
  */
 int misc_init_r(void)
 {
-       /* startup fans */
-       dtt_init();
+       /*
+        * Note: DTT has been removed. Please use UCLASS_THERMAL.
+        *
+        * startup fans
+        *
+        * dtt_init();
+        */
 
 #ifdef CONFIG_ENV_IS_IN_FLASH
        /* Monitor protection ON by default */
index e987868..f043407 100644 (file)
@@ -43,7 +43,6 @@ ifdef CONFIG_POST
 obj-$(CONFIG_CMD_DIAG) += diag.o
 endif
 obj-$(CONFIG_CMD_DISPLAY) += display.o
-obj-$(CONFIG_CMD_DTT) += dtt.o
 obj-$(CONFIG_CMD_ECHO) += echo.o
 obj-$(CONFIG_ENV_IS_IN_EEPROM) += eeprom.o
 obj-$(CONFIG_CMD_EEPROM) += eeprom.o
diff --git a/cmd/dtt.c b/cmd/dtt.c
deleted file mode 100644 (file)
index dd427a3..0000000
--- a/cmd/dtt.c
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * (C) Copyright 2001
- * Erik Theisen, Wave 7 Optics, etheisen@mindspring.com
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-#include <common.h>
-#include <config.h>
-#include <command.h>
-
-#include <dtt.h>
-#include <i2c.h>
-#include <tmu.h>
-#include <linux/bug.h>
-
-#if defined CONFIG_DTT_SENSORS
-static unsigned long sensor_initialized;
-
-static void _initialize_dtt(void)
-{
-       int i;
-       unsigned char sensors[] = CONFIG_DTT_SENSORS;
-
-       for (i = 0; i < sizeof(sensors); i++) {
-               if ((sensor_initialized & (1 << i)) == 0) {
-                       if (dtt_init_one(sensors[i]) != 0) {
-                               printf("DTT%d: Failed init!\n", i);
-                               continue;
-                       }
-                       sensor_initialized |= (1 << i);
-               }
-       }
-}
-
-void dtt_init(void)
-{
-       int old_bus;
-
-       /* switch to correct I2C bus */
-       old_bus = I2C_GET_BUS();
-       I2C_SET_BUS(CONFIG_SYS_DTT_BUS_NUM);
-
-       _initialize_dtt();
-
-       /* switch back to original I2C bus */
-       I2C_SET_BUS(old_bus);
-}
-#endif
-
-int dtt_i2c(void)
-{
-#if defined CONFIG_DTT_SENSORS
-       int i;
-       unsigned char sensors[] = CONFIG_DTT_SENSORS;
-       int old_bus;
-
-       /* Force a compilation error, if there are more then 32 sensors */
-       BUILD_BUG_ON(sizeof(sensors) > 32);
-       /* switch to correct I2C bus */
-#ifdef CONFIG_SYS_I2C
-       old_bus = i2c_get_bus_num();
-       i2c_set_bus_num(CONFIG_SYS_DTT_BUS_NUM);
-#else
-       old_bus = I2C_GET_BUS();
-       I2C_SET_BUS(CONFIG_SYS_DTT_BUS_NUM);
-#endif
-
-       _initialize_dtt();
-
-       /*
-        * Loop through sensors, read
-        * temperature, and output it.
-        */
-       for (i = 0; i < sizeof(sensors); i++)
-               printf("DTT%d: %i C\n", i + 1, dtt_get_temp(sensors[i]));
-
-       /* switch back to original I2C bus */
-#ifdef CONFIG_SYS_I2C
-       i2c_set_bus_num(old_bus);
-#else
-       I2C_SET_BUS(old_bus);
-#endif
-#endif
-
-       return 0;
-}
-
-int dtt_tmu(void)
-{
-#if defined CONFIG_TMU_CMD_DTT
-       int cur_temp;
-
-       /* Sense and return latest thermal info */
-       if (tmu_monitor(&cur_temp) == TMU_STATUS_INIT) {
-               puts("TMU is in unknown state, temperature is invalid\n");
-               return -1;
-       }
-       printf("Current temperature: %u degrees Celsius\n", cur_temp);
-#endif
-       return 0;
-}
-
-int do_dtt(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
-{
-       int err = 0;
-
-       err |= dtt_i2c();
-       err |= dtt_tmu();
-
-       return err;
-}      /* do_dtt() */
-
-/***************************************************/
-
-U_BOOT_CMD(
-         dtt,  1,      1,      do_dtt,
-         "Read temperature from Digital Thermometer and Thermostat",
-         ""
-);
index a5f24d7..a736386 100644 (file)
@@ -30,8 +30,6 @@ source "drivers/fpga/Kconfig"
 
 source "drivers/gpio/Kconfig"
 
-source "drivers/hwmon/Kconfig"
-
 source "drivers/i2c/Kconfig"
 
 source "drivers/input/Kconfig"
index f16d7fd..058bccb 100644 (file)
@@ -74,7 +74,6 @@ obj-$(CONFIG_CPU) += cpu/
 obj-y += crypto/
 obj-y += firmware/
 obj-$(CONFIG_FPGA) += fpga/
-obj-y += hwmon/
 obj-y += misc/
 obj-$(CONFIG_MMC) += mmc/
 obj-y += pcmcia/
diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/drivers/hwmon/Makefile b/drivers/hwmon/Makefile
deleted file mode 100644 (file)
index b4fb057..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-#
-# (C) Copyright 2006
-# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
-#
-# (C) Copyright 2001
-# Erik Theisen, Wave 7 Optics, etheisen@mindspring.com.
-#
-# SPDX-License-Identifier:     GPL-2.0+
-#
-
-#ccflags-y += -DDEBUG
-
-obj-$(CONFIG_DTT_ADM1021) += adm1021.o
-obj-$(CONFIG_DTT_ADT7460) += adt7460.o
-obj-$(CONFIG_DTT_DS1621) += ds1621.o
-obj-$(CONFIG_DTT_DS1722) += ds1722.o
-obj-$(CONFIG_DTT_DS1775) += ds1775.o
-obj-$(CONFIG_DTT_DS620) += ds620.o
-obj-$(CONFIG_DTT_LM63) += lm63.o
-obj-$(CONFIG_DTT_LM73) += lm73.o
-obj-$(CONFIG_DTT_LM75) += lm75.o
-obj-$(CONFIG_DTT_LM81) += lm81.o
diff --git a/drivers/hwmon/adm1021.c b/drivers/hwmon/adm1021.c
deleted file mode 100644 (file)
index 99e942b..0000000
+++ /dev/null
@@ -1,164 +0,0 @@
-/*
- * (C) Copyright 2003
- * Murray Jensen, CSIRO-MIT, Murray.Jensen@csiro.au
- *
- * based on dtt/lm75.c which is ...
- *
- * (C) Copyright 2001
- * Bill Hunter,  Wave 7 Optics, williamhunter@mediaone.net
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-/*
- * Analog Devices's ADM1021
- * "Low Cost Microprocessor System Temperature Monitor"
- */
-
-#include <common.h>
-
-#include <i2c.h>
-#include <dtt.h>
-
-#define DTT_READ_LOC_VALUE     0x00
-#define DTT_READ_REM_VALUE     0x01
-#define DTT_READ_STATUS                0x02
-#define DTT_READ_CONFIG                0x03
-#define DTT_READ_CONVRATE      0x04
-#define DTT_READ_LOC_HIGHLIM   0x05
-#define DTT_READ_LOC_LOWLIM    0x06
-#define DTT_READ_REM_HIGHLIM   0x07
-#define DTT_READ_REM_LOWLIM    0x08
-#define DTT_READ_DEVID         0xfe
-
-#define DTT_WRITE_CONFIG       0x09
-#define DTT_WRITE_CONVRATE     0x0a
-#define DTT_WRITE_LOC_HIGHLIM  0x0b
-#define DTT_WRITE_LOC_LOWLIM   0x0c
-#define DTT_WRITE_REM_HIGHLIM  0x0d
-#define DTT_WRITE_REM_LOWLIM   0x0e
-#define DTT_WRITE_ONESHOT      0x0f
-
-#define DTT_STATUS_BUSY                0x80    /* 1=ADC Converting */
-#define DTT_STATUS_LHIGH       0x40    /* 1=Local High Temp Limit Tripped */
-#define DTT_STATUS_LLOW                0x20    /* 1=Local Low Temp Limit Tripped */
-#define DTT_STATUS_RHIGH       0x10    /* 1=Remote High Temp Limit Tripped */
-#define DTT_STATUS_RLOW                0x08    /* 1=Remote Low Temp Limit Tripped */
-#define DTT_STATUS_OPEN                0x04    /* 1=Remote Sensor Open-Circuit */
-
-#define DTT_CONFIG_ALERT_MASKED        0x80    /* 0=ALERT Enabled, 1=ALERT Masked */
-#define DTT_CONFIG_STANDBY     0x40    /* 0=Run, 1=Standby */
-
-#define DTT_ADM1021_DEVID      0x41
-
-typedef
-       struct {
-               uint i2c_addr:7;        /* 7bit i2c chip address */
-               uint conv_rate:3;       /* conversion rate */
-               uint enable_alert:1;    /* enable alert output pin */
-               uint enable_local:1;    /* enable internal temp sensor */
-               uint max_local:8;       /* internal temp maximum */
-               uint min_local:8;       /* internal temp minimum */
-               uint enable_remote:1;   /* enable remote temp sensor */
-               uint max_remote:8;      /* remote temp maximum */
-               uint min_remote:8;      /* remote temp minimum */
-       }
-dtt_cfg_t;
-
-dtt_cfg_t dttcfg[] = CONFIG_SYS_DTT_ADM1021;
-
-int
-dtt_read (int sensor, int reg)
-{
-       dtt_cfg_t *dcp = &dttcfg[sensor >> 1];
-       uchar data;
-
-       if (i2c_read(dcp->i2c_addr, reg, 1, &data, 1) != 0)
-               return -1;
-
-       return (int)data;
-} /* dtt_read() */
-
-int
-dtt_write (int sensor, int reg, int val)
-{
-       dtt_cfg_t *dcp = &dttcfg[sensor >> 1];
-       uchar data;
-
-       data = (uchar)(val & 0xff);
-
-       if (i2c_write(dcp->i2c_addr, reg, 1, &data, 1) != 0)
-               return 1;
-
-       return 0;
-} /* dtt_write() */
-
-int
-dtt_init_one(int sensor)
-{
-       dtt_cfg_t *dcp = &dttcfg[sensor >> 1];
-       int reg, val;
-
-       if (((sensor & 1) == 0 ? dcp->enable_local : dcp->enable_remote) == 0)
-               return 1;       /* sensor is disabled (or rather ignored) */
-
-       /*
-        * Setup High Limit register
-        */
-       if ((sensor & 1) == 0) {
-               reg = DTT_WRITE_LOC_HIGHLIM;
-               val = dcp->max_local;
-       }
-       else {
-               reg = DTT_WRITE_REM_HIGHLIM;
-               val = dcp->max_remote;
-       }
-       if (dtt_write (sensor, reg, val) != 0)
-               return 1;
-
-       /*
-        * Setup Low Limit register
-        */
-       if ((sensor & 1) == 0) {
-               reg = DTT_WRITE_LOC_LOWLIM;
-               val = dcp->min_local;
-       }
-       else {
-               reg = DTT_WRITE_REM_LOWLIM;
-               val = dcp->min_remote;
-       }
-       if (dtt_write (sensor, reg, val) != 0)
-               return 1;
-
-       /* shouldn't hurt if the rest gets done twice */
-
-       /*
-        * Setup Conversion Rate register
-        */
-       if (dtt_write (sensor, DTT_WRITE_CONVRATE, dcp->conv_rate) != 0)
-               return 1;
-
-       /*
-        * Setup configuraton register
-        */
-       val = 0;                                /* running */
-       if (dcp->enable_alert == 0)
-               val |= DTT_CONFIG_ALERT_MASKED; /* mask ALERT pin */
-       if (dtt_write (sensor, DTT_WRITE_CONFIG, val) != 0)
-               return 1;
-
-       return 0;
-} /* dtt_init_one() */
-
-int
-dtt_get_temp (int sensor)
-{
-       signed char val;
-
-       if ((sensor & 1) == 0)
-               val = dtt_read(sensor, DTT_READ_LOC_VALUE);
-       else
-               val = dtt_read(sensor, DTT_READ_REM_VALUE);
-
-       return (int) val;
-} /* dtt_get_temp() */
diff --git a/drivers/hwmon/adt7460.c b/drivers/hwmon/adt7460.c
deleted file mode 100644 (file)
index 9b2c5b6..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * (C) Copyright 2008
- * Ricado Ribalda-Universidad Autonoma de Madrid, ricardo.ribalda@gmail.com
- * This work has been supported by: QTechnology  http://qtec.com/
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-#include <common.h>
-#include <i2c.h>
-#include <dtt.h>
-
-#define ADT7460_ADDRESS                0x2c
-#define ADT7460_INVALID                128
-#define ADT7460_CONFIG         0x40
-#define ADT7460_REM1_TEMP      0x25
-#define ADT7460_LOCAL_TEMP     0x26
-#define ADT7460_REM2_TEMP      0x27
-
-int dtt_read(int sensor, int reg)
-{
-       u8 dir = reg;
-       u8 data;
-
-       if (i2c_read(ADT7460_ADDRESS, dir, 1, &data, 1) == -1)
-               return -1;
-       if (data == ADT7460_INVALID)
-               return -1;
-
-       return data;
-}
-
-int dtt_write(int sensor, int reg, int val)
-{
-       u8 dir = reg;
-       u8 data = val;
-
-       if (i2c_write(ADT7460_ADDRESS, dir, 1, &data, 1) == -1)
-               return -1;
-
-       return 0;
-}
-
-int dtt_init_one(int sensor)
-{
-       printf("ADT7460 at I2C address 0x%2x\n", ADT7460_ADDRESS);
-
-       if (dtt_write(0, ADT7460_CONFIG, 1) == -1) {
-               puts("Error initialiting ADT7460\n");
-               return -1;
-       }
-
-       return 0;
-}
-
-int dtt_get_temp(int sensor)
-{
-       int aux;
-       u8 table[] =
-           { ADT7460_REM1_TEMP, ADT7460_LOCAL_TEMP, ADT7460_REM2_TEMP };
-
-       if (sensor > 2) {
-               puts("DTT sensor does not exist\n");
-               return -1;
-       }
-
-       aux = dtt_read(0, table[sensor]);
-       if (aux == -1) {
-               puts("DTT temperature read failed\n");
-               return -1;
-       }
-
-       return aux;
-}
diff --git a/drivers/hwmon/ds1621.c b/drivers/hwmon/ds1621.c
deleted file mode 100644 (file)
index 66947a6..0000000
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
- * (C) Copyright 2001
- * Erik Theisen,  Wave 7 Optics, etheisen@mindspring.com.
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-/*
- * Dallas Semiconductor's DS1621/1631 Digital Thermometer and Thermostat.
- */
-
-#include <common.h>
-#include <i2c.h>
-#include <dtt.h>
-
-/*
- * Device code
- */
-#define DTT_I2C_DEV_CODE       0x48    /* Dallas Semi's DS1621 */
-#define DTT_READ_TEMP          0xAA
-#define DTT_READ_COUNTER       0xA8
-#define DTT_READ_SLOPE         0xA9
-#define DTT_WRITE_START_CONV   0xEE
-#define DTT_WRITE_STOP_CONV    0x22
-#define DTT_TEMP_HIGH          0xA1
-#define DTT_TEMP_LOW           0xA2
-#define DTT_CONFIG             0xAC
-
-/*
- * Config register bits
- */
-#define DTT_CONFIG_1SHOT       0x01
-#define DTT_CONFIG_POLARITY    0x02
-#define DTT_CONFIG_R0          0x04    /* ds1631 only */
-#define DTT_CONFIG_R1          0x08    /* ds1631 only */
-#define DTT_CONFIG_NVB         0x10
-#define DTT_CONFIG_TLF         0x20
-#define DTT_CONFIG_THF         0x40
-#define DTT_CONFIG_DONE                0x80
-
-
-int dtt_read(int sensor, int reg)
-{
-       int dlen;
-       uchar data[2];
-
-       /* Calculate sensor address and command */
-       sensor = DTT_I2C_DEV_CODE + (sensor & 0x07); /* Calculate addr of ds1621*/
-
-       /* Prepare to handle 2 byte result */
-       switch(reg) {
-       case DTT_READ_TEMP:
-       case DTT_TEMP_HIGH:
-       case DTT_TEMP_LOW:
-               dlen = 2;
-               break;
-       default:
-               dlen = 1;
-       }
-
-       /* Now try to read the register */
-       if (i2c_read(sensor, reg, 1, data, dlen) != 0)
-               return 1;
-
-       /* Handle 2 byte result */
-       if (dlen == 2)
-               return (short)((data[0] << 8) | data[1]);
-
-       return (int)data[0];
-}
-
-
-int dtt_write(int sensor, int reg, int val)
-{
-       int dlen;
-       uchar data[2];
-
-       /* Calculate sensor address and register */
-       sensor = DTT_I2C_DEV_CODE + (sensor & 0x07);
-
-       /* Handle various data sizes. */
-       switch(reg) {
-       case DTT_READ_TEMP:
-       case DTT_TEMP_HIGH:
-       case DTT_TEMP_LOW:
-               dlen = 2;
-               data[0] = (char)((val >> 8) & 0xff);    /* MSB first */
-               data[1] = (char)(val & 0xff);
-               break;
-       case DTT_WRITE_START_CONV:
-       case DTT_WRITE_STOP_CONV:
-               dlen = 0;
-               data[0] = (char)0;
-               data[1] = (char)0;
-               break;
-       default:
-               dlen = 1;
-               data[0] = (char)(val & 0xff);
-       }
-
-       /* Write value to device */
-       if (i2c_write(sensor, reg, 1, data, dlen) != 0)
-               return 1;
-
-       /* Poll NV memory busy bit in case write was to register stored in EEPROM */
-       while(i2c_reg_read(sensor, DTT_CONFIG) & DTT_CONFIG_NVB)
-               ;
-
-       return 0;
-}
-
-
-int dtt_init_one(int sensor)
-{
-       int val;
-
-       /* Setup High Temp */
-       val = ((CONFIG_SYS_DTT_MAX_TEMP * 2) << 7) & 0xff80;
-       if (dtt_write(sensor, DTT_TEMP_HIGH, val) != 0)
-               return 1;
-
-       /* Setup Low Temp - hysteresis */
-       val = (((CONFIG_SYS_DTT_MAX_TEMP - CONFIG_SYS_DTT_HYSTERESIS) * 2) << 7) & 0xff80;
-       if (dtt_write(sensor, DTT_TEMP_LOW, val) != 0)
-               return 1;
-
-       /*
-        * Setup configuraton register
-        *
-        * Clear THF & TLF, Reserved = 1, Polarity = Active Low, One Shot = YES
-        *
-        * We run in polled mode, since there isn't any way to know if this
-        * lousy device is ready to provide temperature readings on power up.
-        */
-       val = 0x9;
-       if (dtt_write(sensor, DTT_CONFIG, val) != 0)
-               return 1;
-
-       return 0;
-}
-
-int dtt_get_temp(int sensor)
-{
-       int i;
-
-       /* Start a conversion, may take up to 1 second. */
-       dtt_write(sensor, DTT_WRITE_START_CONV, 0);
-       for (i = 0; i <= 10; i++) {
-               udelay(100000);
-               if (dtt_read(sensor, DTT_CONFIG) & DTT_CONFIG_DONE)
-                       break;
-       }
-
-       return (dtt_read(sensor, DTT_READ_TEMP) / 256);
-}
diff --git a/drivers/hwmon/ds1722.c b/drivers/hwmon/ds1722.c
deleted file mode 100644 (file)
index c469588..0000000
+++ /dev/null
@@ -1,137 +0,0 @@
-#include <common.h>
-#include <asm/ic/ssi.h>
-#include <ds1722.h>
-
-static void ds1722_select(int dev)
-{
-       ssi_set_interface(4096, 0, 0, 0);
-       ssi_chip_select(0);
-       udelay(1);
-       ssi_chip_select(dev);
-       udelay(1);
-}
-
-
-u8 ds1722_read(int dev, int addr)
-{
-       u8 res;
-
-       ds1722_select(dev);
-
-       ssi_tx_byte(addr);
-       res = ssi_rx_byte();
-
-       ssi_chip_select(0);
-
-       return res;
-}
-
-void ds1722_write(int dev, int addr, u8 data)
-{
-       ds1722_select(dev);
-
-       ssi_tx_byte(0x80|addr);
-       ssi_tx_byte(data);
-
-       ssi_chip_select(0);
-}
-
-
-u16 ds1722_temp(int dev, int resolution)
-{
-       static int useconds[] = {
-               75000, 150000, 300000, 600000, 1200000
-       };
-       char temp;
-       u16 res;
-
-
-       /* set up the desired resulotion ... */
-       ds1722_write(dev, 0, 0xe0 | (resolution << 1));
-
-       /* wait while the chip measures the tremperature */
-       udelay(useconds[resolution]);
-
-       res = (temp = ds1722_read(dev, 2)) << 8;
-
-       if (temp < 0) {
-               temp = (16 - (ds1722_read(dev, 1) >> 4)) & 0x0f;
-       } else {
-               temp = (ds1722_read(dev, 1) >> 4);
-       }
-
-       switch (temp) {
-       case 0:
-               /* .0000 */
-               break;
-       case 1:
-               /* .0625 */
-               res |=1;
-               break;
-       case 2:
-               /* .1250 */
-               res |=1;
-               break;
-       case 3:
-               /* .1875 */
-               res |=2;
-               break;
-       case 4:
-               /* .2500 */
-               res |=3;
-               break;
-       case 5:
-               /* .3125 */
-               res |=3;
-               break;
-       case 6:
-               /* .3750 */
-               res |=4;
-               break;
-       case 7:
-               /* .4375 */
-               res |=4;
-               break;
-       case 8:
-               /* .5000 */
-               res |=5;
-               break;
-       case 9:
-               /* .5625 */
-               res |=6;
-               break;
-       case 10:
-               /* .6250 */
-               res |=6;
-               break;
-       case 11:
-               /* .6875 */
-               res |=7;
-               break;
-       case 12:
-               /* .7500 */
-               res |=8;
-               break;
-       case 13:
-               /* .8125 */
-               res |=8;
-               break;
-       case 14:
-               /* .8750 */
-               res |=9;
-               break;
-       case 15:
-               /* .9375 */
-               res |=9;
-               break;
-       }
-       return res;
-
-}
-
-int ds1722_probe(int dev)
-{
-       u16 temp = ds1722_temp(dev, DS1722_RESOLUTION_12BIT);
-       printf("%d.%d deg C\n\n", (char)(temp >> 8), temp & 0xff);
-       return 0;
-}
diff --git a/drivers/hwmon/ds1775.c b/drivers/hwmon/ds1775.c
deleted file mode 100644 (file)
index 4c0c0b8..0000000
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-/*
- * Dallas Semiconductor's DS1775 Digital Thermometer and Thermostat
- */
-
-#include <common.h>
-
-#include <i2c.h>
-#include <dtt.h>
-
-#define DTT_I2C_DEV_CODE       0x48 /* Dallas Semi's DS1775 device code */
-#define DTT_READ_TEMP          0x0
-#define DTT_CONFIG             0x1
-#define DTT_TEMP_HYST          0x2
-#define DTT_TEMP_OS            0x3
-
-int dtt_read(int sensor, int reg)
-{
-       int dlen;
-       uchar data[2];
-
-       /*
-        * Calculate sensor address and command
-        */
-       sensor = DTT_I2C_DEV_CODE + (sensor & 0x07); /* Calculate addr of ds1775 */
-
-       /*
-        * Prepare to handle 2 byte result
-        */
-       if ((reg == DTT_READ_TEMP) ||
-           (reg == DTT_TEMP_OS) || (reg == DTT_TEMP_HYST))
-               dlen = 2;
-       else
-               dlen = 1;
-
-       /*
-        * Now try to read the register
-        */
-       if (i2c_read(sensor, reg, 1, data, dlen) != 0)
-               return 1;
-
-       /*
-        * Handle 2 byte result
-        */
-       if (dlen == 2)
-               return ((int)((short)data[1] + (((short)data[0]) << 8)));
-
-       return (int) data[0];
-}
-
-
-int dtt_write(int sensor, int reg, int val)
-{
-       int dlen;
-       uchar data[2];
-
-       /*
-        * Calculate sensor address and register
-        */
-       sensor = DTT_I2C_DEV_CODE + (sensor & 0x07);
-
-       /*
-        * Handle various data sizes
-        */
-       if ((reg == DTT_READ_TEMP) ||
-           (reg == DTT_TEMP_OS) || (reg == DTT_TEMP_HYST)) {
-               dlen = 2;
-               data[0] = (char)((val >> 8) & 0xff); /* MSB first */
-               data[1] = (char)(val & 0xff);
-       } else {
-               dlen = 1;
-               data[0] = (char)(val & 0xff);
-       }
-
-       /*
-        * Write value to device
-        */
-       if (i2c_write(sensor, reg, 1, data, dlen) != 0)
-               return 1;
-
-       return 0;
-}
-
-
-int dtt_init_one(int sensor)
-{
-       int val;
-
-       /*
-        * Setup High Temp
-        */
-       val = ((CONFIG_SYS_DTT_MAX_TEMP * 2) << 7) & 0xff80;
-       if (dtt_write(sensor, DTT_TEMP_OS, val) != 0)
-               return 1;
-       udelay(50000);                  /* Max 50ms */
-
-       /*
-        * Setup Low Temp - hysteresis
-        */
-       val = (((CONFIG_SYS_DTT_MAX_TEMP - CONFIG_SYS_DTT_HYSTERESIS) * 2) << 7) & 0xff80;
-       if (dtt_write(sensor, DTT_TEMP_HYST, val) != 0)
-               return 1;
-       udelay(50000);                  /* Max 50ms */
-
-       /*
-        * Setup configuraton register
-        *
-        * Fault Tolerance limits 4, Thermometer resolution bits is 9,
-        * Polarity = Active Low,continuous conversion mode, Thermostat
-        * mode is interrupt mode
-        */
-       val = 0xa;
-       if (dtt_write(sensor, DTT_CONFIG, val) != 0)
-               return 1;
-       udelay(50000);                  /* Max 50ms */
-
-       return 0;
-}
-
-int dtt_get_temp(int sensor)
-{
-       return (dtt_read(sensor, DTT_READ_TEMP) / 256);
-}
diff --git a/drivers/hwmon/ds620.c b/drivers/hwmon/ds620.c
deleted file mode 100644 (file)
index 1ecc3da..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * DS620 DTT support
- *
- * (C) Copyright 2014 3ADEV <http://www.3adev.com>
- * Written-by: Albert ARIBAUD <albert.aribaud@3adev.fr>
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-/*
- * Dallas Semiconductor's DS1621/1631 Digital Thermometer and Thermostat.
- */
-
-#include <common.h>
-#include <i2c.h>
-#include <dtt.h>
-
-/*
- * Device code
- */
-#define DTT_I2C_DEV_CODE       0x48
-#define DTT_START_CONVERT      0x51
-#define DTT_TEMP               0xAA
-#define DTT_CONFIG             0xAC
-
-/*
- * Config register MSB bits
- */
-#define DTT_CONFIG_1SHOT       0x01
-#define DTT_CONFIG_AUTOC       0x02
-#define DTT_CONFIG_R0          0x04 /* always 1 */
-#define DTT_CONFIG_R1          0x08 /* always 1 */
-#define DTT_CONFIG_TLF 0x10
-#define DTT_CONFIG_THF 0x20
-#define DTT_CONFIG_NVB 0x40
-#define DTT_CONFIG_DONE        0x80
-
-#define CHIP(sensor) (DTT_I2C_DEV_CODE + (sensor & 0x07))
-
-int dtt_init_one(int sensor)
-{
-       uint8_t config = DTT_CONFIG_1SHOT
-                       | DTT_CONFIG_R0
-                       | DTT_CONFIG_R1;
-       return i2c_write(CHIP(sensor), DTT_CONFIG, 1, &config, 1);
-}
-
-int dtt_get_temp(int sensor)
-{
-       uint8_t status;
-       uint8_t temp[2];
-
-       /* Start a conversion, may take up to 1 second. */
-       i2c_write(CHIP(sensor), DTT_START_CONVERT, 1, NULL, 0);
-       do {
-               if (i2c_read(CHIP(sensor), DTT_CONFIG, 1, &status, 1))
-                       /* bail out if I2C error */
-                       status |= DTT_CONFIG_DONE;
-       } while (!(status & DTT_CONFIG_DONE));
-       if (i2c_read(CHIP(sensor), DTT_TEMP, 1, temp, 2))
-               /* bail out if I2C error */
-               return -274; /* below absolute zero == error */
-
-       return ((int16_t)(temp[1] | (temp[0] << 8))) >> 7;
-}
diff --git a/drivers/hwmon/lm63.c b/drivers/hwmon/lm63.c
deleted file mode 100644 (file)
index 053c785..0000000
+++ /dev/null
@@ -1,160 +0,0 @@
-/*
- * (C) Copyright 2007-2008
- * Dirk Eibach,  Guntermann & Drunck GmbH, eibach@gdsys.de
- * based on lm75.c by Bill Hunter
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-/*
- * National LM63/LM64 Temperature Sensor
- * Main difference: LM 64 has -16 Kelvin temperature offset
- */
-
-#include <common.h>
-#include <i2c.h>
-#include <dtt.h>
-
-#define DTT_I2C_LM63_ADDR      0x4C    /* National LM63 device */
-
-#define DTT_READ_TEMP_RMT_MSB  0x01
-#define DTT_CONFIG             0x03
-#define DTT_READ_TEMP_RMT_LSB  0x10
-#define DTT_TACHLIM_LSB                0x48
-#define DTT_TACHLIM_MSB                0x49
-#define DTT_FAN_CONFIG         0x4A
-#define DTT_PWM_FREQ           0x4D
-#define DTT_PWM_LOOKUP_BASE    0x50
-
-struct pwm_lookup_entry {
-       u8 temp;
-       u8 pwm;
-};
-
-/*
- * Device code
- */
-
-int dtt_read(int sensor, int reg)
-{
-       int dlen;
-       uchar data[2];
-
-       /*
-        * Calculate sensor address and register.
-        */
-       if (!sensor)
-               sensor = DTT_I2C_LM63_ADDR;     /* legacy config */
-
-       dlen = 1;
-
-       /*
-        * Now try to read the register.
-        */
-       if (i2c_read(sensor, reg, 1, data, dlen) != 0)
-               return -1;
-
-       return (int)data[0];
-}                              /* dtt_read() */
-
-int dtt_write(int sensor, int reg, int val)
-{
-       int dlen;
-       uchar data[2];
-
-       /*
-        * Calculate sensor address and register.
-        */
-       if (!sensor)
-               sensor = DTT_I2C_LM63_ADDR;     /* legacy config */
-
-       dlen = 1;
-       data[0] = (char)(val & 0xff);
-
-       /*
-        * Write value to register.
-        */
-       if (i2c_write(sensor, reg, 1, data, dlen) != 0)
-               return 1;
-
-       return 0;
-}                              /* dtt_write() */
-
-static int is_lm64(int sensor)
-{
-       return sensor && (sensor != DTT_I2C_LM63_ADDR);
-}
-
-int dtt_init_one(int sensor)
-{
-       int i;
-       int val;
-
-       struct pwm_lookup_entry pwm_lookup[] = CONFIG_DTT_PWM_LOOKUPTABLE;
-
-       /*
-        * Set PWM Frequency to 2.5% resolution
-        */
-       val = 20;
-       if (dtt_write(sensor, DTT_PWM_FREQ, val) != 0)
-               return 1;
-
-       /*
-        * Set Tachometer Limit
-        */
-       val = CONFIG_DTT_TACH_LIMIT;
-       if (dtt_write(sensor, DTT_TACHLIM_LSB, val & 0xff) != 0)
-               return 1;
-       if (dtt_write(sensor, DTT_TACHLIM_MSB, (val >> 8) & 0xff) != 0)
-               return 1;
-
-       /*
-        * Make sure PWM Lookup-Table is writeable
-        */
-       if (dtt_write(sensor, DTT_FAN_CONFIG, 0x20) != 0)
-               return 1;
-
-       /*
-        * Setup PWM Lookup-Table
-        */
-       for (i = 0; i < ARRAY_SIZE(pwm_lookup); i++) {
-               int address = DTT_PWM_LOOKUP_BASE + 2 * i;
-               val = pwm_lookup[i].temp;
-               if (is_lm64(sensor))
-                       val -= 16;
-               if (dtt_write(sensor, address, val) != 0)
-                       return 1;
-               val = dtt_read(sensor, address);
-               val = pwm_lookup[i].pwm;
-               if (dtt_write(sensor, address + 1, val) != 0)
-                       return 1;
-       }
-
-       /*
-        * Enable PWM Lookup-Table, PWM Clock 360 kHz, Tachometer Mode 2
-        */
-       val = 0x02;
-       if (dtt_write(sensor, DTT_FAN_CONFIG, val) != 0)
-               return 1;
-
-       /*
-        * Enable Tach input
-        */
-       val = dtt_read(sensor, DTT_CONFIG) | 0x04;
-       if (dtt_write(sensor, DTT_CONFIG, val) != 0)
-               return 1;
-
-       return 0;
-}
-
-int dtt_get_temp(int sensor)
-{
-       s16 temp = (dtt_read(sensor, DTT_READ_TEMP_RMT_MSB) << 8)
-           | (dtt_read(sensor, DTT_READ_TEMP_RMT_LSB));
-
-       if (is_lm64(sensor))
-               temp += 16 << 8;
-
-       /* Ignore LSB for now, U-Boot only prints natural numbers */
-       return temp >> 8;
-}
diff --git a/drivers/hwmon/lm73.c b/drivers/hwmon/lm73.c
deleted file mode 100644 (file)
index c15c751..0000000
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
- * (C) Copyright 2007-2008
- * Larry Johnson, lrj@acm.org
- *
- * based on dtt/lm75.c which is ...
- *
- * (C) Copyright 2001
- * Bill Hunter,  Wave 7 Optics, williamhunter@mediaone.net
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-/*
- * National Semiconductor LM73 Temperature Sensor
- */
-
-#include <common.h>
-#include <i2c.h>
-#include <dtt.h>
-
-/*
- * Device code
- */
-#define DTT_I2C_DEV_CODE 0x48  /* National Semi's LM73 device */
-#define DTT_READ_TEMP          0x0
-#define DTT_CONFIG             0x1
-#define DTT_TEMP_HIGH          0x2
-#define DTT_TEMP_LOW           0x3
-#define DTT_CONTROL            0x4
-#define DTT_ID                 0x7
-
-int dtt_read(int const sensor, int const reg)
-{
-       int dlen;
-       uint8_t data[2];
-
-       /*
-        * Validate 'reg' param and get register size.
-        */
-       switch (reg) {
-       case DTT_CONFIG:
-       case DTT_CONTROL:
-               dlen = 1;
-               break;
-       case DTT_READ_TEMP:
-       case DTT_TEMP_HIGH:
-       case DTT_TEMP_LOW:
-       case DTT_ID:
-               dlen = 2;
-               break;
-       default:
-               return -1;
-       }
-       /*
-        * Try to read the register at the calculated sensor address.
-        */
-       if (0 !=
-           i2c_read(DTT_I2C_DEV_CODE + (sensor & 0x07), reg, 1, data, dlen))
-               return -1;
-       /*
-        * Handle 2 byte result.
-        */
-       if (2 == dlen)
-               return (int)((unsigned)data[0] << 8 | (unsigned)data[1]);
-
-       return (int)data[0];
-} /* dtt_read() */
-
-int dtt_write(int const sensor, int const reg, int const val)
-{
-       int dlen;
-       uint8_t data[2];
-
-       /*
-        * Validate 'reg' param and handle register size
-        */
-       switch (reg) {
-       case DTT_CONFIG:
-       case DTT_CONTROL:
-               dlen = 1;
-               data[0] = (uint8_t) val;
-               break;
-       case DTT_TEMP_HIGH:
-       case DTT_TEMP_LOW:
-               dlen = 2;
-               data[0] = (uint8_t) (val >> 8); /* MSB first */
-               data[1] = (uint8_t) val;
-               break;
-       default:
-               return -1;
-       }
-       /*
-        * Write value to register at the calculated sensor address.
-        */
-       return 0 != i2c_write(DTT_I2C_DEV_CODE + (sensor & 0x07), reg, 1, data,
-                             dlen);
-} /* dtt_write() */
-
-int dtt_init_one(int const sensor)
-{
-       int val;
-
-       /*
-        * Validate the Identification register
-        */
-       if (0x0190 != dtt_read(sensor, DTT_ID))
-               return -1;
-       /*
-        * Setup THIGH (upper-limit) and TLOW (lower-limit) registers
-        */
-       val = CONFIG_SYS_DTT_MAX_TEMP << 7;
-       if (dtt_write(sensor, DTT_TEMP_HIGH, val))
-               return -1;
-
-       val = CONFIG_SYS_DTT_MIN_TEMP << 7;
-       if (dtt_write(sensor, DTT_TEMP_LOW, val))
-               return -1;
-       /*
-        * Setup configuraton register
-        */
-       /* config = alert active low, disabled, and reset */
-       val = 0x64;
-       if (dtt_write(sensor, DTT_CONFIG, val))
-               return -1;
-       /*
-        * Setup control/status register
-        */
-       /* control = temp resolution 0.25C */
-       val = 0x00;
-       if (dtt_write(sensor, DTT_CONTROL, val))
-               return -1;
-
-       dtt_read(sensor, DTT_CONTROL);  /* clear temperature flags */
-       return 0;
-} /* dtt_init_one() */
-
-int dtt_get_temp(int const sensor)
-{
-       int const ret = dtt_read(sensor, DTT_READ_TEMP);
-
-       if (ret < 0) {
-               printf("DTT temperature read failed.\n");
-               return 0;
-       }
-       return (int)((int16_t) ret + 0x0040) >> 7;
-} /* dtt_get_temp() */
diff --git a/drivers/hwmon/lm75.c b/drivers/hwmon/lm75.c
deleted file mode 100644 (file)
index aafa475..0000000
+++ /dev/null
@@ -1,139 +0,0 @@
-/*
- * (C) Copyright 2001
- * Bill Hunter,  Wave 7 Optics, williamhunter@mediaone.net
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-/*
- * On Semiconductor's LM75 Temperature Sensor
- */
-
-#include <common.h>
-#include <i2c.h>
-#include <dtt.h>
-
-/*
- * Device code
- */
-#define DTT_I2C_DEV_CODE 0x48                  /* ON Semi's LM75 device */
-#define DTT_READ_TEMP          0x0
-#define DTT_CONFIG             0x1
-#define DTT_TEMP_HYST          0x2
-#define DTT_TEMP_SET           0x3
-
-int dtt_read(int sensor, int reg)
-{
-       int dlen;
-       uchar data[2];
-
-#ifdef CONFIG_DTT_AD7414
-       /*
-        * On AD7414 the first value upon bootup is not read correctly.
-        * This is most likely because of the 800ms update time of the
-        * temp register in normal update mode. To get current values
-        * each time we issue the "dtt" command including upon powerup
-        * we switch into one-short mode.
-        *
-        * Issue one-shot mode command
-        */
-       dtt_write(sensor, DTT_CONFIG, 0x64);
-#endif
-
-       /* Validate 'reg' param */
-       if((reg < 0) || (reg > 3))
-               return -1;
-
-       /* Calculate sensor address and register. */
-       sensor = DTT_I2C_DEV_CODE + (sensor & 0x07);
-
-       /* Prepare to handle 2 byte result. */
-       if ((reg == DTT_READ_TEMP) ||
-               (reg == DTT_TEMP_HYST) ||
-               (reg == DTT_TEMP_SET))
-                       dlen = 2;
-       else
-               dlen = 1;
-
-       /* Now try to read the register. */
-       if (i2c_read(sensor, reg, 1, data, dlen) != 0)
-               return -1;
-
-       /* Handle 2 byte result. */
-       if (dlen == 2)
-               return ((int)((short)data[1] + (((short)data[0]) << 8)));
-
-       return (int)data[0];
-} /* dtt_read() */
-
-
-int dtt_write(int sensor, int reg, int val)
-{
-       int dlen;
-       uchar data[2];
-
-       /* Validate 'reg' param */
-       if ((reg < 0) || (reg > 3))
-               return 1;
-
-       /* Calculate sensor address and register. */
-       sensor = DTT_I2C_DEV_CODE + (sensor & 0x07);
-
-       /* Handle 2 byte values. */
-       if ((reg == DTT_READ_TEMP) ||
-               (reg == DTT_TEMP_HYST) ||
-               (reg == DTT_TEMP_SET)) {
-                       dlen = 2;
-               data[0] = (char)((val >> 8) & 0xff);    /* MSB first */
-               data[1] = (char)(val & 0xff);
-       } else {
-               dlen = 1;
-               data[0] = (char)(val & 0xff);
-       }
-
-       /* Write value to register. */
-       if (i2c_write(sensor, reg, 1, data, dlen) != 0)
-               return 1;
-
-       return 0;
-} /* dtt_write() */
-
-
-int dtt_init_one(int sensor)
-{
-       int val;
-
-       /* Setup TSET ( trip point ) register */
-       val = ((CONFIG_SYS_DTT_MAX_TEMP * 2) << 7) & 0xff80; /* trip */
-       if (dtt_write(sensor, DTT_TEMP_SET, val) != 0)
-               return 1;
-
-       /* Setup THYST ( untrip point ) register - Hysteresis */
-       val = (((CONFIG_SYS_DTT_MAX_TEMP - CONFIG_SYS_DTT_HYSTERESIS) * 2) << 7) & 0xff80;
-       if (dtt_write(sensor, DTT_TEMP_HYST, val) != 0)
-               return 1;
-
-       /* Setup configuraton register */
-#ifdef CONFIG_DTT_AD7414
-       /* config = alert active low and disabled */
-       val = 0x60;
-#else
-       /* config = 6 sample integration, int mode, active low, and enable */
-       val = 0x18;
-#endif
-       if (dtt_write(sensor, DTT_CONFIG, val) != 0)
-               return 1;
-
-       return 0;
-} /* dtt_init_one() */
-
-int dtt_get_temp(int sensor)
-{
-       int const ret = dtt_read(sensor, DTT_READ_TEMP);
-
-       if (ret < 0) {
-               printf("DTT temperature read failed.\n");
-               return 0;
-       }
-       return (int)((int16_t) ret / 256);
-} /* dtt_get_temp() */
diff --git a/drivers/hwmon/lm81.c b/drivers/hwmon/lm81.c
deleted file mode 100644 (file)
index bcc8d32..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * (C) Copyright 2006
- * Heiko Schocher, DENX Software Enginnering <hs@denx.de>
- *
- * based on dtt/lm75.c which is ...
- *
- * (C) Copyright 2001
- * Bill Hunter,  Wave 7 Optics, williamhunter@mediaone.net
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-/*
- * On Semiconductor's LM81 Temperature Sensor
- */
-
-#include <common.h>
-#include <i2c.h>
-#include <dtt.h>
-
-/*
- * Device code
- */
-#define DTT_I2C_DEV_CODE 0x2c                  /* ON Semi's LM81 device */
-#define DTT_READ_TEMP          0x27
-#define DTT_CONFIG_TEMP                0x4b
-#define DTT_TEMP_MAX           0x39
-#define DTT_TEMP_HYST          0x3a
-#define DTT_CONFIG             0x40
-
-int dtt_read(int sensor, int reg)
-{
-    int dlen = 1;
-    uchar data[2];
-
-    /*
-     * Calculate sensor address and register.
-     */
-    sensor = DTT_I2C_DEV_CODE + (sensor & 0x03); /* calculate address of lm81 */
-
-    /*
-     * Now try to read the register.
-     */
-    if (i2c_read(sensor, reg, 1, data, dlen) != 0)
-       return -1;
-
-    return (int)data[0];
-} /* dtt_read() */
-
-
-int dtt_write(int sensor, int reg, int val)
-{
-    uchar data;
-
-    /*
-     * Calculate sensor address and register.
-     */
-    sensor = DTT_I2C_DEV_CODE + (sensor & 0x03); /* calculate address of lm81 */
-
-    data = (char)(val & 0xff);
-
-    /*
-     * Write value to register.
-     */
-    if (i2c_write(sensor, reg, 1, &data, 1) != 0)
-       return 1;
-
-    return 0;
-} /* dtt_write() */
-
-#define DTT_MANU       0x3e
-#define DTT_REV                0x3f
-#define DTT_CONFIG     0x40
-#define DTT_ADR                0x48
-
-int dtt_init_one(int sensor)
-{
-       int     man;
-       int     adr;
-       int     rev;
-
-       if (dtt_write (sensor, DTT_CONFIG, 0x01) < 0)
-               return 1;
-       /* The LM81 needs 400ms to get the correct values ... */
-       udelay (400000);
-       man = dtt_read (sensor, DTT_MANU);
-       if (man != 0x01)
-               return 1;
-       adr = dtt_read (sensor, DTT_ADR);
-       if (adr < 0)
-               return 1;
-       rev = dtt_read (sensor, DTT_REV);
-       if (rev < 0)
-               return 1;
-
-       debug ("DTT:   Found LM81@%x Rev: %d\n", adr, rev);
-       return 0;
-} /* dtt_init_one() */
-
-
-#define TEMP_FROM_REG(temp) \
-   ((temp)<256?((((temp)&0x1fe) >> 1) * 10)     + ((temp) & 1) * 5:  \
-              ((((temp)&0x1fe) >> 1) -255) * 10 - ((temp) & 1) * 5)  \
-
-int dtt_get_temp(int sensor)
-{
-       int val = dtt_read (sensor, DTT_READ_TEMP);
-       int tmpcnf = dtt_read (sensor, DTT_CONFIG_TEMP);
-
-       return (TEMP_FROM_REG((val << 1) + ((tmpcnf & 0x80) >> 7))) / 10;
-} /* dtt_get_temp() */
index bc0bc2b..95c0535 100644 (file)
@@ -13,7 +13,6 @@
  * Alphabetical list of all possible commands.
  */
 
-#define CONFIG_CMD_DTT         /* Digital Therm and Thermostat */
 #define CONFIG_CMD_EEPROM      /* EEPROM read/write support    */
 #define CONFIG_CMD_FDC         /* Floppy Disk Support          */
 #define CONFIG_CMD_FUSE                /* Device fuse support          */
index b9599b5..8628b7e 100644 (file)
 #define CONFIG_SYS_EEPROM_WREN                 1
 #define CONFIG_SYS_I2C_BOOT_EEPROM_ADDR        0x52
 
-/*
- * standard dtt sensor configuration - bottom bit will determine local or
- * remote sensor of the TMP401
- */
-#define CONFIG_DTT_SENSORS             { 0, 1 }
-
-/*
- * The PMC440 uses a TI TMP401 temperature sensor. This part
- * is basically compatible to the ADM1021 that is supported
- * by U-Boot.
- *
- * - i2c addr 0x4c
- * - conversion rate 0x02 = 0.25 conversions/second
- * - ALERT ouput disabled
- * - local temp sensor enabled, min set to 0 deg, max set to 70 deg
- * - remote temp sensor enabled, min set to 0 deg, max set to 70 deg
- */
-#define CONFIG_DTT_ADM1021
-#define CONFIG_SYS_DTT_ADM1021         { { 0x4c, 0x02, 0, 1, 70, 0, 1, 70, 0} }
-
 #define CONFIG_PREBOOT         "echo Add \\\"run fpga\\\" and "        \
                                "\\\"painit\\\" to preboot command"
 
 
 /* Partitions */
 
-#define CONFIG_CMD_DTT
 #define CONFIG_CMD_EEPROM
 #define CONFIG_CMD_NAND
 #define CONFIG_CMD_PCI
index e3c2cca..df6386c 100644 (file)
 #define CONFIG_RTC_DS1337                      /* use ds1337 rtc via i2c */
 #define CONFIG_SYS_I2C_RTC_ADDR                0x68    /* at address 0x68 */
 
-/* I2C SYSMON (LM75) */
-#define CONFIG_DTT_LM75                        1       /* ON Semi's LM75 */
-#define CONFIG_DTT_SENSORS             {0}     /* Sensor addresses */
-#define CONFIG_SYS_DTT_MAX_TEMP                70
-#define CONFIG_SYS_DTT_LOW_TEMP                -30
-#define CONFIG_SYS_DTT_HYSTERESIS      3
-
 /*
  * TSEC
  */
 /*
  * Command line configuration.
  */
-#define CONFIG_CMD_DTT
 #define CONFIG_CMD_EEPROM
 #define CONFIG_CMD_JFFS2
 #define CONFIG_CMD_REGINFO
index cd46db4..8265f3c 100644 (file)
 
 #define CONFIG_HWCONFIG
 
-#define CONFIG_DTT_ADM1021     1       /* ADM1021 temp sensor support  */
-#define CONFIG_SYS_DTT_BUS_NUM 1       /* The I2C bus for DTT          */
-#define CONFIG_DTT_SENSORS     { 0, 1 }        /* Sensor index */
-/*
- * ADM1021/NCT72 temp sensor configuration (see dtt/adm1021.c for details).
- * there will be one entry in this array for each two (dummy) sensors in
- * CONFIG_DTT_SENSORS.
- *
- * For uCP1020 module:
- * - only one ADM1021/NCT72
- * - i2c addr 0x41
- * - conversion rate 0x02 = 0.25 conversions/second
- * - ALERT output disabled
- * - local temp sensor enabled, min set to 0 deg, max set to 85 deg
- * - remote temp sensor enabled, min set to 0 deg, max set to 85 deg
- */
-#define CONFIG_SYS_DTT_ADM1021 { { CONFIG_SYS_I2C_NCT72_ADDR, \
-                                        0x02, 0, 1, 0, 85, 1, 0, 85} }
-
-#define CONFIG_CMD_DTT
-
 /*
  * These can be toggled for performance analysis, otherwise use default.
  */
index 9f35e71..0be310d 100644 (file)
 #define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 3
 #define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 10
 
-/* I2C SYSMON (LM75, AD7414 is almost compatible)                      */
-#define CONFIG_DTT_LM75                1               /* ON Semi's LM75       */
-#define CONFIG_DTT_AD7414      1               /* use AD7414           */
-#define CONFIG_DTT_SENSORS     {0}             /* Sensor addresses     */
-#define CONFIG_SYS_DTT_MAX_TEMP        70
-#define CONFIG_SYS_DTT_LOW_TEMP        -30
-#define CONFIG_SYS_DTT_HYSTERESIS      3
-
 /*-----------------------------------------------------------------------
  * Ethernet
  *----------------------------------------------------------------------*/
 /*
  * Commands additional to the ones defined in amcc-common.h
  */
-#define CONFIG_CMD_DTT
 #define CONFIG_CMD_NAND
 
 /*-----------------------------------------------------------------------
index ea440d6..b495d06 100644 (file)
 #define CONFIG_4xx_CONFIG_I2C_EEPROM_OFFSET    0
 #define CONFIG_4xx_CONFIG_BLOCKSIZE            16
 
-/* I2C SYSMON (LM75, AD7414 is almost compatible)                      */
-#define CONFIG_DTT_LM75                                /* ON Semi's LM75       */
-#define CONFIG_DTT_AD7414                      /* use AD7414           */
-#define CONFIG_DTT_SENSORS     {0}             /* Sensor addresses     */
-#define CONFIG_SYS_DTT_MAX_TEMP        70
-#define CONFIG_SYS_DTT_LOW_TEMP        -30
-#define CONFIG_SYS_DTT_HYSTERESIS      3
-
 #if !defined(CONFIG_ARCHES)
 /* RTC configuration */
 #define CONFIG_RTC_M41T62
  * Commands additional to the ones defined in amcc-common.h
  */
 #if defined(CONFIG_ARCHES)
-#define CONFIG_CMD_DTT
 #define CONFIG_CMD_PCI
 #define CONFIG_CMD_SDRAM
 #elif defined(CONFIG_CANYONLANDS)
-#define CONFIG_CMD_DTT
 #define CONFIG_CMD_NAND
 #define CONFIG_CMD_PCI
 #define CONFIG_CMD_SATA
 #define CONFIG_CMD_SDRAM
 #elif defined(CONFIG_GLACIER)
-#define CONFIG_CMD_DTT
 #define CONFIG_CMD_NAND
 #define CONFIG_CMD_PCI
 #define CONFIG_CMD_SDRAM
index c5e2276..9fb5cde 100644 (file)
@@ -54,7 +54,6 @@
 /*
  * Commands additional to the ones defined in amcc-common.h
  */
-#define CONFIG_CMD_DTT
 #undef CONFIG_CMD_EEPROM
 #undef CONFIG_CMD_IRQ
 
 #define CONFIG_SYS_SPD_BUS_NUM         4
 
 /* Temp sensor/hwmon/dtt */
-#define CONFIG_SYS_DTT_BUS_NUM 4
-#define CONFIG_DTT_LM63                1       /* National LM63        */
-#define CONFIG_DTT_SENSORS     { 0x4c, 0x4e, 0x18 } /* Sensor addresses */
-#define CONFIG_DTT_PWM_LOOKUPTABLE     \
-               { { 46, 10 }, { 48, 14 }, { 50, 19 }, { 52, 23 },\
-                 { 54, 27 }, { 56, 31 }, { 58, 36 }, { 60, 40 } }
-#define CONFIG_DTT_TACH_LIMIT  0xa10
 
 #define CONFIG_SYS_ICS8N3QV01_I2C      {1, 3}
 #define CONFIG_SYS_SIL1178_I2C         {0, 2}
index f8d390b..09d9113 100644 (file)
@@ -52,7 +52,6 @@
 /*
  * Commands additional to the ones defined in amcc-common.h
  */
-#define CONFIG_CMD_DTT
 #undef CONFIG_CMD_EEPROM
 #undef CONFIG_CMD_IRQ
 
index f893b2e..f4a56f2 100644 (file)
@@ -45,8 +45,6 @@
 
 /* Thermal Management Unit */
 #define CONFIG_EXYNOS_TMU
-#define CONFIG_CMD_DTT
-#define CONFIG_TMU_CMD_DTT
 
 /* MMC SPL */
 #define COPY_BL2_FNPTR_ADDR    0x02020030
index f1f8409..036fd20 100644 (file)
 #define CONFIG_4xx_CONFIG_I2C_EEPROM_OFFSET    0
 #define CONFIG_4xx_CONFIG_BLOCKSIZE            16
 
-/* I2C SYSMON */
-#define CONFIG_DTT_LM63         1       /* National LM63        */
-#define CONFIG_DTT_SENSORS      { 0 }   /* Sensor addresses     */
-#define CONFIG_DTT_PWM_LOOKUPTABLE      \
-       { { 40, 10 }, { 50, 20 }, { 60, 40 } }
-#define CONFIG_DTT_TACH_LIMIT   0xa10
-
 /* RTC configuration */
 #define CONFIG_RTC_DS1337      1
 #define CONFIG_SYS_I2C_RTC_ADDR        0x68
 /*
  * Commands additional to the ones defined in amcc-common.h
  */
-#define CONFIG_CMD_DTT
 #define CONFIG_CMD_PCI
 #define CONFIG_CMD_SDRAM
 
index ee2b52a..d4e8d56 100644 (file)
@@ -54,7 +54,6 @@
 /*
  * Commands additional to the ones defined in amcc-common.h
  */
-#define CONFIG_CMD_DTT
 #undef CONFIG_CMD_EEPROM
 #undef CONFIG_CMD_IRQ
 
 #define CONFIG_SYS_I2C_PPC4XX_SPEED_0          100000
 
 /* Temp sensor/hwmon/dtt */
-#define CONFIG_DTT_LM63                1       /* National LM63        */
-#define CONFIG_DTT_SENSORS     { 0 }   /* Sensor addresses     */
-#define CONFIG_DTT_PWM_LOOKUPTABLE     \
-               { { 40, 10 }, { 50, 20 }, { 60, 40 } }
-#define CONFIG_DTT_TACH_LIMIT  0xa10
 
 /*
  * FLASH organization
index 8e754fc..1b58f04 100644 (file)
 #define CONFIG_4xx_CONFIG_I2C_EEPROM_OFFSET    0
 #define CONFIG_4xx_CONFIG_BLOCKSIZE            16
 
-/* Temp sensor/hwmon/dtt */
-#define CONFIG_DTT_LM63                1       /* National LM63 */
-#define CONFIG_DTT_SENSORS     { 0x18, 0x4c, 0x4e }    /* Sensor addresses */
-#define CONFIG_DTT_PWM_LOOKUPTABLE     \
-               { { 40, 10 }, { 43, 13 }, { 46, 16 },  \
-                 { 50, 20 }, { 53, 27 }, { 56, 34 }, { 60, 40 } }
-#define CONFIG_DTT_TACH_LIMIT  0xa10
-
 /*-----------------------------------------------------------------------
  * Ethernet
  *----------------------------------------------------------------------*/
 /*
  * Commands additional to the ones defined in amcc-common.h
  */
-#define CONFIG_CMD_DTT
 
 #define CONFIG_SYS_POST_MEMORY_ON      CONFIG_SYS_POST_MEMORY
 
index 3143b63..c3b9da0 100644 (file)
 #define CONFIG_SYS_I2C_RTC_ADDR        0x68
 #define CONFIG_SYS_M41T11_BASE_YEAR    1900    /* play along with linux        */
 
-/* I2C DTT */
-#define CONFIG_DTT_ADM1021     1       /* ADM1021 temp sensor support  */
-#define CONFIG_SYS_DTT_BUS_NUM         1       /* The I2C bus for DTT          */
-/*
- * standard dtt sensor configuration - bottom bit will determine local or
- * remote sensor of the ADM1021, the rest determines index into
- * CONFIG_SYS_DTT_ADM1021 array below.
- */
-#define CONFIG_DTT_SENSORS     { 0, 1 }
-
-/*
- * ADM1021 temp sensor configuration (see dtt/adm1021.c for details).
- * there will be one entry in this array for each two (dummy) sensors in
- * CONFIG_DTT_SENSORS.
- *
- * For Katmai board:
- * - only one ADM1021
- * - i2c addr 0x18
- * - conversion rate 0x02 = 0.25 conversions/second
- * - ALERT ouput disabled
- * - local temp sensor enabled, min set to 0 deg, max set to 85 deg
- * - remote temp sensor enabled, min set to 0 deg, max set to 85 deg
- */
-#define CONFIG_SYS_DTT_ADM1021         { { 0x18, 0x02, 0, 1, 0, 85, 1, 0, 58} }
-
 /*-----------------------------------------------------------------------
  * Environment
  *----------------------------------------------------------------------*/
index b8c0d0d..a91a6a9 100644 (file)
 #define CONFIG_4xx_CONFIG_I2C_EEPROM_OFFSET    0
 #define CONFIG_4xx_CONFIG_BLOCKSIZE            16
 
-/* Standard DTT sensor configuration */
-#define CONFIG_DTT_DS1775      1
-#define CONFIG_DTT_SENSORS     { 0 }
-
 /* RTC configuration */
 #define CONFIG_RTC_DS1338      1
 #define CONFIG_SYS_I2C_RTC_ADDR        0x68
index 8293607..0d50538 100644 (file)
@@ -14,7 +14,6 @@
 
 #define CONFIG_BOOTCOUNT_LIMIT
 
-#define CONFIG_CMD_DTT
 #define CONFIG_JFFS2_CMDLINE
 
 /* standard km ethernet_present for piggy */
index 35ec097..7d69224 100644 (file)
 
 #define CONFIG_KM_IVM_BUS              2       /* I2C2 (Mux-Port 1)*/
 
-/* I2C SYSMON (LM75, AD7414 is almost compatible) */
-#define CONFIG_DTT_LM75                /* ON Semi's LM75 */
-#define CONFIG_DTT_SENSORS     {0, 1, 2, 3}    /* Sensor addresses */
-#define CONFIG_SYS_DTT_MAX_TEMP        70
-#define CONFIG_SYS_DTT_HYSTERESIS      3
-#define CONFIG_SYS_DTT_BUS_NUM         1
-
 #if defined(CONFIG_CMD_NAND)
 #define CONFIG_NAND_KMETER1
 #define CONFIG_SYS_MAX_NAND_DEVICE     1
index aeece20..09c3aa9 100644 (file)
@@ -268,13 +268,6 @@ int get_sda(void);
 int get_scl(void);
 #endif
 
-/* I2C SYSMON (LM75, AD7414 is almost compatible)                      */
-#define CONFIG_DTT_LM75                        /* ON Semi's LM75               */
-#define CONFIG_DTT_SENSORS     {0}     /* Sensor addresses             */
-#define CONFIG_SYS_DTT_MAX_TEMP        70
-#define CONFIG_SYS_DTT_HYSTERESIS      3
-#define CONFIG_SYS_DTT_BUS_NUM         2
-
 #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1
 
 #define CONFIG_SYS_IMMR                0xF0000000
index cdb02f3..a92bc43 100644 (file)
 #define CONFIG_SYS_I2C_EEPROM_ADDR     0x52    /* I2C boot EEPROM (24C02BN)    */
 #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1       /* Bytes of address             */
 
-/* Standard DTT sensor configuration */
-#define CONFIG_DTT_DS1775      1
-#define CONFIG_DTT_SENSORS     { 0 }
-
 /* RTC configuration */
 #define CONFIG_RTC_X1205       1
 #define CONFIG_SYS_I2C_RTC_ADDR        0x6f
 /*
  * Commands additional to the ones defined in amcc-common.h
  */
-#define CONFIG_CMD_DTT
 #define CONFIG_CMD_PCI
 
 /* POST support */
index cb5c346..aaa8962 100644 (file)
@@ -33,7 +33,6 @@
 /*
  * Command line configuration.
  */
-#define CONFIG_CMD_DTT
 #define CONFIG_CMD_IDE
 #define CONFIG_CMD_IMMAP
 #define CONFIG_CMD_JFFS2
 #define LED_ON                 0x00000010
 
 /*
+<<<<<<< 4ba57299158b7a7020d2bd3b8d8369884696a0ae
+=======
+ * Temperature sensor
+ */
+
+/*
+>>>>>>> Drop digital thermometer and thermostat (DTT) drivers
  * Environment settings
  */
 #define CONFIG_ENV_IS_IN_FLASH 1
index 1d8e13f..40a6718 100644 (file)
@@ -54,7 +54,6 @@
 /*
  * Commands additional to the ones defined in amcc-common.h
  */
-#define CONFIG_CMD_DTT
 #undef CONFIG_CMD_EEPROM
 #undef CONFIG_CMD_IRQ
 
 #define CONFIG_RTC_DS1337
 #define CONFIG_SYS_I2C_RTC_ADDR        0x68
 
-/* Temp sensor/hwmon/dtt */
-#define CONFIG_DTT_LM63                1       /* National LM63        */
-#define CONFIG_DTT_SENSORS     { 0 }   /* Sensor addresses     */
-#define CONFIG_DTT_PWM_LOOKUPTABLE     \
-               { { 40, 10 }, { 50, 20 }, { 60, 40 } }
-#define CONFIG_DTT_TACH_LIMIT  0xa10
-
 /*
  * FLASH organization
  */
index 246fb80..ba29f3e 100644 (file)
@@ -61,7 +61,6 @@
 
 /* FIXME: MUST BE REMOVED AFTER TMU IS TURNED ON */
 #undef CONFIG_EXYNOS_TMU
-#undef CONFIG_TMU_CMD_DTT
 
 #define CONFIG_DFU_ALT_SYSTEM               \
        "uImage fat 0 1;"                   \
index c39bb24..7a120ed 100644 (file)
 #define CONFIG_4xx_CONFIG_I2C_EEPROM_OFFSET    0
 #define CONFIG_4xx_CONFIG_BLOCKSIZE            16
 
-/* I2C SYSMON (LM75, AD7414 is almost compatible)                      */
-#define CONFIG_DTT_LM75                1       /* ON Semi's LM75               */
-#define CONFIG_DTT_AD7414      1       /* use AD7414                   */
-#define CONFIG_DTT_SENSORS     {0}     /* Sensor addresses             */
-#define CONFIG_SYS_DTT_MAX_TEMP        70
-#define CONFIG_SYS_DTT_LOW_TEMP        -30
-#define CONFIG_SYS_DTT_HYSTERESIS      3
-
 /*
  * Default environment variables
  */
 /*
  * Commands additional to the ones defined in amcc-common.h
  */
-#define CONFIG_CMD_DTT
 #define CONFIG_CMD_NAND
 #define CONFIG_CMD_PCI
 #define CONFIG_CMD_SDRAM
index 76b4038..b37e796 100644 (file)
 /* I2C W83782G HW-Monitoring IC */
 #define CONFIG_SYS_I2C_W83782G_ADDR    0x28    /* W83782G address              */
 
-/* I2C temp sensor */
-/* Socrates uses Maxim's       DS75, which is compatible with LM75 */
-#define CONFIG_DTT_LM75                1
-#define CONFIG_DTT_SENSORS     {4}             /* Sensor addresses     */
-#define CONFIG_SYS_DTT_MAX_TEMP        125
-#define CONFIG_SYS_DTT_LOW_TEMP        -55
-#define CONFIG_SYS_DTT_HYSTERESIS      3
 #define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS      4
 
 /*
 /*
  * Command line configuration.
  */
-#define CONFIG_CMD_DTT
 #undef CONFIG_CMD_EEPROM
 #define CONFIG_CMD_SDRAM
 #define CONFIG_CMD_REGINFO
index 738693c..799c45e 100644 (file)
 #define CONFIG_I2C_MULTI_BUS
 #define CONFIG_SYS_I2C_SPEED           100000
 
-/* I2C SYSMON (LM75) */
-#define CONFIG_DTT_LM75
-#define CONFIG_DTT_MAX_TEMP            70
-#define CONFIG_DTT_MIN_TEMP            -30
-#define CONFIG_DTT_HYSTERESIS  3
-#define CONFIG_CMD_DTT
-
 /* I2C EEPROM (M24C64) */
 #define CONFIG_SYS_I2C_EEPROM_ADDR                     0x50
 #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN                 2
 #endif
 
 /* Support at least the sensor on TQMa6 SOM */
-#if !defined(CONFIG_DTT_SENSORS)
-#define CONFIG_DTT_SENSORS             { 0 }
-#endif
 
 #endif /* __CONFIG_H */
index 3d6e438..69e9079 100644 (file)
@@ -10,8 +10,6 @@
 #ifndef __CONFIG_TQMA6_MBA6_H
 #define __CONFIG_TQMA6_MBA6_H
 
-#define CONFIG_DTT_SENSORS             { 0, 1 }
-
 #define CONFIG_FEC_XCV_TYPE            RGMII
 #define CONFIG_ETHPRIME                        "FEC"
 
index b9cc5d6..4ab4c65 100644 (file)
@@ -7,10 +7,6 @@
 #ifndef __CONFIG_TQMA6_WRU4_H
 #define __CONFIG_TQMA6_WRU4_H
 
-/* DTT sensors */
-#define CONFIG_DTT_SENSORS             { 0, 1 }
-#define CONFIG_SYS_DTT_BUS_NUM         2
-
 /* Ethernet */
 #define CONFIG_FEC_XCV_TYPE            RMII
 #define CONFIG_ETHPRIME                        "FEC"
index 81d1fd9..c308f2c 100644 (file)
 #define CONFIG_RTC_DS1374
 
 /*
- * I2C Temperature Sensor (DTT)
- */
-
-#define CONFIG_CMD_DTT
-#define CONFIG_DTT_SENSORS { 0, 1 }
-#define CONFIG_DTT_DS620
-
-/*
  * U-Boot General Configurations
  */
 #define CONFIG_SYS_LONGHELP
index ea4b739..c4efae6 100644 (file)
@@ -28,7 +28,6 @@
 #define CONFIG_CMD_REGINFO
 #undef CONFIG_CMD_JFFS2
 #undef CONFIG_CMD_MTDPARTS
-#undef CONFIG_CMD_DTT
 #undef CONFIG_CMD_EEPROM
 
 /*Misc*/
index bd1d0c7..97a9d71 100644 (file)
@@ -233,8 +233,6 @@ extern unsigned long get_board_sys_clk(unsigned long dummy);
 
 /* I2C DS1631 temperature sensor */
 #define CONFIG_SYS_I2C_DS1621_ADDR     0x48
-#define CONFIG_DTT_DS1621
-#define CONFIG_DTT_SENSORS             { 0 }
 #define CONFIG_SYS_I2C_LM90_ADDR       0x4c
 
 /* I2C EEPROM - AT24C128B */
@@ -501,7 +499,6 @@ extern unsigned long get_board_sys_clk(unsigned long dummy);
 /*
  * Command configuration.
  */
-#define CONFIG_CMD_DTT
 #define CONFIG_CMD_EEPROM
 #define CONFIG_CMD_IRQ
 #define CONFIG_CMD_JFFS2
index a290cf3..fa1971d 100644 (file)
@@ -230,8 +230,6 @@ extern unsigned long get_board_ddr_clk(unsigned long dummy);
 
 /* I2C DS1631 temperature sensor */
 #define CONFIG_SYS_I2C_DS1621_ADDR     0x48
-#define CONFIG_DTT_DS1621
-#define CONFIG_DTT_SENSORS             { 0 }
 #define CONFIG_SYS_I2C_LM90_ADDR       0x4c
 
 /* I2C EEPROM - AT24C128B */
@@ -353,7 +351,6 @@ extern unsigned long get_board_ddr_clk(unsigned long dummy);
 /*
  * Command configuration.
  */
-#define CONFIG_CMD_DTT
 #define CONFIG_CMD_EEPROM
 #define CONFIG_CMD_JFFS2
 #define CONFIG_CMD_NAND
index ad4247a..e3f0b93 100644 (file)
@@ -219,8 +219,6 @@ extern unsigned long get_board_ddr_clk(unsigned long dummy);
 #define CONFIG_SYS_FSL_I2C2_OFFSET     0x3100
 
 /* I2C DS7505 temperature sensor */
-#define CONFIG_DTT_LM75
-#define CONFIG_DTT_SENSORS             { 0 }
 #define CONFIG_SYS_I2C_LM75_ADDR       0x48
 
 /* I2C ADT7461 temperature sensor */
@@ -338,7 +336,6 @@ extern unsigned long get_board_ddr_clk(unsigned long dummy);
 /*
  * Command configuration.
  */
-#define CONFIG_CMD_DTT
 #define CONFIG_CMD_EEPROM
 #define CONFIG_CMD_JFFS2
 #define CONFIG_CMD_NAND
index 77648d7..d9c09b8 100644 (file)
 #define CONFIG_ENV_OFFSET              0x0
 #endif /* CONFIG_ENV_IS_IN_EEPROM */
 
-/* I2C SYSMON (LM75, AD7414 is almost compatible)                      */
-#define CONFIG_DTT_LM75                1               /* ON Semi's LM75       */
-#define CONFIG_DTT_AD7414      1               /* use AD7414           */
-#define CONFIG_DTT_SENSORS     {0}             /* Sensor addresses     */
-#define CONFIG_SYS_DTT_MAX_TEMP        70
-#define CONFIG_SYS_DTT_LOW_TEMP        -30
-#define CONFIG_SYS_DTT_HYSTERESIS      3
-
 /*
  * Default environment variables
  */
 /*
  * Commands additional to the ones defined in amcc-common.h
  */
-#define CONFIG_CMD_DTT
 #define CONFIG_CMD_PCI
 
 #ifdef CONFIG_440EP
diff --git a/include/dtt.h b/include/dtt.h
deleted file mode 100644 (file)
index 173159d..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * (C) Copyright 2001
- * Erik Theisen,  Wave 7 Optics, etheisen@mindspring.com.
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-/*
- * Digital Thermometers and Thermostats.
- */
-#ifndef _DTT_H_
-#define _DTT_H_
-
-#if defined(CONFIG_DTT_ADM1021)        || \
-       defined(CONFIG_DTT_ADT7460)     || \
-       defined(CONFIG_DTT_DS1621)      || \
-       defined(CONFIG_DTT_DS1775)      || \
-       defined(CONFIG_DTT_DS620)       || \
-       defined(CONFIG_DTT_LM63)        || \
-       defined(CONFIG_DTT_LM73)        || \
-       defined(CONFIG_DTT_LM75)        || \
-       defined(CONFIG_DTT_LM81)
-
-#define CONFIG_DTT                             /* We have a DTT */
-
-#ifndef CONFIG_DTT_ADM1021
-#define DTT_COMMERCIAL_MAX_TEMP        70              /* 0 - +70 C */
-#define DTT_INDUSTRIAL_MAX_TEMP        85              /* -40 - +85 C */
-#define DTT_AUTOMOTIVE_MAX_TEMP        105             /* -40 - +105 C */
-
-#ifndef CONFIG_SYS_DTT_MAX_TEMP
-#define CONFIG_SYS_DTT_MAX_TEMP DTT_COMMERCIAL_MAX_TEMP
-#endif
-
-#ifndef CONFIG_SYS_DTT_HYSTERESIS
-#define CONFIG_SYS_DTT_HYSTERESIS      5               /* 5 C */
-#endif
-#endif /* CONFIG_DTT_ADM1021 */
-
-extern void dtt_init(void);
-extern int dtt_init_one(int);
-extern int dtt_read(int sensor, int reg);
-extern int dtt_write(int sensor, int reg, int val);
-extern int dtt_get_temp(int sensor);
-#endif
-
-#endif /* _DTT_H_ */
index a88cc7c..2c1643d 100644 (file)
@@ -571,9 +571,6 @@ void i2c_dump_msgs(struct i2c_msg *msg, int nmsgs);
 #if !defined(CONFIG_SYS_RTC_BUS_NUM)
 #define CONFIG_SYS_RTC_BUS_NUM         0
 #endif
-#if !defined(CONFIG_SYS_DTT_BUS_NUM)
-#define CONFIG_SYS_DTT_BUS_NUM         0
-#endif
 #if !defined(CONFIG_SYS_SPD_BUS_NUM)
 #define CONFIG_SYS_SPD_BUS_NUM         0
 #endif
index 93a4753..1eef683 100644 (file)
@@ -383,7 +383,6 @@ CONFIG_CM922T_XA10
 CONFIG_CMDLINE_EDITING
 CONFIG_CMDLINE_PS_SUPPORT
 CONFIG_CMDLINE_TAG
-CONFIG_CMD_DTT
 CONFIG_CMD_ECCTEST
 CONFIG_CMD_EECONFIG
 CONFIG_CMD_EEPROM
@@ -682,20 +681,6 @@ CONFIG_DRIVE_SATA
 CONFIG_DRIVE_TYPES
 CONFIG_DRIVE_USB
 CONFIG_DSP_CLUSTER_START
-CONFIG_DTT
-CONFIG_DTT_AD7414
-CONFIG_DTT_ADM1021
-CONFIG_DTT_DS1621
-CONFIG_DTT_DS1775
-CONFIG_DTT_DS620
-CONFIG_DTT_HYSTERESIS
-CONFIG_DTT_LM63
-CONFIG_DTT_LM75
-CONFIG_DTT_MAX_TEMP
-CONFIG_DTT_MIN_TEMP
-CONFIG_DTT_PWM_LOOKUPTABLE
-CONFIG_DTT_SENSORS
-CONFIG_DTT_TACH_LIMIT
 CONFIG_DUOVERO
 CONFIG_DV_USBPHY_CTL
 CONFIG_DWC2_DFLT_SPEED_FULL
@@ -3450,12 +3435,6 @@ CONFIG_SYS_DSPI_CTAR4
 CONFIG_SYS_DSPI_CTAR5
 CONFIG_SYS_DSPI_CTAR6
 CONFIG_SYS_DSPI_CTAR7
-CONFIG_SYS_DTT_ADM1021
-CONFIG_SYS_DTT_BUS_NUM
-CONFIG_SYS_DTT_HYSTERESIS
-CONFIG_SYS_DTT_LOW_TEMP
-CONFIG_SYS_DTT_MAX_TEMP
-CONFIG_SYS_DTT_MIN_TEMP
 CONFIG_SYS_DUART_RST
 CONFIG_SYS_DV_CLKMODE
 CONFIG_SYS_DV_NOR_BOOT_CFG
@@ -6115,7 +6094,6 @@ CONFIG_TIZEN
 CONFIG_TI_KEYSTONE_SERDES
 CONFIG_TI_KSNAV
 CONFIG_TI_SPI_MMAP
-CONFIG_TMU_CMD_DTT
 CONFIG_TMU_TIMER
 CONFIG_TOTAL5200
 CONFIG_TPL_DRIVERS_MISC_SUPPORT