OSDN Git Service

Merge tag 'omap-for-v4.9/fixes-for-rc-cycle' of git://git.kernel.org/pub/scm/linux...
authorOlof Johansson <olof@lixom.net>
Fri, 18 Nov 2016 00:37:04 +0000 (16:37 -0800)
committerOlof Johansson <olof@lixom.net>
Fri, 18 Nov 2016 00:37:04 +0000 (16:37 -0800)
Fixes for omaps for v4.9-rc cycle. Except for the omap3 fix for the SoC
features printed, all these are quite trivial and tiny. The omap5 jack
detection and gpadc patches are not strictly fixes, but I wanted to get
binding document typo fixed before it pops up on other boards. The
gpadc one liner was in the same series and I applied and pushed it out
already before noticing it could have waited. The list of changes is:

- Fix omap3 SoC features printed
- Make sure OMAP_INTERCONNECT is selected for am43xx only configurations
- Add missing memory node for torpedo
- Initialize uart4_mask properly to avoid writing garbage to PRM registers
- Fix NULL pointer dereference for omap4 volt_data
- Add alias for omap5 gpadc needed by iio drivers
- Enable omap5 jack headset jack detection and fix it's binding typo
- Add missing memory node for logicpd-som-lv
- Fix wrong SMPS6 voltage for VDD-DDR3 for omap5

* tag 'omap-for-v4.9/fixes-for-rc-cycle' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: dts: omap5: board-common: fix wrong SMPS6 (VDD-DDR3) voltage
  ARM: omap3: Add missing memory node in SOM-LV
  ASoC: omap-abe-twl6040: fix typo in bindings documentation
  dts: omap5: board-common: enable twl6040 headset jack detection
  dts: omap5: board-common: add phandle to reference Palmas gpadc
  ARM: OMAP2+: avoid NULL pointer dereference
  ARM: OMAP2+: PRM: initialize en_uart4_mask and grpsel_uart4_mask
  ARM: dts: omap3: Fix memory node in Torpedo board
  ARM: AM43XX: Select OMAP_INTERCONNECT in Kconfig
  ARM: OMAP3: Fix formatting of features printed

Signed-off-by: Olof Johansson <olof@lixom.net>
Documentation/devicetree/bindings/sound/omap-abe-twl6040.txt
arch/arm/boot/dts/logicpd-som-lv.dtsi
arch/arm/boot/dts/logicpd-torpedo-som.dtsi
arch/arm/boot/dts/omap5-board-common.dtsi
arch/arm/mach-omap2/Kconfig
arch/arm/mach-omap2/id.c
arch/arm/mach-omap2/prm3xxx.c
arch/arm/mach-omap2/voltage.c

index fd40c85..462b04e 100644 (file)
@@ -12,7 +12,7 @@ Required properties:
 
 Optional properties:
 - ti,dmic: phandle for the OMAP dmic node if the machine have it connected
-- ti,jack_detection: Need to be present if the board capable to detect jack
+- ti,jack-detection: Need to be present if the board capable to detect jack
   insertion, removal.
 
 Available audio endpoints for the audio-routing table:
index 0ff1c2d..26cce4d 100644 (file)
                };
        };
 
+       memory@80000000 {
+               device_type = "memory";
+               reg = <0x80000000 0>;
+       };
+
        wl12xx_vmmc: wl12xx_vmmc {
                compatible = "regulator-fixed";
                regulator-name = "vwl1271";
index 731ec37..8f9a69c 100644 (file)
@@ -13,9 +13,9 @@
                };
        };
 
-       memory@0 {
+       memory@80000000 {
                device_type = "memory";
-               reg = <0 0>;
+               reg = <0x80000000 0>;
        };
 
        leds {
index 6365635..4caadb2 100644 (file)
                compatible = "ti,abe-twl6040";
                ti,model = "omap5-uevm";
 
+               ti,jack-detection;
                ti,mclk-freq = <19200000>;
 
                ti,mcpdm = <&mcpdm>;
                        ti,backup-battery-charge-high-current;
                };
 
-               gpadc {
+               gpadc: gpadc {
                        compatible = "ti,palmas-gpadc";
                        interrupts = <18 0
                                      16 0
                                smps6_reg: smps6 {
                                        /* VDD_DDR3 - over VDD_SMPS6 */
                                        regulator-name = "smps6";
-                                       regulator-min-microvolt = <1200000>;
-                                       regulator-max-microvolt = <1200000>;
+                                       regulator-min-microvolt = <1350000>;
+                                       regulator-max-microvolt = <1350000>;
                                        regulator-always-on;
                                        regulator-boot-on;
                                };
index a9afeeb..0465338 100644 (file)
@@ -71,6 +71,7 @@ config SOC_AM43XX
        select HAVE_ARM_TWD
        select ARM_ERRATA_754322
        select ARM_ERRATA_775420
+       select OMAP_INTERCONNECT
 
 config SOC_DRA7XX
        bool "TI DRA7XX"
index 2abd53a..cc6d9fa 100644 (file)
@@ -205,11 +205,15 @@ void __init omap2xxx_check_revision(void)
 
 #define OMAP3_SHOW_FEATURE(feat)               \
        if (omap3_has_ ##feat())                \
-               printk(#feat" ");
+               n += scnprintf(buf + n, sizeof(buf) - n, #feat " ");
 
 static void __init omap3_cpuinfo(void)
 {
        const char *cpu_name;
+       char buf[64];
+       int n = 0;
+
+       memset(buf, 0, sizeof(buf));
 
        /*
         * OMAP3430 and OMAP3530 are assumed to be same.
@@ -241,10 +245,10 @@ static void __init omap3_cpuinfo(void)
                cpu_name = "OMAP3503";
        }
 
-       sprintf(soc_name, "%s", cpu_name);
+       scnprintf(soc_name, sizeof(soc_name), "%s", cpu_name);
 
        /* Print verbose information */
-       pr_info("%s %s (", soc_name, soc_rev);
+       n += scnprintf(buf, sizeof(buf) - n, "%s %s (", soc_name, soc_rev);
 
        OMAP3_SHOW_FEATURE(l2cache);
        OMAP3_SHOW_FEATURE(iva);
@@ -252,8 +256,10 @@ static void __init omap3_cpuinfo(void)
        OMAP3_SHOW_FEATURE(neon);
        OMAP3_SHOW_FEATURE(isp);
        OMAP3_SHOW_FEATURE(192mhz_clk);
-
-       printk(")\n");
+       if (*(buf + n - 1) == ' ')
+               n--;
+       n += scnprintf(buf + n, sizeof(buf) - n, ")\n");
+       pr_info("%s", buf);
 }
 
 #define OMAP3_CHECK_FEATURE(status,feat)                               \
index 62680aa..718981b 100644 (file)
@@ -319,6 +319,9 @@ void __init omap3_prm_init_pm(bool has_uart4, bool has_iva)
        if (has_uart4) {
                en_uart4_mask = OMAP3630_EN_UART4_MASK;
                grpsel_uart4_mask = OMAP3630_GRPSEL_UART4_MASK;
+       } else {
+               en_uart4_mask = 0;
+               grpsel_uart4_mask = 0;
        }
 
        /* Enable wakeups in PER */
index cba8cad..cd15dbd 100644 (file)
@@ -87,6 +87,12 @@ int voltdm_scale(struct voltagedomain *voltdm,
                return -ENODATA;
        }
 
+       if (!voltdm->volt_data) {
+               pr_err("%s: No voltage data defined for vdd_%s\n",
+                       __func__, voltdm->name);
+               return -ENODATA;
+       }
+
        /* Adjust voltage to the exact voltage from the OPP table */
        for (i = 0; voltdm->volt_data[i].volt_nominal != 0; i++) {
                if (voltdm->volt_data[i].volt_nominal >= target_volt) {