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

Commit 35f7b961 authored by omar ramirez's avatar omar ramirez Committed by Tony Lindgren
Browse files

OMAP3/4: l3: minor cleanup for parenthesis and extra spaces



Removing extra lines, spaces and unneeded parenthesis.
Collapsing an if statement to detect the type of error.

l3_smx:
- Fixing the message printed on error.

So now: 				looks like:
"No Error Error seen..."		"No Error seen..."
"In-Band Error Error seen..."	"In-Band Error seen..."

Other messages are self explanatory, no "Error" added to them.
(E.g.: "Address Hole seen...")

Signed-off-by: default avatarOmar Ramirez Luna <omar.ramirez@ti.com>
Acked-by: default avatarSantosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent 7529b703
Loading
Loading
Loading
Loading
+7 −10
Original line number Original line Diff line number Diff line
@@ -63,10 +63,7 @@ static irqreturn_t l3_interrupt_handler(int irq, void *_l3)
	char *source_name;
	char *source_name;


	/* Get the Type of interrupt */
	/* Get the Type of interrupt */
	if (irq == l3->app_irq)
	inttype = irq == l3->app_irq ? L3_APPLICATION_ERROR : L3_DEBUG_ERROR;
		inttype = L3_APPLICATION_ERROR;
	else
		inttype = L3_DEBUG_ERROR;


	for (i = 0; i < L3_MODULES; i++) {
	for (i = 0; i < L3_MODULES; i++) {
		/*
		/*
@@ -84,10 +81,10 @@ static irqreturn_t l3_interrupt_handler(int irq, void *_l3)


			err_src = j;
			err_src = j;
			/* Read the stderrlog_main_source from clk domain */
			/* Read the stderrlog_main_source from clk domain */
			std_err_main_addr = base + (*(l3_targ[i] + err_src));
			std_err_main_addr = base + *(l3_targ[i] + err_src);
			std_err_main = readl(std_err_main_addr);
			std_err_main = readl(std_err_main_addr);


			switch ((std_err_main & CUSTOM_ERROR)) {
			switch (std_err_main & CUSTOM_ERROR) {
			case STANDARD_ERROR:
			case STANDARD_ERROR:
				source_name =
				source_name =
				l3_targ_stderrlog_main_name[i][err_src];
				l3_targ_stderrlog_main_name[i][err_src];
@@ -143,7 +140,7 @@ static int __init omap4_l3_probe(struct platform_device *pdev)
	}
	}


	l3->l3_base[0] = ioremap(res->start, resource_size(res));
	l3->l3_base[0] = ioremap(res->start, resource_size(res));
	if (!(l3->l3_base[0])) {
	if (!l3->l3_base[0]) {
		dev_err(&pdev->dev, "ioremap failed\n");
		dev_err(&pdev->dev, "ioremap failed\n");
		ret = -ENOMEM;
		ret = -ENOMEM;
		goto err0;
		goto err0;
@@ -157,7 +154,7 @@ static int __init omap4_l3_probe(struct platform_device *pdev)
	}
	}


	l3->l3_base[1] = ioremap(res->start, resource_size(res));
	l3->l3_base[1] = ioremap(res->start, resource_size(res));
	if (!(l3->l3_base[1])) {
	if (!l3->l3_base[1]) {
		dev_err(&pdev->dev, "ioremap failed\n");
		dev_err(&pdev->dev, "ioremap failed\n");
		ret = -ENOMEM;
		ret = -ENOMEM;
		goto err1;
		goto err1;
@@ -171,7 +168,7 @@ static int __init omap4_l3_probe(struct platform_device *pdev)
	}
	}


	l3->l3_base[2] = ioremap(res->start, resource_size(res));
	l3->l3_base[2] = ioremap(res->start, resource_size(res));
	if (!(l3->l3_base[2])) {
	if (!l3->l3_base[2]) {
		dev_err(&pdev->dev, "ioremap failed\n");
		dev_err(&pdev->dev, "ioremap failed\n");
		ret = -ENOMEM;
		ret = -ENOMEM;
		goto err2;
		goto err2;
+5 −14
Original line number Original line Diff line number Diff line
@@ -155,7 +155,7 @@ static irqreturn_t omap3_l3_block_irq(struct omap3_l3 *l3,
	u8                      multi = error & L3_ERROR_LOG_MULTI;
	u8                      multi = error & L3_ERROR_LOG_MULTI;
	u32			address = omap3_l3_decode_addr(error_addr);
	u32			address = omap3_l3_decode_addr(error_addr);


	WARN(true, "%s Error seen by %s %s at address %x\n",
	WARN(true, "%s seen by %s %s at address %x\n",
				 omap3_l3_code_string(code),
				 omap3_l3_code_string(code),
			  omap3_l3_initiator_string(initid),
			  omap3_l3_initiator_string(initid),
			     multi ? "Multiple Errors" : "",
			     multi ? "Multiple Errors" : "",
@@ -167,21 +167,15 @@ static irqreturn_t omap3_l3_block_irq(struct omap3_l3 *l3,
static irqreturn_t omap3_l3_app_irq(int irq, void *_l3)
static irqreturn_t omap3_l3_app_irq(int irq, void *_l3)
{
{
	struct omap3_l3         *l3 = _l3;
	struct omap3_l3         *l3 = _l3;

	u64                     status, clear;
	u64                     status, clear;
	u64                     error;
	u64                     error;
	u64			error_addr;
	u64			error_addr;
	u64			err_source = 0;
	u64			err_source = 0;
	void			__iomem *base;
	void			__iomem *base;
	int			int_type;
	int			int_type;

	irqreturn_t             ret = IRQ_NONE;
	irqreturn_t             ret = IRQ_NONE;


	if (irq == l3->app_irq)
	int_type = irq == l3->app_irq ? L3_APPLICATION_ERROR : L3_DEBUG_ERROR;
		int_type = L3_APPLICATION_ERROR;
	else
		int_type = L3_DEBUG_ERROR;

	if (!int_type) {
	if (!int_type) {
		status = omap3_l3_readll(l3->rt, L3_SI_FLAG_STATUS_0);
		status = omap3_l3_readll(l3->rt, L3_SI_FLAG_STATUS_0);
		/*
		/*
@@ -202,7 +196,6 @@ static irqreturn_t omap3_l3_app_irq(int irq, void *_l3)
	for (err_source = 0; !(status & (1 << err_source)); err_source++)
	for (err_source = 0; !(status & (1 << err_source)); err_source++)
									;
									;
	error = omap3_l3_readll(base, L3_ERROR_LOG);
	error = omap3_l3_readll(base, L3_ERROR_LOG);

	if (error) {
	if (error) {
		error_addr = omap3_l3_readll(base, L3_ERROR_LOG_ADDR);
		error_addr = omap3_l3_readll(base, L3_ERROR_LOG_ADDR);


@@ -210,9 +203,8 @@ static irqreturn_t omap3_l3_app_irq(int irq, void *_l3)
	}
	}


	/* Clear the status register */
	/* Clear the status register */
	clear = ((L3_AGENT_STATUS_CLEAR_IA << int_type) |
	clear = (L3_AGENT_STATUS_CLEAR_IA << int_type) |
		 (L3_AGENT_STATUS_CLEAR_TA));
		L3_AGENT_STATUS_CLEAR_TA;

	omap3_l3_writell(base, L3_AGENT_STATUS, clear);
	omap3_l3_writell(base, L3_AGENT_STATUS, clear);


	/* clear the error log register */
	/* clear the error log register */
@@ -240,7 +232,7 @@ static int __init omap3_l3_probe(struct platform_device *pdev)
		goto err0;
		goto err0;
	}
	}
	l3->rt = ioremap(res->start, resource_size(res));
	l3->rt = ioremap(res->start, resource_size(res));
	if (!(l3->rt)) {
	if (!l3->rt) {
		dev_err(&pdev->dev, "ioremap failed\n");
		dev_err(&pdev->dev, "ioremap failed\n");
		ret = -ENOMEM;
		ret = -ENOMEM;
		goto err0;
		goto err0;
@@ -259,7 +251,6 @@ static int __init omap3_l3_probe(struct platform_device *pdev)
	ret = request_irq(l3->app_irq, omap3_l3_app_irq,
	ret = request_irq(l3->app_irq, omap3_l3_app_irq,
		IRQF_DISABLED | IRQF_TRIGGER_RISING,
		IRQF_DISABLED | IRQF_TRIGGER_RISING,
		"l3-app-irq", l3);
		"l3-app-irq", l3);

	if (ret) {
	if (ret) {
		dev_err(&pdev->dev, "couldn't request app irq\n");
		dev_err(&pdev->dev, "couldn't request app irq\n");
		goto err2;
		goto err2;