aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/board-3430sdp.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-03-02 13:34:25 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2010-03-02 13:34:25 -0500
commit5057bfaff82e12f01a2ffd58f55535cbd7c5c3a2 (patch)
tree0397253173308317480ed82f0b75af46cd3f6cb1 /arch/arm/mach-omap2/board-3430sdp.c
parent6c0ad5dfd3d5ad6def89b485ee52834547da239b (diff)
parentd702d12167a2c05a346f49aac7a311d597762495 (diff)
Merge branch 'omap-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6
* 'omap-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6: (214 commits) omap2: Initialize Menelaus and MMC for N8X0 AM3517 EVM: correct typo - tca6416 mispelt as tca6516 AM3517 EVM: Enable I2C support AM35x: Enable OMAP_MUX in defconfig AM35x: Add missing GPIO mux config for EHCI port Zoom3: Defconfig update omap: i2c: Fix muxing for command line enabled bus OMAP4: clock: Remove clock hacks from timer-gp.c OMAP4: clock: Add dummy clock nodes for interface clocks OMAP4: clock: Rename leaf clock nodes to end with a _ick or _fck OMAP2+ clock: revise omap2_clk_{disable,enable}() OMAP2/3 clock: combine OMAP2 & 3 boot-time MPU rate change code OMAP clockdomain: if no autodeps exist, don't try to add or remove them OMAP hwmod: add hwmod class support OMAP hwmod: convert header files with static allocations into C files OMAP hwmod: convert hwmod to use hardware clock names rather than clkdev dev+con OMAP clock: add omap_clk_get_by_name() for use by OMAP hwmod core code OMAP3: clock: add capability to change rate of dpll4_m5_ck_3630 OMAP4 clock: drop the ALWAYS_ENABLED clock flag OMAP clock: drop RATE_FIXED clock flag ...
Diffstat (limited to 'arch/arm/mach-omap2/board-3430sdp.c')
-rw-r--r--arch/arm/mach-omap2/board-3430sdp.c147
1 files changed, 142 insertions, 5 deletions
diff --git a/arch/arm/mach-omap2/board-3430sdp.c b/arch/arm/mach-omap2/board-3430sdp.c
index c90b0d0b1927..f312b1513753 100644
--- a/arch/arm/mach-omap2/board-3430sdp.c
+++ b/arch/arm/mach-omap2/board-3430sdp.c
@@ -41,9 +41,12 @@
41#include <plat/control.h> 41#include <plat/control.h>
42#include <plat/gpmc-smc91x.h> 42#include <plat/gpmc-smc91x.h>
43 43
44#include <mach/board-sdp.h>
45
44#include "mux.h" 46#include "mux.h"
45#include "sdram-qimonda-hyb18m512160af-6.h" 47#include "sdram-qimonda-hyb18m512160af-6.h"
46#include "mmc-twl4030.h" 48#include "hsmmc.h"
49#include "pm.h"
47 50
48#define CONFIG_DISABLE_HFCLK 1 51#define CONFIG_DISABLE_HFCLK 1
49 52
@@ -55,6 +58,24 @@
55 58
56#define TWL4030_MSECURE_GPIO 22 59#define TWL4030_MSECURE_GPIO 22
57 60
61/* FIXME: These values need to be updated based on more profiling on 3430sdp*/
62static struct cpuidle_params omap3_cpuidle_params_table[] = {
63 /* C1 */
64 {1, 2, 2, 5},
65 /* C2 */
66 {1, 10, 10, 30},
67 /* C3 */
68 {1, 50, 50, 300},
69 /* C4 */
70 {1, 1500, 1800, 4000},
71 /* C5 */
72 {1, 2500, 7500, 12000},
73 /* C6 */
74 {1, 3000, 8500, 15000},
75 /* C7 */
76 {1, 10000, 30000, 300000},
77};
78
58static int board_keymap[] = { 79static int board_keymap[] = {
59 KEY(0, 0, KEY_LEFT), 80 KEY(0, 0, KEY_LEFT),
60 KEY(0, 1, KEY_RIGHT), 81 KEY(0, 1, KEY_RIGHT),
@@ -305,6 +326,7 @@ static void __init omap_3430sdp_init_irq(void)
305{ 326{
306 omap_board_config = sdp3430_config; 327 omap_board_config = sdp3430_config;
307 omap_board_config_size = ARRAY_SIZE(sdp3430_config); 328 omap_board_config_size = ARRAY_SIZE(sdp3430_config);
329 omap3_pm_init_cpuidle(omap3_cpuidle_params_table);
308 omap2_init_common_hw(hyb18m512160af6_sdrc_params, NULL); 330 omap2_init_common_hw(hyb18m512160af6_sdrc_params, NULL);
309 omap_init_irq(); 331 omap_init_irq();
310 omap_gpio_init(); 332 omap_gpio_init();
@@ -326,7 +348,7 @@ static struct twl4030_bci_platform_data sdp3430_bci_data = {
326 .tblsize = ARRAY_SIZE(sdp3430_batt_table), 348 .tblsize = ARRAY_SIZE(sdp3430_batt_table),
327}; 349};
328 350
329static struct twl4030_hsmmc_info mmc[] = { 351static struct omap2_hsmmc_info mmc[] = {
330 { 352 {
331 .mmc = 1, 353 .mmc = 1,
332 /* 8 bits (default) requires S6.3 == ON, 354 /* 8 bits (default) requires S6.3 == ON,
@@ -363,7 +385,7 @@ static int sdp3430_twl_gpio_setup(struct device *dev,
363 */ 385 */
364 mmc[0].gpio_cd = gpio + 0; 386 mmc[0].gpio_cd = gpio + 0;
365 mmc[1].gpio_cd = gpio + 1; 387 mmc[1].gpio_cd = gpio + 1;
366 twl4030_mmc_init(mmc); 388 omap2_hsmmc_init(mmc);
367 389
368 /* link regulators to MMC adapters ... we "know" the 390 /* link regulators to MMC adapters ... we "know" the
369 * regulators will be set up only *after* we return. 391 * regulators will be set up only *after* we return.
@@ -650,6 +672,120 @@ static struct omap_board_mux board_mux[] __initdata = {
650#define board_mux NULL 672#define board_mux NULL
651#endif 673#endif
652 674
675static struct mtd_partition sdp_nor_partitions[] = {
676 /* bootloader (U-Boot, etc) in first sector */
677 {
678 .name = "Bootloader-NOR",
679 .offset = 0,
680 .size = SZ_256K,
681 .mask_flags = MTD_WRITEABLE, /* force read-only */
682 },
683 /* bootloader params in the next sector */
684 {
685 .name = "Params-NOR",
686 .offset = MTDPART_OFS_APPEND,
687 .size = SZ_256K,
688 .mask_flags = 0,
689 },
690 /* kernel */
691 {
692 .name = "Kernel-NOR",
693 .offset = MTDPART_OFS_APPEND,
694 .size = SZ_2M,
695 .mask_flags = 0
696 },
697 /* file system */
698 {
699 .name = "Filesystem-NOR",
700 .offset = MTDPART_OFS_APPEND,
701 .size = MTDPART_SIZ_FULL,
702 .mask_flags = 0
703 }
704};
705
706static struct mtd_partition sdp_onenand_partitions[] = {
707 {
708 .name = "X-Loader-OneNAND",
709 .offset = 0,
710 .size = 4 * (64 * 2048),
711 .mask_flags = MTD_WRITEABLE /* force read-only */
712 },
713 {
714 .name = "U-Boot-OneNAND",
715 .offset = MTDPART_OFS_APPEND,
716 .size = 2 * (64 * 2048),
717 .mask_flags = MTD_WRITEABLE /* force read-only */
718 },
719 {
720 .name = "U-Boot Environment-OneNAND",
721 .offset = MTDPART_OFS_APPEND,
722 .size = 1 * (64 * 2048),
723 },
724 {
725 .name = "Kernel-OneNAND",
726 .offset = MTDPART_OFS_APPEND,
727 .size = 16 * (64 * 2048),
728 },
729 {
730 .name = "File System-OneNAND",
731 .offset = MTDPART_OFS_APPEND,
732 .size = MTDPART_SIZ_FULL,
733 },
734};
735
736static struct mtd_partition sdp_nand_partitions[] = {
737 /* All the partition sizes are listed in terms of NAND block size */
738 {
739 .name = "X-Loader-NAND",
740 .offset = 0,
741 .size = 4 * (64 * 2048),
742 .mask_flags = MTD_WRITEABLE, /* force read-only */
743 },
744 {
745 .name = "U-Boot-NAND",
746 .offset = MTDPART_OFS_APPEND, /* Offset = 0x80000 */
747 .size = 10 * (64 * 2048),
748 .mask_flags = MTD_WRITEABLE, /* force read-only */
749 },
750 {
751 .name = "Boot Env-NAND",
752
753 .offset = MTDPART_OFS_APPEND, /* Offset = 0x1c0000 */
754 .size = 6 * (64 * 2048),
755 },
756 {
757 .name = "Kernel-NAND",
758 .offset = MTDPART_OFS_APPEND, /* Offset = 0x280000 */
759 .size = 40 * (64 * 2048),
760 },
761 {
762 .name = "File System - NAND",
763 .size = MTDPART_SIZ_FULL,
764 .offset = MTDPART_OFS_APPEND, /* Offset = 0x780000 */
765 },
766};
767
768static struct flash_partitions sdp_flash_partitions[] = {
769 {
770 .parts = sdp_nor_partitions,
771 .nr_parts = ARRAY_SIZE(sdp_nor_partitions),
772 },
773 {
774 .parts = sdp_onenand_partitions,
775 .nr_parts = ARRAY_SIZE(sdp_onenand_partitions),
776 },
777 {
778 .parts = sdp_nand_partitions,
779 .nr_parts = ARRAY_SIZE(sdp_nand_partitions),
780 },
781};
782
783static struct omap_musb_board_data musb_board_data = {
784 .interface_type = MUSB_INTERFACE_ULPI,
785 .mode = MUSB_OTG,
786 .power = 100,
787};
788
653static void __init omap_3430sdp_init(void) 789static void __init omap_3430sdp_init(void)
654{ 790{
655 omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); 791 omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
@@ -664,8 +800,9 @@ static void __init omap_3430sdp_init(void)
664 ARRAY_SIZE(sdp3430_spi_board_info)); 800 ARRAY_SIZE(sdp3430_spi_board_info));
665 ads7846_dev_init(); 801 ads7846_dev_init();
666 omap_serial_init(); 802 omap_serial_init();
667 usb_musb_init(); 803 usb_musb_init(&musb_board_data);
668 board_smc91x_init(); 804 board_smc91x_init();
805 sdp_flash_init(sdp_flash_partitions);
669 sdp3430_display_init(); 806 sdp3430_display_init();
670 enable_board_wakeup_source(); 807 enable_board_wakeup_source();
671 usb_ehci_init(&ehci_pdata); 808 usb_ehci_init(&ehci_pdata);
@@ -674,7 +811,7 @@ static void __init omap_3430sdp_init(void)
674static void __init omap_3430sdp_map_io(void) 811static void __init omap_3430sdp_map_io(void)
675{ 812{
676 omap2_set_globals_343x(); 813 omap2_set_globals_343x();
677 omap2_map_common_io(); 814 omap34xx_map_common_io();
678} 815}
679 816
680MACHINE_START(OMAP_3430SDP, "OMAP3430 3430SDP board") 817MACHINE_START(OMAP_3430SDP, "OMAP3430 3430SDP board")