All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jian.Luo4 <Jian.Luo4@boschrexroth.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 8/8] arm: socfpga: Make the pinmux table const u8
Date: Wed, 19 Aug 2015 12:14:21 +0200	[thread overview]
Message-ID: <55D456FD.2040701@boschrexroth.de> (raw)
In-Reply-To: <201508190538.06022.marex@denx.de>

Hi Marek,

the last sed line is invalid for my GNU sed 4.2.2.
Maybe missed a semicolon?

sed -n '/^unsigned/ !b; :next {/^unsigned/ {s/\[.*\]/[]/;s/unsigned long/const u8/};p;n;b next}' \
#                                                       ^here

Best regards,

*Jian Luo
DC-IA/EAH2*

Tel.  +49(9352)18-4266

*Be**QIK
*

On 19.08.2015 05:38, Marek Vasut wrote:
> On Wednesday, August 19, 2015 at 05:09:23 AM, Dinh Nguyen wrote:
>> On 8/10/15 6:10 PM, Marek Vasut wrote:
>>> Now that we're actually converting the QTS-generated header files,
>>> we can even adjust their data types. A good candidate for this is
>>> the pinmux table, where each entry can have value in the range of
>>> 0..3, but each element is declared as unsigned long. By changing
>>> the type to u8, we can save over 600 Bytes from the SPL, so do it.
>>> This patch also constifies the array.
>>>
>>> Signed-off-by: Marek Vasut <marex@denx.de>
>>> ---
>>>
>>>   arch/arm/mach-socfpga/include/mach/system_manager.h | 3 +--
>>>   arch/arm/mach-socfpga/qts-filter.sh                 | 2 +-
>>>   arch/arm/mach-socfpga/system_manager.c              | 2 +-
>>>   arch/arm/mach-socfpga/wrap_pinmux_config.c          | 3 +--
>>>   board/altera/arria5-socdk/qts/pinmux_config.h       | 2 +-
>>>   board/altera/cyclone5-socdk/qts/pinmux_config.h     | 2 +-
>>>   6 files changed, 6 insertions(+), 8 deletions(-)
>>>
>>> diff --git a/arch/arm/mach-socfpga/include/mach/system_manager.h
>>> b/arch/arm/mach-socfpga/include/mach/system_manager.h index
>>> 46af30b..8712f8e 100644
>>> --- a/arch/arm/mach-socfpga/include/mach/system_manager.h
>>> +++ b/arch/arm/mach-socfpga/include/mach/system_manager.h
>>> @@ -12,8 +12,7 @@
>>>
>>>   void sysmgr_pinmux_init(void);
>>>   void sysmgr_config_warmrstcfgio(int enable);
>>>
>>> -void sysmgr_get_pinmux_table(const unsigned long **table,
>>> -			     unsigned int *table_len);
>>> +void sysmgr_get_pinmux_table(const u8 **table, unsigned int *table_len);
>>>
>>>   #endif
>>>   
>>>   struct socfpga_system_manager {
>>>
>>> diff --git a/arch/arm/mach-socfpga/qts-filter.sh
>>> b/arch/arm/mach-socfpga/qts-filter.sh index 16d3a2a..fc41d99 100755
>>> --- a/arch/arm/mach-socfpga/qts-filter.sh
>>> +++ b/arch/arm/mach-socfpga/qts-filter.sh
>>> @@ -66,7 +66,7 @@ process_pinmux_config() {
>>>
>>>   EOF
>>>   
>>>   	# Retrieve the pinmux config and zap the ad-hoc length encoding
>>>
>>> -	sed -n '/^unsigned/ !b; :next {/^unsigned/ s/\[.*\]/[]/;p;n;b next}' \
>>> +	sed -n '/^unsigned/ !b; :next {/^unsigned/ {s/\[.*\]/[]/s/unsigned
>>> long/const u8/};p;n;b next}' \
>>>
>>>   		${in_dir}/generated/pinmux_config_${soc}.c
>> Should this change be in it's own patch?
> Not really, I think you want to change all the places atomically.
>
> Best regards,
> Marek Vasut
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot

  reply	other threads:[~2015-08-19 10:14 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-10 23:10 [U-Boot] [PATCH 0/8] arm: socfpga: Board cleanup Marek Vasut
2015-08-10 23:10 ` [U-Boot] [PATCH 1/8] arm: socfpga: Move wrappers into platform directory Marek Vasut
2015-08-10 23:10 ` [U-Boot] [PATCH 2/8] arm: socfpga: Unbind CPU type from board type Marek Vasut
2015-08-10 23:10 ` [U-Boot] [PATCH 3/8] arm: socfpga: Split Altera socfpga into AV and CV SoCDK Marek Vasut
2015-08-10 23:10 ` [U-Boot] [PATCH 4/8] arm: socfpga: Remove CV-specific parts from AV-SoCDK Marek Vasut
2015-08-10 23:10 ` [U-Boot] [PATCH 5/8] arm: socfpga: Remove AV-specific parts from CV-SoCDK Marek Vasut
2015-08-10 23:10 ` [U-Boot] [PATCH 6/8] arm: socfpga: Add qts-filter.sh script Marek Vasut
2015-08-10 23:10 ` [U-Boot] [PATCH 7/8] arm: socfpga: Switch to filtered QTS files Marek Vasut
2015-08-10 23:10 ` [U-Boot] [PATCH 8/8] arm: socfpga: Make the pinmux table const u8 Marek Vasut
2015-08-19  3:09   ` Dinh Nguyen
2015-08-19  3:38     ` Marek Vasut
2015-08-19 10:14       ` Jian.Luo4 [this message]
2015-08-19 20:27         ` Marek Vasut
2015-08-12 20:08 ` [U-Boot] [PATCH 0/8] arm: socfpga: Board cleanup Marek Vasut
2015-08-18 20:44   ` Dinh Nguyen
2015-08-18 22:07     ` Marek Vasut
2015-08-19  3:10 ` Dinh Nguyen

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=55D456FD.2040701@boschrexroth.de \
    --to=jian.luo4@boschrexroth.de \
    --cc=u-boot@lists.denx.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.