ARM: tegra12: set CPU rate to 2.2GHz for sku 0x87
[linux-3.10.git] / arch / arm / mach-tegra / board-macallan-panel.c
index 9a85620..4db92d8 100644 (file)
@@ -150,7 +150,7 @@ static int macallan_hdmi_enable(struct device *dev)
        int ret;
        if (!macallan_hdmi_reg) {
                macallan_hdmi_reg = regulator_get(dev, "avdd_hdmi");
-               if (IS_ERR_OR_NULL(macallan_hdmi_reg)) {
+               if (IS_ERR(macallan_hdmi_reg)) {
                        pr_err("hdmi: couldn't get regulator avdd_hdmi\n");
                        macallan_hdmi_reg = NULL;
                        return PTR_ERR(macallan_hdmi_reg);
@@ -163,7 +163,7 @@ static int macallan_hdmi_enable(struct device *dev)
        }
        if (!macallan_hdmi_pll) {
                macallan_hdmi_pll = regulator_get(dev, "avdd_hdmi_pll");
-               if (IS_ERR_OR_NULL(macallan_hdmi_pll)) {
+               if (IS_ERR(macallan_hdmi_pll)) {
                        pr_err("hdmi: couldn't get regulator avdd_hdmi_pll\n");
                        macallan_hdmi_pll = NULL;
                        regulator_put(macallan_hdmi_reg);
@@ -335,55 +335,6 @@ static struct platform_device macallan_nvmap_device = {
        },
 };
 
-static struct tegra_dc_sd_settings macallan_sd_settings = {
-       .enable = 1, /* enabled by default. */
-       .use_auto_pwm = false,
-       .hw_update_delay = 0,
-       .bin_width = -1,
-       .aggressiveness = 5,
-       .use_vid_luma = false,
-       .phase_in_adjustments = 0,
-       .k_limit_enable = true,
-       .k_limit = 200,
-       .sd_window_enable = false,
-       .soft_clipping_enable = true,
-       /* Low soft clipping threshold to compensate for aggressive k_limit */
-       .soft_clipping_threshold = 128,
-       .smooth_k_enable = true,
-       .smooth_k_incr = 4,
-       /* Default video coefficients */
-       .coeff = {5, 9, 2},
-       .fc = {0, 0},
-       /* Immediate backlight changes */
-       .blp = {1024, 255},
-       /* Gammas: R: 2.2 G: 2.2 B: 2.2 */
-       /* Default BL TF */
-       .bltf = {
-                       {
-                               {57, 65, 73, 82},
-                               {92, 103, 114, 125},
-                               {138, 150, 164, 178},
-                               {193, 208, 224, 241},
-                       },
-               },
-       /* Default LUT */
-       .lut = {
-                       {
-                               {255, 255, 255},
-                               {199, 199, 199},
-                               {153, 153, 153},
-                               {116, 116, 116},
-                               {85, 85, 85},
-                               {59, 59, 59},
-                               {36, 36, 36},
-                               {17, 17, 17},
-                               {0, 0, 0},
-                       },
-               },
-       .sd_brightness = &sd_brightness,
-       .use_vpulse2 = true,
-};
-
 static void macallan_panel_select(void)
 {
        struct tegra_panel *panel = NULL;
@@ -439,8 +390,6 @@ int __init macallan_panel_init(void)
        struct resource __maybe_unused *res;
        struct platform_device *phost1x = NULL;
 
-       sd_settings = macallan_sd_settings;
-
        macallan_panel_select();
 
 #ifdef CONFIG_TEGRA_NVMAP
@@ -472,11 +421,6 @@ int __init macallan_panel_init(void)
                tegra_fb_start, tegra_bootloader_fb_start,
                        min(tegra_fb_size, tegra_bootloader_fb_size));
 
-       res = platform_get_resource_byname(&macallan_disp2_device,
-               IORESOURCE_MEM, "fbmem");
-       res->start = tegra_fb2_start;
-       res->end = tegra_fb2_start + tegra_fb2_size - 1;
-
        macallan_disp1_device.dev.parent = &phost1x->dev;
        err = platform_device_register(&macallan_disp1_device);
        if (err) {
@@ -484,12 +428,9 @@ int __init macallan_panel_init(void)
                return err;
        }
 
-       macallan_disp2_device.dev.parent = &phost1x->dev;
-       err = platform_device_register(&macallan_disp2_device);
-       if (err) {
-               pr_err("disp2 device registration failed\n");
+       err = tegra_init_hdmi(&macallan_disp2_device, phost1x);
+       if (err)
                return err;
-       }
 
 #ifdef CONFIG_TEGRA_NVAVP
        nvavp_device.dev.parent = &phost1x->dev;