setup.c (996de8c6fe95c5a9fc524241cc8f142ef0605d3d) | setup.c (2839bd61f671d3debf9ef0893a0470fd97b2e2ce) |
---|---|
1/* 2 * Copyright (C) 2009 Renesas Solutions Corp. 3 * 4 * Kuninori Morimoto <morimoto.kuninori@renesas.com> 5 * 6 * This file is subject to the terms and conditions of the GNU General Public 7 * License. See the file "COPYING" in the main directory of this archive 8 * for more details. --- 50 unchanged lines hidden (view full) --- 59 * DS2[5] = NTSC_OUT Clock ON : On board OSC 60 * OFF : SH7724 DV_CLK 61 * DS2[6-7] = MMC / SD ON-OFF : SD 62 * OFF-ON : MMC 63 */ 64 65/* Heartbeat */ 66static unsigned char led_pos[] = { 0, 1, 2, 3 }; | 1/* 2 * Copyright (C) 2009 Renesas Solutions Corp. 3 * 4 * Kuninori Morimoto <morimoto.kuninori@renesas.com> 5 * 6 * This file is subject to the terms and conditions of the GNU General Public 7 * License. See the file "COPYING" in the main directory of this archive 8 * for more details. --- 50 unchanged lines hidden (view full) --- 59 * DS2[5] = NTSC_OUT Clock ON : On board OSC 60 * OFF : SH7724 DV_CLK 61 * DS2[6-7] = MMC / SD ON-OFF : SD 62 * OFF-ON : MMC 63 */ 64 65/* Heartbeat */ 66static unsigned char led_pos[] = { 0, 1, 2, 3 }; |
67 |
|
67static struct heartbeat_data heartbeat_data = { | 68static struct heartbeat_data heartbeat_data = { |
68 .regsize = 8, | |
69 .nr_bits = 4, 70 .bit_pos = led_pos, 71}; 72 | 69 .nr_bits = 4, 70 .bit_pos = led_pos, 71}; 72 |
73static struct resource heartbeat_resources[] = { 74 [0] = { 75 .start = 0xA405012C, /* PTG */ 76 .end = 0xA405012E - 1, 77 .flags = IORESOURCE_MEM, 78 }, | 73static struct resource heartbeat_resource = { 74 .start = 0xA405012C, /* PTG */ 75 .end = 0xA405012E - 1, 76 .flags = IORESOURCE_MEM | IORESOURCE_MEM_8BIT, |
79}; 80 81static struct platform_device heartbeat_device = { 82 .name = "heartbeat", 83 .id = -1, 84 .dev = { 85 .platform_data = &heartbeat_data, 86 }, | 77}; 78 79static struct platform_device heartbeat_device = { 80 .name = "heartbeat", 81 .id = -1, 82 .dev = { 83 .platform_data = &heartbeat_data, 84 }, |
87 .num_resources = ARRAY_SIZE(heartbeat_resources), 88 .resource = heartbeat_resources, | 85 .num_resources = 1, 86 .resource = &heartbeat_resource, |
89}; 90 91/* MTD */ 92static struct mtd_partition nor_flash_partitions[] = { 93 { 94 .name = "boot loader", 95 .offset = 0, 96 .size = (5 * 1024 * 1024), --- 353 unchanged lines hidden (view full) --- 450static struct resource sdhi0_resources[] = { 451 [0] = { 452 .name = "SDHI0", 453 .start = 0x04ce0000, 454 .end = 0x04ce01ff, 455 .flags = IORESOURCE_MEM, 456 }, 457 [1] = { | 87}; 88 89/* MTD */ 90static struct mtd_partition nor_flash_partitions[] = { 91 { 92 .name = "boot loader", 93 .offset = 0, 94 .size = (5 * 1024 * 1024), --- 353 unchanged lines hidden (view full) --- 448static struct resource sdhi0_resources[] = { 449 [0] = { 450 .name = "SDHI0", 451 .start = 0x04ce0000, 452 .end = 0x04ce01ff, 453 .flags = IORESOURCE_MEM, 454 }, 455 [1] = { |
458 .start = 101, | 456 .start = 100, |
459 .flags = IORESOURCE_IRQ, 460 }, 461}; 462 463static struct platform_device sdhi0_device = { 464 .name = "sh_mobile_sdhi", 465 .num_resources = ARRAY_SIZE(sdhi0_resources), 466 .resource = sdhi0_resources, --- 19 unchanged lines hidden (view full) --- 486static struct resource sdhi1_resources[] = { 487 [0] = { 488 .name = "SDHI1", 489 .start = 0x04cf0000, 490 .end = 0x04cf01ff, 491 .flags = IORESOURCE_MEM, 492 }, 493 [1] = { | 457 .flags = IORESOURCE_IRQ, 458 }, 459}; 460 461static struct platform_device sdhi0_device = { 462 .name = "sh_mobile_sdhi", 463 .num_resources = ARRAY_SIZE(sdhi0_resources), 464 .resource = sdhi0_resources, --- 19 unchanged lines hidden (view full) --- 484static struct resource sdhi1_resources[] = { 485 [0] = { 486 .name = "SDHI1", 487 .start = 0x04cf0000, 488 .end = 0x04cf01ff, 489 .flags = IORESOURCE_MEM, 490 }, 491 [1] = { |
494 .start = 24, | 492 .start = 23, |
495 .flags = IORESOURCE_IRQ, 496 }, 497}; 498 499static struct platform_device sdhi1_device = { 500 .name = "sh_mobile_sdhi", 501 .num_resources = ARRAY_SIZE(sdhi1_resources), 502 .resource = sdhi1_resources, --- 190 unchanged lines hidden (view full) --- 693/* FSI */ 694/* 695 * FSI-B use external clock which came from da7210. 696 * So, we should change parent of fsi 697 */ 698#define FCLKBCR 0xa415000c 699static void fsimck_init(struct clk *clk) 700{ | 493 .flags = IORESOURCE_IRQ, 494 }, 495}; 496 497static struct platform_device sdhi1_device = { 498 .name = "sh_mobile_sdhi", 499 .num_resources = ARRAY_SIZE(sdhi1_resources), 500 .resource = sdhi1_resources, --- 190 unchanged lines hidden (view full) --- 691/* FSI */ 692/* 693 * FSI-B use external clock which came from da7210. 694 * So, we should change parent of fsi 695 */ 696#define FCLKBCR 0xa415000c 697static void fsimck_init(struct clk *clk) 698{ |
701 u32 status = ctrl_inl(clk->enable_reg); | 699 u32 status = __raw_readl(clk->enable_reg); |
702 703 /* use external clock */ 704 status &= ~0x000000ff; 705 status |= 0x00000080; 706 | 700 701 /* use external clock */ 702 status &= ~0x000000ff; 703 status |= 0x00000080; 704 |
707 ctrl_outl(status, clk->enable_reg); | 705 __raw_writel(status, clk->enable_reg); |
708} 709 710static struct clk_ops fsimck_clk_ops = { 711 .init = fsimck_init, 712}; 713 714static struct clk fsimckb_clk = { 715 .name = "fsimckb_clk", --- 32 unchanged lines hidden (view full) --- 748 .dev = { 749 .platform_data = &fsi_info, 750 }, 751 .archdata = { 752 .hwblk_id = HWBLK_SPU, /* FSI needs SPU hwblk */ 753 }, 754}; 755 | 706} 707 708static struct clk_ops fsimck_clk_ops = { 709 .init = fsimck_init, 710}; 711 712static struct clk fsimckb_clk = { 713 .name = "fsimckb_clk", --- 32 unchanged lines hidden (view full) --- 746 .dev = { 747 .platform_data = &fsi_info, 748 }, 749 .archdata = { 750 .hwblk_id = HWBLK_SPU, /* FSI needs SPU hwblk */ 751 }, 752}; 753 |
754/* IrDA */ 755static struct resource irda_resources[] = { 756 [0] = { 757 .name = "IrDA", 758 .start = 0xA45D0000, 759 .end = 0xA45D0049, 760 .flags = IORESOURCE_MEM, 761 }, 762 [1] = { 763 .start = 20, 764 .flags = IORESOURCE_IRQ, 765 }, 766}; 767 768static struct platform_device irda_device = { 769 .name = "sh_sir", 770 .num_resources = ARRAY_SIZE(irda_resources), 771 .resource = irda_resources, 772}; 773 |
|
756static struct platform_device *ecovec_devices[] __initdata = { 757 &heartbeat_device, 758 &nor_flash_device, 759 &sh_eth_device, 760 &usb0_host_device, 761 &usb1_common_device, 762 &lcdc_device, 763 &ceu0_device, --- 4 unchanged lines hidden (view full) --- 768 &sdhi1_device, 769#else 770 &msiof0_device, 771#endif 772 &camera_devices[0], 773 &camera_devices[1], 774 &camera_devices[2], 775 &fsi_device, | 774static struct platform_device *ecovec_devices[] __initdata = { 775 &heartbeat_device, 776 &nor_flash_device, 777 &sh_eth_device, 778 &usb0_host_device, 779 &usb1_common_device, 780 &lcdc_device, 781 &ceu0_device, --- 4 unchanged lines hidden (view full) --- 786 &sdhi1_device, 787#else 788 &msiof0_device, 789#endif 790 &camera_devices[0], 791 &camera_devices[1], 792 &camera_devices[2], 793 &fsi_device, |
794 &irda_device, |
|
776}; 777 778#define EEPROM_ADDR 0x50 779static u8 mac_read(struct i2c_adapter *a, u8 command) 780{ 781 struct i2c_msg msg[2]; 782 u8 buf; 783 int ret; --- 42 unchanged lines hidden (view full) --- 826extern char ecovec24_sdram_leave_start; 827extern char ecovec24_sdram_leave_end; 828 829static int __init arch_setup(void) 830{ 831 struct clk *clk; 832 833 /* register board specific self-refresh code */ | 795}; 796 797#define EEPROM_ADDR 0x50 798static u8 mac_read(struct i2c_adapter *a, u8 command) 799{ 800 struct i2c_msg msg[2]; 801 u8 buf; 802 int ret; --- 42 unchanged lines hidden (view full) --- 845extern char ecovec24_sdram_leave_start; 846extern char ecovec24_sdram_leave_end; 847 848static int __init arch_setup(void) 849{ 850 struct clk *clk; 851 852 /* register board specific self-refresh code */ |
834 sh_mobile_register_self_refresh(SUSP_SH_STANDBY | SUSP_SH_SF, | 853 sh_mobile_register_self_refresh(SUSP_SH_STANDBY | SUSP_SH_SF | 854 SUSP_SH_RSTANDBY, |
835 &ecovec24_sdram_enter_start, 836 &ecovec24_sdram_enter_end, 837 &ecovec24_sdram_leave_start, 838 &ecovec24_sdram_leave_end); 839 840 /* enable STATUS0, STATUS2 and PDSTATUS */ 841 gpio_request(GPIO_FN_STATUS0, NULL); 842 gpio_request(GPIO_FN_STATUS2, NULL); --- 7 unchanged lines hidden (view full) --- 850 gpio_request(GPIO_PTG0, NULL); 851 gpio_request(GPIO_PTG1, NULL); 852 gpio_request(GPIO_PTG2, NULL); 853 gpio_request(GPIO_PTG3, NULL); 854 gpio_direction_output(GPIO_PTG0, 0); 855 gpio_direction_output(GPIO_PTG1, 0); 856 gpio_direction_output(GPIO_PTG2, 0); 857 gpio_direction_output(GPIO_PTG3, 0); | 855 &ecovec24_sdram_enter_start, 856 &ecovec24_sdram_enter_end, 857 &ecovec24_sdram_leave_start, 858 &ecovec24_sdram_leave_end); 859 860 /* enable STATUS0, STATUS2 and PDSTATUS */ 861 gpio_request(GPIO_FN_STATUS0, NULL); 862 gpio_request(GPIO_FN_STATUS2, NULL); --- 7 unchanged lines hidden (view full) --- 870 gpio_request(GPIO_PTG0, NULL); 871 gpio_request(GPIO_PTG1, NULL); 872 gpio_request(GPIO_PTG2, NULL); 873 gpio_request(GPIO_PTG3, NULL); 874 gpio_direction_output(GPIO_PTG0, 0); 875 gpio_direction_output(GPIO_PTG1, 0); 876 gpio_direction_output(GPIO_PTG2, 0); 877 gpio_direction_output(GPIO_PTG3, 0); |
858 ctrl_outw((ctrl_inw(PORT_HIZA) & ~(0x1 << 1)) , PORT_HIZA); | 878 __raw_writew((__raw_readw(PORT_HIZA) & ~(0x1 << 1)) , PORT_HIZA); |
859 860 /* enable SH-Eth */ 861 gpio_request(GPIO_PTA1, NULL); 862 gpio_direction_output(GPIO_PTA1, 1); 863 mdelay(20); 864 865 gpio_request(GPIO_FN_RMII_RXD0, NULL); 866 gpio_request(GPIO_FN_RMII_RXD1, NULL); 867 gpio_request(GPIO_FN_RMII_TXD0, NULL); 868 gpio_request(GPIO_FN_RMII_TXD1, NULL); 869 gpio_request(GPIO_FN_RMII_REF_CLK, NULL); 870 gpio_request(GPIO_FN_RMII_TX_EN, NULL); 871 gpio_request(GPIO_FN_RMII_RX_ER, NULL); 872 gpio_request(GPIO_FN_RMII_CRS_DV, NULL); 873 gpio_request(GPIO_FN_MDIO, NULL); 874 gpio_request(GPIO_FN_MDC, NULL); 875 gpio_request(GPIO_FN_LNKSTA, NULL); 876 877 /* enable USB */ | 879 880 /* enable SH-Eth */ 881 gpio_request(GPIO_PTA1, NULL); 882 gpio_direction_output(GPIO_PTA1, 1); 883 mdelay(20); 884 885 gpio_request(GPIO_FN_RMII_RXD0, NULL); 886 gpio_request(GPIO_FN_RMII_RXD1, NULL); 887 gpio_request(GPIO_FN_RMII_TXD0, NULL); 888 gpio_request(GPIO_FN_RMII_TXD1, NULL); 889 gpio_request(GPIO_FN_RMII_REF_CLK, NULL); 890 gpio_request(GPIO_FN_RMII_TX_EN, NULL); 891 gpio_request(GPIO_FN_RMII_RX_ER, NULL); 892 gpio_request(GPIO_FN_RMII_CRS_DV, NULL); 893 gpio_request(GPIO_FN_MDIO, NULL); 894 gpio_request(GPIO_FN_MDC, NULL); 895 gpio_request(GPIO_FN_LNKSTA, NULL); 896 897 /* enable USB */ |
878 ctrl_outw(0x0000, 0xA4D80000); 879 ctrl_outw(0x0000, 0xA4D90000); | 898 __raw_writew(0x0000, 0xA4D80000); 899 __raw_writew(0x0000, 0xA4D90000); |
880 gpio_request(GPIO_PTB3, NULL); 881 gpio_request(GPIO_PTB4, NULL); 882 gpio_request(GPIO_PTB5, NULL); 883 gpio_direction_input(GPIO_PTB3); 884 gpio_direction_output(GPIO_PTB4, 0); 885 gpio_direction_output(GPIO_PTB5, 0); | 900 gpio_request(GPIO_PTB3, NULL); 901 gpio_request(GPIO_PTB4, NULL); 902 gpio_request(GPIO_PTB5, NULL); 903 gpio_direction_input(GPIO_PTB3); 904 gpio_direction_output(GPIO_PTB4, 0); 905 gpio_direction_output(GPIO_PTB5, 0); |
886 ctrl_outw(0x0600, 0xa40501d4); 887 ctrl_outw(0x0600, 0xa4050192); | 906 __raw_writew(0x0600, 0xa40501d4); 907 __raw_writew(0x0600, 0xa4050192); |
888 889 if (gpio_get_value(GPIO_PTB3)) { 890 printk(KERN_INFO "USB1 function is selected\n"); 891 usb1_common_device.name = "r8a66597_udc"; 892 } else { 893 printk(KERN_INFO "USB1 host is selected\n"); 894 usb1_common_device.name = "r8a66597_hcd"; 895 } --- 24 unchanged lines hidden (view full) --- 920 gpio_request(GPIO_FN_LCDD1, NULL); 921 gpio_request(GPIO_FN_LCDD0, NULL); 922 gpio_request(GPIO_FN_LCDDISP, NULL); 923 gpio_request(GPIO_FN_LCDHSYN, NULL); 924 gpio_request(GPIO_FN_LCDDCK, NULL); 925 gpio_request(GPIO_FN_LCDVSYN, NULL); 926 gpio_request(GPIO_FN_LCDDON, NULL); 927 gpio_request(GPIO_FN_LCDLCLK, NULL); | 908 909 if (gpio_get_value(GPIO_PTB3)) { 910 printk(KERN_INFO "USB1 function is selected\n"); 911 usb1_common_device.name = "r8a66597_udc"; 912 } else { 913 printk(KERN_INFO "USB1 host is selected\n"); 914 usb1_common_device.name = "r8a66597_hcd"; 915 } --- 24 unchanged lines hidden (view full) --- 940 gpio_request(GPIO_FN_LCDD1, NULL); 941 gpio_request(GPIO_FN_LCDD0, NULL); 942 gpio_request(GPIO_FN_LCDDISP, NULL); 943 gpio_request(GPIO_FN_LCDHSYN, NULL); 944 gpio_request(GPIO_FN_LCDDCK, NULL); 945 gpio_request(GPIO_FN_LCDVSYN, NULL); 946 gpio_request(GPIO_FN_LCDDON, NULL); 947 gpio_request(GPIO_FN_LCDLCLK, NULL); |
928 ctrl_outw((ctrl_inw(PORT_HIZA) & ~0x0001), PORT_HIZA); | 948 __raw_writew((__raw_readw(PORT_HIZA) & ~0x0001), PORT_HIZA); |
929 930 gpio_request(GPIO_PTE6, NULL); 931 gpio_request(GPIO_PTU1, NULL); 932 gpio_request(GPIO_PTR1, NULL); 933 gpio_request(GPIO_PTA2, NULL); 934 gpio_direction_input(GPIO_PTE6); 935 gpio_direction_output(GPIO_PTU1, 0); 936 gpio_direction_output(GPIO_PTR1, 0); 937 gpio_direction_output(GPIO_PTA2, 0); 938 939 /* I/O buffer drive ability is high */ | 949 950 gpio_request(GPIO_PTE6, NULL); 951 gpio_request(GPIO_PTU1, NULL); 952 gpio_request(GPIO_PTR1, NULL); 953 gpio_request(GPIO_PTA2, NULL); 954 gpio_direction_input(GPIO_PTE6); 955 gpio_direction_output(GPIO_PTU1, 0); 956 gpio_direction_output(GPIO_PTR1, 0); 957 gpio_direction_output(GPIO_PTA2, 0); 958 959 /* I/O buffer drive ability is high */ |
940 ctrl_outw((ctrl_inw(IODRIVEA) & ~0x00c0) | 0x0080 , IODRIVEA); | 960 __raw_writew((__raw_readw(IODRIVEA) & ~0x00c0) | 0x0080 , IODRIVEA); |
941 942 if (gpio_get_value(GPIO_PTE6)) { 943 /* DVI */ 944 lcdc_info.clock_source = LCDC_CLK_EXTERNAL; 945 lcdc_info.ch[0].clock_divider = 1, 946 lcdc_info.ch[0].lcd_cfg.name = "DVI"; 947 lcdc_info.ch[0].lcd_cfg.xres = 1280; 948 lcdc_info.ch[0].lcd_cfg.yres = 720; --- 115 unchanged lines hidden (view full) --- 1064 gpio_request(GPIO_FN_SDHI1D3, NULL); 1065 gpio_request(GPIO_FN_SDHI1D2, NULL); 1066 gpio_request(GPIO_FN_SDHI1D1, NULL); 1067 gpio_request(GPIO_FN_SDHI1D0, NULL); 1068 gpio_request(GPIO_PTB7, NULL); 1069 gpio_direction_output(GPIO_PTB7, 0); 1070 1071 /* I/O buffer drive ability is high for SDHI1 */ | 961 962 if (gpio_get_value(GPIO_PTE6)) { 963 /* DVI */ 964 lcdc_info.clock_source = LCDC_CLK_EXTERNAL; 965 lcdc_info.ch[0].clock_divider = 1, 966 lcdc_info.ch[0].lcd_cfg.name = "DVI"; 967 lcdc_info.ch[0].lcd_cfg.xres = 1280; 968 lcdc_info.ch[0].lcd_cfg.yres = 720; --- 115 unchanged lines hidden (view full) --- 1084 gpio_request(GPIO_FN_SDHI1D3, NULL); 1085 gpio_request(GPIO_FN_SDHI1D2, NULL); 1086 gpio_request(GPIO_FN_SDHI1D1, NULL); 1087 gpio_request(GPIO_FN_SDHI1D0, NULL); 1088 gpio_request(GPIO_PTB7, NULL); 1089 gpio_direction_output(GPIO_PTB7, 0); 1090 1091 /* I/O buffer drive ability is high for SDHI1 */ |
1072 ctrl_outw((ctrl_inw(IODRIVEA) & ~0x3000) | 0x2000 , IODRIVEA); | 1092 __raw_writew((__raw_readw(IODRIVEA) & ~0x3000) | 0x2000 , IODRIVEA); |
1073#else 1074 /* enable MSIOF0 on CN11 (needs DS2.4 set to OFF) */ 1075 gpio_request(GPIO_FN_MSIOF0_TXD, NULL); 1076 gpio_request(GPIO_FN_MSIOF0_RXD, NULL); 1077 gpio_request(GPIO_FN_MSIOF0_TSCK, NULL); 1078 gpio_request(GPIO_PTM4, NULL); /* software CS control of TSYNC pin */ 1079 gpio_direction_output(GPIO_PTM4, 1); /* active low CS */ 1080 gpio_request(GPIO_PTB6, NULL); /* 3.3V power control */ --- 21 unchanged lines hidden (view full) --- 1102 gpio_request(GPIO_FN_FSIIBSD, NULL); 1103 gpio_request(GPIO_FN_FSIOBSD, NULL); 1104 gpio_request(GPIO_FN_FSIIBBCK, NULL); 1105 gpio_request(GPIO_FN_FSIIBLRCK, NULL); 1106 gpio_request(GPIO_FN_FSIOBBCK, NULL); 1107 gpio_request(GPIO_FN_FSIOBLRCK, NULL); 1108 gpio_request(GPIO_FN_CLKAUDIOBO, NULL); 1109 | 1093#else 1094 /* enable MSIOF0 on CN11 (needs DS2.4 set to OFF) */ 1095 gpio_request(GPIO_FN_MSIOF0_TXD, NULL); 1096 gpio_request(GPIO_FN_MSIOF0_RXD, NULL); 1097 gpio_request(GPIO_FN_MSIOF0_TSCK, NULL); 1098 gpio_request(GPIO_PTM4, NULL); /* software CS control of TSYNC pin */ 1099 gpio_direction_output(GPIO_PTM4, 1); /* active low CS */ 1100 gpio_request(GPIO_PTB6, NULL); /* 3.3V power control */ --- 21 unchanged lines hidden (view full) --- 1122 gpio_request(GPIO_FN_FSIIBSD, NULL); 1123 gpio_request(GPIO_FN_FSIOBSD, NULL); 1124 gpio_request(GPIO_FN_FSIIBBCK, NULL); 1125 gpio_request(GPIO_FN_FSIIBLRCK, NULL); 1126 gpio_request(GPIO_FN_FSIOBBCK, NULL); 1127 gpio_request(GPIO_FN_FSIOBLRCK, NULL); 1128 gpio_request(GPIO_FN_CLKAUDIOBO, NULL); 1129 |
1130 /* set SPU2 clock to 83.4 MHz */ 1131 clk = clk_get(NULL, "spu_clk"); 1132 clk_set_rate(clk, clk_round_rate(clk, 83333333)); 1133 clk_put(clk); 1134 |
|
1110 /* change parent of FSI B */ 1111 clk = clk_get(NULL, "fsib_clk"); 1112 clk_register(&fsimckb_clk); 1113 clk_set_parent(clk, &fsimckb_clk); 1114 clk_set_rate(clk, 11000); 1115 clk_set_rate(&fsimckb_clk, 11000); 1116 clk_put(clk); 1117 1118 gpio_request(GPIO_PTU0, NULL); 1119 gpio_direction_output(GPIO_PTU0, 0); 1120 mdelay(20); 1121 1122 /* enable motion sensor */ 1123 gpio_request(GPIO_FN_INTC_IRQ1, NULL); 1124 gpio_direction_input(GPIO_FN_INTC_IRQ1); 1125 | 1135 /* change parent of FSI B */ 1136 clk = clk_get(NULL, "fsib_clk"); 1137 clk_register(&fsimckb_clk); 1138 clk_set_parent(clk, &fsimckb_clk); 1139 clk_set_rate(clk, 11000); 1140 clk_set_rate(&fsimckb_clk, 11000); 1141 clk_put(clk); 1142 1143 gpio_request(GPIO_PTU0, NULL); 1144 gpio_direction_output(GPIO_PTU0, 0); 1145 mdelay(20); 1146 1147 /* enable motion sensor */ 1148 gpio_request(GPIO_FN_INTC_IRQ1, NULL); 1149 gpio_direction_input(GPIO_FN_INTC_IRQ1); 1150 |
1151 /* set VPU clock to 166 MHz */ 1152 clk = clk_get(NULL, "vpu_clk"); 1153 clk_set_rate(clk, clk_round_rate(clk, 166000000)); 1154 clk_put(clk); 1155 1156 /* enable IrDA */ 1157 gpio_request(GPIO_FN_IRDA_OUT, NULL); 1158 gpio_request(GPIO_FN_IRDA_IN, NULL); 1159 gpio_request(GPIO_PTU5, NULL); 1160 gpio_direction_output(GPIO_PTU5, 0); 1161 |
|
1126 /* enable I2C device */ 1127 i2c_register_board_info(0, i2c0_devices, 1128 ARRAY_SIZE(i2c0_devices)); 1129 1130 i2c_register_board_info(1, i2c1_devices, 1131 ARRAY_SIZE(i2c1_devices)); 1132 1133 return platform_add_devices(ecovec_devices, --- 14 unchanged lines hidden --- | 1162 /* enable I2C device */ 1163 i2c_register_board_info(0, i2c0_devices, 1164 ARRAY_SIZE(i2c0_devices)); 1165 1166 i2c_register_board_info(1, i2c1_devices, 1167 ARRAY_SIZE(i2c1_devices)); 1168 1169 return platform_add_devices(ecovec_devices, --- 14 unchanged lines hidden --- |