]> nv-tegra.nvidia Code Review - linux-2.6.git/blob - arch/arm/mach-tegra/board-ventana.c
arm: tegra: whistler/ventana: add ram console
[linux-2.6.git] / arch / arm / mach-tegra / board-ventana.c
1 /*
2  * arch/arm/mach-tegra/board-ventana.c
3  *
4  * Copyright (c) 2010-2011, NVIDIA Corporation.
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful, but WITHOUT
12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
14  * more details.
15  *
16  * You should have received a copy of the GNU General Public License along
17  * with this program; if not, write to the Free Software Foundation, Inc.,
18  * 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
19  */
20
21 #include <linux/kernel.h>
22 #include <linux/init.h>
23 #include <linux/slab.h>
24 #include <linux/ctype.h>
25 #include <linux/platform_device.h>
26 #include <linux/clk.h>
27 #include <linux/serial_8250.h>
28 #include <linux/i2c.h>
29 #include <linux/i2c/panjit_ts.h>
30 #include <linux/dma-mapping.h>
31 #include <linux/delay.h>
32 #include <linux/i2c-tegra.h>
33 #include <linux/gpio.h>
34 #include <linux/gpio_keys.h>
35 #include <linux/input.h>
36 #include <linux/platform_data/tegra_usb.h>
37 #include <linux/mfd/tps6586x.h>
38 #include <linux/memblock.h>
39 #include <linux/i2c/atmel_mxt_ts.h>
40 #include <linux/tegra_uart.h>
41
42 #include <sound/wm8903.h>
43
44 #include <mach/clk.h>
45 #include <mach/gpio-tegra.h>
46 #include <mach/iomap.h>
47 #include <mach/irqs.h>
48 #include <mach/pinmux.h>
49 #include <mach/pinmux-tegra20.h>
50 #include <mach/iomap.h>
51 #include <mach/io.h>
52 #include <mach/i2s.h>
53 #include <mach/tegra_wm8903_pdata.h>
54
55 #include <asm/hardware/gic.h>
56 #include <asm/mach-types.h>
57 #include <asm/mach/arch.h>
58 #include <mach/usb_phy.h>
59
60 #include "board.h"
61 #include "clock.h"
62 #include "board-ventana.h"
63 #include "devices.h"
64 #include "gpio-names.h"
65 #include "fuse.h"
66 #include "wakeups-t2.h"
67 #include "pm.h"
68
69 static struct tegra_utmip_config utmi_phy_config[] = {
70         [0] = {
71                         .hssync_start_delay = 9,
72                         .idle_wait_delay = 17,
73                         .elastic_limit = 16,
74                         .term_range_adj = 6,
75                         .xcvr_setup = 15,
76                         .xcvr_setup_offset = 0,
77                         .xcvr_use_fuses = 1,
78                         .xcvr_lsfslew = 2,
79                         .xcvr_lsrslew = 2,
80         },
81         [1] = {
82                         .hssync_start_delay = 9,
83                         .idle_wait_delay = 17,
84                         .elastic_limit = 16,
85                         .term_range_adj = 6,
86                         .xcvr_setup = 8,
87                         .xcvr_setup_offset = 0,
88                         .xcvr_use_fuses = 1,
89                         .xcvr_lsfslew = 2,
90                         .xcvr_lsrslew = 2,
91         },
92 };
93
94 static struct tegra_ulpi_config ulpi_phy_config = {
95         .reset_gpio = TEGRA_GPIO_PG2,
96         .clk = "cdev2",
97 };
98
99 static struct resource ventana_bcm4329_rfkill_resources[] = {
100         {
101                 .name   = "bcm4329_nshutdown_gpio",
102                 .start  = TEGRA_GPIO_PU0,
103                 .end    = TEGRA_GPIO_PU0,
104                 .flags  = IORESOURCE_IO,
105         },
106 };
107
108 static struct platform_device ventana_bcm4329_rfkill_device = {
109         .name = "bcm4329_rfkill",
110         .id             = -1,
111         .num_resources  = ARRAY_SIZE(ventana_bcm4329_rfkill_resources),
112         .resource       = ventana_bcm4329_rfkill_resources,
113 };
114
115 static void __init ventana_bt_rfkill(void)
116 {
117         /*Add Clock Resource*/
118         clk_add_alias("bcm4329_32k_clk", ventana_bcm4329_rfkill_device.name, \
119                                 "blink", NULL);
120         return;
121 }
122
123 static struct resource ventana_bluesleep_resources[] = {
124         [0] = {
125                 .name = "gpio_host_wake",
126                         .start  = TEGRA_GPIO_PU6,
127                         .end    = TEGRA_GPIO_PU6,
128                         .flags  = IORESOURCE_IO,
129         },
130         [1] = {
131                 .name = "gpio_ext_wake",
132                         .start  = TEGRA_GPIO_PU1,
133                         .end    = TEGRA_GPIO_PU1,
134                         .flags  = IORESOURCE_IO,
135         },
136         [2] = {
137                 .name = "host_wake",
138                         .start  = TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_PU6),
139                         .end    = TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_PU6),
140                         .flags  = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE,
141         },
142 };
143
144 static struct platform_device ventana_bluesleep_device = {
145         .name           = "bluesleep",
146         .id             = -1,
147         .num_resources  = ARRAY_SIZE(ventana_bluesleep_resources),
148         .resource       = ventana_bluesleep_resources,
149 };
150
151 static void __init ventana_setup_bluesleep(void)
152 {
153         platform_device_register(&ventana_bluesleep_device);
154         tegra_gpio_enable(TEGRA_GPIO_PU6);
155         tegra_gpio_enable(TEGRA_GPIO_PU1);
156         return;
157 }
158
159 static __initdata struct tegra_clk_init_table ventana_clk_init_table[] = {
160         /* name         parent          rate            enabled */
161         { "blink",      "clk_32k",      32768,          false},
162         { "pll_p_out4", "pll_p",        24000000,       true },
163         { "pwm",        "clk_32k",      32768,          false},
164         { "i2s1",       "pll_a_out0",   0,              false},
165         { "i2s2",       "pll_a_out0",   0,              false},
166         { "spdif_out",  "pll_a_out0",   0,              false},
167         { NULL,         NULL,           0,              0},
168 };
169
170 static struct tegra_ulpi_config ventana_ehci2_ulpi_phy_config = {
171         .reset_gpio = TEGRA_GPIO_PV1,
172         .clk = "cdev2",
173 };
174
175 static struct tegra_ehci_platform_data ventana_ehci2_ulpi_platform_data = {
176         .operating_mode = TEGRA_USB_HOST,
177         .power_down_on_bus_suspend = 1,
178         .phy_config = &ventana_ehci2_ulpi_phy_config,
179         .phy_type = TEGRA_USB_PHY_TYPE_LINK_ULPI,
180         .default_enable = true,
181 };
182
183 static struct tegra_i2c_platform_data ventana_i2c1_platform_data = {
184         .adapter_nr     = 0,
185         .bus_count      = 1,
186         .bus_clk_rate   = { 400000, 0 },
187         .slave_addr = 0x00FC,
188         .scl_gpio               = {TEGRA_GPIO_PC4, 0},
189         .sda_gpio               = {TEGRA_GPIO_PC5, 0},
190         .arb_recovery = arb_lost_recovery,
191 };
192
193 static const struct tegra_pingroup_config i2c2_ddc = {
194         .pingroup       = TEGRA_PINGROUP_DDC,
195         .func           = TEGRA_MUX_I2C2,
196 };
197
198 static const struct tegra_pingroup_config i2c2_gen2 = {
199         .pingroup       = TEGRA_PINGROUP_PTA,
200         .func           = TEGRA_MUX_I2C2,
201 };
202
203 static struct tegra_i2c_platform_data ventana_i2c2_platform_data = {
204         .adapter_nr     = 1,
205         .bus_count      = 2,
206         .bus_clk_rate   = { 100000, 10000 },
207         .bus_mux        = { &i2c2_ddc, &i2c2_gen2 },
208         .bus_mux_len    = { 1, 1 },
209         .slave_addr = 0x00FC,
210         .scl_gpio               = {0, TEGRA_GPIO_PT5},
211         .sda_gpio               = {0, TEGRA_GPIO_PT6},
212         .arb_recovery = arb_lost_recovery,
213 };
214
215 static struct tegra_i2c_platform_data ventana_i2c3_platform_data = {
216         .adapter_nr     = 3,
217         .bus_count      = 1,
218         .bus_clk_rate   = { 400000, 0 },
219         .slave_addr = 0x00FC,
220         .scl_gpio               = {TEGRA_GPIO_PBB2, 0},
221         .sda_gpio               = {TEGRA_GPIO_PBB3, 0},
222         .arb_recovery = arb_lost_recovery,
223 };
224
225 static struct tegra_i2c_platform_data ventana_dvc_platform_data = {
226         .adapter_nr     = 4,
227         .bus_count      = 1,
228         .bus_clk_rate   = { 400000, 0 },
229         .is_dvc         = true,
230         .scl_gpio               = {TEGRA_GPIO_PZ6, 0},
231         .sda_gpio               = {TEGRA_GPIO_PZ7, 0},
232         .arb_recovery = arb_lost_recovery,
233 };
234
235 static struct wm8903_platform_data ventana_wm8903_pdata = {
236         .irq_active_low = 0,
237         .micdet_cfg = 0,
238         .micdet_delay = 100,
239         .gpio_base = WM8903_GPIO_BASE,
240         .gpio_cfg = {
241                 (WM8903_GPn_FN_DMIC_LR_CLK_OUTPUT << WM8903_GP1_FN_SHIFT),
242                 (WM8903_GPn_FN_DMIC_LR_CLK_OUTPUT << WM8903_GP2_FN_SHIFT) |
243                         WM8903_GP2_DIR,
244                 0,
245                 WM8903_GPIO_NO_CONFIG,
246                 WM8903_GPIO_NO_CONFIG,
247         },
248 };
249
250 static struct i2c_board_info __initdata wm8903_board_info = {
251         I2C_BOARD_INFO("wm8903", 0x1a),
252         .platform_data = &ventana_wm8903_pdata,
253         .irq = TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_CDC_IRQ),
254 };
255
256 static void ventana_i2c_init(void)
257 {
258         tegra_i2c_device1.dev.platform_data = &ventana_i2c1_platform_data;
259         tegra_i2c_device2.dev.platform_data = &ventana_i2c2_platform_data;
260         tegra_i2c_device3.dev.platform_data = &ventana_i2c3_platform_data;
261         tegra_i2c_device4.dev.platform_data = &ventana_dvc_platform_data;
262
263         platform_device_register(&tegra_i2c_device1);
264         platform_device_register(&tegra_i2c_device2);
265         platform_device_register(&tegra_i2c_device3);
266         platform_device_register(&tegra_i2c_device4);
267
268         i2c_register_board_info(0, &wm8903_board_info, 1);
269 }
270 static struct platform_device *ventana_uart_devices[] __initdata = {
271         &tegra_uartb_device,
272         &tegra_uartc_device,
273         &tegra_uartd_device,
274 };
275
276 static struct uart_clk_parent uart_parent_clk[] = {
277         [0] = {.name = "pll_p"},
278         [1] = {.name = "pll_m"},
279         [2] = {.name = "clk_m"},
280 };
281
282 static struct tegra_uart_platform_data ventana_uart_pdata;
283
284 static void __init uart_debug_init(void)
285 {
286         unsigned long rate;
287         struct clk *c;
288
289         /* UARTD is the debug port. */
290         pr_info("Selecting UARTD as the debug console\n");
291         ventana_uart_devices[2] = &debug_uartd_device;
292         debug_uart_port_base = ((struct plat_serial8250_port *)(
293                         debug_uartd_device.dev.platform_data))->mapbase;
294         debug_uart_clk = clk_get_sys("serial8250.0", "uartd");
295
296         /* Clock enable for the debug channel */
297         if (!IS_ERR_OR_NULL(debug_uart_clk)) {
298                 rate = ((struct plat_serial8250_port *)(
299                         debug_uartd_device.dev.platform_data))->uartclk;
300                 pr_info("The debug console clock name is %s\n",
301                                                 debug_uart_clk->name);
302                 c = tegra_get_clock_by_name("pll_p");
303                 if (IS_ERR_OR_NULL(c))
304                         pr_err("Not getting the parent clock pll_p\n");
305                 else
306                         clk_set_parent(debug_uart_clk, c);
307
308                 clk_enable(debug_uart_clk);
309                 clk_set_rate(debug_uart_clk, rate);
310         } else {
311                 pr_err("Not getting the clock %s for debug console\n",
312                                         debug_uart_clk->name);
313         }
314 }
315
316 static void __init ventana_uart_init(void)
317 {
318         int i;
319         struct clk *c;
320
321         for (i = 0; i < ARRAY_SIZE(uart_parent_clk); ++i) {
322                 c = tegra_get_clock_by_name(uart_parent_clk[i].name);
323                 if (IS_ERR_OR_NULL(c)) {
324                         pr_err("Not able to get the clock for %s\n",
325                                                 uart_parent_clk[i].name);
326                         continue;
327                 }
328                 uart_parent_clk[i].parent_clk = c;
329                 uart_parent_clk[i].fixed_clk_rate = clk_get_rate(c);
330         }
331         ventana_uart_pdata.parent_clk_list = uart_parent_clk;
332         ventana_uart_pdata.parent_clk_count = ARRAY_SIZE(uart_parent_clk);
333         tegra_uartb_device.dev.platform_data = &ventana_uart_pdata;
334         tegra_uartc_device.dev.platform_data = &ventana_uart_pdata;
335         tegra_uartd_device.dev.platform_data = &ventana_uart_pdata;
336
337         /* Register low speed only if it is selected */
338         if (!is_tegra_debug_uartport_hs())
339                 uart_debug_init();
340
341         platform_add_devices(ventana_uart_devices,
342                                 ARRAY_SIZE(ventana_uart_devices));
343 }
344
345 #ifdef CONFIG_KEYBOARD_GPIO
346 #define GPIO_KEY(_id, _gpio, _iswake)           \
347         {                                       \
348                 .code = _id,                    \
349                 .gpio = TEGRA_GPIO_##_gpio,     \
350                 .active_low = 1,                \
351                 .desc = #_id,                   \
352                 .type = EV_KEY,                 \
353                 .wakeup = _iswake,              \
354                 .debounce_interval = 10,        \
355         }
356
357 static struct gpio_keys_button ventana_keys[] = {
358         [0] = GPIO_KEY(KEY_FIND, PQ3, 0),
359         [1] = GPIO_KEY(KEY_HOME, PQ1, 0),
360         [2] = GPIO_KEY(KEY_BACK, PQ2, 0),
361         [3] = GPIO_KEY(KEY_VOLUMEUP, PQ5, 0),
362         [4] = GPIO_KEY(KEY_VOLUMEDOWN, PQ4, 0),
363         [5] = GPIO_KEY(KEY_POWER, PV2, 1),
364         [6] = GPIO_KEY(KEY_MENU, PC7, 0),
365 };
366
367 #define PMC_WAKE_STATUS 0x14
368
369 static int ventana_wakeup_key(void)
370 {
371         unsigned long status =
372                 readl(IO_ADDRESS(TEGRA_PMC_BASE) + PMC_WAKE_STATUS);
373
374         return status & TEGRA_WAKE_GPIO_PV2 ? KEY_POWER : KEY_RESERVED;
375 }
376
377 static struct gpio_keys_platform_data ventana_keys_platform_data = {
378         .buttons        = ventana_keys,
379         .nbuttons       = ARRAY_SIZE(ventana_keys),
380         .wakeup_key     = ventana_wakeup_key,
381 };
382
383 static struct platform_device ventana_keys_device = {
384         .name   = "gpio-keys",
385         .id     = 0,
386         .dev    = {
387                 .platform_data  = &ventana_keys_platform_data,
388         },
389 };
390
391 static void ventana_keys_init(void)
392 {
393         int i;
394
395         for (i = 0; i < ARRAY_SIZE(ventana_keys); i++)
396                 tegra_gpio_enable(ventana_keys[i].gpio);
397 }
398 #endif
399
400 static struct platform_device tegra_camera = {
401         .name = "tegra_camera",
402         .id = -1,
403 };
404
405 static struct tegra_wm8903_platform_data ventana_audio_pdata = {
406         .gpio_spkr_en           = TEGRA_GPIO_SPKR_EN,
407         .gpio_hp_det            = TEGRA_GPIO_HP_DET,
408         .gpio_hp_mute           = -1,
409         .gpio_int_mic_en        = TEGRA_GPIO_INT_MIC_EN,
410         .gpio_ext_mic_en        = TEGRA_GPIO_EXT_MIC_EN,
411 };
412
413 static struct platform_device ventana_audio_device = {
414         .name   = "tegra-snd-wm8903",
415         .id     = 0,
416         .dev    = {
417                 .platform_data  = &ventana_audio_pdata,
418         },
419 };
420
421 static struct platform_device *ventana_devices[] __initdata = {
422         &tegra_pmu_device,
423         &tegra_gart_device,
424         &tegra_aes_device,
425 #ifdef CONFIG_KEYBOARD_GPIO
426         &ventana_keys_device,
427 #endif
428         &tegra_wdt_device,
429         &tegra_avp_device,
430         &tegra_camera,
431         &tegra_i2s_device1,
432         &tegra_i2s_device2,
433         &tegra_spdif_device,
434         &tegra_das_device,
435         &spdif_dit_device,
436         &bluetooth_dit_device,
437         &ventana_bcm4329_rfkill_device,
438         &tegra_pcm_device,
439         &ventana_audio_device,
440 };
441
442
443 static struct mxt_platform_data atmel_mxt_info = {
444         .x_line         = 27,
445         .y_line         = 42,
446         .x_size         = 768,
447         .y_size         = 1366,
448         .blen           = 0x20,
449         .threshold      = 0x3C,
450         .voltage        = 3300000,
451         .orient         = MXT_ROTATED_90,
452         .irqflags       = IRQF_TRIGGER_FALLING,
453 };
454
455 static struct i2c_board_info __initdata i2c_info[] = {
456         {
457          I2C_BOARD_INFO("atmel_mxt_ts", 0x5A),
458          .irq = TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_PV6),
459          .platform_data = &atmel_mxt_info,
460          },
461 };
462
463 static int __init ventana_touch_init_atmel(void)
464 {
465         tegra_gpio_enable(TEGRA_GPIO_PV6);
466         tegra_gpio_enable(TEGRA_GPIO_PQ7);
467
468         gpio_request(TEGRA_GPIO_PV6, "atmel-irq");
469         gpio_direction_input(TEGRA_GPIO_PV6);
470
471         gpio_request(TEGRA_GPIO_PQ7, "atmel-reset");
472         gpio_direction_output(TEGRA_GPIO_PQ7, 0);
473         msleep(1);
474         gpio_set_value(TEGRA_GPIO_PQ7, 1);
475         msleep(100);
476
477         i2c_register_board_info(0, i2c_info, 1);
478
479         return 0;
480 }
481
482 static struct panjit_i2c_ts_platform_data panjit_data = {
483         .gpio_reset = TEGRA_GPIO_PQ7,
484 };
485
486 static struct i2c_board_info __initdata ventana_i2c_bus1_touch_info[] = {
487         {
488                 I2C_BOARD_INFO("panjit_touch", 0x3),
489                 .irq = TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_PV6),
490                 .platform_data = &panjit_data,
491         },
492 };
493
494 static int __init ventana_touch_init_panjit(void)
495 {
496         tegra_gpio_enable(TEGRA_GPIO_PV6);
497
498         tegra_gpio_enable(TEGRA_GPIO_PQ7);
499         i2c_register_board_info(0, ventana_i2c_bus1_touch_info, 1);
500
501         return 0;
502 }
503
504 static struct usb_phy_plat_data tegra_usb_phy_pdata[] = {
505         [0] = {
506                         .instance = 0,
507                         .vbus_irq = TPS6586X_INT_BASE + TPS6586X_INT_USB_DET,
508                         .vbus_gpio = TEGRA_GPIO_PD0,
509         },
510         [1] = {
511                         .instance = 1,
512                         .vbus_gpio = -1,
513         },
514         [2] = {
515                         .instance = 2,
516                         .vbus_gpio = TEGRA_GPIO_PD3,
517         },
518 };
519
520 static struct tegra_ehci_platform_data tegra_ehci_pdata[] = {
521         [0] = {
522                         .phy_config = &utmi_phy_config[0],
523                         .operating_mode = TEGRA_USB_HOST,
524                         .power_down_on_bus_suspend = 1,
525                         .default_enable = true,
526         },
527         [1] = {
528                         .phy_config = &ulpi_phy_config,
529                         .operating_mode = TEGRA_USB_HOST,
530                         .power_down_on_bus_suspend = 1,
531                         .phy_type = TEGRA_USB_PHY_TYPE_LINK_ULPI,
532                         .default_enable = true,
533         },
534         [2] = {
535                         .phy_config = &utmi_phy_config[1],
536                         .operating_mode = TEGRA_USB_HOST,
537                         .power_down_on_bus_suspend = 1,
538                         .hotplug = 1,
539                         .default_enable = true,
540         },
541 };
542
543 static struct tegra_otg_platform_data tegra_otg_pdata = {
544         .ehci_device = &tegra_ehci1_device,
545         .ehci_pdata = &tegra_ehci_pdata[0],
546 };
547
548 static int __init ventana_gps_init(void)
549 {
550         struct clk *clk32 = clk_get_sys(NULL, "blink");
551         if (!IS_ERR(clk32)) {
552                 clk_set_rate(clk32,clk32->parent->rate);
553                 clk_enable(clk32);
554         }
555
556         tegra_gpio_enable(TEGRA_GPIO_PZ3);
557         return 0;
558 }
559
560 static void ventana_usb_init(void)
561 {
562         tegra_usb_phy_init(tegra_usb_phy_pdata, ARRAY_SIZE(tegra_usb_phy_pdata));
563         /* OTG should be the first to be registered */
564         tegra_otg_device.dev.platform_data = &tegra_otg_pdata;
565         platform_device_register(&tegra_otg_device);
566
567         platform_device_register(&tegra_udc_device);
568         platform_device_register(&tegra_ehci2_device);
569
570         tegra_ehci3_device.dev.platform_data=&tegra_ehci_pdata[2];
571         platform_device_register(&tegra_ehci3_device);
572 }
573
574 static void __init tegra_ventana_init(void)
575 {
576         struct board_info BoardInfo;
577
578         tegra_clk_init_from_table(ventana_clk_init_table);
579         ventana_pinmux_init();
580         ventana_i2c_init();
581         ventana_uart_init();
582         tegra_ehci2_device.dev.platform_data
583                 = &ventana_ehci2_ulpi_platform_data;
584         platform_add_devices(ventana_devices, ARRAY_SIZE(ventana_devices));
585         tegra_ram_console_debug_init();
586         ventana_sdhci_init();
587         ventana_charge_init();
588         ventana_regulator_init();
589         ventana_charger_init();
590
591         tegra_get_board_info(&BoardInfo);
592
593         /* boards with sku > 0 have atmel touch panels */
594         if (BoardInfo.sku) {
595                 pr_info("Initializing Atmel touch driver\n");
596                 ventana_touch_init_atmel();
597         } else {
598                 pr_info("Initializing Panjit touch driver\n");
599                 ventana_touch_init_panjit();
600         }
601
602 #ifdef CONFIG_KEYBOARD_GPIO
603         ventana_keys_init();
604 #endif
605
606         ventana_usb_init();
607         ventana_gps_init();
608         ventana_panel_init();
609         ventana_sensors_init();
610         ventana_bt_rfkill();
611         ventana_emc_init();
612
613         ventana_setup_bluesleep();
614         tegra_release_bootloader_fb();
615 }
616
617 int __init tegra_ventana_protected_aperture_init(void)
618 {
619         if (!machine_is_ventana())
620                 return 0;
621
622         tegra_protected_aperture_init(tegra_grhost_aperture);
623         return 0;
624 }
625 late_initcall(tegra_ventana_protected_aperture_init);
626
627 void __init tegra_ventana_reserve(void)
628 {
629         if (memblock_reserve(0x0, 4096) < 0)
630                 pr_warn("Cannot reserve first 4K of memory for safety\n");
631
632         tegra_reserve(SZ_256M, SZ_8M + SZ_1M, SZ_16M);
633         tegra_ram_console_debug_reserve(SZ_1M);
634 }
635
636 MACHINE_START(VENTANA, "ventana")
637         .map_io         = tegra_map_common_io,
638         .init_early     = tegra20_init_early,
639         .init_irq       = tegra_init_irq,
640         .handle_irq     = gic_handle_irq,
641         .reserve        = tegra_ventana_reserve,
642         .timer          = &tegra_timer,
643         .init_machine   = tegra_ventana_init,
644         .restart        = tegra_assert_system_reset,
645 MACHINE_END