sd: add sduart not supported flag [1/1]
authorNan Li <nan.li@amlogic.com>
Thu, 14 Feb 2019 02:43:31 +0000 (10:43 +0800)
committerJianxin Pan <jianxin.pan@amlogic.com>
Wed, 20 Feb 2019 06:51:42 +0000 (22:51 -0800)
PD#SWPL-4858

Problem:
tl1 not support sduart

Solution:
add not supported flag in match_data

Verify:
verify by tl1 skt

Change-Id: I651765433bb62892fad770c85a5eccd4805e7c79
Signed-off-by: Nan Li <nan.li@amlogic.com>
arch/arm/boot/dts/amlogic/tl1_pxp.dts
arch/arm/boot/dts/amlogic/tl1_t962x2_skt.dts
drivers/amlogic/mmc/amlsd.c
drivers/amlogic/mmc/amlsd_of.c
include/linux/amlogic/sd.h

index c2adf2acc6eecb78931eec0951e28f8bbcf09dfe..35e106a7725b160e27992d767d71722613b58274 100644 (file)
                        f_min = <400000>;
                        f_max = <200000000>;
                        max_req_size = <0x20000>; /**128KB*/
+                       no_sduart = <1>;
                        gpio_dat3 = <&gpio GPIOC_3 GPIO_ACTIVE_HIGH>;
                        jtag_pin = <&gpio GPIOC_0 GPIO_ACTIVE_HIGH>;
                        gpio_cd = <&gpio GPIOC_10 GPIO_ACTIVE_HIGH>;
index 1e7be0e66ea850a9157a9e00ee5c93a3c6c1678d..cb4e7ef1fa519cdd20ff3bfd5533f122d4cb04f6 100644 (file)
                        f_min = <400000>;
                        f_max = <200000000>;
                        max_req_size = <0x20000>; /**128KB*/
+                       no_sduart = <1>;
                        gpio_dat3 = <&gpio GPIOC_3 GPIO_ACTIVE_HIGH>;
                        jtag_pin = <&gpio GPIOC_0 GPIO_ACTIVE_HIGH>;
                        gpio_cd = <&gpio GPIOC_10 GPIO_ACTIVE_HIGH>;
index 854c9ca77b2520525ff3de948b150c0c1b8e1d8d..f5976de4f8b0a55ac4b6859526fabc2767c9a08f 100644 (file)
@@ -850,7 +850,7 @@ int aml_sd_uart_detect(struct amlsd_platform *pdata)
                        return 1;
                pdata->is_in = true;
                pdata->gpio_cd_sta = true;
-               if ((host->data->chip_type < MMC_CHIP_TL1)
+               if ((!pdata->no_sduart)
                                && aml_is_sduart(pdata)) {
                        aml_uart_switch(pdata, 1);
                        pr_info("Uart in\n");
@@ -891,7 +891,7 @@ int aml_sd_uart_detect(struct amlsd_platform *pdata)
                        host->is_sduart = 0;
                if (mmc && mmc->card)
                        mmc_card_set_removed(mmc->card);
-               if (host->data->chip_type < MMC_CHIP_TL1) {
+               if (!pdata->no_sduart) {
                        aml_uart_switch(pdata, 0);
                        aml_jtag_switch_ao(pdata);
                }
index fc093edddbb52d5180bda91e594c0f7f72ff4aab..a117ef59ee0f93d0de7296ae520193770d212f28 100644 (file)
@@ -187,6 +187,8 @@ int amlsd_get_platform_data(struct platform_device *pdev,
                                str, pdata->gpio_power);
                SD_PARSE_U32_PROP_DEC(child, "calc_f",
                                prop, pdata->calc_f);
+               SD_PARSE_U32_PROP_DEC(child, "no_sduart",
+                               prop, pdata->no_sduart);
 
                SD_PARSE_U32_PROP_DEC(child, "gpio_cd_level",
                                prop, pdata->gpio_cd_level);
index ac78c368fa3d10014c8c9f321367825208c5baba..cae0a23516ad86c4a4e28f3122ce416be0d8c9c5 100644 (file)
@@ -297,6 +297,7 @@ struct amlsd_platform {
        unsigned int gpio_power;
        unsigned int power_level;
        unsigned int calc_f;
+       unsigned int no_sduart;
 
        unsigned int auto_clk_close;
        unsigned int vol_switch;