HSI changes for the v4.15 series

* add HSI OMAP4 bindings
 * misc. small fixes
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEE72YNB0Y/i3JqeVQT2O7X88g7+poFAloMMHEACgkQ2O7X88g7
 +pq9HQ//eCu6gyBTaeHSLlD8BsMeDSI5P5sO8RM70oPG8bavH3mki700bv9nvcRg
 h7E0XglkS5a9qHhhrjlYIoToWWXV7d48nhoBTuqCdaoXDKXM0UJIHvpiZIqj6ZgP
 EAlVo9pJC5k3Fp21C6aD3gf+u+UnkeVDlWTCxEbO2lasfCYbalWGMwAkd3drRTJg
 aYCON7SpUsmp8zbu2Lmejh4JpTNuoiAFdWxIn/LmqSpznsFx/SiZKg5IvBIGPw0F
 lam4aLM2J1X5px8Zv1eSxSauu1iri39qBMABr5Ig7YXu77AjdHYSf8LTWbLJx3jx
 fuGtiMsIjEVy48GRl7FKNh50tTdh7ShmLhWpnHIw/wGZ/1NKLZ1w/VEJE/WL0/qY
 5PAXzRYMF9ULoKNFsNFoAWumzlPy1xS88kdOeTvU8IWdEsrTwUeHI9bqdG+aAI9y
 m1pNq868mRLwF56rT4QzGhr6Wg4ncV7Sxdi7cmAz0z4VEBptxZyOykdqT4wtf5G5
 k2C+YP5KBpANbg04+eyMwhUBFqXPoDrdiN2ZUC+EQC52qW88Cpwuxe0cectPX/AH
 yhXgdsTN3Jrv6qTGNg/io0f8Of54WdEWLPBSF3td7W1S3FSF5quDpAR1Ene5M772
 jOhJOBPbORkUeoqkrRFluzFYZ+PgwCm2cxdym5XfFN7EfrUAaQU=
 =btm9
 -----END PGP SIGNATURE-----

Merge tag 'hsi-for-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-hsi

Pull HSI updates from Sebastian Reichel:

 - add HSI OMAP4 bindings

 - misc small fixes

* tag 'hsi-for-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-hsi:
  dt-bindings: hsi: add omap4 hsi controller bindings
  HSI: hsi_char: pr_err() strings should end with newlines
  HSI: omap_ssi_core: fix kilo to be "k" not "K"
This commit is contained in:
Linus Torvalds 2017-11-15 13:35:43 -08:00
commit 6c4ba00c40
3 changed files with 15 additions and 8 deletions

View File

@ -1,10 +1,12 @@
OMAP SSI controller bindings
OMAP Synchronous Serial Interface (SSI) controller implements a legacy
variant of MIPI's High Speed Synchronous Serial Interface (HSI).
OMAP3's Synchronous Serial Interface (SSI) controller implements a
legacy variant of MIPI's High Speed Synchronous Serial Interface (HSI),
while the controller found inside OMAP4 is supposed to be fully compliant
with the HSI standard.
Required properties:
- compatible: Should include "ti,omap3-ssi".
- compatible: Should include "ti,omap3-ssi" or "ti,omap4-hsi"
- reg-names: Contains the values "sys" and "gdd" (in this order).
- reg: Contains a matching register specifier for each entry
in reg-names.
@ -27,6 +29,7 @@ Each port is represented as a sub-node of the ti,omap3-ssi device.
Required Port sub-node properties:
- compatible: Should be set to the following value
ti,omap3-ssi-port (applicable to OMAP34xx devices)
ti,omap4-hsi-port (applicable to OMAP44xx devices)
- reg-names: Contains the values "tx" and "rx" (in this order).
- reg: Contains a matching register specifier for each entry
in reg-names.
@ -38,6 +41,10 @@ Required Port sub-node properties:
property. If it's missing the port will not be
enabled.
Optional properties:
- ti,hwmods: Shall contain TI interconnect module name if needed
by the SoC
Example for Nokia N900:
ssi-controller@48058000 {

View File

@ -773,13 +773,13 @@ static int __init hsc_init(void)
if ((max_data_size < 4) || (max_data_size > 0x10000) ||
(max_data_size & (max_data_size - 1))) {
pr_err("Invalid max read/write data size");
pr_err("Invalid max read/write data size\n");
return -EINVAL;
}
ret = hsi_register_client_driver(&hsc_driver);
if (ret) {
pr_err("Error while registering HSI/SSI driver %d", ret);
pr_err("Error while registering HSI/SSI driver %d\n", ret);
return ret;
}

View File

@ -334,7 +334,7 @@ static int ssi_clk_event(struct notifier_block *nb, unsigned long event,
case POST_RATE_CHANGE:
dev_dbg(&ssi->device, "post rate change (%lu -> %lu)\n",
clk_data->old_rate, clk_data->new_rate);
omap_ssi->fck_rate = DIV_ROUND_CLOSEST(clk_data->new_rate, 1000); /* KHz */
omap_ssi->fck_rate = DIV_ROUND_CLOSEST(clk_data->new_rate, 1000); /* kHz */
for (i = 0; i < ssi->num_ports; i++) {
omap_port = omap_ssi->port[i];
@ -467,9 +467,9 @@ static int ssi_hw_init(struct hsi_controller *ssi)
}
/* Resetting GDD */
writel_relaxed(SSI_SWRESET, omap_ssi->gdd + SSI_GDD_GRST_REG);
/* Get FCK rate in KHz */
/* Get FCK rate in kHz */
omap_ssi->fck_rate = DIV_ROUND_CLOSEST(ssi_get_clk_rate(ssi), 1000);
dev_dbg(&ssi->device, "SSI fck rate %lu KHz\n", omap_ssi->fck_rate);
dev_dbg(&ssi->device, "SSI fck rate %lu kHz\n", omap_ssi->fck_rate);
writel_relaxed(SSI_CLK_AUTOGATING_ON, omap_ssi->sys + SSI_GDD_GCR_REG);
omap_ssi->gdd_gcr = SSI_CLK_AUTOGATING_ON;