ARM: tegra: pluto: Add EMC DFS template
Alex Frid [Fri, 28 Sep 2012 03:09:50 +0000 (20:09 -0700)]
Created EMC DFS template and registered EMC device (with empty
table, for now).

Change-Id: I83e4ad4660855f3a50fc644b358641b5c10e493d
Signed-off-by: Alex Frid <afrid@nvidia.com>
Reviewed-on: http://git-master/r/139558
Signed-off-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-on: http://git-master/r/146257
Reviewed-by: Automatic_Commit_Validation_User

arch/arm/mach-tegra/board-pluto-memory.c

index 6d999c4..86da0b3 100644 (file)
 
 #include <linux/kernel.h>
 #include <linux/init.h>
+#include <linux/platform_data/tegra_emc.h>
 
 #include "board.h"
 #include "board-pluto.h"
+#include "tegra-board-id.h"
 #include "tegra11_emc.h"
 #include "fuse.h"
+#include "devices.h"
 
+static struct tegra11_emc_pdata e1580_no_dram_pdata = {
+       .description = "e1580_no_dram",
+};
 
-int pluto_emc_init(void)
+static struct tegra11_emc_pdata *pluto_get_emc_data(void)
 {
+       struct board_info board_info;
+
+       tegra_get_board_info(&board_info);
+
+       if (board_info.board_id != BOARD_E1580)
+               return NULL;
+
+       return &e1580_no_dram_pdata;
+}
+
+int __init pluto_emc_init(void)
+{
+       tegra_emc_device.dev.platform_data = pluto_get_emc_data();
+       platform_device_register(&tegra_emc_device);
+       tegra11_emc_init();
+
        return 0;
 }