Hello.

On 09-10-2010 5:12, [email protected] wrote:

From: Victor Rodriguez<[email protected]>

This patch adds MMC/SD support for the Hawkboard-L138 system
It is under the machine name "omapl138_hawkboard".
This system is based on the da850 davinci CPU architecture.

Signed-off-by: Victor Rodriguez<[email protected]>

[...]

diff --git a/arch/arm/mach-davinci/board-omapl138-hawk.c 
b/arch/arm/mach-davinci/board-omapl138-hawk.c
index ba3718a..ae7f75c 100644
--- a/arch/arm/mach-davinci/board-omapl138-hawk.c
+++ b/arch/arm/mach-davinci/board-omapl138-hawk.c
[...]
@@ -180,6 +201,28 @@ static __init void omapl138_hawk_init(void)
                        "mcasp mux setup failed: %d\n", ret);
        da8xx_register_mcasp(0,&omapl138_hawk_snd_data);

+       ret = davinci_cfg_reg_list(da850_mmcsd0_pins);

No, you can't use the generic pin list. You should add to it the two GPIOs used as WP/CD inputs, and define the new list in the board file.

+       if (ret)
+               pr_warning("omapl138_hawk_init: "
+                       "mmcsd0 mux setup failed: %d\n", ret);

                pr_warning("%s: MMC/SD0 mux setup failed: %d\n",
                           __func__, ret);

+       ret = gpio_request(DA850_HAWK_MMCSD_CD_PIN, "MMC CD\n");
+       if (ret)
+               pr_warning("da850_hawk_init: can not open GPIO %d\n",
+                                       DA850_HAWK_MMCSD_CD_PIN);

                pr_warning("%s: can not open GPIO %d\n",
                           __func__, DA850_HAWK_MMCSD_CD_PIN);

+       gpio_direction_input(DA850_HAWK_MMCSD_CD_PIN);
+
+       ret = gpio_request(DA850_HAWK_MMCSD_WP_PIN, "MMC WP\n");
+       if (ret)
+               pr_warning("da850_hawk_init: can not open GPIO %d\n",
+                                       DA850_HAWK_MMCSD_WP_PIN);

                pr_warning("%s: can not open GPIO %d\n",
                           __func__, DA850_HAWK_MMCSD_WP_PIN);

+       gpio_direction_input(DA850_HAWK_MMCSD_WP_PIN);
+
+       ret = da8xx_register_mmcsd0(&da850_mmc_config);
+       if (ret)
+               pr_warning("omapl138_hawk_init: "
+                       "mmcsd0 registration failed: %d\n", ret);

                pr_warning("%s: MMC/SD0 registration failed: %d\n",
                           __func__, ret);

WBR, Sergei
_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

Reply via email to