Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 88e66102 authored by Tony Lindgren's avatar Tony Lindgren
Browse files

Merge tag 'for-v3.19/omap-b2' of...

Merge tag 'for-v3.19/omap-b2' of git://git.kernel.org/pub/scm/linux/kernel/git/pjw/omap-pending into omap-for-v3.19/soc

Several more OMAP patches targeted for v3.19. They include:

- OMAP4/5: DSS hwmod cleanup patches from Tomi Valkeinen.
- DRA7xx: hwmod data support for UARTs 7 through 10.
- AM43xx: hwmod data support for the onboard ADC.

Basic build, boot, and PM test reports are here:

http://www.pwsan.com/omap/testlogs/omap-b-for-v3.19/20141121110550/

Note that I cannot test the DRA7xx or AM43xx patches, since I do not have
these boards.
parents 98892781 1f074f99
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -895,7 +895,7 @@
				reg = <0x58002000 0x1000>;
				reg = <0x58002000 0x1000>;
				status = "disabled";
				status = "disabled";
				ti,hwmods = "dss_rfbi";
				ti,hwmods = "dss_rfbi";
				clocks = <&dss_dss_clk>, <&dss_fck>;
				clocks = <&dss_dss_clk>, <&l3_div_ck>;
				clock-names = "fck", "ick";
				clock-names = "fck", "ick";
			};
			};


+0 −8
Original line number Original line Diff line number Diff line
@@ -1018,14 +1018,6 @@
		reg = <0x1120>;
		reg = <0x1120>;
	};
	};


	dss_fck: dss_fck {
		#clock-cells = <0>;
		compatible = "ti,gate-clock";
		clocks = <&l3_div_ck>;
		ti,bit-shift = <1>;
		reg = <0x1120>;
	};

	fdif_fck: fdif_fck {
	fdif_fck: fdif_fck {
		#clock-cells = <0>;
		#clock-cells = <0>;
		compatible = "ti,divider-clock";
		compatible = "ti,divider-clock";
+22 −0
Original line number Original line Diff line number Diff line
@@ -2719,11 +2719,33 @@ static int __init _setup(struct omap_hwmod *oh, void *data)
	if (oh->_state != _HWMOD_STATE_INITIALIZED)
	if (oh->_state != _HWMOD_STATE_INITIALIZED)
		return 0;
		return 0;


	if (oh->parent_hwmod) {
		int r;

		r = _enable(oh->parent_hwmod);
		WARN(r, "hwmod: %s: setup: failed to enable parent hwmod %s\n",
		     oh->name, oh->parent_hwmod->name);
	}

	_setup_iclk_autoidle(oh);
	_setup_iclk_autoidle(oh);


	if (!_setup_reset(oh))
	if (!_setup_reset(oh))
		_setup_postsetup(oh);
		_setup_postsetup(oh);


	if (oh->parent_hwmod) {
		u8 postsetup_state;

		postsetup_state = oh->parent_hwmod->_postsetup_state;

		if (postsetup_state == _HWMOD_STATE_IDLE)
			_idle(oh->parent_hwmod);
		else if (postsetup_state == _HWMOD_STATE_DISABLED)
			_shutdown(oh->parent_hwmod);
		else if (postsetup_state != _HWMOD_STATE_ENABLED)
			WARN(1, "hwmod: %s: unknown postsetup state %d! defaulting to enabled\n",
			     oh->parent_hwmod->name, postsetup_state);
	}

	return 0;
	return 0;
}
}


+8 −0
Original line number Original line Diff line number Diff line
@@ -633,6 +633,7 @@ struct omap_hwmod_link {
 * @flags: hwmod flags (documented below)
 * @flags: hwmod flags (documented below)
 * @_lock: spinlock serializing operations on this hwmod
 * @_lock: spinlock serializing operations on this hwmod
 * @node: list node for hwmod list (internal use)
 * @node: list node for hwmod list (internal use)
 * @parent_hwmod: (temporary) a pointer to the hierarchical parent of this hwmod
 *
 *
 * @main_clk refers to this module's "main clock," which for our
 * @main_clk refers to this module's "main clock," which for our
 * purposes is defined as "the functional clock needed for register
 * purposes is defined as "the functional clock needed for register
@@ -643,6 +644,12 @@ struct omap_hwmod_link {
 * the omap_hwmod code and should not be set during initialization.
 * the omap_hwmod code and should not be set during initialization.
 *
 *
 * @masters and @slaves are now deprecated.
 * @masters and @slaves are now deprecated.
 *
 * @parent_hwmod is temporary; there should be no need for it, as this
 * information should already be expressed in the OCP interface
 * structures.  @parent_hwmod is present as a workaround until we improve
 * handling for hwmods with multiple parents (e.g., OMAP4+ DSS with
 * multiple register targets across different interconnects).
 */
 */
struct omap_hwmod {
struct omap_hwmod {
	const char			*name;
	const char			*name;
@@ -680,6 +687,7 @@ struct omap_hwmod {
	u8				_int_flags;
	u8				_int_flags;
	u8				_state;
	u8				_state;
	u8				_postsetup_state;
	u8				_postsetup_state;
	struct omap_hwmod		*parent_hwmod;
};
};


struct omap_hwmod *omap_hwmod_lookup(const char *name);
struct omap_hwmod *omap_hwmod_lookup(const char *name);
+39 −0
Original line number Original line Diff line number Diff line
@@ -417,6 +417,37 @@ static struct omap_hwmod am43xx_qspi_hwmod = {
	},
	},
};
};


/*
 * 'adc/tsc' class
 * TouchScreen Controller (Analog-To-Digital Converter)
 */
static struct omap_hwmod_class_sysconfig am43xx_adc_tsc_sysc = {
	.rev_offs	= 0x00,
	.sysc_offs	= 0x10,
	.sysc_flags	= SYSC_HAS_SIDLEMODE,
	.idlemodes	= (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
			  SIDLE_SMART_WKUP),
	.sysc_fields	= &omap_hwmod_sysc_type2,
};

static struct omap_hwmod_class am43xx_adc_tsc_hwmod_class = {
	.name		= "adc_tsc",
	.sysc		= &am43xx_adc_tsc_sysc,
};

static struct omap_hwmod am43xx_adc_tsc_hwmod = {
	.name		= "adc_tsc",
	.class		= &am43xx_adc_tsc_hwmod_class,
	.clkdm_name	= "l3s_tsc_clkdm",
	.main_clk	= "adc_tsc_fck",
	.prcm		= {
		.omap4  = {
			.clkctrl_offs   = AM43XX_CM_WKUP_ADC_TSC_CLKCTRL_OFFSET,
			.modulemode     = MODULEMODE_SWCTRL,
		},
	},
};

/* dss */
/* dss */


static struct omap_hwmod am43xx_dss_core_hwmod = {
static struct omap_hwmod am43xx_dss_core_hwmod = {
@@ -547,6 +578,13 @@ static struct omap_hwmod_ocp_if am43xx_l4_wkup__gpio0 = {
	.user		= OCP_USER_MPU | OCP_USER_SDMA,
	.user		= OCP_USER_MPU | OCP_USER_SDMA,
};
};


static struct omap_hwmod_ocp_if am43xx_l4_wkup__adc_tsc = {
	.master         = &am33xx_l4_wkup_hwmod,
	.slave          = &am43xx_adc_tsc_hwmod,
	.clk            = "dpll_core_m4_div2_ck",
	.user           = OCP_USER_MPU,
};

static struct omap_hwmod_ocp_if am43xx_l4_hs__cpgmac0 = {
static struct omap_hwmod_ocp_if am43xx_l4_hs__cpgmac0 = {
	.master		= &am43xx_l4_hs_hwmod,
	.master		= &am43xx_l4_hs_hwmod,
	.slave		= &am33xx_cpgmac0_hwmod,
	.slave		= &am33xx_cpgmac0_hwmod,
@@ -789,6 +827,7 @@ static struct omap_hwmod_ocp_if *am43xx_hwmod_ocp_ifs[] __initdata = {
	&am43xx_l4_wkup__i2c1,
	&am43xx_l4_wkup__i2c1,
	&am43xx_l4_wkup__gpio0,
	&am43xx_l4_wkup__gpio0,
	&am43xx_l4_wkup__wd_timer1,
	&am43xx_l4_wkup__wd_timer1,
	&am43xx_l4_wkup__adc_tsc,
	&am43xx_l3_s__qspi,
	&am43xx_l3_s__qspi,
	&am33xx_l4_per__dcan0,
	&am33xx_l4_per__dcan0,
	&am33xx_l4_per__dcan1,
	&am33xx_l4_per__dcan1,
Loading