diff options
Diffstat (limited to 'arch/arm/mach-shmobile')
-rw-r--r-- | arch/arm/mach-shmobile/board-ap4evb.c | 326 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/clock-sh7367.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/clock-sh7372.c | 78 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/clock-sh7377.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/include/mach/sh7372.h | 10 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/intc-sh7372.c | 28 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/pfc-sh7372.c | 8 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/setup-sh7367.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/setup-sh7372.c | 94 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/setup-sh7377.c | 1 |
10 files changed, 392 insertions, 158 deletions
diff --git a/arch/arm/mach-shmobile/board-ap4evb.c b/arch/arm/mach-shmobile/board-ap4evb.c index 22a2b44ddb7b..46ca4d4abf91 100644 --- a/arch/arm/mach-shmobile/board-ap4evb.c +++ b/arch/arm/mach-shmobile/board-ap4evb.c | |||
@@ -30,7 +30,6 @@ | |||
30 | #include <linux/mtd/mtd.h> | 30 | #include <linux/mtd/mtd.h> |
31 | #include <linux/mtd/partitions.h> | 31 | #include <linux/mtd/partitions.h> |
32 | #include <linux/mtd/physmap.h> | 32 | #include <linux/mtd/physmap.h> |
33 | #include <linux/mmc/host.h> | ||
34 | #include <linux/mmc/sh_mmcif.h> | 33 | #include <linux/mmc/sh_mmcif.h> |
35 | #include <linux/i2c.h> | 34 | #include <linux/i2c.h> |
36 | #include <linux/i2c/tsc2007.h> | 35 | #include <linux/i2c/tsc2007.h> |
@@ -44,6 +43,10 @@ | |||
44 | #include <linux/input/sh_keysc.h> | 43 | #include <linux/input/sh_keysc.h> |
45 | #include <linux/usb/r8a66597.h> | 44 | #include <linux/usb/r8a66597.h> |
46 | 45 | ||
46 | #include <media/sh_mobile_ceu.h> | ||
47 | #include <media/sh_mobile_csi2.h> | ||
48 | #include <media/soc_camera.h> | ||
49 | |||
47 | #include <sound/sh_fsi.h> | 50 | #include <sound/sh_fsi.h> |
48 | 51 | ||
49 | #include <video/sh_mobile_hdmi.h> | 52 | #include <video/sh_mobile_hdmi.h> |
@@ -250,7 +253,7 @@ static int slot_cn7_get_cd(struct platform_device *pdev) | |||
250 | /* SH_MMCIF */ | 253 | /* SH_MMCIF */ |
251 | static struct resource sh_mmcif_resources[] = { | 254 | static struct resource sh_mmcif_resources[] = { |
252 | [0] = { | 255 | [0] = { |
253 | .name = "SH_MMCIF", | 256 | .name = "MMCIF", |
254 | .start = 0xE6BD0000, | 257 | .start = 0xE6BD0000, |
255 | .end = 0xE6BD00FF, | 258 | .end = 0xE6BD00FF, |
256 | .flags = IORESOURCE_MEM, | 259 | .flags = IORESOURCE_MEM, |
@@ -390,10 +393,40 @@ static struct platform_device usb1_host_device = { | |||
390 | .resource = usb1_host_resources, | 393 | .resource = usb1_host_resources, |
391 | }; | 394 | }; |
392 | 395 | ||
396 | const static struct fb_videomode ap4evb_lcdc_modes[] = { | ||
397 | { | ||
398 | #ifdef CONFIG_AP4EVB_QHD | ||
399 | .name = "R63302(QHD)", | ||
400 | .xres = 544, | ||
401 | .yres = 961, | ||
402 | .left_margin = 72, | ||
403 | .right_margin = 600, | ||
404 | .hsync_len = 16, | ||
405 | .upper_margin = 8, | ||
406 | .lower_margin = 8, | ||
407 | .vsync_len = 2, | ||
408 | .sync = FB_SYNC_VERT_HIGH_ACT | FB_SYNC_HOR_HIGH_ACT, | ||
409 | #else | ||
410 | .name = "WVGA Panel", | ||
411 | .xres = 800, | ||
412 | .yres = 480, | ||
413 | .left_margin = 220, | ||
414 | .right_margin = 110, | ||
415 | .hsync_len = 70, | ||
416 | .upper_margin = 20, | ||
417 | .lower_margin = 5, | ||
418 | .vsync_len = 5, | ||
419 | .sync = 0, | ||
420 | #endif | ||
421 | }, | ||
422 | }; | ||
423 | |||
393 | static struct sh_mobile_lcdc_info lcdc_info = { | 424 | static struct sh_mobile_lcdc_info lcdc_info = { |
394 | .ch[0] = { | 425 | .ch[0] = { |
395 | .chan = LCDC_CHAN_MAINLCD, | 426 | .chan = LCDC_CHAN_MAINLCD, |
396 | .bpp = 16, | 427 | .bpp = 16, |
428 | .lcd_cfg = ap4evb_lcdc_modes, | ||
429 | .num_cfg = ARRAY_SIZE(ap4evb_lcdc_modes), | ||
397 | } | 430 | } |
398 | }; | 431 | }; |
399 | 432 | ||
@@ -532,27 +565,6 @@ static struct platform_device *qhd_devices[] __initdata = { | |||
532 | 565 | ||
533 | /* FSI */ | 566 | /* FSI */ |
534 | #define IRQ_FSI evt2irq(0x1840) | 567 | #define IRQ_FSI evt2irq(0x1840) |
535 | #define FSIACKCR 0xE6150018 | ||
536 | static void fsiackcr_init(struct clk *clk) | ||
537 | { | ||
538 | u32 status = __raw_readl(clk->enable_reg); | ||
539 | |||
540 | /* use external clock */ | ||
541 | status &= ~0x000000ff; | ||
542 | status |= 0x00000080; | ||
543 | __raw_writel(status, clk->enable_reg); | ||
544 | } | ||
545 | |||
546 | static struct clk_ops fsiackcr_clk_ops = { | ||
547 | .init = fsiackcr_init, | ||
548 | }; | ||
549 | |||
550 | static struct clk fsiackcr_clk = { | ||
551 | .ops = &fsiackcr_clk_ops, | ||
552 | .enable_reg = (void __iomem *)FSIACKCR, | ||
553 | .rate = 0, /* unknown */ | ||
554 | }; | ||
555 | |||
556 | static struct sh_fsi_platform_info fsi_info = { | 568 | static struct sh_fsi_platform_info fsi_info = { |
557 | .porta_flags = SH_FSI_BRS_INV | | 569 | .porta_flags = SH_FSI_BRS_INV | |
558 | SH_FSI_OUT_SLAVE_MODE | | 570 | SH_FSI_OUT_SLAVE_MODE | |
@@ -592,26 +604,6 @@ static struct sh_mobile_lcdc_info sh_mobile_lcdc1_info = { | |||
592 | .interface_type = RGB24, | 604 | .interface_type = RGB24, |
593 | .clock_divider = 1, | 605 | .clock_divider = 1, |
594 | .flags = LCDC_FLAGS_DWPOL, | 606 | .flags = LCDC_FLAGS_DWPOL, |
595 | .lcd_cfg = { | ||
596 | .name = "HDMI", | ||
597 | /* So far only 720p is supported */ | ||
598 | .xres = 1280, | ||
599 | .yres = 720, | ||
600 | /* | ||
601 | * If left and right margins are not multiples of 8, | ||
602 | * LDHAJR will be adjusted accordingly by the LCDC | ||
603 | * driver. Until we start using EDID, these values | ||
604 | * might have to be adjusted for different monitors. | ||
605 | */ | ||
606 | .left_margin = 200, | ||
607 | .right_margin = 88, | ||
608 | .hsync_len = 48, | ||
609 | .upper_margin = 20, | ||
610 | .lower_margin = 5, | ||
611 | .vsync_len = 5, | ||
612 | .pixclock = 13468, | ||
613 | .sync = FB_SYNC_VERT_HIGH_ACT | FB_SYNC_HOR_HIGH_ACT, | ||
614 | }, | ||
615 | } | 607 | } |
616 | }; | 608 | }; |
617 | 609 | ||
@@ -623,7 +615,7 @@ static struct resource lcdc1_resources[] = { | |||
623 | .flags = IORESOURCE_MEM, | 615 | .flags = IORESOURCE_MEM, |
624 | }, | 616 | }, |
625 | [1] = { | 617 | [1] = { |
626 | .start = intcs_evt2irq(0x17a0), | 618 | .start = intcs_evt2irq(0x1780), |
627 | .flags = IORESOURCE_IRQ, | 619 | .flags = IORESOURCE_IRQ, |
628 | }, | 620 | }, |
629 | }; | 621 | }; |
@@ -704,6 +696,95 @@ static struct platform_device leds_device = { | |||
704 | }, | 696 | }, |
705 | }; | 697 | }; |
706 | 698 | ||
699 | static struct i2c_board_info imx074_info = { | ||
700 | I2C_BOARD_INFO("imx074", 0x1a), | ||
701 | }; | ||
702 | |||
703 | struct soc_camera_link imx074_link = { | ||
704 | .bus_id = 0, | ||
705 | .board_info = &imx074_info, | ||
706 | .i2c_adapter_id = 0, | ||
707 | .module_name = "imx074", | ||
708 | }; | ||
709 | |||
710 | static struct platform_device ap4evb_camera = { | ||
711 | .name = "soc-camera-pdrv", | ||
712 | .id = 0, | ||
713 | .dev = { | ||
714 | .platform_data = &imx074_link, | ||
715 | }, | ||
716 | }; | ||
717 | |||
718 | static struct sh_csi2_client_config csi2_clients[] = { | ||
719 | { | ||
720 | .phy = SH_CSI2_PHY_MAIN, | ||
721 | .lanes = 3, | ||
722 | .channel = 0, | ||
723 | .pdev = &ap4evb_camera, | ||
724 | }, | ||
725 | }; | ||
726 | |||
727 | static struct sh_csi2_pdata csi2_info = { | ||
728 | .type = SH_CSI2C, | ||
729 | .clients = csi2_clients, | ||
730 | .num_clients = ARRAY_SIZE(csi2_clients), | ||
731 | .flags = SH_CSI2_ECC | SH_CSI2_CRC, | ||
732 | }; | ||
733 | |||
734 | static struct resource csi2_resources[] = { | ||
735 | [0] = { | ||
736 | .name = "CSI2", | ||
737 | .start = 0xffc90000, | ||
738 | .end = 0xffc90fff, | ||
739 | .flags = IORESOURCE_MEM, | ||
740 | }, | ||
741 | [1] = { | ||
742 | .start = intcs_evt2irq(0x17a0), | ||
743 | .flags = IORESOURCE_IRQ, | ||
744 | }, | ||
745 | }; | ||
746 | |||
747 | static struct platform_device csi2_device = { | ||
748 | .name = "sh-mobile-csi2", | ||
749 | .id = 0, | ||
750 | .num_resources = ARRAY_SIZE(csi2_resources), | ||
751 | .resource = csi2_resources, | ||
752 | .dev = { | ||
753 | .platform_data = &csi2_info, | ||
754 | }, | ||
755 | }; | ||
756 | |||
757 | static struct sh_mobile_ceu_info sh_mobile_ceu_info = { | ||
758 | .flags = SH_CEU_FLAG_USE_8BIT_BUS, | ||
759 | .csi2_dev = &csi2_device.dev, | ||
760 | }; | ||
761 | |||
762 | static struct resource ceu_resources[] = { | ||
763 | [0] = { | ||
764 | .name = "CEU", | ||
765 | .start = 0xfe910000, | ||
766 | .end = 0xfe91009f, | ||
767 | .flags = IORESOURCE_MEM, | ||
768 | }, | ||
769 | [1] = { | ||
770 | .start = intcs_evt2irq(0x880), | ||
771 | .flags = IORESOURCE_IRQ, | ||
772 | }, | ||
773 | [2] = { | ||
774 | /* place holder for contiguous memory */ | ||
775 | }, | ||
776 | }; | ||
777 | |||
778 | static struct platform_device ceu_device = { | ||
779 | .name = "sh_mobile_ceu", | ||
780 | .id = 0, /* "ceu0" clock */ | ||
781 | .num_resources = ARRAY_SIZE(ceu_resources), | ||
782 | .resource = ceu_resources, | ||
783 | .dev = { | ||
784 | .platform_data = &sh_mobile_ceu_info, | ||
785 | }, | ||
786 | }; | ||
787 | |||
707 | static struct platform_device *ap4evb_devices[] __initdata = { | 788 | static struct platform_device *ap4evb_devices[] __initdata = { |
708 | &leds_device, | 789 | &leds_device, |
709 | &nor_flash_device, | 790 | &nor_flash_device, |
@@ -716,6 +797,9 @@ static struct platform_device *ap4evb_devices[] __initdata = { | |||
716 | &lcdc1_device, | 797 | &lcdc1_device, |
717 | &lcdc_device, | 798 | &lcdc_device, |
718 | &hdmi_device, | 799 | &hdmi_device, |
800 | &csi2_device, | ||
801 | &ceu_device, | ||
802 | &ap4evb_camera, | ||
719 | }; | 803 | }; |
720 | 804 | ||
721 | static int __init hdmi_init_pm_clock(void) | 805 | static int __init hdmi_init_pm_clock(void) |
@@ -730,22 +814,22 @@ static int __init hdmi_init_pm_clock(void) | |||
730 | goto out; | 814 | goto out; |
731 | } | 815 | } |
732 | 816 | ||
733 | ret = clk_set_parent(&pllc2_clk, &dv_clki_div2_clk); | 817 | ret = clk_set_parent(&sh7372_pllc2_clk, &sh7372_dv_clki_div2_clk); |
734 | if (ret < 0) { | 818 | if (ret < 0) { |
735 | pr_err("Cannot set PLLC2 parent: %d, %d users\n", ret, pllc2_clk.usecount); | 819 | pr_err("Cannot set PLLC2 parent: %d, %d users\n", ret, sh7372_pllc2_clk.usecount); |
736 | goto out; | 820 | goto out; |
737 | } | 821 | } |
738 | 822 | ||
739 | pr_debug("PLLC2 initial frequency %lu\n", clk_get_rate(&pllc2_clk)); | 823 | pr_debug("PLLC2 initial frequency %lu\n", clk_get_rate(&sh7372_pllc2_clk)); |
740 | 824 | ||
741 | rate = clk_round_rate(&pllc2_clk, 594000000); | 825 | rate = clk_round_rate(&sh7372_pllc2_clk, 594000000); |
742 | if (rate < 0) { | 826 | if (rate < 0) { |
743 | pr_err("Cannot get suitable rate: %ld\n", rate); | 827 | pr_err("Cannot get suitable rate: %ld\n", rate); |
744 | ret = rate; | 828 | ret = rate; |
745 | goto out; | 829 | goto out; |
746 | } | 830 | } |
747 | 831 | ||
748 | ret = clk_set_rate(&pllc2_clk, rate); | 832 | ret = clk_set_rate(&sh7372_pllc2_clk, rate); |
749 | if (ret < 0) { | 833 | if (ret < 0) { |
750 | pr_err("Cannot set rate %ld: %d\n", rate, ret); | 834 | pr_err("Cannot set rate %ld: %d\n", rate, ret); |
751 | goto out; | 835 | goto out; |
@@ -753,7 +837,7 @@ static int __init hdmi_init_pm_clock(void) | |||
753 | 837 | ||
754 | pr_debug("PLLC2 set frequency %lu\n", rate); | 838 | pr_debug("PLLC2 set frequency %lu\n", rate); |
755 | 839 | ||
756 | ret = clk_set_parent(hdmi_ick, &pllc2_clk); | 840 | ret = clk_set_parent(hdmi_ick, &sh7372_pllc2_clk); |
757 | if (ret < 0) { | 841 | if (ret < 0) { |
758 | pr_err("Cannot set HDMI parent: %d\n", ret); | 842 | pr_err("Cannot set HDMI parent: %d\n", ret); |
759 | goto out; | 843 | goto out; |
@@ -767,11 +851,51 @@ out: | |||
767 | 851 | ||
768 | device_initcall(hdmi_init_pm_clock); | 852 | device_initcall(hdmi_init_pm_clock); |
769 | 853 | ||
854 | #define FSIACK_DUMMY_RATE 48000 | ||
855 | static int __init fsi_init_pm_clock(void) | ||
856 | { | ||
857 | struct clk *fsia_ick; | ||
858 | int ret; | ||
859 | |||
860 | /* | ||
861 | * FSIACK is connected to AK4642, | ||
862 | * and the rate is depend on playing sound rate. | ||
863 | * So, set dummy rate (= 48k) here | ||
864 | */ | ||
865 | ret = clk_set_rate(&sh7372_fsiack_clk, FSIACK_DUMMY_RATE); | ||
866 | if (ret < 0) { | ||
867 | pr_err("Cannot set FSIACK dummy rate: %d\n", ret); | ||
868 | return ret; | ||
869 | } | ||
870 | |||
871 | fsia_ick = clk_get(&fsi_device.dev, "icka"); | ||
872 | if (IS_ERR(fsia_ick)) { | ||
873 | ret = PTR_ERR(fsia_ick); | ||
874 | pr_err("Cannot get FSI ICK: %d\n", ret); | ||
875 | return ret; | ||
876 | } | ||
877 | |||
878 | ret = clk_set_parent(fsia_ick, &sh7372_fsiack_clk); | ||
879 | if (ret < 0) { | ||
880 | pr_err("Cannot set FSI-A parent: %d\n", ret); | ||
881 | goto out; | ||
882 | } | ||
883 | |||
884 | ret = clk_set_rate(fsia_ick, FSIACK_DUMMY_RATE); | ||
885 | if (ret < 0) | ||
886 | pr_err("Cannot set FSI-A rate: %d\n", ret); | ||
887 | |||
888 | out: | ||
889 | clk_put(fsia_ick); | ||
890 | |||
891 | return ret; | ||
892 | } | ||
893 | device_initcall(fsi_init_pm_clock); | ||
894 | |||
770 | /* | 895 | /* |
771 | * FIXME !! | 896 | * FIXME !! |
772 | * | 897 | * |
773 | * gpio_no_direction | 898 | * gpio_no_direction |
774 | * gpio_pull_up | ||
775 | * are quick_hack. | 899 | * are quick_hack. |
776 | * | 900 | * |
777 | * current gpio frame work doesn't have | 901 | * current gpio frame work doesn't have |
@@ -783,49 +907,37 @@ static void __init gpio_no_direction(u32 addr) | |||
783 | __raw_writeb(0x00, addr); | 907 | __raw_writeb(0x00, addr); |
784 | } | 908 | } |
785 | 909 | ||
786 | static void __init gpio_pull_up(u32 addr) | ||
787 | { | ||
788 | u8 data = __raw_readb(addr); | ||
789 | |||
790 | data &= 0x0F; | ||
791 | data |= 0xC0; | ||
792 | __raw_writeb(data, addr); | ||
793 | } | ||
794 | |||
795 | /* TouchScreen */ | 910 | /* TouchScreen */ |
911 | #ifdef CONFIG_AP4EVB_QHD | ||
912 | # define GPIO_TSC_IRQ GPIO_FN_IRQ28_123 | ||
913 | # define GPIO_TSC_PORT GPIO_PORT123 | ||
914 | #else /* WVGA */ | ||
915 | # define GPIO_TSC_IRQ GPIO_FN_IRQ7_40 | ||
916 | # define GPIO_TSC_PORT GPIO_PORT40 | ||
917 | #endif | ||
918 | |||
796 | #define IRQ28 evt2irq(0x3380) /* IRQ28A */ | 919 | #define IRQ28 evt2irq(0x3380) /* IRQ28A */ |
797 | #define IRQ7 evt2irq(0x02e0) /* IRQ7A */ | 920 | #define IRQ7 evt2irq(0x02e0) /* IRQ7A */ |
798 | static int ts_get_pendown_state(void) | 921 | static int ts_get_pendown_state(void) |
799 | { | 922 | { |
800 | int val1, val2; | 923 | int val; |
801 | 924 | ||
802 | gpio_free(GPIO_FN_IRQ28_123); | 925 | gpio_free(GPIO_TSC_IRQ); |
803 | gpio_free(GPIO_FN_IRQ7_40); | ||
804 | 926 | ||
805 | gpio_request(GPIO_PORT123, NULL); | 927 | gpio_request(GPIO_TSC_PORT, NULL); |
806 | gpio_request(GPIO_PORT40, NULL); | ||
807 | 928 | ||
808 | gpio_direction_input(GPIO_PORT123); | 929 | gpio_direction_input(GPIO_TSC_PORT); |
809 | gpio_direction_input(GPIO_PORT40); | ||
810 | 930 | ||
811 | val1 = gpio_get_value(GPIO_PORT123); | 931 | val = gpio_get_value(GPIO_TSC_PORT); |
812 | val2 = gpio_get_value(GPIO_PORT40); | ||
813 | 932 | ||
814 | gpio_request(GPIO_FN_IRQ28_123, NULL); /* for QHD */ | 933 | gpio_request(GPIO_TSC_IRQ, NULL); |
815 | gpio_request(GPIO_FN_IRQ7_40, NULL); /* for WVGA */ | ||
816 | 934 | ||
817 | return val1 ^ val2; | 935 | return !val; |
818 | } | 936 | } |
819 | 937 | ||
820 | #define PORT40CR 0xE6051028 | ||
821 | #define PORT123CR 0xE605007B | ||
822 | static int ts_init(void) | 938 | static int ts_init(void) |
823 | { | 939 | { |
824 | gpio_request(GPIO_FN_IRQ28_123, NULL); /* for QHD */ | 940 | gpio_request(GPIO_TSC_IRQ, NULL); |
825 | gpio_request(GPIO_FN_IRQ7_40, NULL); /* for WVGA */ | ||
826 | |||
827 | gpio_pull_up(PORT40CR); | ||
828 | gpio_pull_up(PORT123CR); | ||
829 | 941 | ||
830 | return 0; | 942 | return 0; |
831 | } | 943 | } |
@@ -974,14 +1086,6 @@ static void __init ap4evb_init(void) | |||
974 | clk_put(clk); | 1086 | clk_put(clk); |
975 | } | 1087 | } |
976 | 1088 | ||
977 | /* change parent of FSI A */ | ||
978 | clk = clk_get(NULL, "fsia_clk"); | ||
979 | if (!IS_ERR(clk)) { | ||
980 | clk_register(&fsiackcr_clk); | ||
981 | clk_set_parent(clk, &fsiackcr_clk); | ||
982 | clk_put(clk); | ||
983 | } | ||
984 | |||
985 | /* | 1089 | /* |
986 | * set irq priority, to avoid sound chopping | 1090 | * set irq priority, to avoid sound chopping |
987 | * when NFS rootfs is used | 1091 | * when NFS rootfs is used |
@@ -996,8 +1100,10 @@ static void __init ap4evb_init(void) | |||
996 | ARRAY_SIZE(i2c1_devices)); | 1100 | ARRAY_SIZE(i2c1_devices)); |
997 | 1101 | ||
998 | #ifdef CONFIG_AP4EVB_QHD | 1102 | #ifdef CONFIG_AP4EVB_QHD |
1103 | |||
999 | /* | 1104 | /* |
1000 | * QHD | 1105 | * For QHD Panel (MIPI-DSI, CONFIG_AP4EVB_QHD=y) and |
1106 | * IRQ28 for Touch Panel, set dip switches S3, S43 as OFF, ON. | ||
1001 | */ | 1107 | */ |
1002 | 1108 | ||
1003 | /* enable KEYSC */ | 1109 | /* enable KEYSC */ |
@@ -1023,17 +1129,6 @@ static void __init ap4evb_init(void) | |||
1023 | lcdc_info.ch[0].interface_type = RGB24; | 1129 | lcdc_info.ch[0].interface_type = RGB24; |
1024 | lcdc_info.ch[0].clock_divider = 1; | 1130 | lcdc_info.ch[0].clock_divider = 1; |
1025 | lcdc_info.ch[0].flags = LCDC_FLAGS_DWPOL; | 1131 | lcdc_info.ch[0].flags = LCDC_FLAGS_DWPOL; |
1026 | lcdc_info.ch[0].lcd_cfg.name = "R63302(QHD)"; | ||
1027 | lcdc_info.ch[0].lcd_cfg.xres = 544; | ||
1028 | lcdc_info.ch[0].lcd_cfg.yres = 961; | ||
1029 | lcdc_info.ch[0].lcd_cfg.left_margin = 72; | ||
1030 | lcdc_info.ch[0].lcd_cfg.right_margin = 600; | ||
1031 | lcdc_info.ch[0].lcd_cfg.hsync_len = 16; | ||
1032 | lcdc_info.ch[0].lcd_cfg.upper_margin = 8; | ||
1033 | lcdc_info.ch[0].lcd_cfg.lower_margin = 8; | ||
1034 | lcdc_info.ch[0].lcd_cfg.vsync_len = 2; | ||
1035 | lcdc_info.ch[0].lcd_cfg.sync = FB_SYNC_VERT_HIGH_ACT | | ||
1036 | FB_SYNC_HOR_HIGH_ACT; | ||
1037 | lcdc_info.ch[0].lcd_size_cfg.width = 44; | 1132 | lcdc_info.ch[0].lcd_size_cfg.width = 44; |
1038 | lcdc_info.ch[0].lcd_size_cfg.height = 79; | 1133 | lcdc_info.ch[0].lcd_size_cfg.height = 79; |
1039 | 1134 | ||
@@ -1041,8 +1136,10 @@ static void __init ap4evb_init(void) | |||
1041 | 1136 | ||
1042 | #else | 1137 | #else |
1043 | /* | 1138 | /* |
1044 | * WVGA | 1139 | * For WVGA Panel (18-bit RGB, CONFIG_AP4EVB_WVGA=y) and |
1140 | * IRQ7 for Touch Panel, set dip switches S3, S43 to ON, OFF. | ||
1045 | */ | 1141 | */ |
1142 | |||
1046 | gpio_request(GPIO_FN_LCDD17, NULL); | 1143 | gpio_request(GPIO_FN_LCDD17, NULL); |
1047 | gpio_request(GPIO_FN_LCDD16, NULL); | 1144 | gpio_request(GPIO_FN_LCDD16, NULL); |
1048 | gpio_request(GPIO_FN_LCDD15, NULL); | 1145 | gpio_request(GPIO_FN_LCDD15, NULL); |
@@ -1074,16 +1171,6 @@ static void __init ap4evb_init(void) | |||
1074 | lcdc_info.ch[0].interface_type = RGB18; | 1171 | lcdc_info.ch[0].interface_type = RGB18; |
1075 | lcdc_info.ch[0].clock_divider = 2; | 1172 | lcdc_info.ch[0].clock_divider = 2; |
1076 | lcdc_info.ch[0].flags = 0; | 1173 | lcdc_info.ch[0].flags = 0; |
1077 | lcdc_info.ch[0].lcd_cfg.name = "WVGA Panel"; | ||
1078 | lcdc_info.ch[0].lcd_cfg.xres = 800; | ||
1079 | lcdc_info.ch[0].lcd_cfg.yres = 480; | ||
1080 | lcdc_info.ch[0].lcd_cfg.left_margin = 220; | ||
1081 | lcdc_info.ch[0].lcd_cfg.right_margin = 110; | ||
1082 | lcdc_info.ch[0].lcd_cfg.hsync_len = 70; | ||
1083 | lcdc_info.ch[0].lcd_cfg.upper_margin = 20; | ||
1084 | lcdc_info.ch[0].lcd_cfg.lower_margin = 5; | ||
1085 | lcdc_info.ch[0].lcd_cfg.vsync_len = 5; | ||
1086 | lcdc_info.ch[0].lcd_cfg.sync = 0; | ||
1087 | lcdc_info.ch[0].lcd_size_cfg.width = 152; | 1174 | lcdc_info.ch[0].lcd_size_cfg.width = 152; |
1088 | lcdc_info.ch[0].lcd_size_cfg.height = 91; | 1175 | lcdc_info.ch[0].lcd_size_cfg.height = 91; |
1089 | 1176 | ||
@@ -1094,6 +1181,23 @@ static void __init ap4evb_init(void) | |||
1094 | i2c_register_board_info(0, &tsc_device, 1); | 1181 | i2c_register_board_info(0, &tsc_device, 1); |
1095 | #endif /* CONFIG_AP4EVB_QHD */ | 1182 | #endif /* CONFIG_AP4EVB_QHD */ |
1096 | 1183 | ||
1184 | /* CEU */ | ||
1185 | |||
1186 | /* | ||
1187 | * TODO: reserve memory for V4L2 DMA buffers, when a suitable API | ||
1188 | * becomes available | ||
1189 | */ | ||
1190 | |||
1191 | /* MIPI-CSI stuff */ | ||
1192 | gpio_request(GPIO_FN_VIO_CKO, NULL); | ||
1193 | |||
1194 | clk = clk_get(NULL, "vck1_clk"); | ||
1195 | if (!IS_ERR(clk)) { | ||
1196 | clk_set_rate(clk, clk_round_rate(clk, 13000000)); | ||
1197 | clk_enable(clk); | ||
1198 | clk_put(clk); | ||
1199 | } | ||
1200 | |||
1097 | sh7372_add_standard_devices(); | 1201 | sh7372_add_standard_devices(); |
1098 | 1202 | ||
1099 | /* HDMI */ | 1203 | /* HDMI */ |
@@ -1116,7 +1220,7 @@ static void __init ap4evb_timer_init(void) | |||
1116 | shmobile_timer.init(); | 1220 | shmobile_timer.init(); |
1117 | 1221 | ||
1118 | /* External clock source */ | 1222 | /* External clock source */ |
1119 | clk_set_rate(&dv_clki_clk, 27000000); | 1223 | clk_set_rate(&sh7372_dv_clki_clk, 27000000); |
1120 | } | 1224 | } |
1121 | 1225 | ||
1122 | static struct sys_timer ap4evb_timer = { | 1226 | static struct sys_timer ap4evb_timer = { |
diff --git a/arch/arm/mach-shmobile/clock-sh7367.c b/arch/arm/mach-shmobile/clock-sh7367.c index b6454c9f2abb..9f78729098f2 100644 --- a/arch/arm/mach-shmobile/clock-sh7367.c +++ b/arch/arm/mach-shmobile/clock-sh7367.c | |||
@@ -321,7 +321,7 @@ static struct clk_lookup lookups[] = { | |||
321 | CLKDEV_DEV_ID("sh-sci.3", &mstp_clks[SYMSTP001]), /* SCIFA3 */ | 321 | CLKDEV_DEV_ID("sh-sci.3", &mstp_clks[SYMSTP001]), /* SCIFA3 */ |
322 | CLKDEV_DEV_ID("sh-sci.4", &mstp_clks[SYMSTP000]), /* SCIFA4 */ | 322 | CLKDEV_DEV_ID("sh-sci.4", &mstp_clks[SYMSTP000]), /* SCIFA4 */ |
323 | CLKDEV_DEV_ID("sh_siu", &mstp_clks[SYMSTP231]), /* SIU */ | 323 | CLKDEV_DEV_ID("sh_siu", &mstp_clks[SYMSTP231]), /* SIU */ |
324 | CLKDEV_CON_ID("cmt1", &mstp_clks[SYMSTP229]), /* CMT10 */ | 324 | CLKDEV_DEV_ID("sh_cmt.10", &mstp_clks[SYMSTP229]), /* CMT10 */ |
325 | CLKDEV_DEV_ID("sh_irda", &mstp_clks[SYMSTP225]), /* IRDA */ | 325 | CLKDEV_DEV_ID("sh_irda", &mstp_clks[SYMSTP225]), /* IRDA */ |
326 | CLKDEV_DEV_ID("i2c-sh_mobile.1", &mstp_clks[SYMSTP223]), /* IIC1 */ | 326 | CLKDEV_DEV_ID("i2c-sh_mobile.1", &mstp_clks[SYMSTP223]), /* IIC1 */ |
327 | CLKDEV_DEV_ID("r8a66597_hcd.0", &mstp_clks[SYMSTP222]), /* USBHS */ | 327 | CLKDEV_DEV_ID("r8a66597_hcd.0", &mstp_clks[SYMSTP222]), /* USBHS */ |
diff --git a/arch/arm/mach-shmobile/clock-sh7372.c b/arch/arm/mach-shmobile/clock-sh7372.c index 759468992ad2..8565aefa21fd 100644 --- a/arch/arm/mach-shmobile/clock-sh7372.c +++ b/arch/arm/mach-shmobile/clock-sh7372.c | |||
@@ -51,7 +51,7 @@ | |||
51 | #define SMSTPCR4 0xe6150140 | 51 | #define SMSTPCR4 0xe6150140 |
52 | 52 | ||
53 | /* Platforms must set frequency on their DV_CLKI pin */ | 53 | /* Platforms must set frequency on their DV_CLKI pin */ |
54 | struct clk dv_clki_clk = { | 54 | struct clk sh7372_dv_clki_clk = { |
55 | }; | 55 | }; |
56 | 56 | ||
57 | /* Fixed 32 KHz root clock from EXTALR pin */ | 57 | /* Fixed 32 KHz root clock from EXTALR pin */ |
@@ -86,9 +86,9 @@ static struct clk_ops div2_clk_ops = { | |||
86 | }; | 86 | }; |
87 | 87 | ||
88 | /* Divide dv_clki by two */ | 88 | /* Divide dv_clki by two */ |
89 | struct clk dv_clki_div2_clk = { | 89 | struct clk sh7372_dv_clki_div2_clk = { |
90 | .ops = &div2_clk_ops, | 90 | .ops = &div2_clk_ops, |
91 | .parent = &dv_clki_clk, | 91 | .parent = &sh7372_dv_clki_clk, |
92 | }; | 92 | }; |
93 | 93 | ||
94 | /* Divide extal1 by two */ | 94 | /* Divide extal1 by two */ |
@@ -150,7 +150,7 @@ static struct clk pllc1_div2_clk = { | |||
150 | static struct clk *pllc2_parent[] = { | 150 | static struct clk *pllc2_parent[] = { |
151 | [0] = &extal1_div2_clk, | 151 | [0] = &extal1_div2_clk, |
152 | [1] = &extal2_div2_clk, | 152 | [1] = &extal2_div2_clk, |
153 | [2] = &dv_clki_div2_clk, | 153 | [2] = &sh7372_dv_clki_div2_clk, |
154 | }; | 154 | }; |
155 | 155 | ||
156 | /* Only multipliers 20 * 2 to 46 * 2 are valid, last entry for CPUFREQ_TABLE_END */ | 156 | /* Only multipliers 20 * 2 to 46 * 2 are valid, last entry for CPUFREQ_TABLE_END */ |
@@ -284,7 +284,7 @@ static struct clk_ops pllc2_clk_ops = { | |||
284 | .set_parent = pllc2_set_parent, | 284 | .set_parent = pllc2_set_parent, |
285 | }; | 285 | }; |
286 | 286 | ||
287 | struct clk pllc2_clk = { | 287 | struct clk sh7372_pllc2_clk = { |
288 | .ops = &pllc2_clk_ops, | 288 | .ops = &pllc2_clk_ops, |
289 | .parent = &extal1_div2_clk, | 289 | .parent = &extal1_div2_clk, |
290 | .freq_table = pllc2_freq_table, | 290 | .freq_table = pllc2_freq_table, |
@@ -292,19 +292,28 @@ struct clk pllc2_clk = { | |||
292 | .parent_num = ARRAY_SIZE(pllc2_parent), | 292 | .parent_num = ARRAY_SIZE(pllc2_parent), |
293 | }; | 293 | }; |
294 | 294 | ||
295 | /* External input clock (pin name: FSIACK/FSIBCK ) */ | ||
296 | struct clk sh7372_fsiack_clk = { | ||
297 | }; | ||
298 | |||
299 | struct clk sh7372_fsibck_clk = { | ||
300 | }; | ||
301 | |||
295 | static struct clk *main_clks[] = { | 302 | static struct clk *main_clks[] = { |
296 | &dv_clki_clk, | 303 | &sh7372_dv_clki_clk, |
297 | &r_clk, | 304 | &r_clk, |
298 | &sh7372_extal1_clk, | 305 | &sh7372_extal1_clk, |
299 | &sh7372_extal2_clk, | 306 | &sh7372_extal2_clk, |
300 | &dv_clki_div2_clk, | 307 | &sh7372_dv_clki_div2_clk, |
301 | &extal1_div2_clk, | 308 | &extal1_div2_clk, |
302 | &extal2_div2_clk, | 309 | &extal2_div2_clk, |
303 | &extal2_div4_clk, | 310 | &extal2_div4_clk, |
304 | &pllc0_clk, | 311 | &pllc0_clk, |
305 | &pllc1_clk, | 312 | &pllc1_clk, |
306 | &pllc1_div2_clk, | 313 | &pllc1_div2_clk, |
307 | &pllc2_clk, | 314 | &sh7372_pllc2_clk, |
315 | &sh7372_fsiack_clk, | ||
316 | &sh7372_fsibck_clk, | ||
308 | }; | 317 | }; |
309 | 318 | ||
310 | static void div4_kick(struct clk *clk) | 319 | static void div4_kick(struct clk *clk) |
@@ -357,7 +366,7 @@ static struct clk div4_clks[DIV4_NR] = { | |||
357 | }; | 366 | }; |
358 | 367 | ||
359 | enum { DIV6_VCK1, DIV6_VCK2, DIV6_VCK3, DIV6_FMSI, DIV6_FMSO, | 368 | enum { DIV6_VCK1, DIV6_VCK2, DIV6_VCK3, DIV6_FMSI, DIV6_FMSO, |
360 | DIV6_FSIA, DIV6_FSIB, DIV6_SUB, DIV6_SPU, | 369 | DIV6_SUB, DIV6_SPU, |
361 | DIV6_VOU, DIV6_DSIT, DIV6_DSI0P, DIV6_DSI1P, | 370 | DIV6_VOU, DIV6_DSIT, DIV6_DSI0P, DIV6_DSI1P, |
362 | DIV6_NR }; | 371 | DIV6_NR }; |
363 | 372 | ||
@@ -367,8 +376,6 @@ static struct clk div6_clks[DIV6_NR] = { | |||
367 | [DIV6_VCK3] = SH_CLK_DIV6(&pllc1_div2_clk, VCLKCR3, 0), | 376 | [DIV6_VCK3] = SH_CLK_DIV6(&pllc1_div2_clk, VCLKCR3, 0), |
368 | [DIV6_FMSI] = SH_CLK_DIV6(&pllc1_div2_clk, FMSICKCR, 0), | 377 | [DIV6_FMSI] = SH_CLK_DIV6(&pllc1_div2_clk, FMSICKCR, 0), |
369 | [DIV6_FMSO] = SH_CLK_DIV6(&pllc1_div2_clk, FMSOCKCR, 0), | 378 | [DIV6_FMSO] = SH_CLK_DIV6(&pllc1_div2_clk, FMSOCKCR, 0), |
370 | [DIV6_FSIA] = SH_CLK_DIV6(&pllc1_div2_clk, FSIACKCR, 0), | ||
371 | [DIV6_FSIB] = SH_CLK_DIV6(&pllc1_div2_clk, FSIBCKCR, 0), | ||
372 | [DIV6_SUB] = SH_CLK_DIV6(&sh7372_extal2_clk, SUBCKCR, 0), | 379 | [DIV6_SUB] = SH_CLK_DIV6(&sh7372_extal2_clk, SUBCKCR, 0), |
373 | [DIV6_SPU] = SH_CLK_DIV6(&pllc1_div2_clk, SPUCKCR, 0), | 380 | [DIV6_SPU] = SH_CLK_DIV6(&pllc1_div2_clk, SPUCKCR, 0), |
374 | [DIV6_VOU] = SH_CLK_DIV6(&pllc1_div2_clk, VOUCKCR, 0), | 381 | [DIV6_VOU] = SH_CLK_DIV6(&pllc1_div2_clk, VOUCKCR, 0), |
@@ -377,24 +384,42 @@ static struct clk div6_clks[DIV6_NR] = { | |||
377 | [DIV6_DSI1P] = SH_CLK_DIV6(&pllc1_div2_clk, DSI1PCKCR, 0), | 384 | [DIV6_DSI1P] = SH_CLK_DIV6(&pllc1_div2_clk, DSI1PCKCR, 0), |
378 | }; | 385 | }; |
379 | 386 | ||
380 | enum { DIV6_HDMI, DIV6_REPARENT_NR }; | 387 | enum { DIV6_HDMI, DIV6_FSIA, DIV6_FSIB, DIV6_REPARENT_NR }; |
381 | 388 | ||
382 | /* Indices are important - they are the actual src selecting values */ | 389 | /* Indices are important - they are the actual src selecting values */ |
383 | static struct clk *hdmi_parent[] = { | 390 | static struct clk *hdmi_parent[] = { |
384 | [0] = &pllc1_div2_clk, | 391 | [0] = &pllc1_div2_clk, |
385 | [1] = &pllc2_clk, | 392 | [1] = &sh7372_pllc2_clk, |
386 | [2] = &dv_clki_clk, | 393 | [2] = &sh7372_dv_clki_clk, |
387 | [3] = NULL, /* pllc2_div4 not implemented yet */ | 394 | [3] = NULL, /* pllc2_div4 not implemented yet */ |
388 | }; | 395 | }; |
389 | 396 | ||
397 | static struct clk *fsiackcr_parent[] = { | ||
398 | [0] = &pllc1_div2_clk, | ||
399 | [1] = &sh7372_pllc2_clk, | ||
400 | [2] = &sh7372_fsiack_clk, /* external input for FSI A */ | ||
401 | [3] = NULL, /* setting prohibited */ | ||
402 | }; | ||
403 | |||
404 | static struct clk *fsibckcr_parent[] = { | ||
405 | [0] = &pllc1_div2_clk, | ||
406 | [1] = &sh7372_pllc2_clk, | ||
407 | [2] = &sh7372_fsibck_clk, /* external input for FSI B */ | ||
408 | [3] = NULL, /* setting prohibited */ | ||
409 | }; | ||
410 | |||
390 | static struct clk div6_reparent_clks[DIV6_REPARENT_NR] = { | 411 | static struct clk div6_reparent_clks[DIV6_REPARENT_NR] = { |
391 | [DIV6_HDMI] = SH_CLK_DIV6_EXT(&pllc1_div2_clk, HDMICKCR, 0, | 412 | [DIV6_HDMI] = SH_CLK_DIV6_EXT(&pllc1_div2_clk, HDMICKCR, 0, |
392 | hdmi_parent, ARRAY_SIZE(hdmi_parent), 6, 2), | 413 | hdmi_parent, ARRAY_SIZE(hdmi_parent), 6, 2), |
414 | [DIV6_FSIA] = SH_CLK_DIV6_EXT(&pllc1_div2_clk, FSIACKCR, 0, | ||
415 | fsiackcr_parent, ARRAY_SIZE(fsiackcr_parent), 6, 2), | ||
416 | [DIV6_FSIB] = SH_CLK_DIV6_EXT(&pllc1_div2_clk, FSIBCKCR, 0, | ||
417 | fsibckcr_parent, ARRAY_SIZE(fsibckcr_parent), 6, 2), | ||
393 | }; | 418 | }; |
394 | 419 | ||
395 | enum { MSTP001, | 420 | enum { MSTP001, |
396 | MSTP131, MSTP130, | 421 | MSTP131, MSTP130, |
397 | MSTP129, MSTP128, MSTP127, MSTP126, | 422 | MSTP129, MSTP128, MSTP127, MSTP126, MSTP125, |
398 | MSTP118, MSTP117, MSTP116, | 423 | MSTP118, MSTP117, MSTP116, |
399 | MSTP106, MSTP101, MSTP100, | 424 | MSTP106, MSTP101, MSTP100, |
400 | MSTP223, | 425 | MSTP223, |
@@ -414,6 +439,7 @@ static struct clk mstp_clks[MSTP_NR] = { | |||
414 | [MSTP128] = MSTP(&div4_clks[DIV4_B], SMSTPCR1, 28, 0), /* VEU0 */ | 439 | [MSTP128] = MSTP(&div4_clks[DIV4_B], SMSTPCR1, 28, 0), /* VEU0 */ |
415 | [MSTP127] = MSTP(&div4_clks[DIV4_B], SMSTPCR1, 27, 0), /* CEU */ | 440 | [MSTP127] = MSTP(&div4_clks[DIV4_B], SMSTPCR1, 27, 0), /* CEU */ |
416 | [MSTP126] = MSTP(&div4_clks[DIV4_B], SMSTPCR1, 26, 0), /* CSI2 */ | 441 | [MSTP126] = MSTP(&div4_clks[DIV4_B], SMSTPCR1, 26, 0), /* CSI2 */ |
442 | [MSTP125] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR1, 25, 0), /* TMU0 */ | ||
417 | [MSTP118] = MSTP(&div4_clks[DIV4_B], SMSTPCR1, 18, 0), /* DSITX */ | 443 | [MSTP118] = MSTP(&div4_clks[DIV4_B], SMSTPCR1, 18, 0), /* DSITX */ |
418 | [MSTP117] = MSTP(&div4_clks[DIV4_B], SMSTPCR1, 17, 0), /* LCDC1 */ | 444 | [MSTP117] = MSTP(&div4_clks[DIV4_B], SMSTPCR1, 17, 0), /* LCDC1 */ |
419 | [MSTP116] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR1, 16, 0), /* IIC0 */ | 445 | [MSTP116] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR1, 16, 0), /* IIC0 */ |
@@ -429,7 +455,7 @@ static struct clk mstp_clks[MSTP_NR] = { | |||
429 | [MSTP201] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 1, 0), /* SCIFA3 */ | 455 | [MSTP201] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 1, 0), /* SCIFA3 */ |
430 | [MSTP200] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 0, 0), /* SCIFA4 */ | 456 | [MSTP200] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 0, 0), /* SCIFA4 */ |
431 | [MSTP329] = MSTP(&r_clk, SMSTPCR3, 29, 0), /* CMT10 */ | 457 | [MSTP329] = MSTP(&r_clk, SMSTPCR3, 29, 0), /* CMT10 */ |
432 | [MSTP328] = MSTP(&div6_clks[DIV6_SPU], SMSTPCR3, 28, 0), /* FSIA */ | 458 | [MSTP328] = MSTP(&div6_clks[DIV6_SPU], SMSTPCR3, 28, 0), /* FSI2 */ |
433 | [MSTP323] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR3, 23, 0), /* IIC1 */ | 459 | [MSTP323] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR3, 23, 0), /* IIC1 */ |
434 | [MSTP322] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR3, 22, 0), /* USB0 */ | 460 | [MSTP322] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR3, 22, 0), /* USB0 */ |
435 | [MSTP314] = MSTP(&div4_clks[DIV4_HP], SMSTPCR3, 14, 0), /* SDHI0 */ | 461 | [MSTP314] = MSTP(&div4_clks[DIV4_HP], SMSTPCR3, 14, 0), /* SDHI0 */ |
@@ -445,10 +471,11 @@ static struct clk mstp_clks[MSTP_NR] = { | |||
445 | 471 | ||
446 | #define CLKDEV_CON_ID(_id, _clk) { .con_id = _id, .clk = _clk } | 472 | #define CLKDEV_CON_ID(_id, _clk) { .con_id = _id, .clk = _clk } |
447 | #define CLKDEV_DEV_ID(_id, _clk) { .dev_id = _id, .clk = _clk } | 473 | #define CLKDEV_DEV_ID(_id, _clk) { .dev_id = _id, .clk = _clk } |
474 | #define CLKDEV_ICK_ID(_cid, _did, _clk) { .con_id = _cid, .dev_id = _did, .clk = _clk } | ||
448 | 475 | ||
449 | static struct clk_lookup lookups[] = { | 476 | static struct clk_lookup lookups[] = { |
450 | /* main clocks */ | 477 | /* main clocks */ |
451 | CLKDEV_CON_ID("dv_clki_div2_clk", &dv_clki_div2_clk), | 478 | CLKDEV_CON_ID("dv_clki_div2_clk", &sh7372_dv_clki_div2_clk), |
452 | CLKDEV_CON_ID("r_clk", &r_clk), | 479 | CLKDEV_CON_ID("r_clk", &r_clk), |
453 | CLKDEV_CON_ID("extal1", &sh7372_extal1_clk), | 480 | CLKDEV_CON_ID("extal1", &sh7372_extal1_clk), |
454 | CLKDEV_CON_ID("extal2", &sh7372_extal2_clk), | 481 | CLKDEV_CON_ID("extal2", &sh7372_extal2_clk), |
@@ -458,7 +485,7 @@ static struct clk_lookup lookups[] = { | |||
458 | CLKDEV_CON_ID("pllc0_clk", &pllc0_clk), | 485 | CLKDEV_CON_ID("pllc0_clk", &pllc0_clk), |
459 | CLKDEV_CON_ID("pllc1_clk", &pllc1_clk), | 486 | CLKDEV_CON_ID("pllc1_clk", &pllc1_clk), |
460 | CLKDEV_CON_ID("pllc1_div2_clk", &pllc1_div2_clk), | 487 | CLKDEV_CON_ID("pllc1_div2_clk", &pllc1_div2_clk), |
461 | CLKDEV_CON_ID("pllc2_clk", &pllc2_clk), | 488 | CLKDEV_CON_ID("pllc2_clk", &sh7372_pllc2_clk), |
462 | 489 | ||
463 | /* DIV4 clocks */ | 490 | /* DIV4 clocks */ |
464 | CLKDEV_CON_ID("i_clk", &div4_clks[DIV4_I]), | 491 | CLKDEV_CON_ID("i_clk", &div4_clks[DIV4_I]), |
@@ -483,8 +510,8 @@ static struct clk_lookup lookups[] = { | |||
483 | CLKDEV_CON_ID("vck3_clk", &div6_clks[DIV6_VCK3]), | 510 | CLKDEV_CON_ID("vck3_clk", &div6_clks[DIV6_VCK3]), |
484 | CLKDEV_CON_ID("fmsi_clk", &div6_clks[DIV6_FMSI]), | 511 | CLKDEV_CON_ID("fmsi_clk", &div6_clks[DIV6_FMSI]), |
485 | CLKDEV_CON_ID("fmso_clk", &div6_clks[DIV6_FMSO]), | 512 | CLKDEV_CON_ID("fmso_clk", &div6_clks[DIV6_FMSO]), |
486 | CLKDEV_CON_ID("fsia_clk", &div6_clks[DIV6_FSIA]), | 513 | CLKDEV_CON_ID("fsia_clk", &div6_reparent_clks[DIV6_FSIA]), |
487 | CLKDEV_CON_ID("fsib_clk", &div6_clks[DIV6_FSIB]), | 514 | CLKDEV_CON_ID("fsib_clk", &div6_reparent_clks[DIV6_FSIB]), |
488 | CLKDEV_CON_ID("sub_clk", &div6_clks[DIV6_SUB]), | 515 | CLKDEV_CON_ID("sub_clk", &div6_clks[DIV6_SUB]), |
489 | CLKDEV_CON_ID("spu_clk", &div6_clks[DIV6_SPU]), | 516 | CLKDEV_CON_ID("spu_clk", &div6_clks[DIV6_SPU]), |
490 | CLKDEV_CON_ID("vou_clk", &div6_clks[DIV6_VOU]), | 517 | CLKDEV_CON_ID("vou_clk", &div6_clks[DIV6_VOU]), |
@@ -501,6 +528,8 @@ static struct clk_lookup lookups[] = { | |||
501 | CLKDEV_DEV_ID("uio_pdrv_genirq.1", &mstp_clks[MSTP128]), /* VEU0 */ | 528 | CLKDEV_DEV_ID("uio_pdrv_genirq.1", &mstp_clks[MSTP128]), /* VEU0 */ |
502 | CLKDEV_DEV_ID("sh_mobile_ceu.0", &mstp_clks[MSTP127]), /* CEU */ | 529 | CLKDEV_DEV_ID("sh_mobile_ceu.0", &mstp_clks[MSTP127]), /* CEU */ |
503 | CLKDEV_DEV_ID("sh-mobile-csi2.0", &mstp_clks[MSTP126]), /* CSI2 */ | 530 | CLKDEV_DEV_ID("sh-mobile-csi2.0", &mstp_clks[MSTP126]), /* CSI2 */ |
531 | CLKDEV_DEV_ID("sh_tmu.0", &mstp_clks[MSTP125]), /* TMU00 */ | ||
532 | CLKDEV_DEV_ID("sh_tmu.1", &mstp_clks[MSTP125]), /* TMU01 */ | ||
504 | CLKDEV_DEV_ID("sh-mipi-dsi.0", &mstp_clks[MSTP118]), /* DSITX */ | 533 | CLKDEV_DEV_ID("sh-mipi-dsi.0", &mstp_clks[MSTP118]), /* DSITX */ |
505 | CLKDEV_DEV_ID("sh_mobile_lcdc_fb.1", &mstp_clks[MSTP117]), /* LCDC1 */ | 534 | CLKDEV_DEV_ID("sh_mobile_lcdc_fb.1", &mstp_clks[MSTP117]), /* LCDC1 */ |
506 | CLKDEV_DEV_ID("i2c-sh_mobile.0", &mstp_clks[MSTP116]), /* IIC0 */ | 535 | CLKDEV_DEV_ID("i2c-sh_mobile.0", &mstp_clks[MSTP116]), /* IIC0 */ |
@@ -516,7 +545,7 @@ static struct clk_lookup lookups[] = { | |||
516 | CLKDEV_DEV_ID("sh-sci.2", &mstp_clks[MSTP202]), /* SCIFA2 */ | 545 | CLKDEV_DEV_ID("sh-sci.2", &mstp_clks[MSTP202]), /* SCIFA2 */ |
517 | CLKDEV_DEV_ID("sh-sci.3", &mstp_clks[MSTP201]), /* SCIFA3 */ | 546 | CLKDEV_DEV_ID("sh-sci.3", &mstp_clks[MSTP201]), /* SCIFA3 */ |
518 | CLKDEV_DEV_ID("sh-sci.4", &mstp_clks[MSTP200]), /* SCIFA4 */ | 547 | CLKDEV_DEV_ID("sh-sci.4", &mstp_clks[MSTP200]), /* SCIFA4 */ |
519 | CLKDEV_CON_ID("cmt1", &mstp_clks[MSTP329]), /* CMT10 */ | 548 | CLKDEV_DEV_ID("sh_cmt.10", &mstp_clks[MSTP329]), /* CMT10 */ |
520 | CLKDEV_DEV_ID("sh_fsi2", &mstp_clks[MSTP328]), /* FSI2 */ | 549 | CLKDEV_DEV_ID("sh_fsi2", &mstp_clks[MSTP328]), /* FSI2 */ |
521 | CLKDEV_DEV_ID("i2c-sh_mobile.1", &mstp_clks[MSTP323]), /* IIC1 */ | 550 | CLKDEV_DEV_ID("i2c-sh_mobile.1", &mstp_clks[MSTP323]), /* IIC1 */ |
522 | CLKDEV_DEV_ID("r8a66597_hcd.0", &mstp_clks[MSTP323]), /* USB0 */ | 551 | CLKDEV_DEV_ID("r8a66597_hcd.0", &mstp_clks[MSTP323]), /* USB0 */ |
@@ -531,7 +560,10 @@ static struct clk_lookup lookups[] = { | |||
531 | CLKDEV_DEV_ID("r8a66597_hcd.1", &mstp_clks[MSTP406]), /* USB1 */ | 560 | CLKDEV_DEV_ID("r8a66597_hcd.1", &mstp_clks[MSTP406]), /* USB1 */ |
532 | CLKDEV_DEV_ID("r8a66597_udc.1", &mstp_clks[MSTP406]), /* USB1 */ | 561 | CLKDEV_DEV_ID("r8a66597_udc.1", &mstp_clks[MSTP406]), /* USB1 */ |
533 | CLKDEV_DEV_ID("sh_keysc.0", &mstp_clks[MSTP403]), /* KEYSC */ | 562 | CLKDEV_DEV_ID("sh_keysc.0", &mstp_clks[MSTP403]), /* KEYSC */ |
534 | {.con_id = "ick", .dev_id = "sh-mobile-hdmi", .clk = &div6_reparent_clks[DIV6_HDMI]}, | 563 | |
564 | CLKDEV_ICK_ID("ick", "sh-mobile-hdmi", &div6_reparent_clks[DIV6_HDMI]), | ||
565 | CLKDEV_ICK_ID("icka", "sh_fsi2", &div6_reparent_clks[DIV6_FSIA]), | ||
566 | CLKDEV_ICK_ID("ickb", "sh_fsi2", &div6_reparent_clks[DIV6_FSIB]), | ||
535 | }; | 567 | }; |
536 | 568 | ||
537 | void __init sh7372_clock_init(void) | 569 | void __init sh7372_clock_init(void) |
@@ -548,7 +580,7 @@ void __init sh7372_clock_init(void) | |||
548 | ret = sh_clk_div6_register(div6_clks, DIV6_NR); | 580 | ret = sh_clk_div6_register(div6_clks, DIV6_NR); |
549 | 581 | ||
550 | if (!ret) | 582 | if (!ret) |
551 | ret = sh_clk_div6_reparent_register(div6_reparent_clks, DIV6_NR); | 583 | ret = sh_clk_div6_reparent_register(div6_reparent_clks, DIV6_REPARENT_NR); |
552 | 584 | ||
553 | if (!ret) | 585 | if (!ret) |
554 | ret = sh_clk_mstp32_register(mstp_clks, MSTP_NR); | 586 | ret = sh_clk_mstp32_register(mstp_clks, MSTP_NR); |
diff --git a/arch/arm/mach-shmobile/clock-sh7377.c b/arch/arm/mach-shmobile/clock-sh7377.c index e007c28cf0a8..f91395aeb9ab 100644 --- a/arch/arm/mach-shmobile/clock-sh7377.c +++ b/arch/arm/mach-shmobile/clock-sh7377.c | |||
@@ -333,7 +333,7 @@ static struct clk_lookup lookups[] = { | |||
333 | CLKDEV_DEV_ID("sh-sci.3", &mstp_clks[MSTP201]), /* SCIFA3 */ | 333 | CLKDEV_DEV_ID("sh-sci.3", &mstp_clks[MSTP201]), /* SCIFA3 */ |
334 | CLKDEV_DEV_ID("sh-sci.4", &mstp_clks[MSTP200]), /* SCIFA4 */ | 334 | CLKDEV_DEV_ID("sh-sci.4", &mstp_clks[MSTP200]), /* SCIFA4 */ |
335 | CLKDEV_DEV_ID("sh-sci.6", &mstp_clks[MSTP331]), /* SCIFA6 */ | 335 | CLKDEV_DEV_ID("sh-sci.6", &mstp_clks[MSTP331]), /* SCIFA6 */ |
336 | CLKDEV_CON_ID("cmt1", &mstp_clks[MSTP329]), /* CMT10 */ | 336 | CLKDEV_DEV_ID("sh_cmt.10", &mstp_clks[MSTP329]), /* CMT10 */ |
337 | CLKDEV_DEV_ID("sh_irda", &mstp_clks[MSTP325]), /* IRDA */ | 337 | CLKDEV_DEV_ID("sh_irda", &mstp_clks[MSTP325]), /* IRDA */ |
338 | CLKDEV_DEV_ID("i2c-sh_mobile.1", &mstp_clks[MSTP323]), /* IIC1 */ | 338 | CLKDEV_DEV_ID("i2c-sh_mobile.1", &mstp_clks[MSTP323]), /* IIC1 */ |
339 | CLKDEV_DEV_ID("r8a66597_hcd.0", &mstp_clks[MSTP322]), /* USBHS */ | 339 | CLKDEV_DEV_ID("r8a66597_hcd.0", &mstp_clks[MSTP322]), /* USBHS */ |
diff --git a/arch/arm/mach-shmobile/include/mach/sh7372.h b/arch/arm/mach-shmobile/include/mach/sh7372.h index 33e9700ded7e..147775a94bce 100644 --- a/arch/arm/mach-shmobile/include/mach/sh7372.h +++ b/arch/arm/mach-shmobile/include/mach/sh7372.h | |||
@@ -457,8 +457,12 @@ enum { | |||
457 | SHDMA_SLAVE_SDHI2_TX, | 457 | SHDMA_SLAVE_SDHI2_TX, |
458 | }; | 458 | }; |
459 | 459 | ||
460 | extern struct clk dv_clki_clk; | 460 | extern struct clk sh7372_extal1_clk; |
461 | extern struct clk dv_clki_div2_clk; | 461 | extern struct clk sh7372_extal2_clk; |
462 | extern struct clk pllc2_clk; | 462 | extern struct clk sh7372_dv_clki_clk; |
463 | extern struct clk sh7372_dv_clki_div2_clk; | ||
464 | extern struct clk sh7372_pllc2_clk; | ||
465 | extern struct clk sh7372_fsiack_clk; | ||
466 | extern struct clk sh7372_fsibck_clk; | ||
463 | 467 | ||
464 | #endif /* __ASM_SH7372_H__ */ | 468 | #endif /* __ASM_SH7372_H__ */ |
diff --git a/arch/arm/mach-shmobile/intc-sh7372.c b/arch/arm/mach-shmobile/intc-sh7372.c index e3551b56cd03..4cd3cae38e72 100644 --- a/arch/arm/mach-shmobile/intc-sh7372.c +++ b/arch/arm/mach-shmobile/intc-sh7372.c | |||
@@ -369,9 +369,13 @@ enum { | |||
369 | INTCS, | 369 | INTCS, |
370 | 370 | ||
371 | /* interrupt sources INTCS */ | 371 | /* interrupt sources INTCS */ |
372 | |||
373 | /* IRQ0S - IRQ31S */ | ||
372 | VEU_VEU0, VEU_VEU1, VEU_VEU2, VEU_VEU3, | 374 | VEU_VEU0, VEU_VEU1, VEU_VEU2, VEU_VEU3, |
373 | RTDMAC_1_DEI0, RTDMAC_1_DEI1, RTDMAC_1_DEI2, RTDMAC_1_DEI3, | 375 | RTDMAC_1_DEI0, RTDMAC_1_DEI1, RTDMAC_1_DEI2, RTDMAC_1_DEI3, |
374 | CEU, BEU_BEU0, BEU_BEU1, BEU_BEU2, | 376 | CEU, BEU_BEU0, BEU_BEU1, BEU_BEU2, |
377 | /* MFI */ | ||
378 | /* BBIF2 */ | ||
375 | VPU, | 379 | VPU, |
376 | TSIF1, | 380 | TSIF1, |
377 | _3DG_SGX530, | 381 | _3DG_SGX530, |
@@ -379,13 +383,17 @@ enum { | |||
379 | IIC2_ALI2, IIC2_TACKI2, IIC2_WAITI2, IIC2_DTEI2, | 383 | IIC2_ALI2, IIC2_TACKI2, IIC2_WAITI2, IIC2_DTEI2, |
380 | IPMMU_IPMMUR, IPMMU_IPMMUR2, | 384 | IPMMU_IPMMUR, IPMMU_IPMMUR2, |
381 | RTDMAC_2_DEI4, RTDMAC_2_DEI5, RTDMAC_2_DADERR, | 385 | RTDMAC_2_DEI4, RTDMAC_2_DEI5, RTDMAC_2_DADERR, |
386 | /* KEYSC */ | ||
387 | /* TTI20 */ | ||
382 | MSIOF, | 388 | MSIOF, |
383 | IIC0_ALI0, IIC0_TACKI0, IIC0_WAITI0, IIC0_DTEI0, | 389 | IIC0_ALI0, IIC0_TACKI0, IIC0_WAITI0, IIC0_DTEI0, |
384 | TMU_TUNI0, TMU_TUNI1, TMU_TUNI2, | 390 | TMU_TUNI0, TMU_TUNI1, TMU_TUNI2, |
385 | CMT0, | 391 | CMT0, |
386 | TSIF0, | 392 | TSIF0, |
393 | /* CMT2 */ | ||
387 | LMB, | 394 | LMB, |
388 | CTI, | 395 | CTI, |
396 | /* RWDT0 */ | ||
389 | ICB, | 397 | ICB, |
390 | JPU_JPEG, | 398 | JPU_JPEG, |
391 | LCDC, | 399 | LCDC, |
@@ -397,11 +405,17 @@ enum { | |||
397 | CSIRX, | 405 | CSIRX, |
398 | DSITX_DSITX0, | 406 | DSITX_DSITX0, |
399 | DSITX_DSITX1, | 407 | DSITX_DSITX1, |
408 | /* SPU2 */ | ||
409 | /* FSI */ | ||
410 | /* FMSI */ | ||
411 | /* HDMI */ | ||
400 | TMU1_TUNI0, TMU1_TUNI1, TMU1_TUNI2, | 412 | TMU1_TUNI0, TMU1_TUNI1, TMU1_TUNI2, |
401 | CMT4, | 413 | CMT4, |
402 | DSITX1_DSITX1_0, | 414 | DSITX1_DSITX1_0, |
403 | DSITX1_DSITX1_1, | 415 | DSITX1_DSITX1_1, |
416 | /* MFIS2 */ | ||
404 | CPORTS2R, | 417 | CPORTS2R, |
418 | /* CEC */ | ||
405 | JPU6E, | 419 | JPU6E, |
406 | 420 | ||
407 | /* interrupt groups INTCS */ | 421 | /* interrupt groups INTCS */ |
@@ -410,12 +424,15 @@ enum { | |||
410 | }; | 424 | }; |
411 | 425 | ||
412 | static struct intc_vect intcs_vectors[] = { | 426 | static struct intc_vect intcs_vectors[] = { |
427 | /* IRQ0S - IRQ31S */ | ||
413 | INTCS_VECT(VEU_VEU0, 0x700), INTCS_VECT(VEU_VEU1, 0x720), | 428 | INTCS_VECT(VEU_VEU0, 0x700), INTCS_VECT(VEU_VEU1, 0x720), |
414 | INTCS_VECT(VEU_VEU2, 0x740), INTCS_VECT(VEU_VEU3, 0x760), | 429 | INTCS_VECT(VEU_VEU2, 0x740), INTCS_VECT(VEU_VEU3, 0x760), |
415 | INTCS_VECT(RTDMAC_1_DEI0, 0x800), INTCS_VECT(RTDMAC_1_DEI1, 0x820), | 430 | INTCS_VECT(RTDMAC_1_DEI0, 0x800), INTCS_VECT(RTDMAC_1_DEI1, 0x820), |
416 | INTCS_VECT(RTDMAC_1_DEI2, 0x840), INTCS_VECT(RTDMAC_1_DEI3, 0x860), | 431 | INTCS_VECT(RTDMAC_1_DEI2, 0x840), INTCS_VECT(RTDMAC_1_DEI3, 0x860), |
417 | INTCS_VECT(CEU, 0x880), INTCS_VECT(BEU_BEU0, 0x8a0), | 432 | INTCS_VECT(CEU, 0x880), INTCS_VECT(BEU_BEU0, 0x8a0), |
418 | INTCS_VECT(BEU_BEU1, 0x8c0), INTCS_VECT(BEU_BEU2, 0x8e0), | 433 | INTCS_VECT(BEU_BEU1, 0x8c0), INTCS_VECT(BEU_BEU2, 0x8e0), |
434 | /* MFI */ | ||
435 | /* BBIF2 */ | ||
419 | INTCS_VECT(VPU, 0x980), | 436 | INTCS_VECT(VPU, 0x980), |
420 | INTCS_VECT(TSIF1, 0x9a0), | 437 | INTCS_VECT(TSIF1, 0x9a0), |
421 | INTCS_VECT(_3DG_SGX530, 0x9e0), | 438 | INTCS_VECT(_3DG_SGX530, 0x9e0), |
@@ -425,14 +442,19 @@ static struct intc_vect intcs_vectors[] = { | |||
425 | INTCS_VECT(IPMMU_IPMMUR, 0xb00), INTCS_VECT(IPMMU_IPMMUR2, 0xb20), | 442 | INTCS_VECT(IPMMU_IPMMUR, 0xb00), INTCS_VECT(IPMMU_IPMMUR2, 0xb20), |
426 | INTCS_VECT(RTDMAC_2_DEI4, 0xb80), INTCS_VECT(RTDMAC_2_DEI5, 0xba0), | 443 | INTCS_VECT(RTDMAC_2_DEI4, 0xb80), INTCS_VECT(RTDMAC_2_DEI5, 0xba0), |
427 | INTCS_VECT(RTDMAC_2_DADERR, 0xbc0), | 444 | INTCS_VECT(RTDMAC_2_DADERR, 0xbc0), |
445 | /* KEYSC */ | ||
446 | /* TTI20 */ | ||
447 | INTCS_VECT(MSIOF, 0x0d20), | ||
428 | INTCS_VECT(IIC0_ALI0, 0xe00), INTCS_VECT(IIC0_TACKI0, 0xe20), | 448 | INTCS_VECT(IIC0_ALI0, 0xe00), INTCS_VECT(IIC0_TACKI0, 0xe20), |
429 | INTCS_VECT(IIC0_WAITI0, 0xe40), INTCS_VECT(IIC0_DTEI0, 0xe60), | 449 | INTCS_VECT(IIC0_WAITI0, 0xe40), INTCS_VECT(IIC0_DTEI0, 0xe60), |
430 | INTCS_VECT(TMU_TUNI0, 0xe80), INTCS_VECT(TMU_TUNI1, 0xea0), | 450 | INTCS_VECT(TMU_TUNI0, 0xe80), INTCS_VECT(TMU_TUNI1, 0xea0), |
431 | INTCS_VECT(TMU_TUNI2, 0xec0), | 451 | INTCS_VECT(TMU_TUNI2, 0xec0), |
432 | INTCS_VECT(CMT0, 0xf00), | 452 | INTCS_VECT(CMT0, 0xf00), |
433 | INTCS_VECT(TSIF0, 0xf20), | 453 | INTCS_VECT(TSIF0, 0xf20), |
454 | /* CMT2 */ | ||
434 | INTCS_VECT(LMB, 0xf60), | 455 | INTCS_VECT(LMB, 0xf60), |
435 | INTCS_VECT(CTI, 0x400), | 456 | INTCS_VECT(CTI, 0x400), |
457 | /* RWDT0 */ | ||
436 | INTCS_VECT(ICB, 0x480), | 458 | INTCS_VECT(ICB, 0x480), |
437 | INTCS_VECT(JPU_JPEG, 0x560), | 459 | INTCS_VECT(JPU_JPEG, 0x560), |
438 | INTCS_VECT(LCDC, 0x580), | 460 | INTCS_VECT(LCDC, 0x580), |
@@ -446,12 +468,18 @@ static struct intc_vect intcs_vectors[] = { | |||
446 | INTCS_VECT(CSIRX, 0x17a0), | 468 | INTCS_VECT(CSIRX, 0x17a0), |
447 | INTCS_VECT(DSITX_DSITX0, 0x17c0), | 469 | INTCS_VECT(DSITX_DSITX0, 0x17c0), |
448 | INTCS_VECT(DSITX_DSITX1, 0x17e0), | 470 | INTCS_VECT(DSITX_DSITX1, 0x17e0), |
471 | /* SPU2 */ | ||
472 | /* FSI */ | ||
473 | /* FMSI */ | ||
474 | /* HDMI */ | ||
449 | INTCS_VECT(TMU1_TUNI0, 0x1900), INTCS_VECT(TMU1_TUNI1, 0x1920), | 475 | INTCS_VECT(TMU1_TUNI0, 0x1900), INTCS_VECT(TMU1_TUNI1, 0x1920), |
450 | INTCS_VECT(TMU1_TUNI2, 0x1940), | 476 | INTCS_VECT(TMU1_TUNI2, 0x1940), |
451 | INTCS_VECT(CMT4, 0x1980), | 477 | INTCS_VECT(CMT4, 0x1980), |
452 | INTCS_VECT(DSITX1_DSITX1_0, 0x19a0), | 478 | INTCS_VECT(DSITX1_DSITX1_0, 0x19a0), |
453 | INTCS_VECT(DSITX1_DSITX1_1, 0x19c0), | 479 | INTCS_VECT(DSITX1_DSITX1_1, 0x19c0), |
480 | /* MFIS2 */ | ||
454 | INTCS_VECT(CPORTS2R, 0x1a20), | 481 | INTCS_VECT(CPORTS2R, 0x1a20), |
482 | /* CEC */ | ||
455 | INTCS_VECT(JPU6E, 0x1a80), | 483 | INTCS_VECT(JPU6E, 0x1a80), |
456 | 484 | ||
457 | INTC_VECT(INTCS, 0xf80), | 485 | INTC_VECT(INTCS, 0xf80), |
diff --git a/arch/arm/mach-shmobile/pfc-sh7372.c b/arch/arm/mach-shmobile/pfc-sh7372.c index ec420353f8e3..9c265dae138a 100644 --- a/arch/arm/mach-shmobile/pfc-sh7372.c +++ b/arch/arm/mach-shmobile/pfc-sh7372.c | |||
@@ -166,12 +166,12 @@ enum { | |||
166 | MSIOF2_TSYNC_MARK, MSIOF2_TSCK_MARK, MSIOF2_RXD_MARK, | 166 | MSIOF2_TSYNC_MARK, MSIOF2_TSCK_MARK, MSIOF2_RXD_MARK, |
167 | MSIOF2_TXD_MARK, | 167 | MSIOF2_TXD_MARK, |
168 | 168 | ||
169 | /* MSIOF3 */ | 169 | /* BBIF1 */ |
170 | BBIF1_RXD_MARK, BBIF1_TSYNC_MARK, BBIF1_TSCK_MARK, | 170 | BBIF1_RXD_MARK, BBIF1_TSYNC_MARK, BBIF1_TSCK_MARK, |
171 | BBIF1_TXD_MARK, BBIF1_RSCK_MARK, BBIF1_RSYNC_MARK, | 171 | BBIF1_TXD_MARK, BBIF1_RSCK_MARK, BBIF1_RSYNC_MARK, |
172 | BBIF1_FLOW_MARK, BB_RX_FLOW_N_MARK, | 172 | BBIF1_FLOW_MARK, BB_RX_FLOW_N_MARK, |
173 | 173 | ||
174 | /* MSIOF4 */ | 174 | /* BBIF2 */ |
175 | BBIF2_TSCK1_MARK, BBIF2_TSYNC1_MARK, | 175 | BBIF2_TSCK1_MARK, BBIF2_TSYNC1_MARK, |
176 | BBIF2_TXD1_MARK, BBIF2_RXD_MARK, | 176 | BBIF2_TXD1_MARK, BBIF2_RXD_MARK, |
177 | 177 | ||
@@ -976,12 +976,12 @@ static struct pinmux_gpio pinmux_gpios[] = { | |||
976 | GPIO_FN(MSIOF2_TSYNC), GPIO_FN(MSIOF2_TSCK), GPIO_FN(MSIOF2_RXD), | 976 | GPIO_FN(MSIOF2_TSYNC), GPIO_FN(MSIOF2_TSCK), GPIO_FN(MSIOF2_RXD), |
977 | GPIO_FN(MSIOF2_TXD), | 977 | GPIO_FN(MSIOF2_TXD), |
978 | 978 | ||
979 | /* MSIOF3 */ | 979 | /* BBIF1 */ |
980 | GPIO_FN(BBIF1_RXD), GPIO_FN(BBIF1_TSYNC), GPIO_FN(BBIF1_TSCK), | 980 | GPIO_FN(BBIF1_RXD), GPIO_FN(BBIF1_TSYNC), GPIO_FN(BBIF1_TSCK), |
981 | GPIO_FN(BBIF1_TXD), GPIO_FN(BBIF1_RSCK), GPIO_FN(BBIF1_RSYNC), | 981 | GPIO_FN(BBIF1_TXD), GPIO_FN(BBIF1_RSCK), GPIO_FN(BBIF1_RSYNC), |
982 | GPIO_FN(BBIF1_FLOW), GPIO_FN(BB_RX_FLOW_N), | 982 | GPIO_FN(BBIF1_FLOW), GPIO_FN(BB_RX_FLOW_N), |
983 | 983 | ||
984 | /* MSIOF4 */ | 984 | /* BBIF2 */ |
985 | GPIO_FN(BBIF2_TSCK1), GPIO_FN(BBIF2_TSYNC1), | 985 | GPIO_FN(BBIF2_TSCK1), GPIO_FN(BBIF2_TSYNC1), |
986 | GPIO_FN(BBIF2_TXD1), GPIO_FN(BBIF2_RXD), | 986 | GPIO_FN(BBIF2_TXD1), GPIO_FN(BBIF2_RXD), |
987 | 987 | ||
diff --git a/arch/arm/mach-shmobile/setup-sh7367.c b/arch/arm/mach-shmobile/setup-sh7367.c index 3148c11a550e..003008c18360 100644 --- a/arch/arm/mach-shmobile/setup-sh7367.c +++ b/arch/arm/mach-shmobile/setup-sh7367.c | |||
@@ -154,7 +154,6 @@ static struct sh_timer_config cmt10_platform_data = { | |||
154 | .name = "CMT10", | 154 | .name = "CMT10", |
155 | .channel_offset = 0x10, | 155 | .channel_offset = 0x10, |
156 | .timer_bit = 0, | 156 | .timer_bit = 0, |
157 | .clk = "r_clk", | ||
158 | .clockevent_rating = 125, | 157 | .clockevent_rating = 125, |
159 | .clocksource_rating = 125, | 158 | .clocksource_rating = 125, |
160 | }; | 159 | }; |
diff --git a/arch/arm/mach-shmobile/setup-sh7372.c b/arch/arm/mach-shmobile/setup-sh7372.c index e26686c9d0b6..564a6d0be473 100644 --- a/arch/arm/mach-shmobile/setup-sh7372.c +++ b/arch/arm/mach-shmobile/setup-sh7372.c | |||
@@ -158,7 +158,6 @@ static struct sh_timer_config cmt10_platform_data = { | |||
158 | .name = "CMT10", | 158 | .name = "CMT10", |
159 | .channel_offset = 0x10, | 159 | .channel_offset = 0x10, |
160 | .timer_bit = 0, | 160 | .timer_bit = 0, |
161 | .clk = "cmt1", | ||
162 | .clockevent_rating = 125, | 161 | .clockevent_rating = 125, |
163 | .clocksource_rating = 125, | 162 | .clocksource_rating = 125, |
164 | }; | 163 | }; |
@@ -186,6 +185,67 @@ static struct platform_device cmt10_device = { | |||
186 | .num_resources = ARRAY_SIZE(cmt10_resources), | 185 | .num_resources = ARRAY_SIZE(cmt10_resources), |
187 | }; | 186 | }; |
188 | 187 | ||
188 | /* TMU */ | ||
189 | static struct sh_timer_config tmu00_platform_data = { | ||
190 | .name = "TMU00", | ||
191 | .channel_offset = 0x4, | ||
192 | .timer_bit = 0, | ||
193 | .clockevent_rating = 200, | ||
194 | }; | ||
195 | |||
196 | static struct resource tmu00_resources[] = { | ||
197 | [0] = { | ||
198 | .name = "TMU00", | ||
199 | .start = 0xfff60008, | ||
200 | .end = 0xfff60013, | ||
201 | .flags = IORESOURCE_MEM, | ||
202 | }, | ||
203 | [1] = { | ||
204 | .start = intcs_evt2irq(0xe80), /* TMU_TUNI0 */ | ||
205 | .flags = IORESOURCE_IRQ, | ||
206 | }, | ||
207 | }; | ||
208 | |||
209 | static struct platform_device tmu00_device = { | ||
210 | .name = "sh_tmu", | ||
211 | .id = 0, | ||
212 | .dev = { | ||
213 | .platform_data = &tmu00_platform_data, | ||
214 | }, | ||
215 | .resource = tmu00_resources, | ||
216 | .num_resources = ARRAY_SIZE(tmu00_resources), | ||
217 | }; | ||
218 | |||
219 | static struct sh_timer_config tmu01_platform_data = { | ||
220 | .name = "TMU01", | ||
221 | .channel_offset = 0x10, | ||
222 | .timer_bit = 1, | ||
223 | .clocksource_rating = 200, | ||
224 | }; | ||
225 | |||
226 | static struct resource tmu01_resources[] = { | ||
227 | [0] = { | ||
228 | .name = "TMU01", | ||
229 | .start = 0xfff60014, | ||
230 | .end = 0xfff6001f, | ||
231 | .flags = IORESOURCE_MEM, | ||
232 | }, | ||
233 | [1] = { | ||
234 | .start = intcs_evt2irq(0xea0), /* TMU_TUNI1 */ | ||
235 | .flags = IORESOURCE_IRQ, | ||
236 | }, | ||
237 | }; | ||
238 | |||
239 | static struct platform_device tmu01_device = { | ||
240 | .name = "sh_tmu", | ||
241 | .id = 1, | ||
242 | .dev = { | ||
243 | .platform_data = &tmu01_platform_data, | ||
244 | }, | ||
245 | .resource = tmu01_resources, | ||
246 | .num_resources = ARRAY_SIZE(tmu01_resources), | ||
247 | }; | ||
248 | |||
189 | /* I2C */ | 249 | /* I2C */ |
190 | static struct resource iic0_resources[] = { | 250 | static struct resource iic0_resources[] = { |
191 | [0] = { | 251 | [0] = { |
@@ -419,14 +479,14 @@ static struct resource sh7372_dmae0_resources[] = { | |||
419 | }, | 479 | }, |
420 | { | 480 | { |
421 | /* DMA error IRQ */ | 481 | /* DMA error IRQ */ |
422 | .start = 246, | 482 | .start = evt2irq(0x20c0), |
423 | .end = 246, | 483 | .end = evt2irq(0x20c0), |
424 | .flags = IORESOURCE_IRQ, | 484 | .flags = IORESOURCE_IRQ, |
425 | }, | 485 | }, |
426 | { | 486 | { |
427 | /* IRQ for channels 0-5 */ | 487 | /* IRQ for channels 0-5 */ |
428 | .start = 240, | 488 | .start = evt2irq(0x2000), |
429 | .end = 245, | 489 | .end = evt2irq(0x20a0), |
430 | .flags = IORESOURCE_IRQ, | 490 | .flags = IORESOURCE_IRQ, |
431 | }, | 491 | }, |
432 | }; | 492 | }; |
@@ -447,14 +507,14 @@ static struct resource sh7372_dmae1_resources[] = { | |||
447 | }, | 507 | }, |
448 | { | 508 | { |
449 | /* DMA error IRQ */ | 509 | /* DMA error IRQ */ |
450 | .start = 254, | 510 | .start = evt2irq(0x21c0), |
451 | .end = 254, | 511 | .end = evt2irq(0x21c0), |
452 | .flags = IORESOURCE_IRQ, | 512 | .flags = IORESOURCE_IRQ, |
453 | }, | 513 | }, |
454 | { | 514 | { |
455 | /* IRQ for channels 0-5 */ | 515 | /* IRQ for channels 0-5 */ |
456 | .start = 248, | 516 | .start = evt2irq(0x2100), |
457 | .end = 253, | 517 | .end = evt2irq(0x21a0), |
458 | .flags = IORESOURCE_IRQ, | 518 | .flags = IORESOURCE_IRQ, |
459 | }, | 519 | }, |
460 | }; | 520 | }; |
@@ -475,14 +535,14 @@ static struct resource sh7372_dmae2_resources[] = { | |||
475 | }, | 535 | }, |
476 | { | 536 | { |
477 | /* DMA error IRQ */ | 537 | /* DMA error IRQ */ |
478 | .start = 262, | 538 | .start = evt2irq(0x22c0), |
479 | .end = 262, | 539 | .end = evt2irq(0x22c0), |
480 | .flags = IORESOURCE_IRQ, | 540 | .flags = IORESOURCE_IRQ, |
481 | }, | 541 | }, |
482 | { | 542 | { |
483 | /* IRQ for channels 0-5 */ | 543 | /* IRQ for channels 0-5 */ |
484 | .start = 256, | 544 | .start = evt2irq(0x2200), |
485 | .end = 261, | 545 | .end = evt2irq(0x22a0), |
486 | .flags = IORESOURCE_IRQ, | 546 | .flags = IORESOURCE_IRQ, |
487 | }, | 547 | }, |
488 | }; | 548 | }; |
@@ -526,6 +586,11 @@ static struct platform_device *sh7372_early_devices[] __initdata = { | |||
526 | &scif5_device, | 586 | &scif5_device, |
527 | &scif6_device, | 587 | &scif6_device, |
528 | &cmt10_device, | 588 | &cmt10_device, |
589 | &tmu00_device, | ||
590 | &tmu01_device, | ||
591 | }; | ||
592 | |||
593 | static struct platform_device *sh7372_late_devices[] __initdata = { | ||
529 | &iic0_device, | 594 | &iic0_device, |
530 | &iic1_device, | 595 | &iic1_device, |
531 | &dma0_device, | 596 | &dma0_device, |
@@ -537,6 +602,9 @@ void __init sh7372_add_standard_devices(void) | |||
537 | { | 602 | { |
538 | platform_add_devices(sh7372_early_devices, | 603 | platform_add_devices(sh7372_early_devices, |
539 | ARRAY_SIZE(sh7372_early_devices)); | 604 | ARRAY_SIZE(sh7372_early_devices)); |
605 | |||
606 | platform_add_devices(sh7372_late_devices, | ||
607 | ARRAY_SIZE(sh7372_late_devices)); | ||
540 | } | 608 | } |
541 | 609 | ||
542 | void __init sh7372_add_early_devices(void) | 610 | void __init sh7372_add_early_devices(void) |
diff --git a/arch/arm/mach-shmobile/setup-sh7377.c b/arch/arm/mach-shmobile/setup-sh7377.c index bb4adf17dbf4..575dbd6c2f1d 100644 --- a/arch/arm/mach-shmobile/setup-sh7377.c +++ b/arch/arm/mach-shmobile/setup-sh7377.c | |||
@@ -172,7 +172,6 @@ static struct sh_timer_config cmt10_platform_data = { | |||
172 | .name = "CMT10", | 172 | .name = "CMT10", |
173 | .channel_offset = 0x10, | 173 | .channel_offset = 0x10, |
174 | .timer_bit = 0, | 174 | .timer_bit = 0, |
175 | .clk = "r_clk", | ||
176 | .clockevent_rating = 125, | 175 | .clockevent_rating = 125, |
177 | .clocksource_rating = 125, | 176 | .clocksource_rating = 125, |
178 | }; | 177 | }; |