History log of /src/sys/arch/arm/nvidia/tegra_i2c.c |
Revision | | Date | Author | Comments |
1.28 |
| 16-Sep-2025 |
thorpej | As with ACPI, perform the fdtbus_register_i2c_controller() in a centralized location.
|
1.27 |
| 16-Sep-2025 |
thorpej | Garbage-collect fdtbus_attach_i2cbus(); the regular iicbus_attach() is sufficient now.
|
1.26 |
| 27-Jan-2021 |
thorpej | branches: 1.26.4; 1.26.14; Rename of_match_compat_data() to of_compatible_match(). Similarly, rename of_search_compatible() to of_compatible_lookup().
Standardize on of_compatible_match() for driver matching, and adapt all call sites.
|
1.25 |
| 15-Jan-2021 |
jmcneill | use fdtbus_intr_establish_xname
|
1.24 |
| 23-Dec-2020 |
thorpej | Change fdtbus_register_i2c_controller() to directly register the i2c_tag_t, rather than the device and a set of functions (the only of which was to return the i2c_tag_t anyway). Previously, this assumed only a single i2c controller node per device_t, which is not true with an i2c mux.
|
1.23 |
| 22-Dec-2019 |
thorpej | branches: 1.23.8; Use a separate lock (not the i2c bus lock) to synchronize with the interrupt handler. This in all liklihood fixes a deadlock bug that necessitated forcing I2C_F_POLL in tegra_i2c_exec() (someone who has the hardware should test removing that line).
Also includes the changes for:
Cleanup i2c bus acquire / release, centralizing all of the logic into iic_acquire_bus() / iic_release_bus(). "acquire" and "release" hooks no longer need to be provided by back-end controller drivers (only if they need special handling, e.g. powering on the i2c controller). This results in the removal of a bunch of rendundant code from each back-end controller driver.
Assert that we are not in hard interrupt context in iic_acquire_bus(), iic_exec(), and iic_release_bus().
|
1.22 |
| 25-Sep-2018 |
jmcneill | Disallow 0-byte transfers and suppress timeout messages
|
1.21 |
| 03-Sep-2018 |
riastradh | Rename min/max -> uimin/uimax for better honesty.
These functions are defined on unsigned int. The generic name min/max should not silently truncate to 32 bits on 64-bit systems. This is purely a name change -- no functional change intended.
HOWEVER! Some subsystems have
#define min(a, b) ((a) < (b) ? (a) : (b)) #define max(a, b) ((a) > (b) ? (a) : (b))
even though our standard name for that is MIN/MAX. Although these may invite multiple evaluation bugs, these do _not_ cause integer truncation.
To avoid `fixing' these cases, I first changed the name in libkern, and then compile-tested every file where min/max occurred in order to confirm that it failed -- and thus confirm that nothing shadowed min/max -- before changing it.
I have left a handful of bootloaders that are too annoying to compile-test, and some dead code:
cobalt ews4800mips hp300 hppa ia64 luna68k vax acorn32/if_ie.c (not included in any kernels) macppc/if_gm.c (superseded by gem(4))
It should be easy to fix the fallout once identified -- this way of doing things fails safe, and the goal here, after all, is to _avoid_ silent integer truncations, not introduce them.
Maybe one day we can reintroduce min/max as type-generic things that never silently truncate. But we should avoid doing that for a while, so that existing code has a chance to be detected by the compiler for conversion to uimin/uimax without changing the semantics until we can properly audit it all. (Who knows, maybe in some cases integer truncation is actually intended!)
|
1.20 |
| 05-Aug-2018 |
skrll | Use PRIxBUSADDR and remove unnecessary cast
|
1.19 |
| 16-Jul-2018 |
christos | Add missing pointer <-> integer casts Use PRI?64 to print uint64_t instead 'll?'
|
1.18 |
| 01-Jul-2018 |
jmcneill | Use fdtbus_attach_i2cbus
|
1.17 |
| 09-May-2018 |
thorpej | branches: 1.17.2; If we don't get informed (via device properties) of child I2C devices, don't assign an empty array to iba.iba_child_devices, as it will prevent indirect configuration of the I2C bus from occurring.
Tested on Raspberry Pi (bcm2835), identical logical fix replicated (and compile-tested) elsewhere.
PR port-arm/53171
|
1.16 |
| 25-May-2017 |
jmcneill | branches: 1.16.8; 1.16.10; Match nvidia,tegra210-i2c and nvidia,tegra114-i2c compat strings.
|
1.15 |
| 08-Aug-2016 |
jakllsch | Send repeated start after command phase if there is any data phase transfer, not just if the data phase a read operation.
|
1.14 |
| 08-Aug-2016 |
jakllsch | Adjust data pointer using current, rather than upcoming, transfer length.
|
1.13 |
| 14-Feb-2016 |
chs | zero the i2c_attach_args structure before filling it in. fixes occasional crashes in iic_attach().
|
1.12 |
| 22-Dec-2015 |
jmcneill | tegra_car_* and tegra_i2c_dvc_write are no more
|
1.11 |
| 22-Dec-2015 |
jmcneill | Switch Tegra over to fdt based clocks and reset controls.
|
1.10 |
| 16-Dec-2015 |
jmcneill | use of_getprop_uint32
|
1.9 |
| 13-Dec-2015 |
jmcneill | Use fdt for device enumeration.
|
1.8 |
| 12-Nov-2015 |
jmcneill | Standard mode for I2C needs a source divider of 20, not 2.
|
1.7 |
| 11-Nov-2015 |
jmcneill | only send repeat start if we are doing write-then-read
|
1.6 |
| 11-Nov-2015 |
jmcneill | fix i2c periph clock, send repeat start for write-then-read xfers
|
1.5 |
| 31-May-2015 |
jmcneill | branches: 1.5.2; add external function for writing to dvc (I2C5) devices
|
1.4 |
| 17-May-2015 |
jmcneill | initialize FIFO TX/RX trigger levels, wait for MSTR_CONFIG_LOAD to clear after setting it
|
1.3 |
| 16-May-2015 |
jmcneill | fix source clock divisor, set MSTR_CONFIG_LOAD after updating config, reset controller on errors, read from rx fifo before waiting for xfer to complete
|
1.2 |
| 16-May-2015 |
jmcneill | Support transfers > 4-bytes long by reading and writing using the controller's packet-based interface instead of non-packet ("normal") mode.
|
1.1 |
| 10-May-2015 |
jmcneill | Tegra I2C driver
|
1.5.2.6 |
| 28-Aug-2017 |
skrll | Sync with HEAD
|
1.5.2.5 |
| 05-Oct-2016 |
skrll | Sync with HEAD
|
1.5.2.4 |
| 19-Mar-2016 |
skrll | Sync with HEAD
|
1.5.2.3 |
| 27-Dec-2015 |
skrll | Sync with HEAD (as of 26th Dec)
|
1.5.2.2 |
| 06-Jun-2015 |
skrll | Sync with HEAD
|
1.5.2.1 |
| 31-May-2015 |
skrll | file tegra_i2c.c was added on branch nick-nhusb on 2015-06-06 14:39:56 +0000
|
1.16.10.4 |
| 30-Sep-2018 |
pgoyette | Ssync with HEAD
|
1.16.10.3 |
| 06-Sep-2018 |
pgoyette | Sync with HEAD
Resolve a couple of conflicts (result of the uimin/uimax changes)
|
1.16.10.2 |
| 28-Jul-2018 |
pgoyette | Sync with HEAD
|
1.16.10.1 |
| 21-May-2018 |
pgoyette | Sync with HEAD
|
1.16.8.2 |
| 03-Dec-2017 |
jdolecek | update from HEAD
|
1.16.8.1 |
| 25-May-2017 |
jdolecek | file tegra_i2c.c was added on branch tls-maxphys on 2017-12-03 11:35:54 +0000
|
1.17.2.2 |
| 08-Apr-2020 |
martin | Merge changes from current as of 20200406
|
1.17.2.1 |
| 10-Jun-2019 |
christos | Sync with HEAD
|
1.23.8.2 |
| 03-Apr-2021 |
thorpej | Sync with HEAD.
|
1.23.8.1 |
| 03-Jan-2021 |
thorpej | Sync w/ HEAD.
|
1.26.14.1 |
| 09-Aug-2021 |
thorpej | Port over the changes from thorpej-i2c-spi-conf to thorpej-i2c-spi-conf2, which is based on a newer HEAD revision.
|
1.26.4.1 |
| 19-May-2021 |
thorpej | fdtbus_attach_i2cbus() is no longer anything other than a wrapper around config_found(); just get rid of it and make its callers look like all of the other I2C controller drivers.
|