mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: barebox@lists.infradead.org
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>,
	Patrice Vilchez <patrice.vilchez@atmel.com>
Subject: [PATCH 03/12] cfi_flash: move flash_read_uchar from inline to noinline
Date: Fri, 26 Nov 2010 20:52:32 +0100	[thread overview]
Message-ID: <1290801161-2417-3-git-send-email-plagnioj@jcrosoft.com> (raw)
In-Reply-To: <20101126194353.GH26540@game.jcrosoft.org>

it will reduce the binary size of 28 bytes
and fix some issue observerd during the porting of the at91rm9200ek
when reading the device_id and manufacturor_id

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
 drivers/nor/cfi_flash.c |   15 +++++++++++++++
 drivers/nor/cfi_flash.h |   15 +--------------
 2 files changed, 16 insertions(+), 14 deletions(-)

diff --git a/drivers/nor/cfi_flash.c b/drivers/nor/cfi_flash.c
index 08e45ef..0efe0d4 100644
--- a/drivers/nor/cfi_flash.c
+++ b/drivers/nor/cfi_flash.c
@@ -186,6 +186,21 @@ static void flash_printqry (struct flash_info *info, flash_sect_t sect)
 #endif
 
 /*
+ * read a character at a port width address
+ */
+uchar flash_read_uchar (struct flash_info *info, uint offset)
+{
+	uchar *cp;
+
+	cp = flash_make_addr (info, 0, offset);
+#if defined(__LITTLE_ENDIAN)
+	return (cp[0]);
+#else
+	return (cp[info->portwidth - 1]);
+#endif
+}
+
+/*
  * read a short word by swapping for ppc format.
  */
 static ushort flash_read_ushort (struct flash_info *info, flash_sect_t sect, uint offset)
diff --git a/drivers/nor/cfi_flash.h b/drivers/nor/cfi_flash.h
index 047a035..9a299db 100644
--- a/drivers/nor/cfi_flash.h
+++ b/drivers/nor/cfi_flash.h
@@ -211,20 +211,7 @@ static inline uchar *flash_make_addr (struct flash_info *info, flash_sect_t sect
 	return ((uchar *) (info->start[sect] + (offset * info->portwidth)));
 }
 
-/*
- * read a character at a port width address
- */
-static inline uchar flash_read_uchar (struct flash_info *info, uint offset)
-{
-	uchar *cp;
-
-	cp = flash_make_addr (info, 0, offset);
-#if defined(__LITTLE_ENDIAN)
-	return (cp[0]);
-#else
-	return (cp[info->portwidth - 1]);
-#endif
-}
+uchar flash_read_uchar (struct flash_info *info, uint offset);
 
 #ifdef CONFIG_DRIVER_CFI_BANK_WIDTH_1
 #define bankwidth_is_1(info) (info->portwidth == 1)
-- 
1.7.1


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

  parent reply	other threads:[~2010-11-26 19:56 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-26 19:43 [PATCH 0/12] cfi_flash: improvment Jean-Christophe PLAGNIOL-VILLARD
2010-11-26 19:52 ` [PATCH 01/12] cfi_flash: move intel real protect flash support to cfi_flash_intel.c Jean-Christophe PLAGNIOL-VILLARD
2010-11-26 19:52 ` [PATCH 02/12] cfi_flash: add Atmel real protect flash support Jean-Christophe PLAGNIOL-VILLARD
2010-11-26 19:52 ` Jean-Christophe PLAGNIOL-VILLARD [this message]
2010-11-26 19:52 ` [PATCH 04/12] cfi_flash: use amd and standard reset flash command at probing Jean-Christophe PLAGNIOL-VILLARD
2010-11-26 19:52 ` [PATCH 05/12] cfi_flash: synchronize command offsets with Linux CFI driver Jean-Christophe PLAGNIOL-VILLARD
2010-11-26 19:52 ` [PATCH 06/12] cfi_flash: update manufacturer id flash support Jean-Christophe PLAGNIOL-VILLARD
2010-11-26 19:52 ` [PATCH 07/12] cfi_flash: Introduce read and write accessors Jean-Christophe PLAGNIOL-VILLARD
2010-11-26 19:52 ` [PATCH 08/12] cfi_flash: Read whole QRY structure in one go Jean-Christophe PLAGNIOL-VILLARD
2010-11-26 19:52 ` [PATCH 09/12] cfi_flash: do not reset flash when probe fails Jean-Christophe PLAGNIOL-VILLARD
2010-11-26 19:52 ` [PATCH 10/12] cfi_flash: move reset command assigment to specific chipset init function Jean-Christophe PLAGNIOL-VILLARD
2010-11-26 19:52 ` [PATCH 11/12] cfi_flash: introduce flash cmdset fixup Jean-Christophe PLAGNIOL-VILLARD
2010-11-26 19:52 ` [PATCH 12/12] cfi_flash_amd: Add manufacturer-specific fixups Jean-Christophe PLAGNIOL-VILLARD
2010-11-29 20:53 ` [PATCH 0/12] cfi_flash: improvment Sascha Hauer
2010-11-30 13:44   ` Jean-Christophe PLAGNIOL-VILLARD
2010-12-02 17:52   ` Jean-Christophe PLAGNIOL-VILLARD

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=1290801161-2417-3-git-send-email-plagnioj@jcrosoft.com \
    --to=plagnioj@jcrosoft.com \
    --cc=barebox@lists.infradead.org \
    --cc=nicolas.ferre@atmel.com \
    --cc=patrice.vilchez@atmel.com \
    /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