mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 02/10] ARM i.MX bootsource: convert all imx*_boot_save_loc functions to void
Date: Thu, 14 Mar 2013 18:38:41 +0100	[thread overview]
Message-ID: <1363282729-18545-3-git-send-email-mkl@pengutronix.de> (raw)
In-Reply-To: <1363282729-18545-1-git-send-email-mkl@pengutronix.de>

This function gives all functions a common, i.e. void, return value.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 arch/arm/mach-imx/boot.c                 | 18 ++++++------------
 arch/arm/mach-imx/include/mach/generic.h |  8 ++++----
 2 files changed, 10 insertions(+), 16 deletions(-)

diff --git a/arch/arm/mach-imx/boot.c b/arch/arm/mach-imx/boot.c
index 4c43487..068fa22 100644
--- a/arch/arm/mach-imx/boot.c
+++ b/arch/arm/mach-imx/boot.c
@@ -94,7 +94,7 @@ static const enum imx_bootsource locations[4][4] = {
  * Note also that I suspect that the boot source pins are only sampled at
  * power up.
  */
-int imx_25_35_boot_save_loc(unsigned int ctrl, unsigned int type)
+void imx_25_35_boot_save_loc(unsigned int ctrl, unsigned int type)
 {
 	const char *bareboxloc = NULL;
 	enum imx_bootsource src;
@@ -106,8 +106,6 @@ int imx_25_35_boot_save_loc(unsigned int ctrl, unsigned int type)
 		setenv("barebox_loc", bareboxloc);
 		export("barebox_loc");
 	}
-
-	return 0;
 }
 
 #define IMX27_SYSCTRL_GPCR	0x18
@@ -153,7 +151,7 @@ void imx_27_boot_save_loc(void __iomem *sysctrl_base)
 #define IMX51_SBMR_BT_MEM_CTL_SHIFT	0
 #define IMX51_SBMR_BMOD_SHIFT		14
 
-int imx51_boot_save_loc(void __iomem *src_base)
+void imx51_boot_save_loc(void __iomem *src_base)
 {
 	enum imx_bootsource src = BOOTSOURCE_UNKNOWN;
 	uint32_t reg;
@@ -181,12 +179,10 @@ int imx51_boot_save_loc(void __iomem *src_base)
 	}
 
 	imx_set_bootsource(src);
-
-	return 0;
 }
 
 #define IMX53_SRC_SBMR	0x4
-int imx53_boot_save_loc(void __iomem *src_base)
+void imx53_boot_save_loc(void __iomem *src_base)
 {
 	enum imx_bootsource src = BOOTSOURCE_UNKNOWN;
 	uint32_t cfg1 = readl(src_base + IMX53_SRC_SBMR) & 0xff;
@@ -215,14 +211,12 @@ int imx53_boot_save_loc(void __iomem *src_base)
 		src = BOOTSOURCE_NAND;
 
 	imx_set_bootsource(src);
-
-	return 0;
 }
 
 #define IMX6_SRC_SBMR1	0x04
 #define IMX6_SRC_SBMR2	0x1c
 
-int imx6_boot_save_loc(void __iomem *src_base)
+void imx6_boot_save_loc(void __iomem *src_base)
 {
 	enum imx_bootsource src = BOOTSOURCE_UNKNOWN;
 	uint32_t sbmr2 = readl(src_base + IMX6_SRC_SBMR2) >> 24;
@@ -245,7 +239,7 @@ int imx6_boot_save_loc(void __iomem *src_base)
 
 	imx_set_bootsource(src);
 
-	return 0;
+	return;
 
 internal_boot:
 
@@ -276,5 +270,5 @@ internal_boot:
 
 	imx_set_bootsource(src);
 
-	return 0;
+	return;
 }
diff --git a/arch/arm/mach-imx/include/mach/generic.h b/arch/arm/mach-imx/include/mach/generic.h
index a271b5b..e6edb94 100644
--- a/arch/arm/mach-imx/include/mach/generic.h
+++ b/arch/arm/mach-imx/include/mach/generic.h
@@ -16,11 +16,11 @@ enum imx_bootsource {
 enum imx_bootsource imx_bootsource(void);
 void imx_set_bootsource(enum imx_bootsource src);
 
-int imx_25_35_boot_save_loc(unsigned int ctrl, unsigned int type);
+void imx_25_35_boot_save_loc(unsigned int ctrl, unsigned int type);
 void imx_27_boot_save_loc(void __iomem *sysctrl_base);
-int imx51_boot_save_loc(void __iomem *src_base);
-int imx53_boot_save_loc(void __iomem *src_base);
-int imx6_boot_save_loc(void __iomem *src_base);
+void imx51_boot_save_loc(void __iomem *src_base);
+void imx53_boot_save_loc(void __iomem *src_base);
+void imx6_boot_save_loc(void __iomem *src_base);
 
 /* There's a off-by-one betweem the gpio bank number and the gpiochip */
 /* range e.g. GPIO_1_5 is gpio 5 under linux */
-- 
1.8.2.rc2


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2013-03-14 17:38 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-14 17:38 [PATCH 00/10] make bootsource an arch independent framework Marc Kleine-Budde
2013-03-14 17:38 ` [PATCH 01/10] ARM i.MX bootsource: convert enums from enum imx_bootsource to uppercase Marc Kleine-Budde
2013-03-14 17:38 ` Marc Kleine-Budde [this message]
2013-03-14 17:38 ` [PATCH 03/10] ARM i.MX bootsource: imx_25_35_boot_save_loc: remove leftover do-nothing code Marc Kleine-Budde
2013-03-14 17:38 ` [PATCH 04/10] ARM i.MX bootsource: rename imx_27_boot_save_loc -> imx27_boot_save_loc Marc Kleine-Budde
2013-03-14 17:38 ` [PATCH 05/10] ARM i.MX bootsource: add separate function for mx25 and mx35 Marc Kleine-Budde
2013-03-14 17:38 ` [PATCH 06/10] bootsource: create arch independent bootsource framework Marc Kleine-Budde
2013-03-14 17:38 ` [PATCH 07/10] bootsource: use initcall to export bootsource location to environment Marc Kleine-Budde
2013-03-14 17:38 ` [PATCH 08/10] bootsource: add support for bootsource instance information Marc Kleine-Budde
2013-03-14 17:38 ` [PATCH 09/10] bootsource: add definition for usb and eeprom Marc Kleine-Budde
2013-03-14 17:38 ` [PATCH 10/10] ARM: mxs: add bootsource detection Marc Kleine-Budde

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1363282729-18545-3-git-send-email-mkl@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox