[RFC 1/2] ARM: Tegra: Device Tree Support: Update how sdhci devices are initialized

Grant Likely grant.likely at secretlab.ca
Thu May 12 04:21:32 EST 2011


On Wed, May 11, 2011 at 7:01 AM, Stephen Warren <swarren at nvidia.com> wrote:
> John Bonesio wrote at Tuesday, May 10, 2011 5:33 PM:
> +static struct tegra_sdhci_platform_data sdhci_pdata1 = {
> +       .cd_gpio        = -1,
> +       .wp_gpio        = -1,
> +       .power_gpio     = -1,
> +};
> ...
> +       tegra_sdhci_device1.dev.platform_data = &sdhci_pdata1;
>
> The SDHCI driver has already been updated to get this platform data
> from the OF node in the platform device; it doesn't need hard-coded
> platform data to be passed to it.
>
> Similarly, the following from your I2C patch shouldn't be required:
>
> +static struct tegra_i2c_platform_data harmony_i2c1_platform_data = {
> +       .bus_clk_rate   = 400000,
> +};
> ...
> +       tegra_i2c_device1.dev.platform_data = &harmony_i2c1_platform_data;

Correct.  John, you /should/ be able to simply drop the hunk in this
patch that adds platform_data bits.  All you're doing with this patch
is dropping the local declaration of the platform_devices and using
the ones defined in arch/arm/mach-tegra/devices.c.  Setting the
platform_data pointer is not required.

g.


More information about the devicetree-discuss mailing list