summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-tegra/board-harmony-panel.c15
-rw-r--r--arch/arm/mach-tegra/board-harmony-pinmux.c5
-rw-r--r--arch/arm/mach-tegra/board-harmony-sdhci.c82
-rw-r--r--arch/arm/mach-tegra/board-harmony.c35
-rw-r--r--arch/arm/mach-tegra/board-harmony.h2
5 files changed, 45 insertions, 94 deletions
diff --git a/arch/arm/mach-tegra/board-harmony-panel.c b/arch/arm/mach-tegra/board-harmony-panel.c
index 9fbdacbcded1..309d72e4b490 100644
--- a/arch/arm/mach-tegra/board-harmony-panel.c
+++ b/arch/arm/mach-tegra/board-harmony-panel.c
@@ -58,18 +58,7 @@ static struct platform_device tegra_fb_device = {
},
};
-static int __init harmony_init_panel(void) {
- int ret;
-
- if (!machine_is_harmony())
- return 0;
-
- ret = platform_device_register(&tegra_fb_device);
- if (ret != 0)
- return ret;
-
- return 0;
+int __init harmony_panel_init(void) {
+ return platform_device_register(&tegra_fb_device);
}
-device_initcall(harmony_init_panel);
-
diff --git a/arch/arm/mach-tegra/board-harmony-pinmux.c b/arch/arm/mach-tegra/board-harmony-pinmux.c
index 4d63e2e97a8d..3621d1be502d 100644
--- a/arch/arm/mach-tegra/board-harmony-pinmux.c
+++ b/arch/arm/mach-tegra/board-harmony-pinmux.c
@@ -16,12 +16,13 @@
#include <linux/kernel.h>
#include <linux/gpio.h>
+#include <linux/init.h>
#include <mach/pinmux.h>
#include "gpio-names.h"
#include "board-harmony.h"
-static struct tegra_pingroup_config harmony_pinmux[] = {
+static __initdata struct tegra_pingroup_config harmony_pinmux[] = {
{TEGRA_PINGROUP_ATA, TEGRA_MUX_IDE, TEGRA_PUPD_NORMAL, TEGRA_TRI_NORMAL},
{TEGRA_PINGROUP_ATB, TEGRA_MUX_SDIO4, TEGRA_PUPD_NORMAL, TEGRA_TRI_NORMAL},
{TEGRA_PINGROUP_ATC, TEGRA_MUX_NAND, TEGRA_PUPD_NORMAL, TEGRA_TRI_NORMAL},
@@ -153,7 +154,7 @@ static struct tegra_gpio_table gpio_table[] = {
{ .gpio = TEGRA_GPIO_EXT_MIC_EN, .enable = true },
};
-void harmony_pinmux_init(void)
+void __init harmony_pinmux_init(void)
{
tegra_pinmux_config_table(harmony_pinmux, ARRAY_SIZE(harmony_pinmux));
diff --git a/arch/arm/mach-tegra/board-harmony-sdhci.c b/arch/arm/mach-tegra/board-harmony-sdhci.c
index 7ad3715b551f..fb11cdf889ed 100644
--- a/arch/arm/mach-tegra/board-harmony-sdhci.c
+++ b/arch/arm/mach-tegra/board-harmony-sdhci.c
@@ -27,19 +27,6 @@
#include "gpio-names.h"
-/*static struct resource sdhci_resource1[] = {
- [0] = {
- .start = INT_SDMMC1,
- .end = INT_SDMMC1,
- .flags = IORESOURCE_IRQ,
- },
- [1] = {
- .start = TEGRA_SDMMC1_BASE,
- .end = TEGRA_SDMMC1_BASE + TEGRA_SDMMC1_SIZE-1,
- .flags = IORESOURCE_MEM,
- },
-};*/
-
static struct resource sdhci_resource2[] = {
[0] = {
.start = INT_SDMMC2,
@@ -53,19 +40,6 @@ static struct resource sdhci_resource2[] = {
},
};
-/*static struct resource sdhci_resource3[] = {
- [0] = {
- .start = INT_SDMMC3,
- .end = INT_SDMMC3,
- .flags = IORESOURCE_IRQ,
- },
- [1] = {
- .start = TEGRA_SDMMC3_BASE,
- .end = TEGRA_SDMMC3_BASE + TEGRA_SDMMC3_SIZE-1,
- .flags = IORESOURCE_MEM,
- },
-};*/
-
static struct resource sdhci_resource4[] = {
[0] = {
.start = INT_SDMMC4,
@@ -79,11 +53,6 @@ static struct resource sdhci_resource4[] = {
},
};
-/*static struct tegra_sdhci_platform_data tegra_sdhci_platform_data1 = {
- .clk_id = NULL,
- .force_hs = 0,
-};*/
-
static struct tegra_sdhci_platform_data tegra_sdhci_platform_data2 = {
.clk_id = NULL,
.force_hs = 1,
@@ -92,11 +61,6 @@ static struct tegra_sdhci_platform_data tegra_sdhci_platform_data2 = {
.power_gpio = TEGRA_GPIO_PT3,
};
-/*static struct tegra_sdhci_platform_data tegra_sdhci_platform_data3 = {
- .clk_id = NULL,
- .force_hs = 0,
-};*/
-
static struct tegra_sdhci_platform_data tegra_sdhci_platform_data4 = {
.clk_id = NULL,
.force_hs = 0,
@@ -105,16 +69,6 @@ static struct tegra_sdhci_platform_data tegra_sdhci_platform_data4 = {
.power_gpio = TEGRA_GPIO_PI6,
};
-/*static struct platform_device tegra_sdhci_device1 = {
- .name = "sdhci-tegra",
- .id = 0,
- .resource = sdhci_resource1,
- .num_resources = ARRAY_SIZE(sdhci_resource1),
- .dev = {
- .platform_data = &tegra_sdhci_platform_data1,
- },
-};*/
-
static struct platform_device tegra_sdhci_device2 = {
.name = "sdhci-tegra",
.id = 1,
@@ -125,16 +79,6 @@ static struct platform_device tegra_sdhci_device2 = {
},
};
-/*static struct platform_device tegra_sdhci_device3 = {
- .name = "sdhci-tegra",
- .id = 2,
- .resource = sdhci_resource3,
- .num_resources = ARRAY_SIZE(sdhci_resource3),
- .dev = {
- .platform_data = &tegra_sdhci_platform_data3,
- },
-};*/
-
static struct platform_device tegra_sdhci_device4 = {
.name = "sdhci-tegra",
.id = 3,
@@ -145,21 +89,8 @@ static struct platform_device tegra_sdhci_device4 = {
},
};
-static int __init harmony_init_sdhci(void)
+int __init harmony_sdhci_init(void)
{
- int ret;
-
- if (!machine_is_harmony())
- return 0;
-
- tegra_pinmux_set_tristate(TEGRA_PINGROUP_DTA, TEGRA_TRI_NORMAL);
- tegra_pinmux_set_tristate(TEGRA_PINGROUP_DTB, TEGRA_TRI_NORMAL);
- tegra_pinmux_set_tristate(TEGRA_PINGROUP_DTD, TEGRA_TRI_NORMAL);
-
- tegra_pinmux_set_tristate(TEGRA_PINGROUP_GMA, TEGRA_TRI_NORMAL);
- tegra_pinmux_set_tristate(TEGRA_PINGROUP_GMB, TEGRA_TRI_NORMAL);
- tegra_pinmux_set_tristate(TEGRA_PINGROUP_ATB, TEGRA_TRI_NORMAL);
-
gpio_request(tegra_sdhci_platform_data2.power_gpio, "sdhci2_power");
gpio_request(tegra_sdhci_platform_data2.cd_gpio, "sdhci2_cd");
gpio_request(tegra_sdhci_platform_data2.wp_gpio, "sdhci2_wp");
@@ -179,15 +110,8 @@ static int __init harmony_init_sdhci(void)
gpio_direction_output(tegra_sdhci_platform_data2.power_gpio, 1);
gpio_direction_output(tegra_sdhci_platform_data4.power_gpio, 1);
- /*ret = platform_device_register(&tegra_sdhci_device1);*/
- ret = platform_device_register(&tegra_sdhci_device2);
- /*ret = platform_device_register(&tegra_sdhci_device3);*/
- ret = platform_device_register(&tegra_sdhci_device4);
- if (ret != 0)
- return ret;
+ platform_device_register(&tegra_sdhci_device2);
+ platform_device_register(&tegra_sdhci_device4);
return 0;
}
-
-device_initcall(harmony_init_sdhci);
-
diff --git a/arch/arm/mach-tegra/board-harmony.c b/arch/arm/mach-tegra/board-harmony.c
index a3ca0994b2ab..be604ec73e95 100644
--- a/arch/arm/mach-tegra/board-harmony.c
+++ b/arch/arm/mach-tegra/board-harmony.c
@@ -48,6 +48,31 @@
#include "devices.h"
#include "gpio-names.h"
+/* NVidia bootloader tags */
+#define ATAG_NVIDIA 0x41000801
+
+#define ATAG_NVIDIA_RM 0x1
+#define ATAG_NVIDIA_DISPLAY 0x2
+#define ATAG_NVIDIA_FRAMEBUFFER 0x3
+#define ATAG_NVIDIA_CHIPSHMOO 0x4
+#define ATAG_NVIDIA_CHIPSHMOOPHYS 0x5
+#define ATAG_NVIDIA_PRESERVED_MEM_0 0x10000
+#define ATAG_NVIDIA_PRESERVED_MEM_N 2
+#define ATAG_NVIDIA_FORCE_32 0x7fffffff
+
+struct tag_tegra {
+ __u32 bootarg_key;
+ __u32 bootarg_len;
+ char bootarg[1];
+};
+
+static int __init parse_tag_nvidia(const struct tag *tag)
+{
+
+ return 0;
+}
+__tagtable(ATAG_NVIDIA, parse_tag_nvidia);
+
static struct tegra_nand_chip_parms nand_chip_parms[] = {
/* Samsung K5E2G1GACM */
[0] = {
@@ -288,6 +313,14 @@ static struct platform_device *harmony_devices[] __initdata = {
&tegra_nand_device,
&tegra_otg,
&pda_power_device,
+ &tegra_i2c_device1,
+ &tegra_i2c_device2,
+ &tegra_i2c_device3,
+ &tegra_i2c_device4,
+ &tegra_spi_device1,
+ &tegra_spi_device2,
+ &tegra_spi_device3,
+ &tegra_spi_device4,
};
static void __init tegra_harmony_fixup(struct machine_desc *desc,
@@ -343,6 +376,8 @@ static void __init tegra_harmony_init(void)
platform_add_devices(harmony_devices, ARRAY_SIZE(harmony_devices));
harmony_i2c_init();
harmony_regulator_init();
+ harmony_panel_init();
+ harmony_sdhci_init();
}
MACHINE_START(HARMONY, "harmony")
diff --git a/arch/arm/mach-tegra/board-harmony.h b/arch/arm/mach-tegra/board-harmony.h
index d85142edaf6b..52a84227c422 100644
--- a/arch/arm/mach-tegra/board-harmony.h
+++ b/arch/arm/mach-tegra/board-harmony.h
@@ -34,5 +34,7 @@
void harmony_pinmux_init(void);
int harmony_regulator_init(void);
+int harmony_panel_init(void);
+int harmony_sdhci_init(void);
#endif