aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAfzal Mohammed <afzal@ti.com>2012-09-23 19:28:24 -0400
committerPaul Walmsley <paul@pwsan.com>2012-09-23 19:28:24 -0400
commit49484a60ff665ccac2e4f2314753a21daa0c2f9e (patch)
treeeeeec9d97c14e50ec54ec7478867040e608e060b
parent230844db9046ff88628afbf0f43b03bc4c9e4f11 (diff)
ARM: OMAP2/3: hwmod data: add gpmc
Add gpmc hwmod and associated interconnect data Signed-off-by: Afzal Mohammed <afzal@ti.com> [paul@pwsan.com: added comments to the use of HWMOD_INIT_NO_RESET] Signed-off-by: Paul Walmsley <paul@pwsan.com>
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_2420_data.c18
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_2430_data.c18
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c51
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_3xxx_data.c61
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_44xx_data.c8
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_common_data.h1
-rw-r--r--arch/arm/mach-omap2/prcm-common.h2
7 files changed, 158 insertions, 1 deletions
diff --git a/arch/arm/mach-omap2/omap_hwmod_2420_data.c b/arch/arm/mach-omap2/omap_hwmod_2420_data.c
index 4e81637640e9..5fcd225d207e 100644
--- a/arch/arm/mach-omap2/omap_hwmod_2420_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_2420_data.c
@@ -535,6 +535,15 @@ static struct omap_hwmod_addr_space omap2420_counter_32k_addrs[] = {
535 { } 535 { }
536}; 536};
537 537
538static struct omap_hwmod_addr_space omap2420_gpmc_addrs[] = {
539 {
540 .pa_start = 0x6800a000,
541 .pa_end = 0x6800afff,
542 .flags = ADDR_TYPE_RT
543 },
544 { }
545};
546
538static struct omap_hwmod_ocp_if omap2420_l4_wkup__counter_32k = { 547static struct omap_hwmod_ocp_if omap2420_l4_wkup__counter_32k = {
539 .master = &omap2xxx_l4_wkup_hwmod, 548 .master = &omap2xxx_l4_wkup_hwmod,
540 .slave = &omap2xxx_counter_32k_hwmod, 549 .slave = &omap2xxx_counter_32k_hwmod,
@@ -543,6 +552,14 @@ static struct omap_hwmod_ocp_if omap2420_l4_wkup__counter_32k = {
543 .user = OCP_USER_MPU | OCP_USER_SDMA, 552 .user = OCP_USER_MPU | OCP_USER_SDMA,
544}; 553};
545 554
555static struct omap_hwmod_ocp_if omap2420_l3__gpmc = {
556 .master = &omap2xxx_l3_main_hwmod,
557 .slave = &omap2xxx_gpmc_hwmod,
558 .clk = "core_l3_ck",
559 .addr = omap2420_gpmc_addrs,
560 .user = OCP_USER_MPU | OCP_USER_SDMA,
561};
562
546static struct omap_hwmod_ocp_if *omap2420_hwmod_ocp_ifs[] __initdata = { 563static struct omap_hwmod_ocp_if *omap2420_hwmod_ocp_ifs[] __initdata = {
547 &omap2xxx_l3_main__l4_core, 564 &omap2xxx_l3_main__l4_core,
548 &omap2xxx_mpu__l3_main, 565 &omap2xxx_mpu__l3_main,
@@ -586,6 +603,7 @@ static struct omap_hwmod_ocp_if *omap2420_hwmod_ocp_ifs[] __initdata = {
586 &omap2420_l4_core__msdi1, 603 &omap2420_l4_core__msdi1,
587 &omap2420_l4_core__hdq1w, 604 &omap2420_l4_core__hdq1w,
588 &omap2420_l4_wkup__counter_32k, 605 &omap2420_l4_wkup__counter_32k,
606 &omap2420_l3__gpmc,
589 NULL, 607 NULL,
590}; 608};
591 609
diff --git a/arch/arm/mach-omap2/omap_hwmod_2430_data.c b/arch/arm/mach-omap2/omap_hwmod_2430_data.c
index ceb23c3fa89d..a560563daf58 100644
--- a/arch/arm/mach-omap2/omap_hwmod_2430_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_2430_data.c
@@ -887,6 +887,15 @@ static struct omap_hwmod_addr_space omap2430_counter_32k_addrs[] = {
887 { } 887 { }
888}; 888};
889 889
890static struct omap_hwmod_addr_space omap2430_gpmc_addrs[] = {
891 {
892 .pa_start = 0x6e000000,
893 .pa_end = 0x6e000fff,
894 .flags = ADDR_TYPE_RT
895 },
896 { }
897};
898
890static struct omap_hwmod_ocp_if omap2430_l4_wkup__counter_32k = { 899static struct omap_hwmod_ocp_if omap2430_l4_wkup__counter_32k = {
891 .master = &omap2xxx_l4_wkup_hwmod, 900 .master = &omap2xxx_l4_wkup_hwmod,
892 .slave = &omap2xxx_counter_32k_hwmod, 901 .slave = &omap2xxx_counter_32k_hwmod,
@@ -895,6 +904,14 @@ static struct omap_hwmod_ocp_if omap2430_l4_wkup__counter_32k = {
895 .user = OCP_USER_MPU | OCP_USER_SDMA, 904 .user = OCP_USER_MPU | OCP_USER_SDMA,
896}; 905};
897 906
907static struct omap_hwmod_ocp_if omap2430_l3__gpmc = {
908 .master = &omap2xxx_l3_main_hwmod,
909 .slave = &omap2xxx_gpmc_hwmod,
910 .clk = "core_l3_ck",
911 .addr = omap2430_gpmc_addrs,
912 .user = OCP_USER_MPU | OCP_USER_SDMA,
913};
914
898static struct omap_hwmod_ocp_if *omap2430_hwmod_ocp_ifs[] __initdata = { 915static struct omap_hwmod_ocp_if *omap2430_hwmod_ocp_ifs[] __initdata = {
899 &omap2xxx_l3_main__l4_core, 916 &omap2xxx_l3_main__l4_core,
900 &omap2xxx_mpu__l3_main, 917 &omap2xxx_mpu__l3_main,
@@ -945,6 +962,7 @@ static struct omap_hwmod_ocp_if *omap2430_hwmod_ocp_ifs[] __initdata = {
945 &omap2430_l4_core__mcbsp5, 962 &omap2430_l4_core__mcbsp5,
946 &omap2430_l4_core__hdq1w, 963 &omap2430_l4_core__hdq1w,
947 &omap2430_l4_wkup__counter_32k, 964 &omap2430_l4_wkup__counter_32k,
965 &omap2430_l3__gpmc,
948 NULL, 966 NULL,
949}; 967};
950 968
diff --git a/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c b/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c
index ceb305242340..3c009069f2f2 100644
--- a/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c
@@ -173,6 +173,26 @@ struct omap_hwmod_class omap2xxx_mcspi_class = {
173}; 173};
174 174
175/* 175/*
176 * 'gpmc' class
177 * general purpose memory controller
178 */
179
180static struct omap_hwmod_class_sysconfig omap2xxx_gpmc_sysc = {
181 .rev_offs = 0x0000,
182 .sysc_offs = 0x0010,
183 .syss_offs = 0x0014,
184 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE |
185 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
186 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
187 .sysc_fields = &omap_hwmod_sysc_type1,
188};
189
190static struct omap_hwmod_class omap2xxx_gpmc_hwmod_class = {
191 .name = "gpmc",
192 .sysc = &omap2xxx_gpmc_sysc,
193};
194
195/*
176 * IP blocks 196 * IP blocks
177 */ 197 */
178 198
@@ -724,7 +744,6 @@ struct omap_hwmod omap2xxx_mcspi2_hwmod = {
724 .dev_attr = &omap_mcspi2_dev_attr, 744 .dev_attr = &omap_mcspi2_dev_attr,
725}; 745};
726 746
727
728static struct omap_hwmod_class omap2xxx_counter_hwmod_class = { 747static struct omap_hwmod_class omap2xxx_counter_hwmod_class = {
729 .name = "counter", 748 .name = "counter",
730}; 749};
@@ -743,3 +762,33 @@ struct omap_hwmod omap2xxx_counter_32k_hwmod = {
743 }, 762 },
744 .class = &omap2xxx_counter_hwmod_class, 763 .class = &omap2xxx_counter_hwmod_class,
745}; 764};
765
766/* gpmc */
767static struct omap_hwmod_irq_info omap2xxx_gpmc_irqs[] = {
768 { .irq = 20 },
769 { .irq = -1 }
770};
771
772struct omap_hwmod omap2xxx_gpmc_hwmod = {
773 .name = "gpmc",
774 .class = &omap2xxx_gpmc_hwmod_class,
775 .mpu_irqs = omap2xxx_gpmc_irqs,
776 .main_clk = "gpmc_fck",
777 /*
778 * XXX HWMOD_INIT_NO_RESET should not be needed for this IP
779 * block. It is not being added due to any known bugs with
780 * resetting the GPMC IP block, but rather because any timings
781 * set by the bootloader are not being correctly programmed by
782 * the kernel from the board file or DT data.
783 * HWMOD_INIT_NO_RESET should be removed ASAP.
784 */
785 .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET |
786 HWMOD_NO_IDLEST),
787 .prcm = {
788 .omap2 = {
789 .prcm_reg_id = 3,
790 .module_bit = OMAP24XX_EN_GPMC_MASK,
791 .module_offs = CORE_MOD,
792 },
793 },
794};
diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
index 11442d84dacd..da6eca0ff79b 100644
--- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
@@ -2096,6 +2096,49 @@ static struct omap_hwmod omap3xxx_counter_32k_hwmod = {
2096}; 2096};
2097 2097
2098/* 2098/*
2099 * 'gpmc' class
2100 * general purpose memory controller
2101 */
2102
2103static struct omap_hwmod_class_sysconfig omap3xxx_gpmc_sysc = {
2104 .rev_offs = 0x0000,
2105 .sysc_offs = 0x0010,
2106 .syss_offs = 0x0014,
2107 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE |
2108 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
2109 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
2110 .sysc_fields = &omap_hwmod_sysc_type1,
2111};
2112
2113static struct omap_hwmod_class omap3xxx_gpmc_hwmod_class = {
2114 .name = "gpmc",
2115 .sysc = &omap3xxx_gpmc_sysc,
2116};
2117
2118static struct omap_hwmod_irq_info omap3xxx_gpmc_irqs[] = {
2119 { .irq = 20 },
2120 { .irq = -1 }
2121};
2122
2123static struct omap_hwmod omap3xxx_gpmc_hwmod = {
2124 .name = "gpmc",
2125 .class = &omap3xxx_gpmc_hwmod_class,
2126 .clkdm_name = "core_l3_clkdm",
2127 .mpu_irqs = omap3xxx_gpmc_irqs,
2128 .main_clk = "gpmc_fck",
2129 /*
2130 * XXX HWMOD_INIT_NO_RESET should not be needed for this IP
2131 * block. It is not being added due to any known bugs with
2132 * resetting the GPMC IP block, but rather because any timings
2133 * set by the bootloader are not being correctly programmed by
2134 * the kernel from the board file or DT data.
2135 * HWMOD_INIT_NO_RESET should be removed ASAP.
2136 */
2137 .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET |
2138 HWMOD_NO_IDLEST),
2139};
2140
2141/*
2099 * interfaces 2142 * interfaces
2100 */ 2143 */
2101 2144
@@ -3320,6 +3363,15 @@ static struct omap_hwmod_addr_space omap3xxx_counter_32k_addrs[] = {
3320 { } 3363 { }
3321}; 3364};
3322 3365
3366static struct omap_hwmod_addr_space omap3xxx_gpmc_addrs[] = {
3367 {
3368 .pa_start = 0x6e000000,
3369 .pa_end = 0x6e000fff,
3370 .flags = ADDR_TYPE_RT
3371 },
3372 { }
3373};
3374
3323static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__counter_32k = { 3375static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__counter_32k = {
3324 .master = &omap3xxx_l4_wkup_hwmod, 3376 .master = &omap3xxx_l4_wkup_hwmod,
3325 .slave = &omap3xxx_counter_32k_hwmod, 3377 .slave = &omap3xxx_counter_32k_hwmod,
@@ -3429,6 +3481,14 @@ static struct omap_hwmod_ocp_if am35xx_l4_core__emac = {
3429 .user = OCP_USER_MPU, 3481 .user = OCP_USER_MPU,
3430}; 3482};
3431 3483
3484static struct omap_hwmod_ocp_if omap3xxx_l3_main__gpmc = {
3485 .master = &omap3xxx_l3_main_hwmod,
3486 .slave = &omap3xxx_gpmc_hwmod,
3487 .clk = "core_l3_ick",
3488 .addr = omap3xxx_gpmc_addrs,
3489 .user = OCP_USER_MPU | OCP_USER_SDMA,
3490};
3491
3432static struct omap_hwmod_ocp_if *omap3xxx_hwmod_ocp_ifs[] __initdata = { 3492static struct omap_hwmod_ocp_if *omap3xxx_hwmod_ocp_ifs[] __initdata = {
3433 &omap3xxx_l3_main__l4_core, 3493 &omap3xxx_l3_main__l4_core,
3434 &omap3xxx_l3_main__l4_per, 3494 &omap3xxx_l3_main__l4_per,
@@ -3474,6 +3534,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_hwmod_ocp_ifs[] __initdata = {
3474 &omap34xx_l4_core__mcspi3, 3534 &omap34xx_l4_core__mcspi3,
3475 &omap34xx_l4_core__mcspi4, 3535 &omap34xx_l4_core__mcspi4,
3476 &omap3xxx_l4_wkup__counter_32k, 3536 &omap3xxx_l4_wkup__counter_32k,
3537 &omap3xxx_l3_main__gpmc,
3477 NULL, 3538 NULL,
3478}; 3539};
3479 3540
diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
index d6233740c8e1..46fd80c29a02 100644
--- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
@@ -1352,6 +1352,14 @@ static struct omap_hwmod omap44xx_gpmc_hwmod = {
1352 .name = "gpmc", 1352 .name = "gpmc",
1353 .class = &omap44xx_gpmc_hwmod_class, 1353 .class = &omap44xx_gpmc_hwmod_class,
1354 .clkdm_name = "l3_2_clkdm", 1354 .clkdm_name = "l3_2_clkdm",
1355 /*
1356 * XXX HWMOD_INIT_NO_RESET should not be needed for this IP
1357 * block. It is not being added due to any known bugs with
1358 * resetting the GPMC IP block, but rather because any timings
1359 * set by the bootloader are not being correctly programmed by
1360 * the kernel from the board file or DT data.
1361 * HWMOD_INIT_NO_RESET should be removed ASAP.
1362 */
1355 .flags = HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET, 1363 .flags = HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET,
1356 .mpu_irqs = omap44xx_gpmc_irqs, 1364 .mpu_irqs = omap44xx_gpmc_irqs,
1357 .sdma_reqs = omap44xx_gpmc_sdma_reqs, 1365 .sdma_reqs = omap44xx_gpmc_sdma_reqs,
diff --git a/arch/arm/mach-omap2/omap_hwmod_common_data.h b/arch/arm/mach-omap2/omap_hwmod_common_data.h
index dddb677fed68..6a033b878359 100644
--- a/arch/arm/mach-omap2/omap_hwmod_common_data.h
+++ b/arch/arm/mach-omap2/omap_hwmod_common_data.h
@@ -77,6 +77,7 @@ extern struct omap_hwmod omap2xxx_gpio4_hwmod;
77extern struct omap_hwmod omap2xxx_mcspi1_hwmod; 77extern struct omap_hwmod omap2xxx_mcspi1_hwmod;
78extern struct omap_hwmod omap2xxx_mcspi2_hwmod; 78extern struct omap_hwmod omap2xxx_mcspi2_hwmod;
79extern struct omap_hwmod omap2xxx_counter_32k_hwmod; 79extern struct omap_hwmod omap2xxx_counter_32k_hwmod;
80extern struct omap_hwmod omap2xxx_gpmc_hwmod;
80 81
81/* Common interface data across OMAP2xxx */ 82/* Common interface data across OMAP2xxx */
82extern struct omap_hwmod_ocp_if omap2xxx_l3_main__l4_core; 83extern struct omap_hwmod_ocp_if omap2xxx_l3_main__l4_core;
diff --git a/arch/arm/mach-omap2/prcm-common.h b/arch/arm/mach-omap2/prcm-common.h
index e5f0503a68b0..72df97482cc0 100644
--- a/arch/arm/mach-omap2/prcm-common.h
+++ b/arch/arm/mach-omap2/prcm-common.h
@@ -109,6 +109,8 @@
109#define OMAP2430_EN_MDM_INTC_MASK (1 << 11) 109#define OMAP2430_EN_MDM_INTC_MASK (1 << 11)
110#define OMAP2430_EN_USBHS_SHIFT 6 110#define OMAP2430_EN_USBHS_SHIFT 6
111#define OMAP2430_EN_USBHS_MASK (1 << 6) 111#define OMAP2430_EN_USBHS_MASK (1 << 6)
112#define OMAP24XX_EN_GPMC_SHIFT 1
113#define OMAP24XX_EN_GPMC_MASK (1 << 1)
112 114
113/* CM_IDLEST1_CORE, PM_WKST1_CORE shared bits */ 115/* CM_IDLEST1_CORE, PM_WKST1_CORE shared bits */
114#define OMAP2420_ST_MMC_SHIFT 26 116#define OMAP2420_ST_MMC_SHIFT 26