search for: hr_client

Displaying 14 results from an estimated 14 matches for "hr_client".

2015 Jan 06
2
[PATCH 3/11] memory: tegra: add flush operation for Tegra124 memory clients
...loop below. Also why compare to the previous value of the register? Isn't the only thing we're interested in the value of the specific bit? > + *stat = cur_stat; > + return true; > +} > + > +static int tegra124_mc_flush(struct tegra_mc *mc, > + const struct tegra_mc_hr *hr_client, bool enable) > +{ > + u32 val; > + > + if (!mc || !hr_client) > + return -EINVAL; > + > + val = mc_readl(mc, hr_client->ctrl); > + if (enable) > + val |= BIT(hr_client->bit); > + else > + val &= ~BIT(hr_client->bit); > + mc_writel(mc, val, hr_cli...
2014 Dec 23
0
[PATCH 3/11] memory: tegra: add flush operation for Tegra124 memory clients
...u32 cur_stat; + u32 prv_stat; + + prv_stat = mc_readl(mc, reg); + for (i = 0; i < 5; i++) { + cur_stat = mc_readl(mc, reg); + if (cur_stat != prv_stat) + return false; + } + *stat = cur_stat; + return true; +} + +static int tegra124_mc_flush(struct tegra_mc *mc, + const struct tegra_mc_hr *hr_client, bool enable) +{ + u32 val; + + if (!mc || !hr_client) + return -EINVAL; + + val = mc_readl(mc, hr_client->ctrl); + if (enable) + val |= BIT(hr_client->bit); + else + val &= ~BIT(hr_client->bit); + mc_writel(mc, val, hr_client->ctrl); + mc_readl(mc, hr_client->ctrl); + + /* po...
2015 Jan 06
1
[PATCH 3/11] memory: tegra: add flush operation for Tegra124 memory clients
...s function > is to make sure we have a stable status. This warrants a comment, then. > > > + *stat = cur_stat; > > > + return true; > > > +} > > > + > > > +static int tegra124_mc_flush(struct tegra_mc *mc, > > > + const struct tegra_mc_hr *hr_client, bool enable) > > > +{ > > > + u32 val; > > > + > > > + if (!mc || !hr_client) > > > + return -EINVAL; > > > + > > > + val = mc_readl(mc, hr_client->ctrl); > > > + if (enable) > > > + val |= BIT(hr_client->bit)...
2015 Jan 06
0
[PATCH 3/11] memory: tegra: add flush operation for Tegra124 memory clients
...ctrl reg and then read the status reg in a short window. This function is to make sure we have a stable status. > > > + *stat = cur_stat; > > + return true; > > +} > > + > > +static int tegra124_mc_flush(struct tegra_mc *mc, > > + const struct tegra_mc_hr *hr_client, bool enable) > > +{ > > + u32 val; > > + > > + if (!mc || !hr_client) > > + return -EINVAL; > > + > > + val = mc_readl(mc, hr_client->ctrl); > > + if (enable) > > + val |= BIT(hr_client->bit); > > + else > > + val &= ~B...
2014 Dec 23
18
[PATCH 0/11] Add suspend/resume support for GK20A
Hi, This series includes some pieces of fixes to complete the GK20A power on/off sequences and add the suspend/resume support. The patches 1/11 - 4/11 are based on the linux-next-20141219. The patches 5/11 - 11/11 are based on the branch "linux-3.19" of Ben Skeggs's tree (http://cgit.freedesktop.org/~darktama/nouveau). Thanks, Vince Vince Hsu (4): (linux-next-20141219) ARM:
2014 Dec 23
0
[PATCH 2/11] memory: tegra: add mc flush support
...memory/tegra/mc.c @@ -62,6 +62,27 @@ static const struct of_device_id tegra_mc_of_match[] = { }; MODULE_DEVICE_TABLE(of, tegra_mc_of_match); +int tegra_mc_flush(struct tegra_mc *mc, unsigned int swgroup, bool enable) +{ + int i; + const struct tegra_mc_hr *client; + + if (!mc || !mc->soc->hr_clients || + !mc->soc->ops || !mc->soc->ops->flush) + return -EINVAL;; + + client = mc->soc->hr_clients; + + for (i = 0; i < mc->soc->num_hr_clients; i++, client++) { + if (swgroup == client->swgroup) { + return mc->soc->ops->flush(mc, client, enable); + }...
2015 Jan 06
2
[PATCH 2/11] memory: tegra: add mc flush support
...onst struct of_device_id tegra_mc_of_match[] = { > }; > MODULE_DEVICE_TABLE(of, tegra_mc_of_match); > > +int tegra_mc_flush(struct tegra_mc *mc, unsigned int swgroup, bool enable) > +{ > + int i; > + const struct tegra_mc_hr *client; > + > + if (!mc || !mc->soc->hr_clients || > + !mc->soc->ops || !mc->soc->ops->flush) > + return -EINVAL;; > + > + client = mc->soc->hr_clients; > + > + for (i = 0; i < mc->soc->num_hr_clients; i++, client++) { > + if (swgroup == client->swgroup) { > + return mc->soc->...
2015 Jan 07
0
[PATCH 2/11] memory: tegra: add mc flush support
...= { > > }; > > MODULE_DEVICE_TABLE(of, tegra_mc_of_match); > > > > +int tegra_mc_flush(struct tegra_mc *mc, unsigned int swgroup, bool enable) > > +{ > > + int i; > > + const struct tegra_mc_hr *client; > > + > > + if (!mc || !mc->soc->hr_clients || > > + !mc->soc->ops || !mc->soc->ops->flush) > > + return -EINVAL;; > > + > > + client = mc->soc->hr_clients; > > + > > + for (i = 0; i < mc->soc->num_hr_clients; i++, client++) { > > + if (swgroup == client->swgroup...
2015 Jan 06
2
[PATCH nouveau 06/11] platform: complete the power up/down sequence
...ct tegra_mc *mc; > struct list_head head; > struct list_head clients; > }; > > And added the list head in the struct tegra_mc_soc. > > struct tegra_mc_soc { > struct tegra_mc_client *clients; > unsigned int num_clients; > > struct tegra_mc_hr *hr_clients; > unsigned int num_hr_clients; Why do you still need these? > struct list_head swgroups; This doesn't belong in struct tegra_mc_soc because that's meant to be static information about the specific variant of the memory-controller. Put it in struct tegra_mc instead. >...
2015 Jan 06
2
[PATCH nouveau 06/11] platform: complete the power up/down sequence
...clients; > >>}; > >> > >>And added the list head in the struct tegra_mc_soc. > >> > >>struct tegra_mc_soc { > >> struct tegra_mc_client *clients; > >> unsigned int num_clients; > >> > >> struct tegra_mc_hr *hr_clients; > >> unsigned int num_hr_clients; > >Why do you still need these? > This part is added in "[PATCH 2/11] memory: tegra: add mc flush support" and > "[PATCH 3/11] memory: tegra: add flush operation for Tegra124 memory > clients" > for the hotreset...
2015 Jan 05
2
[PATCH nouveau 06/11] platform: complete the power up/down sequence
On Thu, Dec 25, 2014 at 10:42:58AM +0800, Vince Hsu wrote: > > On 12/24/2014 09:23 PM, Lucas Stach wrote: > >Am Dienstag, den 23.12.2014, 18:39 +0800 schrieb Vince Hsu: > >>This patch adds some missing pieces of the rail gaing/ungating sequence that > >>can improve the stability in theory. > >> > >>Signed-off-by: Vince Hsu <vinceh at
2015 Jan 06
0
[PATCH nouveau 06/11] platform: complete the power up/down sequence
...tegra_mc_swgroup { unsigned int id; struct tegra_mc *mc; struct list_head head; struct list_head clients; }; And added the list head in the struct tegra_mc_soc. struct tegra_mc_soc { struct tegra_mc_client *clients; unsigned int num_clients; struct tegra_mc_hr *hr_clients; unsigned int num_hr_clients; struct list_head swgroups; ... Created one function to build the swgroup list. static int tegra_mc_build_swgroup(struct tegra_mc *mc) { int i; for (i = 0; i < mc->soc->num_clients; i++) { struct tegra_mc_swgroup *sg;...
2015 Jan 06
0
[PATCH nouveau 06/11] platform: complete the power up/down sequence
...d head; >> struct list_head clients; >> }; >> >> And added the list head in the struct tegra_mc_soc. >> >> struct tegra_mc_soc { >> struct tegra_mc_client *clients; >> unsigned int num_clients; >> >> struct tegra_mc_hr *hr_clients; >> unsigned int num_hr_clients; > Why do you still need these? This part is added in "[PATCH 2/11] memory: tegra: add mc flush support" and "[PATCH 3/11] memory: tegra: add flush operation for Tegra124 memory clients" for the hotreset registers. > >>...
2015 Jan 06
0
[PATCH nouveau 06/11] platform: complete the power up/down sequence
...gt; > > >>And added the list head in the struct tegra_mc_soc. > > >> > > >>struct tegra_mc_soc { > > >> struct tegra_mc_client *clients; > > >> unsigned int num_clients; > > >> > > >> struct tegra_mc_hr *hr_clients; > > >> unsigned int num_hr_clients; > > >Why do you still need these? > > This part is added in "[PATCH 2/11] memory: tegra: add mc flush support" and > > "[PATCH 3/11] memory: tegra: add flush operation for Tegra124 memory > > clients&quo...