]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
ARM: OMAP2+: Move all omap_hwmod_sysc_fields to omap_hwmod_common_data.c
authorTony Lindgren <tony@atomide.com>
Fri, 15 Dec 2017 17:41:01 +0000 (09:41 -0800)
committerTony Lindgren <tony@atomide.com>
Thu, 21 Dec 2017 15:28:54 +0000 (07:28 -0800)
We want to be able to eventually allocate these dynamically with the
data for omap_hwmod_class_sysconfig coming from dts.

Note that omap_hwmod_sysc_type_smartreflex is the same as the older
omap36xx_sr_sysc_fields, so let's use the earlier omap36xx_sr_sysc_fields
instead.

Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/mach-omap2/omap_hwmod.h
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
arch/arm/mach-omap2/omap_hwmod_44xx_data.c
arch/arm/mach-omap2/omap_hwmod_7xx_data.c
arch/arm/mach-omap2/omap_hwmod_common_data.c

index df2239a585558f1e2a08c66d2086018d5877439b..610cdb31800504f99c30631c3c720bd9c8fe0c0d 100644 (file)
@@ -40,6 +40,12 @@ struct omap_device;
 extern struct omap_hwmod_sysc_fields omap_hwmod_sysc_type1;
 extern struct omap_hwmod_sysc_fields omap_hwmod_sysc_type2;
 extern struct omap_hwmod_sysc_fields omap_hwmod_sysc_type3;
+extern struct omap_hwmod_sysc_fields omap34xx_sr_sysc_fields;
+extern struct omap_hwmod_sysc_fields omap36xx_sr_sysc_fields;
+extern struct omap_hwmod_sysc_fields omap3_sham_sysc_fields;
+extern struct omap_hwmod_sysc_fields omap3xxx_aes_sysc_fields;
+extern struct omap_hwmod_sysc_fields omap_hwmod_sysc_type_mcasp;
+extern struct omap_hwmod_sysc_fields omap_hwmod_sysc_type_usb_host_fs;
 
 /*
  * OCP SYSCONFIG bit shifts/masks TYPE1. These are for IPs compliant
index d2106ae4410a23fb76c8593b6d123b3a94800ade..033f2961314164c67bbd26e9950ab8ec6455c3e1 100644 (file)
@@ -1190,10 +1190,6 @@ static struct omap_hwmod omap3xxx_mcbsp3_sidetone_hwmod = {
 };
 
 /* SR common */
-static struct omap_hwmod_sysc_fields omap34xx_sr_sysc_fields = {
-       .clkact_shift   = 20,
-};
-
 static struct omap_hwmod_class_sysconfig omap34xx_sr_sysc = {
        .sysc_offs      = 0x24,
        .sysc_flags     = (SYSC_HAS_CLOCKACTIVITY | SYSC_NO_CACHE),
@@ -1206,11 +1202,6 @@ static struct omap_hwmod_class omap34xx_smartreflex_hwmod_class = {
        .rev  = 1,
 };
 
-static struct omap_hwmod_sysc_fields omap36xx_sr_sysc_fields = {
-       .sidle_shift    = 24,
-       .enwkup_shift   = 26,
-};
-
 static struct omap_hwmod_class_sysconfig omap36xx_sr_sysc = {
        .sysc_offs      = 0x38,
        .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
@@ -2731,12 +2722,6 @@ static struct omap_hwmod_ocp_if omap3xxx_l3_main__gpmc = {
 };
 
 /* l4_core -> SHAM2 (SHA1/MD5) (similar to omap24xx) */
-static struct omap_hwmod_sysc_fields omap3_sham_sysc_fields = {
-       .sidle_shift    = 4,
-       .srst_shift     = 1,
-       .autoidle_shift = 0,
-};
-
 static struct omap_hwmod_class_sysconfig omap3_sham_sysc = {
        .rev_offs       = 0x5c,
        .sysc_offs      = 0x60,
@@ -2777,12 +2762,6 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_core__sham = {
 };
 
 /* l4_core -> AES */
-static struct omap_hwmod_sysc_fields omap3xxx_aes_sysc_fields = {
-       .sidle_shift    = 6,
-       .srst_shift     = 1,
-       .autoidle_shift = 0,
-};
-
 static struct omap_hwmod_class_sysconfig omap3_aes_sysc = {
        .rev_offs       = 0x44,
        .sysc_offs      = 0x48,
index c47709659a5468e0a8970a39be5ae2e8045ee1cc..a1901c22a0f07231293a7caf1f905ef973dc9a75 100644 (file)
@@ -1658,10 +1658,6 @@ static struct omap_hwmod omap44xx_mailbox_hwmod = {
  */
 
 /* The IP is not compliant to type1 / type2 scheme */
-static struct omap_hwmod_sysc_fields omap_hwmod_sysc_type_mcasp = {
-       .sidle_shift    = 0,
-};
-
 static struct omap_hwmod_class_sysconfig omap44xx_mcasp_sysc = {
        .sysc_offs      = 0x0004,
        .sysc_flags     = SYSC_HAS_SIDLEMODE,
@@ -2403,17 +2399,12 @@ static struct omap_hwmod omap44xx_slimbus2_hwmod = {
  */
 
 /* The IP is not compliant to type1 / type2 scheme */
-static struct omap_hwmod_sysc_fields omap_hwmod_sysc_type_smartreflex = {
-       .sidle_shift    = 24,
-       .enwkup_shift   = 26,
-};
-
 static struct omap_hwmod_class_sysconfig omap44xx_smartreflex_sysc = {
        .sysc_offs      = 0x0038,
        .sysc_flags     = (SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE),
        .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
                           SIDLE_SMART_WKUP),
-       .sysc_fields    = &omap_hwmod_sysc_type_smartreflex,
+       .sysc_fields    = &omap36xx_sr_sysc_fields,
 };
 
 static struct omap_hwmod_class omap44xx_smartreflex_hwmod_class = {
@@ -2844,12 +2835,6 @@ static struct omap_hwmod omap44xx_uart4_hwmod = {
  */
 
 /* The IP is not compliant to type1 / type2 scheme */
-static struct omap_hwmod_sysc_fields omap_hwmod_sysc_type_usb_host_fs = {
-       .midle_shift    = 4,
-       .sidle_shift    = 2,
-       .srst_shift     = 1,
-};
-
 static struct omap_hwmod_class_sysconfig omap44xx_usb_host_fs_sysc = {
        .rev_offs       = 0x0000,
        .sysc_offs      = 0x0210,
index d05e553d63463f7d34d306816610708eb0b889a1..f4698d662eb1f08e67663f35dea4e9b6a232554d 100644 (file)
@@ -2055,17 +2055,12 @@ static struct omap_hwmod dra7xx_sata_hwmod = {
  */
 
 /* The IP is not compliant to type1 / type2 scheme */
-static struct omap_hwmod_sysc_fields omap_hwmod_sysc_type_smartreflex = {
-       .sidle_shift    = 24,
-       .enwkup_shift   = 26,
-};
-
 static struct omap_hwmod_class_sysconfig dra7xx_smartreflex_sysc = {
        .sysc_offs      = 0x0038,
        .sysc_flags     = (SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE),
        .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
                           SIDLE_SMART_WKUP),
-       .sysc_fields    = &omap_hwmod_sysc_type_smartreflex,
+       .sysc_fields    = &omap36xx_sr_sysc_fields,
 };
 
 static struct omap_hwmod_class dra7xx_smartreflex_hwmod_class = {
index 79d623b83e496d5d79d6901a61c36754a9635b77..4fb5fcacdf1dfdec7193cf22e080bb74a8686b47 100644 (file)
@@ -63,3 +63,34 @@ struct omap_dss_dispc_dev_attr omap2_3_dss_dispc_dev_attr = {
        .manager_count          = 2,
        .has_framedonetv_irq    = 0
 };
+
+struct omap_hwmod_sysc_fields omap34xx_sr_sysc_fields = {
+       .clkact_shift   = 20,
+};
+
+struct omap_hwmod_sysc_fields omap36xx_sr_sysc_fields = {
+       .sidle_shift    = 24,
+       .enwkup_shift   = 26,
+};
+
+struct omap_hwmod_sysc_fields omap3_sham_sysc_fields = {
+       .sidle_shift    = 4,
+       .srst_shift     = 1,
+       .autoidle_shift = 0,
+};
+
+struct omap_hwmod_sysc_fields omap3xxx_aes_sysc_fields = {
+       .sidle_shift    = 6,
+       .srst_shift     = 1,
+       .autoidle_shift = 0,
+};
+
+struct omap_hwmod_sysc_fields omap_hwmod_sysc_type_mcasp = {
+       .sidle_shift    = 0,
+};
+
+struct omap_hwmod_sysc_fields omap_hwmod_sysc_type_usb_host_fs = {
+       .midle_shift    = 4,
+       .sidle_shift    = 2,
+       .srst_shift     = 1,
+};